/* ============================================================
   أين هم — Premium Design System v2.0
   Arabic Missing Persons Platform — Libya
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Noto+Kufi+Arabic:wght@300;400;500;600;700;800;900&family=Tajawal:wght@300;400;500;700;800&display=swap');

/* ===========================
   CSS VARIABLES
   =========================== */
:root {
  /* Primary Palette */
  --navy-950: #020817;
  --navy-900: #0a0f1e;
  --navy-800: #0f172a;
  --navy-700: #1e293b;
  --navy-600: #334155;
  --navy-500: #475569;

  /* Accent Colors */
  --gold:        #f59e0b;
  --gold-light:  #fbbf24;
  --gold-dark:   #d97706;
  --gold-glow:   rgba(245,158,11,0.15);

  /* Semantic Colors */
  --danger:        #ef4444;
  --danger-light:  rgba(239,68,68,0.12);
  --danger-border: rgba(239,68,68,0.35);
  --success:       #22c55e;
  --success-light: rgba(34,197,94,0.12);
  --success-border:rgba(34,197,94,0.35);
  --warning:       #f59e0b;
  --warning-light: rgba(245,158,11,0.12);
  --info:          #3b82f6;
  --info-light:    rgba(59,130,246,0.12);

  /* Surfaces */
  --surface-0:    #020817;
  --surface-1:    #0a0f1e;
  --surface-2:    #0f172a;
  --surface-3:    #1e293b;
  --surface-4:    #273549;
  --surface-glass: rgba(15, 23, 42, 0.75);
  --surface-card:  rgba(15, 23, 42, 0.90);

  /* Text */
  --text-primary:   #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted:     #64748b;
  --text-inverse:   #0a0f1e;

  /* Borders */
  --border-subtle:  rgba(255,255,255,0.06);
  --border-default: rgba(255,255,255,0.10);
  --border-strong:  rgba(255,255,255,0.18);

  /* Shadows */
  --shadow-xs:  0 1px 2px rgba(0,0,0,0.4);
  --shadow-sm:  0 2px 8px rgba(0,0,0,0.5);
  --shadow-md:  0 4px 16px rgba(0,0,0,0.5), 0 1px 4px rgba(0,0,0,0.3);
  --shadow-lg:  0 10px 30px rgba(0,0,0,0.6), 0 4px 10px rgba(0,0,0,0.4);
  --shadow-xl:  0 20px 60px rgba(0,0,0,0.7);
  --glow-gold:  0 0 20px rgba(245,158,11,0.3), 0 0 40px rgba(245,158,11,0.1);
  --glow-red:   0 0 20px rgba(239,68,68,0.4);
  --glow-green: 0 0 20px rgba(34,197,94,0.4);

  /* Radius */
  --r-xs:   4px;
  --r-sm:   8px;
  --r-md:   12px;
  --r-lg:   16px;
  --r-xl:   24px;
  --r-full: 9999px;

  /* Transitions */
  --t-fast:   0.15s ease;
  --t-normal: 0.25s ease;
  --t-slow:   0.4s ease;

  /* Fonts */
  --font-primary: 'Noto Kufi Arabic', 'Tajawal', sans-serif;
  --font-mono: 'Courier New', monospace;

  /* Layout */
  --sidebar-width: 320px;
  --header-height: 68px;
}

/* ===========================
   LIGHT THEME OVERRIDES
   =========================== */
[data-theme="light"] {
  --navy-950: #f8fafc;
  --navy-900: #f1f5f9;
  --navy-800: #e2e8f0;
  --navy-700: #cbd5e1;
  --navy-600: #94a3b8;
  --navy-500: #64748b;

  --surface-0:     #f8fafc;
  --surface-1:     #ffffff;
  --surface-2:     #f1f5f9;
  --surface-3:     #e2e8f0;
  --surface-4:     #cbd5e1;
  --surface-glass: rgba(255, 255, 255, 0.90);
  --surface-card:  rgba(255, 255, 255, 0.96);

  --text-primary:   #0f172a;
  --text-secondary: #334155;
  --text-muted:     #64748b;
  --text-inverse:   #ffffff;

  --border-subtle:  rgba(0,0,0,0.06);
  --border-default: rgba(0,0,0,0.12);
  --border-strong:  rgba(0,0,0,0.22);

  --shadow-xs:  0 1px 2px rgba(0,0,0,0.05);
  --shadow-sm:  0 2px 8px rgba(0,0,0,0.08);
  --shadow-md:  0 4px 16px rgba(0,0,0,0.10);
  --shadow-lg:  0 10px 30px rgba(0,0,0,0.12);
  --shadow-xl:  0 20px 60px rgba(0,0,0,0.15);
}

[data-theme="light"] body {
  background-color: #f8fafc;
  color: #0f172a;
  background-image:
    radial-gradient(ellipse at 20% 0%, rgba(59,130,246,0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 100%, rgba(245,158,11,0.06) 0%, transparent 50%);
}

[data-theme="light"] .main-header {
  background: rgba(255, 255, 255, 0.95) !important;
  border-bottom-color: rgba(0, 0, 0, 0.1) !important;
}

[data-theme="light"] .mobile-nav-open .main-nav {
  background: rgba(255, 255, 255, 0.98) !important;
  border-color: #cbd5e1 !important;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15) !important;
}

[data-theme="light"] .mobile-nav-open .main-nav .nav-link {
  color: #0f172a !important;
}

[data-theme="light"] .mobile-nav-open .main-nav .nav-link:hover {
  background: #f1f5f9 !important;
  color: #d97706 !important;
}

[data-theme="light"] .mobile-nav-open .main-nav .nav-link.active {
  background: #f1f5f9 !important;
  color: #d97706 !important;
  font-weight: 700 !important;
}

[data-theme="light"] .logo-name,
[data-theme="light"] .nav-link,
[data-theme="light"] h1,
[data-theme="light"] h2,
[data-theme="light"] h3,
[data-theme="light"] h4,
[data-theme="light"] h5,
[data-theme="light"] h6 {
  color: #0f172a !important;
}

[data-theme="light"] .hero-title {
  color: #0f172a !important;
  text-shadow: none !important;
}

[data-theme="light"] .hero-subtitle {
  color: #334155 !important;
}

[data-theme="light"] .hero-badge {
  background: #e2e8f0 !important;
  color: #d97706 !important;
  border-color: #cbd5e1 !important;
}

[data-theme="light"] .glass-card,
[data-theme="light"] .notice-card,
[data-theme="light"] .reg-window-card {
  background: #ffffff !important;
  color: #0f172a !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06) !important;
}

[data-theme="light"] .notice-card-name {
  color: #0f172a !important;
}

[data-theme="light"] .notice-card-meta {
  color: #64748b !important;
}

[data-theme="light"] .user-pill {
  background: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
}

[data-theme="light"] .user-name {
  color: #0f172a !important;
}

[data-theme="light"] .mobile-toggle {
  background: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
}

[data-theme="light"] .mobile-toggle span {
  background: #334155 !important;
}

[data-theme="light"] .nav-link:hover {
  background: #e2e8f0 !important;
  color: #0f172a !important;
}

[data-theme="light"] .form-control,
[data-theme="light"] .form-select,
[data-theme="light"] .form-input {
  background: #ffffff !important;
  color: #0f172a !important;
  border-color: #cbd5e1 !important;
}

[data-theme="light"] .form-control::placeholder {
  color: #94a3b8 !important;
}

[data-theme="light"] .dash-sidebar {
  background: #ffffff !important;
  border-left-color: #e2e8f0 !important;
}

[data-theme="light"] .dash-sidebar-brand,
[data-theme="light"] .dash-user-card,
[data-theme="light"] .dash-stats-bar,
[data-theme="light"] .dash-topbar,
[data-theme="light"] .intel-sidebar-header,
[data-theme="light"] .intel-filters {
  background: #f1f5f9 !important;
  border-color: #e2e8f0 !important;
}

[data-theme="light"] .dash-nav-link {
  color: #334155 !important;
}

[data-theme="light"] .dash-nav-link:hover {
  background: #e2e8f0 !important;
  color: #0f172a !important;
}

[data-theme="light"] .dash-nav-link.active {
  background: #e2e8f0 !important;
  color: #d97706 !important;
}

[data-theme="light"] .dash-table th {
  background: #f1f5f9 !important;
  color: #475569 !important;
}

[data-theme="light"] .dash-table td {
  color: #0f172a !important;
  border-bottom-color: #e2e8f0 !important;
}

[data-theme="light"] .hero-section {
  background:
    radial-gradient(ellipse at 30% 0%, rgba(59,130,246,0.1) 0%, transparent 60%),
    radial-gradient(ellipse at 70% 100%, rgba(245,158,11,0.08) 0%, transparent 60%),
    linear-gradient(160deg, #f8fafc 0%, #f1f5f9 50%, #e2e8f0 100%) !important;
}

[data-theme="light"] .hero-title {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #d97706 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
}

[data-theme="light"] .hero-subtitle {
  color: #475569 !important;
}

[data-theme="light"] .hero-badge {
  background: rgba(217, 119, 6, 0.12) !important;
  border-color: rgba(217, 119, 6, 0.3) !important;
  color: #d97706 !important;
}

[data-theme="light"] .hero-stats {
  background: rgba(255, 255, 255, 0.85) !important;
  border-top-color: rgba(0, 0, 0, 0.08) !important;
}

[data-theme="light"] .hero-stat {
  border-left-color: rgba(0, 0, 0, 0.08) !important;
}

[data-theme="light"] .hero-stat:hover {
  background: rgba(0, 0, 0, 0.03) !important;
}

[data-theme="light"] .hero-stat-label {
  color: #64748b !important;
}

[data-theme="light"] .btn-hero-ghost {
  background: #ffffff !important;
  color: #0f172a !important;
  border-color: #cbd5e1 !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06) !important;
}

[data-theme="light"] .btn-hero-ghost:hover {
  background: #f1f5f9 !important;
  color: #d97706 !important;
}

[data-theme="light"] .map-sidebar,
[data-theme="light"] .intel-sidebar {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
}

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

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

body {
  font-family: var(--font-primary);
  background-color: var(--navy-900);
  color: var(--text-primary);
  direction: rtl;
  text-align: right;
  line-height: 1.65;
  min-height: 100vh;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-image:
    radial-gradient(ellipse at 20% 0%, rgba(59,130,246,0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 100%, rgba(245,158,11,0.04) 0%, transparent 50%);
  background-attachment: fixed;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-primary);
}

h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 800; }
h2 { font-size: clamp(1.4rem, 3vw, 2.1rem); font-weight: 700; }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.5rem); font-weight: 700; }
h4 { font-size: 1.15rem; font-weight: 600; }
h5 { font-size: 1.05rem; font-weight: 600; }

