/* ════════════════════════════════════════
   Қашқадарё Интерактив Портали — Стиллар
════════════════════════════════════════ */
:root {
  --bg-0: #070E1A;
  --bg-1: #0B1628;
  --bg-2: #0F2040;
  --bg-card: #13233D;
  --bg-hover: #192E50;
  --border: #1E3A5F;
  --border-bright: #2E5A8F;
  --txt: #E2E8F0;
  --txt-2: #94A3B8;
  --txt-3: #64748B;
  --blue: #3B82F6;
  --blue-d: #1D4ED8;
  --gold: #F59E0B;
  --green: #10B981;
  --red: #EF4444;
  --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

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

/* Манбани кўришдан ҳимоя */
body { -webkit-user-select: none; -moz-user-select: none; user-select: none; }
input, textarea { -webkit-user-select: text; -moz-user-select: text; user-select: text; }

html, body {
  min-height: 100%;
  background: var(--bg-0);
  color: var(--txt);
  font-family: var(--font);
  overflow-y: auto;
  overflow-x: hidden;
}

/* ── LAYOUT ── */
.page { display: flex; flex-direction: column; min-height: 100vh; }

/* ── HEADER ── */
.hdr {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 20px;
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0; gap: 16px; min-height: 64px;
  position: sticky; top: 0; z-index: 200;
}
.hdr-logo { display: flex; align-items: center; gap: 10px; }
.hdr-logo-icon { font-size: 26px; }
.hdr-logo-title { font-size: 17px; font-weight: 700; line-height: 1.2; }
.hdr-logo-sub { font-size: 10px; color: var(--txt-3); }

.hdr-clock { text-align: center; }
.clock-time {
  font-size: 28px; font-weight: 700; letter-spacing: 3px;
  color: var(--blue); font-variant-numeric: tabular-nums;
  text-shadow: 0 0 24px rgba(59,130,246,.5);
}
.clock-date { font-size: 11px; color: var(--txt-3); margin-top: 2px; }

.hdr-wx { text-align: right; min-width: 150px; }
.wx-load { font-size: 12px; color: var(--txt-3); }
.wx-temp { font-size: 22px; font-weight: 700; color: var(--blue); }
.wx-row { display: flex; align-items: center; gap: 6px; justify-content: flex-end; }
.wx-desc { font-size: 11px; color: var(--txt-2); margin-top: 2px; }
.wx-meta { font-size: 10px; color: var(--txt-3); margin-top: 1px; }

/* ── MAIN ── */
.main {
  display: flex;
  height: 58vh;
  min-height: 400px;
  overflow: hidden;
}

/* ── MAP SECTION ── */
.map-sec {
  flex: 1; display: flex; flex-direction: column;
  padding: 12px; overflow: hidden; min-width: 0;
}
.map-bar {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 11px; color: var(--txt-3); margin-bottom: 8px; padding: 0 2px;
}
.map-hint {
  background: var(--bg-card); border: 1px solid var(--border);
  padding: 3px 10px; border-radius: 20px; font-size: 11px; color: var(--blue);
  animation: blink 2.5s ease infinite;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:.5} }

.map-wrap {
  flex: 1; background: var(--bg-1); border: 1px solid var(--border);
  border-radius: 12px; overflow: hidden; display: flex;
  align-items: center; justify-content: center; padding: 6px;
  position: relative;
}
.map-wrap svg { max-height: 100%; max-width: 100%; }

.legend {
  display: flex; gap: 12px; margin-top: 8px;
  flex-wrap: wrap; padding: 0 2px;
}
.leg { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--txt-3); }
.ld { width: 14px; height: 8px; border-radius: 2px; }

