/* ControlSchool — "C" uslub: och fon, to'q sariq aksent, chap menyu. Telefon va kompyuterga moslashuvchan. */
:root {
  --bg:#f4f6fa; --panel:#fff; --line:#e4e9f2; --line2:#d3dbe8; --ink:#0f172a; --ink2:#334155; --muted:#64748b; --faint:#94a3b8;
  --accent:#2563eb; --accent-d:#1d4ed8; --accent-soft:#e8f0ff; --accent-ink:#1e40af; --gold:#f59e0b; --navy:#1e3a8a;
  --green:#15803d; --green-soft:#dcfce7; --red:#b91c1c; --red-soft:#fee2e2; --warn:#a16207; --warn-soft:#fef3c7;
  --r:20px; --r-sm:12px; --head:Manrope, Inter, system-ui, sans-serif;
}
* { box-sizing:border-box; }
html { -webkit-text-size-adjust:100%; }
body { margin:0; font-family:Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; background:var(--bg); color:var(--ink); font-size:15px; line-height:1.45; }
a { color:var(--accent-d); }
code { background:#eef2f7; padding:1px 6px; border-radius:6px; font-size:.9em; }
h1 { font-family:var(--head); font-size:1.75rem; line-height:1.15; margin:.1em 0 .7em; letter-spacing:-.01em; }
h1 small { font-family:Inter, sans-serif; font-size:.5em; font-weight:500; color:var(--muted); letter-spacing:0; }
h2 { font-family:var(--head); font-size:1.15rem; margin:0 0 .8em; }
img { max-width:100%; }

/* ---------- Karkas: chap menyu + kontent ---------- */
.app { display:flex; min-height:100vh; }
.side { width:248px; flex:0 0 248px; background:var(--panel); border-right:1px solid var(--line); display:flex; flex-direction:column; gap:24px;
  padding:24px 16px; position:sticky; top:0; height:100vh; overflow-y:auto; }
.brand { font-family:var(--head); font-weight:800; font-size:1.25rem; color:var(--ink) !important; text-decoration:none; padding:0 6px; letter-spacing:-.02em; }
.brand span { color:var(--accent); }
.brand { display:inline-flex; align-items:center; gap:10px; }
.brand svg { flex:0 0 auto; }
.brand .wm { color:var(--ink); }
.brand .wm span { color:var(--accent); }
.brand .wm .tld { color:var(--muted); }
.brand.big { display:block; text-align:center; font-size:2.2rem; padding:0; }
.nav { display:flex; flex-direction:column; gap:4px; }
.nav a { display:flex; align-items:center; gap:11px; padding:11px 14px; border-radius:14px; color:var(--ink2); text-decoration:none; font-weight:600; font-size:.93rem; }
.nav a:hover { background:#eef2f8; }
.nav a.on { background:var(--accent-soft); color:var(--accent-ink); box-shadow:inset 3px 0 0 var(--accent); }
.side-primary { justify-content:center; }
.me { margin-top:auto; }
.me summary { list-style:none; display:flex; align-items:center; gap:10px; padding:10px; border-radius:14px; background:var(--bg); cursor:pointer; }
.me summary::-webkit-details-marker { display:none; }
.avatar { flex:0 0 38px; width:38px; height:38px; border-radius:50%; background:var(--accent-soft); color:var(--accent-ink); display:flex; align-items:center; justify-content:center; font-weight:700; font-size:.85rem; }
.me-txt { display:flex; flex-direction:column; min-width:0; font-size:.85rem; line-height:1.3; }
.me-txt b { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.me-txt small { color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.me-menu { display:flex; gap:6px; margin-top:8px; }
.me-menu > * { flex:1; } .me-menu form { margin:0; display:flex; } .me-menu .btn { flex:1; text-align:center; }
.content { flex:1; min-width:0; padding:28px 32px 40px; max-width:1440px; }
.content.narrow { max-width:520px; margin:0 auto; }
.content.solo { padding-top:8vh; }
.bottom-nav { display:none; }

/* ---------- Kartochka, panjara ---------- */
.card { background:var(--panel); border:1px solid var(--line); border-radius:var(--r); padding:20px; margin-bottom:16px; }
.card > :last-child { margin-bottom:0; }
.card.center, .center { text-align:center; }
.narrow-card { max-width:560px; }
.grid2 { display:grid; grid-template-columns:repeat(auto-fit, minmax(min(100%, 360px), 1fr)); gap:16px; align-items:start; }
.grid3 { display:grid; grid-template-columns:repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap:16px; align-items:stretch; }
.grid3 > .card, .grid2 > .card { margin-bottom:0; }
.grid2, .grid3 { margin-bottom:16px; }
.grid-fields { display:grid; grid-template-columns:repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap:0 12px; }
.split { display:grid; grid-template-columns:minmax(0, 360px) minmax(0, 1fr); gap:18px; align-items:start; }
.stack { display:flex; flex-direction:column; gap:14px; }
.stack > .card { margin-bottom:0; }

/* ---------- Forma ---------- */
label { display:block; margin-bottom:12px; font-size:.85rem; color:var(--muted); font-weight:500; }
input, select, textarea { display:block; width:100%; margin-top:5px; padding:11px 13px; border:1px solid var(--line2); border-radius:var(--r-sm);
  font:inherit; font-size:16px; color:var(--ink); background:#fff; min-height:44px; }
input:focus, select:focus, textarea:focus { outline:2px solid #93c5fd; border-color:var(--accent); }
input[type=checkbox] { width:20px; height:20px; min-height:0; display:inline-block; accent-color:var(--accent); }
fieldset { border:1px solid var(--line); border-radius:var(--r-sm); margin:0 0 12px; padding:10px 14px 0; }
legend { font-weight:600; font-size:.85rem; padding:0 4px; color:var(--ink2); }
.money-input { font-family:var(--head); font-size:1.5rem; font-weight:700; text-align:right; border:2px solid var(--ink); }

.btn { display:inline-flex; align-items:center; justify-content:center; gap:8px; padding:11px 18px; min-height:44px; border:1px solid var(--line2); background:#fff;
  border-radius:14px; font:inherit; font-weight:600; font-size:.93rem; cursor:pointer; color:var(--ink); text-decoration:none; }
.btn:hover { background:#eef2f8; }
.btn.primary, .btn.accent { background:var(--accent); border-color:var(--accent); color:#fff; }
.btn.primary:hover, .btn.accent:hover { background:var(--accent-d); }
.btn.dark { background:var(--ink); border-color:var(--ink); color:#fff; }
.btn.dark:hover { background:#000; }
.btn.danger { background:var(--red); border-color:var(--red); color:#fff; }
.btn.small { padding:6px 12px; min-height:34px; font-size:.82rem; border-radius:10px; }
.btn.wide { width:100%; } .btn.big { padding:15px; font-size:1.02rem; }
.btn[disabled] { opacity:.4; cursor:not-allowed; }
button.link { background:none; border:0; color:inherit; cursor:pointer; font:inherit; padding:0; }
.inline { display:inline-block; margin:0; }
.actions { display:flex; gap:8px; flex-wrap:wrap; }

/* to'lov usuli: tugma ko'rinishidagi radio */
.seg { display:flex; gap:6px; margin:0 0 12px; }
.seg label { flex:1; margin:0; }
.seg input { position:absolute; opacity:0; width:1px; height:1px; }
.seg span { display:flex; align-items:center; justify-content:center; min-height:42px; padding:8px 4px; border:1px solid var(--line2); border-radius:12px; font-size:.85rem; font-weight:600; color:var(--ink2); cursor:pointer; text-align:center; }
.seg input:checked + span { background:var(--accent-soft); border-color:var(--accent-soft); color:var(--accent-ink); }
.seg input:focus-visible + span { outline:2px solid var(--accent); }

.search { display:flex; gap:8px; margin-bottom:18px; flex-wrap:wrap; align-items:end; }
.search input { flex:1; min-width:200px; margin:0; }
.search label { margin:0; }
.searchbar { display:flex; align-items:center; gap:10px; background:#fff; border:1px solid var(--line); border-radius:16px; padding:4px 6px 4px 16px; margin-bottom:18px; color:var(--faint); }
.searchbar input { border:0; margin:0; padding:10px 0; outline:0; background:transparent; }
.searchbar .btn { flex:0 0 auto; }

/* ---------- Jadval ---------- */
.tbl-wrap, .card:has(> .tbl) { overflow-x:auto; -webkit-overflow-scrolling:touch; }
.tbl { width:100%; border-collapse:collapse; }
.tbl th, .tbl td { padding:10px 10px; border-bottom:1px dashed var(--line); text-align:left; vertical-align:top; }
.tbl tr:last-child td { border-bottom:0; }
.tbl th { font-size:.75rem; color:var(--muted); font-weight:600; text-transform:uppercase; letter-spacing:.4px; border-bottom:1px solid var(--line); white-space:nowrap; }
.tbl tr.click { cursor:pointer; } .tbl tr.click:hover td { background:#f8fafc; }
.tbl input { margin:0; }
.tbl.kv td:first-child { color:var(--muted); width:40%; }
.num { text-align:right !important; font-variant-numeric:tabular-nums; white-space:nowrap; }
.nowrap { white-space:nowrap; }
.strike td { text-decoration:line-through; color:var(--faint); }
.red { color:var(--red); } .green { color:var(--green); } .orange { color:var(--accent-d); }
.muted { color:var(--muted); } .small { font-size:.84rem; }
.tag { display:inline-block; padding:3px 10px; border-radius:20px; font-size:.76rem; font-weight:700; white-space:nowrap; }
.tag.ok { background:var(--green-soft); color:var(--green); } .tag.bad { background:var(--red-soft); color:var(--red); } .tag.warn { background:var(--warn-soft); color:var(--warn); }
.flash { padding:12px 16px; border-radius:14px; margin-bottom:16px; border:1px solid; font-weight:500; }
.flash.ok { background:#ecfdf3; border-color:#bbf7d0; color:#166534; }
.flash.error { background:#fef2f2; border-color:#fecaca; color:#991b1b; }
.flash.warn { background:#fffbeb; border-color:#fde68a; color:#854d0e; }
.flash a { color:inherit; font-weight:700; }

/* ---------- Ko'rsatkichlar ---------- */
.stats { display:grid; grid-template-columns:repeat(auto-fit, minmax(min(100%, 170px), 1fr)); gap:12px; margin-bottom:16px; }
.stat { background:var(--panel); border:1px solid var(--line); border-radius:var(--r); padding:16px 18px; }
.stat span { display:block; font-size:.8rem; color:var(--muted); }
.stat b { display:block; font-family:var(--head); font-size:1.5rem; margin-top:2px; font-variant-numeric:tabular-nums; line-height:1.2; }
.stat small { color:var(--muted); font-size:.78rem; }

/* O'quvchi kartochkasi (qora) */
.hero { background:var(--navy); color:#fff; border-radius:24px; padding:22px; }
.hero .badge { display:inline-block; font-size:.75rem; font-weight:700; background:var(--gold); color:#1f2937; padding:4px 12px; border-radius:20px; }
.hero h1 { color:#fff; font-size:1.8rem; margin:12px 0 4px; }
.hero .sub { font-size:.85rem; color:#c7d2fe; }
.hero .lbl { margin-top:18px; font-size:.85rem; color:#c7d2fe; }
.hero .big { font-family:var(--head); font-size:2.3rem; font-weight:800; color:#fcd34d; line-height:1.1; }
.hero .big.ok { color:#86efac; }
.hero .big small { font-size:.95rem; color:var(--faint); font-weight:500; }
.bar { height:10px; background:rgba(255,255,255,.18); border-radius:6px; margin-top:10px; overflow:hidden; }
.bar i { display:block; height:100%; background:var(--gold); border-radius:6px; }
.card .bar { background:#e8eef7; } .card .bar i { background:var(--accent); }
.hero .bar-legend { display:flex; justify-content:space-between; font-size:.78rem; color:#c7d2fe; margin-top:8px; gap:8px; }
.duo { display:flex; gap:12px; }
.duo > div { flex:1; min-width:0; }
.duo .v { font-family:var(--head); font-size:1.25rem; font-weight:700; }
.duo .sep { flex:0 0 1px; background:var(--line); }
.status { display:flex; align-items:center; gap:12px; border-radius:var(--r); padding:16px 18px; border:1px solid; }
.status.ok { background:#ecfdf3; border-color:#bbf7d0; color:#166534; }
.status.bad { background:#fef2f2; border-color:#fecaca; color:#991b1b; }
.status b { display:block; }

/* ---------- Kirish, tekshiruv sahifalari ---------- */
.login-box p { text-align:center; }
.login-box .card { margin-top:18px; }
.verdict { font-family:var(--head); font-size:1.6rem; font-weight:700; text-align:center; padding:24px 12px; border-radius:var(--r); margin:12px 0 16px; color:#fff; }
.verdict.ok { background:var(--green); } .verdict.bad { background:var(--red); }
.qr-big { width:240px; max-width:80%; image-rendering:pixelated; }
details.inline summary { list-style:none; display:inline-flex; }
details.inline summary::-webkit-details-marker { display:none; }
.pop { display:flex; gap:6px; margin-top:6px; flex-wrap:wrap; } .pop input { margin:0; min-width:160px; flex:1; }

/* ---------- Majburiy oyna ---------- */
.modal-bg { position:fixed; inset:0; background:rgba(28,25,23,.55); z-index:100; overflow-y:auto; padding:30px 12px; }
.modal { background:#fff; max-width:640px; margin:0 auto; border-radius:24px; padding:22px; box-shadow:0 24px 60px rgba(0,0,0,.25); }
.modal .card { background:var(--bg); }

/* ---------- Instruktor ---------- */
.timer { font-family:var(--head); font-size:2.8rem; font-weight:700; text-align:center; font-variant-numeric:tabular-nums; margin:10px 0 16px; }
.lesson-active { border:2px solid var(--green); }
.lesson-btn { border-left:6px solid var(--accent); }
.lesson-btn.t1 { border-left-color:#7c3aed; } .lesson-btn.t2 { border-left-color:#16a34a; } .lesson-btn.t3 { border-left-color:var(--accent); }
.lb-title { font-family:var(--head); font-size:1.15rem; font-weight:700; margin-bottom:2px; }
.lesson-btn label { margin-top:10px; }
.big-input { font-family:var(--head); font-size:1.5rem; padding:12px; text-align:center; }

/* ---------- O'quvchi limitlari ---------- */
.limit-form { display:flex; gap:8px; align-items:end; flex-wrap:wrap; margin:0; }
.limit-form label { margin:0; font-size:.76rem; }
.suffix-input { display:flex; align-items:stretch; border:1px solid var(--line2); border-radius:12px; background:#fff; margin-top:3px; overflow:hidden; }
.suffix-input input { border:0; margin:0; width:96px; border-radius:0; }
.suffix-input i { font-style:normal; padding:0 10px; color:var(--muted); background:#eef2f8; display:flex; align-items:center; border-left:1px solid var(--line); font-size:.85rem; }

/* ---------- Telefon va planshet ---------- */
@media (max-width: 960px) {
  .app { display:block; }
  .side { position:sticky; top:0; z-index:50; width:auto; height:auto; flex-direction:row; align-items:center; gap:10px; padding:10px 14px;
    border-right:0; border-bottom:1px solid var(--line); overflow:visible; background:rgba(255,255,255,.96); backdrop-filter:blur(8px); }
  .side .nav { display:none; }
  .side .brand { font-size:1.2rem; padding:0; margin-right:auto; }
  .side-primary { min-height:38px; padding:7px 12px; font-size:.82rem; }
  .me { margin:0; position:relative; }
  .me summary { padding:0; background:none; }
  .me-txt { display:none; }
  .me-menu { position:absolute; right:0; top:46px; flex-direction:column; background:#fff; border:1px solid var(--line); border-radius:14px; padding:8px; width:200px; box-shadow:0 12px 30px rgba(0,0,0,.12); }
  .content { padding:16px 14px 24px; }
  .has-nav .content { padding-bottom:96px; }
  .bottom-nav { display:flex; position:fixed; left:0; right:0; bottom:0; z-index:60; background:#fff; border-top:1px solid var(--line);
    padding:6px 6px calc(6px + env(safe-area-inset-bottom)); overflow-x:auto; gap:2px; }
  .bottom-nav a { flex:1 0 72px; display:flex; flex-direction:column; align-items:center; gap:3px; padding:6px 4px; border-radius:12px;
    color:var(--muted); text-decoration:none; font-size:.68rem; font-weight:600; text-align:center; line-height:1.15; }
  .bottom-nav a.on { color:var(--accent-d); background:var(--accent-soft); }
  .split { grid-template-columns:minmax(0, 1fr); }
  h1 { font-size:1.4rem; }
  .hero h1 { font-size:1.5rem; } .hero .big { font-size:2rem; }
  .card { padding:16px; border-radius:18px; }
  .stat b { font-size:1.25rem; }
  .tbl { font-size:.88rem; } .tbl th, .tbl td { padding:8px 6px; }
  .content.solo { padding-top:4vh; }
}
@media (max-width: 420px) {
  .stats { grid-template-columns:repeat(2, minmax(0, 1fr)); }
  .seg span { font-size:.78rem; }
}
@media print { .side, .bottom-nav, .btn, .search, .searchbar { display:none !important; } body { background:#fff; } .card { border:0; } }

/* Davomat kalendari */
.cal-head { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:10px; }
.cal-head h2 { margin:0; }
.cal-grid { display:grid; grid-template-columns:repeat(7, minmax(0, 1fr)); gap:5px; text-align:center; }
.cal-w { font-size:.72rem; color:var(--muted); font-weight:600; padding:2px 0; }
.cal-d { aspect-ratio:1; display:flex; align-items:center; justify-content:center; border-radius:10px; font-size:.86rem; font-weight:600; background:#f1f5f9; color:var(--ink2); }
.cal-d.empty { background:none; }
.cal-d.came { background:#16a34a; color:#fff; }
.cal-d.today { outline:2px solid var(--ink); outline-offset:-2px; }
.cal-dot { display:inline-block; width:10px; height:10px; border-radius:3px; background:#16a34a; vertical-align:middle; }
.att-list { display:flex; flex-direction:column; }
.att-item { display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap; padding:12px 0; border-bottom:1px dashed var(--line); }
.att-item:last-child { border-bottom:0; }
.att-name { min-width:0; flex:1 1 200px; }
.att-item form { display:flex; gap:6px; }

/* Kirish sahifasi: xiralashtirilgan haqiqiy fon (faqat shu sahifada) */
body.login-page { min-height:100vh; background:#1e293b url(/static/login-bg.jpg) center / cover no-repeat fixed; }
body.login-page::before { content:""; position:fixed; inset:0; background:rgba(15,23,42,.35); backdrop-filter:blur(3px); -webkit-backdrop-filter:blur(3px); z-index:0; }
body.login-page .content { position:relative; z-index:1; display:flex; align-items:center; min-height:100vh; padding-top:24px; padding-bottom:24px; }
body.login-page .login-box { width:100%; }
.login-card { padding:32px 30px; border-radius:24px; box-shadow:0 30px 80px rgba(0,0,0,.35); border:0; text-align:left; }
.login-card .brand.big { font-size:1.7rem; margin-bottom:14px; }
.login-card h1 { text-align:center; font-size:1.5rem; margin:0; }
.login-card > p.muted { text-align:center; margin:4px 0 20px; }
.login-card p.small { text-align:center; margin:14px 0 0; }
/* Kirgandan keyin: oq fon */
body.has-app { background:var(--bg); }

/* Yuqori panel (HEMIS uslubi) */
.topbar { position:sticky; top:0; z-index:40; display:flex; align-items:center; gap:12px; padding:12px 32px; background:rgba(255,255,255,.92);
  backdrop-filter:blur(8px); border-bottom:1px solid var(--line); }
.topbar .chip { display:inline-flex; align-items:center; gap:8px; padding:7px 12px; border:1px solid var(--line); border-radius:12px; font-size:.85rem; font-weight:600; color:var(--ink2); background:#fff; }
.topbar .spacer { flex:1; }
.topbar .date { font-size:.85rem; color:var(--muted); }
.topbar .me summary { background:#fff; border:1px solid var(--line); padding:5px 10px 5px 5px; }
.topbar .me { position:relative; margin:0; }
.topbar .me-menu { position:absolute; right:0; top:52px; flex-direction:column; background:#fff; border:1px solid var(--line); border-radius:14px; padding:8px; width:210px; box-shadow:0 12px 30px rgba(15,23,42,.12); }
.main-col { flex:1; min-width:0; display:flex; flex-direction:column; }
.side-foot { margin-top:auto; display:flex; flex-direction:column; gap:4px; border-top:1px solid var(--line); padding-top:12px; }
.side-foot a, .side-foot button { display:flex; align-items:center; gap:11px; padding:10px 14px; border-radius:12px; color:var(--ink2); text-decoration:none; font:inherit; font-weight:600; font-size:.9rem; background:none; border:0; cursor:pointer; width:100%; }
.side-foot a:hover, .side-foot button:hover { background:#eef2f8; }
.side-foot .logout { color:var(--red); }
.side-foot form { margin:0; }
.page-head { display:flex; align-items:flex-end; justify-content:space-between; gap:12px; flex-wrap:wrap; margin-bottom:14px; }
.crumbs { font-size:.82rem; color:var(--muted); margin-bottom:2px; }
@media (max-width: 960px) {
  .topbar { padding:10px 14px; }
  .topbar .chip, .topbar .date { display:none; }
  .topbar .me-txt { display:none; }
}

.brand-m { display:none; }
.login-logo { display:flex; justify-content:center; margin-bottom:12px; }
.login-logo .brand { flex-direction:column; gap:6px; font-size:1.5rem; }
@media (max-width: 960px) {
  .side { display:none !important; }
  .brand-m { display:inline-flex; margin-right:auto; }
  .brand-m .brand { font-size:1.05rem; padding:0; gap:7px; }
}

/* Dashboard vidjetlari */
.bars { display:flex; align-items:flex-end; gap:8px; height:150px; margin-top:6px; }
.bars .b { flex:1; min-width:0; height:100%; display:flex; flex-direction:column; justify-content:flex-end; align-items:center; gap:6px; }
.bars .col { width:100%; max-width:46px; border-radius:10px 10px 6px 6px; background:#dbe6fb; position:relative; min-height:6px; }
.bars .col.on { background:var(--accent); }
.bars .col.gold { background:var(--gold); }
.bars .v { font-size:.72rem; font-weight:700; color:var(--ink2); white-space:nowrap; }
.bars .d { font-size:.72rem; color:var(--muted); font-weight:600; }
.widget-foot { display:flex; gap:16px; margin-top:14px; border-top:1px dashed var(--line); padding-top:12px; }
.widget-foot b { display:block; font-family:var(--head); font-size:1.4rem; }
.widget-foot span { font-size:.78rem; color:var(--muted); }
.mini-list { display:flex; flex-direction:column; gap:8px; }
.mini-list .it { display:flex; align-items:center; gap:10px; padding:10px 12px; border-radius:12px; background:#f6f8fc; }
.mini-list .it b { font-size:.9rem; } .mini-list .it span { font-size:.78rem; color:var(--muted); }

/* ---------- Telefon: tuzatishlar ---------- */
input[type=date] { -webkit-appearance:none; appearance:none; min-width:0; text-align:left; }
.search label { flex:1 1 150px; min-width:0; }
@media (max-width: 960px) {
  .search { gap:10px; }
  .search .btn { flex:1 1 auto; }
  .bottom-nav { overflow-x:hidden; }
  .bottom-nav a { flex:1 1 0; min-width:0; font-size:.62rem; padding:6px 2px; }
  .bottom-nav a span { display:block; max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  /* Jadvallar kartochka ko'rinishida: har bir qator alohida blok, ustun nomi chapda */
  .tbl.stackable, .tbl.stackable tbody { display:block; }
  .tbl.stackable tr { display:block; border-bottom:1px solid var(--line); padding:10px 0; }
  .tbl.stackable tr:first-child:has(th) { display:none; }
  .tbl.stackable tr:last-child { border-bottom:0; }
  .tbl.stackable td { display:block; position:relative; border:0; padding:5px 0 5px 42%; min-height:28px; text-align:right !important; white-space:normal; overflow-wrap:anywhere; }
  .tbl.stackable td::before { content:attr(data-label); position:absolute; left:0; top:7px; width:40%; color:var(--muted); font-size:.72rem; font-weight:600; text-transform:uppercase; letter-spacing:.3px; text-align:left; line-height:1.25; }
  .tbl.stackable td:not([data-label]), .tbl.stackable td[data-label=""] { padding-left:0; }
  .tbl.stackable td:not([data-label])::before, .tbl.stackable td[data-label=""]::before { display:none; }
  .tbl.stackable td[colspan] { text-align:left !important; padding-left:0; }
  .tbl.stackable .pop, .tbl.stackable form.inline, .tbl.stackable .limit-form { justify-content:flex-end; }
}
/* Chiqimlar analitikasi */
.hbars { display:flex; flex-direction:column; gap:10px; }
.hb-top { display:flex; justify-content:space-between; gap:10px; font-size:.86rem; }
.hb-top b { white-space:nowrap; }
.hb-line { height:8px; background:#eef2f8; border-radius:6px; margin-top:4px; overflow:hidden; }
.hb-line i { display:block; height:100%; background:var(--red); border-radius:6px; }
.bars.two { gap:3px; }
.bars .pair { display:flex; align-items:flex-end; gap:2px; width:100%; height:100%; justify-content:center; }
.bars .pair .col { max-width:10px; border-radius:4px 4px 2px 2px; }
.bars .col.red { background:#ef4444; }
.dot { display:inline-block; width:10px; height:10px; border-radius:3px; vertical-align:middle; }
.dot.blue { background:var(--accent); } .dot.red { background:#ef4444; }
@media (max-width: 960px) { .bottom-nav a { font-size:.58rem; } }
/* Gorizontal ustunlar (chiqim turlari) */
.hbars { display:flex; flex-direction:column; gap:10px; }
.hb { display:grid; grid-template-columns:minmax(0, 1.2fr) minmax(0, 1fr) auto; gap:10px; align-items:center; font-size:.88rem; }
.hb-n { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.hb-t { height:10px; background:#eef2f8; border-radius:6px; overflow:hidden; }
.hb-t i { display:block; height:100%; background:var(--accent); border-radius:6px; }
.hb b { font-variant-numeric:tabular-nums; white-space:nowrap; }
@media (max-width: 960px) { .hb { grid-template-columns:1fr auto; } .hb-t { grid-column:1 / -1; grid-row:2; } }

.qr-row { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:10px 0; border-top:1px solid var(--line); margin:0; }
.qr-row:first-of-type { border-top:0; }

input.invalid, textarea.invalid, select.invalid { border-color:#dc2626 !important; box-shadow:0 0 0 3px rgba(220,38,38,.15); background:#fff5f5; }
.field-err { color:#dc2626; font-size:.85rem; font-weight:600; margin:-6px 0 10px; }

.pw-wrap { position:relative; display:block; }
.pw-wrap input { width:100%; padding-right:46px !important; }
.pw-eye { position:absolute; right:6px; top:50%; transform:translateY(-50%); background:none; border:0; padding:6px; cursor:pointer; color:#64748b; display:flex; border-radius:8px; }
.pw-eye:hover { color:#1e3a8a; background:#eef2ff; }
[hidden] { display:none !important; }
.qr-row .btn { white-space:nowrap; flex-shrink:0; }

.phone-in { display:flex; align-items:stretch; }
.phone-in .pre { display:flex; align-items:center; padding:0 10px; background:#eef2ff; border:1px solid var(--line); border-right:0; border-radius:10px 0 0 10px; font-weight:700; color:#1e3a8a; }
.phone-in input { border-radius:0 10px 10px 0 !important; flex:1; min-width:0; }

input[name=passport], input[name=plate], input[name=tech_passport], input[data-upper] { text-transform:uppercase; }

/* ================= B uslub: to'q ko'k chap menyu, oltin faol bo'lim, soyali oq kartochkalar ================= */
:root { --bg:#eef2f8; --navy:#1e3a8a; --navy-d:#172554; --gold-l:#fbbf24; --shadow:0 1px 2px rgba(15,23,42,.06), 0 1px 1px rgba(15,23,42,.03); }
body.has-app { background:var(--bg); }
/* Chap menyu */
.side { background:var(--navy-d); border-right:0; color:#dbe4ff; }
.side .brand .wm, .side .brand { color:#fff !important; }
.side .brand .wm span { color:var(--gold-l); }
.side .brand .wm .tld { color:#8fa3d9; }
.nav a { color:#dbe4ff; border-radius:12px; }
.nav a:hover { background:rgba(255,255,255,.08); color:#fff; }
.nav a.on { background:var(--gold-l); color:var(--navy-d); box-shadow:none; font-weight:700; }
.nav a svg { opacity:.9; }
.side-foot { border-top-color:rgba(255,255,255,.12); }
.side-foot a, .side-foot button { color:#dbe4ff; }
.side-foot a:hover, .side-foot button:hover { background:rgba(255,255,255,.08); }
.side-foot .logout { color:#fca5a5; }
.side .me summary { background:var(--navy); color:#fff; }
.side .me-txt small { color:#b9c6ef; }
.side .avatar { background:var(--gold-l); color:var(--navy-d); }
/* Kartochkalar: chegarasiz, yengil soya */
.card, .stat { border:0; box-shadow:var(--shadow); border-radius:18px; }
.stats { gap:0; background:var(--panel); border-radius:18px; box-shadow:var(--shadow); overflow:hidden; }
.stats .stat { box-shadow:none; border-radius:0; border-left:1px solid var(--line); }
.stats .stat:first-child { border-left:0; }
.stat b { color:var(--navy-d); font-weight:800; }
/* Tugmalar: asosiy — to'q ko'k, aksent — oltin */
.btn { border-radius:12px; }
.btn.primary { background:var(--navy); border-color:var(--navy); color:#fff; }
.btn.primary:hover { background:var(--navy-d); border-color:var(--navy-d); }
.btn.accent { background:var(--gold-l); border-color:var(--gold-l); color:var(--navy-d); }
.btn.accent:hover { background:#f59e0b; border-color:#f59e0b; }
.searchbar { border-radius:999px; border-color:var(--line2); }
.search input[name=q] { border-radius:999px; }
.seg input:checked + span { background:var(--navy); border-color:var(--navy); color:#fff; }
/* Yuqori panel */
.topbar { background:rgba(238,242,248,.9); border-bottom:0; }
@media (max-width: 960px) {
  .stats { gap:10px; background:none; box-shadow:none; overflow:visible; }
  .stats .stat { border-left:0; box-shadow:var(--shadow); border-radius:16px; }
  .topbar { background:var(--navy-d); }
  .topbar .brand .wm { color:#fff; } .topbar .brand .wm span { color:var(--gold-l); } .topbar .brand .wm .tld { color:#8fa3d9; }
  .topbar .me summary { background:var(--navy); border-color:var(--navy); color:#fff; }
  .bottom-nav a.on { color:var(--navy-d); background:#fef3c7; }
}
.btn.dark { background:var(--navy); border-color:var(--navy); }
.btn.dark:hover { background:var(--navy-d); border-color:var(--navy-d); }
.bars .col.on { background:var(--navy); }
/* Dostup belgisi (yuqori panel) */
.topbar .chip.seat.ok { color:var(--green); }
.topbar .chip.seat.warn { color:var(--warn); background:var(--warn-soft); border-color:#fde68a; }
.topbar .chip.seat.bad { color:var(--red); background:var(--red-soft); border-color:#fecaca; }
@media (max-width: 960px) { .topbar .chip.seat { display:inline-flex; font-size:.72rem; padding:5px 8px; } .topbar .chip.seat svg { display:none; } }
.row-between { display:flex; justify-content:space-between; align-items:center; gap:10px; flex-wrap:wrap; }
/* ---------- Sotuv bo'limi ---------- */
.nav-sub summary { list-style:none; display:flex; align-items:center; gap:11px; padding:12px 14px; border-radius:12px; color:#dbe4ff; font-weight:600; font-size:.93rem; cursor:pointer; }
.nav-sub summary::-webkit-details-marker { display:none; }
.nav-sub summary::after { content:"▾"; margin-left:auto; opacity:.7; transition:transform .15s; }
.nav-sub[open] summary::after { transform:rotate(180deg); }
.nav-sub summary:hover { background:rgba(255,255,255,.08); color:#fff; }
.nav-sub a { display:flex; justify-content:space-between; gap:8px; padding:8px 14px 8px 43px; border-radius:10px; color:#c3cff3; text-decoration:none; font-size:.86rem; font-weight:500; }
.nav-sub a small { color:#fbbf24; font-weight:700; }
.nav-sub a:hover { background:rgba(255,255,255,.08); color:#fff; }
.nav-sub a.on { background:rgba(251,191,36,.18); color:#fff; }
.sale-card { position:relative; display:block; color:inherit; text-decoration:none; margin-bottom:0; overflow:hidden; }
.sale-card:hover { box-shadow:0 6px 20px rgba(23,37,84,.12); }
.sale-card .sale-name { font-family:var(--head); font-size:1.05rem; }
.sale-card:has(.new-badge) { padding-top:34px; }
.new-badge { position:absolute; top:0; left:0; background:#15803d; color:#fff; font-size:.7rem; font-weight:800; letter-spacing:.06em; padding:5px 12px; border-bottom-right-radius:12px; }
.tag.new { background:#15803d; color:#fff; }
.seat-line { display:flex; justify-content:space-between; align-items:baseline; font-size:.85rem; color:var(--muted); }
.seat-line b { font-family:var(--head); font-size:1.35rem; }
.seat-line b.ok { color:var(--navy-d); } .seat-line b.warn { color:var(--warn); } .seat-line b.bad { color:var(--red); }
.card .seat-bar { margin-top:6px; } .card .seat-bar.warn i { background:#f59e0b; } .card .seat-bar.bad i { background:var(--red); }
/* Guruh maydoni: maslahat ro'yxati (datalist) strelkasi ko'rinmasin */
input[list]::-webkit-calendar-picker-indicator { display:none !important; opacity:0; }
input[list] { -webkit-appearance:none; appearance:none; }
/* Kirish sahifasi: ogohlantirish tepada (karta joyidan qimirlamaydi) */
body.login-page .content > .flash { position:fixed; top:20px; left:50%; transform:translateX(-50%); z-index:5; margin:0; max-width:min(92vw, 420px); width:max-content; box-shadow:0 8px 24px rgba(15,23,42,.25); text-align:center; }
/* Viloyatlar ro'yxati: faqat o'zi aylanadi, chap panel joyida qotib turadi */
.nav-sub .reg-list { overflow-y:auto; overscroll-behavior:contain; scrollbar-width:thin; scrollbar-color:rgba(255,255,255,.25) transparent; }
.nav-sub .reg-list::-webkit-scrollbar { width:6px; } .nav-sub .reg-list::-webkit-scrollbar-thumb { background:rgba(255,255,255,.25); border-radius:3px; }
