/* Kelajak markazi — topshiriqlar tizimi
   Boshqaruv paneli uslubi: chap menyu, oq kartalar, aniq holat ranglari */
:root {
  --bg: #f4f5f9;
  --surface: #ffffff;
  --surface-2: #f8f9fc;
  --line: #e7e8ef;
  --line-2: #d6d8e3;
  --ink: #111427;
  --ink-2: #474b63;
  --muted: #858aa3;

  --brand: #4b1fa6;
  --brand-2: #3b1688;
  --brand-50: #f3effc;
  --brand-100: #e6ddf9;

  --green: #16a34a;
  --green-ink: #15803d;
  --green-50: #ecfdf3;
  --green-100: #c9f2d9;
  --red: #e5383b;
  --red-ink: #b42326;
  --red-50: #fef1f1;
  --red-100: #fbd5d5;
  --amber: #f59e0b;
  --amber-ink: #b45309;
  --amber-50: #fff8eb;
  --amber-100: #fde7b8;
  --blue: #2563eb;
  --blue-50: #eef4ff;
  --none: #e4e6ee;

  --r-s: 8px;
  --r: 10px;
  --r-l: 14px;
  --sh-1: 0 1px 2px rgba(17, 20, 39, .05);
  --sh-2: 0 1px 2px rgba(17, 20, 39, .04), 0 4px 16px -4px rgba(17, 20, 39, .08);
  --sh-3: 0 10px 30px -8px rgba(17, 20, 39, .18);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --sidebar: 264px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 14.5px; line-height: 1.5; color: var(--ink); background: var(--bg); font-feature-settings: 'cv11', 'ss01'; -webkit-font-smoothing: antialiased; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; letter-spacing: -.011em; }
