/* ── AgriFlow Design System v4 ────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ── Variables ───────────────────────────────────────── */
:root {
  --bg:          #080d08;
  --bg2:         #0f160f;
  --bg3:         #161e16;
  --card:        #111911;
  --border:      rgba(255,255,255,0.07);
  --border2:     rgba(34,197,94,0.22);
  --text:        #f0fdf4;
  --muted:       #5a7a5a;
  --muted2:      #243224;
  --primary:     #22c55e;
  --primary2:    #16a34a;
  --primary-dim: rgba(34,197,94,0.1);
  --danger:      #f87171;
  --danger-dim:  rgba(248,113,113,0.1);
  --warning:     #fbbf24;
  --warning-dim: rgba(251,191,36,0.1);
  --info:        #60a5fa;
  --info-dim:    rgba(96,165,250,0.1);
  --radius:      16px;
  --radius-sm:   10px;
  --radius-lg:   22px;
  --radius-xl:   28px;
  --shadow:      0 8px 32px rgba(0,0,0,0.5);
  --shadow-sm:   0 2px 12px rgba(0,0,0,0.3);
  --font:        'Inter', -apple-system, sans-serif;
  --ease:        cubic-bezier(0.4,0,0.2,1);
  --dur:         0.2s;
}

[data-theme="light"] {
  --bg:          #f0fdf4;
  --bg2:         #dcfce7;
  --bg3:         #bbf7d0;
  --card:        #ffffff;
  --border:      rgba(0,0,0,0.07);
  --border2:     rgba(22,163,74,0.25);
  --text:        #052e16;
  --muted:       #4b7a5b;
  --muted2:      #dcfce7;
  --primary:     #16a34a;
  --primary2:    #15803d;
  --primary-dim: rgba(22,163,74,0.1);
  --danger:      #dc2626;
  --danger-dim:  rgba(220,38,38,0.08);
  --warning:     #d97706;
  --warning-dim: rgba(217,119,6,0.08);
  --info:        #2563eb;
  --info-dim:    rgba(37,99,235,0.08);
  --shadow:      0 8px 32px rgba(0,0,0,0.12);
  --shadow-sm:   0 2px 12px rgba(0,0,0,0.06);
}

/* ── Reset ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}

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

/* ── Sidebar ─────────────────────────────────────────── */
.sidebar {
  width: 260px;
  background: var(--card);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 200;
  transform: translateX(-100%);
  transition: transform 0.28s var(--ease), box-shadow 0.28s var(--ease);
  overflow-y: auto;
  overflow-x: hidden;
}
.sidebar.open {
  transform: translateX(0);
  box-shadow: 4px 0 40px rgba(0,0,0,0.4);
}
.sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.65);
  z-index: 199;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: fadeIn 0.2s var(--ease);
}
.sidebar-overlay.show { display: block; }
.main { flex: 1; min-height: 100vh; display: flex; flex-direction: column; }

/* ── Topbar ──────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 100;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 0 16px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.topbar-left  { display: flex; align-items: center; gap: 12px; }
.topbar-right { display: flex; align-items: center; gap: 8px; }

.hamburger {
  width: 38px; height: 38px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg2);
  color: var(--text);
  font-size: 18px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background var(--dur) var(--ease), transform 0.15s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.hamburger:active { transform: scale(0.93); background: var(--bg3); }

.page-title    { font-size: 16px; font-weight: 700; line-height: 1.2; }
.page-subtitle { font-size: 11px; color: var(--muted); margin-top: 1px; }

/* ── Sidebar Brand ───────────────────────────────────── */
.sidebar-brand {
  padding: 20px 16px 16px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px;
}
.brand-icon {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, var(--primary), var(--primary2));
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(34,197,94,0.3);
}
.brand-name { font-size: 17px; font-weight: 800; }
.brand-tag  { font-size: 10px; color: var(--primary); font-weight: 700; letter-spacing: 0.08em; margin-top: 1px; }

/* ── Sidebar User ────────────────────────────────────── */
.sidebar-user {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px;
}
.user-avatar {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: var(--primary-dim);
  border: 2px solid var(--border2);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 800; color: var(--primary);
  flex-shrink: 0;
}
.user-name { font-size: 14px; font-weight: 700; }
.user-role { font-size: 11px; color: var(--muted); margin-top: 2px; }

