/* ================================================
   محتوای ناب — سیستم طراحی اصلی
   Dark Editorial + Ink & Paper aesthetic
   ================================================ */

@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@100;200;300;400;500;600;700;800;900&display=swap');

:root {
  /* Palette — Deep Ink */
  --ink-950: #060810;
  --ink-900: #0d1117;
  --ink-850: #111827;
  --ink-800: #1a2234;
  --ink-700: #253047;
  --ink-600: #334155;
  --ink-500: #475569;
  --ink-400: #64748b;
  --ink-300: #94a3b8;
  --ink-200: #cbd5e1;
  --ink-100: #e2e8f0;
  --ink-50:  #f8fafc;

  /* Accent — Saffron Gold */
  --gold-600: #b45309;
  --gold-500: #d97706;
  --gold-400: #f59e0b;
  --gold-300: #fbbf24;
  --gold-200: #fde68a;
  --gold-100: #fef3c7;

  /* Accent — Crimson */
  --red-600: #dc2626;
  --red-500: #ef4444;
  --red-400: #f87171;

  /* Accent — Emerald */
  --green-600: #059669;
  --green-500: #10b981;
  --green-400: #34d399;

  /* Accent — Sky */
  --blue-600: #2563eb;
  --blue-500: #3b82f6;
  --blue-400: #60a5fa;

  /* Semantic */
  --bg-primary:   var(--ink-900);
  --bg-secondary: var(--ink-850);
  --bg-card:      var(--ink-800);
  --bg-hover:     var(--ink-700);
  --border:       rgba(255,255,255,0.06);
  --border-light: rgba(255,255,255,0.12);
  --text-primary:   #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted:     #64748b;
  --accent:         var(--gold-400);
  --accent-hover:   var(--gold-300);

  /* Mapta brand */
  --mapta-primary: #f59e0b;
  --mapta-secondary: #d97706;

  /* Spacing */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,.4), 0 1px 2px rgba(0,0,0,.3);
  --shadow-md: 0 4px 16px rgba(0,0,0,.5), 0 2px 6px rgba(0,0,0,.3);
  --shadow-lg: 0 10px 40px rgba(0,0,0,.6), 0 4px 12px rgba(0,0,0,.4);
  --shadow-glow: 0 0 24px rgba(245,158,11,.15);

  /* Transitions */
  --ease-out: cubic-bezier(.16,1,.3,1);
  --ease-in:  cubic-bezier(.4,0,1,1);
  --dur-fast: 150ms;
  --dur-base: 250ms;
  --dur-slow: 400ms;

  /* Sidebar */
  --sidebar-w: 260px;
  --header-h:  60px;
  --bottom-nav-h: 64px;
}

/* ========== Reset & Base ========== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Vazirmatn', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  direction: rtl;
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
  font-feature-settings: "ss01";
}

/* Subtle noise texture overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
  opacity: .4;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
input, textarea, select, button { font-family: inherit; }

/* ========== Scrollbar ========== */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: var(--ink-900); }
::-webkit-scrollbar-thumb { background: var(--ink-600); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: var(--ink-500); }

/* ========== App Layout ========== */
.app-layout {
  display: flex;
  min-height: 100vh;
  position: relative;
}

/* ========== Sidebar ========== */
.sidebar {
  position: fixed;
  right: 0;
  top: 0;
  bottom: 0;
  width: var(--sidebar-w);
  background: var(--ink-950);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: transform var(--dur-slow) var(--ease-out);
}

.sidebar-brand {
  padding: 24px 20px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-logo {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--gold-400), var(--gold-600));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--ink-900);
  font-weight: 900;
  box-shadow: 0 4px 12px rgba(245,158,11,.3);
  flex-shrink: 0;
}

.sidebar-brand-text {
  flex: 1;
}

.sidebar-brand-name {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -.01em;
}

.sidebar-brand-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 1px;
}

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-section-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: 8px 8px 4px;
  margin-top: 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--dur-fast) ease;
  position: relative;
  border: 1px solid transparent;
  text-decoration: none;
}

.nav-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.nav-item.active {
  background: rgba(245,158,11,.1);
  color: var(--gold-400);
  border-color: rgba(245,158,11,.2);
}

.nav-item.active::before {
  content: '';
  position: absolute;
  right: 0; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 60%;
  background: var(--gold-400);
  border-radius: 3px 0 0 3px;
}

.nav-item.disabled {
  opacity: .4;
  cursor: not-allowed;
  pointer-events: none;
}

.nav-icon {
  width: 32px; height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--bg-hover);
  font-size: 14px;
  flex-shrink: 0;
  transition: background var(--dur-fast);
}

.nav-item.active .nav-icon {
  background: rgba(245,158,11,.15);
  color: var(--gold-400);
}

