/* ═══════════════════════════════════════════════════════════
   ISERIG HOF — Admin Dashboard Styles
   ═══════════════════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@400..700&family=Lora:ital,wght@0,400..700;1,400..700&family=Playfair+Display:ital,wght@0,400..900;1,400..900&family=Inter:wght@300..700&display=swap');

:root {
  /* Original green palette adapted for Admin UI */
  --c-bg: #FAFAF6;
  --c-surface: #FFFFFF;
  --c-surface2: #F3F1EC;
  --c-dark: #1A1A18;
  --c-dark2: #2C2B28;
  --c-mid: #5C5852;
  --c-dim: #8A857C;
  --c-border: #E0DDD5;
  --c-green: #2D6A3F;
  --c-green-d: #1E4F2D;
  --c-green-l: #E8F5ED;
  --c-accent: #3AAF65;
  --c-gold: #C8A96E;
  --c-white: #FFFFFF;
  
  /* Status Colors */
  --c-status-pending: #f59e0b;
  --c-status-completed: #10b981;
  --c-status-cancelled: #ef4444;

  /* Typography */
  --font-body: 'Inter', sans-serif; /* Cleaner for data/admin */
  --font-head: 'Playfair Display', serif; /* Keep rustic headings */
  --font-hand: 'Caveat', cursive;
  --font-serif: 'Lora', serif;

  /* Layout & Corners */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  
  /* Shadows */
  --shadow-sm: 0 2px 6px rgba(0, 0, 0, .04);
  --shadow-md: 0 8px 24px rgba(45, 106, 63, .08);
  --shadow-lg: 0 16px 40px rgba(45, 106, 63, .12);
  
  --transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
  --sidebar-w: 260px;
}

/* ── RESET ── */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  background: var(--c-bg);
  color: var(--c-dark);
  line-height: 1.6;
  overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* ── TYPOGRAPHY ── */
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 600; color: var(--c-dark); }
.handwritten { font-family: var(--font-hand); color: var(--c-accent); font-weight: 600; }

/* ── LAYOUT ── */
.app-container {
  display: flex;
  min-height: 100vh;
}

/* ── SIDEBAR ── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--c-surface);
  border-right: 2px solid var(--c-border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; bottom: 0; left: 0;
  z-index: 100;
}
.sidebar-header {
  padding: 2rem 2rem 1.5rem;
  border-bottom: 2px dashed var(--c-border);
}
.sidebar-logo {
  font-family: var(--font-hand);
  font-size: 2rem;
  color: var(--c-green);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.sidebar-nav {
  padding: 2rem 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1.5rem;
  border-radius: var(--radius-md);
  color: var(--c-mid);
  font-weight: 500;
  transition: var(--transition);
}
.nav-item i { font-size: 1.2rem; }
.nav-item:hover, .nav-item.active {
  background: var(--c-green-l);
  color: var(--c-green);
}
.nav-item.active {
  background: var(--c-green);
  color: var(--c-white);
  box-shadow: 0 4px 12px rgba(45, 106, 63, .25);
}
.nav-item.logout-btn {
  margin-top: auto;
  color: var(--c-status-cancelled) !important;
}
.nav-item.logout-btn:hover {
  background: #FEE2E2;
  color: #991B1B !important;
}

/* ── MAIN CONTENT ── */
.main-wrapper {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--c-surface2);
  min-height: 100vh;
}

.topbar {
  height: 80px;
  background: var(--c-surface);
  border-bottom: 2px solid var(--c-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  position: sticky;
  top: 0;
  z-index: 90;
  gap: 1rem;
}
.topbar-title h2 { margin: 0; font-size: 1.6rem; }
.topbar-title p { font-size: 0.9rem; color: var(--c-dim); font-family: var(--font-serif); }
.topbar-actions { display: flex; align-items: center; gap: 1rem; flex-shrink: 0; }
.user-profile {
  display: flex; align-items: center; gap: 0.8rem;
  font-weight: 600; color: var(--c-dark2);
}
.avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--c-green-l);
  color: var(--c-green);
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--c-green);
  font-weight: 700;
}



