/* Louvre Académie CRM. Qorong'i ish maydoni, yorug' suzuvchi yon panel, yumaloq panellar; urg'u — to'q sariq va firuza. */
:root {
  /* --ink / --bone: yorug' yon panel va "teskari" to'ldirish (tanlangan tugma, bugungi kun) ranglari */
  --ink: #f3f4f6;
  --ink-2: #e6e8ec;
  --ink-line: rgba(22, 24, 29, 0.09);
  --bone: #16181d;
  --bone-2: #5b6270;

  --paper: #111318;
  --surface: #1a1d24;
  --wash: #22262f;
  --hover: #20242c;
  --line: #2a2f39;
  --line-2: #3c4351;

  --text: #e9ebf0;
  --text-2: #a5abb8;
  --text-3: #8b92a1;

  --gold: #f5a742;
  --gold-2: #e8922a;
  --gold-deep: #f8bd6c;
  --gold-wash: #33291a;
  --teal: #35d0b3;

  --ok: #4fd19a;
  --ok-wash: #16332a;
  --bad: #ff8173;
  --bad-wash: #3a201e;
  --warn: #f5b352;
  --warn-wash: #3a2d16;
  --info: #74b4ff;
  --info-wash: #1a2b42;

  --r: 10px;
  --r-lg: 16px;
  --rail: 236px;
  --font: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --serif: "Bodoni Moda", "Didot", "Bodoni 72", "Times New Roman", serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--paper); scrollbar-color: var(--line-2) transparent; scrollbar-width: thin; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font: 400 14px/1.5 var(--font);
  font-stretch: 100%;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  caret-color: var(--gold-deep);
}
::selection { background: var(--gold); color: #16181d; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-weight: 600; text-wrap: balance; }
a { color: inherit; text-decoration: none; }
a.link { color: var(--text); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
a.link:hover { text-decoration-color: var(--gold-deep); }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 2px; }
.rail :focus-visible, .auth-side :focus-visible { outline-color: var(--gold); }
.muted { color: var(--text-2); }
.num { text-align: right; white-space: nowrap; }
.nowrap { white-space: nowrap; }
.neg { color: var(--bad); font-weight: 500; }
.pos { color: var(--ok); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
svg.ic { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* ——— Qobiq ——— */
.shell { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); min-height: 100dvh; }
.rail {
  position: sticky; top: 0; height: 100dvh; overflow-y: auto;
  display: flex; flex-direction: column;
  background: var(--ink); color: var(--bone);
  scrollbar-color: #c3c7cf transparent;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 18px 18px 16px; }
.brand img { width: 34px; height: 34px; }
.brand-name { font-size: 15px; font-weight: 600; font-stretch: 112%; letter-spacing: 0.01em; line-height: 1.15; }
.brand-name i { font-family: var(--serif); font-weight: 400; font-size: 16px; letter-spacing: 0; }
.rail nav { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-top: 1px solid var(--ink-line); }
.rail nav a {
  display: flex; align-items: center; gap: 11px; height: 38px; padding: 0 10px;
  border-radius: var(--r); color: var(--bone-2); font-weight: 500;
  transition: background 0.15s, color 0.15s;
}
.rail nav a:hover { color: var(--bone); background: rgba(22, 24, 29, 0.05); }
.rail nav a[aria-current="page"] { color: var(--bone); background: rgba(22, 24, 29, 0.09); }
.rail nav a[aria-current="page"] svg { color: var(--gold); }
.rail nav .nav-gap { height: 1px; margin: 8px 10px; background: var(--ink-line); }
.rail-foot { margin-top: auto; padding: 14px 18px 16px; border-top: 1px solid var(--ink-line); }
.rail-user { font-weight: 600; color: var(--bone); overflow-wrap: anywhere; }
.rail-role { font-size: 12.5px; color: var(--bone-2); }
.rail-foot .rail-actions { display: flex; gap: 14px; margin-top: 10px; }
.rail-foot button { background: none; border: 0; padding: 0; color: var(--bone-2); font-size: 12.5px; text-decoration: underline; text-decoration-color: rgba(22, 24, 29, 0.25); text-underline-offset: 3px; }
.rail-foot button:hover { color: var(--bone); }

.main { min-width: 0; display: flex; flex-direction: column; }
.top {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; gap: 12px;
  min-height: 56px; padding: 8px 28px;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.top h1 { font-size: 19px; font-stretch: 108%; letter-spacing: -0.005em; margin-right: auto; min-width: 0; }
.top h1 .sub { font-weight: 400; font-stretch: 100%; color: var(--text-2); font-size: 14px; margin-left: 10px; letter-spacing: 0; }
#view { padding: 22px 28px 64px; max-width: 1440px; width: 100%; }
#view:focus { outline: none; }

/* ——— Tugmalar ——— */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 36px; padding: 0 13px;
  border: 1px solid var(--line-2); border-radius: var(--r);
  background: var(--surface); color: var(--text);
  font-weight: 500; white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}
.btn:hover { background: var(--wash); border-color: #586172; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: 0.55; cursor: default; transform: none; }
.btn-primary { background: var(--gold); border-color: var(--gold-2); color: var(--ink); font-weight: 600; }
.btn-primary:hover { background: var(--gold-2); border-color: var(--gold-2); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: var(--wash); border-color: transparent; }
.btn-danger { color: var(--bad); }
.btn-danger:hover { background: var(--bad-wash); border-color: #6d302b; }
.btn-sm { min-height: 30px; padding: 0 10px; font-size: 13px; }
.icon-btn {
  display: inline-grid; place-items: center; width: 34px; height: 34px;
  border: 1px solid transparent; border-radius: var(--r); background: none; color: var(--text-2);
}
.icon-btn:hover { background: var(--wash); color: var(--text); }
.icon-btn[disabled] { opacity: 0.4; cursor: default; background: none; }
.menu-btn { display: none; }

/* ——— Asboblar qatori, segmentlar, yorliqlar ——— */
.bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 16px; }
.bar .grow { flex: 1 1 auto; }
.bar .count { color: var(--text-2); }
.bar input:not([type="checkbox"]), .bar select, .att-bar input { width: auto; }
.bar label { display: inline-flex; align-items: center; gap: 7px; }
.bar .search { display: block; }
.bar .search input { width: 100%; }
input[type="checkbox"] { width: 16px; height: 16px; margin: 0; accent-color: var(--gold); }
.search { position: relative; flex: 0 1 300px; }
.search svg { position: absolute; left: 10px; top: 50%; translate: 0 -50%; color: var(--text-3); pointer-events: none; }
.search input[type="search"] { padding-left: 34px; }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--surface); overflow: hidden; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; }
.seg span { display: block; padding: 0 12px; line-height: 34px; color: var(--text-2); font-weight: 500; cursor: pointer; border-right: 1px solid var(--line); }
.seg label:last-child span { border-right: 0; }
.seg span:hover { background: var(--wash); }
.seg input:checked + span { background: var(--ink); color: var(--bone); }
.seg input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: -4px; }
.tabs { display: flex; gap: 22px; box-shadow: inset 0 -1px 0 var(--line); margin-bottom: 18px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.tabs a { padding: 9px 0 10px; color: var(--text-2); font-weight: 500; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a:hover { color: var(--text); }
.tabs a[aria-current="true"] { color: var(--text); border-bottom-color: var(--gold); }

/* ——— Formalar ——— */
input[type="text"], input[type="tel"], input[type="search"], input[type="password"], input[type="date"],
input[type="month"], input[type="time"], input[type="number"], select, textarea {
  width: 100%; min-height: 36px; padding: 6px 10px;
  border: 1px solid var(--line-2); border-radius: var(--r);
  background: var(--surface); color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s;
}
textarea { min-height: 76px; resize: vertical; line-height: 1.45; }
select { appearance: none; padding-right: 30px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none' stroke='%23a5abb8' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
input:hover, select:hover, textarea:hover { border-color: #586172; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); border-radius: var(--r); }
input::placeholder, textarea::placeholder { color: var(--text-3); }
input[disabled], select[disabled] { background: var(--wash); color: var(--text-2); }
.field { display: grid; gap: 5px; margin-bottom: 14px; align-content: start; }
.field > span, .field > legend { font-size: 13px; font-weight: 500; color: var(--text); padding: 0; }
.field > span em { font-style: normal; color: var(--bad); }
.field small { color: var(--text-2); font-size: 12.5px; }
fieldset.field { border: 0; padding: 0; margin-inline: 0; min-width: 0; }
.row2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; align-items: start; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips label { position: relative; }
.chips input { position: absolute; opacity: 0; inset: 0; }
.chips span { display: block; min-width: 42px; padding: 0 10px; line-height: 32px; text-align: center; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--surface); color: var(--text-2); font-weight: 500; cursor: pointer; }
.chips span:hover { background: var(--wash); }
.chips input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--bone); }
.chips input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }
.form-error { margin-bottom: 14px; padding: 9px 12px; border: 1px solid #6d302b; border-radius: var(--r); background: var(--bad-wash); color: var(--bad); font-weight: 500; }
.picked { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--wash); }
.picked b { font-weight: 600; }
.results { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); max-height: 232px; overflow-y: auto; }
.results button { display: flex; justify-content: space-between; gap: 10px; width: 100%; padding: 8px 12px; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; }
.results button:last-child { border-bottom: 0; }
.results button:hover, .results button:focus-visible { background: var(--gold-wash); outline: none; }
.results .empty { padding: 10px 12px; color: var(--text-2); }

