/* ==========================================================================
   Avizo and Luka — dizayn tizimi (2-nashr)
   Namuna: qorong'i fonda rangli yorliqlar, chapda ikonkali yon panel,
   yumshoq burchakli kartalar, Helvetica Neue.

   Beshta qat'iy qoida:
   1. Bitta mavzu — faqat qorong'i. Kun/tun almashtirgichi yo'q: interfeys
      bitta muhitga to'liq moslanadi, ikkitasiga yarim-yorti emas.
   2. Chegara (border) ishlatilmaydi — bloklar fon farqi bilan ajraladi.
      Yagona istisno: jadval qatorlari orasidagi ingichka chiziq.
   3. BOSH HARFLI yorliq yo'q — o'zbekchada "o'", "g'" bilan o'qish sekinlashadi.
   4. Binafsha rang = harakat. Bo'lim tugmasi, yorliq va ikonka uni olmaydi.
   5. Har bir rang bitta ma'noga xizmat qiladi: yashil kirim, qizil chiqim,
      sariq diqqat, binafsha ortiqcha/neytral holat.
   ========================================================================== */

:root {
  color-scheme: dark;

  /* --- Sirtlar --- */
  --bg: #0C0C0E;          /* sahifa yeri */
  --yon: #171719;         /* yon panel */
  --surface-1: #1E1E21;   /* kartalar, panellar, maydonlar */
  --surface-2: #26262A;   /* ichki bloklar, jadval sarlavhasi */
  --surface-3: #303036;   /* ustiga borilganda */

  /* --- Matn --- */
  --text-1: #FFFFFF;
  --text-2: rgba(255, 255, 255, .60);
  --text-3: rgba(255, 255, 255, .34);
  --separator: rgba(255, 255, 255, .09);

  /* --- Harakat --- */
  --accent: #9D6FFF;
  --accent-pressed: #8A57F5;
  --accent-bg: rgba(157, 111, 255, .18);

  /* --- Ma'noli ranglar --- */
  --income: #4ED17E;      /* kirim */
  --expense: #FF6B6B;     /* chiqim */
  --warning: #FFC960;     /* diqqat: qarz, o'tkazilmagan */
  --overpaid: #9D6FFF;    /* ortiqcha, neytral holat */
  --kok: #6397FF;         /* ma'lumot yorlig'i */
  --pushti: #FF5FA2;      /* ikkinchi yorliq rangi */

  --income-bg: rgba(78, 209, 126, .16);
  --expense-bg: rgba(255, 107, 107, .16);
  --warning-bg: rgba(255, 201, 96, .16);
  --overpaid-bg: rgba(157, 111, 255, .16);
  --kok-bg: rgba(99, 151, 255, .16);

  --soya: none;
  --soya-tepa: 0 24px 60px rgba(0, 0, 0, .65);

  /* --- Tipografika --- */
  --shrift: "Helvetica Neue", Helvetica, "Segoe UI", Arial, sans-serif;
  --shrift-raqam: "SF Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --fs-display: 34px;   --lh-display: 40px;
  --fs-title-1: 26px;   --lh-title-1: 32px;
  --fs-title-2: 20px;   --lh-title-2: 26px;
  --fs-headline: 15px;  --lh-headline: 20px;
  --fs-body: 14px;      --lh-body: 20px;
  --fs-subhead: 13px;   --lh-subhead: 18px;
  --fs-footnote: 12px;  --lh-footnote: 16px;
  --fs-caption: 11px;   --lh-caption: 14px;
  --fs-metric-l: 26px;  --lh-metric-l: 30px;
  --fs-metric-s: 19px;  --lh-metric-s: 24px;

  /* --- Bo'shliq: 4px baza --- */
  --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px;
  --sp-5: 20px; --sp-6: 24px; --sp-7: 32px; --sp-8: 40px;

  /* --- Radius --- */
  --r-chip: 8px;
  --r-input: 12px;
  --r-avatar: 14px;
  --r-card: 18px;
  --r-pill: 999px;
  --r-icon-lg: 24px;

  --yon-eni: 72px;

  /* --- Eski nomlar: app.js va mobil.css shulardan foydalanadi --- */
  --fon: var(--bg);
  --fon-past: var(--surface-2);
  --panel: var(--surface-1);
  --panel-tepa: var(--surface-2);
  --chiziq: var(--separator);
  --chiziq-quyuq: var(--separator);
  --matn: var(--text-1);
  --matn-past: var(--text-2);
  --xira: var(--text-2);
  --asosiy: var(--accent);
  --asosiy-quyuq: var(--accent-pressed);
  --asosiy-fon: var(--accent-bg);
  --kirim: var(--income);
  --kirim-fon: var(--income-bg);
  --chiqim: var(--expense);
  --chiqim-fon: var(--expense-bg);
  --sariq: var(--warning);
  --sariq-fon: var(--warning-bg);
  --r-kichik: var(--r-chip);
  --r: var(--r-card);
  --r-katta: var(--r-icon-lg);
}

