/* ===== BloodLink Pro - Main Stylesheet ===== */
:root {
  --primary: #e63946;
  --primary-dark: #c1121f;
  --primary-light: #ff6b6b;
  --bg: #fff;
  --bg-soft: #fff5f5;
  --bg-card: #ffffff;
  --text: #1a1a2e;
  --text-muted: #6b7280;
  --border: #f0d0d0;
  --shadow: 0 4px 24px rgba(230,57,70,0.08);
  --shadow-hover: 0 8px 32px rgba(230,57,70,0.18);
  --radius: 14px;
  --radius-sm: 8px;
  --transition: 0.22s cubic-bezier(.4,0,.2,1);
  --font: 'Inter', 'Segoe UI', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  width: 100%;
}

/* ===== NAV HIDDEN CLASS ===== */
/* On desktop: hide auth-only items by default */
.nav-hidden { display: none !important; }

/* In mobile drawer: ALWAYS show everything — nav-hidden is overridden */
.nav-links.mobile-drawer .nav-hidden,
.nav-links.mobile-drawer > .nav-hidden {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  height: auto !important;
  overflow: visible !important;
}

/* ===== NAVBAR ===== */
.navbar {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 1.5rem;
  display: flex; align-items: center; gap: 0.4rem;
  height: 64px;
  box-shadow: 0 2px 12px rgba(230,57,70,0.06);
  width: 100%;
  max-width: 100vw;
}
.nav-brand {
  display: flex; align-items: center; gap: 6px;
  text-decoration: none;
  font-size: 1.15rem; font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.5px;
  flex-shrink: 0;
  white-space: nowrap;
  margin-right: auto;
}
.nav-brand .drop-icon { font-size: 1.2rem; animation: pulse-drop 2s infinite; }
@keyframes pulse-drop {
  0%,100%{transform:scale(1);} 50%{transform:scale(1.15);}
}