.nav-item-badge {
  margin-right: auto;
  background: var(--red-500);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
}

.nav-item .coming-soon {
  margin-right: auto;
  font-size: 9px;
  padding: 2px 6px;
  background: var(--ink-700);
  color: var(--text-muted);
  border-radius: 4px;
}

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

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--dur-fast);
}

.sidebar-user:hover { background: var(--bg-hover); }

.avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-500), var(--blue-500));
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: white;
  flex-shrink: 0;
  overflow: hidden;
}

.avatar img { width: 100%; height: 100%; object-fit: cover; }

.avatar-lg {
  width: 56px; height: 56px;
  font-size: 20px;
}

.user-info { flex: 1; min-width: 0; }
.user-name { font-size: 13px; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: 11px; color: var(--text-muted); margin-top: 1px; }

/* ========== Main Content ========== */
.main-content {
  flex: 1;
  margin-right: var(--sidebar-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.page-header {
  height: var(--header-h);
  background: rgba(13,17,23,.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 50;
}

.page-header-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.page-header-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 1px;
}

.header-actions {
  margin-right: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.page-content {
  flex: 1;
  padding: 24px;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
}

/* ========== Cards ========== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.card-header {
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
}

.card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}

.card-body { padding: 20px; }

.card-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}

/* ========== Stat Cards ========== */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  position: relative;
  overflow: hidden;
  transition: border-color var(--dur-base), transform var(--dur-base);
}

.stat-card:hover {
  border-color: var(--border-light);
  transform: translateY(-2px);
}

.stat-card::after {
  content: '';
  position: absolute;
  bottom: 0; right: 0;
  width: 60px; height: 60px;
  border-radius: 50%;
  opacity: .05;
  transform: translate(20px, 20px);
}

.stat-card.gold::after   { background: var(--gold-400); }
.stat-card.blue::after   { background: var(--blue-400); }
.stat-card.green::after  { background: var(--green-400); }
.stat-card.red::after    { background: var(--red-400); }

.stat-value {
  font-size: 28px;
  font-weight: 900;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 6px;
}

.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.stat-icon {
  position: absolute;
  top: 16px;
  left: 16px;
  font-size: 20px;
  opacity: .3;
}

/* ========== Buttons ========== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--dur-fast) ease;
  white-space: nowrap;
  outline: none;
  text-decoration: none;
  justify-content: center;
}

.btn:active { transform: scale(.97); }

.btn-primary {
  background: var(--gold-400);
  color: var(--ink-900);
  border-color: var(--gold-400);
}
.btn-primary:hover {
  background: var(--gold-300);
  border-color: var(--gold-300);
  box-shadow: 0 4px 16px rgba(245,158,11,.3);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--border-light);
}
.btn-outline:hover {
  background: var(--bg-hover);
  border-color: var(--ink-500);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: transparent;
}
.btn-ghost:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.btn-danger {
  background: rgba(239,68,68,.1);
  color: var(--red-400);
  border-color: rgba(239,68,68,.2);
}
.btn-danger:hover {
  background: var(--red-500);
  color: white;
  border-color: var(--red-500);
}

.btn-success {
  background: rgba(16,185,129,.1);
  color: var(--green-400);
  border-color: rgba(16,185,129,.2);
}
.btn-success:hover {
  background: var(--green-500);
  color: white;
  border-color: var(--green-500);
}

.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-lg { padding: 13px 24px; font-size: 15px; }
.btn-icon { padding: 10px; width: 40px; }
.btn-full { width: 100%; }

.btn:disabled {
  opacity: .5;
  cursor: not-allowed;
  pointer-events: none;
}

/* ========== Form Controls ========== */
.form-group { margin-bottom: 16px; }

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  background: var(--ink-850);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 11px 14px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text-primary);
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
  outline: none;
  direction: rtl;
}

.form-control:focus {
  border-color: var(--gold-400);
  box-shadow: 0 0 0 3px rgba(245,158,11,.12);
}

.form-control::placeholder { color: var(--text-muted); }

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='12' viewBox='0 0 24 24'%3E%3Cpath fill='%2364748b' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 12px center;
  padding-left: 36px;
}

textarea.form-control { resize: vertical; min-height: 80px; }

.form-hint {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

.form-error {
  font-size: 11px;
  color: var(--red-400);
  margin-top: 4px;
}

/* Input with icon */
.input-group {
  position: relative;
}

.input-group .form-control {
  padding-right: 42px;
}

.input-icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 14px;
  pointer-events: none;
}