p { color: var(--text-secondary); line-height: 1.75; }

a {
  color: var(--gold);
  text-decoration: none;
  transition: color var(--t-fast);
}
a:hover { color: var(--gold-light); }

ul { list-style: none; }

img { max-width: 100%; display: block; }

/* ===========================
   UTILITY CLASSES
   =========================== */
.container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 24px;
}

.container-fluid { padding: 0 24px; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-6 { margin-top: 3rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.w-100 { width: 100%; }
.flex-1 { flex: 1; }
.flex-wrap { flex-wrap: wrap; }

/* ===========================
   GLASS CARDS
   =========================== */
.glass-card {
  background: var(--surface-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-default);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
  transition: border-color var(--t-normal), box-shadow var(--t-normal), transform var(--t-normal);
}

.glass-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-lg);
}

.glass-card-gold {
  background: linear-gradient(135deg, rgba(245,158,11,0.08) 0%, var(--surface-card) 100%);
  border-color: rgba(245,158,11,0.2);
}

.card {
  background: var(--surface-card);
  border: 1px solid var(--border-default);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform var(--t-normal), box-shadow var(--t-normal), border-color var(--t-normal);
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-strong);
}
.card-header {
  padding: 1.1rem 1.4rem;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(255,255,255,0.02);
}
.card-body  { padding: 1.4rem; }
.card-footer {
  padding: 1rem 1.4rem;
  border-top: 1px solid var(--border-subtle);
  background: rgba(255,255,255,0.02);
}

/* ===========================
   BUTTONS
   =========================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1.3rem;
  border-radius: var(--r-sm);
  font-weight: 600;
  font-family: var(--font-primary);
  font-size: 0.9rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--t-fast);
  text-decoration: none;
  white-space: nowrap;
  line-height: 1.4;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; }

.btn-sm { padding: 0.4rem 0.9rem; font-size: 0.82rem; }
.btn-lg { padding: 0.85rem 2rem; font-size: 1.05rem; }

.btn-primary {
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
  color: #fff;
  border-color: rgba(37,99,235,0.5);
  box-shadow: 0 2px 8px rgba(37,99,235,0.3);
}
.btn-primary:hover { background: linear-gradient(135deg, #1e40af, #1d4ed8); box-shadow: 0 4px 16px rgba(37,99,235,0.4); transform: translateY(-1px); color: #fff; }

.btn-gold {
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  color: #0a0f1e;
  font-weight: 700;
  box-shadow: 0 2px 12px rgba(245,158,11,0.3);
}
.btn-gold:hover { box-shadow: var(--glow-gold); transform: translateY(-1px); color: #0a0f1e; }

.btn-danger {
  background: linear-gradient(135deg, #b91c1c, #dc2626);
  color: #fff;
  border-color: rgba(220,38,38,0.4);
  box-shadow: 0 2px 8px rgba(220,38,38,0.3);
}
.btn-danger:hover { background: linear-gradient(135deg, #991b1b, #b91c1c); transform: translateY(-1px); color: #fff; }

.btn-success {
  background: linear-gradient(135deg, #15803d, #16a34a);
  color: #fff;
  border-color: rgba(22,163,74,0.4);
  box-shadow: 0 2px 8px rgba(22,163,74,0.3);
}
.btn-success:hover { background: linear-gradient(135deg, #166534, #15803d); transform: translateY(-1px); color: #fff; }

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--border-default);
}
.btn-ghost:hover { background: var(--surface-3); color: var(--text-primary); border-color: var(--border-strong); }

.btn-outline {
  background: transparent;
  color: var(--gold);
  border-color: rgba(245,158,11,0.4);
}
.btn-outline:hover { background: var(--gold-glow); color: var(--gold-light); }

/* Hero Buttons */
.btn-hero {
  padding: 14px 32px;
  border-radius: var(--r-md);
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  transition: all var(--t-normal);
  border: 2px solid transparent;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-hero-danger {
  background: linear-gradient(135deg, #b91c1c, #ef4444);
  color: white;
  box-shadow: 0 4px 20px rgba(239,68,68,0.4);
}
.btn-hero-danger:hover { transform: translateY(-3px); box-shadow: 0 8px 30px rgba(239,68,68,0.5); color: white; }
.btn-hero-success {
  background: linear-gradient(135deg, #15803d, #22c55e);
  color: white;
  box-shadow: 0 4px 20px rgba(34,197,94,0.4);
}
.btn-hero-success:hover { transform: translateY(-3px); box-shadow: 0 8px 30px rgba(34,197,94,0.5); color: white; }
.btn-hero-ghost {
  background: rgba(255,255,255,0.08);
  color: white;
  border-color: rgba(255,255,255,0.25);
  backdrop-filter: blur(8px);
}
.btn-hero-ghost:hover { background: rgba(255,255,255,0.15); transform: translateY(-3px); color: white; }

/* ===========================
   BADGES
   =========================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--r-full);
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}

.badge-missing  { background: var(--danger-light);  color: #fca5a5; border: 1px solid var(--danger-border); }
.badge-found    { background: var(--success-light); color: #86efac; border: 1px solid var(--success-border); }
.badge-resolved { background: var(--info-light);    color: #93c5fd; border: 1px solid rgba(59,130,246,0.35); }
.badge-normal   { background: rgba(100,116,139,0.15); color: #94a3b8; border: 1px solid rgba(100,116,139,0.3); }
.badge-high     { background: var(--warning-light); color: #fcd34d; border: 1px solid rgba(245,158,11,0.3); }
.badge-critical {
  background: var(--danger-light);
  color: #fca5a5;
  border: 1px solid var(--danger-border);
  animation: criticalPulse 1.8s ease-in-out infinite;
}
.badge-active   { background: var(--success-light); color: #86efac; border: 1px solid var(--success-border); }
.badge-closed   { background: rgba(100,116,139,0.15); color: #64748b; border: 1px solid rgba(100,116,139,0.25); }
.badge-gold     { background: var(--gold-glow); color: var(--gold); border: 1px solid rgba(245,158,11,0.3); }

/* ===========================
   FORMS
   =========================== */
.form-group { margin-bottom: 1.25rem; }
.form-label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}
.form-control, .form-select, .form-input {
  width: 100%;
  padding: 0.7rem 1rem;
  border: 1px solid var(--border-default);
  border-radius: var(--r-sm);
  font-family: var(--font-primary);
  font-size: 0.9rem;
  background: rgba(15,23,42,0.8);
  color: var(--text-primary);
  transition: border-color var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
  direction: rtl;
}
.form-control:focus, .form-select:focus, .form-input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-glow);
  background: rgba(15,23,42,0.95);
}
.form-control::placeholder { color: var(--text-muted); }
.form-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 12px center;
  padding-left: 2rem;
}
.form-select option { background: var(--navy-800); color: var(--text-primary); }

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