/* ===== ASOS ===== */

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-1);
  font: 400 var(--fs-body)/var(--lh-body) var(--shrift);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1 {
  margin: 0;
  font-size: var(--fs-title-1); line-height: var(--lh-title-1);
  font-weight: 600; letter-spacing: -.8px;
}
h2 {
  margin: 0 0 var(--sp-3);
  font-size: var(--fs-headline); line-height: var(--lh-headline);
  font-weight: 600; letter-spacing: -.2px;
}

.son, td.son, th.son, .karta .son, .num, td[data-num], .metric,
input[type=number] {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}
.birlik, .unit {
  font-size: var(--fs-headline); font-weight: 400;
  color: var(--text-2); margin-left: var(--sp-1); letter-spacing: 0;
}
.cell-empty::after { content: "\00B7"; color: var(--text-3); }
.cell-none::after  { content: "\2014"; color: var(--text-3); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--r-chip); }
::selection { background: var(--accent-bg); }
a { color: var(--kok); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== TUZILMA: yon panel + ish ustuni ===== */

.ilova { display: flex; min-height: 100vh; }

.yon {
  position: sticky; top: 0; align-self: flex-start;
  width: var(--yon-eni); height: 100vh; flex: 0 0 var(--yon-eni);
  background: var(--yon);
  display: flex; flex-direction: column; align-items: center;
  padding: var(--sp-4) 0; gap: var(--sp-5); z-index: 30;
}
.yon-brend { display: flex; align-items: center; justify-content: center; }
.yon-brend img { display: block; }

.yon-menyu { display: flex; flex-direction: column; gap: 6px; }

/* Bo'lim tugmasi: faqat ikonka, nomi ustiga borilganda chiqadi.
   Faoli - oq kvadrat, qolgani xira. */
.tab {
  position: relative;
  width: 44px; height: 44px; padding: 0;
  display: flex; align-items: center; justify-content: center;
  background: transparent; color: var(--text-3); border: 0;
  border-radius: var(--r-avatar); cursor: pointer;
  transition: background .12s, color .12s;
}
.tab:hover { background: var(--surface-2); color: var(--text-1); }
.tab.faol { background: var(--text-1); color: #101014; }
.tab.faol:hover { background: var(--text-1); color: #101014; }

.yon-past {
  margin-top: auto; display: flex; flex-direction: column;
  align-items: center; gap: var(--sp-2);
}
.yon-tugma {
  width: 40px; height: 40px; padding: 0;
  display: flex; align-items: center; justify-content: center;
  background: transparent; color: var(--text-3); border: 0;
  border-radius: var(--r-avatar); cursor: pointer;
}
.yon-tugma:hover { background: var(--surface-2); color: var(--text-1); }

.men-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: var(--fs-footnote); font-weight: 600;
}

.ish { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }

/* ===== SARLAVHA ===== */

header {
  background: transparent; border: 0;
  padding: var(--sp-6) var(--sp-7) var(--sp-3);
  display: flex; flex-direction: column; gap: var(--sp-4);
}

.sarlavha-qator {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-4); flex-wrap: wrap;
}
.sarlavha-ong {
  display: flex; align-items: center; gap: var(--sp-3);
  font-size: var(--fs-footnote); color: var(--text-2);
}

/* Tashkilot - bosiladigan chip; uzun nom qisqaradi */
.chip-tugma {
  background: var(--surface-1); color: var(--text-1);
  border: 0; border-radius: var(--r-pill);
  padding: 7px 14px; font-size: var(--fs-subhead); font-weight: 500;
  max-width: 280px; cursor: pointer;
}
.chip-tugma span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip-tugma:hover { background: var(--surface-3); }
.inn-belgi { display: none; }

.manba { color: var(--text-3); font-size: var(--fs-caption); line-height: var(--lh-caption); }

.filtr { display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: center; }
.filtr label { font-size: var(--fs-footnote); color: var(--text-2); }

.yangi-holat { font-size: var(--fs-caption); color: var(--text-3); white-space: nowrap; }
.yangi-holat.ishlayapti { color: var(--accent); }

/* Til: neytral segmented control, binafsha emas */
.tillar {
  display: flex; gap: 2px; width: fit-content;
  background: var(--surface-1); border-radius: var(--r-pill); padding: 3px;
}
.til {
  background: transparent; color: var(--text-3); border: 0;
  padding: 3px 10px; font-size: var(--fs-caption);
  border-radius: var(--r-pill); line-height: 1.4; cursor: pointer;
}
.til:hover { color: var(--text-1); background: transparent; }
.til.faol { background: var(--surface-3); color: var(--text-1); font-weight: 600; }

main { padding: 0 var(--sp-7) 60px; flex: 1 1 auto; }
.varaq { display: none; }
.varaq.faol { display: block; }

/* ===== MAYDON VA TUGMALAR ===== */

input, select, button, textarea {
  font: inherit; font-size: var(--fs-subhead);
  padding: var(--sp-2) var(--sp-3);
  border: 0; border-radius: var(--r-input);
  background: var(--surface-1); color: var(--text-1);
  transition: background .12s, color .12s, opacity .12s;
}
input::placeholder { color: var(--text-3); }
input:hover, select:hover, textarea:hover { background: var(--surface-2); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
select { cursor: pointer; }

button {
  cursor: pointer; background: var(--accent); color: #fff;
  font-weight: 600; padding: var(--sp-2) var(--sp-4);
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
button:hover, button:active { background: var(--accent-pressed); }

button.ikkilamchi {
  background: var(--surface-1); color: var(--text-1); font-weight: 500;
  padding: var(--sp-2) 14px;
}
button.ikkilamchi:hover { background: var(--surface-3); }

button.uchinchi { background: transparent; color: var(--text-2); font-weight: 500; }
button.uchinchi:hover { color: var(--text-1); background: var(--surface-2); }

/* Qaytarib bo'lmaydigan amal: rangi chiqim rangi bilan bir xil */
button.xavfli { background: var(--expense-bg); color: var(--expense); font-weight: 500; }
button.xavfli:hover { background: var(--expense); color: #fff; }

button:disabled { opacity: .45; cursor: default; }
.kichik { padding: 5px var(--sp-3); font-size: var(--fs-footnote); }

/* Bir-biriga tegishli maydonlar bitta blokda: ikonka + maydon */
.maydon-guruh {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  background: var(--surface-1); border-radius: var(--r-input);
  padding: 0 14px; min-height: 44px;
}
.maydon-guruh.keng { flex: 1 1 320px; min-width: 0; }
.maydon-guruh input, .maydon-guruh select {
  background: transparent; padding: 2px 0; border-radius: 0; min-width: 0;
}
.maydon-guruh input:hover, .maydon-guruh select:hover { background: transparent; }
.maydon-guruh input:focus, .maydon-guruh select:focus { outline: none; }
.maydon-guruh:focus-within { outline: 2px solid var(--accent); outline-offset: -1px; }
.maydon-guruh input[type=search] { width: 100%; min-width: 0; }
.maydon-guruh .ajratgich { color: var(--text-3); }

.ik { flex: 0 0 auto; display: block; color: var(--text-3); }
button .ik, .tab .ik, .yon-tugma .ik { color: currentColor; }

/* ===== PANEL VA KARTALAR ===== */

.panel {
  background: var(--surface-1); border: 0;
  border-radius: var(--r-card); padding: var(--sp-5);
  margin-bottom: var(--sp-4);
}
.ikki { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-4); }
@media (max-width: 1100px) { .ikki { grid-template-columns: 1fr; } }

.kartalar {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--sp-3); margin-bottom: var(--sp-4);
}
.karta {
  background: var(--surface-1); border: 0;
  border-radius: var(--r-card); padding: var(--sp-4) var(--sp-5);
}
.karta .nom {
  color: var(--text-2); font-weight: 400;
  font-size: var(--fs-footnote); line-height: var(--lh-footnote);
  text-transform: none; letter-spacing: 0;
}
.karta .son {
  font-size: var(--fs-metric-l); line-height: var(--lh-metric-l);
  font-weight: 600; letter-spacing: -.8px; margin-top: 6px;
}
.karta .tag {
  color: var(--text-3); font-size: var(--fs-caption);
  line-height: var(--lh-caption); margin-top: 4px;
}
.karta.kirim .son { color: var(--income); }
.karta.chiqim .son { color: var(--expense); }
.karta.farq .son { color: var(--text-1); }

.izoh {
  color: var(--text-2); font-size: var(--fs-footnote);
  line-height: var(--lh-footnote); margin: -4px 0 var(--sp-3);
}
.belgi { color: var(--text-2); font-weight: 400; font-size: var(--fs-subhead); }
.qator-boshi {
  display: flex; justify-content: space-between; align-items: center;
  gap: var(--sp-3); margin-bottom: var(--sp-3); flex-wrap: wrap;
}
.markaz { text-align: center; margin-top: var(--sp-3); }
.bosh { color: var(--text-3); text-align: center; padding: var(--sp-7) var(--sp-5); }

/* Ogohlantirish: o'ngida doim harakat tugmasi bo'lsin */
.ogoh {
  display: flex; align-items: center; gap: var(--sp-3);
  background: var(--warning-bg); border-radius: var(--r-input);
  padding: var(--sp-3) 14px; margin-bottom: var(--sp-3);
  color: var(--warning); font-size: var(--fs-subhead);
}
.ogoh .ikkinchi { color: var(--text-2); display: block; margin-top: 2px; }
.ogoh > :last-child { margin-left: auto; }

/* ===== JADVAL ===== */

table { width: 100%; border-collapse: collapse; font-size: var(--fs-subhead); }
th, td { padding: 11px 12px; text-align: left; border-bottom: 1px solid var(--separator); }
td { color: var(--text-2); }
td:first-child { color: var(--text-1); font-weight: 500; }
th {
  color: var(--text-3); font-weight: 400;
  font-size: var(--fs-footnote); line-height: var(--lh-footnote);
  text-transform: none; letter-spacing: 0;
  position: sticky; top: 0; background: var(--surface-1);
  border-bottom: 1px solid var(--separator);
}
td.son, th.son { text-align: right; white-space: nowrap; }
tbody tr:hover td { background: var(--surface-2); }
.jadval-orash { overflow-x: auto; max-height: 640px; overflow-y: auto; }
.jadval-orash td:first-child { white-space: nowrap; }

.kirim-rang { color: var(--income); }
.chiqim-rang { color: var(--expense); }
.qarz-rang { color: var(--warning); }
.ortiqcha-rang { color: var(--overpaid); }
.yopilgan-rang { color: var(--text-3); }

/* Yorliq: namunadagi rangli teglar kabi - to'liq dumaloq, kichik kegl */
.holat {
  display: inline-block; padding: 3px 10px; border-radius: var(--r-pill);
  font-size: var(--fs-caption); line-height: var(--lh-caption);
  font-weight: 500; white-space: nowrap;
}
.holat.kutilmoqda { background: var(--warning-bg); color: var(--warning); }
.holat.qisman { background: var(--kok-bg); color: var(--kok); }
.holat.tolangan { background: var(--income-bg); color: var(--income); }
.holat.boshqa { background: var(--surface-2); color: var(--text-3); }

/* ===== GRAFIKLAR ===== */

.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart .setka { stroke: var(--separator); stroke-width: 1; }
.chart text {
  fill: var(--text-3); font-size: var(--fs-caption); font-weight: 400;
  font-variant-numeric: tabular-nums;
}
.chart text.qiymat { fill: var(--text-1); }
.chart rect { transition: opacity .12s; }
.chart svg:hover rect { opacity: .8; }
.chart rect:hover { opacity: 1; }

.ulush { display: flex; align-items: baseline; gap: var(--sp-3); padding: 7px 0; }
.ulush .foiz {
  min-width: 56px; text-align: right; color: var(--text-1);
  font-weight: 600; font-variant-numeric: tabular-nums;
}
.ulush .nom { flex: 1 1 auto; color: var(--text-2); }
.ulush .qiymat { color: var(--text-1); font-variant-numeric: tabular-nums; }

/* ===== OYNALAR ===== */

.th-fon {
  position: fixed; inset: 0; background: rgba(0, 0, 0, .72);
  display: flex; align-items: center; justify-content: center;
  padding: var(--sp-4); z-index: 50;
}
.th-oyna {
  background: var(--surface-1); border: 0; border-radius: var(--r-card);
  padding: var(--sp-6); width: 100%; max-width: 440px;
  max-height: 90vh; overflow-y: auto; box-shadow: var(--soya-tepa);
}
.th-maydon { display: block; margin-bottom: var(--sp-3); }
.th-maydon span {
  display: block; margin-bottom: var(--sp-1);
  font-size: var(--fs-footnote); font-weight: 400;
  text-transform: none; letter-spacing: 0; color: var(--text-2);
}
.th-maydon input, .th-maydon select { width: 100%; background: var(--surface-2); }
.th-tugmalar { display: flex; gap: var(--sp-2); justify-content: flex-end; margin-top: var(--sp-4); }

.belgi-soni {
  display: inline-block; min-width: 18px; padding: 0 5px;
  background: var(--expense); color: #fff; border-radius: var(--r-pill);
  font-size: var(--fs-caption); line-height: 18px; text-align: center; font-weight: 600;
}
/* Yon panelda raqam ikonka ustida turadi */
.tab .belgi-soni { position: absolute; top: 3px; right: 3px; }

/* Tashkilot tanlash */
.tanlov-fon {
  position: fixed; inset: 0; background: var(--bg); z-index: 60;
  display: flex; align-items: center; justify-content: center; padding: var(--sp-4);
}
.tanlov-oyna {
  background: var(--surface-1); border: 0; border-radius: var(--r-card);
  padding: var(--sp-6); width: 100%; max-width: 460px; max-height: 88vh; overflow-y: auto;
}
.tanlov-oyna h2 { text-align: center; font-size: var(--fs-title-2); letter-spacing: -.4px; }
.tanlov-oyna .izoh { text-align: center; }
.tanlov-oyna .tillar { margin: 0 0 var(--sp-4) auto; }
.tanlov-royxat { display: flex; flex-direction: column; gap: var(--sp-2); margin: var(--sp-4) 0; }
.tanlov-karta {
  display: flex; justify-content: space-between; align-items: center; gap: var(--sp-3);
  padding: var(--sp-3) 14px; border: 0; border-radius: var(--r-input);
  cursor: pointer; background: var(--surface-2); color: var(--text-1);
  text-align: left; width: 100%; font-weight: 500;
}
.tanlov-karta:hover { background: var(--surface-3); }
.tanlov-karta .inn { color: var(--text-2); font-size: var(--fs-footnote); font-weight: 400; }

/* ===== KIRISH VA RO'YXAT SAHIFALARI ===== */

body.markazlash {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; padding: var(--sp-4);
}
.kirish-panel {
  background: var(--surface-1); border: 0; border-radius: var(--r-card);
  padding: var(--sp-7) var(--sp-6); width: 100%; max-width: 380px; position: relative;
}
.kirish-panel h2 { text-align: center; font-size: var(--fs-headline); margin-bottom: var(--sp-3); }
.kirish-panel form { display: flex; flex-direction: column; gap: 10px; margin: var(--sp-4) 0 var(--sp-3); }
.kirish-panel input { width: 100%; padding: 12px 14px; background: var(--surface-2); }
.kirish-panel button[type=submit] { padding: 12px; font-weight: 600; }
.kirish-panel .izoh { text-align: center; margin: var(--sp-2) 0 0; }
.kirish-panel .tillar { margin-left: auto; }

.kirish-brend { text-align: center; margin-bottom: var(--sp-5); }
.kirish-brend img { border-radius: 0; }
.kirish-nom {
  font-size: var(--fs-title-1); line-height: var(--lh-title-1);
  font-weight: 700; letter-spacing: -.8px; margin-top: var(--sp-2);
}
.kirish-nom .and, .brend-nom .and {
  font-size: var(--fs-headline); font-weight: 400;
  color: var(--warning); letter-spacing: 0;
}
.kirish-brend .izoh { margin: var(--sp-1) 0 0; }

.xabar {
  font-size: var(--fs-subhead); padding: 10px 12px;
  border-radius: var(--r-input); text-align: center;
}
.xabar.xato { background: var(--expense-bg); color: var(--expense); }
.xabar.yaxshi { background: var(--income-bg); color: var(--income); }

/* ===== USTUN FILTRI (Excel'dagi kabi) ===== */

.filtr-belgi {
  background: none; border: 0; padding: 0 0 0 5px; margin: 0;
  color: var(--text-3); font-size: var(--fs-caption); line-height: 1; cursor: pointer;
}
.filtr-belgi:hover { color: var(--text-1); background: none; }
.filtr-belgi.faol { color: var(--accent); }

.chiplar { display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: center; margin: var(--sp-3) 0; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--surface-2); color: var(--text-1); border: 0;
  border-radius: var(--r-pill); padding: 4px 6px 4px var(--sp-3);
  font-size: var(--fs-footnote);
}
.chip-x {
  background: none; border: 0; color: var(--text-3); cursor: pointer;
  font-size: 15px; line-height: 1; padding: 0 4px;
}
.chip-x:hover { color: var(--expense); background: none; }

.filtr-oyna {
  position: fixed; z-index: 60; width: 260px; max-width: calc(100vw - 16px);
  background: var(--surface-2); border: 0; border-radius: var(--r-input);
  box-shadow: var(--soya-tepa); padding: var(--sp-3);
  display: flex; flex-direction: column; gap: var(--sp-2);
}
.filtr-nom { font-size: var(--fs-footnote); font-weight: 500; color: var(--text-2); }
.filtr-oyna input {
  width: 100%; min-width: 0; padding: 7px 10px;
  font-size: var(--fs-subhead); background: var(--surface-1);
}
.filtr-qator { display: flex; align-items: center; gap: var(--sp-2); font-size: var(--fs-subhead); cursor: pointer; }
.filtr-qator > span:first-child { color: var(--text-2); font-size: var(--fs-footnote); min-width: 62px; }
.filtr-qator input[type=checkbox] { width: auto; margin: 0; padding: 0; }
.filtr-royxat {
  max-height: 220px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px;
  border: 0; border-radius: var(--r-chip); background: var(--surface-1); padding: 6px;
}
.filtr-royxat .filtr-qator { padding: 3px 5px; border-radius: var(--r-chip); }
.filtr-royxat .filtr-qator:hover { background: var(--surface-3); }
.filtr-royxat .bosh { padding: var(--sp-3); font-size: var(--fs-footnote); }
.filtr-ajratgich { color: var(--text-3); font-size: var(--fs-caption); }
.filtr-tugmalar { display: flex; justify-content: flex-end; gap: var(--sp-2); }

/* ===== TELEFON =====
   Yon panel pastga tushadi: barmoq uchun eng qulay joy shu.
   Raqam kegli 19px dan kichik bo'lmaydi. */

@media (max-width: 820px) {
  .ilova { flex-direction: column; }
  .yon {
    position: fixed; bottom: 0; left: 0; right: 0; top: auto;
    width: 100%; height: auto; flex: none;
    flex-direction: row; justify-content: space-around; align-items: center;
    padding: 6px var(--sp-2); gap: 0;
    border-top: 1px solid var(--separator);
  }
  .yon-brend { display: none; }
  .yon-menyu { flex-direction: row; gap: 2px; }
  .yon-past { margin: 0; flex-direction: row; gap: 2px; }
  .men-avatar { width: 30px; height: 30px; }
  .tab { width: 40px; height: 40px; }

  header { padding: var(--sp-4) var(--sp-3) var(--sp-2); gap: var(--sp-3); }
  h1 { font-size: var(--fs-title-2); line-height: var(--lh-title-2); letter-spacing: -.4px; }
  .sarlavha-ong { gap: var(--sp-2); }
  .chip-tugma { max-width: 180px; }
  main { padding: 0 var(--sp-3) 84px; }
  .filtr { width: 100%; }
  .maydon-guruh { flex: 1 1 100%; }
  .kartalar { grid-template-columns: 1fr 1fr; gap: var(--sp-2); }
  .karta { padding: var(--sp-3); }
  .karta .son { font-size: var(--fs-metric-s); line-height: var(--lh-metric-s); letter-spacing: -.5px; }
  .panel { padding: var(--sp-4); border-radius: var(--r-input); }
  .jadval-orash { max-height: 460px; }
  th, td { padding: 8px 9px; font-size: var(--fs-footnote); }
  .filtr-oyna { width: 280px; }
}

/* ===== KIRISH SAHIFASI FONI =====
   Video emas: bir necha kilobayt CSS va SVG. Faqat `transform` va
   `opacity` jonlanadi, shuning uchun telefonda ham yengil.
   Ranglar yangi palitradan - binafsha va ko'k. */

.fon-jonli { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.kirish-panel { z-index: 1; }

.nur { position: absolute; border-radius: 50%; filter: blur(100px); opacity: .26; will-change: transform; }
.nur-1 {
  width: 46vmax; height: 46vmax; left: -14vmax; top: -16vmax;
  background: radial-gradient(circle, #9D6FFF 0%, transparent 70%);
  animation: suz-1 44s ease-in-out infinite;
}
.nur-2 {
  width: 40vmax; height: 40vmax; right: -12vmax; top: 8vmax;
  background: radial-gradient(circle, #6397FF 0%, transparent 70%);
  animation: suz-2 56s ease-in-out infinite;
}
.nur-3 {
  width: 52vmax; height: 52vmax; left: 22vmax; bottom: -26vmax;
  background: radial-gradient(circle, #FF5FA2 0%, transparent 70%);
  opacity: .16;
  animation: suz-3 64s ease-in-out infinite;
}
@keyframes suz-1 {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50%      { transform: translate3d(6vmax, 5vmax, 0) scale(1.12); }
}
@keyframes suz-2 {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1.08); }
  50%      { transform: translate3d(-7vmax, 6vmax, 0) scale(1); }
}
@keyframes suz-3 {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50%      { transform: translate3d(-5vmax, -6vmax, 0) scale(1.1); }
}

.fon-grafik {
  position: absolute; left: 0; right: 0; bottom: 0;
  width: 100%; height: 42vh; min-height: 200px; opacity: .16;
}
.fon-grafik .ustunlar rect {
  transform-origin: bottom; transform-box: fill-box;
  animation: uslash 9s ease-in-out infinite;
  animation-delay: calc(var(--k) * .45s);
}
@keyframes uslash {
  0%, 100% { transform: scaleY(.82); }
  50%      { transform: scaleY(1); }
}
.fon-grafik .chiziq {
  stroke-dasharray: 2000; stroke-dashoffset: 2000;
  animation: chiz 3.4s ease-out .3s forwards;
}
@keyframes chiz { to { stroke-dashoffset: 0; } }
.fon-grafik .nuqta {
  offset-path: path("M0 258 C 110 214, 190 268, 300 196 S 470 128, 590 178 S 760 84, 890 132 S 1060 36, 1200 74");
  offset-rotate: 0deg; opacity: 0;
  animation: yur 14s linear 3.6s infinite;
}
@keyframes yur {
  0%      { offset-distance: 0%;   opacity: 0; }
  6%, 94% { opacity: 1; }
  100%    { offset-distance: 100%; opacity: 0; }
}

@media (max-width: 820px) {
  .fon-grafik { height: 30vh; min-height: 150px; }
  .nur { filter: blur(70px); }
}

/* Harakatni kamaytirish sozlamasi yoqilgan bo'lsa - hammasi to'xtaydi */
@media (prefers-reduced-motion: reduce) {
  .nur, .fon-grafik .ustunlar rect, .fon-grafik .nuqta { animation: none; }
  .fon-grafik .chiziq { stroke-dashoffset: 0; animation: none; }
  .fon-grafik .nuqta { opacity: 0; }
}