/* ── Sidebar Nav ─────────────────────────────────────── */
.sidebar-nav { flex: 1; padding: 8px; overflow-y: auto; }
.nav-section {
  font-size: 10px; font-weight: 700; color: var(--muted);
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 14px 8px 5px;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 14px; font-weight: 500;
  color: var(--muted);
  border: none; background: none;
  width: 100%; text-align: left;
  transition: all var(--dur) var(--ease);
  margin-bottom: 2px;
  font-family: var(--font);
  -webkit-tap-highlight-color: transparent;
  position: relative;
}
.nav-item:hover  { background: var(--bg2); color: var(--text); }
.nav-item.active {
  background: var(--primary-dim);
  color: var(--primary);
  font-weight: 600;
}
.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 20%; bottom: 20%;
  width: 3px;
  background: var(--primary);
  border-radius: 0 3px 3px 0;
}
.nav-icon { font-size: 17px; width: 22px; text-align: center; flex-shrink: 0; }

.sidebar-footer {
  padding: 12px 8px;
  border-top: 1px solid var(--border);
}

/* ── Page Content ────────────────────────────────────── */
.page-content { flex: 1; padding: 16px; }

.section-header {
  display: flex; align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 18px;
  flex-wrap: wrap; gap: 10px;
}
.section-title { font-size: 20px; font-weight: 800; letter-spacing: -0.3px; }
.section-sub   { font-size: 12px; color: var(--muted); margin-top: 3px; }

/* ── Cards ───────────────────────────────────────────── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--dur) var(--ease);
}
.card:hover { border-color: rgba(255,255,255,0.11); }
[data-theme="light"] .card:hover { border-color: rgba(0,0,0,0.1); }

.card-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  justify-content: space-between;
  gap: 10px; flex-wrap: wrap;
}
.card-title { font-size: 14px; font-weight: 700; }
.card-body  { padding: 16px; }

/* ── Stats Grid ──────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}
.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
  cursor: default;
  animation: fadeUp 0.4s var(--ease) both;
}
.stat-card:nth-child(1) { animation-delay: 0.05s; }
.stat-card:nth-child(2) { animation-delay: 0.10s; }
.stat-card:nth-child(3) { animation-delay: 0.15s; }
.stat-card:nth-child(4) { animation-delay: 0.20s; }
.stat-icon  { font-size: 24px; margin-bottom: 10px; }
.stat-label {
  font-size: 10px; color: var(--muted);
  font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em;
}
.stat-value { font-size: 26px; font-weight: 800; margin-top: 5px; line-height: 1; }
.stat-sub   { font-size: 11px; color: var(--muted); margin-top: 5px; }

/* ── Buttons ─────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center;
  justify-content: center; gap: 6px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600;
  cursor: pointer; border: none;
  transition: all var(--dur) var(--ease);
  font-family: var(--font);
  text-decoration: none;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  overflow: hidden;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn:not(:disabled):active { transform: scale(0.96); }

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary2));
  color: #fff;
  box-shadow: 0 2px 12px rgba(34,197,94,0.25);
}
.btn-primary:not(:disabled):hover {
  box-shadow: 0 4px 20px rgba(34,197,94,0.4);
  transform: translateY(-1px);
}

.btn-danger  { background: var(--danger); color: #fff; }
.btn-danger:not(:disabled):hover { opacity: 0.88; }

.btn-outline {
  background: transparent; color: var(--text);
  border: 1.5px solid var(--border);
}
.btn-outline:not(:disabled):hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-dim);
}

.btn-ghost    { background: var(--bg2); color: var(--text); }
.btn-ghost:not(:disabled):hover { background: var(--bg3); }

.btn-sm       { padding: 7px 13px; font-size: 12px; border-radius: 8px; }
.btn-full     { width: 100%; }
.btn-icon     { width: 38px; height: 38px; padding: 0; border-radius: var(--radius-sm); }

/* ── Forms ───────────────────────────────────────────── */
.form-group   { margin-bottom: 14px; }
.form-label {
  display: block;
  font-size: 11px; font-weight: 700;
  color: var(--muted); margin-bottom: 7px;
  text-transform: uppercase; letter-spacing: 0.05em;
}
.form-input, .form-select, .form-textarea {
  width: 100%;
  background: var(--bg2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 15px;
  font-family: var(--font);
  padding: 12px 14px;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), background var(--dur);
  outline: none;
  -webkit-appearance: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-dim);
  background: var(--bg3);
}
.form-input::placeholder { color: var(--muted); opacity: 0.7; }
.form-select { cursor: pointer; }
.form-textarea { resize: vertical; min-height: 80px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ── Badges ──────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center;
  padding: 3px 10px; border-radius: 20px;
  font-size: 11px; font-weight: 700;
  white-space: nowrap; letter-spacing: 0.02em;
}
.badge-green  { background: var(--primary-dim); color: var(--primary); }
.badge-red    { background: var(--danger-dim);  color: var(--danger);  }
.badge-yellow { background: var(--warning-dim); color: var(--warning); }
.badge-blue   { background: var(--info-dim);    color: var(--info);    }
.badge-gray   { background: var(--bg3);         color: var(--muted);   }
.badge-gold   { background: rgba(251,191,36,0.12); color: #fbbf24;     }

/* ── Tables ──────────────────────────────────────────── */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; }
thead tr { border-bottom: 1px solid var(--border); }
th {
  padding: 10px 14px; text-align: left;
  font-size: 10px; font-weight: 700;
  color: var(--muted); text-transform: uppercase;
  letter-spacing: 0.07em; white-space: nowrap;
}
td { padding: 13px 14px; font-size: 13px; border-bottom: 1px solid var(--border); }
tr:last-child td { border-bottom: none; }
tr { transition: background var(--dur) var(--ease); }
tbody tr:hover td { background: var(--bg2); }