.file-upload {
  border: 2px dashed var(--border-default);
  border-radius: var(--r-md);
  padding: 2.5rem;
  text-align: center;
  cursor: pointer;
  transition: all var(--t-normal);
  background: rgba(15,23,42,0.4);
}
.file-upload:hover {
  border-color: var(--gold);
  background: var(--gold-glow);
}

/* Search */
.search-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--surface-2);
  border: 1px solid var(--border-default);
  border-radius: var(--r-full);
  padding: 0 1rem;
  transition: all var(--t-fast);
}
.search-bar:focus-within { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-glow); }
.search-bar input {
  flex: 1;
  background: transparent;
  border: none;
  padding: 0.7rem 0.5rem;
  font-family: var(--font-primary);
  font-size: 0.9rem;
  color: var(--text-primary);
  direction: rtl;
}
.search-bar input:focus { outline: none; }
.search-bar input::placeholder { color: var(--text-muted); }

/* Multi-step form */
.step-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 2.5rem;
  position: relative;
}
.step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  position: relative;
  z-index: 2;
}
.step-item:not(:last-child) {
  margin-left: 0;
  padding-left: 60px;
}
.step-item:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 18px;
  left: 18px;
  width: 60px;
  height: 2px;
  background: var(--border-default);
  z-index: 1;
}
.step-item.completed::after { background: var(--gold); }
.step-dot {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--surface-3);
  border: 2px solid var(--border-default);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.9rem; color: var(--text-muted);
  transition: all var(--t-normal);
  z-index: 2;
}
.step-dot.active { border-color: var(--gold); background: var(--gold); color: var(--text-inverse); box-shadow: var(--glow-gold); }
.step-dot.completed { border-color: var(--gold); background: var(--gold-glow); color: var(--gold); }
.step-label { font-size: 0.78rem; color: var(--text-muted); white-space: nowrap; }
.step-label.active { color: var(--gold); }

.form-step { display: none; animation: fadeSlideUp 0.35s ease; }
.form-step.active { display: block; }

/* ===========================
   HEADER
   =========================== */
.main-header {
  background: rgba(10,15,30,0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--header-height);
  display: flex;
  align-items: center;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  width: 100%;
}

.logo-wrap { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.logo-icon {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  box-shadow: 0 2px 12px rgba(245,158,11,0.3);
  flex-shrink: 0;
}
.logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.logo-name { font-size: 1.2rem; font-weight: 800; color: var(--text-primary); }
.logo-tagline { font-size: 0.7rem; color: var(--text-muted); }

.main-nav { display: flex; align-items: center; gap: 4px; }
.nav-link {
  padding: 0.45rem 0.9rem;
  border-radius: var(--r-sm);
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all var(--t-fast);
  white-space: nowrap;
  display: flex; align-items: center; gap: 5px;
}
.nav-link:hover { color: var(--text-primary); background: var(--surface-3); }
.nav-link.active { color: var(--gold); background: var(--gold-glow); }

.nav-link-danger { color: #fca5a5 !important; }
.nav-link-danger:hover { background: var(--danger-light) !important; color: #fca5a5 !important; }

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

/* User pill */
.user-pill {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 12px 5px 5px;
  background: var(--surface-3);
  border: 1px solid var(--border-default);
  border-radius: var(--r-full);
  cursor: pointer;
  transition: all var(--t-fast);
}
.user-pill:hover { border-color: var(--border-strong); }
.user-avatar {
  width: 30px; height: 30px;
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; font-weight: 700; color: var(--text-inverse);
}
.user-name { font-size: 0.85rem; color: var(--text-primary); font-weight: 500; }
.role-chip {
  font-size: 0.65rem;
  padding: 1px 6px;
  background: var(--gold-glow);
  color: var(--gold);
  border-radius: var(--r-full);
  font-weight: 600;
}

/* Theme toggle */
.theme-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--surface-3);
  border: 1px solid var(--border-default);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  transition: all var(--t-fast);
  color: var(--text-secondary);
}
.theme-btn:hover { border-color: var(--gold); color: var(--gold); }

/* Mobile toggle */
.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  border: 1px solid var(--border-default);
  border-radius: var(--r-sm);
  background: var(--surface-3);
}
.mobile-toggle span {
  width: 22px; height: 2px;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: all var(--t-fast);
}

/* AMBER Alert Ticker */
.amber-ticker {
  background: linear-gradient(90deg, #7f1d1d, #991b1b, #7f1d1d);
  border-bottom: 1px solid rgba(239,68,68,0.3);
  padding: 7px 0;
  overflow: hidden;
}
.amber-ticker-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  white-space: nowrap;
  animation: tickerScroll 30s linear infinite;
}
.amber-ticker-label {
  background: #ef4444;
  color: white;
  padding: 2px 12px;
  border-radius: var(--r-full);
  font-size: 0.78rem;
  font-weight: 800;
  flex-shrink: 0;
  letter-spacing: 0.5px;
  animation: alertPulse 1.5s ease-in-out infinite;
}
.amber-ticker-item {
  font-size: 0.85rem;
  color: #fecaca;
  margin-left: 40px;
}
.amber-ticker-item a { color: #fde68a; text-decoration: underline; }

/* ===========================
   HERO SECTION
   =========================== */
.hero-section {
  background:
    radial-gradient(ellipse at 30% 0%, rgba(59,130,246,0.15) 0%, transparent 60%),
    radial-gradient(ellipse at 70% 100%, rgba(245,158,11,0.08) 0%, transparent 60%),
    linear-gradient(160deg, #020817 0%, #0a0f1e 50%, #0f172a 100%);
  padding: 80px 0 0;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.03) 1px, transparent 0);
  background-size: 40px 40px;
  pointer-events: none;
}

.hero-content { position: relative; z-index: 1; text-align: center; padding: 0 20px 60px; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(245,158,11,0.1);
  border: 1px solid rgba(245,158,11,0.25);
  color: var(--gold);
  padding: 7px 20px;
  border-radius: var(--r-full);
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 24px;
  letter-spacing: 0.3px;
}

.hero-title {
  font-size: clamp(3.5rem, 10vw, 7rem);
  font-weight: 900;
  margin: 0 0 12px;
  background: linear-gradient(135deg, #ffffff 0%, #e2e8f0 50%, var(--gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.05;
  letter-spacing: -1px;
}

.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--text-secondary);
  margin-bottom: 40px;
  max-width: 550px;
  margin-inline: auto;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 0;
}

.hero-stats {
  display: flex;
  justify-content: center;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255,255,255,0.06);
  position: relative;
  z-index: 1;
}