/* ========== Badges ========== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
}

.badge-pending  { background: rgba(245,158,11,.1); color: var(--gold-400); border: 1px solid rgba(245,158,11,.2); }
.badge-approved { background: rgba(16,185,129,.1); color: var(--green-400); border: 1px solid rgba(16,185,129,.2); }
.badge-rejected { background: rgba(239,68,68,.1);  color: var(--red-400);   border: 1px solid rgba(239,68,68,.2); }
.badge-info     { background: rgba(59,130,246,.1); color: var(--blue-400);  border: 1px solid rgba(59,130,246,.2); }
.badge-muted    { background: var(--bg-hover);     color: var(--text-muted);border: 1px solid var(--border); }

/* ========== Table ========== */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead tr {
  background: var(--ink-850);
  border-bottom: 1px solid var(--border-light);
}

th {
  padding: 12px 16px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-align: right;
  white-space: nowrap;
}

td {
  padding: 14px 16px;
  font-size: 13px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
}

tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255,255,255,.02); }

/* ========== Modal ========== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-base);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--ink-850);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(.95) translateY(20px);
  transition: transform var(--dur-slow) var(--ease-out);
  box-shadow: var(--shadow-lg);
}

.modal-overlay.active .modal { transform: scale(1) translateY(0); }

.modal-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  flex: 1;
}

.modal-body { padding: 20px 24px; }
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* ========== Tabs ========== */
.tabs {
  display: flex;
  gap: 4px;
  background: var(--ink-850);
  border-radius: var(--radius-md);
  padding: 4px;
  border: 1px solid var(--border);
}

.tab {
  flex: 1;
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--dur-fast);
  text-align: center;
  border: none;
  background: transparent;
  font-family: inherit;
}

.tab.active {
  background: var(--bg-card);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

/* ========== Progress ========== */
.progress-bar {
  height: 6px;
  background: var(--ink-700);
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--gold-600), var(--gold-400));
  transition: width var(--dur-slow) var(--ease-out);
}

/* ========== Toast / Alert ========== */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
}

.alert-success { background: rgba(16,185,129,.1); color: var(--green-400); border: 1px solid rgba(16,185,129,.2); }
.alert-error   { background: rgba(239,68,68,.1);  color: var(--red-400);   border: 1px solid rgba(239,68,68,.2); }
.alert-warning { background: rgba(245,158,11,.1); color: var(--gold-400);  border: 1px solid rgba(245,158,11,.2); }
.alert-info    { background: rgba(59,130,246,.1); color: var(--blue-400);  border: 1px solid rgba(59,130,246,.2); }

/* Toast notifications */
#toast-container {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: var(--ink-800);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 220px;
  max-width: 320px;
  box-shadow: var(--shadow-lg);
  animation: toastIn .3s var(--ease-out) forwards;
  pointer-events: all;
}

.toast.success { border-right: 3px solid var(--green-500); color: var(--green-400); }
.toast.error   { border-right: 3px solid var(--red-500);   color: var(--red-400); }
.toast.warning { border-right: 3px solid var(--gold-400);  color: var(--gold-400); }
.toast.info    { border-right: 3px solid var(--blue-500);  color: var(--blue-400); }

@keyframes toastIn {
  from { opacity:0; transform: translateX(-20px); }
  to   { opacity:1; transform: translateX(0); }
}

/* ========== Divider ========== */
.divider {
  height: 1px;
  background: var(--border);
  margin: 16px 0;
}

/* ========== Chips ========== */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 500;
  background: var(--bg-hover);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all var(--dur-fast);
}

.chip:hover, .chip.selected {
  background: rgba(245,158,11,.1);
  color: var(--gold-400);
  border-color: rgba(245,158,11,.3);
}

/* ========== Empty State ========== */
.empty-state {
  text-align: center;
  padding: 60px 24px;
  color: var(--text-muted);
}

.empty-icon {
  font-size: 48px;
  opacity: .3;
  margin-bottom: 12px;
}

.empty-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.empty-desc {
  font-size: 13px;
}

/* ========== Calendar Picker ========== */
.date-display {
  background: rgba(245,158,11,.08);
  border: 1px solid rgba(245,158,11,.2);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--gold-400);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* ========== Mission Progress ========== */
.mission-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.mission-item:last-child { border-bottom: none; }

.mission-check {
  width: 22px; height: 22px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px;
}

.mission-check.done     { background: rgba(16,185,129,.1); color: var(--green-400); border: 1px solid rgba(16,185,129,.3); }
.mission-check.partial  { background: rgba(245,158,11,.1); color: var(--gold-400);  border: 1px solid rgba(245,158,11,.3); }
.mission-check.undone   { background: var(--bg-hover);     color: var(--text-muted); border: 1px solid var(--border); }

.mission-label { font-size: 13px; color: var(--text-secondary); flex: 1; }
.mission-count { font-size: 12px; color: var(--text-muted); }
.mission-needed { font-size: 12px; font-weight: 600; color: var(--text-primary); }

