/* ═══════════════════════════════════════════
   TenderMap — Design System v2
   Primary: #1a237e (Indigo 900)  Accent: #ff6b35
   ═══════════════════════════════════════════ */

:root {
  --p-dark:  #1a237e;
  --p-mid:   #283593;
  --p-light: #3949ab;
  --p-pale:  #e8eaf6;
  --p-tint:  #f0f2fc;
  --accent:  #ff6b35;
  --acc-h:   #e85c28;
  --text-h:  #1a237e;
  --text-b:  #263238;
  --text-s:  #546e7a;
  --text-m:  #90a4ae;
  --bg:      #f0f2fa;
  --white:   #ffffff;
  --border:  #e3e8f4;
  --sh-xs:   0 1px 4px rgba(26,35,126,.06);
  --sh-sm:   0 2px 12px rgba(26,35,126,.09);
  --sh-md:   0 4px 24px rgba(26,35,126,.14);
  --sh-lg:   0 8px 40px rgba(26,35,126,.22);
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 18px;
  --r-xl: 22px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, Arial, sans-serif;
  background: var(--bg);
  color: var(--text-b);
  font-size: 14px;
  min-height: 100vh;
  line-height: 1.5;
}

/* ══════════════════════════════
   HEADER
   ══════════════════════════════ */
.header {
  background: linear-gradient(135deg, #12195e 0%, var(--p-dark) 40%, var(--p-mid) 75%, var(--p-light) 100%);
  color: #fff;
  padding: 0 28px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 4px 24px rgba(18,25,94,.45);
  position: sticky;
  top: 0;
  z-index: 300;
}

.header-left  { display: flex; align-items: center; }
.header-right { display: flex; align-items: center; gap: 14px; }
.header-center { display: flex; gap: 32px; }

/* ── LOGO ── */
.logo {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: #fff;
}

.logo-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 3px 14px rgba(255,107,53,.55), inset 0 1px 0 rgba(255,255,255,.25);
}

.logo-name {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -.4px;
  line-height: 1;
}

.logo-sub {
  font-size: 11px;
  opacity: .5;
  margin-top: 3px;
  letter-spacing: .2px;
}

/* ── NAV ── */
.nav { display: flex; gap: 2px; margin-left: 28px; }

.nav-link {
  padding: 7px 15px;
  border-radius: 9px;
  text-decoration: none;
  color: rgba(255,255,255,.6);
  font-size: 13px;
  font-weight: 600;
  transition: background .15s, color .15s;
  white-space: nowrap;
}
.nav-link:hover  { background: rgba(255,255,255,.12); color: #fff; }
.nav-link.active {
  background: rgba(255,255,255,.2);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.18);
}