.hero-stat {
  flex: 1;
  text-align: center;
  padding: 24px 16px;
  border-left: 1px solid rgba(255,255,255,0.06);
  transition: background var(--t-normal);
}
.hero-stat:last-child { border-left: none; }
.hero-stat:hover { background: rgba(255,255,255,0.03); }

.hero-stat-num {
  display: block;
  font-size: 2.4rem;
  font-weight: 900;
  line-height: 1;
  margin-bottom: 4px;
}
.hero-stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: block;
}

/* ===========================
   MAP SECTION (Main Page)
   =========================== */
.map-section {
  background: var(--surface-1);
  padding: 0;
  position: relative;
}

.map-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 24px 16px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border-subtle);
}
.map-section-header h2 { font-size: 1.25rem; margin: 0; }

.map-filter-btns { display: flex; gap: 6px; align-items: center; }
.map-filter-btn {
  padding: 6px 16px;
  border: 1px solid var(--border-default);
  background: transparent;
  border-radius: var(--r-full);
  cursor: pointer;
  font-size: 0.82rem;
  color: var(--text-secondary);
  transition: all var(--t-fast);
  font-family: var(--font-primary);
  white-space: nowrap;
}
.map-filter-btn:hover { background: var(--surface-3); color: var(--text-primary); }
.map-filter-btn.active {
  background: var(--gold);
  color: var(--text-inverse);
  border-color: var(--gold);
  font-weight: 600;
}

/* Map + Sidebar Layout */
.map-layout {
  display: flex;
  height: 580px;
}

.map-sidebar {
  width: var(--sidebar-width);
  background: var(--surface-2);
  border-left: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  flex-shrink: 0;
}

.map-sidebar-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.map-sidebar-tabs {
  display: flex;
  background: var(--surface-3);
  border-radius: var(--r-sm);
  padding: 3px;
  gap: 2px;
}
.sidebar-tab {
  flex: 1;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--t-fast);
  text-align: center;
  border: none;
  background: transparent;
  font-family: var(--font-primary);
}
.sidebar-tab.active { background: var(--surface-card); color: var(--text-primary); box-shadow: var(--shadow-xs); }

.map-sidebar-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-3);
  border: 1px solid var(--border-default);
  border-radius: var(--r-sm);
  padding: 0 10px;
}
.map-sidebar-search input {
  flex: 1;
  background: transparent;
  border: none;
  padding: 7px 4px;
  font-size: 0.82rem;
  color: var(--text-primary);
  font-family: var(--font-primary);
  direction: rtl;
}
.map-sidebar-search input:focus { outline: none; }
.map-sidebar-search input::placeholder { color: var(--text-muted); }
.map-sidebar-search .search-icon { color: var(--text-muted); font-size: 0.9rem; }

.map-sidebar-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}

/* Custom scrollbar */
.map-sidebar-list::-webkit-scrollbar { width: 4px; }
.map-sidebar-list::-webkit-scrollbar-track { background: transparent; }
.map-sidebar-list::-webkit-scrollbar-thumb { background: var(--border-default); border-radius: 4px; }
.map-sidebar-list::-webkit-scrollbar-thumb:hover { background: var(--border-strong); }

.sidebar-notice-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: all var(--t-fast);
  border: 1px solid transparent;
  margin-bottom: 4px;
}
.sidebar-notice-item:hover { background: var(--surface-3); border-color: var(--border-default); }
.sidebar-notice-item.active { background: var(--surface-4); border-color: var(--gold); }

.sidebar-notice-photo {
  width: 44px; height: 44px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid var(--border-default);
  position: relative;
}
.sidebar-notice-photo img { width: 100%; height: 100%; object-fit: cover; }
.sidebar-notice-photo-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; font-weight: 700; color: white;
}
.sidebar-notice-photo.missing { border-color: var(--danger); }
.sidebar-notice-photo.found   { border-color: var(--success); }
.sidebar-notice-photo .status-dot {
  position: absolute;
  bottom: 1px; left: 1px;
  width: 10px; height: 10px;
  border-radius: 50%;
  border: 2px solid var(--surface-2);
}
.status-dot.missing { background: var(--danger); }
.status-dot.found   { background: var(--success); }
.status-dot.resolved { background: var(--info); }

.sidebar-notice-info { flex: 1; min-width: 0; }
.sidebar-notice-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}
.sidebar-notice-city { font-size: 0.75rem; color: var(--text-muted); }
.sidebar-notice-status {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: var(--r-full);
  white-space: nowrap;
  flex-shrink: 0;
}

.sidebar-notice-link {
  color: var(--text-muted);
  font-size: 0.8rem;
  padding: 4px;
  border-radius: var(--r-xs);
  transition: all var(--t-fast);
  border: none;
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
}
.sidebar-notice-link:hover { color: var(--gold); background: var(--gold-glow); }

.map-sidebar-stats {
  padding: 10px 14px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  gap: 12px;
  font-size: 0.78rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}
.sidebar-stat-item { display: flex; align-items: center; gap: 5px; }
.sidebar-stat-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

.map-area { flex: 1; position: relative; }
.map-area #main-map { width: 100%; height: 100%; }

/* Map Legend */
.map-legend {
  position: absolute;
  bottom: 24px;
  right: 16px;
  background: var(--surface-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-default);
  border-radius: var(--r-md);
  padding: 12px 16px;
  z-index: 500;
  box-shadow: var(--shadow-md);
  min-width: 140px;
}
.map-legend-title { font-size: 0.78rem; font-weight: 700; color: var(--text-primary); margin-bottom: 8px; }
.map-legend-item { display: flex; align-items: center; gap: 8px; font-size: 0.75rem; color: var(--text-secondary); margin-bottom: 5px; }
.map-legend-item:last-child { margin-bottom: 0; }
.legend-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }

/* ===========================
   NOTICE CARDS (Grid)
   =========================== */
.notice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.notice-card {
  background: var(--surface-card);
  border: 1px solid var(--border-default);
  border-radius: var(--r-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all var(--t-normal);
  position: relative;
}
.notice-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.notice-card.notice-critical {
  border-color: rgba(239,68,68,0.4);
  animation: criticalBorder 2s ease-in-out infinite;
}

.notice-card-bar { height: 3px; width: 100%; flex-shrink: 0; }

.notice-card-photo {
  width: 100%;
  height: 190px;
  overflow: hidden;
  background: var(--surface-3);
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.notice-card-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.notice-card:hover .notice-card-photo img { transform: scale(1.04); }
.notice-photo-placeholder {
  width: 80px; height: 80px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 2.2rem; font-weight: 800; color: white;
}
.notice-card-overlay {
  position: absolute;
  top: 10px; right: 10px;
  display: flex; flex-direction: column; gap: 5px; align-items: flex-end;
}
.notice-card-body { padding: 14px 16px; flex: 1; display: flex; flex-direction: column; }
.notice-card-badges { display: flex; gap: 6px; margin-bottom: 8px; flex-wrap: wrap; align-items: center; }
.notice-card-name { font-size: 1rem; font-weight: 700; color: var(--text-primary); margin: 0 0 6px; }
.notice-card-meta { display: flex; gap: 10px; font-size: 0.8rem; color: var(--text-muted); margin-bottom: 8px; flex-wrap: wrap; }
.notice-card-meta span { display: flex; align-items: center; gap: 3px; }
.notice-card-code {
  font-size: 0.75rem;
  background: var(--surface-3);
  padding: 3px 8px;
  border-radius: var(--r-xs);
  color: var(--text-muted);
  display: inline-block;
  font-family: var(--font-mono);
  border: 1px solid var(--border-subtle);
  margin-top: auto;
}
.notice-card-link {
  display: block;
  text-align: center;
  padding: 11px;
  background: var(--surface-3);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.85rem;
  transition: all var(--t-fast);
  border-top: 1px solid var(--border-subtle);
}
.notice-card-link:hover { background: var(--gold); color: var(--text-inverse); }

/* ===========================
   NOTICE DETAIL PAGE
   =========================== */
.notice-detail-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  padding: 32px 0;
}

.notice-detail-main { min-width: 0; }

.notice-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.notice-detail-photo {
  width: 200px;
  height: 250px;
  border-radius: var(--r-md);
  overflow: hidden;
  border: 3px solid var(--border-default);
  flex-shrink: 0;
}
.notice-detail-photo img { width: 100%; height: 100%; object-fit: cover; }
.notice-detail-photo-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 4rem; font-weight: 800; color: white;
}