/* Desktop nav links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 0.1rem;
  flex-wrap: nowrap;
  flex-shrink: 1;
  min-width: 0;
}

/* Emergency link — always red */
.nav-links a.nav-emergency { color: #e63946 !important; font-weight: 700 !important; }
.nav-links a.nav-emergency:hover { background: #fff5f5 !important; }

/* Drawer header — hidden on desktop */
.nav-drawer-header { display: none; }

/* nav-util-row inside nav-links — desktop styling */
.nav-links .nav-util-row {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
  flex-shrink: 0;
}

.nav-links a {
  text-decoration: none; color: var(--text-muted);
  padding: 0.38rem 0.6rem; border-radius: 8px;
  font-size: 0.8rem; font-weight: 500;
  transition: var(--transition);
  white-space: nowrap;
  flex-shrink: 0;
}
.nav-links a:hover, .nav-links a.active { color: var(--primary); background: var(--bg-soft); }

/* Hide less important nav items on medium screens */
@media (max-width: 1024px) and (min-width: 769px) {
  .nav-links a[href="about.html"],
  .nav-links a[href="pricing.html"] {
    display: none;
  }
}
@media (max-width: 900px) and (min-width: 769px) {
  .nav-links a[href="banks.html"] {
    display: none;
  }
  #nav-profile { display: none !important; }
}
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 0.5rem 1.3rem; border-radius: 8px; font-size: 0.9rem; font-weight: 600; cursor: pointer; border: none; transition: var(--transition); text-decoration: none; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(230,57,70,0.3); }
.btn-outline { background: transparent; color: var(--primary); border: 2px solid var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover { background: var(--bg-soft); color: var(--primary); }
.btn-danger { background: #dc2626; color: #fff; }
.btn-danger:hover { background: #b91c1c; }
.btn-lg { padding: 0.75rem 2rem; font-size: 1rem; border-radius: 10px; }
.btn-sm { padding: 0.35rem 0.9rem; font-size: 0.82rem; }

/* ===== EMERGENCY TICKER ===== */
.emergency-ticker {
  background: linear-gradient(90deg, #dc2626, #e63946);
  color: #fff; padding: 8px 0;
  overflow: hidden; white-space: nowrap;
  font-size: 0.82rem; font-weight: 600;
  letter-spacing: 0.3px;
}
.ticker-inner { display: inline-block; animation: ticker 28s linear infinite; }
@keyframes ticker { 0%{transform:translateX(100vw);} 100%{transform:translateX(-100%);} }

/* ===== HERO ===== */
.hero {
  background: linear-gradient(135deg, #fff5f5 0%, #fff 60%, #ffe4e4 100%);
  padding: 3.5rem 2rem 3rem;
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; top: -80px; right: -80px;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(230,57,70,0.08) 0%, transparent 70%);
  border-radius: 50%;
}
.hero-content { max-width: 1100px; width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(230,57,70,0.1); color: var(--primary);
  padding: 6px 14px; border-radius: 20px; font-size: 0.8rem; font-weight: 700;
  margin-bottom: 1.2rem; letter-spacing: 0.5px;
}
.hero h1 { font-size: 3.2rem; font-weight: 900; line-height: 1.1; margin-bottom: 1.2rem; letter-spacing: -1.5px; }
.hero h1 span { color: var(--primary); }
.hero p { font-size: 1.1rem; color: var(--text-muted); margin-bottom: 2rem; max-width: 440px; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 2rem; margin-top: 2.5rem; }
.hero-stat { text-align: center; }
.hero-stat .num { font-size: 2rem; font-weight: 900; color: var(--primary); }
.hero-stat .lbl { font-size: 0.78rem; color: var(--text-muted); font-weight: 500; }
.hero-visual { display: flex; flex-direction: column; align-items: center; gap: 1.5rem; }
.blood-drop-anim {
  width: 120px; height: 140px;
  background: linear-gradient(160deg, var(--primary-light), var(--primary));
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  transform: rotate(180deg);
  box-shadow: 0 8px 40px rgba(230,57,70,0.35);
  animation: float-drop 3s ease-in-out infinite;
  position: relative;
}
.blood-drop-anim::after {
  content: ''; position: absolute; top: 50%; left: 50%;
  transform: translate(-50%,-50%) rotate(180deg);
  }
@keyframes float-drop {
  0%,100%{transform:rotate(180deg) translateY(0);} 50%{transform:rotate(180deg) translateY(-12px);}
}
.blood-types-grid { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.blood-badge {
  background: var(--primary); color: #fff;
  padding: 6px 14px; border-radius: 20px;
  font-size: 0.85rem; font-weight: 700;
  box-shadow: 0 2px 8px rgba(230,57,70,0.25);
  transition: var(--transition);
}
.blood-badge:hover { transform: scale(1.1); background: var(--primary-dark); }

/* ===== SECTIONS ===== */
.section { padding: 4rem 2rem; }
.section-center { text-align: center; }
.section-title { font-size: 2rem; font-weight: 800; margin-bottom: 0.5rem; letter-spacing: -0.5px; }
.section-sub { color: var(--text-muted); font-size: 1rem; margin-bottom: 2.5rem; }
.section-divider { width: 48px; height: 4px; background: var(--primary); border-radius: 2px; margin: 0.7rem auto 2rem; }
.container { max-width: 1100px; margin: 0 auto; }

/* ===== HOW IT WORKS ===== */
.how-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.5rem; }
.how-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 2rem 1.5rem;
  text-align: center; transition: var(--transition);
  box-shadow: var(--shadow);
}
.how-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); border-color: var(--primary-light); }
.how-icon { font-size: 2.2rem; margin-bottom: 1rem; }
.how-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 0.5rem; }
.how-card p { font-size: 0.85rem; color: var(--text-muted); }

/* ===== COMPATIBILITY TABLE ===== */
.compat-table-wrap { overflow-x: auto; border-radius: var(--radius); box-shadow: var(--shadow); }
.compat-table { width: 100%; border-collapse: collapse; background: var(--bg-card); }
.compat-table th { background: var(--primary); color: #fff; padding: 12px 18px; text-align: left; font-size: 0.88rem; font-weight: 700; }
.compat-table td { padding: 11px 18px; border-bottom: 1px solid var(--border); font-size: 0.88rem; }
.compat-table tr:last-child td { border-bottom: none; }
.compat-table tr:hover td { background: var(--bg-soft); }
.bg-pill { display: inline-block; background: var(--primary); color: #fff; padding: 3px 10px; border-radius: 12px; font-size: 0.78rem; font-weight: 700; }

/* ===== BLOOD BANKS ===== */
.banks-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }
.bank-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem;
  box-shadow: var(--shadow); transition: var(--transition);
}
.bank-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.bank-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 0.5rem; color: var(--primary); }
.bank-meta { display: flex; flex-direction: column; gap: 4px; }
.bank-meta span { font-size: 0.82rem; color: var(--text-muted); display: flex; align-items: center; gap: 6px; }
.bank-status { display: inline-block; padding: 3px 10px; border-radius: 12px; font-size: 0.75rem; font-weight: 700; margin-top: 8px; }
.status-open { background: #dcfce7; color: #16a34a; }
.status-247 { background: #dbeafe; color: #1d4ed8; }

/* ===== FORMS ===== */
.form-page {
  min-height: 100vh; background: linear-gradient(135deg, #fff5f5 0%, #fff 100%);
  display: flex; align-items: center; justify-content: center; padding: 2rem;
}
.form-card {
  background: #fff; border-radius: 20px;
  box-shadow: 0 8px 48px rgba(230,57,70,0.12);
  padding: 2.5rem; width: 100%; max-width: 480px;
  border: 1px solid var(--border);
}
.form-card-wide { max-width: 640px; }
.form-header { text-align: center; margin-bottom: 2rem; }
.form-header .icon { font-size: 2.5rem; margin-bottom: 0.5rem; }
.form-header h2 { font-size: 1.6rem; font-weight: 800; }
.form-header p { color: var(--text-muted); font-size: 0.9rem; margin-top: 4px; }
.form-group { margin-bottom: 1.2rem; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 6px; color: var(--text); }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 0.7rem 1rem;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  font-size: 0.92rem; font-family: var(--font);
  background: #fafafa; color: var(--text);
  transition: var(--transition); outline: none;
}
.form-group input:focus, .form-group select:focus {
  border-color: var(--primary); background: #fff;
  box-shadow: 0 0 0 3px rgba(230,57,70,0.1);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-divider { text-align: center; margin: 1rem 0; color: var(--text-muted); font-size: 0.85rem; position: relative; }
.form-divider::before, .form-divider::after {
  content: ''; position: absolute; top: 50%; width: 42%; height: 1px; background: var(--border);
}
.form-divider::before { left: 0; } .form-divider::after { right: 0; }
.form-footer { text-align: center; margin-top: 1.2rem; font-size: 0.88rem; color: var(--text-muted); }
.form-footer a { color: var(--primary); font-weight: 600; text-decoration: none; }
.role-tabs { display: flex; gap: 0; margin-bottom: 1.5rem; border-radius: 10px; overflow: hidden; border: 1.5px solid var(--border); }
.role-tab {
  flex: 1; padding: 0.65rem; text-align: center;
  cursor: pointer; font-size: 0.88rem; font-weight: 600;
  background: #fafafa; color: var(--text-muted);
  transition: var(--transition); border: none;
}
.role-tab.active { background: var(--primary); color: #fff; }
.error-msg { color: #dc2626; font-size: 0.82rem; margin-top: 4px; display: none; }
.error-msg.show { display: block; }
.success-banner {
  background: #dcfce7; border: 1px solid #86efac; color: #15803d;
  padding: 12px 16px; border-radius: 8px; font-size: 0.88rem;
  margin-bottom: 1rem; display: none;
}
.success-banner.show { display: block; }

/* ===== DASHBOARD ===== */
.dashboard { min-height: 100vh; background: #f9fafb; }
.dash-header {
  background: #fff; border-bottom: 1px solid var(--border);
  padding: 1.5rem 2rem; display: flex; align-items: center; justify-content: space-between;
}
.dash-header h1 { font-size: 1.4rem; font-weight: 800; }
.dash-header p { color: var(--text-muted); font-size: 0.88rem; }
.dash-body { padding: 2rem; max-width: 1200px; margin: 0 auto; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.2rem; margin-bottom: 2rem; }
.stat-card {
  background: #fff; border-radius: var(--radius); padding: 1.5rem;
  box-shadow: var(--shadow); border: 1px solid var(--border);
  display: flex; align-items: center; gap: 1rem;
  transition: var(--transition);
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.stat-icon { width: 52px; height: 52px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; flex-shrink: 0; }
.stat-icon.red { background: rgba(230,57,70,0.1); }
.stat-icon.green { background: rgba(22,163,74,0.1); }
.stat-icon.blue { background: rgba(29,78,216,0.1); }
.stat-icon.orange { background: rgba(234,88,12,0.1); }
.stat-info .num { font-size: 1.8rem; font-weight: 900; color: var(--text); }
.stat-info .lbl { font-size: 0.8rem; color: var(--text-muted); font-weight: 500; }
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-bottom: 2rem; }
.dash-card { background: #fff; border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); border: 1px solid var(--border); }
.dash-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 1rem; }
.chart-wrap { position: relative; height: 220px; }
.recent-list { display: flex; flex-direction: column; gap: 10px; }
.recent-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px; border-radius: 8px; background: var(--bg-soft);
}
.recent-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.9rem; flex-shrink: 0;
}
.recent-info .name { font-size: 0.9rem; font-weight: 600; }
.recent-info .meta { font-size: 0.78rem; color: var(--text-muted); }
.avail-dot { width: 8px; height: 8px; border-radius: 50%; margin-left: auto; flex-shrink: 0; }
.avail-dot.yes { background: #16a34a; }
.avail-dot.no { background: #9ca3af; }

/* ===== SEARCH PAGE ===== */
.search-page { min-height: 100vh; background: #f9fafb; padding: 2rem; }
.search-hero { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff; border-radius: 20px; padding: 2.5rem; margin-bottom: 2rem; text-align: center; }
.search-hero h1 { font-size: 2rem; font-weight: 900; margin-bottom: 0.5rem; }
.search-hero p { opacity: 0.85; font-size: 0.95rem; }
.search-box {
  background: #fff; border-radius: var(--radius); padding: 1.5rem;
  box-shadow: var(--shadow); border: 1px solid var(--border);
  margin-bottom: 2rem;
}
.search-filters { display: grid; grid-template-columns: 1fr 1fr auto; gap: 1rem; align-items: end; }
.results-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.results-count { font-size: 0.9rem; color: var(--text-muted); }
.results-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.2rem; }
.donor-card {
  background: #fff; border-radius: var(--radius); padding: 1.5rem;
  box-shadow: var(--shadow); border: 1px solid var(--border);
  transition: var(--transition); position: relative; overflow: hidden;
}
.donor-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); border-color: var(--primary-light); }
.donor-card.best-match { border-color: var(--primary); border-width: 2px; }
.best-badge {
  position: absolute; top: 12px; right: 12px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff; padding: 3px 10px; border-radius: 12px;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.3px;
}
.donor-top { display: flex; align-items: center; gap: 12px; margin-bottom: 1rem; }
.donor-avatar {
  width: 48px; height: 48px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1.1rem; flex-shrink: 0;
}
.donor-name { font-size: 1rem; font-weight: 700; }
.donor-city { font-size: 0.82rem; color: var(--text-muted); }
.blood-group-tag {
  background: var(--primary); color: #fff;
  padding: 4px 12px; border-radius: 20px;
  font-size: 0.85rem; font-weight: 800;
  margin-left: auto;
}
.donor-details { display: flex; flex-direction: column; gap: 6px; margin-bottom: 1rem; }
.donor-detail { display: flex; align-items: center; gap: 8px; font-size: 0.83rem; color: var(--text-muted); }
.avail-tag { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 12px; font-size: 0.78rem; font-weight: 600; }
.avail-tag.yes { background: #dcfce7; color: #16a34a; }
.avail-tag.no { background: #f3f4f6; color: #6b7280; }
.loading-state { text-align: center; padding: 3rem; }
.spinner { width: 40px; height: 40px; border: 3px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin 0.8s linear infinite; margin: 0 auto 1rem; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty-state { text-align: center; padding: 3rem; }
.empty-state .icon { font-size: 3rem; margin-bottom: 1rem; }
.empty-state h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.5rem; }
.empty-state p { color: var(--text-muted); font-size: 0.9rem; }

/* ===== EMERGENCY ===== */
.emergency-panel {
  background: linear-gradient(135deg, #fff5f5, #ffe4e4);
  border: 2px solid var(--primary); border-radius: var(--radius);
  padding: 2rem; margin-bottom: 2rem; text-align: center;
}
.emergency-panel h2 { font-size: 1.3rem; font-weight: 800; color: var(--primary); margin-bottom: 0.5rem; }
.emergency-panel p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 1.2rem; }
.sos-btn {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  color: #fff; border: none; padding: 1rem 2.5rem;
  border-radius: 50px; font-size: 1.1rem; font-weight: 800;
  cursor: pointer; transition: var(--transition);
  box-shadow: 0 4px 20px rgba(220,38,38,0.4);
  letter-spacing: 0.5px; display: inline-flex; align-items: center; gap: 10px;
}
.sos-btn:hover { transform: scale(1.04); box-shadow: 0 6px 28px rgba(220,38,38,0.5); }
.sos-btn.active { animation: sos-pulse 1s ease-in-out 3; }
@keyframes sos-pulse {
  0%,100%{transform:scale(1);} 50%{transform:scale(1.06);}
}
.sos-alert {
  background: #fef2f2; border: 1px solid #fca5a5; color: #dc2626;
  padding: 14px 18px; border-radius: 10px; margin-top: 1rem;
  font-size: 0.9rem; font-weight: 600; display: none;
}
.sos-alert.show { display: block; animation: fadeIn 0.3s ease; }

/* ===== TOAST ===== */
.toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; }
.toast {
  background: #1a1a2e; color: #fff;
  padding: 14px 20px; border-radius: 12px;
  font-size: 0.88rem; font-weight: 500;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  display: flex; align-items: center; gap: 10px;
  animation: slideUp 0.3s ease; min-width: 280px; max-width: 360px;
}
.toast.success { border-left: 4px solid #16a34a; }
.toast.error { border-left: 4px solid #dc2626; }
.toast.info { border-left: 4px solid #1d4ed8; }
.toast.warning { border-left: 4px solid #d97706; }
@keyframes slideUp { from{transform:translateY(20px);opacity:0;} to{transform:translateY(0);opacity:1;} }
@keyframes fadeIn { from{opacity:0;} to{opacity:1;} }

/* ===== LEGEND ===== */
.legend-item { display:flex; align-items:center; gap:6px; color:#6b7280; font-weight:600; }
.legend-dot { width:10px; height:10px; border-radius:50%; flex-shrink:0; }

/* ===== FOOTER ===== */
.footer {
  background: var(--text); color: #9ca3af;
  padding: 2rem; text-align: center; font-size: 0.85rem;
}
.footer strong { color: var(--primary); }

/* ===== NAV USER BADGE ===== */
#nav-user {
  display: none;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--primary);
  padding: 0.28rem 0.6rem;
  background: var(--bg-soft);
  border-radius: 8px;
  border: 1px solid var(--border);
  max-width: 120px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  flex-shrink: 0;
  cursor: default;
}

/* ===== NAV UTILITY BUTTONS (Lang / Dark / QR) ===== */
#lang-toggle, #dark-toggle {
  background: none;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 5px 10px;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text-muted);
  font-family: var(--font);
  transition: var(--transition);
  white-space: nowrap;
  flex-shrink: 0;
}
#lang-toggle:hover, #dark-toggle:hover {
  background: var(--bg-soft);
  border-color: var(--primary);
  color: var(--primary);
}
.nav-qr-btn {
  background: none;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 5px 10px;
  cursor: pointer;
  font-size: 1rem;
  color: var(--text-muted);
  font-family: var(--font);
  transition: var(--transition);
  flex-shrink: 0;
}
.nav-qr-btn:hover { background: var(--bg-soft); border-color: var(--primary); }
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  cursor: pointer;
  padding: 8px;
  border-radius: 10px;
  width: 44px;
  height: 44px;
  position: relative;
  z-index: 10010;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  transition: background 0.15s, border-color 0.15s;
}
.nav-toggle:hover,
.nav-toggle:active { background: var(--bg-soft); border-color: var(--primary); }
.nav-toggle:hover { background: var(--bg-soft); }
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.22s ease, opacity 0.22s ease;
  pointer-events: none;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== PROFILE AVAIL TOGGLE CARD ===== */
#avail-toggle-card[style*="display:flex"],
#avail-toggle-card[style*="display: flex"] {
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

/* ===== MOBILE SCROLL FIX ===== */
@media (max-width: 768px) {
  .form-page {
    min-height: unset;
    padding-top: 1.5rem;
    padding-bottom: 2rem;
  }
  .search-page {
    min-height: unset;
  }
  /* Prevent horizontal overflow on all pages */
  .hero-content, .features-grid, .cta-inner {
    overflow-x: hidden;
  }
}
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 9998;
  display: none;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}
.drawer-overlay.open {
  display: block;
  opacity: 1;
  pointer-events: all;
}

/* ===== RESPONSIVE ===== */


/* ===== RESPONSIVE 768px ===== */
@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .navbar {
    padding: 0 1rem;
    height: 56px;
    justify-content: space-between;
    gap: 0;
  }

  /* Hide desktop nav completely */
  .navbar > .nav-links { display: none !important; }
  .navbar > .nav-util-row { display: none !important; }
  .nav-brand { font-size: 1.05rem; margin-right: 0; }
  .nav-brand .drop-icon { font-size: 1.1rem; }

  /* ── MOBILE DRAWER ── */
  #blp-drawer {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 82vw;
    max-width: 300px;
    background: #fff;
    z-index: 99999;
    box-shadow: -4px 0 24px rgba(0,0,0,0.25);
    overflow-y: auto;
    overflow-x: hidden;
    transform: translateX(105%);
    transition: transform 0.28s ease;
    pointer-events: none;
  }
  #blp-drawer.blp-open {
    transform: translateX(0);
    pointer-events: all;
  }

  /* Drawer header */
  #blp-drawer .blp-drawer-head {
    display: flex;
    align-items: center;
    padding: 0 1.2rem;
    height: 56px;
    min-height: 56px;
    background: linear-gradient(135deg, #e63946, #c1121f);
    color: #fff;
    font-size: 1rem;
    font-weight: 800;
    flex-shrink: 0;
  }
  #blp-drawer .blp-drawer-head .blp-close {
    margin-left: auto;
    background: rgba(255,255,255,0.2);
    border: none;
    color: #fff;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* ALL links and buttons in drawer */
  #blp-drawer a,
  #blp-drawer button:not(.blp-close) {
    display: flex !important;
    align-items: center;
    width: 100%;
    padding: 0.9rem 1.3rem;
    font-size: 0.95rem;
    font-weight: 500;
    color: #1a1a2e;
    background: transparent;
    border: none;
    border-bottom: 1px solid #f0d0d0;
    text-decoration: none;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
    min-height: 52px;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
  }
  #blp-drawer a:active,
  #blp-drawer a.active {
    background: #fff5f5;
    color: #e63946;
  }
  #blp-drawer .blp-drawer-user {
    display: flex !important;
    align-items: center;
    padding: 0.7rem 1.3rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: #e63946;
    background: #fff5f5;
    border-bottom: 1px solid #f0d0d0;
    min-height: 44px;
  }
  #blp-drawer .blp-drawer-utils {
    display: flex;
    padding: 1rem 1.2rem;
    gap: 8px;
    margin-top: auto;
    border-top: 1px solid #f0d0d0;
    flex-shrink: 0;
  }
  #blp-drawer .blp-drawer-utils button {
    flex: 1;
    padding: 0.5rem;
    border-radius: 8px;
    background: #fff5f5;
    border: 1.5px solid #f0d0d0 !important;
    font-size: 0.88rem;
    font-weight: 700;
    color: #6b7280;
    cursor: pointer;
    justify-content: center;
    min-height: unset;
  }

  /* Overlay */
  #blp-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 99998;
  }
  #blp-overlay.blp-open { display: block; }

  /* Active page highlight in drawer */
  #blp-drawer a.active {
    background: #fff5f5;
    color: #e63946 !important;
    border-left: 3px solid #e63946;
    font-weight: 700;
  }
  body.dark-mode #blp-drawer a.active {
    background: #1e293b;
    color: #f87171 !important;
    border-left-color: #f87171;
  }

  /* Dark mode drawer */
  body.dark-mode #blp-drawer { background: #0f172a; }
  body.dark-mode #blp-drawer a,
  body.dark-mode #blp-drawer button:not(.blp-close) { color: #e2e8f0; border-bottom-color: #334155; }
  body.dark-mode #blp-drawer .blp-drawer-user { background: #1e293b; color: #f87171; border-bottom-color: #334155; }
  body.dark-mode #blp-drawer .blp-drawer-utils { border-top-color: #334155; }
  body.dark-mode #blp-drawer .blp-drawer-utils button { background: #1e293b; border-color: #334155 !important; color: #94a3b8; }

  /* Hero */
  .hero { padding: 2rem 1rem; overflow: hidden; }
  .hero-content { grid-template-columns: 1fr; gap: 1.5rem; text-align: center; }
  .hero h1 { font-size: 2rem; }
  .hero p { font-size: 0.95rem; }
  .hero-visual { display: none; }
  .hero-actions { justify-content: center; }
  .hero-stats { justify-content: center; gap: 1.5rem; }

  /* Sections */
  .section { padding: 2rem 1rem; }
  .section-title { font-size: 1.6rem; }
  .container { padding: 0 0.5rem; }
  .btn-lg { padding: 0.65rem 1.4rem; font-size: 0.92rem; }

  /* Search */
  .search-filters { grid-template-columns: 1fr; }
  .search-page { padding: 0.8rem; min-height: unset; }
  .search-hero { padding: 1.2rem 1rem; border-radius: 12px; }
  .search-hero h1 { font-size: 1.4rem; }

  /* Forms */
  .form-row { grid-template-columns: 1fr; }
  .form-page { padding: 0.8rem; align-items: flex-start; padding-top: 1.2rem; min-height: unset; }
  .form-card { padding: 1.4rem 1.2rem; }

  /* Dashboard */
  .dash-grid { grid-template-columns: 1fr; }
  .dash-body { padding: 0.8rem; }
  .dash-header { padding: 1rem; flex-direction: column; align-items: flex-start; gap: 0.5rem; }

  /* Banks */
  .banks-grid { grid-template-columns: 1fr; }
}