/* Header stats */
.hstat { text-align: center; }
.hstat-num { font-size: 20px; font-weight: 800; color: #90caf9; line-height: 1; }
.hstat-lbl { font-size: 11px; opacity: .55; margin-top: 2px; }

/* ── BUTTONS ── */
.btn-accent {
  padding: 9px 20px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 9px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  transition: background .15s, box-shadow .15s, transform .1s;
  white-space: nowrap;
  box-shadow: 0 2px 10px rgba(255,107,53,.45);
}
.btn-accent:hover    { background: var(--acc-h); box-shadow: 0 5px 18px rgba(255,107,53,.5); transform: translateY(-1px); }
.btn-accent:disabled { background: #9e9e9e; box-shadow: none; transform: none; cursor: default; }

.btn-primary {
  padding: 9px 20px;
  background: linear-gradient(135deg, var(--p-mid), var(--p-light));
  color: #fff;
  border: none;
  border-radius: 9px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  transition: opacity .15s, transform .1s, box-shadow .15s;
  white-space: nowrap;
  box-shadow: 0 2px 10px rgba(40,53,147,.38);
}
.btn-primary:hover { opacity: .9; transform: translateY(-1px); box-shadow: 0 5px 18px rgba(40,53,147,.44); }

/* ── FETCH BANNER ── */
.fetch-banner {
  background: #fffde7;
  border-bottom: 2px solid #ffe082;
  padding: 10px 28px;
  font-size: 13px;
  color: #7d5a00;
  display: none;
  align-items: center;
  gap: 10px;
}
.fetch-banner.show { display: flex; }
.spin {
  width: 14px; height: 14px;
  border: 2px solid #ffe082;
  border-top-color: #f59e0b;
  border-radius: 50%;
  animation: spin .8s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── PAGE ── */
.page { max-width: 1480px; margin: 0 auto; padding: 24px 20px 56px; }

/* ══════════════════════════════
   CARD (generic)
   ══════════════════════════════ */
.card {
  background: var(--white);
  border-radius: var(--r-lg);
  padding: 22px 24px;
  box-shadow: var(--sh-sm);
  border: 1px solid var(--border);
}
.card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--p-dark);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 7px;
}
.card-title svg { flex-shrink: 0; stroke: var(--p-light); }
.card-title span { font-size: 17px; }

/* ══════════════════════════════
   STAT CARDS
   ══════════════════════════════ */
.stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}
.stat-card {
  background: var(--white);
  border-radius: var(--r-md);
  padding: 20px;
  box-shadow: var(--sh-sm);
  border: 1px solid var(--border);
  border-left: 4px solid transparent;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: box-shadow .22s, transform .16s;
  cursor: pointer;
}
.stat-card { cursor: pointer; }
.stat-card:hover { opacity: .92; transform: translateY(-3px) scale(1.01); }
/* Gradient colored stat cards */
.stat-card.c-all {
  background: linear-gradient(135deg, #1a237e 0%, #3949ab 100%);
  border: none;
  box-shadow: 0 4px 20px rgba(26,35,126,.35);
}
.stat-card.c-et {
  background: linear-gradient(135deg, #1b5e20 0%, #388e3c 100%);
  border: none;
  box-shadow: 0 4px 20px rgba(27,94,32,.32);
}
.stat-card.c-xr {
  background: linear-gradient(135deg, #0d47a1 0%, #1976d2 100%);
  border: none;
  box-shadow: 0 4px 20px rgba(13,71,161,.32);
}
.stat-card.c-xt {
  background: linear-gradient(135deg, #bf360c 0%, #e64a19 100%);
  border: none;
  box-shadow: 0 4px 20px rgba(191,54,12,.32);
}

.stat-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: rgba(255,255,255,.18);
  color: white;
}
.stat-icon svg { display: block; }

.stat-num { font-size: 30px; font-weight: 800; line-height: 1; color: white; }
.stat-lbl { font-size: 12px; color: rgba(255,255,255,.72); margin-top: 4px; }
.stat-sub { font-size: 11px; color: rgba(255,255,255,.5); margin-top: 2px; }

/* ── CHARTS ROW ── */
.charts-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1.4fr;
  gap: 16px;
  margin-bottom: 20px;
}
.chart-wrap {
  position: relative; height: 200px;
  display: flex; align-items: center; justify-content: center;
}
.donut-center { position: absolute; text-align: center; pointer-events: none; }
.donut-num { font-size: 22px; font-weight: 800; color: var(--p-dark); }
.donut-lbl { font-size: 11px; color: var(--text-m); }

/* ── BOTTOM ROW ── */
.bottom-row { display: grid; grid-template-columns: 1fr 1.8fr; gap: 16px; }

.link-more { font-size: 12px; color: var(--p-mid); text-decoration: none; font-weight: 600; }
.link-more:hover { text-decoration: underline; }

/* ── MINI FILTER BAR ── */
.filter-bar-mini {
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
  padding: 12px 0; margin-bottom: 12px;
  border-top: 1px solid #eff1f8;
  border-bottom: 1px solid #eff1f8;
}

/* ── INPUTS ── */
.finput {
  flex: 1; min-width: 200px;
  padding: 9px 13px;
  border: 1.5px solid var(--border);
  border-radius: 9px;
  font-size: 13px;
  outline: none;
  color: var(--text-b);
  font-family: inherit;
  background: #fafbff;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.finput:focus {
  border-color: var(--p-light);
  box-shadow: 0 0 0 3px rgba(57,73,171,.12);
  background: #fff;
}
.fselect {
  padding: 9px 11px;
  border: 1.5px solid var(--border);
  border-radius: 9px;
  font-size: 12px;
  background: #fafbff;
  outline: none;
  color: var(--text-b);
  cursor: pointer;
  font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.fselect:focus {
  border-color: var(--p-light);
  box-shadow: 0 0 0 3px rgba(57,73,171,.12);
  background: #fff;
}

/* ── TENDER ROW (dashboard mini list) ── */
.tender-list { display: flex; flex-direction: column; gap: 0; }
.t-row {
  display: grid; grid-template-columns: 1fr auto; gap: 10px;
  align-items: center; padding: 11px 8px;
  border-bottom: 1px solid #f2f4fb;
  cursor: pointer; border-radius: 9px;
  transition: background .12s;
  text-decoration: none; color: inherit;
}
.t-row:last-child { border-bottom: none; }
.t-row:hover { background: var(--p-tint); }
.t-name {
  font-size: 13px; font-weight: 600; color: var(--p-dark); line-height: 1.35;
  margin-bottom: 4px; overflow: hidden; text-overflow: ellipsis;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.t-meta { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.t-row-right { text-align: right; flex-shrink: 0; }
.t-price { font-size: 13px; font-weight: 700; color: var(--p-dark); white-space: nowrap; margin-bottom: 4px; }

/* ── PLATFORM BADGES ── */
.plat-badge {
  font-size: 10px; padding: 2px 8px; border-radius: 20px;
  font-weight: 700; white-space: nowrap; display: inline-block;
}
.plat-badge.etender { background: #e8f5e9; color: #2e7d32; }
.plat-badge.xarid   { background: var(--p-pale); color: var(--p-mid); }
.plat-badge.xt      { background: #fbe9e7; color: #bf360c; }

.cat-tag { font-size: 11px; color: var(--text-s); white-space: nowrap; }
.loc-tag { font-size: 11px; color: var(--text-m); white-space: nowrap; }

/* ── DAYS CHIPS ── */
.days-chip, .days-big {
  font-size: 11px; padding: 3px 9px; border-radius: 20px;
  font-weight: 700; white-space: nowrap; display: inline-block;
}
.days-big { font-size: 14px; padding: 6px 14px; }
.c-urgent { background: #ffebee; color: #c62828; }
.c-warn   { background: #fff8e1; color: #f57f17; }
.c-ok     { background: #e8f5e9; color: #2e7d32; }
.c-none   { background: #f5f5f5; color: #9e9e9e; }

/* ── PAGINATION ── */
.pg-wrap { display: flex; gap: 5px; justify-content: center; margin-top: 18px; flex-wrap: wrap; }
.pg-btn {
  padding: 6px 12px; border: 1.5px solid var(--border);
  border-radius: 8px; background: var(--white); color: var(--text-s);
  cursor: pointer; font-size: 12px; transition: all .12s;
}
.pg-btn:hover:not(:disabled) { border-color: var(--p-mid); color: var(--p-mid); background: var(--p-pale); }
.pg-btn-active { background: var(--p-mid) !important; color: #fff !important; border-color: var(--p-mid) !important; }
.pg-btn-dis { opacity: .35; cursor: default; }
.pg-dots { padding: 0 4px; color: var(--text-m); font-size: 12px; line-height: 2; }

/* ── LOADING ── */
.loading-msg { text-align: center; padding: 48px; color: var(--text-m); }
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
  background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: 8px;
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ══════════════════════════════
   MODAL
   ══════════════════════════════ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(10,20,50,.6);
  z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 20px; opacity: 0; pointer-events: none;
  transition: opacity .2s;
  backdrop-filter: blur(3px);
}
.modal-overlay.show { opacity: 1; pointer-events: all; }

.modal-box {
  background: var(--white);
  border-radius: var(--r-xl);
  width: 100%; max-width: 580px; max-height: 90vh;
  overflow-y: auto; position: relative;
  box-shadow: var(--sh-lg);
  animation: modalUp .22s cubic-bezier(.34,.87,.46,1);
}
@keyframes modalUp {
  from { transform: translateY(30px) scale(.96); opacity: 0; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}
.modal-close {
  position: absolute; top: 14px; right: 14px;
  width: 32px; height: 32px; border-radius: 50%; border: none;
  background: #f0f2f5; color: #666; font-size: 14px; cursor: pointer;
  transition: background .15s;
  display: flex; align-items: center; justify-content: center; z-index: 1;
}
.modal-close:hover { background: #e2e6ea; color: #333; }

.modal-header { padding: 24px 24px 0; }
.modal-title { font-size: 18px; font-weight: 700; color: var(--p-dark); line-height: 1.4; margin-top: 4px; }

.modal-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 18px 24px; }
.modal-stat-box {
  background: var(--p-tint);
  border-radius: var(--r-sm); padding: 16px;
  border: 1px solid var(--p-pale);
}
.msb-lbl  { font-size: 11px; color: var(--text-m); font-weight: 600; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 8px; }
.msb-num  { font-size: 22px; font-weight: 800; color: var(--p-dark); line-height: 1; }
.msb-unit { font-size: 12px; color: var(--text-m); margin-top: 4px; }

.modal-meta { padding: 0 24px 16px; display: flex; flex-direction: column; gap: 10px; }
.mm-row { display: flex; align-items: flex-start; gap: 10px; }
.mm-icon { font-size: 15px; width: 22px; flex-shrink: 0; }
.mm-lbl  { font-size: 12px; color: var(--text-m); width: 80px; flex-shrink: 0; padding-top: 1px; }
.mm-val  { font-size: 13px; color: var(--text-b); font-weight: 500; }

.modal-footer { padding: 16px 24px 24px; border-top: 1px solid var(--border); display:flex; gap:10px; flex-wrap:wrap; }
.btn-modal-link {
  flex:1; min-width:160px; padding: 13px 18px;
  background: linear-gradient(135deg, var(--p-dark), var(--p-light));
  color: #fff; text-align: center; text-decoration: none;
  border-radius: var(--r-sm); font-size: 14px; font-weight: 700;
  transition: opacity .15s, transform .1s, box-shadow .15s;
  box-shadow: 0 4px 16px rgba(26,35,126,.32);
  display:inline-flex; align-items:center; justify-content:center; gap:6px;
}
.btn-modal-link:hover { opacity: .9; transform: translateY(-1px); box-shadow: 0 7px 22px rgba(26,35,126,.42); }
.btn-modal-save {
  padding: 13px 16px; background:#f5f5f5; color:#333;
  border:none; border-radius:var(--r-sm); font-size:13px; font-weight:600;
  cursor:pointer; transition:background .15s; white-space:nowrap;
  display:inline-flex; align-items:center; gap:5px;
}
.btn-modal-save:hover { background:#ebebeb; }
.btn-modal-save.saved { background:#fff3e0; color:#e65100; }
.btn-modal-copy {
  padding: 13px 14px; background:#f5f5f5; color:#555;
  border:none; border-radius:var(--r-sm); font-size:16px;
  cursor:pointer; transition:background .15s;
}
.btn-modal-copy:hover { background:#ebebeb; }
.refresh-status { display:flex; align-items:center; gap:8px; }
.live-dot {
  width:9px; height:9px; border-radius:50%; background:#4caf50;
  flex-shrink:0; position:relative;
}
.live-dot::before {
  content:''; position:absolute; inset:-4px; border-radius:50%;
  background:rgba(76,175,80,.3); animation:livePulse 1.8s ease-in-out infinite;
}
.live-dot.loading { background:#ff9800; }
.live-dot.loading::before { background:rgba(255,152,0,.3); }
@keyframes livePulse {
  0%,100% { transform:scale(1); opacity:.5; }
  50%      { transform:scale(1.6); opacity:0; }
}

/* ══════════════════════════════
   TENDER CARDS (tenders page)
   ══════════════════════════════ */
.tender-card {
  background: var(--white);
  border-radius: var(--r-md);
  padding: 18px 20px;
  /* Double-layer shadow for depth */
  box-shadow: 0 2px 8px rgba(26,35,126,.07), 0 6px 20px rgba(26,35,126,.08);
  cursor: pointer;
  transition: box-shadow .22s ease, transform .18s ease, border-color .18s;
  border: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 10px;
  position: relative; overflow: hidden;
}
/* Left accent stripe — appears on hover */
.tender-card::before {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: linear-gradient(180deg, var(--p-light), var(--p-dark));
  border-radius: 4px 0 0 4px;
  opacity: 0;
  transition: opacity .2s;
}
.tender-card:hover {
  box-shadow: 0 6px 24px rgba(26,35,126,.15), 0 12px 40px rgba(26,35,126,.12);
  transform: translateY(-4px);
  border-color: #c5cae9;
}
.tender-card:hover::before { opacity: 1; }

.tc-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.tc-badges { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.tc-title {
  font-size: 14px; font-weight: 700; color: var(--p-dark); line-height: 1.45;
  overflow: hidden; display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.tc-meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.tc-bottom {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  border-top: 1px solid #f0f2fb; padding-top: 10px; margin-top: 2px;
}
.tc-price { font-size: 16px; font-weight: 800; color: var(--p-dark); }
.tc-price small { font-size: 11px; color: var(--text-m); font-weight: 400; }
.tc-actions { display: flex; align-items: center; gap: 8px; }
.btn-detail {
  padding: 6px 14px;
  background: var(--p-pale); color: var(--p-mid);
  border: none; border-radius: 8px;
  font-size: 12px; font-weight: 700; cursor: pointer;
  transition: background .15s, color .15s;
  white-space: nowrap;
}
.btn-detail:hover { background: var(--p-mid); color: #fff; }

/* ── FILTER BAR (tenders page) ── */
.filters-bar {
  background: var(--white); border-radius: var(--r-md);
  padding: 16px 20px;
  box-shadow: var(--sh-sm); border: 1px solid var(--border);
  margin-bottom: 16px;
  display: flex; flex-direction: column; gap: 12px;
}
.filters-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.filters-row .finput  { font-size: 14px; padding: 10px 14px; }
.filters-row .fselect { font-size: 13px; padding: 10px 12px; }

.active-filters { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.af-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; background: var(--p-pale); color: var(--p-mid);
  border-radius: 20px; font-size: 12px; font-weight: 600;
}
.af-chip button { background: none; border: none; cursor: pointer; color: var(--p-mid); padding: 0; font-size: 14px; line-height: 1; }
.results-info { font-size: 13px; color: var(--text-s); white-space: nowrap; }

/* ── CARDS GRID ── */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 16px; }
.cards-grid.list-view { grid-template-columns: 1fr; }
.cards-grid.list-view .tender-card { flex-direction: row; align-items: center; gap: 16px; }
.cards-grid.list-view .tc-title { -webkit-line-clamp: 1; }
.cards-grid.list-view .tc-bottom { border-top: none; padding-top: 0; margin-top: 0; flex-shrink: 0; flex-direction: column; align-items: flex-end; }

/* ══════════════════════════════
   STATISTICS / CATEGORIES HERO
   ══════════════════════════════ */
.page-hero {
  background: linear-gradient(135deg, #12195e, var(--p-dark) 50%, var(--p-light));
  border-radius: var(--r-lg); padding: 30px 32px; color: #fff;
  margin-bottom: 20px;
  box-shadow: var(--sh-md);
}
.page-hero h1 { font-size: 26px; font-weight: 800; margin-bottom: 6px; }
.page-hero p  { opacity: .7; font-size: 14px; }

/* ══════════════════════════════
   CATEGORIES TABLE
   ══════════════════════════════ */
.cat-table { width: 100%; border-collapse: collapse; }
.cat-table thead th {
  text-align: left; font-size: 11px; font-weight: 700; color: var(--text-m);
  text-transform: uppercase; letter-spacing: .6px;
  padding: 0 14px 12px; border-bottom: 2px solid var(--bg);
}
.cat-table thead th:not(:first-child) { text-align: right; }
.cat-table tbody tr { transition: background .12s; }
.cat-table tbody tr:hover { background: var(--p-tint); }
.cat-table tbody td { padding: 13px 14px; border-bottom: 1px solid #f2f4fb; }
.cat-table tbody tr:last-child td { border-bottom: none; }
.cat-table tbody td:not(:first-child) { text-align: right; }
.rank-badge {
  width: 24px; height: 24px; border-radius: 6px; background: var(--bg);
  font-size: 11px; font-weight: 700; color: var(--text-s);
  display: inline-flex; align-items: center; justify-content: center;
}
.rank-badge.r1 { background: #fff8e1; color: #f57f17; }
.rank-badge.r2 { background: #f5f5f5; color: #757575; }
.rank-badge.r3 { background: #fbe9e7; color: #bf360c; }
.cat-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; margin-right: 8px; }
.bar-bg { width: 70px; height: 6px; background: var(--bg); border-radius: 3px; display: inline-block; vertical-align: middle; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 3px; }

/* ── HAMBURGER ── */
.hamburger {
  display: none; flex-direction: column; justify-content: center;
  gap: 5px; background: none; border: none; cursor: pointer;
  padding: 8px; margin-left: 8px; flex-shrink: 0;
}
.hamburger span {
  width: 22px; height: 2px; background: rgba(255,255,255,.85);
  border-radius: 2px; transition: transform .2s, opacity .2s; display: block;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── MOBILE NAV OVERLAY ── */
.nav-overlay {
  display: none; position: fixed; top: 68px; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,.4); z-index: 298;
}
.nav-overlay.show { display: block; }

/* ══════════════════════════════
   RESPONSIVE
   ══════════════════════════════ */
@media (max-width: 1200px) {
  .charts-row  { grid-template-columns: 1fr 1fr; }
  .bottom-row  { grid-template-columns: 1fr; }
  .header-center { display: none; }
}
@media (max-width: 900px) {
  .stat-row   { grid-template-columns: repeat(2, 1fr); }
  .charts-row { grid-template-columns: 1fr; }
  .cards-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .header { padding: 0 14px; height: 58px; }
  .logo-sub { display: none; }
  .logo-name { font-size: 17px; }
  .logo-mark { width: 36px; height: 36px; border-radius: 10px; }
  .page { padding: 14px 12px 48px; }
  .stat-row   { grid-template-columns: 1fr 1fr; gap: 10px; }
  .modal-stats { grid-template-columns: 1fr; }
  .filters-row { flex-direction: column; }
  .filters-row .finput, .filters-row .fselect { width: 100%; }
  .cards-grid { grid-template-columns: 1fr; }
  .nav {
    display: none;
    position: fixed; top: 58px; left: 0; right: 0; z-index: 299;
    background: linear-gradient(180deg, #12195e, var(--p-mid));
    flex-direction: column; padding: 10px 16px 20px; gap: 4px;
    box-shadow: 0 8px 32px rgba(0,0,0,.3); margin-left: 0;
  }
  .nav.open { display: flex; }
  .nav .nav-link { padding: 13px 16px; font-size: 14px; border-radius: 10px; }
  .nav-overlay { top: 58px; }
  .hamburger { display: flex; }
}