.notice-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.notice-info-item {
  background: var(--surface-3);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-sm);
  padding: 12px 14px;
}
.notice-info-label { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 4px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.notice-info-value { font-size: 0.95rem; font-weight: 600; color: var(--text-primary); }

/* Tip form sidebar */
.tip-form { display: flex; flex-direction: column; gap: 12px; }
.tip-form textarea {
  min-height: 90px;
  resize: none;
}

/* Timeline */
.timeline { position: relative; padding-right: 24px; }
.timeline::before {
  content: '';
  position: absolute;
  top: 0; bottom: 0; right: 8px;
  width: 2px;
  background: linear-gradient(to bottom, var(--gold), transparent);
  border-radius: 1px;
}
.timeline-item { position: relative; margin-bottom: 18px; padding-right: 20px; }
.timeline-dot {
  position: absolute;
  right: -24px; top: 4px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--gold);
  border: 3px solid var(--surface-2);
  box-shadow: 0 0 0 2px var(--gold-glow);
}
.timeline-date { font-size: 0.72rem; color: var(--text-muted); margin-bottom: 3px; }
.timeline-content { font-size: 0.85rem; color: var(--text-secondary); }

/* Tips list */
.tip-item {
  padding: 12px;
  background: var(--surface-3);
  border-radius: var(--r-sm);
  border: 1px solid var(--border-subtle);
  margin-bottom: 8px;
}
.tip-item:last-child { margin-bottom: 0; }
.tip-item-time { font-size: 0.72rem; color: var(--text-muted); margin-bottom: 4px; }
.tip-item-content { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.6; }

/* ===========================
   NOTICES LIST PAGE
   =========================== */
.notices-filter-bar {
  background: var(--surface-card);
  border: 1px solid var(--border-default);
  border-radius: var(--r-md);
  padding: 16px 20px;
  margin-bottom: 24px;
}
.filter-grid {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 12px;
  align-items: end;
}
.filter-grid-search { display: flex; align-items: center; gap: 8px; }

/* Pagination */
.pagination { display: flex; align-items: center; justify-content: center; gap: 4px; margin-top: 32px; flex-wrap: wrap; }
.page-btn {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--r-sm);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border-default);
  background: var(--surface-3);
  color: var(--text-secondary);
  transition: all var(--t-fast);
  text-decoration: none;
}
.page-btn:hover { border-color: var(--gold); color: var(--gold); background: var(--gold-glow); }
.page-btn.active { background: var(--gold); color: var(--text-inverse); border-color: var(--gold); }

/* ===========================
   INTEL MAP PAGE
   =========================== */
.intel-map-layout {
  display: flex;
  height: calc(100vh - var(--header-height));
}

.intel-sidebar {
  width: 340px;
  background: var(--surface-2);
  border-left: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  flex-shrink: 0;
}

.intel-sidebar-header {
  padding: 20px;
  border-bottom: 1px solid var(--border-subtle);
}
.intel-sidebar-header h3 { font-size: 1rem; margin-bottom: 4px; }
.intel-sidebar-header p { font-size: 0.78rem; color: var(--text-muted); margin: 0; }

.intel-filters {
  padding: 14px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.filter-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.intel-sidebar-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}

.intel-stats-bar {
  padding: 12px 14px;
  border-top: 1px solid var(--border-subtle);
  background: var(--surface-3);
}
.intel-stats-row {
  display: flex;
  gap: 16px;
  font-size: 0.8rem;
}
.intel-stat { display: flex; align-items: center; gap: 5px; }
.intel-stat-num { font-weight: 700; color: var(--text-primary); }
.intel-stat-label { color: var(--text-muted); }

.intel-map-area { flex: 1; position: relative; }

.notice-detail-panel {
  background: var(--surface-card);
  border-top: 1px solid var(--border-default);
  padding: 14px;
  display: none;
}
.notice-detail-panel.open { display: block; }

/* ===========================
   DASHBOARD
   =========================== */
.dashboard-layout {
  display: flex;
  min-height: calc(100vh - var(--header-height));
}

.sidebar {
  width: 260px;
  background: var(--surface-2);
  border-left: 1px solid var(--border-subtle);
  padding: 1.5rem 0;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.sidebar-section { margin-bottom: 8px; }
.sidebar-section-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  padding: 8px 16px 4px;
}
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all var(--t-fast);
  border-right: 3px solid transparent;
  text-decoration: none;
}
.sidebar-link:hover { color: var(--text-primary); background: var(--surface-3); }
.sidebar-link.active { color: var(--gold); background: var(--gold-glow); border-right-color: var(--gold); }
.sidebar-link-icon { width: 18px; text-align: center; font-size: 0.9rem; flex-shrink: 0; }

.main-content { flex: 1; padding: 2rem; overflow-y: auto; background: var(--surface-1); min-width: 0; }

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 2rem;
}
.stat-card {
  padding: 20px 24px;
  border-radius: var(--r-lg);
  background: var(--surface-card);
  border: 1px solid var(--border-default);
  transition: all var(--t-normal);
  position: relative;
  overflow: hidden;
}
.stat-card::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 4px;
  height: 100%;
  border-radius: 0 var(--r-lg) var(--r-lg) 0;
}
.stat-card.danger::after  { background: var(--danger); }
.stat-card.success::after { background: var(--success); }
.stat-card.info::after    { background: var(--info); }
.stat-card.gold::after    { background: var(--gold); }
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.stat-value { font-size: 2.5rem; font-weight: 800; line-height: 1; margin-bottom: 4px; }
.stat-label { font-size: 0.85rem; color: var(--text-muted); font-weight: 500; }
.stat-change { font-size: 0.75rem; margin-top: 8px; display: flex; align-items: center; gap: 4px; }
.stat-change.up   { color: var(--success); }
.stat-change.down { color: var(--danger); }

/* Map container for detail */
.map-container {
  height: 300px;
  width: 100%;
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--border-default);
}

/* ===========================
   SECTION STYLES
   =========================== */
.section { padding: 60px 0; }
.section-sm { padding: 40px 0; }

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 12px;
}
.section-header h2 { margin: 0; }

.section-title {
  text-align: center;
  margin-bottom: 48px;
}
.section-title h2 { margin-bottom: 12px; }
.section-title p { color: var(--text-muted); max-width: 500px; margin: 0 auto; }

.divider {
  width: 60px; height: 3px;
  background: linear-gradient(90deg, var(--gold), transparent);
  border-radius: 2px;
  margin: 16px auto;
}

/* How it works */
.how-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
}
.how-card {
  padding: 32px 28px;
  text-align: center;
  position: relative;
}
.how-number {
  width: 56px; height: 56px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; font-weight: 800; color: white;
  margin: 0 auto 20px;
  position: relative;
}
.how-number::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid currentColor;
  opacity: 0.3;
}
.how-card h3 { margin-bottom: 12px; font-size: 1.1rem; }
.how-card p { font-size: 0.9rem; color: var(--text-muted); }

/* CTA */
.cta-card {
  padding: 52px 48px;
  background: linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 50%, #2563eb 100%);
  border: none;
  position: relative;
  overflow: hidden;
}
.cta-card::before {
  content: '';
  position: absolute;
  top: -50%; right: -20%;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
  pointer-events: none;
}
.cta-card h2 { color: white; margin-bottom: 12px; }
.cta-card p { color: rgba(191,219,254,0.9); margin-bottom: 28px; }

/* ===========================
   ALERTS / BANNERS
   =========================== */
