/* Dizayn tokenlari — Texnikum ERP admin paneli uslubida */
:root {
  --ink: #0B1A33; --ink2: #3A4660; --mute: #5B6680; --mute2: #94A0B4;
  --line: #E4E8F0; --line2: #EEF1F6; --line3: #DCE2EC;
  --soft: #F8FAFC; --soft2: #F4F6FA; --bg: #EAEBED;
  --blue: #2176E5; --blue-h: #1A64C8; --blue-l: #E8F1FC;
  --green: #16A34A; --green-d: #15803D; --green-l: #E7F6EC;
  --red: #DC2626; --red-d: #B91C1C; --red-l: #FDECEC; --red-b: #F7CFCF;
  --amber: #F59E0B; --amber-d: #B45309; --amber-l: #FEF4E6;
  --side: #20262E; --side2: #262D37;
  --shadow: 0 1px 2px rgba(11, 26, 51, .06);
  --card: #fff;
}
/* Qorong'i mavzu (Kalendar sahifalarida tugma bilan yoqiladi: html[data-theme=dark]) — Google Calendar qorong'i ranglari */
:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #E3E3E3; --ink2: #C4C7C5; --mute: #9AA0A6; --mute2: #7C8187;
  --line: #3C4043; --line2: #2E3134; --line3: #46494C;
  --soft: #282A2C; --soft2: #2F3133; --bg: #131314; --card: #1E1F20;
  --blue: #4C8DF6; --blue-h: #6A9FF8; --blue-l: rgba(76,141,246,.18);
  --green: #34A853; --green-d: #81C995; --green-l: rgba(52,168,83,.18);
  --red: #EA4335; --red-d: #F28B82; --red-l: rgba(234,67,53,.18); --red-b: rgba(234,67,53,.45);
  --amber: #FBBC04; --amber-d: #FDD663; --amber-l: rgba(251,188,4,.16);
  --side: #1B1C1D; --side2: #222324;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; }
body { background: var(--bg); color: var(--ink); font-family: "PT Sans", "Manrope", system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--blue); text-decoration: none; }
input, select, textarea, button { font-family: inherit; }
input::placeholder { color: var(--mute2); }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .6; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.num { font-variant-numeric: tabular-nums; }
.h-row:hover { background: var(--soft) !important; }
.h-soft:hover { background: var(--soft2) !important; }
.h-bd:hover { border-color: var(--blue) !important; }
svg.i { flex: none; }

/* ---------- Karkas ---------- */
.shell { display: flex; min-height: 100vh; }
.side { width: 230px; flex: none; background: var(--side); display: flex; flex-direction: column; padding: 20px 12px; gap: 4px;
        position: sticky; top: 0; height: 100vh; z-index: 30; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 4px 16px; }
