/* =====================================================================
   Mahalla 17 ligi — dizayn tizimi v4 «Lojuvard»
   Palitra Samarqand koshinlaridan: lojuvard (asosiy amal), tun (qorong'i
   yuzalar), firuza (urg'u), zar (gerb va muhr), anor (kechikish, rad),
   qog'oz (fon). Yashil faqat «fuqaro tasdiqladi» uchun.
   Bitta shrift oilasi: Geologica Variable (lokal, kirill-ext bilan).
   Kuchli element bitta — xizmat guvohnomasi. Qolgani sokin va intizomli:
   oq yuzalar, ingichka chiziqlar, soya faqat suzuvchi elementlarda.
   ===================================================================== */
:root {
  --font: 'Geologica Variable', 'Geologica', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --tun: #081548; --tun-2: #0D2170; --tun-3: #050E36;
  --lojuvard: #2340D9; --firuza: #10B4C8; --zar: #D9A520; --zar-2: #F2C94C; --anor: #D92D3A;
  --primary: #2340D9; --primary-2: #1A31B0; --primary-ink: #1A31B0; --primary-soft: #E8ECFF;
  --ok: #0B8354; --ok-fill: #12B76A; --ok-soft: #E1F6EA;
  --warn: #A45F00; --warn-fill: #F59E0B; --warn-soft: #FFF2D6;
  --bad: #C4232F; --bad-fill: #E5484D; --bad-soft: #FDE6E8;
  --bg: #F3F5FA; --surface: #FFFFFF; --surface-2: #F8F9FD; --fill: #EDF0F7; --fill-2: #E2E7F1;
  --ink: #0E1A3D; --ink-2: #3B4768; --ink-3: #5A6890; --ink-4: #8892B4;
  --line: #E0E5F0; --line-2: #ECEFF6;
  --ring: 0 0 0 4px rgba(35,64,217,.2);
  --sh-float: 0 20px 48px -20px rgba(8,21,72,.5), 0 2px 6px rgba(8,21,72,.08);
  --sh-btn: 0 10px 20px -10px rgba(35,64,217,.7), inset 0 1px 0 rgba(255,255,255,.22);
  --glass: rgba(243,245,250,.84); --nav-bg: rgba(255,255,255,.92);
  --band: var(--glass);
  --red: var(--bad-fill); --red-soft: var(--bad-soft); --green-soft: var(--ok-soft); --amber-soft: var(--warn-soft); --grey-soft: var(--fill);
  --bar-h: 60px; --nav-h: 66px; --side-w: 280px;
  --sat: env(safe-area-inset-top, 0px); --sab: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --primary: #5B77FF; --primary-2: #7A91FF; --primary-ink: #A3B4FF; --primary-soft: #17234F;
  --ok: #4BDB97; --ok-fill: #17B26A; --ok-soft: #0E2C21;
  --warn: #FBBF4D; --warn-fill: #F59E0B; --warn-soft: #33260A;
  --bad: #FF7B84; --bad-fill: #E5484D; --bad-soft: #3A1519;
  --bg: #060B1E; --surface: #0D1530; --surface-2: #111B3B; --fill: #16214A; --fill-2: #1D2A5A;
  --ink: #EAF0FF; --ink-2: #B8C3E4; --ink-3: #8591B8; --ink-4: #5C6892;
  --line: #1D2952; --line-2: #162145;
  --ring: 0 0 0 4px rgba(91,119,255,.28);
  --sh-float: 0 22px 50px -16px rgba(0,0,0,.75);
  --sh-btn: 0 10px 22px -10px rgba(91,119,255,.6), inset 0 1px 0 rgba(255,255,255,.18);
  --glass: rgba(6,11,30,.8); --nav-bg: rgba(13,21,48,.92);
  color-scheme: dark;
}

