/* Темы: дизайн × день/ночь. «Классика-день» — без атрибута, тогда этот файл ничего не меняет. */
html[data-theme="classic-night"] {
  --bg: #121212; --panel: #1c1c1e; --surface: #26262a; --line: #34343a; --text: #f2f2f2; --muted: #a1a1aa;
  --primary: #facc15; --on-primary: #18181b; --accent: #60a5fa; --soft: #2c2c31; --danger-bg: #3f1518; --danger: #f87171;
  --ok: #4ade80; --glow: none;
  --c-sheet: #1c1c1e; --c-page: #121212; --c-text: #f2f2f2; --c-soft: #2c2c31; --c-muted: #a1a1aa; --c-line: #34343a;
  --c-head: #facc15; --c-head-fg: #18181b;
}
html[data-theme="bibi-night"] {
  --bg: #0d0a24; --panel: #17123a; --surface: #211a4d; --line: #3a2f7a; --text: #f4f1ff; --muted: #a9a3d6;
  --primary: #ffd21f; --on-primary: #1a1033; --accent: #22d3ee; --soft: #2b2260; --danger-bg: #4a1530; --danger: #ff8aa8;
  --ok: #4ade80; --glow: 0 0 18px rgba(255, 210, 31, .45);
  --c-sheet: #17123a; --c-page: #0d0a24; --c-text: #f4f1ff; --c-soft: #2b2260; --c-muted: #a9a3d6; --c-line: #3a2f7a;
  --c-head: linear-gradient(135deg, #ffd21f, #ffb020); --c-head-fg: #1a1033;
}
html[data-theme="bibi-day"] {
  --bg: #f4f1ff; --panel: #ffffff; --surface: #f8f6ff; --line: #ddd6fe; --text: #1e1b4b; --muted: #6b67a0;
  --primary: #ffd21f; --on-primary: #1a1033; --accent: #7c3aed; --soft: #ede9fe; --danger-bg: #fee2e2; --danger: #b91c1c;
  --ok: #15803d; --glow: 0 4px 14px rgba(124, 58, 237, .18);
  --c-sheet: #ffffff; --c-page: #f4f1ff; --c-text: #1e1b4b; --c-soft: #ede9fe; --c-muted: #6b67a0; --c-line: #ddd6fe;
  --c-head: linear-gradient(135deg, #7c3aed, #22d3ee); --c-head-fg: #ffffff;
}
html[data-theme="strict-night"] {
  --bg: #000; --panel: #111113; --surface: #1c1c1f; --line: #2c2c30; --text: #fff; --muted: #9a9aa2;
  --primary: #fff; --on-primary: #000; --accent: #4ade80; --soft: #26262a; --danger-bg: #3a1214; --danger: #ff7b7b;
  --ok: #4ade80; --glow: none;
  --c-sheet: #111113; --c-page: #000; --c-text: #fff; --c-soft: #26262a; --c-muted: #9a9aa2; --c-line: #2c2c30;
  --c-head: #1c1c1f; --c-head-fg: #fff;
}
html[data-theme="strict-day"] {
  --bg: #f5f5f5; --panel: #fff; --surface: #fff; --line: #e5e5e5; --text: #000; --muted: #6b6b6b;
  --primary: #000; --on-primary: #fff; --accent: #16a34a; --soft: #efefef; --danger-bg: #fde8e8; --danger: #c81e1e;
  --ok: #16a34a; --glow: none;
  --c-sheet: #fff; --c-page: #f5f5f5; --c-text: #000; --c-soft: #efefef; --c-muted: #6b6b6b; --c-line: #e5e5e5;
  --c-head: #000; --c-head-fg: #fff;
}

html[data-theme] body { background: var(--bg); color: var(--text); }
html[data-theme] #panel { background: var(--panel); box-shadow: 0 -4px 20px rgba(0,0,0,.25); }
html[data-dark] #panel { box-shadow: 0 -4px 20px rgba(0,0,0,.5); }
html[data-theme^="bibi"] #panel { border-top: 2px solid var(--accent); }
html[data-theme="bibi-night"] #panel { box-shadow: 0 -6px 24px rgba(34,211,238,.25); }
html[data-theme] .section-head { background: var(--panel); border-bottom-color: var(--line); }
html[data-theme] input { background: var(--surface); color: var(--text); border-color: var(--line); }
html[data-theme] input::placeholder { color: var(--muted); }
html[data-theme] button { background: var(--primary); color: var(--on-primary); box-shadow: var(--glow); }
html[data-theme] button.secondary,
html[data-theme] .city-row button { background: var(--soft); color: var(--text); box-shadow: none; }
html[data-theme] button.danger { background: var(--danger-bg); color: var(--danger); box-shadow: none; }
html[data-theme^="strict"] button { border-radius: 8px; font-weight: 700; letter-spacing: .2px; }
html[data-theme^="bibi"] button { border-radius: 14px; }
html[data-theme] a { color: var(--accent); }
html[data-theme] .hint, html[data-theme] .city-row,
html[data-theme] small, html[data-theme] .history-item .comment { color: var(--muted); }
html[data-theme] #message { color: var(--danger); }
html[data-theme] .card, html[data-theme] .offer { background: var(--surface); border-color: var(--line); }
html[data-theme] #ride-box { background: var(--soft); border-color: var(--primary); }
html[data-theme] .result, html[data-theme] .history-item, html[data-theme] .doc,
html[data-theme] .ref-item, html[data-theme] .bal-row, html[data-theme] .topup-row,
html[data-theme] .topup-form { border-color: var(--line); }
html[data-theme] .stat { background: var(--surface); border-color: var(--line); }
html[data-theme] .bal-topup { background: var(--surface); }
html[data-theme] #bal-card.low { background: var(--danger-bg); border-color: var(--danger); }
html[data-theme] .ref-code { border-color: var(--primary); }
html[data-dark] .offer .price, html[data-dark] .bal-amount { color: var(--primary); }
html[data-theme="bibi-night"] .offer .price { text-shadow: 0 0 10px rgba(255,210,31,.5); }
html[data-theme="bibi-day"] .offer .price, html[data-theme="bibi-day"] .bal-amount { color: var(--accent); }
html[data-theme] .pay label { background: var(--surface); border-color: var(--line); color: var(--text); }
html[data-theme] .pay label:has(input:checked) { background: var(--soft); border-color: var(--primary); }
html[data-theme] .stars button { background: var(--surface); color: var(--line); box-shadow: none; }
html[data-theme] .stars button.on { color: var(--primary); }
html[data-theme="strict-day"] .stars button.on { color: #f5b301; }
html[data-theme] .doc .ok, html[data-theme] .ref-item small.done,
html[data-theme] .savings, html[data-theme] .bal-row .plus { color: var(--ok); }
html[data-theme] .bal-row .minus { color: var(--danger); }
html[data-dark] .badge.pending { background: #4a3a0a; color: #fde68a; }
html[data-dark] .badge.approved { background: #0f3a22; color: #86efac; }
html[data-dark] .badge.blocked { background: var(--danger-bg); color: var(--danger); }
html[data-theme] #dr .dr-item { box-shadow: none; }
html[data-theme^="bibi"] #dr { border-right: 2px solid var(--accent); }

/* Карта: ночью затемняем светлые плитки */
html[data-dark] .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.85) contrast(.9) saturate(.8); }
html[data-theme="bibi-night"] .leaflet-tile-pane { filter: invert(1) hue-rotate(200deg) brightness(.8) contrast(.95) saturate(1.3); }
html[data-dark] .leaflet-container { background: var(--bg); }
html[data-theme] .leaflet-control-zoom a,
html[data-theme] .leaflet-control-attribution { background: var(--panel) !important; color: var(--text) !important; }
html[data-theme] .leaflet-control-attribution a { color: var(--accent) !important; }