/* ===== RESPONSIVE 480px ===== */
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .results-grid { grid-template-columns: 1fr; }
  .banks-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.7rem; }
  .hero p { font-size: 0.88rem; margin-bottom: 1.2rem; }
  .how-grid { grid-template-columns: 1fr; }
  .hero-stats { flex-wrap: wrap; gap: 1rem; }
  .hero-stat .num { font-size: 1.5rem; }
  .toast { min-width: unset; max-width: 90vw; font-size: 0.82rem; }
  .toast-container { right: 5vw; left: 5vw; bottom: 16px; }
  .btn-lg { padding: 0.6rem 1.2rem; font-size: 0.9rem; }
  .section { padding: 1.5rem 0.8rem; }
  .section-title { font-size: 1.3rem; }
  .form-card { padding: 1.2rem 1rem; }
  .search-hero h1 { font-size: 1.2rem; }
  .dash-header h1 { font-size: 1.2rem; }
  .hero { padding: 1.5rem 1rem; }
  .section-center { padding: 0; }
  .compat-table th, .compat-table td { padding: 8px 10px; font-size: 0.78rem; }
  .donor-card { padding: 1.1rem; }
  .stat-card { padding: 1rem; }
  .stat-icon { width: 42px; height: 42px; font-size: 1.2rem; }
  .stat-info .num { font-size: 1.5rem; }
  /* Dashboard header buttons wrap */
  .dash-header > div:last-child { width: 100%; display: flex; gap: 0.5rem; flex-wrap: wrap; }
  .dash-header > div:last-child .btn { flex: 1; justify-content: center; min-width: 120px; }
}