h1 { font-size: 24px; font-weight: 700; letter-spacing: -.022em; }
h2 { font-size: 16px; font-weight: 650; }
h3 { font-size: 15px; font-weight: 600; }
p { margin: 0; }
small, .small { font-size: 13px; }
.muted { color: var(--muted); }
.center { text-align: center; margin-top: 12px; }
code.pw { font-size: 17px; background: #fff; padding: 2px 10px; border-radius: 6px; border: 1px solid var(--green-100); letter-spacing: .05em; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
.ic { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
form { margin: 0; }
.flip { display: inline-flex; transform: scaleX(-1); }

/* ================= Karkas: chap menyu + asosiy qism ================= */
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar); background: var(--surface); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; z-index: 40; transition: transform .2s ease;
}
.sb-brand { display: flex; align-items: center; padding: 18px 22px 14px; border-bottom: 1px solid var(--line); }
.sb-brand img { height: 52px; width: auto; display: block; }
.sb-nav { flex: 1; padding: 14px 12px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.sb-label { font-size: 12px; font-weight: 600; color: var(--muted); padding: 14px 12px 6px; }
.sb-label:first-child { padding-top: 4px; }
.sb-link {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r); color: var(--ink-2);
  font-weight: 550; position: relative; transition: background .12s, color .12s;
}
.sb-link .ic { width: 20px; height: 20px; color: var(--muted); }
.sb-link:hover { background: var(--surface-2); color: var(--ink); text-decoration: none; }
.sb-link.on { background: var(--brand-50); color: var(--brand); font-weight: 650; }
.sb-link.on .ic { color: var(--brand); }
.sb-link.on::before { content: ''; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--brand); }
.sb-link span { flex: 1; }
.badge { background: var(--red); color: #fff; font-size: 11.5px; font-weight: 700; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; display: inline-grid; place-items: center; }
.sb-user { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-top: 1px solid var(--line); }
.sb-user-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.sb-user-text b { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-user-text small { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, #6d3fd6, var(--brand)); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; }
.sb-overlay { display: none; }

.main { margin-left: var(--sidebar); min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30; height: 60px; display: flex; align-items: center; gap: 12px; padding: 0 32px;
  background: rgba(255, 255, 255, .85); backdrop-filter: saturate(180%) blur(10px); -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar .sb-toggle { display: none; }
.tb-crumb { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--muted); min-width: 0; }
.tb-crumb b { color: var(--ink); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-crumb span:first-child { white-space: nowrap; }
.tb-sep { color: var(--line-2); }
.tb-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.tb-date { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--line); padding: 6px 12px; border-radius: 20px; white-space: nowrap; }
.tb-date .ic { width: 16px; height: 16px; color: var(--muted); }
.content { padding: 28px 32px 56px; width: 100%; max-width: 1360px; }

.icon-btn { background: none; border: 0; color: var(--muted); width: 36px; height: 36px; border-radius: var(--r-s); display: inline-grid; place-items: center; cursor: pointer; flex: none; }
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }

/* ================= Sahifa sarlavhasi ================= */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head p { margin-top: 4px; }
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-weight: 550; font-size: 13.5px; margin-bottom: 14px; }
.back:hover { color: var(--brand); text-decoration: none; }
.back .ic { width: 16px; height: 16px; }
.school-title { display: flex; align-items: center; gap: 14px; }
.st-num { font-weight: 800; font-size: 20px; min-width: 52px; height: 52px; padding: 0 8px; border-radius: var(--r-l); background: linear-gradient(135deg, #6d3fd6, var(--brand)); color: #fff; display: grid; place-items: center; box-shadow: 0 6px 16px -6px rgba(75, 31, 166, .6); }

/* ================= Kartalar ================= */
.panel, .card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: 22px; box-shadow: var(--sh-1); }
.panel > h2 { margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: -4px 0 14px; }
.card-head h2 { display: flex; align-items: center; gap: 10px; }
.panel + .panel, .panel + section, section + .panel, .split + .panel, .kpis + .split, .kpis + .panel, .card + .card, .kpis + .card, .kpis + .dash, .page-head + .panel { margin-top: 20px; }
.page-head + .panel, .page-head + .kpis { margin-top: 0; }
.count { background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); font-size: 12px; font-weight: 650; border-radius: 20px; padding: 1px 9px; }
.count-amber { background: var(--amber-50); border-color: var(--amber-100); color: var(--amber-ink); }
.hdot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.hdot-red { background: var(--red); } .hdot-amber { background: var(--amber); } .hdot-green { background: var(--green); }
.note { background: var(--red-50); color: var(--red-ink); padding: 10px 14px; border-radius: var(--r); font-size: 13.5px; margin-bottom: 8px; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.split-even { grid-template-columns: 1fr 1fr; }
.split > .panel, .split > form.panel { margin-top: 0; }

/* KPI kartalar */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: 18px; display: flex; gap: 14px; align-items: flex-start; box-shadow: var(--sh-1); }
.kpi-ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.kpi-ic .ic { width: 22px; height: 22px; stroke-width: 1.9; }
.kpi-brand { background: var(--brand-50); color: var(--brand); }
.kpi-blue { background: var(--blue-50); color: var(--blue); }
.kpi-amber { background: var(--amber-50); color: var(--amber-ink); }
.kpi-green { background: var(--green-50); color: var(--green-ink); }
.kpi-red { background: var(--red-50); color: var(--red-ink); }
.kpi-body { display: flex; flex-direction: column; min-width: 0; }
.kpi-l { color: var(--muted); font-size: 13px; font-weight: 500; }
.kpi-v { font-size: 26px; font-weight: 750; letter-spacing: -.03em; line-height: 1.2; margin-top: 2px; font-variant-numeric: tabular-nums; }
.kpi-s { color: var(--ink-2); font-size: 12.5px; margin-top: 2px; }

/* Bosh sahifa to‘ri */
.dash { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.dash-side { display: flex; flex-direction: column; gap: 20px; position: sticky; top: 80px; }
.dash-side .card + .card { margin-top: 0; }

/* ================= Tugmalar ================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 600; font-size: 14px;
  padding: 9px 16px; border-radius: var(--r); border: 1px solid transparent; cursor: pointer; white-space: nowrap; line-height: 1.3;
  transition: background-color .12s, border-color .12s, color .12s, box-shadow .12s;
}
.btn .ic { width: 17px; height: 17px; stroke-width: 2; }
.btn:hover { text-decoration: none; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 1px 2px rgba(17, 20, 39, .1), inset 0 1px 0 rgba(255, 255, 255, .12); }
.btn-primary:hover { background: var(--brand-2); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line-2); box-shadow: var(--sh-1); }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--muted); }
.btn-danger { color: var(--red-ink); }
.btn-danger:hover { border-color: var(--red); color: var(--red); background: var(--red-50); }
.btn-green { background: var(--green); color: #fff; }
.btn-green:hover:not(:disabled) { background: var(--green-ink); }
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover:not(:disabled) { background: var(--red-ink); }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-wide { width: 100%; padding: 11px; }

/* ================= Holat belgilari ================= */
.chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 600; padding: 2px 9px 2px 7px; border-radius: 20px; white-space: nowrap; border: 1px solid transparent; }
.chip .ic { width: 14px; height: 14px; stroke-width: 2.3; }
.chip .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; margin: 0 3px; }
.chip-green { background: var(--green-50); color: var(--green-ink); border-color: var(--green-100); }
.chip-red { background: var(--red-50); color: var(--red-ink); border-color: var(--red-100); }
.chip-amber { background: var(--amber-50); color: var(--amber-ink); border-color: var(--amber-100); }
.pill { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 20px; white-space: nowrap; }
.pill-amber { background: var(--amber-50); color: var(--amber-ink); }
.pill-green { background: var(--green-50); color: var(--green-ink); }
.pill-red { background: var(--red-50); color: var(--red-ink); }
.pill-gray { background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); }

.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; color: var(--muted); font-size: 13px; }
.meta > span, .meta a { display: inline-flex; align-items: center; gap: 5px; }
.meta .ic { width: 15px; height: 15px; }
.dl { display: inline-flex; align-items: center; gap: 5px; }
.dl-muted { color: var(--muted); }
.dl-normal { color: var(--ink-2); }
.dl-soon { color: var(--amber-ink); font-weight: 600; }
.dl-late { color: var(--red-ink); font-weight: 600; }

/* Bajarilish chizig‘i */
.prog { width: 220px; }
.prog-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 6px; font-size: 12.5px; color: var(--muted); }
.prog-top b { color: var(--ink); font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pbar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: var(--none); gap: 2px; }
.pbar i { display: block; height: 100%; }
.pb-green { background: var(--green); }
.pb-amber { background: var(--amber); }
.pb-red { background: var(--red); }
.pb-none { background: var(--none); }