/* ——— Jadvallar ——— */
.tbl-wrap { position: relative; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
table.tbl { width: 100%; border-collapse: collapse; }
.tbl th, .tbl td { padding: 10px 14px; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--line); }
.tbl th { font-size: 12.5px; font-weight: 500; color: var(--text-2); background: var(--wash); white-space: nowrap; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl th.num, .tbl td.num { text-align: right; }
.tbl tbody tr.click { cursor: pointer; }
.tbl tbody tr.click:hover { background: var(--hover); }
.tbl td.strong, .tbl td .strong { font-weight: 600; }
.tbl td.actions { text-align: right; white-space: nowrap; width: 1%; }
.tbl tfoot td { background: var(--wash); font-weight: 600; border-top: 1px solid var(--line); border-bottom: 0; }
.tbl .sub { display: block; font-size: 12.5px; color: var(--text-2); font-weight: 400; }
.tbl .sub.neg { color: var(--bad); }
.tbl tr.gone td { color: var(--text-3); }

/* Holat belgisi: nuqta + matn */
.st { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font-weight: 500; }
.st::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.st-ok { color: var(--ok); }
.st-bad { color: var(--bad); }
.st-warn { color: var(--warn); }
.st-info { color: var(--info); }
.st-mute { color: var(--text-3); }

/* ——— Bo'limlar ——— */
.section { margin-bottom: 30px; }
.section > p.muted, #pane > p.muted { margin-top: 10px; max-width: 80ch; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 12px; margin-bottom: 10px; }
.section-head h2 { font-size: 16px; }
.section-head .grow { flex: 1; }
.section-head input, .section-head select { width: auto; max-width: 100%; }
.cols2 { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.cols2.even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.empty {
  padding: 26px 20px; border: 1px dashed var(--line-2); border-radius: var(--r);
  color: var(--text-2); background: var(--surface);
}
.empty b { display: block; color: var(--text); font-weight: 600; margin-bottom: 3px; }
.empty .btn { margin-top: 12px; }
.notice { padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--gold-wash); margin-bottom: 16px; }

/* Raqamlar qatori (bosh sahifa): bitta chiziqli qator */
.figures { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); margin-bottom: 26px; overflow: hidden; }
.figures > a, .figures > div { padding: 13px 16px 12px; box-shadow: -1px 0 0 var(--line), 0 -1px 0 var(--line); min-width: 0; }
.figures > a:hover { background: var(--hover); }
.figures dt { font-size: 12.5px; color: var(--text-2); }
.figures dd { margin: 2px 0 0; font-size: 19px; font-weight: 600; font-stretch: 104%; white-space: nowrap; }
.figures dd small { display: block; font-size: 12.5px; font-weight: 400; font-stretch: 100%; color: var(--text-2); white-space: normal; }
.figures dl { margin: 0; }