/* ========== Loading Spinner ========== */
.spinner {
  width: 20px; height: 20px;
  border: 2px solid var(--border-light);
  border-top-color: var(--gold-400);
  border-radius: 50%;
  animation: spin .8s linear infinite;
  display: inline-block;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ========== Skeleton ========== */
.skeleton {
  background: linear-gradient(90deg, var(--ink-800) 25%, var(--ink-700) 50%, var(--ink-800) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

@keyframes shimmer {
  from { background-position: 200% 0; }
  to   { background-position: -200% 0; }
}

/* ========== Section Header ========== */
.section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.section-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--text-primary);
}

.section-dot {
  width: 4px; height: 24px;
  background: var(--gold-400);
  border-radius: 2px;
  flex-shrink: 0;
}

/* ========== Mobile / Bottom Nav ========== */
.mobile-header {
  display: none;
  height: var(--header-h);
  background: rgba(13,17,23,.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  position: sticky;
  top: 0;
  z-index: 50;
}

.mobile-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mobile-brand-logo {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, var(--gold-400), var(--gold-600));
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  color: var(--ink-900);
  font-weight: 900;
}

.mobile-brand-name {
  font-size: 15px;
  font-weight: 800;
}

.hamburger {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px;
  border: 1px solid var(--border-light);
  background: transparent;
  color: var(--text-primary);
  cursor: pointer;
  font-size: 16px;
}

.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  z-index: 99;
  display: none;
  backdrop-filter: blur(4px);
}

.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0; right: 0; left: 0;
  height: var(--bottom-nav-h);
  background: rgba(13,17,23,.95);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  z-index: 50;
  padding: 0 8px;
  align-items: center;
  justify-content: space-around;
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 600;
  transition: all var(--dur-fast);
  flex: 1;
  text-align: center;
  text-decoration: none;
}

.bottom-nav-item i { font-size: 18px; }

.bottom-nav-item.active {
  color: var(--gold-400);
}

.bottom-nav-item.active i {
  transform: translateY(-2px);
}

/* ========== Responsive ========== */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(100%);
  }

  .sidebar.open {
    transform: translateX(0);
    box-shadow: var(--shadow-lg);
  }

  .sidebar-overlay.active { display: block; }

  .main-content {
    margin-right: 0;
  }

  .mobile-header { display: flex; }
  .bottom-nav    { display: flex; }

  .page-content {
    padding: 16px;
    padding-bottom: calc(var(--bottom-nav-h) + 16px);
  }

  .stat-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .page-header { display: none; }

  .modal { max-width: 100%; }
  .modal-overlay { align-items: flex-end; padding: 0; }
  .modal { border-radius: var(--radius-xl) var(--radius-xl) 0 0; max-height: 92vh; }

  .tabs { overflow-x: auto; }
}

@media (max-width: 400px) {
  .stat-grid { grid-template-columns: 1fr; }
}

/* ========== Utility ========== */
.flex         { display: flex; }
.flex-col     { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2  { gap: 8px; }
.gap-3  { gap: 12px; }
.gap-4  { gap: 16px; }
.mt-2   { margin-top: 8px; }
.mt-4   { margin-top: 16px; }
.mb-4   { margin-bottom: 16px; }
.mr-auto { margin-right: auto; }
.ml-auto { margin-left: auto; }
.grid   { display: grid; }
.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-3 { grid-template-columns: 1fr 1fr 1fr; }
.grid-gap { gap: 16px; }
.w-full { width: 100%; }
.text-center { text-align: center; }
.text-muted  { color: var(--text-muted); font-size: 12px; }
.font-bold   { font-weight: 700; }
.hidden      { display: none !important; }

@media (max-width: 768px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .hide-mobile { display: none !important; }
}

/* ========== Mapta Sub-nav ========== */
.mapta-subnav {
  display: flex;
  gap: 6px;
  padding: 12px 12px 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.mapta-subnav::-webkit-scrollbar { display: none; }

.mapta-subnav-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: var(--radius-md);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  transition: all var(--dur-fast);
}

.mapta-subnav-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.mapta-subnav-item.active {
  background: rgba(245,158,11,.1);
  color: var(--gold-400);
  border-color: rgba(245,158,11,.2);
}

/* ========== Notification dot ========== */
.notif-dot {
  width: 8px; height: 8px;
  background: var(--red-500);
  border-radius: 50%;
  position: absolute;
  top: 4px; left: 4px;
  box-shadow: 0 0 0 2px var(--ink-900);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%,100% { transform: scale(1); opacity:1; }
  50% { transform: scale(1.3); opacity:.7; }
}