.alert {
  padding: 12px 16px;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.875rem;
  margin-bottom: 1rem;
}
.alert-icon { flex-shrink: 0; font-size: 1rem; margin-top: 1px; }
.alert-warning { background: var(--warning-light); border-color: rgba(245,158,11,0.3); color: #fde68a; }
.alert-danger   { background: var(--danger-light);  border-color: var(--danger-border); color: #fca5a5; }
.alert-success  { background: var(--success-light); border-color: var(--success-border); color: #86efac; }
.alert-info     { background: var(--info-light);    border-color: rgba(59,130,246,0.3); color: #93c5fd; }

.amber-alert-banner {
  background: linear-gradient(90deg, #7f1d1d, #dc2626, #7f1d1d);
  color: white;
  padding: 10px 0;
  font-size: 0.9rem;
  font-weight: 600;
  overflow: hidden;
}
.amber-inner { display: flex; align-items: center; gap: 12px; }
.amber-icon { flex-shrink: 0; animation: alertPulse 1s ease-in-out infinite; }
.amber-inner a { color: #fde68a; text-decoration: underline; }

/* ===========================
   LEAFLET MAP CUSTOM STYLES
   =========================== */

/* Photo pin markers */
.custom-person-pin { background: transparent !important; border: none !important; }

.map-location-pin {
  display: flex;
  flex-direction: column;
  align-items: center;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.5));
  transform-origin: bottom center;
  transition: transform 0.2s ease;
}

.pin-head {
  width: 50px; height: 50px;
  border-radius: 50%;
  border: 3px solid #ef4444;
  overflow: hidden;
  background: var(--surface-2);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 3px rgba(239,68,68,0.2), 0 4px 12px rgba(0,0,0,0.5);
}
.pin-found .pin-head { border-color: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,0.2), 0 4px 12px rgba(0,0,0,0.5); }
.pin-critical .pin-head { animation: markerGlow 1.5s ease-in-out infinite; }

.marker-photo-img { width: 100%; height: 100%; object-fit: cover; }
.marker-photo-fallback {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; font-weight: 800; color: white;
}

.pin-badge {
  font-size: 0.62rem;
  font-weight: 800;
  color: white;
  padding: 2px 8px;
  border-radius: var(--r-full);
  margin-top: 3px;
  white-space: nowrap;
  font-family: var(--font-primary);
  letter-spacing: 0.3px;
}

.pin-needle {
  width: 0; height: 0;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-top: 12px solid #ef4444;
  margin-top: -1px;
}
.pin-found .pin-needle { border-top-color: #22c55e; }

/* Cluster */
.custom-cluster-wrapper { background: transparent !important; border: none !important; }
.map-cluster-pin {
  width: 44px; height: 44px;
  background: linear-gradient(135deg, #1d4ed8, #3b82f6);
  border-radius: 50%;
  border: 3px solid rgba(59,130,246,0.4);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(59,130,246,0.5), 0 0 0 6px rgba(59,130,246,0.1);
  color: white; font-weight: 800; font-size: 0.9rem;
  font-family: var(--font-primary);
  transition: transform 0.2s;
}
.map-cluster-pin:hover { transform: scale(1.1); }

/* Map Popup */
.map-popup-card {
  font-family: var(--font-primary);
  direction: rtl;
  text-align: right;
  min-width: 230px;
  max-width: 260px;
}
.popup-header { display: flex; gap: 12px; margin-bottom: 10px; align-items: flex-start; }
.popup-photo {
  width: 56px; height: 56px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(255,255,255,0.15);
  flex-shrink: 0;
  background: var(--surface-3);
  display: flex; align-items: center; justify-content: center;
}
.popup-photo img { width: 100%; height: 100%; object-fit: cover; }
.popup-avatar-placeholder { font-size: 1.4rem; font-weight: 800; color: white; }
.popup-info { flex: 1; min-width: 0; }
.popup-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: var(--r-full);
  font-size: 0.7rem;
  font-weight: 700;
  margin-bottom: 5px;
}
.popup-name { font-size: 0.95rem; font-weight: 700; margin-bottom: 2px; color: #1e293b; }
.popup-code { font-size: 0.72rem; color: #64748b; font-family: var(--font-mono); }
.popup-body { border-top: 1px solid #e2e8f0; padding-top: 8px; }
.popup-meta-item { font-size: 0.8rem; color: #475569; margin-bottom: 4px; display: flex; gap: 4px; align-items: center; }
.popup-action-btn {
  display: block;
  text-align: center;
  margin-top: 10px;
  padding: 9px;
  border-radius: 6px;
  color: white;
  font-weight: 700;
  font-size: 0.82rem;
  text-decoration: none;
  font-family: var(--font-primary);
}
.popup-action-btn:hover { opacity: 0.9; color: white; }

/* Leaflet override */
.leaflet-popup-content-wrapper { border-radius: 12px !important; box-shadow: 0 8px 32px rgba(0,0,0,0.2) !important; padding: 0 !important; }
.leaflet-popup-content { margin: 14px 16px !important; }
.leaflet-popup-tip-container { margin-top: -1px; }
.leaflet-control-zoom { border: 1px solid rgba(255,255,255,0.1) !important; background: rgba(15,23,42,0.9) !important; backdrop-filter: blur(10px); border-radius: 8px !important; overflow: hidden; }
.leaflet-control-zoom a { background: transparent !important; color: #94a3b8 !important; border-bottom: 1px solid rgba(255,255,255,0.08) !important; }
.leaflet-control-zoom a:hover { background: rgba(255,255,255,0.05) !important; color: white !important; }
.leaflet-control-attribution { background: rgba(10,15,30,0.7) !important; color: #475569 !important; font-size: 10px !important; backdrop-filter: blur(4px); }
.leaflet-control-attribution a { color: #64748b !important; }

/* ===========================
   FORMS — AUTH PAGES
   =========================== */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  background:
    radial-gradient(ellipse at 25% 25%, rgba(59,130,246,0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 75% 75%, rgba(245,158,11,0.05) 0%, transparent 50%),
    var(--surface-0);
}
.auth-card {
  width: 100%;
  max-width: 480px;
  padding: 40px;
}
.auth-logo { text-align: center; margin-bottom: 32px; }
.auth-logo h1 { font-size: 2rem; font-weight: 900; }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; color: var(--text-muted); font-size: 0.82rem; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border-subtle); }

/* ===========================
   FOOTER
   =========================== */
.main-footer {
  background: var(--surface-2);
  border-top: 1px solid var(--border-subtle);
  padding: 48px 0 24px;
  margin-top: 80px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-brand { }
.footer-brand-name { font-size: 1.4rem; font-weight: 800; margin-bottom: 8px; }
.footer-brand-desc { font-size: 0.875rem; color: var(--text-muted); line-height: 1.75; max-width: 280px; }
.footer-col-title { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); margin-bottom: 16px; }
.footer-links { display: flex; flex-direction: column; gap: 8px; }
.footer-links a { font-size: 0.875rem; color: var(--text-secondary); transition: color var(--t-fast); }
.footer-links a:hover { color: var(--gold); }
.footer-emergency li { font-size: 0.875rem; color: var(--text-secondary); margin-bottom: 6px; }
.footer-emergency strong { color: var(--danger); }
.footer-bottom { border-top: 1px solid var(--border-subtle); padding-top: 20px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.footer-bottom p { font-size: 0.82rem; color: var(--text-muted); margin: 0; }
.social-links { display: flex; gap: 8px; }
.social-btn {
  width: 34px; height: 34px;
  border-radius: var(--r-sm);
  background: var(--surface-3);
  border: 1px solid var(--border-default);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem; color: var(--text-muted);
  transition: all var(--t-fast);
  text-decoration: none;
}
.social-btn:hover { border-color: var(--gold); color: var(--gold); background: var(--gold-glow); }

/* ===========================
   ANIMATIONS
   =========================== */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0.6); }
  50%       { box-shadow: 0 0 0 10px rgba(239,68,68,0); }
}

@keyframes criticalPulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.7; }
}

@keyframes criticalBorder {
  0%, 100% { border-color: rgba(239,68,68,0.4); }
  50%       { border-color: rgba(239,68,68,0.9); box-shadow: 0 0 20px rgba(239,68,68,0.2); }
}

@keyframes alertPulse {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.08); }
}

@keyframes markerGlow {
  0%, 100% { box-shadow: 0 0 0 3px rgba(239,68,68,0.2), 0 4px 12px rgba(0,0,0,0.5); }
  50%       { box-shadow: 0 0 0 8px rgba(239,68,68,0.4), 0 0 20px rgba(239,68,68,0.3), 0 4px 12px rgba(0,0,0,0.5); }
}

@keyframes tickerScroll {
  0%   { transform: translateX(100vw); }
  100% { transform: translateX(-200%); }
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-6px); }
}

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

.animate-fadeIn    { animation: fadeIn 0.5s ease; }
.animate-slideUp   { animation: fadeSlideUp 0.5s ease; }
.animate-float     { animation: float 3s ease-in-out infinite; }

.skeleton {
  background: linear-gradient(90deg, var(--surface-3) 25%, var(--surface-4) 50%, var(--surface-3) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite linear;
  border-radius: var(--r-sm);
}

/* ===========================
   GLASS CARD GLOW
   =========================== */
.glass-card-glow {
  position: relative;
}
.glass-card-glow::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(245,158,11,0.15), transparent 50%, rgba(59,130,246,0.1));
  z-index: -1;
}