:root[data-theme="dark"] .ricon { color: color-mix(in srgb, var(--c) 42%, #fff); background: color-mix(in srgb, var(--c) 28%, var(--surface)); }
:root[data-theme="dark"] .lockbox { background: #2A2108; border-color: #4A3B10; color: #F3D27A; }
:root[data-theme="dark"] .quick .qi, :root[data-theme="dark"] .sheet .menu .qi { color: var(--primary-ink); }
:root[data-theme="dark"] .pill.gold, :root[data-theme="dark"] .badge.gold { background: #33290F; color: #F3D27A; }
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) {
  --primary: #5B77FF; --primary-2: #7A91FF; --primary-ink: #A3B4FF; --primary-soft: #17234F;
  --ok: #4BDB97; --ok-fill: #17B26A; --ok-soft: #0E2C21;
  --warn: #FBBF4D; --warn-fill: #F59E0B; --warn-soft: #33260A;
  --bad: #FF7B84; --bad-fill: #E5484D; --bad-soft: #3A1519;
  --bg: #060B1E; --surface: #0D1530; --surface-2: #111B3B; --fill: #16214A; --fill-2: #1D2A5A;
  --ink: #EAF0FF; --ink-2: #B8C3E4; --ink-3: #8591B8; --ink-4: #5C6892;
  --line: #1D2952; --line-2: #162145;
  --ring: 0 0 0 4px rgba(91,119,255,.28);
  --sh-float: 0 22px 50px -16px rgba(0,0,0,.75);
  --sh-btn: 0 10px 22px -10px rgba(91,119,255,.6), inset 0 1px 0 rgba(255,255,255,.18);
  --glass: rgba(6,11,30,.8); --nav-bg: rgba(13,21,48,.92);
  color-scheme: dark;
}

:root:not([data-theme="light"]) .ricon { color: color-mix(in srgb, var(--c) 42%, #fff); background: color-mix(in srgb, var(--c) 28%, var(--surface)); }
:root:not([data-theme="light"]) .lockbox { background: #2A2108; border-color: #4A3B10; color: #F3D27A; }
:root:not([data-theme="light"]) .quick .qi, :root:not([data-theme="light"]) .sheet .menu .qi { color: var(--primary-ink); }
:root:not([data-theme="light"]) .pill.gold, :root:not([data-theme="light"]) .badge.gold { background: #33290F; color: #F3D27A; }
}

/* ---------- Asos ---------- */
*, *::before, *::after { box-sizing: border-box; }
:root { padding-top: var(--sat); padding-bottom: var(--sab); }
html { height: 100%; background: var(--bg); scroll-padding-top: calc(var(--sat) + var(--bar-h)); -webkit-text-size-adjust: 100%; }
html.is-login { background: var(--surface); --band: var(--tun-3); }
body { margin: 0; min-height: 100%; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }
body::before { content: ""; position: fixed; z-index: 45; top: 0; left: 0; right: 0; height: var(--sat); background: var(--band); pointer-events: none; }
html.is-login body { background: var(--surface); }
h1, h2, h3, h4 { margin: 0; font-weight: 700; line-height: 1.2; }
p { margin: 0; }
a { color: var(--primary-ink); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
a { -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: not-allowed; opacity: .5; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--primary) 55%, transparent); outline-offset: 2px; border-radius: 8px; }
::selection { background: color-mix(in srgb, var(--primary) 25%, transparent); }
.ic { width: 22px; height: 22px; flex: none; }
.ic.sm { width: 18px; height: 18px; }
.ic.xs { width: 14px; height: 14px; }
.gerb { display: block; flex: none; }
.num { font-variant-numeric: tabular-nums; }
.hide { display: none !important; }
.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- Qobiq ---------- */
.app { min-height: calc(100dvh - var(--sat) - var(--sab)); display: flex; flex-direction: column; }
.topbar { position: sticky; top: var(--sat); z-index: 30; background: var(--glass); -webkit-backdrop-filter: saturate(170%) blur(18px); backdrop-filter: saturate(170%) blur(18px); border-bottom: 1px solid var(--line-2); }
.topbar-in { height: var(--bar-h); display: flex; align-items: center; gap: 6px; padding: 0 10px 0 14px; max-width: 760px; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; color: var(--ink); }
.brand .gerb { width: 36px; height: 37px; }
.brand-name { font-weight: 700; font-size: 16px; letter-spacing: -.012em; line-height: 1.15; white-space: nowrap; }
.brand-sub { font-size: 12px; color: var(--ink-3); line-height: 1.25; white-space: nowrap; }
.topbar .spacer { flex: 1; }
.tb-btn { width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: var(--ink-2); position: relative; flex: none; }
.tb-btn:hover { background: var(--fill); }
.tb-btn .dot { position: absolute; top: 8px; right: 9px; width: 9px; height: 9px; border-radius: 50%; background: var(--bad-fill); box-shadow: 0 0 0 2px var(--bg); }
.tb-lang { height: 32px; padding: 0 11px; margin-right: 2px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); font-weight: 650; font-size: 12.5px; flex: none; }
.tb-lang:hover { border-color: var(--primary); }
.tb-back { width: 40px; height: 40px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line); display: inline-flex; align-items: center; justify-content: center; color: var(--ink); flex: none; margin-right: 4px; }
.tb-back .ic { width: 20px; height: 20px; }
.tb-title { font-weight: 650; font-size: 17px; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -.012em; }

.shell { flex: 1; display: flex; min-height: 0; }
.side { display: none; }
main.content { flex: 1; min-width: 0; padding-bottom: calc(var(--nav-h) + var(--sab) + 40px); }
.app.inner main.content { padding-bottom: calc(var(--sab) + 32px); }
.screen { padding: 18px 16px 8px; max-width: 760px; margin: 0 auto; }
.screen.wide { max-width: 1240px; }

/* Suzuvchi pastki navigatsiya */
.bnav { position: fixed; z-index: 30; left: 12px; right: 12px; bottom: calc(10px + var(--sab)); max-width: 560px; margin: 0 auto; background: var(--nav-bg); -webkit-backdrop-filter: saturate(180%) blur(22px); backdrop-filter: saturate(180%) blur(22px); border-radius: 24px; box-shadow: var(--sh-float), 0 0 0 1px var(--line-2); }
.bnav-in { height: var(--nav-h); display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; padding: 0 6px; }
.bnav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--ink-3); font-size: 11px; font-weight: 600; position: relative; height: 100%; }
.bnav a .ic { width: 23px; height: 23px; padding: 0; transition: color .15s; }
.bnav a > .ic { box-sizing: content-box; padding: 3px 14px; border-radius: 13px; margin-top: 2px; }
.bnav a.on { color: var(--primary-ink); }
.bnav a.on > .ic { background: var(--primary-soft); }
.bnav a .cnt { position: absolute; top: 5px; left: calc(50% + 7px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--bad-fill); color: #fff; font-size: 10.5px; font-weight: 700; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 2px var(--nav-bg); }
.bnav .fab span.circle { width: 50px; height: 50px; border-radius: 17px; background: linear-gradient(160deg, #3E5BF2 0%, var(--lojuvard) 55%, #1A2FA8 100%); color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 10px 22px -8px rgba(35,64,217,.75), inset 0 1px 0 rgba(255,255,255,.25); }
.bnav .fab span.circle .ic { width: 26px; height: 26px; }
.bnav .fab:active span.circle { transform: scale(.96); }

/* ---------- Sarlavhalar ---------- */
.h-screen { font-size: 28px; font-weight: 700; letter-spacing: -.026em; line-height: 1.12; margin: 6px 2px 16px; }
.h-sec { font-size: 17px; font-weight: 650; letter-spacing: -.012em; margin: 30px 2px 12px; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.h-sec .act { font-size: 14px; font-weight: 600; color: var(--primary-ink); white-space: nowrap; }
.h-sec .note { font-size: 13px; font-weight: 500; color: var(--ink-3); }
.sec .h-sec { margin-top: 24px; }
.hello { margin: 4px 2px 18px; }
.hello h1 { font-size: 27px; font-weight: 700; letter-spacing: -.026em; line-height: 1.12; }
.hello p { color: var(--ink-3); font-size: 14px; margin-top: 5px; }
.desktop-only { display: none; }
.footnote { font-size: 12.5px; color: var(--ink-3); text-align: center; margin: 28px 16px 6px; line-height: 1.5; }

/* ---------- Xizmat guvohnomasi (yagona kuchli element) ---------- */
.idcard { position: relative; display: block; overflow: hidden; isolation: isolate; border-radius: 26px; padding: 18px 18px 16px; color: #fff;
  background: radial-gradient(110% 90% at 100% 0%, rgba(16,180,200,.55) 0%, rgba(16,180,200,0) 56%), radial-gradient(80% 90% at 0% 115%, rgba(242,201,76,.3) 0%, rgba(242,201,76,0) 58%), linear-gradient(140deg, #081548 0%, #0D2170 44%, #2340D9 100%);
  box-shadow: var(--sh-float); }
.idcard::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); pointer-events: none; }
.idcard .id-guil { position: absolute; inset: 0; z-index: -1; background-image: var(--guil); background-size: cover; background-position: center; opacity: .17; }
.idcard .id-wm { position: absolute; z-index: -1; right: -46px; top: 50%; width: 210px; height: 214px; transform: translateY(-44%); opacity: .12; filter: grayscale(1) brightness(2.4); }
.id-head { display: flex; align-items: center; gap: 10px; }
.id-head .id-gerb { width: 30px; height: 31px; filter: drop-shadow(0 1px 2px rgba(0,0,0,.35)); }
.id-head > div > b { display: block; font-size: 13px; font-weight: 650; line-height: 1.2; }
.id-head > div > span { display: block; font-size: 11.5px; color: rgba(225,233,255,.72); line-height: 1.3; }
.id-status { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 13px; background: rgba(255,255,255,.14); font-size: 12px; font-weight: 600; flex: none; }
.id-status i { width: 7px; height: 7px; border-radius: 50%; background: #45F0A6; box-shadow: 0 0 0 3px rgba(69,240,166,.22); }
.id-main { display: flex; align-items: center; gap: 15px; margin: 20px 0 18px; }
.id-who { min-width: 0; }
.id-fio { font-size: 20px; font-weight: 700; letter-spacing: -.018em; line-height: 1.16; }
.id-lav { font-size: 15px; font-weight: 550; margin-top: 5px; }
.id-org { font-size: 12.5px; color: rgba(225,233,255,.72); margin-top: 1px; }
.idcard .seal { width: 58px; height: 58px; font-size: 18px; box-shadow: 0 0 0 2.5px rgba(255,255,255,.95), 0 0 0 6px rgba(242,201,76,.5); }
.id-foot { display: grid; grid-template-columns: repeat(3, auto); justify-content: space-between; gap: 10px; padding-top: 13px; border-top: 1px solid rgba(255,255,255,.16); }
.id-foot span { display: block; font-size: 11px; color: rgba(225,233,255,.62); }
.id-foot b { display: block; font-size: 13.5px; font-weight: 650; margin-top: 1px; white-space: nowrap; }

/* Lavozim muhri (monogramma) */
.seal { --c: var(--primary); width: 52px; height: 52px; flex: none; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 16px; letter-spacing: .03em; color: #fff; background: radial-gradient(circle at 32% 26%, color-mix(in srgb, var(--c) 62%, #fff) 0%, var(--c) 52%, color-mix(in srgb, var(--c) 78%, #000) 100%); box-shadow: 0 0 0 2px var(--surface), 0 0 0 3.5px color-mix(in srgb, var(--c) 38%, transparent); }
.seal.sm { width: 40px; height: 40px; font-size: 12.5px; }
.seal.xs { width: 30px; height: 30px; font-size: 10.5px; box-shadow: none; }
.seal.rasmli { background: var(--fill); padding: 0; overflow: hidden; }
.seal.rasmli img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rasm-tahrir { display: flex; align-items: center; gap: 14px; }
.rasm-tahrir .seal { width: 76px; height: 76px; font-size: 24px; }
.rasm-tahrir .btns { display: flex; flex-direction: column; gap: 8px; }
.rasm-tahrir .btn { padding: 9px 14px; font-size: 13.5px; }
.seal.ghost { background: var(--fill); color: var(--ink-2); box-shadow: inset 0 0 0 1.5px var(--line); }
.topbar .seal.xs { box-shadow: 0 0 0 2px var(--surface); }

/* Mahalla almashtirgich */
.segment { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 16px -16px 0; padding: 2px 16px; }
.segment::-webkit-scrollbar { display: none; }
.segment button { flex: none; height: 38px; padding: 0 14px; border-radius: 19px; background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); font-weight: 600; font-size: 13.5px; display: inline-flex; align-items: center; gap: 8px; }
.segment button .cnt { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--fill); color: var(--ink-2); font-size: 11.5px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.segment button.on { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.segment button.on .cnt { background: color-mix(in srgb, var(--bg) 20%, transparent); color: inherit; }

/* Holat tasmasi (raqamlar) */
.strip { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; }
.strip > a { display: block; padding: 14px 14px 13px; color: var(--ink); min-width: 0; }
.strip > a + a { box-shadow: inset 1px 0 0 var(--line-2); }
.strip > a:hover { background: var(--surface-2); }
.strip b { display: block; font-size: 30px; font-weight: 650; letter-spacing: -.035em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.strip span { display: block; font-size: 12.5px; color: var(--ink-2); line-height: 1.3; margin-top: 7px; }
.strip .blue b { color: var(--primary-ink); } .strip .red b { color: var(--bad); } .strip .amber b { color: var(--warn); } .strip .green b { color: var(--ok); } .strip .faint b { color: var(--ink-4); }
.strip.four { grid-template-columns: repeat(2, 1fr); }
.strip.four > a:nth-child(3) { box-shadow: inset 0 1px 0 var(--line-2); }
.strip.four > a:nth-child(4) { box-shadow: inset 1px 0 0 var(--line-2), inset 0 1px 0 var(--line-2); }
@media (min-width: 640px) { .strip.four { grid-template-columns: repeat(4, 1fr); } .strip.four > a:nth-child(3), .strip.four > a:nth-child(4) { box-shadow: inset 1px 0 0 var(--line-2); } }

/* Lavozim ko'rsatkichi */
.metric { display: flex; align-items: center; gap: 12px; margin-top: 10px; padding: 12px 14px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); }
.metric:hover { background: var(--surface-2); }
.metric .ricon { align-self: center; }
.metric .mt { flex: 1; min-width: 0; }
.metric .mt b { display: block; font-size: 14px; font-weight: 600; line-height: 1.3; }
.metric .mt small { display: block; font-size: 12px; color: var(--ink-3); margin-top: 1px; }
.metric .mv { font-size: 26px; font-weight: 650; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.metric .mv.faint { color: var(--ink-4); }
.metric > .ic { color: var(--ink-4); }

/* ---------- Ro'yxatlar ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; }
.card.pad { padding: 16px; }
.list { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; }
.row { position: relative; display: flex; align-items: flex-start; gap: 12px; padding: 13px 14px; width: 100%; text-align: left; color: var(--ink); }
.row + .row::after { content: ""; position: absolute; top: 0; right: 0; left: 14px; height: 1px; background: var(--line-2); }
.row:has(> .ricon, > .seal) + .row::after, .row + .row:has(> .ricon, > .seal)::after { left: 66px; }
.row:hover { background: var(--surface-2); }
.row .body { flex: 1; min-width: 0; }
.row .t { font-weight: 550; font-size: 15px; line-height: 1.38; letter-spacing: -.004em; }
.row .t.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.row .m { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; margin-top: 5px; font-size: 12.5px; color: var(--ink-3); }
.row .right { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; font-size: 12px; }
.row .chev { color: var(--ink-4); align-self: center; }
.row > .seal { align-self: center; }
.ricon { --c: var(--primary); width: 40px; height: 40px; flex: none; border-radius: 13px; display: inline-flex; align-items: center; justify-content: center; color: var(--c); background: color-mix(in srgb, var(--c) 11%, var(--surface)); }
.ricon .ic { width: 20px; height: 20px; }
.ricon.sm { width: 26px; height: 26px; border-radius: 8px; }
.ricon.sm .ic { width: 15px; height: 15px; }
.empty { padding: 34px 20px 30px; text-align: center; color: var(--ink-3); font-size: 14px; line-height: 1.5; }
.empty .ic { display: block; width: 46px; height: 46px; padding: 11px; border-radius: 15px; background: var(--fill); color: var(--ink-3); margin: 0 auto 12px; }
.empty b { display: block; color: var(--ink); font-weight: 650; font-size: 15.5px; margin-bottom: 4px; }
/* Ekran chizishda xato: jim qolmasdan ochiq ko'rsatiladi */
.empty.warn { max-width: 520px; margin: 0 auto; }
.empty.warn b { color: var(--red); }
.empty .errline { display: block; margin: 12px 0 16px; padding: 9px 12px; border-radius: 10px;
  background: var(--fill); color: var(--ink-2); font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 12px; text-align: left; word-break: break-word; }
.empty .btn { display: inline-flex; }

/* Nishon / pill */
.badge, .pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 12px; font-size: 12px; font-weight: 650; white-space: nowrap; line-height: 1; background: var(--fill); color: var(--ink-2); }
.badge::before, .pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.badge.nodot::before, .pill.nodot::before, .badge.outline::before { display: none; }
.badge .ic, .pill .ic { width: 13px; height: 13px; }
.badge.blue, .pill.blue { background: var(--primary-soft); color: var(--primary-ink); }
.badge.green, .pill.green { background: var(--ok-soft); color: var(--ok); }
.badge.amber, .pill.amber { background: var(--warn-soft); color: var(--warn); }
.badge.red, .pill.red { background: var(--bad-soft); color: var(--bad); }
.badge.grey, .pill.grey { background: var(--fill); color: var(--ink-2); }
.badge.navy, .pill.navy { background: var(--tun); color: #fff; }
.badge.gold, .pill.gold { background: #FBF0CF; color: #7A5A06; }
.badge.outline { background: transparent; box-shadow: inset 0 0 0 1px var(--line); color: var(--ink-3); }
.due { font-weight: 650; white-space: nowrap; font-size: 12.5px; }
.due.ok { color: var(--ink-3); font-weight: 550; } .due.done { color: var(--ok); }
.due.late, .due.soon { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 12px; font-size: 12px; }
.due.late { background: var(--bad-soft); color: var(--bad); } .due.soon { background: var(--warn-soft); color: var(--warn); }
.dirchip { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-3); }
.dirchip i { width: 8px; height: 8px; border-radius: 3px; background: var(--c, var(--ink-3)); flex: none; }

/* ---------- Tugmalar ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 50px; padding: 0 20px; border-radius: 15px; font-weight: 650; font-size: 15px; letter-spacing: -.005em; border: 1px solid transparent; white-space: nowrap; transition: transform .08s ease, background .15s, box-shadow .15s; }
.btn:active { transform: scale(.985); }
.btn .ic { width: 19px; height: 19px; }
.btn.primary { background: linear-gradient(180deg, color-mix(in srgb, var(--primary) 86%, #fff) 0%, var(--primary) 55%); color: #fff; box-shadow: var(--sh-btn); }
.btn.primary:hover { background: var(--primary-2); }
.btn.secondary { background: var(--surface); border-color: var(--line); color: var(--ink); }
.btn.secondary:hover { border-color: var(--ink-4); }
.btn.ghost { color: var(--primary-ink); }
.btn.ghost:hover { background: var(--primary-soft); }
.btn.green { background: linear-gradient(180deg, #17C77E 0%, #0C9A5E 100%); color: #fff; box-shadow: 0 10px 20px -10px rgba(11,131,84,.7), inset 0 1px 0 rgba(255,255,255,.22); }
.btn.navy { background: var(--tun); color: #fff; }
.btn.danger { background: var(--bad-soft); color: var(--bad); }
.btn.sm { height: 38px; padding: 0 14px; font-size: 13.5px; border-radius: 12px; }
.btn.block { width: 100%; }
.btns { display: flex; gap: 8px; flex-wrap: wrap; }
.btns.stack { flex-direction: column; }
.btns.stack .btn { width: 100%; }
.iconbtn { width: 40px; height: 40px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; color: var(--ink-2); background: var(--fill); flex: none; }
.iconbtn:hover { background: var(--fill-2); color: var(--ink); }
.act-block { margin-top: 14px; }
.actgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 8px; }
.actgrid button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; min-height: 78px; padding: 10px 6px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); font-size: 12.5px; font-weight: 600; line-height: 1.25; text-align: center; }
.actgrid button:hover { border-color: color-mix(in srgb, var(--primary) 40%, var(--line)); }
.actgrid button .ic { color: var(--primary-ink); width: 21px; height: 21px; }

/* Tezkor amallar */
.quick { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.quick button, .quick > a { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 14px; min-height: 116px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); text-align: left; color: var(--ink); }
.quick button:hover, .quick > a:hover { border-color: color-mix(in srgb, var(--primary) 40%, var(--line)); }
.quick .qi { width: 40px; height: 40px; border-radius: 13px; background: var(--primary-soft); color: var(--primary-ink); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 10px; }
.quick .qi.warm { background: var(--bad-soft); color: var(--bad); }
.quick b { display: block; font-size: 14px; font-weight: 650; line-height: 1.28; }
.quick span:not(.qi) { display: block; }
.quick span { font-size: 12px; color: var(--ink-3); }
.quick button.hero { background: linear-gradient(150deg, #3350E6 0%, var(--lojuvard) 50%, #1A2FA8 100%); border-color: transparent; color: #fff; box-shadow: 0 14px 28px -16px rgba(35,64,217,.8); }
.quick button.hero .qi { background: rgba(255,255,255,.16); color: #fff; }
.quick button.hero span:not(.qi) { color: rgba(225,233,255,.78); }
@media (min-width: 640px) { .quick { grid-template-columns: repeat(4, 1fr); } }

/* Segmentli yorliqlar */
.tabs { display: flex; gap: 4px; padding: 4px; margin: 4px 0 16px; background: var(--fill); border-radius: 15px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { flex: 1 0 auto; height: 38px; padding: 0 12px; border-radius: 11px; font-weight: 600; font-size: 13.5px; color: var(--ink-3); display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; }
.tabs button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(14,26,61,.14); }
.tabs button .cnt { font-size: 11px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--bad-fill); color: #fff; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }

/* Filtr chiplar, qidiruv */
.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px 12px; padding: 0 16px; }
.chips::-webkit-scrollbar { display: none; }
.chips button { flex: none; height: 34px; padding: 0 13px; border-radius: 17px; background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); font-size: 13px; font-weight: 600; }
.chips button.on { background: var(--primary-soft); border-color: color-mix(in srgb, var(--primary) 38%, transparent); color: var(--primary-ink); }
.searchbox { display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 14px; margin-bottom: 12px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.searchbox:focus-within { border-color: var(--primary); box-shadow: var(--ring); }
.searchbox input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; font-size: 16px; }
.searchbox .ic { color: var(--ink-3); }

/* ---------- Forma ---------- */
.field { display: block; margin-bottom: 16px; }
.field > span { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 7px; }
.field > span b { color: var(--bad); font-weight: 700; }
.field input, .field select, .field textarea { width: 100%; height: 52px; padding: 0 14px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); font-size: 16px; outline: none; transition: border-color .15s, box-shadow .15s; }
.field select { -webkit-appearance: none; appearance: none; padding-right: 42px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2366739A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; background-size: 18px; }
.field textarea { height: auto; min-height: 112px; padding: 12px 14px; line-height: 1.5; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: var(--ink-4); }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--primary); box-shadow: var(--ring); }
.field .help { font-size: 12.5px; color: var(--ink-3); margin-top: 6px; line-height: 1.45; }
.field.err input, .field.err select, .field.err textarea { border-color: var(--bad-fill); box-shadow: 0 0 0 4px color-mix(in srgb, var(--bad-fill) 16%, transparent); }
.radios { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; background: var(--fill); border-radius: 15px; }
.radios label { position: relative; display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 4px 6px; border-radius: 11px; font-weight: 600; font-size: 14px; color: var(--ink-2); cursor: pointer; text-align: center; line-height: 1.2; }
.radios label:has(input:checked) { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(14,26,61,.16); }
.radios label.warm:has(input:checked) { background: var(--bad-fill); color: #fff; }
.radios label.amber:has(input:checked) { background: var(--warn-fill); color: #2A1A00; }
.radios label.green:has(input:checked) { background: var(--ok-fill); color: #fff; }
.radios label:has(input:focus-visible) { box-shadow: var(--ring); }
.radios input { position: absolute; opacity: 0; width: 0; height: 0; }
.attach { display: flex; gap: 8px; }
.attach button { flex: 1; height: 52px; border-radius: 14px; border: 1.5px dashed var(--fill-2); background: var(--surface-2); color: var(--ink-2); display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 600; font-size: 14px; }
.attach button:hover { border-color: var(--primary); color: var(--primary-ink); }
.attach button.done { border: 1.5px solid color-mix(in srgb, var(--ok) 35%, transparent); background: var(--ok-soft); color: var(--ok); }
.formfoot { position: sticky; z-index: 5; bottom: calc(var(--nav-h) + var(--sab) + 18px); padding: 12px 0 2px; margin-top: 8px; background: linear-gradient(to top, var(--bg) 62%, transparent); }
.app.inner .formfoot { bottom: calc(var(--sab) + 8px); }

/* ---------- Varaq, toast, banner ---------- */
.overlay { position: fixed; inset: 0; z-index: 50; background: rgba(5,14,54,.5); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); display: flex; align-items: flex-end; justify-content: center; animation: fade .18s ease-out; }
.sheet { width: 100%; max-height: 92dvh; overflow: auto; background: var(--surface); border-radius: 28px 28px 0 0; padding: 8px 18px calc(18px + var(--sab)); box-shadow: var(--sh-float); animation: up .26s cubic-bezier(.2,.85,.25,1); }
.overlay.still, .overlay.still .sheet { animation: none; }
.sheet .grab { width: 38px; height: 5px; border-radius: 3px; background: var(--fill-2); margin: 4px auto 16px; }
.sheet h3 { font-size: 20px; font-weight: 700; letter-spacing: -.016em; margin-bottom: 6px; }
.sheet .lead { color: var(--ink-2); font-size: 14px; line-height: 1.5; margin-bottom: 16px; }
.sheet .menu button { display: flex; align-items: center; gap: 14px; width: 100%; padding: 11px 6px; text-align: left; border-radius: 14px; position: relative; color: var(--ink); }
.sheet .menu button + button::after { content: ""; position: absolute; top: 0; left: 64px; right: 0; height: 1px; background: var(--line-2); }
.sheet .menu button:hover { background: var(--surface-2); }
.sheet .menu .qi { width: 44px; height: 44px; border-radius: 14px; background: var(--primary-soft); color: var(--primary-ink); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.sheet .menu .qi.warm { background: var(--bad-soft); color: var(--bad); }
.sheet .menu b { display: block; font-weight: 650; font-size: 15px; }
.sheet .menu span { font-size: 12.5px; color: var(--ink-3); line-height: 1.4; }
.toast { position: fixed; left: 50%; bottom: calc(var(--nav-h) + var(--sab) + 24px); transform: translateX(-50%); z-index: 60; display: flex; align-items: center; gap: 10px; max-width: min(92vw, 460px); padding: 12px 16px; border-radius: 16px; background: var(--tun-3); color: #fff; font-weight: 600; font-size: 14px; box-shadow: var(--sh-float); animation: toast .24s cubic-bezier(.2,.85,.25,1); }
html.inner .toast { bottom: calc(var(--sab) + 92px); }
.toast.green .ic { color: #45F0A6; }
@keyframes up { from { transform: translateY(28px); opacity: .5; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes toast { from { transform: translate(-50%, 12px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }
.banner { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; margin-bottom: 14px; border-radius: 16px; font-size: 13.5px; line-height: 1.5; }
.banner .ic { flex: none; margin-top: 1px; }
.banner b { font-weight: 650; }
.banner.blue { background: var(--primary-soft); color: var(--primary-ink); }
.banner.amber { background: var(--warn-soft); color: var(--warn); }
.banner.red { background: var(--bad-soft); color: var(--bad); }
.banner.grey { background: var(--fill); color: var(--ink-2); }
.offline { position: sticky; z-index: 25; top: calc(var(--sat) + var(--bar-h) + 1px); display: flex; align-items: center; justify-content: center; gap: 8px; padding: 7px 12px; background: var(--warn-fill); color: #231500; font-size: 13px; font-weight: 650; text-align: center; }

/* ---------- Murojaat tafsiloti ---------- */
.detail-head { padding: 2px 0 14px; }
.detail-head .top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 12px; }
.detail-head h2 { font-size: 23px; font-weight: 700; letter-spacing: -.02em; line-height: 1.22; }
.dh-sub { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 13.5px; color: var(--ink-3); }
.detail-text { padding: 16px 18px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); font-size: 16.5px; line-height: 1.6; }
.sla { display: flex; align-items: center; gap: 12px; margin-top: 10px; padding: 12px 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); color: var(--ink-3); }
.sla .bar { flex: 1; height: 8px; border-radius: 4px; background: var(--fill); overflow: hidden; }
.sla .bar i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--primary), color-mix(in srgb, var(--primary) 55%, var(--firuza))); }
.sla.soon .bar i { background: var(--warn-fill); } .sla.late .bar i { background: var(--bad-fill); }
.sla .d { font-weight: 650; font-size: 13.5px; white-space: nowrap; color: var(--ink); }
.sla.soon .d { color: var(--warn); } .sla.late .d { color: var(--bad); }
.detail-head + .detail-text + .banner, .sla + .banner { margin-top: 10px; }
.kv { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.kv > div { min-width: 0; }
.kv .k { font-size: 12px; color: var(--ink-3); margin-bottom: 3px; }
.kv .v { font-weight: 550; font-size: 14.5px; overflow-wrap: anywhere; }
.people { display: flex; flex-direction: column; gap: 12px; }
.person { display: flex; align-items: center; gap: 12px; }
.person .who { flex: 1; min-width: 0; }
.person .who b { display: block; font-weight: 650; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person .who span { font-size: 12.5px; color: var(--ink-3); }
.person .who .vac { color: var(--bad); }
.person .acts { display: flex; gap: 6px; }
.person .acts .iconbtn { width: 38px; height: 38px; border-radius: 12px; }
.person .pmain { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; text-align: left; color: inherit; }
.person .pmain:hover b { color: var(--primary-ink); }
.timeline { position: relative; padding-left: 26px; }
.timeline::before { content: ""; position: absolute; left: 8px; top: 8px; bottom: 8px; width: 2px; border-radius: 1px; background: var(--line); }
.tl { position: relative; padding-bottom: 16px; }
.tl:last-child { padding-bottom: 0; }
.tl::before { content: ""; position: absolute; left: -24px; top: 3px; width: 14px; height: 14px; border-radius: 50%; background: var(--surface); box-shadow: inset 0 0 0 3px var(--primary); }
.tl.sys::before { box-shadow: inset 0 0 0 3px var(--ink-4); }
.tl.warn::before { background: var(--bad-fill); box-shadow: 0 0 0 3px var(--bad-soft); }
.tl.good::before { background: var(--ok-fill); box-shadow: 0 0 0 3px var(--ok-soft); }
.tl .w { font-size: 12px; color: var(--ink-3); }
.tl .n { font-size: 14px; line-height: 1.45; margin-top: 2px; }
.sec { margin-top: 4px; }

/* ---------- Vazifalar ---------- */
.vz { position: relative; display: flex; gap: 12px; padding: 14px; }
.vz + .vz::after { content: ""; position: absolute; top: 0; left: 14px; right: 0; height: 1px; background: var(--line-2); }
.vz .vbody { flex: 1; min-width: 0; }
.vz .vt { font-weight: 550; line-height: 1.42; }
.vz .vm { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 8px; font-size: 12px; color: var(--ink-3); }
.vz .vm a { color: var(--primary-ink); font-weight: 600; }
.vz .vstat { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.vz .mark { display: flex; gap: 2px; padding: 3px; border-radius: 12px; background: var(--fill); }
.vz .mark button { width: 34px; height: 32px; border-radius: 9px; color: var(--ink-3); display: inline-flex; align-items: center; justify-content: center; font-size: 14px; }
.vz .mark button:hover { background: var(--surface); color: var(--ink); }
.vz .mark button.on.g { background: var(--ok-fill); color: #fff; }
.vz .mark button.on.a { background: var(--warn-fill); color: #2A1A00; }
.vz .mark button.on.r { background: var(--bad-fill); color: #fff; }
.period-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; background: var(--surface-2); border-bottom: 1px solid var(--line-2); font-size: 12.5px; color: var(--ink-3); }
.period-head b { color: var(--ink); font-weight: 650; font-size: 14px; }
.plan { padding: 16px; }
.plan ol { margin: 10px 0 0; padding-left: 20px; }
.plan li { margin: 7px 0; line-height: 1.45; }
.planrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.planrow b { display: block; font-weight: 650; }
.planrow span.sub { display: block; font-size: 13px; color: var(--ink-3); margin-top: 2px; }
.lockbox { display: flex; gap: 12px; padding: 14px 16px; margin-bottom: 14px; border-radius: 18px; background: linear-gradient(135deg, #FFF8E2 0%, #FBEFC8 100%); border: 1px solid #EFD993; color: #573F02; font-size: 13.5px; line-height: 1.5; }
.lockbox .ic { flex: none; margin-top: 1px; }

/* ---------- Mahalla, jamoa ---------- */
.team .person { position: relative; padding: 11px 14px; }
.team .person + .person::after { content: ""; position: absolute; top: 0; left: 66px; right: 0; height: 1px; background: var(--line-2); }
.team .grp { padding: 10px 14px 8px; font-size: 12.5px; font-weight: 600; color: var(--ink-3); background: var(--surface-2); border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }
.team .period-head + .grp { border-top: 0; }
.mahalla-head { display: flex; align-items: center; gap: 12px; padding: 16px; }
.mahalla-head .mn { flex: 1; min-width: 0; }
.mahalla-head .mn b { display: block; font-size: 19px; font-weight: 700; letter-spacing: -.016em; }
.mahalla-head .mn span { font-size: 13px; color: var(--ink-3); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line-2); }
.stats > div { padding: 12px 16px; }
.stats > div + div { box-shadow: inset 1px 0 0 var(--line-2); }
.stats b { display: block; font-size: 20px; font-weight: 650; letter-spacing: -.025em; font-variant-numeric: tabular-nums; }
.stats span { font-size: 12px; color: var(--ink-3); }
.toifa { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: 0; }
.toifa.yashil { background: var(--ok-fill); } .toifa.sariq { background: var(--warn-fill); } .toifa.qizil { background: var(--bad-fill); }

/* Bildirishnomalar, profil */
.notif { position: relative; display: flex; gap: 12px; padding: 14px; color: var(--ink); }
.notif + .notif::after { content: ""; position: absolute; top: 0; left: 64px; right: 0; height: 1px; background: var(--line-2); }
.notif:hover { background: var(--surface-2); }
.notif .ni { width: 38px; height: 38px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; flex: none; background: var(--primary-soft); color: var(--primary-ink); }
.notif .ni.red { background: var(--bad-soft); color: var(--bad); } .notif .ni.amber { background: var(--warn-soft); color: var(--warn); } .notif .ni.green { background: var(--ok-soft); color: var(--ok); }
.notif .nb { flex: 1; min-width: 0; }
.notif .nb p { font-size: 14.5px; line-height: 1.45; }
.notif .nb span { font-size: 12px; color: var(--ink-3); }
.prof-row { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; }
.prof-row + .prof-row::after { content: ""; position: absolute; top: 0; left: 16px; right: 0; height: 1px; background: var(--line-2); }
.prof-row .k { font-size: 13.5px; color: var(--ink-3); }
.prof-row .v { font-weight: 550; text-align: right; }
a.prof-row { color: var(--ink); font-weight: 600; }
a.prof-row:hover { background: var(--surface-2); }
a.prof-row .ic { color: var(--ink-4); }
.switch { position: relative; flex: none; width: 56px; height: 34px; border-radius: 17px; background: var(--fill-2); transition: background .2s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 28px; height: 28px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.28); transition: transform .2s cubic-bezier(.2,.85,.25,1); }
.switch.on { background: var(--primary); }
.switch.on::after { transform: translateX(22px); }

/* ---------- Kirish ---------- */
/* ---------- KIRISH: chapda brend, o'ngda forma (davlat ko'rinishi) ---------- */
.login {
  min-height: 100dvh; display: grid; grid-template-columns: 1.05fr .95fr;
  background: var(--surface);
}
/* Chap ustun — lojuvard brend paneli */
.lg-chap {
  position: relative; isolation: isolate; overflow: hidden; color: #fff;
  background: linear-gradient(165deg, var(--tun-2) 0%, var(--tun) 42%, var(--tun-3) 100%);
  display: flex; align-items: center; padding: 56px clamp(32px, 5vw, 72px);
}
.lg-naqsh {
  position: absolute; inset: 0; z-index: -1; background-image: var(--girih);
  background-size: 92px 92px; opacity: .5;
  -webkit-mask-image: radial-gradient(120% 90% at 20% 15%, #000 0%, rgba(0,0,0,.25) 55%, transparent 85%);
  mask-image: radial-gradient(120% 90% at 20% 15%, #000 0%, rgba(0,0,0,.25) 55%, transparent 85%);
}
.lg-ich { max-width: 46ch; }
.lg-gerb .gerb, .lg-gerb svg { width: 86px; height: 88px; filter: drop-shadow(0 14px 30px rgba(0,0,0,.45)); }
.lg-davlat {
  margin-top: 20px; font-size: 13px; font-weight: 600; line-height: 1.5;
  letter-spacing: .01em; color: rgba(225,233,255,.82);
}
.lg-chap h1 {
  margin-top: 10px; font-size: clamp(30px, 3.4vw, 42px); font-weight: 700;
  letter-spacing: -.03em; line-height: 1.08;
}
.lg-shior {
  margin-top: 14px; font-size: 15px; line-height: 1.6; color: rgba(225,233,255,.76);
}
.lg-royxat { margin-top: 30px; display: grid; gap: 14px; }
.lg-royxat li { display: flex; gap: 12px; align-items: flex-start; }
.lg-royxat li > svg {
  flex: none; box-sizing: content-box; width: 18px; height: 18px; padding: 8px;
  border-radius: 11px; background: rgba(255,255,255,.12); stroke: #fff;
}
.lg-royxat b { display: block; font-size: 14px; font-weight: 650; }
.lg-royxat span { display: block; font-size: 13px; line-height: 1.45; color: rgba(225,233,255,.66); }
.lg-oyoq {
  margin-top: 38px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.12);
  font-size: 12.5px; line-height: 1.55; color: rgba(225,233,255,.55);
}
/* O'ng ustun — forma */
.lg-ong {
  display: flex; align-items: center; justify-content: center;
  padding: 48px clamp(24px, 4vw, 64px);
  background: var(--surface);
  border-left: 1px solid rgba(255,255,255,.06);
}
.lg-karta { width: 100%; max-width: 400px; }
.lg-karta h2 { font-size: 26px; font-weight: 700; letter-spacing: -.022em; color: var(--ink); }
.lg-lead { margin: 8px 0 22px; font-size: 14px; line-height: 1.55; color: var(--ink-3); }
.lg-karta .field { margin-bottom: 14px; }
.lg-karta .btn.primary { margin-top: 6px; height: 50px; font-size: 15.5px; }
.lg-kod {
  font-size: 24px; font-weight: 700; letter-spacing: .32em; text-align: center;
  font-variant-numeric: tabular-nums;
}
.lg-orqaga {
  display: inline-flex; align-items: center; gap: 6px; margin-bottom: 14px;
  padding: 6px 12px 6px 8px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface-2); color: var(--ink-2); font-size: 13px; font-weight: 600;
}
.lg-orqaga svg { transform: rotate(180deg); }
.lg-qadam {
  display: flex; align-items: center; gap: 8px; margin-top: 20px;
  font-size: 12.5px; font-weight: 600; color: var(--ink-3);
}
.lg-raqam {
  display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
  background: var(--primary-soft); color: var(--primary-ink); font-size: 12px; font-weight: 700;
}
.lg-chiziq { flex: 1; height: 1px; background: var(--line); }
.lg-eslatma {
  display: flex; gap: 9px; align-items: flex-start; margin-top: 22px;
  padding: 12px 14px; border-radius: 14px; background: var(--surface-2);
  border: 1px solid var(--line-2); font-size: 12.5px; line-height: 1.5; color: var(--ink-3);
}
.lg-eslatma svg { flex: none; width: 16px; height: 16px; margin-top: 1px; stroke: var(--ink-3); }
.lg-tg { background: #2AABEE; border-color: #2AABEE; }
.lg-tg:hover { background: #1f97d4; }
.lg-kutish {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  margin-top: 18px; font-size: 13px; color: var(--ink-3);
}
.lg-nuqta {
  width: 9px; height: 9px; border-radius: 50%; background: var(--primary);
  animation: lg-puls 1.4s ease-in-out infinite;
}
@keyframes lg-puls { 0%, 100% { opacity: .25; transform: scale(.85); } 50% { opacity: 1; transform: scale(1); } }

@media (max-width: 900px) {
  .login { grid-template-columns: 1fr; min-height: auto; }
  .lg-chap { padding: 34px 22px 30px; align-items: flex-start; }
  .lg-ich { max-width: none; }
  .lg-gerb .gerb, .lg-gerb svg { width: 64px; height: 66px; }
  .lg-chap h1 { font-size: 28px; }
  .lg-shior { font-size: 14px; }
  .lg-royxat, .lg-oyoq { display: none; }
  .lg-ong { padding: 26px 20px 40px; }
  .lg-karta { max-width: 460px; }
}
@media (prefers-reduced-motion: reduce) { .lg-nuqta { animation: none; opacity: .8; } }

.codeboxes { display: flex; justify-content: center; gap: 8px; margin: 10px 0 18px; }
.codeboxes input { width: 46px; height: 58px; text-align: center; font-size: 24px; font-weight: 700; border: 1.5px solid var(--line); border-radius: 14px; background: var(--surface); font-variant-numeric: tabular-nums; outline: none; }
.codeboxes input:focus { border-color: var(--primary); box-shadow: var(--ring); }
.tg-note { display: flex; align-items: flex-start; gap: 10px; padding: 11px 13px; margin-bottom: 14px; border-radius: 14px; background: var(--primary-soft); color: var(--primary-ink); font-size: 13px; line-height: 1.45; }

/* ---------- Boshqaruv paneli ---------- */
.grid2 { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
@media (min-width: 900px) { .grid2 { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); } }
.bars { display: flex; flex-direction: column; gap: 11px; padding: 16px; }
.bar-row { display: grid; grid-template-columns: minmax(0, 150px) 1fr 30px; gap: 10px; align-items: center; font-size: 13px; }
.bar-row .lbl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink-2); }
.bar-row .trk { display: flex; height: 10px; border-radius: 5px; background: var(--fill); overflow: hidden; }
.bar-row .trk i { display: block; height: 100%; }
.bar-row .trk i.a { background: var(--primary); } .bar-row .trk i.b { background: var(--bad-fill); }
.bar-row .n { text-align: right; font-weight: 650; font-variant-numeric: tabular-nums; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; padding: 11px 16px; border-top: 1px solid var(--line-2); font-size: 12.5px; color: var(--ink-3); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.trend svg { display: block; width: 100%; height: 104px; }
.trend rect.on { fill: var(--primary); } .trend rect.off { fill: var(--fill-2); } .trend rect.now { fill: var(--firuza); }
.trend-x { display: flex; justify-content: space-between; margin-top: 8px; font-size: 12px; color: var(--ink-3); }
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
table.tbl th { text-align: left; padding: 11px 14px; font-size: 12.5px; font-weight: 600; color: var(--ink-3); background: var(--surface-2); border-bottom: 1px solid var(--line); white-space: nowrap; }
table.tbl td { padding: 12px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
table.tbl tr:last-child td { border-bottom: 0; }
table.tbl td.r, table.tbl th.r { text-align: right; font-variant-numeric: tabular-nums; }
table.tbl tr.click { cursor: pointer; }
table.tbl tr.click:hover td { background: var(--surface-2); }
.matrix { overflow-x: auto; }
.matrix table { border-collapse: separate; border-spacing: 4px; font-size: 12px; }
.matrix th { padding: 4px 8px 4px 4px; font-weight: 550; color: var(--ink-2); text-align: left; white-space: nowrap; }
.matrix th.col { writing-mode: vertical-rl; transform: rotate(180deg); height: 118px; padding: 6px 2px; text-align: left; }
.matrix td { width: 32px; height: 32px; border-radius: 9px; text-align: center; font-weight: 650; font-size: 12px; }
.matrix td.full { background: var(--ok-soft); color: var(--ok); } .matrix td.part { background: var(--warn-soft); color: var(--warn); } .matrix td.none { background: var(--bad-soft); color: var(--bad); } .matrix td.na { background: var(--fill); color: var(--ink-4); }
.matrix th.rowh { position: sticky; left: 0; z-index: 1; background: var(--surface); }

/* ---------- Hujjat (hisobot) — har doim oq qog'oz ---------- */
.doc {
  padding: 28px 22px; border-radius: 20px; background: #fff; color: #0E1A3D;
  border: 1px solid var(--line); box-shadow: var(--sh-float);
  /* Hujjat — bosma varaq: ranglar mavzuga bog'liq emas */
  --ink: #0E1A3D; --ink-2: #333F62; --ink-3: #55628A; --ink-4: #7C87AC;
  --line: #D7DEF0; --line-2: #E9EEF9; --surface: #fff; --surface-2: #F5F8FD;
  --fill: #F0F4FC; --fill-2: #E6ECF8;
}
.doc .dh { text-align: center; padding-bottom: 16px; margin-bottom: 18px; border-bottom: 2px solid #0E1A3D; }
.doc .dh .gerb { width: 60px; height: 61px; margin: 0 auto 10px; }
.doc .dh .org { font-size: 12.5px; font-weight: 500; color: #3B4768; }
.doc .dh h2 { font-size: 19px; font-weight: 700; letter-spacing: -.012em; margin: 8px 0 4px; }
.doc .dh .sub { font-size: 13.5px; color: #3B4768; }
.doc h3 { font-size: 14.5px; font-weight: 700; margin: 20px 0 8px; }
.doc .tw { overflow-x: auto; }
.doc table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.doc td, .doc th { border: 1px solid #CDD4E4; padding: 8px 10px; text-align: left; vertical-align: top; }
.doc th { background: #F1F4FA; font-weight: 650; }
.doc td.r, .doc th.r { text-align: right; font-variant-numeric: tabular-nums; }
.doc .nodata { color: #5F6A8A; font-style: italic; }
.doc .sign { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 30px; font-size: 13.5px; }
.doc .sign div { border-top: 1px solid #0E1A3D; padding-top: 6px; }
.doc .stamp { display: inline-flex; align-items: center; justify-content: center; margin-top: 14px; width: 96px; height: 96px; border-radius: 50%; border: 1.5px solid #B8860B; box-shadow: inset 0 0 0 4px #fff, inset 0 0 0 5px #B8860B; color: #8A6508; font-size: 9px; font-weight: 650; text-align: center; line-height: 1.35; opacity: .85; }

/* ---------- Ish stoli ---------- */
@media (min-width: 1024px) {
  .topbar, .bnav { display: none; }
  .shell { min-height: 100dvh; }
  .side { display: flex; flex-direction: column; position: sticky; top: 0; height: 100dvh; width: var(--side-w); flex: none; padding: 20px 14px 14px; color: #fff;
    background: radial-gradient(130% 38% at 0% 0%, rgba(16,180,200,.22) 0%, rgba(16,180,200,0) 60%), linear-gradient(180deg, #0B1D62 0%, #050E36 100%); }
  .side .brand { color: #fff; padding: 2px 8px 18px; margin-bottom: 10px; border-bottom: 1px solid rgba(255,255,255,.1); }
  .side .brand .gerb { width: 46px; height: 47px; filter: drop-shadow(0 4px 10px rgba(0,0,0,.35)); }
  .side .brand-name { font-size: 17px; }
  .side .brand-sub { color: rgba(225,233,255,.66); }
  .side nav { flex: 1; overflow-y: auto; margin: 0 -6px; padding: 0 6px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.15) transparent; }
  .side nav a { display: flex; align-items: center; gap: 12px; margin: 2px 0; padding: 10px 12px; border-radius: 12px; color: rgba(225,233,255,.76); font-weight: 550; font-size: 14.5px; line-height: 1.3; }
  .side nav a .ic { width: 20px; height: 20px; color: rgba(225,233,255,.55); }
  .side nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
  .side nav a.on { background: rgba(255,255,255,.11); color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.07); }
  .side nav a.on .ic { color: var(--zar-2); }
  .side nav a .cnt { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--bad-fill); color: #fff; font-size: 11.5px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
  .side-sec { padding: 18px 12px 6px; font-size: 12px; font-weight: 600; color: rgba(225,233,255,.48); }
  .side .side-foot { margin-top: 10px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.1); }
  .side .me { display: flex; align-items: center; gap: 10px; padding: 8px 6px; border-radius: 12px; color: #fff; }
  .side .me:hover { background: rgba(255,255,255,.06); }
  .side .me .seal { box-shadow: 0 0 0 2px rgba(255,255,255,.85); }
  .side .me .who { min-width: 0; }
  .side .me .who b { display: block; font-size: 13.5px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .side .me .who span { font-size: 12px; color: rgba(225,233,255,.66); }
  .side .side-tools { display: flex; gap: 6px; padding: 8px 2px 0; }
  .side .side-tools button { flex: 1; height: 36px; border-radius: 10px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); color: #fff; font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
  .side .side-tools button:hover { background: rgba(255,255,255,.12); }
  main.content, .app.inner main.content { padding-bottom: 44px; }
  .screen { max-width: 980px; padding: 34px 40px 24px; }
  .screen.wide { max-width: 1240px; }
  .desktop-only { display: block; }
  .dhead.desktop-only { display: flex; }
  .mobile-only { display: none !important; }
  .dhead { align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
  .dhead h1 { font-size: 32px; font-weight: 700; letter-spacing: -.03em; line-height: 1.1; }
  .dhead p { margin-top: 6px; font-size: 14.5px; color: var(--ink-3); }
  .hello { margin-top: 0; }
  .hello h1 { font-size: 32px; letter-spacing: -.03em; }
  .segment, .chips { margin-left: 0; margin-right: 0; padding-left: 0; padding-right: 0; flex-wrap: wrap; }
  .overlay { align-items: center; }
  .sheet { width: 560px; max-height: 88vh; border-radius: 26px; padding: 22px 26px 24px; }
  .sheet .grab { display: none; }
  .toast, html.inner .toast { bottom: 28px; }
  .formfoot, .app.inner .formfoot { position: static; padding: 4px 0 0; background: none; }
  .detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 28px; align-items: start; }
  .detail-grid > div:last-child > .sec:first-child .h-sec { margin-top: 0; }
  .idcard { padding: 24px 26px 20px; }
  .idcard .id-fio { font-size: 24px; }
  .idcard .id-wm { width: 250px; height: 255px; right: -40px; }
}

@media print {
  .topbar, .bnav, .side, .btns, .offline, .banner, .no-print, .segment { display: none !important; }
  html, body { background: #fff !important; }
  main.content { padding: 0 !important; }
  .screen { max-width: none; padding: 0; }
  .doc { border: 0; box-shadow: none; padding: 0; }
}

/* ---------- Fuqaroni yo'naltirish: QR va havola ---------- */
.qr-joy { width: 220px; margin: 4px auto 0; }
.qr-joy svg { width: 100%; height: auto; display: block; border-radius: 10px; }
.havola-matn {
  font: 13.5px/1.5 ui-monospace, "SF Mono", Menlo, monospace; word-break: break-all;
  padding: 11px 13px; border: 1px dashed var(--line-2); border-radius: 12px;
  background: var(--surface-2); color: var(--ink-2); user-select: all;
}