/* Ro'yxatlar (bugungi darslar, bog'lanish kerak) */
.list { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.list > * { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 4px 14px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.list > *:last-child { border-bottom: 0; }
.list > a:hover { background: var(--hover); }
.list .when { font-weight: 600; white-space: nowrap; min-width: 46px; }
.list .what b { font-weight: 600; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list .what span { color: var(--text-2); font-size: 12.5px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Sarlavha bloki (o'quvchi, guruh sahifasi) */
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--text-2); font-size: 13px; margin-bottom: 10px; }
.back:hover { color: var(--text); }
.head { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 12px 20px; margin-bottom: 20px; }
.head .who { flex: 1 1 320px; min-width: 0; }
.head h2 { font-size: 24px; font-stretch: 108%; letter-spacing: -0.01em; line-height: 1.2; overflow-wrap: anywhere; }
.head .meta { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 6px; color: var(--text-2); }
.head .meta a:hover { color: var(--text); }
.head .note-line { margin-top: 8px; max-width: 70ch; white-space: pre-line; }
.head .acts { display: flex; flex-wrap: wrap; gap: 8px; }
.balance { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); margin-bottom: 22px; }
.balance b { font-size: 16px; font-weight: 600; }
.balance.debt { border-color: #6d302b; background: var(--bad-wash); color: var(--bad); }

/* ——— Lidlar doskasi ——— */
.board { display: grid; grid-template-columns: repeat(5, minmax(210px, 1fr)); gap: 12px; align-items: start; overflow-x: auto; padding-bottom: 8px; }
.col { background: var(--wash); border: 1px solid var(--line); border-radius: var(--r); min-height: 180px; transition: background 0.15s, border-color 0.15s; }
.col.over { background: var(--gold-wash); border-color: var(--gold-2); }
.col-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 10px 12px 8px; font-weight: 600; }
.col-head span { color: var(--text-2); font-weight: 400; }
.col-body { display: grid; gap: 8px; padding: 0 8px 10px; }
.col-note { padding: 2px 6px 6px; font-size: 12.5px; color: var(--text-2); }
.card { display: block; width: 100%; text-align: left; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); cursor: grab; transition: border-color 0.15s, box-shadow 0.15s; }
.card:hover { border-color: var(--line-2); box-shadow: 0 2px 6px -2px rgba(0, 0, 0, 0.5); }
.card.dragging { opacity: 0.45; }
.card b { display: block; font-weight: 600; overflow-wrap: anywhere; }
.card .c-phone { display: block; color: var(--text-2); }
.card .c-tags { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 7px; font-size: 12.5px; color: var(--text-2); }
.card .due { color: var(--text-2); display: inline-flex; align-items: center; gap: 4px; }
.card .due svg { width: 13px; height: 13px; }
.card .due.late { color: var(--bad); font-weight: 600; }
.card .due.today { color: var(--gold-deep); font-weight: 600; }
.notes { display: grid; gap: 10px; margin: 6px 0 0; padding: 0; list-style: none; }
.notes li { padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.notes li:last-child { border-bottom: 0; }
.notes time { display: block; font-size: 12.5px; color: var(--text-2); }
.note-add { display: flex; gap: 8px; margin-bottom: 14px; }

/* ——— Davomat jurnali ——— */
.att-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-bottom: 12px; }
.month-nav { display: inline-flex; align-items: center; gap: 2px; }
.month-nav b { min-width: 124px; text-align: center; font-weight: 600; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--text-2); font-size: 12.5px; }
.legend i { display: inline-grid; place-items: center; width: 20px; height: 20px; margin-right: 5px; border-radius: 3px; font-style: normal; font-weight: 600; font-size: 12px; }
.att-wrap { width: fit-content; max-width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
#att-hint { margin-top: 12px; max-width: 80ch; }
.att-bar label { display: inline-flex; align-items: center; gap: 7px; }
table.att { border-collapse: separate; border-spacing: 0; }
.att th, .att td { border-bottom: 1px solid var(--line); padding: 0; }
.att tbody tr:last-child td, .att tbody tr:last-child th { border-bottom: 0; }
.att thead th { background: var(--wash); font-weight: 500; color: var(--text-2); font-size: 12.5px; }
.att .name { position: sticky; left: 0; z-index: 1; min-width: 190px; max-width: 240px; padding: 0 14px; text-align: left; background: var(--surface); border-right: 1px solid var(--line); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.att thead .name { background: var(--wash); z-index: 2; }
.att .day { width: 40px; min-width: 40px; text-align: center; }
.att thead .day button { width: 100%; padding: 5px 0 4px; border: 0; background: none; line-height: 1.2; color: inherit; }
.att thead .day button:hover:not([disabled]) { background: var(--gold-wash); color: var(--text); }
.att thead .day button[disabled] { cursor: default; opacity: 0.55; }
.att thead .day b { display: block; font-size: 14px; font-weight: 600; color: var(--text); }
.att .is-today { background: var(--gold-wash); }
.att thead .is-today { background: #4b3a1b; }
.att .cell { display: grid; place-items: center; width: 40px; height: 38px; border: 0; background: none; font-weight: 600; font-size: 13px; color: var(--line-2); }
.att .cell:hover:not([disabled]) { background: var(--wash); }
.att .cell:focus-visible { outline-offset: -3px; }
.att .cell[disabled] { cursor: default; color: transparent; }
.att .cell[data-s] span { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 3px; }
.att .cell[data-s="present"] span, .legend .k { background: var(--ok-wash); color: var(--ok); }
.att .cell[data-s="absent"] span, .legend .y { background: var(--bad-wash); color: var(--bad); }
.att .cell[data-s="late"] span, .legend .c { background: var(--warn-wash); color: var(--warn); }
.att .cell[data-s="excused"] span, .legend .s { background: var(--info-wash); color: var(--info); }
.att .pct { padding: 0 14px; text-align: right; white-space: nowrap; color: var(--text-2); border-left: 1px solid var(--line); }
.att .out { color: var(--text-3); }
.kbd { display: inline-block; min-width: 18px; padding: 0 4px; border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 3px; background: var(--surface); font-size: 12px; font-weight: 600; text-align: center; color: var(--text); }

/* ——— Haftalik jadval ——— */
.week { display: grid; grid-template-columns: repeat(var(--days, 6), minmax(150px, 1fr)); gap: 10px; overflow-x: auto; padding-bottom: 8px; align-items: start; }
.wday { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); min-height: 120px; }
.wday h3 { padding: 9px 12px; font-size: 14px; border-bottom: 1px solid var(--line); background: var(--wash); }
.wday.is-today h3 { background: var(--ink); color: var(--bone); }
.wday .slot { display: block; padding: 9px 12px; border-bottom: 1px solid var(--line); }
.wday .slot:last-child { border-bottom: 0; }
.wday .slot:hover { background: var(--hover); }
.wday .slot time { font-weight: 600; }
.wday .slot b { display: block; font-weight: 600; overflow-wrap: anywhere; }
.wday .slot span { display: block; color: var(--text-2); font-size: 12.5px; }
.wday .slot .clash { color: var(--bad); font-weight: 600; }
.wday .none { padding: 12px; color: var(--text-3); font-size: 12.5px; }

/* ——— Konsalting ——— */
.figures.f4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.figures.f2 { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 12px; }
.btn-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.stages { display: flex; gap: 6px; margin-bottom: 14px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.stages a { display: inline-flex; align-items: baseline; gap: 6px; padding: 0 10px; line-height: 30px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--surface); color: var(--text-2); font-weight: 500; white-space: nowrap; }
.stages a span { color: var(--text-3); font-weight: 400; }
.stages a:hover { background: var(--wash); color: var(--text); }
.stages a[aria-current="true"] { background: var(--ink); border-color: var(--ink); color: var(--bone); }
.stages a[aria-current="true"] span { color: var(--bone-2); }
/* Bosqichlar zanjiri: o'tilganlari belgilangan, joriysi qora */
.stepper { display: flex; margin: 0 0 12px; padding: 0; list-style: none; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.stepper li { flex: 1 0 auto; min-width: 0; box-shadow: -1px 0 0 var(--line); }
.stepper button { display: flex; align-items: center; gap: 8px; width: 100%; padding: 10px 14px; border: 0; background: none; color: var(--text-2); font-weight: 500; white-space: nowrap; text-align: left; }
.stepper button:hover { background: var(--wash); color: var(--text); }
.stepper button:focus-visible { outline-offset: -3px; }
.stepper i { display: grid; place-items: center; width: 22px; height: 22px; flex: none; border: 1px solid var(--line-2); border-radius: 50%; font-style: normal; font-size: 12px; font-weight: 600; }
.stepper i svg { width: 13px; height: 13px; stroke-width: 2.2; }
.stepper .is-done button { color: var(--text); }
.stepper .is-done i { background: var(--ok-wash); border-color: transparent; color: var(--ok); }
.stepper .is-now button { background: var(--ink); color: var(--bone); }
.stepper .is-now i { background: var(--gold); border-color: var(--gold); color: var(--ink); }
/* Jarayon qadamlari */
.step-add { margin-bottom: 14px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.step-add textarea { min-height: 56px; }
.step-add-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 10px; }
.step-add-row label { display: inline-flex; align-items: center; gap: 7px; }
.step-add-row input[type="date"] { width: auto; }
.step-add-row .grow { flex: 1; }
.timeline { margin: 0; padding: 0; list-style: none; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.timeline li { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 6px 16px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.timeline li:last-child { border-bottom: 0; }
.timeline li > div { flex: 1 1 240px; min-width: 0; }
.timeline p { overflow-wrap: anywhere; white-space: pre-line; }
.timeline time { display: block; margin-top: 2px; font-size: 12.5px; color: var(--text-2); }
.timeline label { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 500; white-space: nowrap; cursor: pointer; }
.timeline .told { color: var(--ok); }
.timeline .untold { color: var(--warn); }

/* Amaliyot darslari jadvali: ustun sarlavhasida sana va joy nomi */
.att.wide .day { width: 112px; min-width: 112px; }
.att.wide thead .day button { padding: 6px 8px 5px; white-space: normal; overflow-wrap: anywhere; line-height: 1.25; }
.att.wide thead .day b { font-size: 13px; }
.att.wide .cell { width: 112px; }

/* Hisobot ustunlari */
.meter { display: block; height: 8px; min-width: 120px; border-radius: 2px; background: var(--wash); overflow: hidden; }
.meter i { display: block; height: 100%; width: var(--w, 0%); background: var(--gold); border-radius: 2px; }

/* ——— Yon varaq (forma) va tasdiqlash oynasi ——— */
dialog { padding: 0; border: 0; color: var(--text); background: var(--surface); }
dialog::backdrop { background: rgba(5, 6, 8, 0.62); }
dialog.sheet { margin: 0 0 0 auto; width: min(460px, 100vw); max-width: none; height: 100dvh; max-height: none; box-shadow: -12px 0 32px -12px rgba(10, 10, 10, 0.28); }
dialog.sheet[open] { animation: sheet-in 0.22s var(--ease); }
@keyframes sheet-in { from { transform: translateX(28px); opacity: 0; } }
.sheet form { display: flex; flex-direction: column; height: 100%; }
.sheet header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 14px 14px 22px; border-bottom: 1px solid var(--line); }
.sheet header h2 { font-size: 16px; }
.sheet-body { flex: 1; overflow-y: auto; padding: 18px 22px; }
.sheet footer { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 22px; border-top: 1px solid var(--line); background: var(--paper); }
.sheet footer .left { margin-right: auto; }
.sheet h3 { font-size: 14px; margin: 20px 0 10px; padding-top: 16px; border-top: 1px solid var(--line); }
dialog.confirm { width: min(400px, calc(100vw - 32px)); border-radius: 6px; box-shadow: 0 16px 40px -12px rgba(10, 10, 10, 0.35); }
dialog.confirm[open] { animation: pop-in 0.18s var(--ease); }
@keyframes pop-in { from { transform: translateY(8px); opacity: 0; } }
.confirm form { padding: 20px 22px 16px; }
.confirm p { margin-bottom: 18px; }
.confirm .acts { display: flex; justify-content: flex-end; gap: 8px; }

.toasts { position: fixed; z-index: 50; right: 20px; bottom: 20px; display: grid; gap: 8px; }
.toast { padding: 10px 14px; border-radius: var(--r); background: var(--ink); color: var(--bone); font-weight: 500; box-shadow: 0 8px 22px -8px rgba(10, 10, 10, 0.4); animation: pop-in 0.2s var(--ease); max-width: min(360px, calc(100vw - 40px)); }
.toast.err { background: var(--bad); color: #16181d; }

/* Yuklanish skeleti */
.skel { display: grid; gap: 10px; }
.skel i { display: block; height: 40px; border-radius: var(--r); background: linear-gradient(90deg, var(--wash) 0%, #2b303a 50%, var(--wash) 100%); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; }
.skel i:first-child { width: 38%; height: 30px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ——— Kirish sahifasi ——— */
.auth { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 100dvh; }
.auth-side { display: flex; flex-direction: column; justify-content: space-between; padding: 40px 44px; background: var(--ink); color: var(--bone); }
.auth-side .brand { padding: 0; }
.auth-side .brand img { width: 44px; height: 44px; }
.auth-side .brand-name { font-size: 18px; }
.auth-side .brand-name i { font-size: 20px; }
.auth-side blockquote { margin: 0; font-family: var(--serif); font-style: italic; font-size: clamp(34px, 4.4vw, 60px); line-height: 1.05; letter-spacing: -0.01em; }
.auth-side p { color: var(--bone-2); max-width: 36ch; }
.auth-form { display: grid; place-items: center; padding: 40px 24px; }
.auth-form form { width: min(360px, 100%); }
.auth-form h1 { font-size: 24px; font-stretch: 108%; margin-bottom: 6px; }
.auth-form .lead { color: var(--text-2); margin-bottom: 22px; }
.auth-form .btn { width: 100%; min-height: 40px; margin-top: 6px; }

/* ——— Moslashuv ——— */
@media (min-width: 1500px) { .figures { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
@media (max-width: 560px) { .figures, .figures.f4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 561px) and (max-width: 1000px) { .figures.f4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 1100px) {
  .cols2, .cols2.even { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .rail { position: fixed; z-index: 20; inset: 0 auto 0 0; width: min(280px, 86vw); transform: translateX(-102%); transition: transform 0.22s var(--ease); visibility: hidden; }
  .rail.open { transform: none; visibility: visible; box-shadow: 16px 0 40px -12px rgba(10, 10, 10, 0.5); }
  .scrim { position: fixed; z-index: 19; inset: 0; background: rgba(5, 6, 8, 0.62); border: 0; }
  .menu-btn { display: inline-grid; margin-left: -8px; }
  .top { padding: 8px 16px; }
  .top h1 .sub { display: none; }
  #view { padding: 16px 16px 56px; }
  input, select, textarea { font-size: 16px; }
  .hide-sm { display: none !important; }
  .att .name { min-width: 132px; max-width: 132px; padding: 0 10px; }
  .tbl th, .tbl td { padding: 10px 12px; }
  .board { grid-template-columns: repeat(5, 82vw); scroll-snap-type: x mandatory; }
  .col { scroll-snap-align: start; }
  .week { grid-template-columns: minmax(0, 1fr); }
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth-side { padding: 24px; gap: 28px; }
  .auth-side p { display: none; }
  .bar .search { flex: 1 1 100%; }
  .row2 { grid-template-columns: 1fr; gap: 0; }
  .head h2 { font-size: 21px; }
}
@media (min-width: 861px) { .scrim { display: none; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
@media print {
  .rail, .top, .bar, .acts, .tabs, .back { display: none !important; }
  .shell { display: block; }
  #view { padding: 0; }
}

/* ——— Ko'rinish: suzuvchi yorug' menyu, yumaloq panellar, tabletka tugmalar ——— */
.shell { gap: 0; padding: 12px 0 12px 12px; }
.rail { top: 12px; height: calc(100dvh - 24px); border-radius: var(--r-lg); box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.7); }
.rail nav a { border-radius: 10px; }
.rail nav a[aria-current="page"] { background: var(--bone); color: var(--ink); }
.rail nav a[aria-current="page"] svg { color: var(--gold); }
.brand-name { color: var(--bone); }
.top { background: color-mix(in srgb, var(--paper) 88%, transparent); border-bottom-color: transparent; }
.btn { border-radius: 999px; padding: 0 16px; }
.btn-sm { padding: 0 12px; }
.btn-primary, .btn-primary:hover { color: #16181d; border-color: transparent; }
.btn-primary { background: linear-gradient(180deg, #f9b65c, var(--gold)); }
.btn-primary:hover { background: var(--gold-2); }
.btn-teal { background: var(--teal); border-color: transparent; color: #10231f; font-weight: 600; }
.btn-teal:hover { background: #2bbfa3; border-color: transparent; }
.tbl-wrap, .list, .figures, .timeline, .step-add, .att-wrap, .wday, .col, .stepper, .empty, .panel { border-radius: var(--r-lg); }
.figures, .tbl-wrap, .list, .att-wrap, .wday, .panel { box-shadow: 0 14px 30px -22px rgba(0, 0, 0, 0.9); }
.tbl th { background: #1f232b; }
.tbl tfoot td { background: #1f232b; }
.stepper .is-now i { color: #16181d; }
.card { border-radius: 12px; }
.seg, .chips span, .stages a { border-radius: 999px; }
.seg span { padding: 0 14px; }
.tabs a[aria-current="true"] { border-bottom-color: var(--gold); }
dialog.sheet { box-shadow: -24px 0 60px -20px rgba(0, 0, 0, 0.8); }
dialog.confirm { border-radius: var(--r-lg); border: 1px solid var(--line); }
.notice { border-color: #4b3a1b; }
.att .name { background: var(--surface); }
.att thead .name { background: var(--wash); }
.auth-side { border-radius: var(--r-lg); margin: 12px; }
.auth-side blockquote { color: var(--bone); }
img.logo-dark { filter: none; }

/* ——— Bosh sahifa panellari va grafiklar ——— */
.dash { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px; margin-bottom: 26px; }
.panel { grid-column: span 4; min-width: 0; padding: 16px 18px; border: 1px solid var(--line); background: var(--surface); }
.panel.w8 { grid-column: span 8; }
.panel.w6 { grid-column: span 6; }
.panel.w12 { grid-column: span 12; }
.panel.w3 { grid-column: span 3; }
.panel-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.panel-head h2 { font-size: 13px; font-weight: 500; color: var(--text-2); }
.panel-head .grow { flex: 1; }
.panel-head a { font-size: 12.5px; color: var(--text-2); }
.panel-head a:hover { color: var(--text); }
.big { font-size: 26px; font-weight: 600; font-stretch: 106%; line-height: 1.15; white-space: nowrap; }
.big small { font-size: 12.5px; font-weight: 400; font-stretch: 100%; color: var(--text-2); margin-left: 8px; }
.big.neg { color: var(--bad); }
.delta { font-size: 12.5px; font-weight: 600; }
.delta.up { color: var(--ok); }
.delta.down { color: var(--bad); }
.tiles { grid-column: span 4; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.tiles .panel { grid-column: auto; padding: 14px 16px; }
.tiles .big { font-size: 22px; }
svg.chart { display: block; width: 100%; height: auto; overflow: visible; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .axis { fill: var(--text-3); font-size: 11px; }
.chart .line { fill: none; stroke: var(--gold); stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.chart .line.b { stroke: var(--teal); stroke-width: 1.8; }
.chart .dot { fill: var(--gold); stroke: var(--surface); stroke-width: 2; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 8px; font-size: 12.5px; color: var(--text-2); }
.chart-legend i { display: inline-block; width: 10px; height: 3px; margin-right: 6px; border-radius: 2px; vertical-align: middle; background: var(--gold); }
.chart-legend i.b { background: var(--teal); }
.ring { display: flex; align-items: center; gap: 18px; }
.ring svg { width: 132px; height: 132px; flex: none; }
.ring .track { fill: none; stroke: var(--wash); }
.ring .arc { fill: none; stroke: var(--gold); stroke-linecap: round; }
.ring .arc.b { stroke: var(--teal); }
.ring text { fill: var(--text); font-size: 26px; font-weight: 600; text-anchor: middle; dominant-baseline: central; }
.ring dl { margin: 0; display: grid; gap: 8px; min-width: 0; }
.ring dt { font-size: 12.5px; color: var(--text-2); }
.ring dd { margin: 0; font-weight: 600; white-space: nowrap; }
.bars { display: grid; gap: 11px; margin: 4px 0 0; padding: 0; list-style: none; }
.bars li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: baseline; }
.bars span { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bars b { font-weight: 600; white-space: nowrap; }
.bars i { grid-column: 1 / -1; display: block; height: 6px; border-radius: 3px; background: var(--wash); overflow: hidden; }
.bars i::after { content: ""; display: block; height: 100%; width: var(--w, 0%); border-radius: 3px; background: var(--gold); }
.bars li.b i::after { background: var(--teal); }
.panel .list { border: 0; box-shadow: none; border-radius: 0; background: none; }
.panel .list > * { padding: 9px 0; }
.panel .list > a:hover { background: none; }
.panel .list > a:hover b { color: var(--gold-deep); }
.panel .empty { border: 0; padding: 12px 0; background: none; }
@media (max-width: 1250px) {
  .panel, .panel.w3 { grid-column: span 6; }
  .panel.w8, .tiles { grid-column: span 12; }
}
@media (max-width: 860px) {
  .shell { padding: 0; }
  .rail { top: 0; height: 100dvh; border-radius: 0; }
  .dash { gap: 10px; }
  .panel, .panel.w3, .panel.w6, .panel.w8, .tiles { grid-column: span 12; }
  .ring svg { width: 108px; height: 108px; }
  .auth-side { margin: 0; border-radius: 0; }
}
a.panel { display: block; transition: border-color 0.15s, transform 0.15s; }
a.panel:hover { border-color: var(--line-2); transform: translateY(-1px); }
.lead-bar .btn:first-of-type { margin-left: auto; }
.panel > .big { white-space: normal; }
.panel > .big .delta { display: inline-block; white-space: nowrap; }
@media (max-width: 860px) { .panel > .big .delta { display: block; margin: 2px 0 0; } }
.check { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.leaves-head { margin-top: 22px; }
.rooms-grid { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(180px, 1fr); gap: 10px; overflow-x: auto; padding-bottom: 8px; align-items: start; }
@media (min-width: 1101px) { .cols2.wide-first { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); } }
.list-note { margin-top: 10px; }
label.btn { cursor: pointer; }
label.btn.busy { opacity: 0.5; pointer-events: none; }
label.btn:focus-within { outline: 2px solid var(--ink); outline-offset: 2px; }
.shift-bar { display: flex; align-items: center; gap: 10px; padding: 8px 28px; border-bottom: 1px solid var(--line); }
.shift-bar:empty { display: none; }
.shift-bar .grow { flex: 1; }
.tbl tbody tr.is-picked { background: var(--wash); }
@media (max-width: 860px) { .shift-bar { padding: 8px 16px; } }
.ai-text { white-space: pre-wrap; line-height: 1.6; max-width: 90ch; }

/* ——— E'tibor ro'yxati, reja chizig'i, hisobot matni, imtihon jadvali ——— */
.att-list { margin-top: 10px; }
.att-list .when { color: var(--text-2); font-weight: 500; min-width: 56px; }
.tbl .meter { margin: 6px 0 2px; max-width: 220px; }
.meter.done i { background: var(--teal); }
.tbl .sub.pos { color: var(--ok); }
pre.report { margin: 0 0 10px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); font: inherit; font-size: 13.5px; line-height: 1.55; white-space: pre-wrap; }
.steps { margin: 0 0 10px; padding-left: 20px; display: grid; gap: 9px; max-width: 62ch; }
.steps code, .notice code { font-size: 12.5px; padding: 1px 5px; border-radius: 4px; background: var(--wash); }
.scores { display: grid; gap: 8px; margin-top: 6px; }
.scores label { display: grid; grid-template-columns: minmax(0, 1fr) 92px; align-items: center; gap: 12px; }
.scores label span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tbl td.score { text-align: center; }
.tbl th.exam { text-align: center; white-space: normal; min-width: 84px; font-weight: 500; }
.tbl th.exam small { display: block; color: var(--text-3); font-weight: 400; }
button.link { padding: 0; border: 0; background: none; font: inherit; font-weight: 600; color: var(--text); cursor: pointer; text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
button.link:hover { text-decoration-color: var(--gold-deep); }

/* ——— O'qituvchilar grafigi va bo'sh vaqt ——— */
.finder { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 12px 16px; margin-bottom: 18px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.finder input[type="time"] { width: auto; }
.finder label { display: inline-flex; align-items: center; gap: 7px; color: var(--text-2); }
.tbl.tt td { vertical-align: top; min-width: 128px; }
.tbl.tt td:first-child { min-width: 180px; }
.tt-slot { display: block; padding: 2px 0; font-size: 13px; line-height: 1.4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 170px; }
.tt-slot time { display: inline-block; min-width: 40px; font-weight: 600; font-variant-numeric: tabular-nums; }
.tt-slot.free { color: var(--teal); font-weight: 500; }
.tt-slot.off { color: var(--text-3); }
a.tt-slot.busy:hover { color: var(--gold-deep); }
.tt-edit { margin-top: 8px; }
.tt-legend { margin: 0 0 10px; }
.tt-legend i.tt-dot { width: 9px; height: 9px; border-radius: 50%; }
.tt-dot.free { background: var(--teal); }
.tt-dot.busy { background: var(--text); }
.tt-dot.off { background: var(--text-3); }
.tbl.tt tr.dim td { opacity: 0.65; }
.tbl.tt tr.fits td { background: color-mix(in srgb, var(--teal) 7%, transparent); }
.slot-grid { width: 100%; border-collapse: separate; border-spacing: 6px; margin: 4px 0 8px; }
.slot-grid th { font-weight: 500; font-size: 12.5px; color: var(--text-2); text-align: left; white-space: nowrap; }
.slot-grid thead th { text-align: center; color: var(--text); font-weight: 600; }
.slot-grid thead small { display: block; font-weight: 400; color: var(--text-3); }
.slot-grid label { position: relative; display: block; }
.slot-grid input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.slot-grid span { display: block; height: 34px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--surface); }
.slot-grid input:checked + span { background: var(--teal); border-color: var(--teal); }
.slot-grid input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }
.slot-grid .has-lesson span::after { content: ""; position: absolute; left: 50%; top: 50%; width: 7px; height: 7px; margin: -3.5px; border-radius: 50%; background: var(--ink); }

/* ——— Filial holati: chiroqlar ——— */
.lamp { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; white-space: nowrap; }
.lamp::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--text-3); flex: none; }
.lamp-green { color: var(--ok); } .lamp-green::before { background: var(--ok); }
.lamp-yellow { color: var(--warn); } .lamp-yellow::before { background: var(--warn); }
.lamp-red { color: var(--bad); } .lamp-red::before { background: var(--bad); }
.lamp-none { color: var(--text-2); }
.big .lamp { font-size: 22px; } .big .lamp::before { width: 16px; height: 16px; }
.health-list { margin-top: 10px; }
.health-list .is-mine b { color: var(--gold-deep); }

.brand .brand { padding: 0; }
div.brand { display: flex; align-items: center; gap: 8px; }

/* ——— Til tanlagich ——— */
.lang { display: inline-flex; gap: 4px; margin-top: 12px; }
.lang button { min-width: 34px; height: 26px; padding: 0 8px; border: 1px solid var(--line-2); border-radius: 8px; background: none; color: var(--text-2); font-size: 11.5px; font-weight: 600; letter-spacing: 0.04em; text-decoration: none; }
.lang button:hover { color: var(--text); border-color: var(--text-3); }
.lang button[aria-pressed="true"] { background: var(--text); border-color: var(--text); color: var(--paper); }
.rail-foot .lang button { text-decoration: none; }

/* Menyudagi sanoq (masalan, adminning bajarilmagan vazifalari) */
.rail nav a { position: relative; }
.nav-badge { margin-left: auto; min-width: 20px; padding: 1px 6px; border-radius: 999px; background: #f5a742; color: #16181d; font-size: 11.5px; font-weight: 700; line-height: 18px; text-align: center; }
@media (min-width: 900px) { .shell.mini .rail:not(:hover):not(:focus-within) .nav-badge { position: absolute; top: 2px; left: 30px; min-width: 16px; padding: 0 4px; font-size: 10px; line-height: 16px; } }
.tbl .sub.wrap { white-space: normal; max-width: 46ch; }

/* Faqat ko'rish rejimi (Filial team leader): ma'lumotni o'zgartiradigan tugmalar yashiriladi. Vazifalar sahifasi va oynalari (.rw) bundan mustasno. */
body.ro #view:not(.rw) .btn, body.ro #view:not(.rw) .icon-btn:not([data-month]):not([data-date]) { display: none !important; }
body.ro #view:not(.rw) :is(.cell, [data-all]) { pointer-events: none; }
body.ro dialog.sheet:not(.rw) :is(button[type="submit"], .btn:not([data-close])) { display: none !important; }

/* O'qituvchi formasi: takroriy yozuvni birlashtirish */
details.merge { margin-top: 6px; padding: 10px 12px; border: 1px dashed var(--line-2); border-radius: var(--r); }
details.merge summary { cursor: pointer; color: var(--text-2); }
details.merge[open] summary { margin-bottom: 8px; }

/* ——— Konsalting: Kanban, vazifalar, hujjatlar, to'lov jadvali ——— */
.board.b7 { grid-template-columns: repeat(7, minmax(190px, 1fr)); }
.board.b8 { grid-template-columns: repeat(8, minmax(190px, 1fr)); }
.tab-badge { display: inline-block; min-width: 18px; margin-left: 4px; padding: 0 5px; border-radius: 999px; background: #f5a742; color: #16181d; font-size: 11.5px; font-weight: 700; line-height: 18px; text-align: center; }
.tasks { margin: 0 0 4px; padding: 0; list-style: none; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.tasks li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 4px 12px; padding: 9px 14px; border-bottom: 1px solid var(--line); }
.tasks li:last-child { border-bottom: 0; }
.tasks li .check { margin: 0; }
.tasks li b { display: block; font-weight: 600; overflow-wrap: anywhere; }
.tasks li .sub { display: block; font-size: 12.5px; color: var(--text-2); }
.tasks li .sub.neg { color: var(--bad); }
.tasks li.is-done b { font-weight: 400; color: var(--text-2); text-decoration: line-through; }
.tasks li .acts { display: inline-flex; gap: 2px; }
.section-head h2.neg { color: var(--bad); }
.dup-list { margin: 6px 0 8px; padding-left: 18px; }
.notice .check { margin: 0; }
.sched-row { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.8fr) minmax(0, 1.2fr) auto; gap: 8px; align-items: center; margin-bottom: 8px; }
.st-btn { padding: 2px 0; border: 0; background: none; cursor: pointer; text-decoration: underline dotted; text-underline-offset: 4px; }
.st-btn:hover { text-decoration-style: solid; }
.tbl.docs a.link { display: inline-flex; align-items: center; gap: 5px; }
.tbl.docs a.link svg { width: 15px; height: 15px; }
.tbl td.bar-cell { width: 45%; }
.hbar { display: block; height: 8px; width: var(--w, 0%); min-width: 2px; border-radius: 4px; background: var(--gold); }
@media (max-width: 700px) {
  .board.b7 { grid-template-columns: repeat(7, 82vw); }
  .board.b8 { grid-template-columns: repeat(8, 82vw); }
  .sched-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; }
  .sched-row [name="note"] { grid-column: 1 / -1; grid-row: 2; }
}

/* ——— Tasdiq kutayotgan so'rovlar ——— */
.req-notes { margin-bottom: 16px; }
.req-notes .notice { margin-bottom: 8px; }
.req-notes .notice .sub { display: block; font-size: 12.5px; color: var(--text-2); margin: 2px 0 6px; }
.req-notes .notice.is-bad { background: var(--bad-wash); }
.req-notes .notice.is-ok { background: var(--ok-wash); }

/* ——— Ovozli yordamchi ——— */
.voice-fab { position: fixed; z-index: 40; right: 20px; bottom: 20px; width: 54px; height: 54px; display: grid; place-items: center; border: 1px solid var(--gold-2); border-radius: 50%; background: var(--gold); color: #16181d; cursor: pointer; box-shadow: 0 10px 26px -10px rgba(0, 0, 0, 0.7); }
.voice-fab:hover { background: var(--gold-deep); }
.voice-fab .ic { width: 24px; height: 24px; }
.voice-fab.rec, .voice-mic.rec { background: var(--bad); border-color: var(--bad); color: #16181d; animation: voice-pulse 1.2s ease-in-out infinite; }
@keyframes voice-pulse { 50% { box-shadow: 0 0 0 9px rgba(255, 129, 115, 0.22); } }
body.has-voice .toasts { bottom: 88px; }
.voice-panel { position: fixed; z-index: 41; right: 20px; bottom: 86px; width: min(400px, calc(100vw - 24px)); max-height: min(640px, calc(100dvh - 110px)); display: flex; flex-direction: column; border: 1px solid var(--line-2); border-radius: 16px; background: var(--surface); box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.75); overflow: hidden; }
.voice-panel[hidden] { display: none; }
.voice-panel > header { display: flex; align-items: center; gap: 8px; padding: 10px 10px 10px 16px; border-bottom: 1px solid var(--line); }
.voice-panel > header b { margin-right: auto; }
.voice-link { border: 0; background: none; padding: 4px 6px; color: var(--text-2); font: inherit; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.voice-link:hover { color: var(--text); }
.voice-log { flex: 1; min-height: 160px; overflow-y: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.voice-msg { margin: 0; max-width: 92%; padding: 8px 12px; border-radius: 12px; line-height: 1.45; overflow-wrap: anywhere; white-space: pre-wrap; }
.voice-me { align-self: flex-end; background: var(--gold-wash); }
.voice-bot { align-self: flex-start; background: var(--wash); }
.voice-detail { align-self: stretch; max-width: none; max-height: 260px; overflow: auto; border: 1px solid var(--line); background: none; font: inherit; font-size: 13px; }
.voice-note { align-self: stretch; max-width: none; padding: 0; color: var(--text-2); font-size: 13px; }
.voice-err { align-self: stretch; max-width: none; background: var(--bad-wash); color: var(--bad); }
.voice-confirm { border: 1px solid var(--gold-2); border-radius: 12px; padding: 12px; background: var(--gold-wash); }
.voice-confirm small { color: var(--gold-deep); font-weight: 600; }
.voice-confirm p { margin: 4px 0 10px; font-weight: 500; overflow-wrap: anywhere; }
.voice-confirm div { display: flex; gap: 8px; flex-wrap: wrap; }
.voice-status { padding: 0 16px 8px; color: var(--text-2); font-size: 13px; }
.voice-form { display: flex; align-items: center; gap: 6px; padding: 10px 12px; border-top: 1px solid var(--line); }
.voice-form input { flex: 1; min-width: 0; }
.voice-mic { flex: none; width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid var(--gold-2); border-radius: 50%; background: var(--gold); color: #16181d; cursor: pointer; }
.voice-mic:disabled, .voice-form .icon-btn:disabled { opacity: 0.5; cursor: default; }
.voice-foot { padding: 0 16px 10px; color: var(--text-3); font-size: 12.5px; }
.voice-foot:empty { display: none; }
@media (max-width: 520px) { .voice-panel { right: 12px; bottom: 82px; } .voice-fab { right: 12px; bottom: 14px; } }
@media (prefers-reduced-motion: reduce) { .voice-fab.rec, .voice-mic.rec { animation: none; } }

/* ——— Ovozli agent jurnali ——— */
.vlog .vlog-req { max-width: 380px; overflow-wrap: anywhere; }
.vlog-detail td { background: var(--wash); white-space: normal; }
.vlog-detail h4 { margin: 12px 0 4px; font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.vlog-detail h4:first-child { margin-top: 0; }
.vlog-text { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.vlog-steps { margin: 0; padding-left: 20px; display: grid; gap: 4px; }
.vlog-steps code { display: block; color: var(--text-2); font-size: 12.5px; overflow-wrap: anywhere; white-space: pre-wrap; }
.vlog-pre { margin: 0; padding: 10px 12px; max-height: 280px; overflow: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); font-size: 12.5px; white-space: pre-wrap; overflow-wrap: anywhere; }
.voice-lang { width: auto; height: 30px; padding: 0 26px 0 8px; font-size: 12.5px; }
.voice-lang[hidden] { display: none; }

/* Umumiy qidiruv (sarlavhada) */
.gsearch { position: relative; flex: 0 1 320px; min-width: 0; }
.gsearch .search { display: block; }
.gsearch .search input { width: 100%; }
.gs-results { position: absolute; top: calc(100% + 6px); right: 0; width: max(100%, 440px); max-width: calc(100vw - 32px); max-height: 70vh; overflow-y: auto; z-index: 20; border: 1px solid var(--line); border-radius: var(--r); background: var(--paper); box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.6); }
.gs-results .empty { padding: 10px 12px; color: var(--text-2); }
.gs-row a > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gs-results h3 { padding: 9px 12px 4px; font-size: 12px; font-weight: 500; color: var(--text-2); }
.gs-row { display: flex; align-items: center; gap: 8px; padding-right: 8px; border-bottom: 1px solid var(--line); }
.gs-row:last-child { border-bottom: 0; }
.gs-row a { flex: 1; min-width: 0; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 12px; color: inherit; text-decoration: none; }
.gs-row a:hover, .gs-row a:focus-visible { background: var(--gold-wash); outline: none; }
.gs-row a b { font-weight: 600; }
.att-up { margin-left: 8px; }
@media (max-width: 860px) {
  .top { flex-wrap: wrap; }
  .gsearch { order: 5; flex: 1 1 100%; }
  .gs-results { left: 0; right: auto; width: 100%; }
}
.att-list > div > b.neg { margin-right: 10px; }
.link-btn { border: 0; background: none; padding: 2px 0; cursor: pointer; color: inherit; font: inherit; }
.link-btn:hover .muted { color: var(--text); text-decoration: underline; }
.reason-chips { margin-top: -6px; }
.day-chips { margin: -4px 0 14px; }