/* ===========================
   RESPONSIVE
   =========================== */
@media (max-width: 1100px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .notice-detail-layout { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  :root { --sidebar-width: 280px; }
  .intel-map-layout { flex-direction: column; }
  .intel-sidebar { width: 100%; height: 260px; border-left: none; border-bottom: 1px solid var(--border-subtle); }
  .filter-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  body { font-size: 14px; }
  .main-nav { display: none; }
  .mobile-toggle { display: flex; }
  .map-layout { flex-direction: column; height: auto; }
  .map-sidebar { width: 100%; height: 260px; border-left: none; border-top: 1px solid var(--border-subtle); order: 2; }
  .map-area { order: 1; height: 350px; }
  .hero-title { font-size: clamp(2.5rem, 12vw, 4rem); }
  .hero-stats { flex-wrap: wrap; }
  .hero-stat { min-width: 50%; }
  .notice-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .cta-card { padding: 32px 24px; }
  .filter-grid { grid-template-columns: 1fr; }
  .dashboard-layout { flex-direction: column; }
  .sidebar { width: 100%; flex-direction: row; overflow-x: auto; padding: 0.5rem; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .hero-actions { flex-direction: column; align-items: center; }
  .btn-hero { width: 100%; justify-content: center; }
  .notice-grid { grid-template-columns: 1fr; }
  .hero-stat { min-width: 100%; }
}

/* ===========================
   MOBILE NAV OPEN STATE
   =========================== */
.mobile-nav-open .main-nav {
  display: flex;
  flex-direction: column;
  position: fixed;
  top: var(--header-height);
  right: 0; left: 0;
  background: rgba(10,15,30,0.98);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-default);
  padding: 12px;
  z-index: 999;
  gap: 4px;
}

/* Print */
@media print {
  body { background: white; color: black; }
  .main-header, .main-footer, .btn, .map-section { display: none !important; }
  .glass-card { box-shadow: none; border: 1px solid #ccc; }
}

/* ===========================
   FILE UPLOAD DROPZONE
   =========================== */
.file-upload {
  border: 2px dashed var(--border-default);
  border-radius: var(--r-md);
  padding: 32px 20px;
  text-align: center;
  background: var(--surface-2);
  transition: border-color 0.2s, background 0.2s;
  cursor: pointer;
}
.file-upload:hover {
  border-color: var(--gold);
  background: var(--surface-3);
}

/* ===========================
   NOTICE DETAIL PAGE LAYOUT
   =========================== */
.notice-detail-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 20px;
  align-items: start;
}
.notice-detail-main { min-width: 0; }
.notice-detail-photo {
  width: 160px;
  height: 160px;
  border-radius: var(--r-md);
  overflow: hidden;
  border: 3px solid transparent;
  flex-shrink: 0;
}
.notice-detail-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.notice-detail-photo-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  font-weight: 800;
  color: white;
}
.notice-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.notice-info-item {
  background: var(--surface-2);
  border-radius: var(--r-sm);
  padding: 10px 14px;
}
.notice-info-label {
  font-size: .72rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 4px;
}
.notice-info-value {
  font-size: .9rem;
  color: var(--text-primary);
  font-weight: 500;
}

/* Timeline */
.timeline { position: relative; }
.timeline::before {
  content: '';
  position: absolute;
  right: 7px;
  top: 0; bottom: 0;
  width: 2px;
  background: var(--border-default);
}
.timeline-item {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 12px;
  padding-bottom: 20px;
  position: relative;
}
.timeline-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--gold);
  border: 2px solid var(--surface-1);
  margin-top: 3px;
  position: relative;
  z-index: 1;
}
.timeline-date {
  grid-column: 2;
  font-size: .72rem;
  color: var(--text-muted);
  margin-bottom: 2px;
}
.timeline-content {
  grid-column: 2;
  font-size: .875rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Tip items */
.tip-item {
  border-bottom: 1px solid var(--border-subtle);
  padding: 12px 0;
}
.tip-item:last-child { border-bottom: none; }
.tip-item-time {
  font-size: .72rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.tip-item-content {
  font-size: .875rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ===========================
   INTEL MAP FULL PAGE
   =========================== */
.intel-map-layout {
  display: flex;
  height: calc(100vh - var(--header-height));
}
.intel-sidebar {
  width: 360px;
  min-width: 320px;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  background: var(--surface-card);
  border-left: 1px solid var(--border-default);
  overflow: hidden;
  flex-shrink: 0;
}
.intel-sidebar-header {
  padding: 16px;
  border-bottom: 1px solid var(--border-default);
  background: var(--surface-2);
}
.intel-filters {
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-bottom: 1px solid var(--border-default);
  background: var(--surface-2);
}
.filter-label {
  font-size: .72rem;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 4px;
}
.intel-sidebar-list {
  flex: 1;
  overflow-y: auto;
}
.intel-stats-bar {
  padding: 12px 16px;
  border-top: 1px solid var(--border-default);
  background: var(--surface-2);
}
.intel-stats-row {
  display: flex;
  gap: 16px;
  justify-content: space-around;
  margin-bottom: 8px;
}
.intel-stat { text-align: center; }
.intel-stat-num {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-primary);
}
.intel-stat-label {
  font-size: .7rem;
  color: var(--text-muted);
}
.intel-map-area {
  flex: 1;
  position: relative;
}
.notice-detail-panel {
  display: none;
  padding: 14px 16px;
  border-top: 1px solid var(--border-default);
  background: var(--surface-3);
}
.notice-detail-panel.open { display: block; }

/* ===========================
   DASHBOARD LAYOUT SYSTEM
   =========================== */
.dash-layout {
  display: flex;
  min-height: calc(100vh - var(--header-height));
  background: var(--surface-0);
  position: relative;
}

.dash-sidebar {
  width: var(--sidebar-width);
  min-width: 260px;
  background: var(--surface-1);
  border-left: 1px solid var(--border-default);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: transform 0.3s ease;
  z-index: 900;
}

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

.dash-user-card {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(255,255,255,0.02);
}

.dash-user-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  color: var(--navy-950);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.dash-nav {
  display: flex;
  flex-direction: column;
  padding: 12px 8px;
  gap: 4px;
  overflow-y: auto;
}

.dash-nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-radius: var(--r-sm);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.dash-nav-link:hover {
  background: var(--surface-3);
  color: var(--text-primary);
}

.dash-nav-link.active {
  background: var(--surface-3);
  color: var(--gold);
  font-weight: 700;
  border-right: 3px solid var(--gold);
}

.dash-badge {
  background: var(--danger);
  color: white;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
}

.dash-main {
  flex: 1;
  padding: 28px;
  min-width: 0;
  overflow-x: hidden;
}

.dash-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 20px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--border-default);
}