/* ── Modal ───────────────────────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.72);
  z-index: 500;
  padding: 0;
  align-items: flex-end;
  justify-content: center;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.modal-overlay.open {
  display: flex;
  animation: fadeIn 0.18s var(--ease);
}
.modal-overlay.open .modal {
  animation: slideUp 0.3s var(--ease);
}
.modal {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  width: 100%;
  max-width: 520px;
  max-height: 92vh;
  overflow-y: auto;
  padding: 28px 20px 32px;
  position: relative;
  /* Drag handle */
  padding-top: 20px;
}
.modal::before {
  content: '';
  display: block;
  width: 36px; height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: 0 auto 20px;
}
.modal-header {
  display: flex; align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.modal-title { font-size: 18px; font-weight: 800; }
.modal-close {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--bg2); border: 1px solid var(--border);
  color: var(--muted); font-size: 16px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font);
  transition: background var(--dur), color var(--dur);
  -webkit-tap-highlight-color: transparent;
}
.modal-close:hover { background: var(--danger-dim); color: var(--danger); }

/* Desktop modal — centered */
@media (min-height: 600px) and (min-width: 520px) {
  .modal-overlay { align-items: center; padding: 20px; }
  .modal {
    border-radius: var(--radius-xl);
    max-height: 88vh;
  }
  .modal::before { display: none; }
  .modal-overlay.open .modal { animation: scaleIn 0.22s var(--ease); }
}

/* ── Alert ───────────────────────────────────────────── */
.alert {
  display: none;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 600;
  margin-bottom: 14px;
  animation: fadeIn 0.2s var(--ease);
}
.alert.show         { display: block; }
.alert.error        { background: var(--danger-dim);  color: var(--danger);  border: 1px solid rgba(248,113,113,0.18); }
.alert.success      { background: var(--primary-dim); color: var(--primary); border: 1px solid rgba(34,197,94,0.18); }
.alert.warning      { background: var(--warning-dim); color: var(--warning); border: 1px solid rgba(251,191,36,0.18); }

/* ── Toast ───────────────────────────────────────────── */
#toast-root {
  position: fixed; bottom: 24px; left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex; flex-direction: column-reverse; gap: 8px;
  align-items: center; pointer-events: none;
  width: calc(100% - 32px); max-width: 360px;
}
.toast {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 13px 16px;
  font-size: 13px; font-weight: 600;
  display: flex; align-items: center; gap: 10px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  width: 100%;
  opacity: 0; transform: translateY(16px) scale(0.96);
  transition: all 0.28s var(--ease);
  pointer-events: auto;
  position: relative; overflow: hidden;
}
.toast::after {
  content: '';
  position: absolute; bottom: 0; left: 0;
  height: 2px; width: 100%;
  background: var(--primary);
  transform-origin: left;
  animation: toastProgress 3.2s linear forwards;
}
.toast.error::after   { background: var(--danger); }
.toast.warning::after { background: var(--warning); }
.toast.show { opacity: 1; transform: translateY(0) scale(1); }
.toast.success { border-color: rgba(34,197,94,0.2); }
.toast.error   { border-color: rgba(248,113,113,0.2); }
.toast.warning { border-color: rgba(251,191,36,0.2); }

/* ── Page Loader ─────────────────────────────────────── */
.page-loader {
  position: fixed; inset: 0;
  background: var(--bg);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 20px; z-index: 9000;
  transition: opacity 0.3s var(--ease);
}
.page-loader.hidden {
  opacity: 0;
  pointer-events: none;
  animation: fadeOut 0.3s var(--ease) forwards;
}
.spinner {
  width: 44px; height: 44px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}
.loader-brand {
  display: flex; align-items: center; gap: 10px;
}
.loader-icon {
  width: 44px; height: 44px;
  background: linear-gradient(135deg, var(--primary), var(--primary2));
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  box-shadow: 0 4px 20px rgba(34,197,94,0.4);
  animation: pulse 1.8s ease-in-out infinite;
}
.loader-msg { font-size: 14px; color: var(--muted); font-weight: 500; }