.brand .logo { width: 40px; height: 40px; flex: none; border-radius: 12px; background: rgba(255,255,255,.1); display: flex; align-items: center; justify-content: center; }
.brand .t1 { font-size: 15px; font-weight: 700; color: #fff; }
.brand .t2 { font-size: 11.5px; font-weight: 600; color: rgba(255,255,255,.55); }
.nav { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 12px; color: rgba(255,255,255,.7); font-size: 14px; font-weight: 500; }
.nav:hover { background: rgba(255,255,255,.1); color: rgba(255,255,255,.85); }
.nav.on { background: #333D4A; color: #fff; font-weight: 700; }
.badge { margin-left: auto; min-width: 20px; height: 20px; border-radius: 10px; background: var(--red); color: #fff; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; padding: 0 6px; }
.me { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: rgba(255,255,255,.08); margin-top: 4px; }
.me .av { width: 34px; height: 34px; flex: none; border-radius: 50%; background: var(--card); color: var(--blue); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; }
.me .n { font-size: 13px; font-weight: 700; color: #fff; }
.me .r { font-size: 11px; font-weight: 600; color: rgba(255,255,255,.55); }
.sub { width: 224px; flex: none; background: var(--side2); display: flex; flex-direction: column; padding: 20px 12px; gap: 3px; position: sticky; top: 0; height: 100vh; }
.sub .cap { font-size: 11px; font-weight: 700; color: rgba(255,255,255,.45); letter-spacing: .08em; padding: 4px 12px 8px; }
.sub a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; color: rgba(255,255,255,.72); font-size: 13.5px; font-weight: 500; }
.sub a:hover { background: rgba(255,255,255,.08); }
.sub a.on { background: #3A4452; color: #fff; font-weight: 700; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }
.top { display: flex; align-items: center; gap: 16px; padding: 16px 28px; background: var(--card); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.top .title { font-size: 21px; font-weight: 700; color: var(--ink); }
.top .date { font-size: 13px; font-weight: 600; color: var(--mute); }
.top .sp { flex: 1; }
.top .ava { width: 40px; height: 40px; border-radius: 50%; background: var(--blue); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; cursor: pointer; position: relative; }
.burger { display: none; width: 38px; height: 38px; border-radius: 11px; background: var(--soft2); align-items: center; justify-content: center; cursor: pointer; }
.content { padding: 22px 28px; display: flex; flex-direction: column; gap: 18px; flex: 1; }

/* Profil menyusi */
.menu { position: absolute; right: 0; top: 48px; z-index: 45; width: 250px; background: var(--card); border-radius: 14px; box-shadow: 0 20px 50px -15px rgba(11,26,51,.35);
        border: 1px solid var(--line); padding: 8px; display: none; flex-direction: column; cursor: default; }
.menu.open { display: flex; }
.menu .who { padding: 10px 11px; border-bottom: 1px solid var(--line2); margin-bottom: 5px; }
.menu .who b { display: block; font-size: 14.5px; color: var(--ink); }
.menu .who span { font-size: 12.5px; font-weight: 600; color: var(--mute); }
.menu a { display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: 9px; font-size: 13.5px; font-weight: 600; color: var(--ink); }
.menu a:hover { background: var(--soft2); }
.menu a.red { color: var(--red); }
.menu a.red:hover { background: var(--red-l); }

/* ---------- Asboblar qatori ---------- */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; position: sticky; top: 0; z-index: 8; background: var(--bg); margin: -12px -28px; padding: 12px 28px; }
.toolbar .sp { flex: 1; }
.count { font-size: 13px; font-weight: 600; color: var(--mute); }
.search { display: flex; align-items: center; gap: 9px; background: var(--card); border-radius: 12px; padding: 0 13px; height: 40px; border: 1.5px solid var(--line); flex: 1; max-width: 320px; min-width: 180px; }
.search input { flex: 1; border: none; outline: none; font-size: 13.5px; font-weight: 600; color: var(--ink); background: transparent; min-width: 0; }
.select { height: 40px; border-radius: 11px; border: 1.5px solid var(--line); background: var(--card); padding: 0 12px; font-size: 13px; font-weight: 700; color: var(--ink); outline: none; cursor: pointer; }

/* ---------- Tugmalar ---------- */
.btn { height: 40px; padding: 0 15px; border-radius: 11px; font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
       white-space: nowrap; flex: none; background: var(--blue); color: #fff; border: none; }
.btn:hover { background: var(--blue-h); color: #fff; }
.btn.outline { background: var(--card); color: var(--ink); border: 1.5px solid var(--line); }
.btn.outline:hover { border-color: var(--blue); background: var(--card); color: var(--ink); }
.btn.mute { background: var(--card); color: var(--mute); border: 1.5px solid var(--line); }
.btn.lg { height: 46px; border-radius: 13px; font-size: 14px; }
.btn.danger { background: var(--card); color: var(--red); border: 1.5px solid var(--red-b); }
.btn.danger:hover { background: var(--red-l); }
.btn.icon { width: 40px; padding: 0; }

/* ---------- Jadval ---------- */
.card { background: var(--card); border-radius: 12px; box-shadow: var(--shadow); }
.tbl { overflow: visible; }
.tbl-inner { min-width: 900px; }
.thead { display: grid; gap: 10px; padding: 13px 20px; background: var(--soft); border-bottom: 1px solid var(--line); font-size: 12px; font-weight: 700; color: var(--mute);
         letter-spacing: .03em; border-radius: 12px 12px 0 0; position: sticky; top: 64px; z-index: 6; }
.trow { display: grid; gap: 10px; padding: 10px 20px; border-bottom: 1px solid var(--line2); align-items: center; cursor: pointer; }
.trow:hover { background: var(--soft); }
.trow:last-child { border-bottom: 0; }
.trow.static { cursor: default; }
.today { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; }
.today .sb { font-size: 11.5px; font-weight: 600; color: var(--mute); }
.copy { height: 32px; padding: 0 11px; border-radius: 10px; border: 1.5px solid var(--line3); background: var(--card); color: var(--blue);
        font-size: 12.5px; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.copy:hover { border-color: var(--blue); }
.copy.done { background: var(--green-l); border-color: var(--green-l); color: var(--green-d); }
.edit { width: 34px; height: 34px; border-radius: 10px; border: 0; background: var(--soft2); color: var(--ink2); display: flex; align-items: center; justify-content: center; }
.edit:hover { background: var(--blue-l); color: var(--blue); }
.acts { display: flex; gap: 6px; justify-content: flex-end; }
.edit.pw { color: var(--green-d); }
.edit.pw:hover { background: var(--red-l); color: var(--red); }
.edit.pw.off { color: var(--mute2); }
.edit.pw.off:hover { background: var(--green-l); color: var(--green-d); }
.cell { font-size: 13px; font-weight: 600; color: var(--ink); min-width: 0; }
.cell.m { color: var(--mute); font-size: 12.5px; }
.right { text-align: right; }
.empty { padding: 28px 20px; text-align: center; font-size: 13px; font-weight: 600; color: var(--mute2); }
.namecell { display: flex; align-items: center; gap: 10px; min-width: 0; }
.namecell .nm { font-size: 14px; font-weight: 700; color: var(--ink); }
.namecell .sb { font-size: 11.5px; font-weight: 600; color: var(--mute); }
.avatar { width: 34px; height: 34px; flex: none; border-radius: 50%; background: var(--blue-l); color: var(--blue); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; background: var(--blue-l); color: var(--blue); }
.pill.g { background: var(--green-l); color: var(--green-d); }
.pill.a { background: var(--amber-l); color: var(--amber-d); }
.pill.r { background: var(--red-l); color: var(--red-d); }
.pill.n { background: var(--soft2); color: var(--mute); }
.pill.b { background: var(--blue-l); color: var(--blue); }

/* ---------- Modal ---------- */
.overlay { position: fixed; inset: 0; background: rgba(11,26,51,.45); z-index: 60; display: none; align-items: center; justify-content: center; padding: 24px; }
.overlay.open { display: flex; }
.modal { width: 560px; max-width: 100%; max-height: 92vh; overflow: auto; background: var(--card); border-radius: 16px; box-shadow: 0 40px 80px -20px rgba(11,26,51,.5);
         padding: 22px; display: flex; flex-direction: column; gap: 15px; }
.modal .mh { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.modal .mt { font-size: 17px; font-weight: 700; color: var(--ink); }
.x { width: 34px; height: 34px; flex: none; border-radius: 11px; background: var(--soft2); display: flex; align-items: center; justify-content: center; cursor: pointer; border: 0; }
.x:hover { background: var(--line); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field > label { font-size: 12px; font-weight: 700; color: var(--mute); letter-spacing: .02em; }
.field .hint { font-size: 11.5px; font-weight: 600; color: var(--mute); }
.inp { height: 44px; border-radius: 11px; border: 1.5px solid var(--line); background: var(--soft); padding: 0 13px; font-size: 14px; font-weight: 600; color: var(--ink); outline: none; width: 100%; min-width: 0; }
.inp:focus { border-color: var(--blue); background: var(--card); }
select.inp { background: var(--card); }
.err { background: var(--red-l); border: 1px solid var(--red-b); color: var(--red-d); border-radius: 11px; padding: 10px 13px; font-size: 13px; font-weight: 600; display: none; }
.err.on { display: block; }
.ok { background: var(--green-l); color: var(--green-d); border-radius: 11px; padding: 10px 13px; font-size: 13px; font-weight: 700; }
.toggle { width: 46px; height: 27px; flex: none; border-radius: 14px; background: #C7CFDC; position: relative; cursor: pointer; transition: background .2s; }
.toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: 21px; height: 21px; border-radius: 50%; background: var(--card); box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: left .2s; }
.toggle.on { background: var(--green); }
.toggle.on::after { left: 22px; }
.row-t { display: flex; align-items: center; gap: 11px; font-size: 14px; font-weight: 600; }

/* ---------- Sozlamalar ---------- */
.panel { background: var(--card); border-radius: 12px; box-shadow: var(--shadow); padding: 8px 24px; max-width: 900px; }
.srow { display: flex; align-items: center; gap: 20px; padding: 16px 0; border-bottom: 1px solid var(--line2); flex-wrap: wrap; }
.srow:last-child { border-bottom: 0; }
.srow.top { align-items: flex-start; }
.srow .lb { width: 200px; flex: none; font-size: 11.5px; font-weight: 700; color: var(--mute); letter-spacing: .05em; }
.srow .vl { flex: 1; min-width: 240px; display: flex; flex-direction: column; gap: 9px; }
.box { height: 42px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--card); padding: 0 13px; font-size: 14px; font-weight: 600; color: var(--ink); outline: none; min-width: 0; }
.chips { display: flex; gap: 7px; flex-wrap: wrap; }
.chip { padding: 8px 13px; border-radius: 999px; font-size: 12.5px; font-weight: 700; cursor: pointer; background: var(--card); color: var(--ink2); border: 1.5px solid var(--line); user-select: none; }
.chip.on { background: var(--blue-l); color: var(--blue); border-color: var(--blue); }
.ocard { border: 1.5px solid var(--line); border-radius: 12px; padding: 13px 15px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.ocard .ic { width: 38px; height: 38px; flex: none; border-radius: 11px; background: var(--blue-l); display: flex; align-items: center; justify-content: center; }
.ocard .in { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 180px; }
.ocard .nm { font-size: 14px; font-weight: 700; color: var(--ink); }
.ocard .ds { font-size: 12.5px; font-weight: 600; color: var(--mute); }
.linkbtn { flex: none; padding: 8px 13px; border-radius: 10px; border: 1.5px solid var(--line3); background: var(--card); color: var(--blue); font-size: 12.5px; font-weight: 700; }
.linkbtn:hover { border-color: var(--blue); }
#map { height: 320px; border-radius: 12px; border: 1.5px solid var(--line); }

/* ---------- Tabel ---------- */
.tabel { overflow: auto; max-height: calc(100vh - 190px); }
.tabel table { border-collapse: separate; border-spacing: 0; width: 100%; }
.tabel th, .tabel td { padding: 8px 5px; font-size: 11.5px; font-weight: 600; text-align: center; border-bottom: 1px solid var(--line2); white-space: nowrap; }
.tabel th { position: sticky; top: 0; background: var(--soft); color: var(--mute); font-weight: 700; z-index: 2; border-bottom: 1px solid var(--line); }
.tabel th small { display: block; font-size: 10px; font-weight: 600; color: var(--mute2); }
.tabel .nm { position: sticky; left: 0; background: var(--card); text-align: left; min-width: 210px; padding-left: 16px; z-index: 1; }
.tabel th.nm { background: var(--soft); z-index: 3; }
.tabel .off { background: #F3F4F6; color: var(--mute2); }
.tabel .late { color: var(--amber-d); }
.tabel .jav { color: var(--blue); font-weight: 700; background: var(--blue-l); }
.tabel .perm { color: var(--green-d); }
.tabel .tot { font-weight: 700; color: var(--ink); border-right: 1px solid var(--line2); min-width: 54px; }

/* ---------- Kirish ---------- */
.login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.login .card { width: 380px; max-width: 100%; padding: 28px; display: flex; flex-direction: column; gap: 15px; }

@media (max-width: 900px) {
  .side { display: none; }
  .side.open { display: flex; position: fixed; left: 0; top: 0; z-index: 80; }
  .sub { display: none; }
  .burger { display: flex; }
  .content { padding: 16px; }
  .toolbar { margin: -10px -16px; padding: 10px 16px; }
  .top { padding: 12px 16px; }
  .top .date { display: none; }
  .grid2 { grid-template-columns: 1fr; }
  .tbl { overflow-x: auto; }
  .thead { position: static; }
  .srow .lb { width: 100%; }
}

/* Segment tugmalar va kichik tugmalar */
.seg { display: flex; gap: 4px; background: var(--card); border-radius: 12px; padding: 4px; border: 1.5px solid var(--line); flex: none; }
.seg a { padding: 7px 12px; border-radius: 9px; font-size: 12.5px; font-weight: 700; color: var(--mute); white-space: nowrap; }
.seg a.on { background: var(--blue); color: #fff; }
.btn.sm { height: 34px; padding: 0 11px; border-radius: 10px; font-size: 12.5px; }
.btn.ok-btn { background: var(--green); }
.btn.ok-btn:hover { background: var(--green-d); }

/* «Bugun» katagi: ingichka to'rtburchak blok */
.tb { border: 1px solid var(--line3); border-radius: 0; width: fit-content; min-width: 120px; max-width: calc(100% - 16px); font-size: 12px; line-height: 1.25; background: var(--card); }
.tb-st { padding: 3px 7px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-bottom: 1px solid var(--line3); }
.tb-g .tb-st { background: var(--green-l); color: var(--green-d); }
.tb-a .tb-st { background: var(--amber-l); color: var(--amber-d); }
.tb-r .tb-st { background: var(--red-l); color: var(--red-d); }
.tb-n .tb-st { background: var(--soft2); color: var(--mute); }
.tb-b .tb-st { background: var(--blue-l); color: var(--blue); }
.tb-row { display: flex; }
.tb-t { flex: 1; min-width: 0; padding: 3px 7px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-right: 1px solid var(--line3); }
.tb-cam { width: 32px; flex: none; border: 0; border-radius: 0; background: var(--card); color: var(--blue); display: flex; align-items: center; justify-content: center; padding: 0; }
.tb-cam:hover:not(:disabled) { background: var(--blue-l); }
.tb-cam:disabled { color: var(--line3); cursor: default; opacity: 1; }
.tb-fix { border-left: 1px solid var(--line3); color: var(--mute); }

/* Selfi oynasi */
.modal.ck { width: 320px; padding: 16px; gap: 12px; }
.ck-sub { font-size: 12.5px; font-weight: 600; color: var(--mute); margin-top: 2px; }
#ckImg { width: 100%; height: 240px; object-fit: cover; border-radius: 10px; background: var(--soft2); display: block; }
.ck-info { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 600; color: var(--ink2); }
.ck-seg { align-self: flex-start; }
.ck-seg a { cursor: pointer; }

/* Faol/nofaol belgisi — avatar burchagida */
.av-st { position: relative; }
.st-dot { position: absolute; right: -1px; bottom: -1px; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--card); }
.st-dot.on { background: var(--green); }
.st-dot.off { background: var(--mute2); }

/* Kunlik ish soati */
.hrs { min-width: 0; max-width: calc(100% - 12px); font-size: 12px; line-height: 1.25; }
.hrs-v { font-size: 13px; font-weight: 700; color: var(--ink); white-space: nowrap; }
.hrs-n { color: var(--mute); font-weight: 600; white-space: nowrap; }
.hrs-bar { height: 4px; background: var(--line2); margin-top: 4px; max-width: 120px; }
.hrs-bar i { display: block; height: 100%; background: var(--mute2); }
.hrs-g .hrs-bar i { background: var(--green); }
.hrs-a .hrs-bar i { background: var(--amber); }
.hrs-b .hrs-bar i { background: var(--blue); }
.hrs-l { font-weight: 600; color: var(--mute); font-size: 12px; }

/* Ustun sarlavhasidagi filtr (Texnikum HeaderFilter uslubida) */
.hf { position: relative; }
.hf-btn { border: 0; background: transparent; padding: 0; font: inherit; font-size: 12px; font-weight: 700; letter-spacing: .03em;
          color: var(--mute); display: inline-flex; align-items: center; gap: 5px; cursor: pointer; }
.hf-btn:hover, .hf.active .hf-btn { color: var(--blue); }
.hf-menu { position: absolute; top: 26px; left: -10px; z-index: 40; width: 200px; background: var(--card); border: 1px solid var(--line);
           border-radius: 12px; box-shadow: 0 16px 40px -12px rgba(11,26,51,.35); padding: 6px; display: none; flex-direction: column;
           letter-spacing: 0; }
.hf-menu.open { display: flex; }
.hf-menu a { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; border-radius: 8px; font-size: 13px;
             font-weight: 600; color: var(--ink); cursor: pointer; }
.hf-menu a:hover { background: var(--soft2); }
.hf-menu a.on { background: var(--blue-l); color: var(--blue); font-weight: 700; }
.hf-menu a.empty-opt { color: var(--mute2); }
.hf-n { font-size: 12px; color: var(--mute); font-weight: 700; }

/* Yig'ilgan menyu (Tabel — keng jadval uchun) */
.shell.compact .side { width: 72px; padding: 20px 10px; }
.shell.compact .side .lbl { display: none; }
.shell.compact .brand { justify-content: center; padding: 4px 0 16px; }
.shell.compact .nav { justify-content: center; padding: 10px 0; position: relative; }
.shell.compact .nav .badge { position: absolute; top: 4px; right: 6px; min-width: 16px; height: 16px; font-size: 10px; padding: 0 4px; }
.shell.compact .me { justify-content: center; padding: 8px 0; }
.shell.compact .content { padding: 16px; }
.shell.compact .toolbar { margin: -8px -16px; padding: 8px 16px; }

/* ---------- Tabel (2 qatorli) ---------- */
.tb2-wrap { overflow: auto; max-height: calc(100vh - 190px); }
.tb2 { table-layout: fixed; width: 100%; min-width: 1150px; border-collapse: separate; border-spacing: 0; font-size: 11px; line-height: 1.2; }
.tb2 th, .tb2 td { border-right: 1px solid var(--line2); border-bottom: 1px solid var(--line2); padding: 2px 3px; text-align: center;
                   white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: var(--card); }
.tb2 thead th { position: sticky; top: 0; z-index: 3; background: var(--soft); color: var(--mute); font-weight: 700; border-bottom: 1px solid var(--line); vertical-align: bottom; }
.tb2 th.dh { height: 50px; padding: 3px 0; }
.tb2 th.dh span { writing-mode: vertical-rl; transform: rotate(180deg); display: inline-block; font-size: 10.5px; }
.tb2 th.tl { white-space: normal; font-size: 9.5px; line-height: 1.15; padding: 2px 1px; text-overflow: clip; }
.tb2 thead th.sl { font-size: 10.5px; padding: 2px 2px; text-overflow: clip; }
.tb2 .sl { position: sticky; z-index: 2; }
.tb2 thead .sl { z-index: 4; }
.tb2 .s1 { left: 0; } .tb2 .s2 { left: 112px; } .tb2 .s3 { left: 182px; } .tb2 .s4 { left: 222px; } .tb2 .s5 { left: 284px; border-right: 1px solid var(--line3); }
.tb2 td.nm { text-align: left; font-weight: 700; color: var(--ink); padding-left: 6px; }
.tb2 td.mt { text-align: left; color: var(--mute); }
.tb2 td.lb { color: var(--mute2); font-size: 10px; }
.tb2 tbody.emp tr:last-child td { border-bottom: 1px solid var(--line3); }
.tb2 td.tl { color: var(--ink); }
.tb2 td.b { font-weight: 700; }
.tb2 td.pay { text-align: right; padding-right: 6px; }
.tb2 td.dc { color: var(--ink); font-weight: 600; padding: 2px 0; }
.tb2 td.ck { cursor: pointer; }
.tb2 td.ck:hover { outline: 1px solid var(--blue); outline-offset: -1px; }
.c-sun { background: #F8C9C9 !important; } .c-hol { background: #C8EBCF !important; } .c-absent { background: #D9D9D9 !important; }
.c-sabab { background: #DCCBF2 !important; } .c-none { background: #1F1F1F !important; color: #fff !important; } .c-open { background: #FDE8C2 !important; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; font-weight: 600; color: var(--mute); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 14px; height: 14px; display: inline-block; border: 1px solid var(--line3); }
.modal.day-m { width: 340px; padding: 16px; gap: 12px; }
.day-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.day-l { font-size: 11.5px; font-weight: 700; color: var(--mute); letter-spacing: .03em; text-transform: uppercase; }
.day-t { font-size: 16px; font-weight: 700; color: var(--ink); margin: 2px 0 6px; }
.day-grid img { width: 100%; height: 180px; object-fit: cover; border-radius: 10px; background: var(--soft2); display: block; }

/* Matnli tugma */
.lnk { border: 0; background: none; color: var(--blue); font-size: 13px; font-weight: 700; padding: 6px 4px; cursor: pointer; }
.lnk:hover { text-decoration: underline; }

/* Soat (24 soat) va sana (kun.oy.yil) maydonlari — static/fields.js */
.dmy-wrap { position: relative; display: inline-flex; align-items: center; min-width: 0; }
.field .dmy-wrap, .row3 .dmy-wrap { display: flex; width: 100%; }
.dmy-wrap > input.dmy { padding-right: 38px; width: 100%; }
.dmy-btn { position: absolute; right: 5px; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border: 0; border-radius: 8px;
           background: transparent; color: var(--mute); display: flex; align-items: center; justify-content: center; padding: 0; }
.dmy-btn:hover { background: var(--blue-l); color: var(--blue); }
.dmy-pick { position: absolute; right: 0; bottom: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; border: 0; padding: 0; }
input.t24, input.dmy { font-variant-numeric: tabular-nums; }

/* ---------- Dashboard ---------- */
.db-bar .seg a { cursor: pointer; }
.db-range { display: flex; align-items: center; gap: 8px; color: var(--mute); font-weight: 700; }
.db-sec { padding: 18px 20px; display: flex; flex-direction: column; gap: 16px; }
.db-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.db-t { font-size: 17px; font-weight: 700; color: var(--ink); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.kpi { border: 1px solid var(--line); border-radius: 12px; padding: 11px 13px; border-top: 3px solid var(--line3); min-width: 0; }
.kpi.g { border-top-color: var(--green); } .kpi.a { border-top-color: var(--amber); } .kpi.r { border-top-color: var(--red); }
.kpi.p { border-top-color: #8E24AA; } .kpi.b { border-top-color: var(--blue); }
.kpi .kl { font-size: 11.5px; font-weight: 700; color: var(--mute); letter-spacing: .03em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi .kv { font-size: 24px; font-weight: 800; color: var(--ink); margin-top: 4px; font-family: Manrope, "PT Sans", sans-serif; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi .ks { font-size: 12px; font-weight: 600; color: var(--mute); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chart { display: flex; flex-direction: column; gap: 8px; }
.bars { display: flex; align-items: flex-end; gap: 3px; height: 150px; padding-top: 6px; border-bottom: 1px solid var(--line); }
.bar { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; position: relative; }
.bar .stk { flex: 1; display: flex; flex-direction: column-reverse; border-radius: 4px 4px 0 0; overflow: hidden; }
.bar .stk i { display: block; flex: none; }
.bar:hover .stk { filter: brightness(1.08); }
.bar.off .stk { background: repeating-linear-gradient(135deg, transparent 0 4px, var(--soft2) 4px 6px); }
.bar .bl { position: absolute; bottom: -20px; left: 50%; transform: translateX(-50%); font-size: 10.5px; font-weight: 700; color: var(--mute2); white-space: nowrap; }
.chart .db-leg { margin-top: 20px; }
.s-g { background: #33B679; } .s-a { background: #F6BF26; } .s-p { background: #8E24AA; } .s-r { background: #D50000; } .s-b { background: #039BE5; }
.db-leg i { border: 0 !important; border-radius: 3px; }
.db-tw { overflow-x: auto; margin: 0 -20px; padding: 0 20px; }
.db-t1 { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 860px; }
.db-t1 th { font-size: 11.5px; font-weight: 700; color: var(--mute); letter-spacing: .03em; text-align: center; padding: 9px 8px; border-bottom: 1px solid var(--line); background: var(--soft); white-space: nowrap; }
.db-t1 td { padding: 9px 8px; border-bottom: 1px solid var(--line2); text-align: center; font-weight: 600; color: var(--ink); vertical-align: middle; }
.db-t1 tr:hover td { background: var(--soft); }
.db-t1 .l { text-align: left; }
.db-t1 td small { display: block; font-size: 11px; font-weight: 600; color: var(--mute); margin-top: 1px; }
.db-t1 td.nm { font-weight: 700; min-width: 180px; }
.db-t1 td.ta { color: var(--amber-d); font-weight: 700; } .db-t1 td.tr { color: var(--red-d); font-weight: 700; }
.pbar { height: 6px; border-radius: 3px; background: var(--line2); width: 140px; overflow: hidden; }
.pbar i { display: block; height: 100%; }
.pbar i.ok { background: var(--green); } .pbar i.mid { background: var(--amber); } .pbar i.low { background: var(--red); }
.db-t1 small.pv { display: block; margin-top: 4px; }
@media (max-width: 900px) { .db-range { width: 100%; } .db-range .box { flex: 1; width: auto !important; } .kpi .kv { font-size: 20px; } }
@media (max-width: 900px) {
  .db-range .dmy-wrap { flex: 1; min-width: 0; }
  .db-range .box { font-size: 13px; padding-left: 9px; }
  .bars { gap: 2px; }
  .bar:not(:nth-child(4n+1)) .bl { visibility: hidden; }
}
@media (max-width: 480px) { .kpi .kv { font-size: 17px; } .kpis { gap: 8px; } }

/* ---------- Hisobotlar ---------- */
.rj-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 20px; border-bottom: 1px solid var(--line2); }
.rj { display: flex; align-items: center; gap: 14px; padding: 13px 20px; border-bottom: 1px solid var(--line2); flex-wrap: wrap; }
.rj:last-child { border-bottom: 0; }
.rj.off .rj-main { opacity: .6; }
.rj-main { flex: 1; min-width: 240px; display: flex; flex-direction: column; gap: 4px; }
.rj-t { font-size: 14.5px; font-weight: 700; color: var(--ink); }
.rj-at { margin-left: 6px; padding: 2px 8px; border-radius: 7px; background: var(--blue-l); color: var(--blue); font-size: 13px; }
.rj-s { font-size: 12.5px; font-weight: 600; color: var(--mute); display: flex; align-items: center; flex-wrap: wrap; gap: 3px; }
.dchip { display: inline-block; min-width: 24px; text-align: center; padding: 1px 4px; border-radius: 6px; font-size: 11px; font-weight: 700; color: var(--mute2); background: var(--soft2); }
.dchip.on { background: var(--blue-l); color: var(--blue); }
.rj .acts { align-items: center; }
.btn.sm.sure { background: var(--amber); color: #202124; border-color: var(--amber); }
.btn.danger.sure { background: var(--red); color: #fff; }
.rj-prev { color: var(--mute) !important; font-weight: 600 !important; max-width: 420px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tg-prev { background: var(--soft); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; font-size: 14px; line-height: 1.55; color: var(--ink); max-height: 60vh; overflow: auto; }
.toast-s { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 90; background: var(--side); color: #fff; border-radius: 12px;
           padding: 11px 16px; font-size: 13.5px; font-weight: 600; max-width: min(560px, calc(100vw - 24px)); }
.toast-s.bad { background: var(--red-d); }

/* Tashkilot almashtirgich (menyu tepasi) */
.orgsw { display: block; position: relative; }
.orgsw summary { display: flex; align-items: center; gap: 10px; cursor: pointer; list-style: none; border-radius: 12px; padding: 4px; margin: -4px; }
.orgsw summary::-webkit-details-marker { display: none; }
.orgsw summary:hover { background: rgba(255,255,255,.06); }
.orgsw .orgs { position: absolute; left: 0; right: 0; top: calc(100% - 8px); z-index: 80; background: var(--card); border-radius: 12px;
               box-shadow: 0 10px 30px rgba(0,0,0,.25); padding: 6px; min-width: 200px; }
.orgsw .orgs a { display: block; padding: 9px 11px; border-radius: 9px; font-size: 13.5px; font-weight: 700; color: var(--ink); }
.orgsw .orgs a:hover { background: var(--soft); }
.orgsw .orgs a.on { color: var(--blue); }
.orgsw .orgs a.add { color: var(--blue); border-top: 1px solid var(--line2); border-radius: 0 0 9px 9px; margin-top: 4px; }

/* Reglament matni (app/reglament_blocks): bo'lim, band, ro'yxat, jadval, savol-javob */
.rgb { display: flex; flex-direction: column; gap: 8px; font-size: 14.5px; line-height: 1.65; color: var(--ink2); }
.rgb p { margin: 0; }
.rgb-h { margin: 14px 0 2px; font-size: 15.5px; font-weight: 800; color: var(--ink); display: flex; gap: 8px; }
.rgb-h:first-child { margin-top: 0; }
.rgb-h span { color: var(--blue); }
.rgb-li { display: flex; gap: 8px; }
.rgb-li span { color: var(--blue); font-weight: 800; min-width: 18px; }
.rgb-tw { overflow-x: auto; margin: 4px 0; }
.rgb-t { width: 100%; border-collapse: collapse; font-size: 13.5px; line-height: 1.45; }
.rgb-t th, .rgb-t td { border: 1px solid var(--line3); padding: 7px 10px; text-align: left; vertical-align: top; }
.rgb-t th { background: var(--soft2); font-weight: 800; color: var(--ink); }
.rgb-toc { display: flex; flex-direction: column; gap: 4px; font-size: 14px; font-weight: 600; }
.rgb-toc a { color: var(--ink2); }
.rgb-toc a b { color: var(--blue); margin-right: 8px; }
@media print { .rgb-t th { background: #eee !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; } }