.dash-menu-btn {
  display: none;
  background: var(--surface-3);
  color: var(--text-primary);
  border: 1px solid var(--border-default);
  border-radius: var(--r-sm);
  width: 40px;
  height: 40px;
  font-size: 1.2rem;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.dash-section {
  display: none;
}
.dash-section.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

.dash-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.dash-stat-card {
  background: var(--surface-card);
  border: 1px solid var(--border-default);
  border-top: 3px solid var(--gold);
  border-radius: var(--r-md);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  backdrop-filter: blur(12px);
  transition: transform 0.2s ease;
}
.dash-stat-card:hover {
  transform: translateY(-2px);
}

.dash-stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.dash-stat-num {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
}

.dash-stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.dash-table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.dash-table {
  width: 100%;
  border-collapse: collapse;
  text-align: right;
}

.dash-table th {
  background: var(--surface-2);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-default);
  white-space: nowrap;
}

.dash-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.88rem;
  color: var(--text-primary);
  white-space: nowrap;
}

.dash-table tr:hover td {
  background: rgba(255,255,255,0.02);
}

/* ===========================
   COMPREHENSIVE MOBILE RESPONSIVENESS
   =========================== */
@media (max-width: 992px) {
  .main-nav {
    display: none;
  }

  .mobile-toggle {
    display: flex;
  }

  .mobile-nav-open .main-nav {
    display: flex !important;
    flex-direction: column;
    position: fixed;
    top: var(--header-height);
    right: 0;
    left: 0;
    background: rgba(10,15,30,0.98);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--border-default);
    padding: 16px;
    z-index: 1001;
    gap: 8px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.8);
    animation: fadeSlideUp 0.25s ease;
  }

  .mobile-nav-open .main-nav .nav-link {
    padding: 12px 16px;
    font-size: 1rem;
    border-radius: var(--r-sm);
    justify-content: flex-start;
    width: 100%;
  }

  .dash-menu-btn {
    display: flex !important;
  }

  .dash-sidebar {
    position: fixed;
    top: var(--header-height);
    right: 0;
    bottom: 0;
    width: 280px;
    transform: translateX(100%);
    box-shadow: -10px 0 30px rgba(0,0,0,0.8);
    z-index: 1002;
  }

  body.dash-sidebar-open .dash-sidebar {
    transform: translateX(0);
  }

  body.dash-sidebar-open::after {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    z-index: 1001;
  }

  .dash-main {
    padding: 20px 16px;
  }

  .notice-detail-layout {
    grid-template-columns: 1fr;
  }

  .intel-map-layout {
    flex-direction: column;
    height: auto;
    min-height: calc(100vh - var(--header-height));
  }

  .intel-sidebar {
    width: 100%;
    max-width: 100%;
    height: 320px;
    border-left: none;
    border-bottom: 1px solid var(--border-default);
    order: 2;
  }

  .intel-map-area {
    height: 400px;
    orde  .map-layout {
    flex-direction: column;
    height: auto;
  }

  .map-sidebar {
    width: 100%;
    height: 300px;
    border-left: none;
    border-top: 1px solid var(--border-default);
    order: 2;
  }

  .map-area {
    height: 360px;
    order: 1;
  }
}

@media (max-width: 768px) {
  html, body {
    max-width: 100% !important;
    overflow-x: hidden !important;
    width: 100% !important;
  }

  body {
    font-size: 14px;
  }

  .container, .container-fluid {
    padding: 0 12px;
    max-width: 100% !important;
    box-sizing: border-box;
  }

  .map-section-header {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 12px 14px !important;
  }

  .map-filter-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    width: 100%;
  }

  .map-filter-btn {
    flex: 1 1 auto;
    font-size: 0.78rem;
    padding: 6px 10px;
    text-align: center;
    justify-content: center;
  }

  .map-legend {
    position: relative !important;
    bottom: auto !important;
    right: auto !important;
    left: auto !important;
    top: auto !important;
    margin: 8px 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    z-index: 10;
    padding: 8px 12px;
    width: calc(100% - 24px);
    box-sizing: border-box;
  }

  .map-legend-title {
    margin-bottom: 0;
    margin-left: 8px;
    font-size: 0.75rem;
  }

  .map-legend-item {
    margin-bottom: 0;
  }

  .hero-section {
    padding: 30px 0;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 0.9rem;
  }

  .hero-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 0 12px;
  }

  .hero-stat {
    min-width: 0;
    padding: 12px;
  }

  .hero-stat-num {
    font-size: 1.5rem;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
    gap: 8px;
  }

  .btn-hero {
    width: 100%;
    text-align: center;
    justify-content: center;
    padding: 12px 16px;
  }

  .notice-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  /* Horizontal Mobile Notice Card Layout (صورة محاذاة لليمين بجانبها المعلومات) */
  .notice-card {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    padding: 10px 12px !important;
    gap: 12px !important;
    border-radius: 14px !important;
    position: relative !important;
    min-height: 100px;
    background: var(--surface-card) !important;
    border: 1px solid var(--border-default) !important;
    cursor: pointer;
  }

  .notice-card-bar {
    width: 5px !important;
    height: 100% !important;
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    left: auto !important;
    border-radius: 0 14px 14px 0 !important;
  }

  .notice-card-photo {
    width: 90px !important;
    height: 90px !important;
    min-width: 90px !important;
    border-radius: 10px !important;
    overflow: hidden !important;
    flex-shrink: 0 !important;
    margin-right: 4px !important;
  }

  .notice-card-photo img {
    width: 100% !important;
    height: 100% !important;
    border-radius: 10px !important;
    object-fit: cover !important;
  }

  .notice-photo-placeholder {
    width: 100% !important;
    height: 100% !important;
    border-radius: 10px !important;
    font-size: 1.8rem !important;
  }

  .notice-card-overlay {
    display: none !important;
  }

  .notice-card-body {
    padding: 0 !important;
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    min-width: 0 !important;
  }

  .notice-card-badges {
    margin-bottom: 4px !important;
    gap: 4px !important;
  }

  .notice-card-name {
    font-size: 1.05rem !important;
    font-weight: 800 !important;
    margin: 2px 0 4px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    color: var(--text-primary) !important;
  }

  .notice-card-meta {
    font-size: 0.78rem !important;
    margin-bottom: 6px !important;
    gap: 10px !important;
  }

  .notice-card-code {
    font-size: 0.7rem !important;
    padding: 2px 6px !important;
    align-self: flex-start !important;
    margin-top: 0 !important;
  }

  .notice-card-link {
    display: none !important;
  }

  .filter-grid {
    grid-template-columns: 1fr;
  }

  .dash-stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  /* Force all inline 2-column & 3-column form grids to single column on mobile */
  div[style*="grid-template-columns:1fr 1fr"],
  div[style*="grid-template-columns: 1fr 1fr"],
  div[style*="grid-template-columns:repeat(3,1fr)"],
  div[style*="grid-template-columns: repeat(3, 1fr)"],
  div[style*="grid-template-columns: repeat(3,1fr)"] {
    grid-template-columns: 1fr !important;
  }

  /* Table responsiveness */
  .dash-table-wrap, table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .notice-detail-photo {
    width: 100%;
    height: 220px;
  }
}

@media (max-width: 480px) {
  :root {
    --header-height: 60px;
  }

  .header-inner {
    gap: 6px;
  }

  .logo-wrap {
    gap: 6px;
  }

  .logo-icon {
    width: 34px;
    height: 34px;
    font-size: 1rem;
  }

  .logo-name {
    font-size: 1rem;
  }

  .logo-tagline {
    display: none;
  }

  .dash-stats-grid {
    grid-template-columns: 1fr;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

  .header-actions {
    gap: 4px;
  }

  .user-pill {
    padding: 4px 8px;
  }

  .user-name, .role-chip {
    display: none !important;
  }

  .btn {
    padding: 7px 10px;
    font-size: 0.8rem;
  }

  .notices-filter-bar {
    padding: 10px;
  }

  .glass-card {
    padding: 14px !important;
  }
}