/* ── SVG DISTRICT STYLES ── */
.dt {
  fill: #1A3460; stroke: #070E1A; stroke-width: 1.5;
  cursor: pointer; transition: fill .2s, filter .2s;
}
.dt:hover { fill: #2563EB; filter: drop-shadow(0 0 8px rgba(59,130,246,.7)); }
.dt.active { fill: #1D4ED8; filter: drop-shadow(0 0 12px rgba(59,130,246,.9)); stroke: #60A5FA; stroke-width: 2; }

.ds {
  fill: #6B3D07; stroke: #070E1A; stroke-width: 2;
  cursor: pointer; transition: fill .2s, filter .2s;
}
.ds:hover { fill: #D97706; filter: drop-shadow(0 0 10px rgba(245,158,11,.7)); }
.ds.active { fill: #F59E0B; filter: drop-shadow(0 0 18px rgba(245,158,11,1)); stroke: #FDE68A; stroke-width: 2; }

.dsh {
  fill: #064E3B; stroke: #070E1A; stroke-width: 2;
  cursor: pointer; transition: fill .2s, filter .2s;
}
.dsh:hover { fill: #059669; filter: drop-shadow(0 0 8px rgba(16,185,129,.6)); }
.dsh.active { fill: #10B981; filter: drop-shadow(0 0 12px rgba(16,185,129,.9)); stroke: #6EE7B7; stroke-width: 2; }

.dc {
  fill: rgba(26,52,96,.4); stroke: #3B82F6; stroke-width: 2;
  stroke-dasharray: 5,3; cursor: pointer; transition: fill .2s;
}
.dc:hover { fill: rgba(59,130,246,.3); }
.dc.active { fill: rgba(59,130,246,.45); stroke: #93C5FD; }

.lbl  { font-size:10.5px; font-weight:500; fill:#BAD4FF; pointer-events:none; text-anchor:middle; dominant-baseline:middle; }
.lbl2 { font-size:9px;    fill:#FDE68A;   pointer-events:none; text-anchor:middle; dominant-baseline:middle; }
.lbl3 { font-size:9.5px;  font-weight:500; fill:#6EE7B7; pointer-events:none; text-anchor:middle; dominant-baseline:middle; }
.lbl4 { font-size:10px;   font-weight:500; fill:#93C5FD; pointer-events:none; text-anchor:middle; dominant-baseline:middle; }
.rvr  { fill:none; stroke:#1E40AF; stroke-width:2; stroke-linecap:round; opacity:.5; }
.mnt  { opacity:.35; }

/* ── DISTRICT PANEL ── */
.panel {
  width: 390px; flex-shrink: 0;
  background: var(--bg-2); border-left: 1px solid var(--border);
  display: flex; flex-direction: column; overflow: hidden;
  transition: width .3s;
}

.panel-ph {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; height: 100%; padding: 32px; text-align: center; gap: 14px;
}
.ph-icon { font-size: 52px; animation: float 3s ease-in-out infinite; }
@keyframes float { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-10px)} }
.ph-title { font-size: 16px; font-weight: 600; color: var(--txt-2); }
.ph-sub { font-size: 13px; color: var(--txt-3); line-height: 1.6; }
.ph-chips { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin-top: 4px; }
.ph-chip { background: var(--bg-card); border: 1px solid var(--border); border-radius: 20px; padding: 4px 12px; font-size: 11px; color: var(--txt-3); }

.panel-body {
  display: flex; flex-direction: column; height: 100%; overflow: hidden;
}
/* anim-in klassi JS tomonidan qo'shiladi — har safar district tanlanganda */
.panel-body.anim-in {
  animation: fadeIn .3s ease;
}
@keyframes fadeIn { from{opacity:0;transform:translateX(16px)} to{opacity:1;transform:translateX(0)} }

/* Panel Header */
.p-hdr {
  padding: 14px 14px 12px;
  background: var(--bg-card); border-bottom: 1px solid var(--border);
  position: relative; flex-shrink: 0;
  transition: background .4s, border-color .4s;
}
/* JS tomonidan id="pHdrAccent" orqali gradient o'rnatiladi */
.p-close {
  position: absolute; top: 10px; right: 10px;
  background: var(--border); border: none; color: var(--txt-2);
  width: 28px; height: 28px; border-radius: 6px; cursor: pointer;
  font-size: 13px; transition: background .15s, color .15s;
  display: flex; align-items: center; justify-content: center;
}
.p-close:hover { background: var(--red); color: #fff; }
.p-icon { font-size: 30px; margin-bottom: 6px; }
.p-title { font-size: 17px; font-weight: 700; padding-right: 36px; }
.p-sub { font-size: 11px; color: var(--txt-3); margin-top: 4px; line-height: 1.5; }
.p-badges { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 8px; }

.badge { display: inline-block; font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 20px; }
.badge-smart   { background:rgba(245,158,11,.2);  color:#FDE68A; border:1px solid rgba(245,158,11,.4); }
.badge-capital { background:rgba(59,130,246,.2);  color:#93C5FD; border:1px solid rgba(59,130,246,.4); }
.badge-unesco  { background:rgba(16,185,129,.2);  color:#6EE7B7; border:1px solid rgba(16,185,129,.4); }
.badge-mountain{ background:rgba(156,163,175,.2); color:#D1D5DB; border:1px solid rgba(156,163,175,.3); }
.badge-industry{ background:rgba(239,68,68,.2);   color:#FCA5A5; border:1px solid rgba(239,68,68,.3); }
.badge-info    { background:rgba(139,92,246,.2);  color:#C4B5FD; border:1px solid rgba(139,92,246,.3); }

/* Tabs */
.p-tabs {
  display: flex; background: var(--bg-card); border-bottom: 1px solid var(--border);
  overflow-x: auto; flex-shrink: 0; scrollbar-width: none;
}
.p-tabs::-webkit-scrollbar { display: none; }
.tab-btn {
  background: none; border: none; color: var(--txt-3); padding: 10px 11px;
  font-size: 12px; cursor: pointer; white-space: nowrap;
  border-bottom: 2px solid transparent; transition: color .15s, border-color .15s;
  font-family: var(--font);
}
.tab-btn:hover { color: var(--txt-2); }
.tab-btn.active { color: var(--blue); border-bottom-color: var(--blue); }

/* Tab content */
.p-tabs-body { flex: 1; overflow-y: auto; }
.p-tabs-body::-webkit-scrollbar { width: 4px; }
.p-tabs-body::-webkit-scrollbar-thumb { background: var(--border-bright); border-radius: 2px; }
.tab-pane { display: none; padding: 14px; }
.tab-pane.active { display: block; }

/* ── OVERVIEW TAB ── */
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.stat-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; padding: 12px;
}
.stat-lbl { font-size: 10px; color: var(--txt-3); margin-bottom: 4px; text-transform: uppercase; letter-spacing: .4px; }
.stat-val { font-size: 20px; font-weight: 700; }
.stat-unit { font-size: 10px; color: var(--txt-3); margin-left: 2px; }

.desc-block {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px;
  padding: 12px; font-size: 13px; line-height: 1.7; color: var(--txt-2); margin-bottom: 10px;
}
.econ-block {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; padding: 12px;
}
.block-lbl { font-size: 10px; color: var(--txt-3); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 6px; font-weight: 600; }
.econ-val { font-size: 14px; color: var(--gold); }

/* ── WEATHER TAB ── */
.wx-widget { }
.wx-spin {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 180px; color: var(--txt-3); font-size: 13px; gap: 12px;
}
.spinner {
  width: 30px; height: 30px; border: 3px solid var(--border);
  border-top-color: var(--blue); border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to{transform:rotate(360deg)} }

.wx-card {
  background: linear-gradient(135deg, #1A3460 0%, #0B1A35 100%);
  border: 1px solid var(--border-bright); border-radius: 14px; padding: 18px;
}
.wx-main { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 14px; }
.wx-big-temp { font-size: 54px; font-weight: 700; color: #fff; line-height: 1; }
.wx-big-icon { font-size: 50px; }
.wx-big-desc { font-size: 14px; color: #93C5FD; margin-top: 4px; }
.wx-big-feels { font-size: 11px; color: var(--txt-3); margin-top: 3px; }
.wx-details {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px;
  padding-top: 14px; border-top: 1px solid rgba(255,255,255,.08);
}
.wx-d { text-align: center; }
.wx-d-lbl { font-size: 10px; color: var(--txt-3); }
.wx-d-val { font-size: 14px; font-weight: 600; color: var(--txt-2); margin-top: 3px; }

.wx-forecast { margin-top: 12px; display: grid; grid-template-columns: repeat(3,1fr); gap: 6px; }
.fc-day {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 8px; padding: 8px; text-align: center;
}
.fc-name { font-size: 10px; color: var(--txt-3); }
.fc-ico { font-size: 22px; margin: 4px 0; }
.fc-t { font-size: 12px; font-weight: 600; color: var(--txt); }

/* ── MAP TAB ── */
.map-links { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.map-link-btn {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px;
  padding: 12px; cursor: pointer; text-decoration: none; color: var(--txt);
  transition: background .15s, border-color .15s, transform .1s;
}
.map-link-btn:hover { background: var(--bg-hover); border-color: var(--blue); transform: translateX(3px); }
.mlb-ico { font-size: 22px; }
.mlb-name { font-size: 13px; font-weight: 500; }
.mlb-sub { font-size: 10px; color: var(--txt-3); margin-top: 2px; }
.mlb-arr { color: var(--txt-3); margin-left: auto; }

.gps-box {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 10px; padding: 12px;
}
.gps-coords { display: flex; gap: 10px; margin-top: 8px; }
.gps-c { flex: 1; text-align: center; }
.gps-c-lbl { font-size: 10px; color: var(--txt-3); }
.gps-c-val { font-size: 16px; font-weight: 700; color: var(--blue); margin-top: 3px; font-variant-numeric: tabular-nums; }
.gps-copy { margin-top: 10px; font-size: 11px; color: var(--txt-3); word-break: break-all; }

/* ── CAMERAS TAB ── */
.cam-list { display: flex; flex-direction: column; gap: 8px; }
.cam-item {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px;
  padding: 13px; text-decoration: none; color: var(--txt);
  transition: background .15s, border-color .15s;
}
.cam-item:hover { background: var(--bg-hover); border-color: var(--blue); }
.cam-ico { font-size: 22px; }
.cam-name { font-size: 13px; font-weight: 500; }
.cam-type { font-size: 10px; color: var(--txt-3); margin-top: 2px; }
.cam-live {
  margin-left: auto; font-size: 10px; padding: 2px 8px; border-radius: 10px;
  background: rgba(239,68,68,.2); color: #FCA5A5; border: 1px solid rgba(239,68,68,.3);
  animation: blink 1.5s ease infinite;
}
.cam-placeholder { text-align: center; padding: 32px 16px; color: var(--txt-3); }
.cam-placeholder-ico { font-size: 40px; margin-bottom: 10px; }

/* ── SERVICES TAB ── */
.svc-list { display: flex; flex-direction: column; gap: 8px; }
.svc-item {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px;
  padding: 13px; text-decoration: none; color: var(--txt);
  transition: background .15s, border-color .15s, transform .1s;
}
.svc-item:hover { background: var(--bg-hover); border-color: var(--blue); transform: translateX(3px); }
.svc-ico { font-size: 22px; }
.svc-name { font-size: 13px; font-weight: 500; flex: 1; }
.svc-url { font-size: 10px; color: var(--txt-3); margin-top: 2px; }
.svc-arr { color: var(--txt-3); }

.emergency-title { font-size: 10px; color: var(--txt-3); text-transform: uppercase; letter-spacing: .5px; font-weight: 600; margin: 14px 0 8px; }
.emergency-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
.emrg-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px;
  padding: 12px 6px; text-decoration: none; color: var(--txt);
  transition: background .15s, border-color .15s; gap: 4px;
  cursor: pointer;
}
.emrg-btn:hover { background: var(--bg-hover); }
.emrg-ico { font-size: 24px; }
.emrg-num { font-size: 16px; font-weight: 700; color: var(--blue); }
.emrg-lbl { font-size: 9px; color: var(--txt-3); }

/* ── STATUS BAR ── */
.statusbar {
  display: flex; gap: 20px; padding: 7px 20px;
  background: var(--bg-2); border-top: 1px solid var(--border);
  font-size: 11px; color: var(--txt-3); flex-shrink: 0;
  overflow-x: auto; scrollbar-width: none;
  position: sticky; bottom: 0; z-index: 200;
}
.statusbar::-webkit-scrollbar { display: none; }
.statusbar span { white-space: nowrap; }
#sbActive { color: var(--blue); }

/* ── TOASTS ── */
.toasts {
  position: fixed; bottom: 46px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column-reverse; gap: 6px;
  z-index: 999; pointer-events: none;
}
.toast {
  background: var(--bg-card); border: 1px solid var(--border-bright);
  border-radius: 12px; padding: 11px 18px; font-size: 13px; color: var(--txt);
  box-shadow: 0 8px 32px rgba(0,0,0,.5); pointer-events: auto;
  animation: toastIn .25s ease; max-width: 380px; white-space: nowrap;
}
.toast-info    { border-color: var(--blue); }
.toast-success { border-color: var(--green); }
.toast-warn    { border-color: var(--gold); }
@keyframes toastIn  { from{opacity:0;transform:translateY(12px) scale(.95)} to{opacity:1;transform:translateY(0) scale(1)} }
@keyframes toastOut { from{opacity:1;transform:translateY(0) scale(1)} to{opacity:0;transform:translateY(-8px) scale(.95)} }

/* ══════════════════════════════════════
   ТРАНСПОРТ TAB СТИЛЛАРИ
══════════════════════════════════════ */
.ts-section {
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.ts-section:last-child { border-bottom: none; margin-bottom: 0; }

.ts-title {
  font-size: 12px; font-weight: 700; color: var(--txt-2);
  text-transform: uppercase; letter-spacing: .6px;
  margin-bottom: 10px; display: flex; align-items: center; gap: 8px;
}
.ts-iata {
  font-size: 10px; padding: 2px 8px; border-radius: 10px;
  background: rgba(59,130,246,.2); color: #93C5FD;
  border: 1px solid rgba(59,130,246,.3); font-weight: 600;
  text-transform: none; letter-spacing: 0;
}

/* Traffic iframe */
.ts-iframe-wrap {
  position: relative; border-radius: 10px; overflow: hidden;
  border: 1px solid var(--border);
}
.ts-iframe-overlay {
  position: absolute; inset: 0;
  background: rgba(10,22,40,.6);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background .2s;
}
.ts-iframe-overlay:hover { background: rgba(10,22,40,.3); }
.ts-iframe-tap {
  background: rgba(59,130,246,.2); border: 1px solid rgba(59,130,246,.4);
  color: #93C5FD; padding: 8px 16px; border-radius: 20px; font-size: 13px;
}

/* Umumiy karta (card) */
.ts-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 10px; overflow: hidden;
}
.ts-card-head {
  font-size: 10px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .4px; color: var(--txt-3);
  padding: 8px 12px; background: rgba(255,255,255,.03);
  border-bottom: 1px solid var(--border);
}

/* Row (qator) */
.ts-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-bottom: 1px solid rgba(255,255,255,.04);
  transition: background .15s;
}
.ts-row:last-child { border-bottom: none; }
.ts-row:hover { background: rgba(255,255,255,.03); }
.ts-row-icon { font-size: 18px; flex-shrink: 0; }
.ts-row-body { flex: 1; min-width: 0; }
.ts-row-title { font-size: 13px; font-weight: 500; color: var(--txt); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ts-row-meta  { font-size: 11px; color: var(--txt-3); margin-top: 2px; }

/* Avtobus raqami */
.ts-bus-num {
  width: 28px; height: 28px; border-radius: 6px;
  background: rgba(59,130,246,.2); color: #93C5FD;
  font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

/* Live badge */
.ts-badge-live {
  font-size: 10px; padding: 3px 8px; border-radius: 10px;
  background: rgba(239,68,68,.2); color: #FCA5A5;
  border: 1px solid rgba(239,68,68,.4);
  animation: blink 1.5s ease infinite; white-space: nowrap;
}

/* "LIVE" tugmasi uchun link */
.ts-live { border-color: rgba(239,68,68,.3) !important; }
.ts-live:hover { border-color: var(--red) !important; }

/* Live dot (reyslarda) */
.ts-live-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--green); flex-shrink: 0;
  animation: pulse-dot 2s ease infinite;
}
@keyframes pulse-dot {
  0%,100% { opacity:1; transform:scale(1); }
  50% { opacity:.4; transform:scale(1.4); }
}

/* Ticket grid — chipta sotib olish */
.ticket-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 4px;
}
.ticket-card {
  display: flex; flex-direction: column; align-items: center;
  gap: 6px; padding: 12px 8px;
  background: var(--bg-card); border-radius: 10px;
  border: 1px solid var(--border);
  text-decoration: none; color: var(--txt);
  transition: background .15s, border-color .15s, transform .15s;
  position: relative; overflow: hidden;
}
.ticket-card::before {
  content: ''; position: absolute; inset: 0;
  background: var(--tc-color, #3B82F6);
  opacity: .06; transition: opacity .15s;
}
.ticket-card:hover { transform: translateY(-2px); border-color: var(--tc-color, #3B82F6); }
.ticket-card:hover::before { opacity: .12; }
.tc-icon { font-size: 22px; }
.tc-name { font-size: 12px; font-weight: 600; color: var(--txt); text-align: center; line-height: 1.3; }
.tc-sub  { font-size: 10px; color: var(--txt-3); text-align: center; }
.tc-label {
  font-size: 9px; padding: 2px 7px; border-radius: 8px;
  background: color-mix(in srgb, var(--tc-color, #3B82F6) 20%, transparent);
  color: var(--tc-color, #3B82F6);
  border: 1px solid color-mix(in srgb, var(--tc-color, #3B82F6) 30%, transparent);
}

/* Express / tezkor tag */
.ts-tag-fast {
  display: inline-block; font-size: 9px; font-weight: 700;
  padding: 1px 6px; border-radius: 6px; letter-spacing: .4px;
  background: rgba(245,158,11,.2); color: #FCD34D;
  border: 1px solid rgba(245,158,11,.35);
  vertical-align: middle; margin-left: 4px;
}
.ts-row-express { background: rgba(245,158,11,.05) !important; }
.ts-row-express:hover { background: rgba(245,158,11,.1) !important; }

/* ══════════════════════════════
   DIZAYN YAXSHILANISHLARI
══════════════════════════════ */

/* Stat karta — count-up animatsiya uchun */
.stat-val { font-size: 22px; font-weight: 700; color: var(--txt); }

/* Placeholder chips animatsiyasi */
.ph-chip { transition: background .2s, color .2s; }
.ph-chip:hover { background: rgba(59,130,246,.2); color: var(--blue); border-color: var(--blue); cursor: default; }

/* Map link button — yaxshilangan */
.map-link-btn { border-radius: 10px; }

/* GPS copy box */
.gps-copy {
  margin-top: 10px; font-size: 11px; color: var(--txt-3);
  cursor: pointer; padding: 6px 8px; border-radius: 6px;
  border: 1px dashed var(--border);
  transition: background .15s, color .15s;
  text-align: center;
}
.gps-copy:hover { background: var(--bg-hover); color: var(--blue); border-color: var(--blue); }

/* Economy block */
.econ-val { font-size: 13px; color: var(--gold); line-height: 1.5; }

/* ══════════════════════════════════════════
   HERO SECTION
══════════════════════════════════════════ */
.hero-sec {
  position: relative;
  background: linear-gradient(135deg, #070E1A 0%, #0C1D3A 45%, #070E1A 100%);
  border-bottom: 1px solid var(--border);
  overflow: hidden; flex-shrink: 0;
}
.hero-bg-anim {
  position: absolute; inset: 0; pointer-events: none; overflow: hidden;
}
.hero-inner {
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: 32px;
  padding: 24px 28px 20px;
}
.hero-left { flex: 1; min-width: 0; }
.hero-tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 10px; font-weight: 700; letter-spacing: .9px;
  color: #93C5FD;
  background: rgba(59,130,246,.1); border: 1px solid rgba(59,130,246,.22);
  padding: 4px 10px; border-radius: 20px; margin-bottom: 10px;
}
.hero-tag-dot {
  width: 6px; height: 6px; border-radius: 50%; background: #3B82F6;
  animation: blink 2s ease infinite;
}
.hero-h1 {
  font-size: clamp(18px, 2.4vw, 30px); font-weight: 800; line-height: 1.2;
  color: var(--txt); margin-bottom: 8px;
}
.hero-gold { color: var(--gold); }
.hero-desc {
  font-size: clamp(11px, .9vw, 13px); color: var(--txt-3);
  line-height: 1.55; margin-bottom: 14px; max-width: 400px;
}
.hero-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.hero-btn-p {
  background: var(--blue); color: #fff; border: none;
  border-radius: 8px; padding: 8px 16px; font-size: 12px; font-weight: 600;
  cursor: pointer; transition: background .15s, transform .1s;
}
.hero-btn-p:hover { background: #2563EB; transform: translateY(-1px); }
.hero-btn-s {
  background: transparent; color: var(--txt-2);
  border: 1px solid var(--border); border-radius: 8px;
  padding: 8px 16px; font-size: 12px; font-weight: 600;
  cursor: pointer; transition: border-color .15s, color .15s, transform .1s;
}
.hero-btn-s:hover { border-color: var(--blue); color: var(--blue); transform: translateY(-1px); }

.hero-right { flex-shrink: 0; }
.hero-stats {
  display: flex; align-items: center;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 12px; overflow: hidden; margin-bottom: 8px;
}
.hs-item { display: flex; flex-direction: column; align-items: center; padding: 10px 16px; gap: 2px; }
.hs-num { font-size: 20px; font-weight: 800; color: var(--gold); letter-spacing: -.5px; }
.hs-lbl { font-size: 8px; font-weight: 700; color: var(--txt-3); letter-spacing: .8px; }
.hs-divider { width: 1px; height: 36px; background: var(--border); flex-shrink: 0; }

.hero-infra-grid { display: flex; gap: 5px; flex-wrap: wrap; }
.hi-chip {
  font-size: 10px; padding: 3px 8px; border-radius: 10px;
  background: var(--bg-card); border: 1px solid var(--border); color: var(--txt-3);
  transition: border-color .15s, color .15s; white-space: nowrap;
}
.hi-chip:hover { border-color: rgba(59,130,246,.4); color: var(--blue); }

/* ══════════════════════════════════════════
   SMART SERVICES SECTION
══════════════════════════════════════════ */
.smart-sec {
  padding: 28px 24px 32px;
  background: var(--bg-1);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.smart-header { text-align: center; margin-bottom: 22px; }
.smart-badge {
  display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: .9px;
  color: var(--gold); background: rgba(245,158,11,.1);
  border: 1px solid rgba(245,158,11,.22); padding: 4px 12px;
  border-radius: 20px; margin-bottom: 10px;
}
.smart-title { font-size: clamp(20px, 2.5vw, 30px); font-weight: 800; color: var(--txt); }
.smart-blue { color: var(--blue); }

.smart-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px; max-width: 1200px; margin: 0 auto;
}
.svc-card {
  background: var(--sc-bg, var(--bg-card));
  border: 1px solid var(--sc-brd, var(--border));
  border-radius: 14px; padding: 18px 16px;
  transition: transform .2s, box-shadow .2s; cursor: default;
}
.svc-card:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(0,0,0,.5); }
.sc-icon {
  width: 46px; height: 46px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; margin-bottom: 12px;
}
.sc-name { font-size: 14px; font-weight: 700; color: var(--txt); margin-bottom: 5px; }
.sc-desc { font-size: 11.5px; color: var(--txt-3); line-height: 1.5; margin-bottom: 12px; }
.sc-status {
  display: inline-block; font-size: 11px; font-weight: 600;
  padding: 3px 10px; border-radius: 8px;
}
.sc-green { background: rgba(16,185,129,.15); color: #34D399; }
.sc-amber { background: rgba(245,158,11,.12); color: #FCD34D; }
.sc-gray  { background: rgba(100,116,139,.12); color: #94A3B8; }

/* ══════════════════════════════════════════
   FOOTER
══════════════════════════════════════════ */
.site-footer {
  background: var(--bg-0); border-top: 1px solid var(--border);
  padding: 14px 24px; flex-shrink: 0;
}
.footer-inner { max-width: 1200px; margin: 0 auto; text-align: center; }
.footer-main {
  display: flex; align-items: center; justify-content: center;
  gap: 12px; margin-bottom: 5px; flex-wrap: wrap;
}
.footer-logo { font-size: 13px; font-weight: 700; color: var(--blue); }
.footer-sep { color: var(--border); }
.footer-copy { font-size: 12px; color: var(--txt-3); }
.footer-decree { font-size: 11px; color: var(--txt-3); opacity: .55; margin-bottom: 6px; }
.footer-dev { font-size: 11px; color: var(--txt-3); opacity: .5; margin-top: 2px; }
.footer-dev-link {
  color: var(--blue); text-decoration: none; font-weight: 600;
  transition: color .15s, opacity .15s;
}
.footer-dev-link:hover { color: #60A5FA; opacity: 1; text-decoration: underline; }

/* ══════════════════════════════════════════
   ИНФРАТУЗИЛМА SVG СТИЛЛАРИ
══════════════════════════════════════════ */
.infra-rail    { fill:none; stroke:#374151; stroke-width:2.5; stroke-dasharray:5,4; opacity:.6; }
.infra-road    { fill:none; stroke:#1E3A5F; stroke-width:3.5; opacity:.65; }
.infra-gas-pipe{ fill:none; stroke:#D97706; stroke-width:1.5; stroke-dasharray:3,5; opacity:.45; }
.infra-road-2  { fill:none; stroke:#172B46; stroke-width:1.5; opacity:.35; }

/* ══════════════════════════════════════════════════════
   OVERLAY MODAL — Ҳавола кўриниши (Link Preview)
══════════════════════════════════════════════════════ */
.ovl-modal {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(4,10,22,.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity .25s ease;
  padding: 16px;
}
.ovl-modal.active { opacity: 1; pointer-events: all; }

.ovl-window {
  width: min(92vw, 480px);
  background: var(--bg-2);
  border: 1px solid var(--border-bright);
  border-radius: 20px;
  overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: 0 32px 100px rgba(0,0,0,.7);
  transform: scale(.9) translateY(20px);
  transition: transform .3s cubic-bezier(.34,1.4,.64,1);
}
.ovl-modal.active .ovl-window { transform: scale(1) translateY(0); }

/* Bar */
.ovl-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; gap: 12px;
  background: var(--bg-card); border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.ovl-bar-left {
  display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0;
}
.ovl-icon { font-size: 22px; flex-shrink: 0; }
.ovl-bar-info { min-width: 0; flex: 1; }
.ovl-title {
  font-size: 13px; font-weight: 600; color: var(--txt);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ovl-url {
  font-size: 10px; color: var(--txt-3); margin-top: 1px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ovl-bar-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.ovl-ext-btn {
  display: flex; align-items: center; gap: 5px;
  background: var(--bg-hover); border: 1px solid var(--border);
  color: var(--txt-2); border-radius: 8px;
  padding: 6px 12px; font-size: 12px; font-weight: 600;
  text-decoration: none; cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.ovl-ext-btn:hover { background: var(--blue); border-color: var(--blue); color: #fff; }
.ovl-ext-lbl { font-size: 12px; }
.ovl-close-btn {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--border); border: none; color: var(--txt-2);
  font-size: 14px; font-weight: 600; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s, color .15s;
}
.ovl-close-btn:hover { background: var(--red); color: #fff; }

/* Countdown progress bar */
.ovl-progress {
  height: 3px; background: var(--border); flex-shrink: 0; overflow: hidden;
}
.ovl-progress-bar {
  height: 100%; width: 100%; background: var(--blue);
  transform-origin: left; transform: scaleX(1);
  transition: none;
}
.ovl-progress-bar.counting {
  transform: scaleX(0);
}

/* Body */
.ovl-body { background: var(--bg-1); }

/* ── Preview Card ── */
.ovl-preview {
  display: flex; flex-direction: column; align-items: center;
  padding: 28px 24px 24px; gap: 18px; text-align: center;
}

.ovl-prev-badge {
  font-size: 10px; font-weight: 700; letter-spacing: .8px;
  color: var(--blue); background: rgba(59,130,246,.12);
  border: 1px solid rgba(59,130,246,.25);
  padding: 4px 12px; border-radius: 20px;
}

.ovl-prev-card {
  display: flex; align-items: center; gap: 14px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 14px; padding: 14px 18px; width: 100%; text-align: left;
}
.ovl-prev-ico { font-size: 32px; flex-shrink: 0; }
.ovl-prev-name {
  font-size: 15px; font-weight: 700; color: var(--txt); line-height: 1.3;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px;
}
.ovl-prev-domain {
  font-size: 11px; color: var(--blue); margin-top: 3px; font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.ovl-prev-notice {
  display: flex; align-items: flex-start; gap: 8px;
  background: rgba(245,158,11,.08); border: 1px solid rgba(245,158,11,.2);
  border-radius: 10px; padding: 10px 14px; font-size: 12px;
  color: var(--txt-3); line-height: 1.5; text-align: left;
}
.ovl-prev-notice-ico { font-size: 14px; flex-shrink: 0; margin-top: 1px; }

/* Countdown ring */
.ovl-countdown {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.ovl-cd-ring {
  position: relative; width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
}
.ovl-cd-ring svg { position: absolute; inset: 0; }
.ovl-cd-num {
  font-size: 18px; font-weight: 800; color: var(--blue);
  position: relative; z-index: 1;
}
#ovlCdArc {
  transition: stroke-dashoffset linear;
}
.ovl-cd-txt {
  font-size: 11px; color: var(--txt-3); letter-spacing: .2px;
}

/* Action buttons */
.ovl-prev-btns {
  display: flex; gap: 10px; width: 100%;
}
.ovl-open-now {
  flex: 1; background: var(--blue); color: #fff;
  text-decoration: none; text-align: center;
  padding: 12px 20px; border-radius: 12px;
  font-size: 14px; font-weight: 700;
  transition: background .15s, transform .1s;
}
.ovl-open-now:hover { background: var(--blue-d); transform: translateY(-1px); }
.ovl-cancel-btn {
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--txt-3); border-radius: 12px;
  padding: 12px 16px; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: background .15s, color .15s;
}
.ovl-cancel-btn:hover { background: var(--bg-hover); color: var(--txt); }

/* Light theme overrides */
[data-theme="light"] .ovl-modal    { background: rgba(15,23,42,.7); }
[data-theme="light"] .ovl-window   { background: #FFFFFF; border-color: #CBD5E1; box-shadow: 0 24px 80px rgba(0,0,0,.25); }
[data-theme="light"] .ovl-bar      { background: #F8FAFC; border-bottom-color: #E2E8F0; }
[data-theme="light"] .ovl-title    { color: #0F172A; }
[data-theme="light"] .ovl-url      { color: #64748B; }
[data-theme="light"] .ovl-ext-btn  { background: #F1F5F9; border-color: #CBD5E1; color: #334155; }
[data-theme="light"] .ovl-close-btn { background: #E2E8F0; color: #475569; }
[data-theme="light"] .ovl-progress  { background: #E2E8F0; }
[data-theme="light"] .ovl-body      { background: #F8FAFC; }
[data-theme="light"] .ovl-prev-card { background: #F1F5F9; border-color: #CBD5E1; }
[data-theme="light"] .ovl-prev-name { color: #0F172A; }
[data-theme="light"] .ovl-cancel-btn { background: #F1F5F9; border-color: #CBD5E1; color: #475569; }
[data-theme="light"] .ovl-prev-notice { background: rgba(245,158,11,.06); }

/* ══════════════════════════════════════════════════════
   МАВЗУ ТОГЛ ТУГМАСИ
══════════════════════════════════════════════════════ */
.theme-toggle {
  display: flex; align-items: center; gap: 6px;
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--txt-2); border-radius: 20px;
  padding: 6px 13px; font-size: 12px; font-weight: 600;
  cursor: pointer; white-space: nowrap; flex-shrink: 0;
  transition: background .25s, border-color .25s, color .25s;
}
.theme-toggle:hover { border-color: var(--blue); color: var(--blue); }
.theme-toggle-icon { font-size: 15px; line-height: 1; }

/* Силлиқ мавзу ўтиши — асосий элементлар */
html { transition: background-color .35s; }
.page, .hdr, .map-sec, .map-wrap, .panel, .panel-ph, .panel-body,
.p-hdr, .p-tabs, .p-tabs-body, .tab-pane, .tab-btn, .p-close,
.statusbar, .hero-sec, .hero-stats, .hi-chip, .hero-btn-s,
.smart-sec, .svc-card, .site-footer, .stat-card, .desc-block,
.econ-block, .ts-card, .ts-row, .ticket-card, .map-link-btn,
.gps-box, .cam-item, .svc-item, .emrg-btn, .ph-chip, .toast,
.fc-day, .theme-toggle {
  transition: background .35s ease, border-color .35s ease,
              color .35s ease, box-shadow .35s ease !important;
}

/* ══════════════════════════════════════════════════════
   ОҚ МАВЗУ — [data-theme="light"]
══════════════════════════════════════════════════════ */
[data-theme="light"] {
  --bg-0:          #F0F4FA;
  --bg-1:          #E4EBF5;
  --bg-2:          #FFFFFF;
  --bg-card:       #FFFFFF;
  --bg-hover:      #EBF4FF;
  --border:        #D1D9E8;
  --border-bright: #94A3B8;
  --txt:           #0F172A;
  --txt-2:         #1E293B;
  --txt-3:         #64748B;
  --blue:          #2563EB;
  --blue-d:        #1D4ED8;
  --gold:          #B45309;
  --green:         #047857;
  --red:           #DC2626;
}

/* Header */
[data-theme="light"] .hdr {
  background: #FFFFFF;
  border-bottom-color: #D1D9E8;
  box-shadow: 0 1px 6px rgba(0,0,0,.07);
}
[data-theme="light"] .hdr-logo-title { color: #0F172A; }
[data-theme="light"] .hdr-logo-sub   { color: #64748B; }
[data-theme="light"] .clock-time {
  color: #2563EB;
  text-shadow: 0 0 10px rgba(37,99,235,.18);
}
[data-theme="light"] .clock-date { color: #64748B; }

/* Hero */
[data-theme="light"] .hero-sec {
  background: linear-gradient(135deg,#EFF6FF 0%,#DBEAFE 55%,#EFF6FF 100%);
  border-bottom-color: #CBD5E1;
}
[data-theme="light"] .hero-bg-anim { opacity: .15; }
[data-theme="light"] .hero-tag {
  color: #1D4ED8;
  background: rgba(37,99,235,.08);
  border-color: rgba(37,99,235,.2);
}
[data-theme="light"] .hero-tag-dot { background: #2563EB; }
[data-theme="light"] .hero-h1   { color: #0F172A; }
[data-theme="light"] .hero-gold { color: #B45309; }
[data-theme="light"] .hero-desc { color: #334155; }
[data-theme="light"] .hero-stats {
  background: #FFFFFF;
  border-color: #D1D9E8;
  box-shadow: 0 3px 12px rgba(0,0,0,.08);
}
[data-theme="light"] .hs-num     { color: #B45309; }
[data-theme="light"] .hs-lbl     { color: #64748B; }
[data-theme="light"] .hs-divider { background: #D1D9E8; }
[data-theme="light"] .hi-chip {
  background: rgba(255,255,255,.9); border-color: #CBD5E1; color: #334155;
}
[data-theme="light"] .hi-chip:hover { border-color: #93C5FD; color: #2563EB; }
[data-theme="light"] .hero-btn-s { border-color: #CBD5E1; color: #334155; }
[data-theme="light"] .hero-btn-s:hover { border-color: #2563EB; color: #2563EB; }

/* Map section */
[data-theme="light"] .map-sec   { background: #F0F4FA; }
[data-theme="light"] .map-wrap  { background: #D4E4F7; border-color: #B0C4DE; }
[data-theme="light"] .map-bar   { color: #475569; }
[data-theme="light"] .map-hint  { background: #FFFFFF; border-color: #CBD5E1; color: #2563EB; }
[data-theme="light"] .leg       { color: #475569; }

/* SVG districts */
[data-theme="light"] .dt         { fill: #C8DCFF; stroke: #FFFFFF; stroke-width: 1.5; }
[data-theme="light"] .dt:hover   { fill: #93C5FD; filter: drop-shadow(0 0 7px rgba(37,99,235,.45)); }
[data-theme="light"] .dt.active  { fill: #3B82F6; stroke: #1D4ED8; stroke-width: 2;
                                    filter: drop-shadow(0 0 12px rgba(37,99,235,.7)); }
[data-theme="light"] .ds         { fill: #FDE68A; stroke: #FFFFFF; stroke-width: 2; }
[data-theme="light"] .ds:hover   { fill: #FCD34D; filter: drop-shadow(0 0 9px rgba(217,119,6,.55)); }
[data-theme="light"] .ds.active  { fill: #F59E0B; stroke: #D97706; stroke-width: 2;
                                    filter: drop-shadow(0 0 18px rgba(245,158,11,.9)); }
[data-theme="light"] .dsh        { fill: #A7F3D0; stroke: #FFFFFF; stroke-width: 2; }
[data-theme="light"] .dsh:hover  { fill: #6EE7B7; filter: drop-shadow(0 0 7px rgba(16,185,129,.5)); }
[data-theme="light"] .dsh.active { fill: #10B981; stroke: #059669; stroke-width: 2;
                                    filter: drop-shadow(0 0 12px rgba(16,185,129,.8)); }
[data-theme="light"] .dc         { fill: rgba(219,234,254,.65); stroke: #3B82F6; }
[data-theme="light"] .dc:hover   { fill: rgba(147,197,253,.5); }
[data-theme="light"] .dc.active  { fill: rgba(59,130,246,.35); stroke: #1D4ED8; }

/* SVG labels */
[data-theme="light"] .lbl  { fill: #1E3A8A; }
[data-theme="light"] .lbl2 { fill: #7C2D12; }
[data-theme="light"] .lbl3 { fill: #065F46; }
[data-theme="light"] .lbl4 { fill: #1D4ED8; }
[data-theme="light"] .rvr  { stroke: #2563EB; opacity: .4; }
[data-theme="light"] .mnt  { opacity: .3; fill: #8899AA; }

/* ── Инфратузилма SVG — оқ мавзу учун хира ── */
[data-theme="light"] .infra-rail     { stroke: #90A4BE; stroke-width: 1.8; opacity: .3; }
[data-theme="light"] .infra-road     { stroke: #607090; stroke-width: 2;   opacity: .25; }
[data-theme="light"] .infra-gas-pipe { stroke: #B06820; opacity: .22; }
[data-theme="light"] .infra-road-2   { stroke: #9AA8BC; opacity: .18; }
[data-theme="light"] .infra-elec     { opacity: .08; }

/* ── Газ, заводлар, аэропорт — оқ мавзу ── */
[data-theme="light"] .infra-gas-lbl   { fill: #92600A !important; }
[data-theme="light"] .fct-body        { fill: #8090A8; stroke: #6080A0; }
[data-theme="light"] .fct-chimney     { fill: #6A7C96; stroke: #5570A0; }
[data-theme="light"] .ies-lbl         { fill: #2A4060 !important; }
[data-theme="light"] .reservoir-lbl   { fill: #1D4ED8 !important; }
[data-theme="light"] .apt-cross       { stroke: #2A6090; opacity: .55; }
[data-theme="light"] .apt-lbl         { fill: #1D4ED8 !important; }

/* ── Тахтакарача довон — оқ мавзу ── */
[data-theme="light"] #pass-path           { stroke: #8AA0B8; opacity: .5; }
[data-theme="light"] .pass-sw             { stroke: #8AA0B8; opacity: .35; }
[data-theme="light"] .pass-mnt            { fill: #8A9DB5; stroke: #9AAFC8; opacity: .55; }
[data-theme="light"] .pass-snow           { fill: #F0F4FF; stroke: #C8D8EC; opacity: .7; }
[data-theme="light"] .pass-dot            { fill: #4A6080; stroke: #6A85A8; }
[data-theme="light"] .pass-label-bg       { fill: rgba(220,232,248,.92); stroke: #9AB8D8; }
[data-theme="light"] .pass-label-t1       { fill: #2A5080 !important; }
[data-theme="light"] .pass-label-t2       { fill: #4A6890 !important; }
[data-theme="light"] .pass-dir            { fill: #3A6090 !important; }
/* Асосий тоғлар (shimol-sharq) — оқ мавзу */
[data-theme="light"] .mnt polygon         { fill: #8899AA; stroke: #99AABC; }

/* Panel */
[data-theme="light"] .panel      { background: #FFFFFF; border-left-color: #D1D9E8; }
[data-theme="light"] .panel-ph   { background: #FFFFFF; }
[data-theme="light"] .ph-title   { color: #334155; }
[data-theme="light"] .ph-sub     { color: #64748B; }
[data-theme="light"] .ph-chip    { background: #F1F5F9; border-color: #CBD5E1; color: #475569; }
[data-theme="light"] .p-hdr      { background: #F8FAFC; border-bottom-color: #D1D9E8; }
[data-theme="light"] .p-title    { color: #0F172A; }
[data-theme="light"] .p-sub      { color: #475569; }
[data-theme="light"] .p-close    { background: #E2E8F0; color: #475569; }
[data-theme="light"] .p-close:hover { background: #EF4444; color: #FFFFFF; }
[data-theme="light"] .p-tabs     { background: #F8FAFC; border-bottom-color: #D1D9E8; }
[data-theme="light"] .tab-btn    { color: #64748B; }
[data-theme="light"] .tab-btn:hover  { color: #2563EB; background: #EFF6FF; }
[data-theme="light"] .tab-btn.active { color: #2563EB; border-bottom-color: #2563EB; }
[data-theme="light"] .p-tabs-body { background: #FFFFFF; }

/* Overview tab */
[data-theme="light"] .stat-card  { background: #F1F5F9; border-color: #D1D9E8; }
[data-theme="light"] .stat-lbl   { color: #64748B; }
[data-theme="light"] .stat-val   { color: #0F172A; }
[data-theme="light"] .stat-unit  { color: #64748B; }
[data-theme="light"] .desc-block { background: #F8FAFC; border-color: #D1D9E8; color: #334155; }
[data-theme="light"] .econ-block { background: #F8FAFC; border-color: #D1D9E8; }
[data-theme="light"] .block-lbl  { color: #64748B; }
[data-theme="light"] .econ-val   { color: #B45309; }

/* Weather tab */
[data-theme="light"] .wx-card {
  background: linear-gradient(135deg,#EFF6FF 0%,#DBEAFE 100%);
  border-color: #93C5FD;
}
[data-theme="light"] .wx-big-temp  { color: #0F172A; }
[data-theme="light"] .wx-big-desc  { color: #2563EB; }
[data-theme="light"] .wx-big-feels { color: #64748B; }
[data-theme="light"] .wx-details   { border-top-color: rgba(0,0,0,.08); }
[data-theme="light"] .wx-d-lbl    { color: #64748B; }
[data-theme="light"] .wx-d-val    { color: #1E293B; }
[data-theme="light"] .fc-day      { background: #F1F5F9; border-color: #D1D9E8; }
[data-theme="light"] .fc-name     { color: #64748B; }
[data-theme="light"] .fc-t        { color: #0F172A; }

/* Transport tab */
[data-theme="light"] .ts-section  { border-bottom-color: #E2E8F0; }
[data-theme="light"] .ts-title    { color: #334155; }
[data-theme="light"] .ts-card     { background: #FFFFFF; border-color: #D1D9E8; }
[data-theme="light"] .ts-card-head{ background: #F8FAFC; color: #64748B; border-bottom-color: #E2E8F0; }
[data-theme="light"] .ts-row      { border-bottom-color: rgba(0,0,0,.04); }
[data-theme="light"] .ts-row:hover{ background: #F1F5F9; }
[data-theme="light"] .ts-row-title{ color: #0F172A; }
[data-theme="light"] .ts-row-meta { color: #64748B; }
[data-theme="light"] .ts-bus-num  { background: rgba(37,99,235,.1); color: #2563EB; }
[data-theme="light"] .ticket-card { background: #FFFFFF; border-color: #D1D9E8; }
[data-theme="light"] .tc-name     { color: #0F172A; }
[data-theme="light"] .tc-sub      { color: #64748B; }

/* Map/GPS tab */
[data-theme="light"] .map-link-btn { background: #F1F5F9; border-color: #D1D9E8; color: #334155; }
[data-theme="light"] .map-link-btn:hover { background: #DBEAFE; border-color: #93C5FD; color: #2563EB; }
[data-theme="light"] .gps-box      { background: #F8FAFC; border-color: #D1D9E8; }
[data-theme="light"] .gps-c-val    { color: #2563EB; }
[data-theme="light"] .gps-copy     { color: #64748B; border-color: #CBD5E1; }

/* Camera & Services tabs */
[data-theme="light"] .cam-item     { background: #FFFFFF; border-color: #D1D9E8; color: #0F172A; }
[data-theme="light"] .cam-item:hover { background: #EFF6FF; border-color: #93C5FD; }
[data-theme="light"] .cam-name     { color: #0F172A; }
[data-theme="light"] .cam-type     { color: #64748B; }
[data-theme="light"] .svc-item     { background: #FFFFFF; border-color: #D1D9E8; color: #0F172A; }
[data-theme="light"] .svc-item:hover { background: #EFF6FF; border-color: #93C5FD; }
[data-theme="light"] .svc-name     { color: #0F172A; }
[data-theme="light"] .svc-url      { color: #64748B; }
[data-theme="light"] .emrg-btn     { background: #F1F5F9; border-color: #D1D9E8; color: #0F172A; }
[data-theme="light"] .emrg-btn:hover { background: #EFF6FF; }
[data-theme="light"] .emrg-num     { color: #2563EB; }
[data-theme="light"] .emergency-title { color: #64748B; }

/* Smart services section */
[data-theme="light"] .smart-sec   { background: #F0F4FA; border-top-color: #D1D9E8; }
[data-theme="light"] .smart-badge { color: #B45309; background: rgba(180,83,9,.08); border-color: rgba(180,83,9,.2); }
[data-theme="light"] .smart-title { color: #0F172A; }
[data-theme="light"] .smart-blue  { color: #2563EB; }
[data-theme="light"] .svc-card    { background: #FFFFFF !important; box-shadow: 0 2px 10px rgba(0,0,0,.07); }
[data-theme="light"] .sc-name     { color: #0F172A; }
[data-theme="light"] .sc-desc     { color: #475569; }

/* Footer */
[data-theme="light"] .site-footer  { background: #FFFFFF; border-top-color: #D1D9E8; }
[data-theme="light"] .footer-logo  { color: #2563EB; }
[data-theme="light"] .footer-copy  { color: #334155; }
[data-theme="light"] .footer-sep   { color: #CBD5E1; }
[data-theme="light"] .footer-decree{ color: #64748B; }
[data-theme="light"] .footer-dev   { color: #64748B; }

/* Status bar */
[data-theme="light"] .statusbar {
  background: #FFFFFF; border-top-color: #D1D9E8;
  color: #475569; box-shadow: 0 -1px 4px rgba(0,0,0,.06);
}
[data-theme="light"] #sbActive { color: #2563EB; }

/* Toast */
[data-theme="light"] .toast {
  background: #FFFFFF; border-color: #D1D9E8;
  color: #0F172A; box-shadow: 0 4px 20px rgba(0,0,0,.14);
}

/* Theme toggle button in light mode */
[data-theme="light"] .theme-toggle {
  background: #F1F5F9; border-color: #CBD5E1; color: #334155;
}
[data-theme="light"] .theme-toggle:hover { border-color: #2563EB; color: #2563EB; }

/* ══════════════════════════════════════════════════
   ТИЛ ТУГМАЛАРИ — LANG SWITCHER
══════════════════════════════════════════════════ */
.lang-switcher {
  display: flex; gap: 3px; align-items: center;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 22px; padding: 3px 4px; flex-shrink: 0;
}
.lang-btn {
  background: none; border: none; cursor: pointer;
  color: var(--txt-3); font-size: 11px; font-weight: 600;
  padding: 4px 9px; border-radius: 16px;
  transition: background .18s, color .18s;
  white-space: nowrap; line-height: 1;
}
.lang-btn:hover  { background: rgba(59,130,246,.12); color: var(--blue); }
.lang-btn.active {
  background: var(--blue); color: #fff;
  box-shadow: 0 2px 8px rgba(59,130,246,.35);
}
[data-theme="light"] .lang-switcher { background: #F1F5F9; border-color: #CBD5E1; }
[data-theme="light"] .lang-btn      { color: #64748B; }
[data-theme="light"] .lang-btn:hover { background: #EFF6FF; color: #2563EB; }
[data-theme="light"] .lang-btn.active { background: #2563EB; color: #fff; }

/* ══════════════════════════════════════════════════════════
   МОБИЛ МОСЛАМАШ — FULL RESPONSIVE SYSTEM
══════════════════════════════════════════════════════════ */

/* ── Drag handle (mobile only — hidden on desktop) ── */
.panel-drag-handle {
  display: none;
  width: 44px; height: 5px;
  background: var(--border-bright);
  border-radius: 3px;
  margin: 10px auto 2px;
  flex-shrink: 0;
  cursor: grab; opacity: .55;
  transition: opacity .15s;
}
.panel-drag-handle:active { opacity: .9; cursor: grabbing; }

/* ── Backdrop (mobile overlay behind panel) ── */
.panel-backdrop {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.52);
  z-index: 390;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  animation: bdrIn .25s ease;
}
@keyframes bdrIn { from{opacity:0} to{opacity:1} }
.panel-backdrop.active { display: block; }

/* ════════════════ TABLET ≤ 900px ════════════════ */
@media (max-width: 900px) {
  html, body { overflow-x: hidden; }

  /* ─── HEADER ─── */
  .hdr {
    padding: 8px 14px;
    gap: 10px;
    min-height: 54px;
    flex-wrap: nowrap;
  }
  .hdr-clock { display: none; }
  .hdr-logo-sub { display: none; }
  .hdr-logo-icon { font-size: 22px; }
  .hdr-logo-title { font-size: 15px; }
  .hdr-wx { min-width: 0; }
  .wx-desc, .wx-meta { display: none; }
  .wx-temp { font-size: 18px; }

  /* Lang btn text hidden on tablet — icons only */
  .lbt { display: none; }
  .lang-btn { padding: 5px 7px; font-size: 15px; line-height: 1; }
  .lang-switcher { gap: 2px; padding: 3px; }

  /* ─── HERO ─── */
  .hero-inner {
    flex-direction: column;
    gap: 14px;
    padding: 16px 16px 14px;
  }
  .hero-right { width: 100%; }
  .hero-stats { overflow-x: auto; justify-content: flex-start; }
  .hero-h1 { font-size: clamp(18px, 5vw, 24px); }
  .hero-desc { font-size: 12px; max-width: 100%; }
  .hero-infra-grid { display: none; }

  /* ─── MAIN — stack vertically ─── */
  .main {
    flex-direction: column;
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  /* ─── MAP SECTION ─── */
  .map-sec {
    padding: 8px 10px 6px;
    height: auto;
    flex: none;
    overflow: visible;
  }
  .map-wrap {
    height: 52vw;
    min-height: 260px;
    max-height: 420px;
    flex: none;
  }
  .map-bar { font-size: 10px; }
  .map-hint { font-size: 10px; padding: 2px 8px; }
  .legend { gap: 8px; margin-top: 6px; }
  .leg { font-size: 10px; }
  .ld { width: 12px; height: 7px; }

  /* ─── PANEL → BOTTOM SHEET ─── */
  .panel {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    width: 100%;
    height: 0;
    max-height: 0;
    border-left: none;
    border-top: 2px solid var(--border-bright);
    border-radius: 20px 20px 0 0;
    z-index: 400;
    transition:
      height   .38s cubic-bezier(.32,0,.67,0),
      max-height .38s cubic-bezier(.32,0,.67,0);
    overflow: hidden;
    box-shadow: 0 -12px 48px rgba(0,0,0,.65);
    background: var(--bg-2);
    display: flex;
    flex-direction: column;
  }
  .panel.mobile-open {
    height: 68vh;
    max-height: 68vh;
    transition:
      height    .4s cubic-bezier(.34,1.1,.64,1),
      max-height .4s cubic-bezier(.34,1.1,.64,1);
  }
  .panel-drag-handle { display: block; }
  /* Panel on mobile never shows placeholder */
  .panel-ph { display: none !important; }
  /* Panel body fills remaining space */
  .panel-body { flex: 1; overflow: hidden; }
  /* Close btn larger tap target */
  .p-close { width: 34px; height: 34px; font-size: 15px; }

  /* ─── SMART SECTION ─── */
  .smart-sec { padding: 20px 14px 24px; }
  .smart-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .smart-title { font-size: clamp(18px, 5vw, 24px); }
  .svc-card { padding: 14px 12px; }
  .sc-name { font-size: 13px; }
  .sc-desc { font-size: 11px; }

  /* ─── FOOTER ─── */
  .site-footer { padding: 12px 14px 36px; }
  .footer-main { flex-direction: column; gap: 4px; }
  .footer-sep { display: none; }
  .footer-copy, .footer-decree { font-size: 11px; }

  /* ─── STATUS BAR ─── */
  .statusbar { padding: 5px 12px; gap: 14px; font-size: 10px; }

  /* ─── TOASTS ─── */
  .toasts {
    bottom: 54px;
    width: calc(100% - 24px);
    max-width: none;
    left: 12px;
    transform: none;
  }
  .toast { white-space: normal; font-size: 12px; }

  /* ─── DARA — mobile layout ─── */
  .assist-intro {
    width: min(320px, 92vw);
    /* centered position stays — just narrower on mobile */
  }
  .assist-chat {
    left: 0 !important; right: 0 !important;
    bottom: 0 !important; top: auto !important;
    width: 100% !important;
    border-radius: 20px 20px 0 0 !important;
    height: 80vh !important;
    max-height: 80vh;
  }
  .assist-float {
    bottom: 58px;
    right: 14px;
  }
}

/* ════════════════ PHONE ≤ 520px ════════════════ */
@media (max-width: 520px) {
  .hdr-logo-icon { font-size: 20px; }
  .hdr-logo-title { font-size: 13px; }
  .theme-toggle-lbl { display: none; }
  .theme-toggle { padding: 6px 9px; gap: 4px; }

  .map-wrap { height: 58vw; min-height: 240px; max-height: 370px; }

  .hero-actions { flex-direction: column; gap: 8px; }
  .hero-btn-p, .hero-btn-s {
    width: 100%; text-align: center;
    padding: 10px 16px; font-size: 13px;
  }
  .hs-item { padding: 7px 10px; }
  .hs-num { font-size: 17px; }
  .hs-lbl { font-size: 7px; }

  .smart-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .svc-card { padding: 12px 10px; }
  .sc-icon { width: 38px; height: 38px; font-size: 18px; margin-bottom: 8px; }
  .sc-name { font-size: 12px; }
  .sc-desc { font-size: 10.5px; }
  .sc-status { font-size: 10px; padding: 2px 8px; }

  .panel.mobile-open { height: 72vh; max-height: 72vh; }

  .p-title { font-size: 15px; }
  .p-sub   { font-size: 10px; }
  .tab-btn { padding: 9px 9px; font-size: 11px; }

  .wx-big-temp { font-size: 42px; }
  .wx-big-icon { font-size: 38px; }
}

/* ════════════════ VERY SMALL ≤ 360px ════════════════ */
@media (max-width: 360px) {
  .hdr { padding: 7px 10px; gap: 7px; }
  .hdr-logo-icon { display: none; }
  .hdr-logo-title { font-size: 12px; }
  .lang-btn { padding: 5px 5px; font-size: 13px; }

  .map-wrap { height: 62vw; min-height: 220px; }

  .smart-grid { grid-template-columns: 1fr 1fr; gap: 6px; }
  .hs-item { padding: 6px 8px; }
  .hs-num { font-size: 15px; }

  .panel.mobile-open { height: 76vh; max-height: 76vh; }
}

/* ════════════════ LANDSCAPE PHONE ════════════════ */
@media (max-width: 900px) and (orientation: landscape) and (max-height: 500px) {
  .hero-sec { display: none; } /* скрыть hero в ландшафте — больше места для карты */
  .map-wrap { height: 55vh; max-height: none; }
  .panel.mobile-open { height: 78vh; max-height: 78vh; }
  .hdr { min-height: 46px; padding: 5px 12px; }
}

/* ═══════════════════════════════════════════════════════════
   ОНЛАЙН ЁРДАМЧИ — DARA
═══════════════════════════════════════════════════════════ */

/* ── Intro Card — тепадан учиб келади ── */
.assist-intro {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  z-index: 601;
  width: min(340px, 88vw);
  background: var(--bg-1);
  border: 1px solid var(--border-bright);
  border-radius: 20px;
  padding: 22px 18px 16px;
  box-shadow: 0 24px 80px rgba(0,0,0,.65), 0 0 0 1px rgba(59,130,246,.2);
  animation: dara-fly-in .65s cubic-bezier(.34,1.3,.64,1) both;
}
@keyframes dara-fly-in {
  0%   { opacity:0;  transform: translate(-50%, calc(-50% - 110vh)) scale(.55); }
  68%  { opacity:1;  transform: translate(-50%, calc(-50% + 14px))  scale(1.02); }
  100% { opacity:1;  transform: translate(-50%, -50%)                scale(1);   }
}
/* Fly-out — JS томонидан классни қўшиш орқали ишлайди */
.assist-intro.dara-fly-out {
  animation: none !important;
  /* transform ва opacity JS орқали ўрнатилади */
}
/* Backdrop dimmer behind DARA intro */
.dara-backdrop {
  position: fixed; inset: 0; z-index: 600;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: bdrIn .3s ease;
}

.assist-avatar-wrap {
  display: flex; align-items: center; gap: 10px; margin-bottom: 12px;
}
.assist-avatar {
  width: 56px; height: 56px; position: relative; flex-shrink: 0;
}
.assist-avatar svg { width: 100%; height: 100%; }
.assist-glow-ring {
  position: absolute; inset: -4px; border-radius: 50%;
  border: 2px solid rgba(59,130,246,.4);
  animation: assist-ring 2.5s ease-in-out infinite;
}
@keyframes assist-ring {
  0%,100% { transform: scale(1); opacity:.4; }
  50%      { transform: scale(1.15); opacity:.9; }
}
.assist-name { font-size: 15px; font-weight: 800; color: var(--blue); letter-spacing: 2px; }
.assist-role { font-size: 10px; color: var(--txt-3); margin-top: 1px; }

.assist-bubble {
  background: rgba(30,58,95,.4); border: 1px solid rgba(59,130,246,.2);
  border-radius: 12px; padding: 10px 12px; min-height: 44px;
  font-size: 12px; line-height: 1.6; color: var(--txt); margin-bottom: 10px;
}
.assist-typing { display: flex; gap: 4px; align-items: center; height: 20px; }
.assist-typing span {
  width: 6px; height: 6px; border-radius: 50%; background: var(--blue); display: block;
  animation: assist-dot 1.2s ease-in-out infinite;
}
.assist-typing span:nth-child(2) { animation-delay: .2s; }
.assist-typing span:nth-child(3) { animation-delay: .4s; }
@keyframes assist-dot {
  0%,80%,100% { transform: scale(.7); opacity:.4; }
  40%         { transform: scale(1);  opacity:1; }
}
.assist-msg { font-size: 12px; line-height: 1.65; color: var(--txt); }

.assist-actions {
  display: flex; gap: 8px; margin-top: 4px;
}
.assist-btn-ok {
  flex: 1; padding: 7px 0; border-radius: 8px; border: none; cursor: pointer;
  background: var(--blue); color: #fff; font-size: 12px; font-weight: 600;
  transition: filter .2s;
}
.assist-btn-ok:hover { filter: brightness(1.15); }
.assist-btn-help {
  flex: 1; padding: 7px 0; border-radius: 8px; cursor: pointer;
  background: transparent; border: 1px solid var(--border); color: var(--txt-2);
  font-size: 12px; transition: border-color .2s, color .2s;
}
.assist-btn-help:hover { border-color: var(--blue); color: var(--blue); }

/* ── Floating bubble ── */
.assist-float {
  position: fixed; bottom: 70px; right: 18px; z-index: 601;
  width: 48px; height: 48px; border-radius: 50%; cursor: pointer;
  background: var(--bg-1); border: 2px solid var(--blue);
  box-shadow: 0 4px 20px rgba(59,130,246,.35);
  display: none; /* shown after intro dismissed */
  align-items: center; justify-content: center;
  transition: transform .2s, box-shadow .2s;
}
.assist-float:hover { transform: scale(1.1); box-shadow: 0 6px 28px rgba(59,130,246,.55); }
.assist-float.visible { display: flex; animation: assist-fly-in .55s cubic-bezier(.34,1.56,.64,1) both; }
@keyframes assist-fly-in {
  from { opacity:0; transform: scale(.4) translate(140px,-80px); }
  to   { opacity:1; transform: scale(1) translate(0,0); }
}
.assist-float-avatar { width: 32px; height: 32px; position: relative; }
.assist-float-avatar svg { width: 100%; height: 100%; }
.assist-float-pulse {
  position: absolute; inset: -3px; border-radius: 50%;
  border: 1.5px solid rgba(59,130,246,.35);
  animation: assist-ring 2.5s ease-in-out infinite;
}
.assist-float-dot {
  position: absolute; top: 2px; right: 2px;
  width: 10px; height: 10px; border-radius: 50%;
  background: #22C55E; border: 2px solid var(--bg-1);
}

/* ── Chat popup ── */
.assist-chat {
  position: fixed; bottom: 126px; right: 18px; z-index: 602;
  width: 300px; background: var(--bg-1); border: 1px solid var(--border);
  border-radius: 16px; overflow: hidden;
  box-shadow: 0 12px 40px rgba(0,0,0,.4);
  animation: assist-pop .3s cubic-bezier(.34,1.56,.64,1) both;
  transform-origin: bottom right;
}
.assist-chat-hdr {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 14px; background: rgba(30,58,95,.5);
  border-bottom: 1px solid var(--border);
}
.assist-chat-title { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--blue); }
.assist-chat-icon { font-size: 16px; }
.assist-chat-status { font-size: 10px; color: #22C55E; font-weight: 600; }
.assist-chat-close {
  background: none; border: none; color: var(--txt-3); cursor: pointer;
  font-size: 15px; padding: 2px 5px; border-radius: 5px;
  transition: background .2s;
}
.assist-chat-close:hover { background: rgba(239,68,68,.15); color: #EF4444; }
.assist-chat-msgs {
  padding: 12px; display: flex; flex-direction: column; gap: 8px;
  max-height: 220px; overflow-y: auto;
  scrollbar-width: thin; scrollbar-color: var(--border) transparent;
}
.asmsg { max-width: 90%; font-size: 12px; line-height: 1.6; padding: 7px 10px; border-radius: 10px; }
.asmsg-bot { background: rgba(30,58,95,.5); color: var(--txt); align-self: flex-start; border-radius: 4px 10px 10px 10px; }
.asmsg-user { background: var(--blue); color: #fff; align-self: flex-end; border-radius: 10px 4px 10px 10px; }
.assist-chat-input {
  display: flex; border-top: 1px solid var(--border);
  padding: 8px 10px; gap: 6px;
}
.assist-chat-input input {
  flex: 1; background: var(--bg-0); border: 1px solid var(--border);
  border-radius: 8px; padding: 6px 10px; font-size: 12px; color: var(--txt);
  outline: none;
}
.assist-chat-input input:focus { border-color: var(--blue); }
.assist-chat-input button {
  background: var(--blue); color: #fff; border: none; border-radius: 8px;
  padding: 6px 12px; cursor: pointer; font-size: 14px; transition: filter .2s;
}
.assist-chat-input button:hover { filter: brightness(1.15); }

/* Idle ask bubble */
.assist-idle-ask {
  position: fixed; bottom: 126px; right: 18px; z-index: 602;
  background: var(--bg-1); border: 1px solid rgba(59,130,246,.3);
  border-radius: 12px; padding: 10px 14px; font-size: 12px;
  color: var(--txt); max-width: 220px; cursor: pointer;
  box-shadow: 0 4px 20px rgba(0,0,0,.3);
  animation: assist-pop .3s cubic-bezier(.34,1.56,.64,1) both;
  transform-origin: bottom right;
}
.assist-idle-ask:hover { border-color: var(--blue); }

/* ── Light theme ── */
[data-theme="light"] .assist-intro,
[data-theme="light"] .assist-float,
[data-theme="light"] .assist-chat  { background: #FFFFFF; border-color: #D1D9E8; }
[data-theme="light"] .assist-bubble { background: #EFF6FF; border-color: #BFDBFE; }
[data-theme="light"] .assist-btn-help { background: #F8FAFC; color: #475569; border-color: #CBD5E1; }
[data-theme="light"] .assist-chat-hdr { background: #EFF6FF; }
[data-theme="light"] .asmsg-bot { background: #F1F5F9; color: #0F172A; }
[data-theme="light"] .assist-chat-input input { background: #F8FAFC; color: #0F172A; border-color: #D1D9E8; }
[data-theme="light"] .assist-idle-ask { background: #FFFFFF; color: #0F172A; border-color: #BFDBFE; }
[data-theme="light"] .assist-float-dot { border-color: #FFFFFF; }


/* =======================================================
   PROVINCE BOARD — Viloyat Holat Paneli
======================================================= */
.province-board {
  position: fixed; inset: 0; z-index: 750;
  display: flex; align-items: center; justify-content: center;
  background: rgba(4,10,22,.88); backdrop-filter: blur(12px) saturate(1.3);
  opacity: 0; pointer-events: none;
  transition: opacity .45s ease;
}
.province-board.pb-show { opacity: 1; pointer-events: all; }
.province-board.pb-hide  { opacity: 0; pointer-events: none; }

.pb-panel {
  width: min(97vw,1120px); max-height: 92vh;
  background: var(--bg-1); border: 1px solid var(--border-bright);
  border-radius: 20px; overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: 0 40px 120px rgba(0,0,0,.75), 0 0 0 1px rgba(59,130,246,.12);
  transform: translateY(30px) scale(.97);
  transition: transform .5s cubic-bezier(.34,1.2,.64,1);
}
.pb-show .pb-panel { transform: translateY(0) scale(1); }
.pb-hide .pb-panel { transform: translateY(18px) scale(.98); }

.pb-hdr {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 13px 18px; flex-shrink: 0;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(90deg, rgba(15,32,64,.9) 0%, rgba(11,22,40,.9) 100%);
}
.pb-hdr-left  { display: flex; align-items: center; gap: 11px; min-width: 0; }
.pb-hdr-ico   { font-size: 22px; flex-shrink: 0; }
.pb-hdr-title { font-size: 14px; font-weight: 800; color: var(--txt); }
.pb-hdr-sub   { font-size: 11px; color: var(--txt-3); margin-top: 1px; }
.pb-hdr-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.pb-live-pill {
  display: flex; align-items: center; gap: 5px;
  background: rgba(16,185,129,.12); border: 1px solid rgba(16,185,129,.32);
  color: #10B981; border-radius: 20px; padding: 3px 9px;
  font-size: 10.5px; font-weight: 700; letter-spacing: .04em;
}
.pb-live-dot {
  width: 7px; height: 7px; background: #10B981; border-radius: 50%;
  animation: pbDot 1.3s ease-in-out infinite;
}
@keyframes pbDot { 0%,100%{ opacity:1; transform:scale(1) } 50%{ opacity:.38; transform:scale(.6) } }
.pb-hdr-dt { font-size: 11px; color: var(--txt-3); white-space: nowrap; }
.pb-close {
  width: 30px; height: 30px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--bg-2);
  color: var(--txt-3); font-size: 14px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s, color .2s, border-color .2s;
}
.pb-close:hover { background: var(--border); color: var(--txt); border-color: var(--border-bright); }

.pb-body {
  flex: 1; overflow-y: auto; padding: 12px 12px 8px;
  display: flex; flex-direction: column; gap: 10px;
  scrollbar-width: thin; scrollbar-color: var(--border) transparent;
}
.pb-row    { display: flex; gap: 10px; align-items: stretch; }
.pb-row-sm { flex-wrap: wrap; }

.pb-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 14px; padding: 11px 13px;
  opacity: 0; transform: translateY(14px);
  transition: opacity .38s ease, transform .38s ease, border-color .25s;
}
.pb-card:hover { border-color: var(--border-bright); }
.pb-card.pb-in { opacity: 1; transform: translateY(0); }
.pb-card-hd {
  display: flex; align-items: center; gap: 7px;
  margin-bottom: 9px; padding-bottom: 7px; border-bottom: 1px solid var(--border);
}
.pb-card-hd > span:first-child { font-size: 15px; flex-shrink: 0; }
.pb-card-title { font-size: 12px; font-weight: 700; color: var(--txt); flex: 1; }
.pb-card-time  { font-size: 10px; color: var(--txt-3); white-space: nowrap; }

.pb-card-w { flex: 0 0 63%; min-width: 0; }
.pb-w-grid { display: grid; grid-template-columns: repeat(7,1fr); gap: 6px; }
.pb-w-item {
  background: var(--bg-2); border: 1px solid var(--border); border-radius: 10px;
  padding: 7px 4px; text-align: center; cursor: default;
  opacity: 0; transform: scale(.8);
  transition: opacity .25s ease, transform .25s ease, border-color .2s;
}
.pb-w-item.pb-wi-in { opacity: 1; transform: scale(1); }
.pb-w-item:hover    { border-color: var(--border-bright); transform: scale(1.05) !important; }
.pb-w-ico  { font-size: 19px; line-height: 1.2; }
.pb-w-name { font-size: 9px; font-weight: 600; color: var(--txt); margin-top: 3px;
             overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pb-w-temp { font-size: 13px; font-weight: 800; color: var(--blue); margin-top: 2px; }
.pb-w-cond { font-size: 8.5px; color: var(--txt-3); margin-top: 1px; line-height: 1.3; }
.pb-w-sunny { border-color: rgba(245,158,11,.38) !important; }
.pb-w-rain  { border-color: rgba(59,130,246,.5) !important; background: rgba(59,130,246,.06) !important; }
.pb-w-storm { border-color: rgba(168,85,247,.5) !important; background: rgba(168,85,247,.07) !important; }
.pb-w-snow  { border-color: rgba(147,210,255,.5) !important; background: rgba(147,210,255,.06) !important; }
.pb-w-cloud { border-color: rgba(100,116,139,.38) !important; }

.pb-card-land { flex: 1; min-width: 0; }
.pb-land-item { margin-bottom: 10px; }
.pb-land-item:last-child { margin-bottom: 0; }
.pb-land-lrow { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.pb-land-lbl  { font-size: 10.5px; color: var(--txt-2); }
.pb-land-val  { font-size: 11px; font-weight: 700; color: var(--txt); }
.pb-land-bar  { height: 8px; background: var(--bg-2); border-radius: 4px; overflow: hidden; }
.pb-land-fill { height: 100%; border-radius: 4px; width: 0;
  transition: width 1.4s cubic-bezier(.34,1.1,.64,1) .3s; }
.pb-land-note { font-size: 9.5px; color: var(--txt-3); margin-top: 3px; }

.pb-card-acc,.pb-card-tr,.pb-card-ec,.pb-card-cp { flex: 1; min-width: 180px; }

.pb-acc-top { display: flex; gap: 7px; margin-bottom: 9px; }
.pb-acc-box { flex: 1; background: var(--bg-2); border-radius: 9px; padding: 7px 6px; text-align: center; }
.pb-acc-n   { font-size: 26px; font-weight: 900; line-height: 1.1; }
.pb-acc-nl  { font-size: 9.5px; color: var(--txt-3); margin-top: 2px; }
.pb-acc-list{ display: flex; flex-direction: column; gap: 5px; }
.pb-acc-row { display: flex; align-items: flex-start; gap: 6px; }
.pb-acc-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; margin-top: 3px; }
.pb-acc-txt { font-size: 10px; color: var(--txt-2); line-height: 1.4; }

.pb-tr-list { display: flex; flex-direction: column; gap: 7px; }
.pb-tr-row  { display: flex; align-items: center; gap: 8px; }
.pb-tr-ind  { width: 11px; height: 11px; border-radius: 50%; flex-shrink: 0; }
.pb-tr-ind.c-green  { background: #22C55E; box-shadow: 0 0 7px rgba(34,197,94,.6); }
.pb-tr-ind.c-yellow { background: #EAB308; box-shadow: 0 0 7px rgba(234,179,8,.6); }
.pb-tr-ind.c-red    { background: var(--red); box-shadow: 0 0 7px rgba(239,68,68,.6); }
.pb-tr-road   { font-size: 10.5px; color: var(--txt); flex: 1; line-height: 1.3; }
.pb-tr-status { font-size: 10px; font-weight: 600; white-space: nowrap; }
.pb-tr-status.c-green  { color: #22C55E; }
.pb-tr-status.c-yellow { color: #EAB308; }
.pb-tr-status.c-red    { color: var(--red); }

.pb-ec-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.pb-ec-box  { background: var(--bg-2); border-radius: 9px; padding: 8px 9px; }
.pb-ec-val  { font-size: 18px; font-weight: 900; line-height: 1.1; }
.pb-ec-val.c-green  { color: #22C55E; }
.pb-ec-val.c-blue   { color: var(--blue); }
.pb-ec-val.c-gold   { color: var(--gold); }
.pb-ec-val.c-orange { color: #F97316; }
.pb-ec-lbl  { font-size: 9.5px; color: var(--txt-3); margin-top: 3px; line-height: 1.3; }

.pb-cp-top  { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.pb-cp-ring { position: relative; width: 58px; height: 58px; flex-shrink: 0; }
.pb-cp-ring svg { width: 58px; height: 58px; transform: rotate(-90deg); }
.pb-cp-pct  {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800; color: var(--blue);
}
.pb-cp-nums { flex: 1; }
.pb-cp-row  { display: flex; justify-content: space-between; padding: 2.5px 0; }
.pb-cp-row + .pb-cp-row { border-top: 1px solid var(--border); }
.pb-cp-k    { font-size: 10px; color: var(--txt-3); }
.pb-cp-v    { font-size: 11px; font-weight: 700; color: var(--txt); }
.pb-cp-v.c-green { color: #22C55E; }
.pb-cp-bars { display: flex; height: 5px; border-radius: 3px; overflow: hidden; gap: 1px; margin-top: 6px; }
.pb-cp-b    { height: 100%; border-radius: 2px; }

.pb-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 18px; flex-shrink: 0;
  border-top: 1px solid var(--border); background: var(--bg-card);
}
.pb-footer-txt { font-size: 11px; color: var(--txt-3); }
.pb-go-btn {
  background: var(--blue); color: #fff; border: none;
  border-radius: 10px; padding: 8px 20px;
  font-size: 13px; font-weight: 700; cursor: pointer;
  transition: background .2s, transform .15s;
}
.pb-go-btn:hover  { background: var(--blue-d); transform: translateY(-1px); }
.pb-go-btn:active { transform: translateY(0); }

@media (max-width: 900px) {
  .pb-panel { width:100%; height:100%; max-height:100%; border-radius:0; }
  .pb-row { flex-direction: column; }
  .pb-card-w, .pb-card-land { flex: none; }
  .pb-w-grid { grid-template-columns: repeat(4,1fr); }
  .pb-row-sm { flex-direction: row; }
  .pb-card-acc,.pb-card-tr,.pb-card-ec,.pb-card-cp { flex: 0 0 calc(50% - 5px); min-width: 0; }
}
@media (max-width: 520px) {
  .pb-hdr-dt { display: none; }
  .pb-hdr-title { font-size: 12.5px; }
  .pb-w-grid { grid-template-columns: repeat(4,1fr); gap: 4px; }
  .pb-w-ico  { font-size: 15px; }
  .pb-w-temp { font-size: 11px; }
  .pb-card-acc,.pb-card-tr,.pb-card-ec,.pb-card-cp { flex: 0 0 calc(50% - 5px); }
  .pb-acc-n  { font-size: 20px; }
  .pb-ec-val { font-size: 15px; }
}


/* =======================================================
   MEDIA STRIP & MODAL — TV va Radio
======================================================= */

/* Media strip */
.media-strip {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
  overflow: hidden;
  flex-shrink: 0;
}
.media-strip-inner {
  max-width: 1400px; margin: 0 auto;
  padding: 0 18px;
  display: flex; align-items: center; gap: 14px;
  overflow-x: auto; scrollbar-width: none;
}
.media-strip-inner::-webkit-scrollbar { display: none; }
.media-strip-lbl {
  font-size: 11px; font-weight: 700; color: var(--txt-3);
  white-space: nowrap; letter-spacing: .06em; flex-shrink: 0;
  text-transform: uppercase;
}
.media-strip-list {
  display: flex; gap: 8px; align-items: center; overflow-x: auto;
  scrollbar-width: none; flex: 1;
}
.media-strip-list::-webkit-scrollbar { display: none; }

/* Channel card */
.mc-card {
  display: flex; align-items: center; gap: 9px;
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: 12px; padding: 7px 12px 7px 10px;
  cursor: pointer; white-space: nowrap; flex-shrink: 0;
  transition: background .2s, border-color .2s, transform .15s, box-shadow .2s;
  text-decoration: none; color: inherit;
}
.mc-card:hover {
  background: var(--bg-hover); border-color: var(--border-bright);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,.35);
}
.mc-card:active { transform: translateY(0); }
.mc-card-ico  { font-size: 18px; line-height: 1; }
.mc-card-info { display: flex; flex-direction: column; gap: 1px; }
.mc-card-name { font-size: 11.5px; font-weight: 700; color: var(--txt); }
.mc-card-badge{
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 9.5px; font-weight: 600;
}
.mc-live-dot {
  width: 6px; height: 6px; border-radius: 50%;
  display: inline-block; flex-shrink: 0;
  animation: mcDot 1.2s ease-in-out infinite;
}
@keyframes mcDot { 0%,100%{opacity:1; transform:scale(1)} 50%{opacity:.35; transform:scale(.6)} }

/* Media Modal */
.media-modal {
  position: fixed; inset: 0; z-index: 800;
  display: flex; align-items: center; justify-content: center;
  background: rgba(4,10,22,.9); backdrop-filter: blur(12px);
  opacity: 0; pointer-events: none;
  transition: opacity .35s ease;
}
.media-modal.mm-show { opacity: 1; pointer-events: all; }
.media-modal.mm-hide { opacity: 0; pointer-events: none; }

.media-window {
  width: min(95vw, 860px);
  background: var(--bg-1);
  border: 1px solid var(--border-bright);
  border-radius: 18px; overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: 0 32px 100px rgba(0,0,0,.8), 0 0 0 1px rgba(59,130,246,.12);
  transform: scale(.95) translateY(16px);
  transition: transform .4s cubic-bezier(.34,1.2,.64,1);
}
.mm-show .media-window { transform: scale(1) translateY(0); }
.mm-hide .media-window { transform: scale(.96) translateY(12px); }

/* Window header */
.media-win-hdr {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 16px; flex-shrink: 0;
  border-bottom: 1px solid var(--border);
  background: var(--bg-card);
}
.media-win-left  { display: flex; align-items: center; gap: 10px; min-width: 0; }
.media-win-ico   { font-size: 22px; flex-shrink: 0; }
.media-win-title { font-size: 14px; font-weight: 800; color: var(--txt); }
.media-win-desc  { font-size: 10.5px; color: var(--txt-3); margin-top: 1px; }
.media-win-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.media-win-badge {
  font-size: 10.5px; font-weight: 700;
  background: rgba(239,68,68,.14); border: 1px solid rgba(239,68,68,.35);
  color: #F87171; border-radius: 20px; padding: 2px 8px;
}
.media-win-badge.on-air {
  background: rgba(16,185,129,.12); border-color: rgba(16,185,129,.3);
  color: #34D399;
}
.media-ext-btn {
  width: 30px; height: 30px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--bg-2);
  color: var(--txt-3); font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  text-decoration: none; transition: background .2s, color .2s;
}
.media-ext-btn:hover { background: var(--border-bright); color: var(--txt); }
.media-close {
  width: 30px; height: 30px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--bg-2);
  color: var(--txt-3); font-size: 14px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s, color .2s;
}
.media-close:hover { background: rgba(239,68,68,.2); color: #F87171; border-color: rgba(239,68,68,.4); }

/* Window body — YouTube */
.media-win-body { flex: 1; min-height: 0; background: #000; }
.media-win-body iframe {
  width: 100%; aspect-ratio: 16/9;
  border: none; display: block;
}

/* Radio player */
.radio-player {
  display: flex; flex-direction: column; align-items: center;
  padding: 32px 24px 28px; gap: 20px;
  background: linear-gradient(135deg, var(--bg-1) 0%, var(--bg-2) 100%);
}
.radio-art {
  width: 100px; height: 100px; border-radius: 50%;
  background: var(--bg-card); border: 3px solid var(--border-bright);
  display: flex; align-items: center; justify-content: center;
  font-size: 44px; animation: rSpin 12s linear infinite;
  box-shadow: 0 0 30px rgba(59,130,246,.25);
}
@keyframes rSpin { from{transform:rotate(0deg)} to{transform:rotate(360deg)} }
.radio-art.paused { animation-play-state: paused; }
.radio-name { font-size: 18px; font-weight: 800; color: var(--txt); }
.radio-freq { font-size: 12px; color: var(--txt-3); }

/* Equalizer bars */
.radio-eq {
  display: flex; align-items: flex-end; gap: 4px;
  height: 36px; width: 80px;
}
.radio-eq-bar {
  flex: 1; background: var(--blue); border-radius: 2px 2px 0 0;
  animation: eqBar 0.8s ease-in-out infinite;
}
.radio-eq-bar:nth-child(1) { animation-duration: 0.6s; animation-delay: 0s; }
.radio-eq-bar:nth-child(2) { animation-duration: 0.8s; animation-delay: .1s; }
.radio-eq-bar:nth-child(3) { animation-duration: 0.5s; animation-delay: .2s; }
.radio-eq-bar:nth-child(4) { animation-duration: 0.9s; animation-delay: .05s; }
.radio-eq-bar:nth-child(5) { animation-duration: 0.7s; animation-delay: .15s; }
@keyframes eqBar {
  0%,100% { height: 30%; }
  50%      { height: 100%; }
}
.radio-eq.paused .radio-eq-bar { animation-play-state: paused; height: 30% !important; }

.radio-status { font-size: 12px; color: var(--txt-3); }
.radio-status.live { color: #34D399; }

/* Custom audio controls */
.radio-controls {
  display: flex; align-items: center; gap: 12px; width: 100%; max-width: 340px;
}
.radio-play-btn {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--blue); border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
  transition: background .2s, transform .15s;
}
.radio-play-btn:hover { background: var(--blue-d); transform: scale(1.08); }
.radio-vol-wrap { flex: 1; display: flex; align-items: center; gap: 8px; }
.radio-vol-ico   { font-size: 15px; cursor: pointer; }
.radio-vol-slider {
  -webkit-appearance: none; appearance: none;
  flex: 1; height: 4px; border-radius: 2px;
  background: var(--border-bright); outline: none; cursor: pointer;
}
.radio-vol-slider::-webkit-slider-thumb {
  -webkit-appearance: none; width: 14px; height: 14px;
  border-radius: 50%; background: var(--blue); cursor: pointer;
}
.radio-fallback {
  font-size: 11px; color: var(--txt-3); text-align: center;
}
.radio-fallback a { color: var(--blue); text-decoration: none; }
.radio-fallback a:hover { text-decoration: underline; }

/* Mobile */
@media (max-width: 900px) {
  .media-window { width: 100%; border-radius: 20px 20px 0 0; align-self: flex-end; }
  .media-modal  { align-items: flex-end; }
  .media-win-title { font-size: 13px; }
}
@media (max-width: 520px) {
  .media-strip-lbl { display: none; }
  .mc-card { padding: 6px 10px 6px 8px; }
  .mc-card-ico { font-size: 16px; }
  .mc-card-name { font-size: 11px; }
}

/* ── HLS player loading spinner ── */
@keyframes hlsSpin {
  to { transform: rotate(360deg); }
}
.hls-spin {
  width: 36px; height: 36px;
  border: 3px solid rgba(255,255,255,.12);
  border-top-color: #3B82F6;
  border-radius: 50%;
  animation: hlsSpin .8s linear infinite;
}