/* ── Skeleton Loader ─────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--bg2) 25%, var(--bg3) 50%, var(--bg2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}
.skeleton-text  { height: 14px; border-radius: 4px; }
.skeleton-title { height: 20px; border-radius: 4px; }
.skeleton-card  {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 10px;
}
.skeleton-stat {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex; flex-direction: column; gap: 10px;
}
.skeleton-row {
  display: flex; align-items: center;
  gap: 12px; padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
.skeleton-avatar {
  width: 40px; height: 40px;
  border-radius: 10px; flex-shrink: 0;
}

/* ── Empty State ─────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 48px 24px;
}
.empty-icon {
  font-size: 48px; margin-bottom: 14px;
  display: block;
  animation: float 3s ease-in-out infinite;
}
.empty-title { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.empty-sub   { font-size: 13px; color: var(--muted); line-height: 1.6; margin-bottom: 20px; }

/* ── Info List ───────────────────────────────────────── */
.info-list { display: flex; flex-direction: column; }
.info-row {
  display: flex; justify-content: space-between;
  align-items: center;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}
.info-row:last-child { border-bottom: none; }
.info-label { font-size: 12px; color: var(--muted); font-weight: 600; flex-shrink: 0; }
.info-value { font-size: 13px; font-weight: 600; text-align: right; }

/* ── Offline Bar ─────────────────────────────────────── */
.offline-bar {
  display: none;
  background: var(--warning-dim);
  border-bottom: 1px solid rgba(251,191,36,0.15);
  padding: 9px 16px;
  font-size: 12px; font-weight: 600;
  color: var(--warning); text-align: center;
  animation: slideDown 0.3s var(--ease);
}
.offline-bar.show { display: block; }

/* ── Online Dot ──────────────────────────────────────── */
.online-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-dim), 0 0 8px var(--primary);
  flex-shrink: 0;
  animation: pulse 2s ease-in-out infinite;
}
.online-dot.off {
  background: var(--danger);
  box-shadow: none;
  animation: none;
}

/* ── Action Menu ─────────────────────────────────────── */
.action-menu {
  position: fixed;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  min-width: 190px;
  z-index: 800;
  overflow: hidden;
  display: none;
}
.action-menu.open {
  display: block;
  animation: scaleIn 0.16s var(--ease);
}
.action-menu-item {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 16px;
  font-size: 13px; font-weight: 500;
  cursor: pointer; border: none;
  background: none; color: var(--text);
  width: 100%; text-align: left;
  font-family: var(--font);
  transition: background var(--dur) var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.action-menu-item:hover { background: var(--bg2); }
.action-menu-item.danger { color: var(--danger); }
.action-menu-divider { height: 1px; background: var(--border); margin: 3px 0; }

/* ── Utilities ───────────────────────────────────────── */
.hidden     { display: none !important; }
.text-muted  { color: var(--muted); }
.text-primary { color: var(--primary); }
.text-danger  { color: var(--danger); }
.text-warning { color: var(--warning); }
.font-bold   { font-weight: 700; }
.font-xs     { font-size: 11px; }
.font-sm     { font-size: 12px; }
.mb-4  { margin-bottom: 4px; }
.mb-8  { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.gap-8 { gap: 8px; }
.flex  { display: flex; }
.flex-center  { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ── Page enter animation ────────────────────────────── */
.page-content > [data-tab-content]:not(.hidden) {
  animation: fadeUp 0.3s var(--ease);
}

/* ── Print ───────────────────────────────────────────── */
@media print {
  .sidebar, .topbar, .hamburger, .btn,
  .modal-overlay, .offline-bar, #toast-root,
  .action-menu, .no-print { display: none !important; }
  .page-content { padding: 0; }
  body { background: #fff; color: #000; }
  .card { border: 1px solid #e5e7eb; box-shadow: none; }
}

/* ── Keyframes ───────────────────────────────────────── */
@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position:  200% 0; }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes fadeOut {
  to { opacity: 0; }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(40px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.93); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.6; }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-6px); }
}
@keyframes toastProgress {
  from { transform: scaleX(1); }
  to   { transform: scaleX(0); }
}

/* ── Responsive ──────────────────────────────────────── */
@media (min-width: 900px) {
  .sidebar { transform: translateX(0); }
  .sidebar-overlay { display: none !important; }
  .main { margin-left: 260px; }
  .hamburger { display: none; }
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
  .page-content { padding: 20px 24px; }
}
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .stat-value { font-size: 22px; }
  .stat-card  { padding: 14px; }
  .form-row   { grid-template-columns: 1fr; }
  .grid-2     { grid-template-columns: 1fr; }
  .modal      { padding: 16px 16px 28px; }
  .section-title { font-size: 18px; }
}