/* ===== HERO ENHANCEMENTS ===== */
.hero { padding: 4rem 2rem 3.5rem; }
.hero-text { max-width: 560px; }
.hero h1 { font-size: 3.4rem; font-weight: 900; line-height: 1.08; margin-bottom: 1.2rem; letter-spacing: -2px; }
.hero-trust { display: flex; gap: 1.2rem; flex-wrap: wrap; margin: 1.2rem 0 2rem; }
.trust-item { font-size: 0.82rem; font-weight: 600; color: var(--text-muted); display: flex; align-items: center; gap: 4px; }

.hero-card-float {
  background: #fff; border-radius: 20px;
  padding: 1.5rem; box-shadow: 0 12px 48px rgba(230,57,70,0.14);
  border: 1.5px solid var(--border); width: 100%; max-width: 340px;
}
.hcf-top { display: flex; align-items: center; gap: 12px; }
.hcf-drop { font-size: 2rem; width: 48px; height: 48px; background: #fff5f5; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }

.hero-notif {
  display: flex; align-items: center; gap: 10px;
  background: #fff; border-radius: 12px; padding: 10px 14px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1); border: 1px solid #f0f0f0;
  margin-top: 1rem; width: 100%; max-width: 340px;
  animation: notif-slide 0.5s ease 1s both;
}
@keyframes notif-slide { from{opacity:0;transform:translateY(10px);} to{opacity:1;transform:translateY(0);} }

/* ===== STATS BAR ===== */
.stats-bar-section {
  background: #1a1a2e; padding: 1.2rem 2rem;
}
.stats-bar-inner {
  max-width: 900px; margin: 0 auto;
  display: flex; align-items: center; justify-content: center; gap: 0; flex-wrap: wrap;
}
.sbs-item { display: flex; flex-direction: column; align-items: center; padding: 0.5rem 2.5rem; }
.sbs-num { font-size: 1.6rem; font-weight: 900; color: #e63946; line-height: 1; }
.sbs-lbl { font-size: 0.7rem; color: rgba(255,255,255,0.5); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; margin-top: 3px; }
.sbs-div { width: 1px; height: 40px; background: rgba(255,255,255,0.1); }

/* ===== SECTION LABEL ===== */
.section-label {
  display: inline-block; font-size: 0.72rem; font-weight: 800;
  letter-spacing: 2px; text-transform: uppercase; color: var(--primary);
  background: rgba(230,57,70,0.08); padding: 4px 14px; border-radius: 20px;
  margin-bottom: 0.8rem;
}

/* ===== HOW IT WORKS ENHANCED ===== */
.how-step {
  font-size: 0.65rem; font-weight: 900; letter-spacing: 1px;
  color: var(--primary); background: rgba(230,57,70,0.08);
  padding: 3px 10px; border-radius: 20px; display: inline-block;
  margin-bottom: 0.8rem;
}

/* ===== FEATURES SECTION ===== */
.features-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center;
}
.feature-list { display: flex; flex-direction: column; gap: 1rem; }
.feature-item { display: flex; align-items: flex-start; gap: 12px; }
.fi-icon {
  width: 40px; height: 40px; border-radius: 10px; background: #fff5f5;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; flex-shrink: 0; margin-top: 2px;
}
.feature-item strong { font-size: 0.9rem; font-weight: 700; display: block; margin-bottom: 2px; }
.feature-item p { font-size: 0.8rem; color: var(--text-muted); margin: 0; line-height: 1.5; }

.features-visual { display: flex; justify-content: center; }
.fv-card {
  background: #fff; border-radius: 20px; padding: 1.5rem;
  box-shadow: 0 12px 48px rgba(230,57,70,0.12);
  border: 1.5px solid var(--border); width: 100%; max-width: 320px;
}

/* ===== CTA SECTION ===== */
.cta-section {
  background: linear-gradient(135deg, #e63946, #c1121f);
  padding: 4rem 2rem;
}
.cta-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 2rem; flex-wrap: wrap;
}
.cta-inner h2 { font-size: 1.8rem; font-weight: 900; color: #fff; margin-bottom: 0.5rem; }
.cta-inner p { color: rgba(255,255,255,0.8); font-size: 0.95rem; max-width: 420px; }
.cta-btns { display: flex; gap: 1rem; flex-wrap: wrap; flex-shrink: 0; }

/* ===== FOOTER ENHANCED ===== */
.footer { background: #0f172a; padding: 0; }
.footer-inner {
  max-width: 1100px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 2fr;
  gap: 3rem; padding: 3rem 2rem 2rem;
}
.footer-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.fl-col { display: flex; flex-direction: column; gap: 0.6rem; }
.fl-head { font-size: 0.75rem; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; color: #fff; margin-bottom: 0.4rem; }
.fl-col a { font-size: 0.82rem; color: #6b7280; text-decoration: none; transition: 0.2s; }
.fl-col a:hover { color: #e63946; }
.footer-bottom {
  border-top: 1px solid #1e293b; padding: 1.2rem 2rem;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 0.5rem; font-size: 0.82rem; color: #4b5563;
  max-width: 1100px; margin: 0 auto;
}

/* ===== RESPONSIVE ADDITIONS ===== */
@media (max-width: 900px) {
  .features-grid { grid-template-columns: 1fr; gap: 2rem; }
  .features-visual { display: none; }
  .footer-inner { grid-template-columns: 1fr; gap: 2rem; }
  .footer-links { grid-template-columns: repeat(2, 1fr); }
  .cta-inner { flex-direction: column; text-align: center; }
  .cta-btns { justify-content: center; }
}
@media (max-width: 768px) {
  .hero h1 { font-size: 2.2rem; letter-spacing: -1px; }
  .hero-card-float, .hero-notif { display: none; }
  .stats-bar-inner { gap: 0; }
  .sbs-item { padding: 0.5rem 1.2rem; }
  .footer-links { grid-template-columns: 1fr 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
}
@media (max-width: 480px) {
  .hero h1 { font-size: 1.8rem; }
  .hero-trust { gap: 0.8rem; }
  .sbs-div { display: none; }
  .stats-bar-inner { justify-content: space-around; }
  .footer-links { grid-template-columns: 1fr; }
}

/* ===== DONOR CTA BUTTONS ===== */
.donor-cta-call {
  flex:1; display:flex; align-items:center; justify-content:center; gap:6px;
  background:#e63946; color:#fff; border-radius:8px; padding:8px;
  font-size:0.82rem; font-weight:700; text-decoration:none; transition:0.18s;
}
.donor-cta-call:hover { background:#c1121f; }
.donor-cta-wa {
  flex:1; display:flex; align-items:center; justify-content:center; gap:6px;
  background:#25d366; color:#fff; border-radius:8px; padding:8px;
  font-size:0.82rem; font-weight:700; text-decoration:none; transition:0.18s;
}
.donor-cta-wa:hover { background:#128c7e; }

/* ===== MODAL MOBILE FIX ===== */
@media (max-width: 480px) {
  .modal-box { max-width: 90vw; padding: 1.2rem; }
}

/* ===== DARK MODE ===== */
body.dark-mode {
  --bg: #0f172a;
  --bg-soft: #1e293b;
  --bg-card: #1e293b;
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --border: #334155;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-hover: 0 8px 32px rgba(0,0,0,0.5);
}
body.dark-mode .navbar {
  background: rgba(15,23,42,0.97);
  border-bottom-color: #334155;
}
body.dark-mode .form-card,
body.dark-mode .dash-card,
body.dark-mode .stat-card,
body.dark-mode .donor-card,
body.dark-mode .bank-card,
body.dark-mode .how-card,
body.dark-mode .fv-card {
  background: #1e293b;
  border-color: #334155;
  color: #f1f5f9;
}
body.dark-mode input,
body.dark-mode select,
body.dark-mode textarea {
  background: #0f172a;
  border-color: #334155;
  color: #f1f5f9;
}
body.dark-mode input::placeholder { color: #64748b; }
body.dark-mode .hero { background: linear-gradient(135deg,#0f172a 0%,#1e293b 100%); }
body.dark-mode .footer { background: #020617; }
body.dark-mode .search-box,
body.dark-mode .search-page { background: #0f172a; }
body.dark-mode .dashboard { background: #0f172a; }
body.dark-mode .dash-body { background: #0f172a; }
body.dark-mode .recent-list { background: #1e293b; }
body.dark-mode .empty-state { background: #1e293b; color: #94a3b8; }
body.dark-mode .form-page { background: #0f172a; }
body.dark-mode .nav-links a { color: #94a3b8; }
body.dark-mode .nav-links a:hover,
body.dark-mode .nav-links a.active { background: #1e293b; color: #e63946; }
body.dark-mode .blood-badge { background: #7f1d1d; color: #fca5a5; }
body.dark-mode .avail-tag.yes { background: #14532d; color: #86efac; }
body.dark-mode .avail-tag.no  { background: #1e293b; color: #64748b; }
body.dark-mode .stats-bar-section { background: #1e293b; }
/* Only apply dark bg to plain sections, not emergency/cta panels */
body.dark-mode .section:not(.cta-section):not([style*="background:#fff5f5"]):not([style*="background:linear-gradient"]) { background: #0f172a; }
body.dark-mode .emergency-panel { background: linear-gradient(135deg,#1a0a0a,#2d0f0f); border-color: #7f1d1d; }
body.dark-mode .cta-section { background: linear-gradient(135deg,#7f1d1d,#991b1b); }

body.dark-mode #nav-user {
  background: #1e293b;
  border-color: #334155;
  color: #f87171;
}

/* ===== DARK MODE NAV LINKS MOBILE ===== */
@media (max-width: 768px) {
  body.dark-mode .nav-links.mobile-drawer {
    background: #0f172a !important;
  }
  body.dark-mode .nav-links.mobile-drawer a,
  body.dark-mode .nav-links.mobile-drawer button:not(.close-btn),
  body.dark-mode .nav-links.mobile-drawer span#nav-user {
    color: #e2e8f0 !important;
    border-bottom-color: #334155 !important;
    background: transparent !important;
  }
  body.dark-mode .nav-links.mobile-drawer a:hover,
  body.dark-mode .nav-links.mobile-drawer a.active {
    background: #1e293b !important;
    color: #f87171 !important;
  }
  body.dark-mode .nav-links.mobile-drawer span#nav-user {
    background: #1e293b !important;
    color: #f87171 !important;
  }
  body.dark-mode .nav-links.mobile-drawer .nav-util-row {
    background: #0f172a !important;
    border-top-color: #334155 !important;
  }
  body.dark-mode .nav-links.mobile-drawer .nav-util-row button {
    background: #1e293b !important;
    border-color: #334155 !important;
    color: #94a3b8 !important;
  }
}
body.dark-mode .nav-drawer-header {
  background: linear-gradient(135deg, #7f1d1d, #991b1b);
}
body.dark-mode .nav-util-row button {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #94a3b8 !important;
}


/* ===== NAV UTILITY ROW (inside nav-links — desktop shows inline, mobile shows in drawer) ===== */
.nav-util-row {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
/* On mobile, nav-util-row is inside the drawer (nav-links.mobile-drawer) — already visible */
@media (max-width: 768px) {
  /* Hide the standalone nav-util-row if it's still outside (fallback) */
  .navbar > .nav-util-row {
    display: none !important;
  }
}
.nav-util-row button {
  background: none;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 5px 10px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  font-family: var(--font);
  transition: var(--transition);
  white-space: nowrap;
}
.nav-util-row button:hover {
  background: var(--bg-soft);
  border-color: var(--primary);
  color: var(--primary);
}

/* ===== QR MODAL ===== */
#qr-modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.6);
  z-index: 9999; display: none; align-items: center; justify-content: center;
}
#qr-modal-overlay.open { display: flex; }
#qr-modal-box {
  background: var(--bg-card);
  border-radius: 20px; padding: 2rem; text-align: center;
  max-width: 320px; width: 90%;
  box-shadow: 0 16px 60px rgba(0,0,0,0.3);
}
#qr-modal-box h3 { font-size: 1.1rem; font-weight: 800; margin-bottom: 0.5rem; color: var(--text); }
#qr-modal-box p  { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 1rem; }
#qr-canvas { border-radius: 12px; border: 3px solid var(--border); }

/* ===== DARK MODE ADDITIONAL FIXES ===== */
body.dark-mode .tx-item {
  background: #1e293b;
  border-color: #334155;
}
body.dark-mode .modal-box {
  background: #1e293b;
  color: #f1f5f9;
}
body.dark-mode .blood-unit-card {
  background: #1e293b;
  border-color: #334155;
}
body.dark-mode .profit-card {
  background: linear-gradient(135deg, #0f172a, #1e293b);
}
body.dark-mode .pricing-hero {
  background: linear-gradient(135deg, #7f1d1d, #991b1b);
}
body.dark-mode .bank-card h3 { color: #f87171; }
body.dark-mode .form-group label { color: #e2e8f0; }
body.dark-mode .role-tab { background: #1e293b; color: #94a3b8; border-color: #334155; }
body.dark-mode .role-tab.active { background: #e63946; color: #fff; }
body.dark-mode .city-tab { background: #1e293b; color: #94a3b8; border-color: #334155; }
body.dark-mode .city-tab.active, body.dark-mode .city-tab:hover { background: #e63946; color: #fff; border-color: #e63946; }
body.dark-mode #map, body.dark-mode #donor-map { filter: brightness(0.85) saturate(0.9); }

/* ===== PRINT STYLES ===== */
@media print {
  .navbar, .emergency-ticker, .nav-toggle, .sos-btn, footer { display: none !important; }
  body { background: #fff !important; color: #000 !important; }
}

/* ===== FOCUS ACCESSIBILITY ===== */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* ===== SMOOTH SCROLL OFFSET FOR STICKY NAV ===== */
html { scroll-padding-top: 70px; }

/* ===== SKELETON LOADING ANIMATIONS ===== */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s infinite;
  border-radius: 6px;
}
@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
body.dark-mode .skeleton {
  background: linear-gradient(90deg, #1e293b 25%, #334155 50%, #1e293b 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s infinite;
}

/* Skeleton donor card */
.skeleton-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
body.dark-mode .skeleton-card { background: #1e293b; border-color: #334155; }

.skeleton-avatar { width: 48px; height: 48px; border-radius: 50%; }
.skeleton-line { height: 14px; margin-bottom: 8px; }
.skeleton-line.short { width: 40%; }
.skeleton-line.medium { width: 65%; }
.skeleton-line.long { width: 90%; }
.skeleton-btn { height: 36px; border-radius: 8px; margin-top: 12px; }

/* ===== LEGAL PAGES DARK MODE ===== */
body.dark-mode .legal-toc { background: #1e293b; border-color: #334155; }
body.dark-mode .legal-highlight { background: #1a0a0a; border-left-color: #e63946; color: #f1f5f9; }
body.dark-mode .legal-highlight.warning { background: #1c1500; border-left-color: #f59e0b; }
body.dark-mode .legal-updated { background: #0f2a1a; border-color: #166534; color: #86efac; }
body.dark-mode .legal-section h2 { color: #f87171; border-bottom-color: #334155; }
body.dark-mode .legal-section p,
body.dark-mode .legal-section li { color: #94a3b8; }
body.dark-mode .legal-section strong { color: #f1f5f9; }
body.dark-mode .legal-hero { background: linear-gradient(135deg, #0f172a, #1e1b4b); }