.counts, .legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--ink-2); }
.counts span, .legend span { display: inline-flex; align-items: center; gap: 6px; }
.counts b { color: var(--ink); font-weight: 650; }
.c { display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--none); }
.c-green { background: var(--green); }
.c-amber { background: var(--amber); }
.c-red { background: var(--none); box-shadow: inset 0 0 0 1.5px #c9ccd9; }
.c-ret { background: var(--red); box-shadow: none; }

/* Halqa diagramma */
.donut-wrap { display: flex; align-items: center; gap: 20px; }
.donut { width: 132px; height: 132px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.donut-in { width: 92px; height: 92px; border-radius: 50%; background: var(--surface); display: flex; flex-direction: column; align-items: center; justify-content: center; }
.donut-in b { font-size: 22px; font-weight: 750; letter-spacing: -.03em; }
.donut-in small { color: var(--muted); font-size: 12px; }
.donut-legend { list-style: none; margin: 0; padding: 0; flex: 1; display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.donut-legend li { display: grid; grid-template-columns: 10px 1fr auto 36px; align-items: center; gap: 8px; color: var(--ink-2); }
.donut-legend i { width: 10px; height: 10px; border-radius: 3px; }
.donut-legend b { color: var(--ink); font-variant-numeric: tabular-nums; }
.donut-legend small { color: var(--muted); text-align: right; font-size: 12px; }

/* ================= Topshiriqlar ro‘yxati ================= */
.tlist { display: flex; flex-direction: column; margin: 0 -22px -22px; }
.trow {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px 18px; align-items: center;
  padding: 16px 22px; border-top: 1px solid var(--line); color: inherit; transition: background .12s;
}
.trow:hover { background: var(--surface-2); text-decoration: none; }
.trow:hover h3 { color: var(--brand); }
.trow:last-child { border-radius: 0 0 var(--r-l) var(--r-l); }
.trow h3 { margin-bottom: 5px; }
.trow-ic { width: 40px; height: 40px; border-radius: var(--r); display: grid; place-items: center; background: var(--brand-50); color: var(--brand); }
.trow-ic .ic { width: 20px; height: 20px; }
.trow-green { background: var(--green-50); color: var(--green-ink); }
.trow-amber { background: var(--amber-50); color: var(--amber-ink); }
.trow-red { background: var(--red-50); color: var(--red-ink); }
.trow-prog { display: flex; justify-content: flex-end; min-width: 220px; }
.grp + .grp { margin-top: 20px; }

/* Tekshirish navbati */
.queue ul { list-style: none; margin: 0 -10px; padding: 0; max-height: 420px; overflow: auto; }
.queue li a { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 9px 10px; border-radius: var(--r); color: inherit; }
.queue li a:hover { background: var(--surface-2); text-decoration: none; }
.q-num { font-weight: 750; font-size: 14px; width: 38px; height: 38px; display: grid; place-items: center; border-radius: var(--r); background: var(--amber-50); color: var(--amber-ink); border: 1px solid var(--amber-100); }
.q-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.q-text b { font-size: 13.5px; font-weight: 600; }
.q-text small { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12.5px; }
.queue time { font-size: 12px; color: var(--muted); white-space: nowrap; }

/* ================= Topshiriq sahifasi ================= */
.task-wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: 26px 28px; box-shadow: var(--sh-1); }
.task h1 { margin-bottom: 10px; max-width: 34ch; }
.task .body { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); white-space: pre-wrap; max-width: 78ch; font-size: 15px; line-height: 1.7; color: var(--ink-2); }
.attach { margin-top: 20px; max-width: 700px; }
.attach h4 { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 8px; }
.attach h4 .ic { width: 16px; height: 16px; }
.task-tools { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

.files { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.files li { display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 10px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); transition: border-color .12s; }
.files li:hover { border-color: var(--line-2); }
.ext { flex: none; width: 38px; height: 38px; border-radius: 8px; display: grid; place-items: center; font-size: 10.5px; font-weight: 800; text-transform: uppercase; color: #fff; background: #8a8fa6; letter-spacing: .02em; }
.ext-word { background: #2b5cd8; }
.ext-excel { background: #1b8a4c; }
.ext-pdf { background: #e03e36; }
.ext-img { background: #8b4fd8; }
.ext-ppt { background: #e0692b; }
.fname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); font-weight: 550; font-size: 14px; }
a.fname:hover { color: var(--brand); }
.fsize { color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.thumbs img { width: 128px; height: 96px; object-fit: cover; border-radius: var(--r); border: 1px solid var(--line); display: block; }

/* ================= Maktablar taxtasi ================= */
.board-sec { margin-top: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: 22px; box-shadow: var(--sh-1); }
.board-sec > .muted { margin-bottom: 16px; }
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 10px 20px; flex-wrap: wrap; margin-bottom: 6px; }
.sec-head h2 .muted { font-weight: 500; margin-left: 6px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.tile {
  position: relative; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; gap: 4px 10px; align-items: center;
  padding: 12px; border-radius: var(--r); color: var(--ink); border: 1px solid var(--line); background: var(--surface);
  transition: border-color .12s, box-shadow .12s, transform .12s;
}
a.tile:hover { text-decoration: none; box-shadow: var(--sh-3); transform: translateY(-1px); }
.t-num { grid-row: span 2; width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; font-weight: 750; font-size: 16px; font-variant-numeric: tabular-nums; }
.t-name { font-size: 13px; font-weight: 600; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-st { font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.t-st .ic { width: 13px; height: 13px; stroke-width: 2.5; }
.t-approved { background: var(--green-50); border-color: var(--green-100); }
.t-approved .t-num { background: var(--green); color: #fff; }
.t-approved .t-st { color: var(--green-ink); }
.t-pending { background: var(--amber-50); border-color: var(--amber-100); }
.t-pending .t-num { background: var(--amber); color: #fff; }
.t-pending .t-st { color: var(--amber-ink); }
.t-none .t-num { background: var(--red-50); color: var(--red-ink); border: 1px solid var(--red-100); }
.t-none .t-st { color: var(--red-ink); }
.t-none .t-st::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--red); margin-right: 2px; }
.t-rejected { background: var(--red-50); border-color: var(--red-100); }
.t-rejected .t-num { background: var(--red); color: #fff; }
.t-rejected .t-st { color: var(--red-ink); }
.t-me { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ================= Javob va tarix ================= */
.answer { margin-top: 20px; }
.answer .form { margin-top: 16px; }
.state-box { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r); margin: 8px 0; border: 1px solid transparent; }
.state-box > .ic { width: 22px; height: 22px; stroke-width: 2.2; margin-top: 1px; }
.state-box p { margin-top: 2px; color: var(--ink-2); }
.sb-green { background: var(--green-50); color: var(--green-ink); border-color: var(--green-100); }
.sb-amber { background: var(--amber-50); color: var(--amber-ink); border-color: var(--amber-100); }

.redpen { border: 1px solid var(--red-100); border-left: 4px solid var(--red); background: var(--red-50); color: var(--red-ink); padding: 12px 16px; border-radius: var(--r); margin-top: 10px; }
.redpen > div { color: var(--ink); white-space: pre-wrap; margin-top: 4px; }
.redpen small { display: block; color: var(--muted); margin-top: 6px; }
.redpen.big { margin: 8px 0; }
.greenpen { border-color: var(--green-100); border-left-color: var(--green); background: var(--green-50); color: var(--green-ink); }

.hist-wrap { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 14px; }
.hist-wrap summary { cursor: pointer; font-weight: 600; color: var(--ink-2); }
.history { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.h { padding: 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface-2); }
.h-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.h-note { white-space: pre-wrap; margin-bottom: 10px; }
.h:not(:first-child) { opacity: .75; }

.review-head { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: 18px 20px; box-shadow: var(--sh-1); }
.rh-num { font-weight: 800; font-size: 22px; width: 60px; height: 60px; border-radius: var(--r-l); display: grid; place-items: center; }
.rh-num.t-approved { background: var(--green); color: #fff; }
.rh-num.t-pending { background: var(--amber); color: #fff; }
.rh-num.t-rejected { background: var(--red); color: #fff; }
.rh-num.t-none { background: var(--red-50); color: var(--red-ink); border: 1px solid var(--red-100); }
.rh-text { flex: 1; min-width: 220px; }
.rh-text h1 { margin-bottom: 8px; font-size: 22px; }
.rh-nav { display: flex; gap: 8px; }
.review-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.review-grid > .panel { margin-top: 0; }
.decide { position: sticky; top: 80px; }
.decide-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* ================= Formalar ================= */
.form { display: flex; flex-direction: column; gap: 16px; }
.form h2 { margin-bottom: 2px; }
.form-wide { max-width: 920px; }
.narrow { max-width: 480px; }
label { display: block; font-weight: 550; font-size: 13.5px; color: var(--ink-2); }
label > input, label > select, label > textarea { display: block; margin-top: 6px; }
.lbl { margin-bottom: -8px; display: block; }
.opt { font-weight: 400; color: var(--muted); font-size: 12.5px; margin-left: 4px; }
input, select, textarea {
  font: inherit; font-size: 14.5px; font-weight: 400; color: var(--ink); background: #fff; border: 1px solid var(--line-2);
  border-radius: var(--r); padding: 10px 12px; width: 100%; min-height: 42px; box-shadow: var(--sh-1); transition: border-color .12s, box-shadow .12s;
}
input::placeholder, textarea::placeholder { color: #a6aabf; }
textarea { resize: vertical; line-height: 1.55; }
input:hover, select:hover, textarea:hover { border-color: #c3c6d6; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-100); }
input[type=checkbox], input[type=radio] { width: 17px; height: 17px; min-height: 0; accent-color: var(--brand); margin: 0; box-shadow: none; }
.check, .seg label, .pick-item, .drop label { display: flex; }
.check { flex-direction: row; align-items: center; gap: 8px; font-weight: 500; cursor: pointer; }
.check.danger { color: var(--red-ink); font-size: 13px; }
.row2, .row3 { display: grid; gap: 16px; }
.row2 { grid-template-columns: 1fr 1fr; }
.row3 { grid-template-columns: 1fr 1fr 1fr; }
.span2 { grid-column: span 2; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; padding-top: 16px; border-top: 1px solid var(--line); }
.err { background: var(--red-50); color: var(--red-ink); padding: 10px 14px; border-radius: var(--r); font-weight: 500; border: 1px solid var(--red-100); }
.err[hidden] { display: none; }
fieldset { border: 0; padding: 0; margin: 0; }
legend { font-weight: 550; font-size: 13.5px; color: var(--ink-2); padding: 0; margin-bottom: 8px; }

.seg { display: inline-flex; background: #eceef4; padding: 4px; border-radius: var(--r); gap: 2px; flex-wrap: wrap; }
.seg label { flex-direction: row; cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span, .seg-links a { padding: 7px 14px; border-radius: 7px; font-weight: 600; color: var(--ink-2); font-size: 13.5px; }
.seg input:checked + span, .seg-links a.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(17, 20, 39, .12); }
.seg input:focus-visible + span { outline: 2px solid var(--brand); }
.seg-links a:hover { text-decoration: none; color: var(--ink); }

.pick { margin-top: 12px; border: 1px solid var(--line); border-radius: var(--r); padding: 12px; background: var(--surface-2); }
.pick[hidden] { display: none; }
.pick-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; gap: 10px; }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px; max-height: 340px; overflow: auto; }
.pick-item { flex-direction: row; align-items: center; gap: 8px; padding: 7px 9px; border: 1px solid var(--line); border-radius: var(--r-s); font-weight: 500; cursor: pointer; color: var(--ink); background: #fff; }
.pick-item:has(input:checked) { border-color: var(--brand); background: var(--brand-50); }
.pn { font-weight: 700; font-size: 12.5px; min-width: 22px; color: var(--brand); }
.pt { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Fayl tashlash maydoni */
.drop { position: relative; }
.drop input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop label {
  flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 24px 18px; border: 1.5px dashed var(--line-2); border-radius: var(--r-l);
  cursor: pointer; background: var(--surface-2); color: var(--ink-2); font-weight: 400; transition: border-color .12s, background .12s;
}
.drop label .ic { width: 22px; height: 22px; color: var(--brand); background: var(--brand-50); box-sizing: content-box; padding: 10px; border-radius: 50%; margin-bottom: 4px; }
.drop label b { color: var(--brand); font-weight: 600; }
.drop label small { color: var(--muted); }
.drop.over label, .drop label:hover { border-color: var(--brand); background: var(--brand-50); }
.drop input:focus-visible + label { outline: 2px solid var(--brand); border-color: var(--brand); }
.drop-list { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.drop-list:empty { display: none; }
.drop-list li { display: flex; align-items: center; gap: 12px; padding: 7px 8px 7px 10px; border: 1px solid var(--line); border-radius: var(--r); background: #fff; }
.drop-list li.bad { border-color: var(--red-100); background: var(--red-50); }

/* ================= Kirish sahifasi ================= */
.bare .wrap { max-width: none; padding: 0; }
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
.auth-side {
  background: radial-gradient(1200px 600px at -10% -10%, #7b4be0 0%, transparent 60%), radial-gradient(900px 500px at 120% 120%, #2a0c6e 0%, transparent 55%), var(--brand);
  color: #fff; padding: clamp(32px, 6vw, 72px); display: flex; flex-direction: column; justify-content: center; gap: 22px; position: relative; overflow: hidden;
}
.auth-side .auth-logo { width: 200px; background: #fff; border-radius: var(--r-l); padding: 12px 18px; box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .4); }
.auth-side h1 { font-size: clamp(28px, 3.2vw, 40px); max-width: 15ch; line-height: 1.12; letter-spacing: -.03em; font-weight: 800; }
.auth-side p { max-width: 44ch; color: rgba(255, 255, 255, .78); font-size: 16px; line-height: 1.6; }
.auth-grid { display: grid; grid-template-columns: repeat(11, 26px); gap: 6px; margin-top: 8px; }
.auth-grid i { width: 26px; height: 26px; border-radius: 6px; background: rgba(255, 255, 255, .12); animation: fill .5s ease forwards; animation-delay: calc(var(--d) * 60ms + 300ms); }
@keyframes fill { to { background: #34d399; } }
.auth-form { display: grid; place-items: center; padding: 32px 20px; background: var(--surface); }
.auth-form .card { width: 100%; max-width: 400px; border: 0; box-shadow: none; padding: 8px; }
.auth-form .card h2 { font-size: 24px; font-weight: 750; letter-spacing: -.02em; margin-bottom: 2px; }
.auth-reg { grid-template-columns: 1fr; background: var(--bg); }
.auth-reg .auth-form { align-content: center; gap: 20px; background: var(--bg); }
.auth-reg .card { max-width: 580px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-2); padding: 28px; }
.auth-logo.sm { width: 170px; display: block; margin: 0 auto; }

/* ================= Bo‘sh holat ================= */
.empty { text-align: center; padding: 40px 16px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.empty p { color: var(--muted); max-width: 46ch; }
.empty .btn { margin-top: 10px; }
.empty-cells { display: grid; grid-template-columns: repeat(3, 12px); gap: 4px; margin-bottom: 10px; padding: 14px; background: var(--brand-50); border-radius: 50%; }
.empty-cells i { width: 12px; height: 12px; border-radius: 3px; background: var(--brand-100); }
.empty-cells i:nth-child(5) { background: var(--brand); }

/* ================= Xabarlar ================= */
.flash { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: var(--r); margin-bottom: 20px; font-weight: 550; border: 1px solid transparent; box-shadow: var(--sh-1); }
.flash > span { flex: 1; }
.flash-ok { background: var(--green-50); color: var(--green-ink); border-color: var(--green-100); }
.flash-err { background: var(--red-50); color: var(--red-ink); border-color: var(--red-100); }
.flash-x { background: none; border: 0; color: inherit; cursor: pointer; padding: 4px; display: grid; opacity: .7; }
.bare .flash { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 50; }

/* ================= Umumiy holat matritsasi ================= */
.legend .m { width: 12px; height: 12px; }
.mx-wrap { padding: 0; overflow: auto; max-height: calc(100vh - 200px); }
.mx { border-collapse: separate; border-spacing: 0; font-size: 13.5px; min-width: 100%; }
.mx th, .mx td { padding: 0; border-bottom: 1px solid var(--line); background: var(--surface); }
.mx thead th { position: sticky; top: 0; z-index: 2; vertical-align: bottom; background: var(--surface-2); }
.mx tbody th, .mx-corner { position: sticky; left: 0; z-index: 1; text-align: left; }
.mx-corner { z-index: 3 !important; padding: 12px 16px !important; font-weight: 600; color: var(--muted); font-size: 12.5px; }
.mx tbody th { padding: 7px 16px 7px 14px; font-weight: 550; white-space: nowrap; border-right: 1px solid var(--line); }
.mx-num { display: inline-grid; place-items: center; min-width: 28px; height: 24px; padding: 0 5px; margin-right: 10px; border-radius: 6px; background: var(--brand-50); color: var(--brand); font-size: 12px; font-weight: 700; }
.mx-task { width: 128px; min-width: 112px; max-width: 150px; }
.mx-task a { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 8px 10px; color: var(--ink-2); text-align: center; }
.mx-task a:hover { text-decoration: none; color: var(--brand); }
.mx-i { font-size: 11px; font-weight: 500; color: var(--muted); }
.mx-t { font-size: 12px; font-weight: 600; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.mx td { text-align: center; }
.mx td a, .mx td > i { display: inline-grid; place-items: center; }
.mx td a { padding: 7px 10px; }
.mx td > .m { margin: 7px 10px; }
.m { display: inline-block; width: 20px; height: 20px; border-radius: 6px; }
.m-green { background: var(--green); }
.m-amber { background: var(--amber); }
.m-red { background: var(--none); box-shadow: inset 0 0 0 1.5px #c9ccd9; }
.m-ret { background: var(--red); box-shadow: none; }
.m-na { background: repeating-linear-gradient(135deg, #f1f2f6 0 4px, #fff 4px 8px) !important; }
.mx td a:hover .m { transform: scale(1.15); }
.mx-sum { padding: 6px 16px !important; white-space: nowrap; color: var(--muted); font-size: 12.5px; }
.mx-sum b { color: var(--ink); font-size: 14px; }
.mx tr.me th, .mx tr.me td { background: var(--brand-50); }
.mx tbody tr:hover th, .mx tbody tr:hover td { background: var(--surface-2); }
.mx tbody tr.me:hover th, .mx tbody tr.me:hover td { background: var(--brand-50); }
.mx tbody tr:last-child > * { border-bottom: 0; }

/* ================= Statistika ================= */
.podium, .attn { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.podium li, .attn li { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line); }
.attn li { grid-template-columns: auto minmax(0, 1fr); }
.podium li:last-child, .attn li:last-child { border-bottom: 0; }
.pod-rank { font-size: 12px; font-weight: 700; color: var(--muted); width: 24px; height: 24px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--line); display: grid; place-items: center; }
.podium li:first-child .pod-rank { background: #fef3c7; border-color: #fcd34d; color: #92400e; }
.pod-num { font-weight: 750; font-size: 15px; width: 42px; height: 42px; display: grid; place-items: center; border-radius: var(--r); background: var(--green); color: #fff; }
.attn .pod-num { background: var(--red-50); color: var(--red-ink); border: 1px solid var(--red-100); }
.pod-text { display: flex; flex-direction: column; min-width: 0; }
.pod-text b { font-weight: 600; }
.pod-text small { color: var(--muted); }
.pod-score { font-weight: 800; font-size: 20px; color: var(--brand); letter-spacing: -.02em; }

.table-wrap { overflow-x: auto; margin: 0 -22px -22px; }
table.rank, table.schools { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.rank th, .rank td, .schools th, .schools td { padding: 12px 10px; border-bottom: 1px solid var(--line); text-align: center; white-space: nowrap; }
.rank th:first-child, .rank td:first-child, .schools th:first-child, .schools td:first-child { padding-left: 22px; }
.rank th:last-child, .rank td:last-child, .schools th:last-child, .schools td:last-child { padding-right: 22px; }
.rank thead th, .schools thead th { font-size: 12px; font-weight: 600; color: var(--muted); background: var(--surface-2); border-top: 1px solid var(--line); vertical-align: bottom; white-space: normal; line-height: 1.3; }
.rank tbody tr:last-child > *, .schools tbody tr:last-child > * { border-bottom: 0; }
.rank tbody tr:hover > *, .schools tbody tr:hover > * { background: var(--surface-2); }
.rank .l, .schools .l { text-align: left; }
.rank tbody th, .schools tbody th { font-weight: 600; }
.rk { font-weight: 700; color: var(--muted); font-size: 13px; }
.rank td { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.sc b { color: var(--ink); font-size: 15px; font-weight: 750; }
.bar { display: block; width: 76px; height: 6px; border-radius: 3px; background: var(--none); margin: 6px auto 0; overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 3px; }
.bar-brand { background: var(--brand); }
.bar-green { background: var(--green); }
.muted-row th, .muted-row td { opacity: .6; }

/* ================= Maktablar ================= */
.reqs { border-left: 4px solid var(--amber); }
.req-list { list-style: none; margin: 0; padding: 0; }
.req-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.req-list li:last-child { border-bottom: 0; }
.req-text { display: flex; flex-direction: column; }
.req-btns { display: flex; gap: 8px; }
details.add > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 10px; }
details.add > summary::-webkit-details-marker { display: none; }
details.add > summary::before { content: '+'; width: 28px; height: 28px; border-radius: 8px; background: var(--brand-50); color: var(--brand); display: grid; place-items: center; font-weight: 700; font-size: 18px; }
details.add[open] > summary::before { content: '−'; }
details.add[open] > summary { margin-bottom: 18px; }
.danger-zone { border-color: var(--red-100); }
.danger-zone .dz-row { display: flex; gap: 10px; flex-wrap: wrap; }

/* ================= Moslashuvchan ================= */
@media (max-width: 1180px) {
  .dash, .review-grid, .split { grid-template-columns: 1fr; }
  .dash-side, .decide { position: static; }
  .dash-side { display: grid; grid-template-columns: 1fr 1fr; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .sidebar { transform: translateX(-100%); box-shadow: var(--sh-3); }
  body.sb-open .sidebar { transform: none; }
  body.sb-open .sb-overlay { display: block; position: fixed; inset: 0; background: rgba(17, 20, 39, .35); z-index: 35; }
  .main { margin-left: 0; }
  .topbar .sb-toggle { display: inline-grid; margin-left: -8px; }
  .topbar { padding: 0 20px; }
  .content { padding: 22px 20px 48px; }
}
@media (max-width: 720px) {
  body { font-size: 14.5px; }
  h1 { font-size: 21px; }
  .topbar { padding: 0 16px; height: 56px; }
  .tb-crumb span:first-child, .tb-sep { display: none; }
  .content { padding: 18px 16px 40px; }
  .panel, .card, .board-sec { padding: 16px; }
  .tlist { margin: 0 -16px -16px; }
  .table-wrap { margin: 0 -16px -16px; }
  .trow { grid-template-columns: auto minmax(0, 1fr); padding: 14px 16px; }
  .trow-prog { grid-column: 1 / -1; justify-content: flex-start; min-width: 0; }
  .prog { width: 100%; }
  .task-wrap { grid-template-columns: 1fr; padding: 18px; }
  .task-tools { justify-content: flex-start; }
  .row2, .row3, .split-even, .dash-side { grid-template-columns: 1fr; }
  .span2 { grid-column: auto; }
  .kpis { gap: 10px; }
  .kpi { padding: 14px; flex-direction: column; gap: 10px; }
  .kpi-ic { width: 36px; height: 36px; }
  .kpi-v { font-size: 22px; }
  .tiles { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
  .auth { grid-template-columns: 1fr; }
  .auth-side { padding: 28px 20px; gap: 14px; }
  .auth-side .auth-logo { width: 160px; }
  .auth-side h1 { font-size: 26px; }
  .auth-grid { grid-template-columns: repeat(11, 1fr); gap: 4px; }
  .auth-grid i { width: auto; height: auto; aspect-ratio: 1; }
  .page-head { align-items: flex-start; }
  .decide-btns { grid-template-columns: 1fr; }
  .donut-wrap { flex-direction: column; align-items: stretch; }
  .donut { margin: 0 auto; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .auth-grid i { background: #34d399; }
}

/* ================= Qo‘shimcha holatlar =================
   Admin: ko‘k = ko‘rilmadi, sariq = ko‘rib chiqilmoqda.
   Maktab: faqat yashil (bajarildi) va qizil (bajarilmagan). */
:root { --blue-100: #cddcfd; --blue-ink: #1d4ed8; --todo: #f4b4b4; }
.chip-blue { background: var(--blue-50); color: var(--blue-ink); border-color: var(--blue-100); }
.chip-gray { background: var(--surface-2); color: var(--ink-2); border-color: var(--line); }
.pill-blue { background: var(--blue-50); color: var(--blue-ink); }
.count-blue { background: var(--blue-50); border-color: var(--blue-100); color: var(--blue-ink); }
.pb-blue { background: var(--blue); }
.pb-todo { background: var(--todo); }
.c-blue { background: var(--blue); }
.c-todo { background: var(--todo); box-shadow: none; }
.m-blue { background: var(--blue); }
.trow-blue { background: var(--blue-50); color: var(--blue-ink); }
.sb-gray { background: var(--surface-2); color: var(--ink-2); border-color: var(--line); }
.q-num.q-new { background: var(--blue-50); color: var(--blue-ink); border-color: var(--blue-100); }
.q-num.q-seen { background: var(--amber-50); color: var(--amber-ink); border-color: var(--amber-100); }

.t-new { background: var(--blue-50); border-color: var(--blue-100); }
.t-new .t-num { background: var(--blue); color: #fff; }
.t-new .t-st { color: var(--blue-ink); }
.rh-num.t-new { background: var(--blue); color: #fff; }
.t-done { background: var(--green-50); border-color: var(--green-100); }
.t-done .t-num { background: var(--green); color: #fff; }
.t-done .t-st { color: var(--green-ink); }
.t-todo { background: var(--red-50); border-color: var(--red-100); }
.t-todo .t-num { background: var(--red); color: #fff; }
.t-todo .t-st { color: var(--red-ink); }
.t-todo .t-st::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--red); margin-right: 2px; }
/* Bajarilmagan (admin): och qizil */
.t-none { background: var(--red-50); border-color: var(--red-100); }
.t-none .t-num { background: #fff; }
.m-red { background: var(--todo); box-shadow: none; }
.m-ret { background: var(--red); }
.c-red { background: var(--red); box-shadow: none; }
@media (max-width: 1180px) {
  /* Toq sonli kartalarda oxirgisi butun qatorni egallaydi */
  .kpis > .kpi:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

/* ================= Kun / tun rejimi =================
   Yorug‘ rejim — yuqoridagi ranglar. Tun rejimi: tugma bilan ([data-theme="dark"])
   yoki qurilma sozlamasi bo‘yicha (tugma bosilmagan bo‘lsa). */
:root {
  --input-bg: #ffffff;
  --input-hover: #c3c6d6;
  --placeholder: #a6aabf;
  --topbar-bg: rgba(255, 255, 255, .85);
  --seg-bg: #eceef4;
  --seg-on: #ffffff;
  --stripe-a: #f1f2f6;
  --stripe-b: #ffffff;
  --logo-bg: transparent;
  --logo-pad: 0;
  --sun: none;
  --moon: block;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0e1016; --surface: #161922; --surface-2: #1c202b; --line: #272c39; --line-2: #363c4c;
  --ink: #eceef5; --ink-2: #b8bdd0; --muted: #868ca3;
  --brand: #8f73f2; --brand-2: #7d5fe8; --brand-50: rgba(143, 115, 242, .14); --brand-100: rgba(143, 115, 242, .3);
  --green: #22c55e; --green-ink: #4ade80; --green-50: rgba(34, 197, 94, .12); --green-100: rgba(34, 197, 94, .3);
  --red: #ef4444; --red-ink: #f87171; --red-50: rgba(239, 68, 68, .12); --red-100: rgba(239, 68, 68, .32);
  --amber: #f59e0b; --amber-ink: #fbbf24; --amber-50: rgba(245, 158, 11, .12); --amber-100: rgba(245, 158, 11, .32);
  --blue: #3b82f6; --blue-ink: #7aaefb; --blue-50: rgba(59, 130, 246, .14); --blue-100: rgba(59, 130, 246, .34);
  --none: #2a2f3d; --todo: rgba(239, 68, 68, .42);
  --sh-1: 0 1px 2px rgba(0, 0, 0, .35); --sh-2: 0 4px 18px -4px rgba(0, 0, 0, .5); --sh-3: 0 12px 32px -8px rgba(0, 0, 0, .6);
  --input-bg: #10131a; --input-hover: #4a5163; --placeholder: #6b7189;
  --topbar-bg: rgba(22, 25, 34, .85); --seg-bg: #0e1016; --seg-on: #262b38;
  --stripe-a: #1c202b; --stripe-b: #161922;
  --logo-bg: #ffffff; --logo-pad: 4px 10px;
  --sun: block; --moon: none;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1016; --surface: #161922; --surface-2: #1c202b; --line: #272c39; --line-2: #363c4c;
    --ink: #eceef5; --ink-2: #b8bdd0; --muted: #868ca3;
    --brand: #8f73f2; --brand-2: #7d5fe8; --brand-50: rgba(143, 115, 242, .14); --brand-100: rgba(143, 115, 242, .3);
    --green: #22c55e; --green-ink: #4ade80; --green-50: rgba(34, 197, 94, .12); --green-100: rgba(34, 197, 94, .3);
    --red: #ef4444; --red-ink: #f87171; --red-50: rgba(239, 68, 68, .12); --red-100: rgba(239, 68, 68, .32);
    --amber: #f59e0b; --amber-ink: #fbbf24; --amber-50: rgba(245, 158, 11, .12); --amber-100: rgba(245, 158, 11, .32);
    --blue: #3b82f6; --blue-ink: #7aaefb; --blue-50: rgba(59, 130, 246, .14); --blue-100: rgba(59, 130, 246, .34);
    --none: #2a2f3d; --todo: rgba(239, 68, 68, .42);
    --sh-1: 0 1px 2px rgba(0, 0, 0, .35); --sh-2: 0 4px 18px -4px rgba(0, 0, 0, .5); --sh-3: 0 12px 32px -8px rgba(0, 0, 0, .6);
    --input-bg: #10131a; --input-hover: #4a5163; --placeholder: #6b7189;
    --topbar-bg: rgba(22, 25, 34, .85); --seg-bg: #0e1016; --seg-on: #262b38;
    --stripe-a: #1c202b; --stripe-b: #161922;
    --logo-bg: #ffffff; --logo-pad: 4px 10px;
    --sun: block; --moon: none;
    color-scheme: dark;
  }
}

/* Qattiq yozilgan ranglar o‘rniga rejimga mos ranglar */
input, select, textarea { background: var(--input-bg); }
input:hover, select:hover, textarea:hover { border-color: var(--input-hover); }
input::placeholder, textarea::placeholder { color: var(--placeholder); }
input[type=checkbox], input[type=radio] { background: none; }
.topbar { background: var(--topbar-bg); }
.seg { background: var(--seg-bg); }
.seg input:checked + span, .seg-links a.on { background: var(--seg-on); }
.pick-item, .drop-list li, code.pw { background: var(--surface); }
.t-none .t-num { background: var(--surface); }
.m-na { background: repeating-linear-gradient(135deg, var(--stripe-a) 0 4px, var(--stripe-b) 4px 8px) !important; }
.sb-brand img { background: var(--logo-bg); padding: var(--logo-pad); border-radius: 10px; box-sizing: content-box; }
.auth-reg .auth-logo.sm { background: var(--logo-bg); padding: var(--logo-pad); border-radius: 12px; box-sizing: content-box; }

/* Rejim tugmasi: yorug‘da oy, tunda quyosh ko‘rinadi */
.theme-btn .ic-moon { display: var(--moon); }
.theme-btn .ic-sun { display: var(--sun); }
.theme-btn { border: 1px solid var(--line); background: var(--surface-2); }
.theme-btn:hover { color: var(--brand); border-color: var(--line-2); }
.theme-float { position: fixed; top: 16px; right: 16px; z-index: 60; box-shadow: var(--sh-2); background: var(--surface); }
.auth-side .theme-float { color: #fff; }