/* ── CARDS & METRICS ── */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}
.metric-card {
  background: var(--c-surface);
  padding: 1.8rem;
  border-radius: var(--radius-lg);
  border: 2px solid var(--c-border);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 1.5rem;
  transition: var(--transition);
}
.metric-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--c-accent); }
.metric-icon {
  width: 60px; height: 60px;
  border-radius: 14px;
  background: var(--c-green-l);
  color: var(--c-green);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem;
}
.metric-info p { font-size: 0.9rem; color: var(--c-dim); font-weight: 500; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 0.2rem; }
.metric-info h3 { font-size: 2rem; font-family: var(--font-body); font-weight: 700; margin: 0; line-height: 1; }

/* ── TABLES ── */
.card-panel {
  background: var(--c-surface);
  border-radius: var(--radius-lg);
  border: 2px solid var(--c-border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.card-header {
  padding: 1.5rem 2rem;
  border-bottom: 2px solid var(--c-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.card-header h3 { font-size: 1.4rem; }
.data-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: auto;
}
.data-table th, .data-table td {
  padding: 0.9rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--c-border);
  font-size: 0.9rem;
}
.data-table th {
  background: var(--c-surface2);
  font-weight: 600;
  color: var(--c-mid);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  white-space: nowrap;
}
.data-table tbody tr { transition: background var(--transition); }
.data-table tbody tr:hover { background: var(--c-bg); }

/* Beschreibung in Tabellen kürzen */
.cell-beschreibung {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.content-area {
  padding: 2rem;
  flex: 1;
}

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  font-weight: 600; font-size: 0.9rem;
  transition: var(--transition);
}
.btn-primary { background: var(--c-green); color: var(--c-white); border: 2px solid var(--c-green); box-shadow: 0 4px 12px rgba(45, 106, 63, .2); }
.btn-primary:hover { background: var(--c-green-d); border-color: var(--c-green-d); transform: translateY(-2px); }
.btn-outline { background: transparent; color: var(--c-dark); border: 2px solid var(--c-border); }
.btn-outline:hover { border-color: var(--c-accent); color: var(--c-accent); background: var(--c-green-l); }
.btn-action { padding: 0.4rem; border-radius: var(--radius-sm); color: var(--c-dim); background: var(--c-surface2); }
.btn-action:hover { color: var(--c-green); background: var(--c-green-l); }

/* ── BADGES ── */
.badge {
  padding: 0.35rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}
.badge-pending { background: #FEF3C7; color: #D97706; }
.badge-completed { background: #D1FAE5; color: #059669; }

/* ── LOGIN PAGE ── */
.login-page { background: var(--c-dark); min-height: 100vh; display: flex; align-items: center; justify-content: center; position: relative; }
.login-page::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at center, rgba(45,106,63,0.3) 0%, rgba(26,26,24,1) 100%);
}
.login-box {
  background: var(--c-surface);
  width: 100%; max-width: 440px;
  padding: 3rem;
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 40px rgba(0,0,0,0.5);
  position: relative;
  z-index: 10;
  border: 1px solid rgba(255,255,255,0.1);
}
.login-box h2 { text-align: center; font-size: 2.2rem; margin-bottom: 0.5rem; }
.login-box p.subtitle { text-align: center; color: var(--c-dim); font-family: var(--font-hand); font-size: 1.4rem; margin-bottom: 2.5rem; }
.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 0.5rem; color: var(--c-dark2); }
.form-control { width: 100%; padding: 0.9rem 1rem; border: 2px solid var(--c-border); border-radius: var(--radius-sm); font-family: var(--font-body); font-size: 1rem; transition: var(--transition); }
.form-control:focus { outline: none; border-color: var(--c-accent); box-shadow: 0 0 0 3px var(--c-green-l); }
.login-btn { width: 100%; padding: 1rem; font-size: 1.1rem; margin-top: 1rem; }

/* ── SELECT / DROPDOWN ── */
select.form-control {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%235C5852' d='M1.41 0L6 4.58 10.59 0 12 1.41l-6 6-6-6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}
select.form-control:hover { border-color: var(--c-accent); }

