/* ═══════════ Anor International School — Elektron jurnal ═══════════ */
:root {
  --navy-900: #141f2d; --navy-800: #1b2839; --navy: #1f2d3f; --navy-600: #2a3b52; --navy-500: #3a4e6a;
  --gold: #c9a24f; --gold-l: #ecd38b; --gold-xl: #f6e7b8; --gold-d: #9a7631;
  --gold-grad: linear-gradient(135deg, #f3dc95 0%, #d1ab58 42%, #a07c35 100%);
  --navy-grad: linear-gradient(135deg, #2c405b 0%, #1f2d3f 55%, #172334 100%);

  --bg: #f5f2eb;
  --bg-2: #efe9dc;
  --card: #ffffff;
  --text: #1c2838;
  --text-2: #4a5568;
  --muted: #8a93a3;
  --line: rgba(31, 45, 63, .09);
  --line-2: rgba(31, 45, 63, .16);
  --soft: #f6efdf;
  --soft-text: #8a6526;
  --accent: var(--navy);
  --accent-text: var(--gold-xl);
  --shadow-sm: 0 1px 2px rgba(20, 31, 45, .05), 0 1px 1px rgba(20, 31, 45, .03);
  --shadow: 0 6px 24px -10px rgba(20, 31, 45, .18), 0 2px 6px -2px rgba(20, 31, 45, .06);
  --shadow-lg: 0 24px 60px -20px rgba(20, 31, 45, .45);

  --g5: #2e8b57; --g4: #3d6496; --g3: #d99a1e; --g2: #d64545;
  --ok: #2e8b57; --warn: #d99a1e; --bad: #d64545; --info: #3d6496;

  --r-sm: 10px; --r: 16px; --r-lg: 22px;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --head: "Montserrat", "Inter", -apple-system, "Segoe UI", sans-serif;
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --side-w: 268px;
  --safe-top: calc(var(--tg-safe-area-inset-top, 0px) + var(--tg-content-safe-area-inset-top, 0px));
}
:root[data-theme="dark"] {
  --bg: #111a26; --bg-2: #0d1520; --card: #1a2534; --text: #edf0f5; --text-2: #c2cad6; --muted: #8592a5;
  --line: rgba(255, 255, 255, .07); --line-2: rgba(255, 255, 255, .13);
  --soft: #2a2a22; --soft-text: #e6c879; --accent: var(--gold); --accent-text: var(--navy-900);
  --shadow: 0 8px 28px -12px rgba(0, 0, 0, .6);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 400 15px/1.55 var(--sans); letter-spacing: -.011em;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; font-feature-settings: "tnum" 0; }
body { min-height: 100vh; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
.hidden { display: none !important; }
svg.i { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.9;
  stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.num { font-variant-numeric: tabular-nums lining-nums; }

/* ═══════════ Karkas ═══════════ */
#app { min-height: 100vh; }
aside#side { display: none; }
header#top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 10px;
  padding: calc(var(--safe-top) + 10px) 16px 10px; background: var(--navy-grad); color: #fff;
  box-shadow: 0 1px 0 rgba(201, 162, 79, .35), 0 8px 20px -14px rgba(0, 0, 0, .6); }
header#top .back { display: none; width: 36px; height: 36px; border-radius: 12px; border: 0; background: rgba(255,255,255,.08);
  color: var(--gold-l); align-items: center; justify-content: center; cursor: pointer; }
header#top.can-back .back { display: inline-flex; }
.brand { display: flex; gap: 10px; align-items: center; min-width: 0; flex: 1; }
.brand img { width: 36px; height: 38px; object-fit: contain; flex: none; filter: drop-shadow(0 2px 6px rgba(0,0,0,.35)); }
.brand .bt { min-width: 0; }
.brand b { display: block; font-family: var(--serif); font-size: 23px; font-weight: 700; line-height: 1; letter-spacing: .3px;
  background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand .sub { display: block; font-family: var(--serif); color: var(--gold-l); font-size: 13.5px; font-weight: 600; letter-spacing: .4px; opacity: .92; line-height: 1.2; }
.top-actions { display: flex; gap: 6px; }
.icon-btn { width: 38px; height: 38px; border-radius: 12px; border: 1px solid rgba(201,162,79,.35); background: rgba(255,255,255,.06);
  color: var(--gold-l); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.avatar-top { width: 38px; height: 38px; border-radius: 50%; background: var(--gold-grad); color: var(--navy); font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center; font-size: 14px; cursor: pointer; border: 2px solid rgba(255,255,255,.15); }

main#view { padding: 18px 16px calc(96px + env(safe-area-inset-bottom)); max-width: 1240px; margin: 0 auto; animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } }

nav#tabs { position: fixed; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 30; display: flex;
  background: color-mix(in srgb, var(--card) 88%, transparent); backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border: 1px solid var(--line); border-radius: 22px; padding: 6px; box-shadow: var(--shadow-lg); }
nav#tabs button { flex: 1; border: 0; background: none; padding: 7px 2px 6px; color: var(--muted); font-size: 10.5px; font-weight: 700;
  display: flex; flex-direction: column; align-items: center; gap: 3px; cursor: pointer; border-radius: 16px; transition: .15s; letter-spacing: .1px; }
nav#tabs button svg.i { width: 22px; height: 22px; }
nav#tabs button.on { color: var(--navy); background: var(--soft); }
nav#tabs button.on svg.i { color: var(--gold-d); }
:root[data-theme="dark"] nav#tabs button.on { color: var(--gold-l); }
:root[data-theme="dark"] nav#tabs button.on svg.i { color: var(--gold); }

/* ═══════════ Kompyuter: yon menyu ═══════════ */
@media (min-width: 900px) {
  aside#side { display: flex; flex-direction: column; position: fixed; inset: 0 auto 0 0; width: var(--side-w); z-index: 40;
    background: var(--navy-grad); color: #dfe6f0; padding: 22px 14px 16px; border-right: 1px solid rgba(201,162,79,.25); overflow-y: auto; }
  aside#side::after { content: ""; position: absolute; right: -60px; bottom: -40px; width: 260px; height: 260px; pointer-events: none;
    background: url(/static/logo.png) center/contain no-repeat; opacity: .05; }
  .side-brand { display: flex; align-items: center; gap: 12px; padding: 4px 10px 22px; border-bottom: 1px solid rgba(201,162,79,.22); margin-bottom: 14px; }
  .side-brand img { width: 46px; height: 48px; object-fit: contain; }
  .side-brand b { display: block; font-family: var(--serif); font-size: 30px; font-weight: 700; line-height: .95;
    background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
  .side-brand span { font-family: var(--serif); color: var(--gold-l); font-size: 15px; font-weight: 600; letter-spacing: .4px; }
  .side-group { font-size: 11px; text-transform: uppercase; letter-spacing: 1.2px; color: rgba(236,211,139,.55); font-weight: 800; padding: 14px 12px 6px; }
  .side-link { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; background: none; color: #c9d3e0; font-weight: 600;
    padding: 10px 12px; border-radius: 12px; cursor: pointer; text-align: left; font-size: 14.5px; transition: .15s; position: relative; }
  .side-link:hover { background: rgba(255,255,255,.06); color: #fff; }
  .side-link.on { background: linear-gradient(90deg, rgba(201,162,79,.24), rgba(201,162,79,.06)); color: var(--gold-xl); }
  .side-link.on::before { content: ""; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 4px; border-radius: 0 4px 4px 0; background: var(--gold-grad); }
  .side-link.on svg.i { color: var(--gold-l); }
  .side-user { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 14px; background: rgba(255,255,255,.05);
    border: 1px solid rgba(201,162,79,.2); position: relative; z-index: 1; }
  .side-user .nm { font-weight: 700; color: #fff; font-size: 14px; line-height: 1.2; }
  .side-user .rl { font-size: 12px; color: rgba(236,211,139,.75); }
  header#top { display: none; }
  nav#tabs { display: none; }
  #app { padding-left: var(--side-w); }
  main#view { padding: 30px 36px 48px; }
  .page-head h1 { font-size: 30px !important; }
}

/* ═══════════ Sarlavha ═══════════ */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head h1 { font-family: var(--head); font-size: 26px; font-weight: 800; margin: 0; line-height: 1.15; letter-spacing: -.4px; color: var(--text); }
.page-head .sub { color: var(--muted); font-size: 13.5px; margin-top: 4px; font-weight: 600; }
.page-head .acts { display: flex; gap: 8px; flex-wrap: wrap; }
h3.sec { display: flex; align-items: center; gap: 8px; font-family: var(--head); font-size: 12px; text-transform: uppercase; letter-spacing: 1.1px; color: var(--muted);
  font-weight: 700; margin: 26px 0 10px; }
h3.sec::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ═══════════ Kartalar ═══════════ */
.card { background: var(--card); border-radius: var(--r); padding: 16px; margin-bottom: 14px; box-shadow: var(--shadow-sm); border: 1px solid var(--line); }
.card.pad0 { padding: 6px 16px; }
.card-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-weight: 800; font-size: 15px; margin-bottom: 12px; }
.card-title small { color: var(--muted); font-weight: 600; font-size: 12.5px; }
.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.grid-2 { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.grid-3 { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.stats { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 700px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stats.s3 { grid-template-columns: repeat(3, 1fr); }

.hero { position: relative; overflow: hidden; border-radius: var(--r-lg); padding: 22px; color: #fff; background: var(--navy-grad);
  box-shadow: var(--shadow); margin-bottom: 16px; border: 1px solid rgba(201,162,79,.3); }
.hero::after { content: ""; position: absolute; right: -30px; top: -20px; width: 210px; height: 210px; background: url(/static/logo.png) center/contain no-repeat;
  opacity: .14; pointer-events: none; }
.hero .hi { font-family: var(--head); font-size: 24px; font-weight: 800; line-height: 1.2; letter-spacing: -.3px; color: var(--gold-xl); position: relative; z-index: 1; }
.hero .lead { color: rgba(255,255,255,.75); font-size: 14px; margin-top: 4px; position: relative; z-index: 1; }
.hero-stats { display: grid; grid-template-columns: repeat(4, minmax(0, auto)); justify-content: start; gap: 14px 28px; margin-top: 18px; position: relative; z-index: 1; }
@media (max-width: 520px) { .hero-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; } .hero-stats .v { font-size: 22px !important; } .hero-stats .l { font-size: 10.5px !important; line-height: 1.25; } .hero .hi { font-size: 21px; } .hero { padding: 18px; } }
.hero-stats .v { font-family: var(--head); font-size: 26px; font-weight: 800; line-height: 1; color: #fff; font-variant-numeric: tabular-nums; }
.hero-stats .l { font-size: 12px; color: rgba(236,211,139,.85); font-weight: 600; margin-top: 4px; }
.hero .chipbar { position: relative; z-index: 1; }

.stat { background: var(--card); border-radius: var(--r); padding: 14px 14px 13px; border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; gap: 10px; position: relative; overflow: hidden; }
.stat.clickable:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.stat .ic { width: 38px; height: 38px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
  background: var(--soft); color: var(--gold-d); }
:root[data-theme="dark"] .stat .ic { color: var(--gold); }
.stat .v { font-family: var(--head); font-size: 24px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums lining-nums; letter-spacing: -.5px; }
.stat .l { color: var(--muted); font-size: 12.5px; font-weight: 700; }
.stat .x { font-size: 12px; color: var(--text-2); font-weight: 600; }

/* Tavsiyalar */
.ins { display: flex; gap: 12px; padding: 13px 14px; border-radius: 14px; background: var(--card); border: 1px solid var(--line);
  margin-bottom: 10px; box-shadow: var(--shadow-sm); position: relative; overflow: hidden; }
.ins::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--c); }
.ins .ic { width: 36px; height: 36px; border-radius: 11px; flex: none; display: flex; align-items: center; justify-content: center;
  color: var(--c); background: color-mix(in srgb, var(--c) 13%, transparent); }
.ins .t { font-weight: 800; font-size: 14.5px; }
.ins .d { color: var(--text-2); font-size: 13.5px; margin-top: 2px; line-height: 1.45; }
.ins-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); margin-bottom: 14px; }
.ins-grid .ins, .grid-2 > div > .ins:last-child { margin-bottom: 0; }
.ins.bad { --c: var(--bad); } .ins.warn { --c: var(--warn); } .ins.good { --c: var(--ok); } .ins.info { --c: var(--info); }

/* Ro'yxatlar */
.list > .item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.list > .item:last-child { border-bottom: 0; }
.item .t { font-weight: 650; line-height: 1.35; }
.item .s { font-size: 13px; color: var(--muted); font-weight: 450; margin-top: 2px; }
.item .end { margin-left: auto; text-align: right; flex: none; }
.clickable { cursor: pointer; transition: .15s; }
.list > .item.clickable:hover { background: linear-gradient(90deg, transparent, var(--soft), transparent); }
.av { width: 40px; height: 40px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 14px; color: var(--gold-l); background: var(--navy-grad); letter-spacing: .3px; }
.av.sm { width: 32px; height: 32px; font-size: 12px; }
.av.gold { background: var(--gold-grad); color: var(--navy); }
.badge-ic { width: 40px; height: 40px; border-radius: 12px; flex: none; display: flex; align-items: center; justify-content: center; background: var(--soft); color: var(--gold-d); }
.muted { color: var(--muted); } .small { font-size: 13px; } .b { font-weight: 800; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; } .row.nowrap { flex-wrap: nowrap; }
.grow { flex: 1; min-width: 0; }
.ellip { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Tugmalar */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 0; border-radius: 12px; padding: 10px 16px;
  background: var(--navy-grad); color: var(--gold-xl); font-weight: 650; cursor: pointer; white-space: nowrap; font-size: 14px;
  box-shadow: 0 4px 12px -6px rgba(20,31,45,.6), inset 0 1px 0 rgba(236,211,139,.25); transition: .15s; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn svg.i { width: 18px; height: 18px; }
.btn.gold { background: var(--gold-grad); color: var(--navy-900); box-shadow: 0 6px 16px -8px rgba(160,124,53,.8); }
.btn.sec { background: var(--soft); color: var(--soft-text); box-shadow: none; }
.btn.ghost { background: transparent; color: var(--soft-text); box-shadow: none; padding: 8px 10px; }
.btn.line { background: var(--card); color: var(--text); border: 1px solid var(--line-2); box-shadow: none; }
.btn.danger { background: color-mix(in srgb, var(--bad) 11%, var(--card)); color: var(--bad); box-shadow: none; }
.btn.sm { padding: 7px 12px; font-size: 13px; border-radius: 10px; }
.btn.sm svg.i { width: 16px; height: 16px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; pointer-events: none; }
:root[data-theme="dark"] .btn:not(.sec):not(.ghost):not(.line):not(.danger) { background: var(--gold-grad); color: var(--navy-900); }

/* Formalar */
input, select, textarea { width: 100%; padding: 11px 13px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--card);
  outline: none; font-weight: 500; transition: .15s; font-size: 14.5px; }
input::placeholder, textarea::placeholder { color: var(--muted); font-weight: 400; opacity: .8; }
input:focus, select:focus, textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 22%, transparent); background: var(--card); }
textarea { min-height: 84px; resize: vertical; line-height: 1.45; }
label.f { display: block; margin-bottom: 12px; }
label.f > span { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 5px; font-weight: 700; }
label.chk { display: flex; gap: 10px; align-items: center; padding: 8px 0; font-weight: 600; cursor: pointer; }
label.chk input { width: 20px; height: 20px; accent-color: var(--gold-d); flex: none; }
.form-row { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }

.pill { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 600;
  background: var(--soft); color: var(--soft-text); white-space: nowrap; }
.pill svg.i { width: 13px; height: 13px; }
.pill.red { background: color-mix(in srgb, var(--bad) 12%, var(--card)); color: var(--bad); }
.pill.green { background: color-mix(in srgb, var(--ok) 13%, var(--card)); color: var(--ok); }
.pill.blue { background: color-mix(in srgb, var(--info) 12%, var(--card)); color: var(--info); }
.pill.navy { background: var(--navy); color: var(--gold-l); }
.chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 12px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips button { flex: none; border: 1px solid var(--line-2); background: var(--card); padding: 7px 14px; border-radius: 99px; cursor: pointer;
  font-weight: 600; font-size: 13.5px; color: var(--text-2); transition: .15s; }
.chips button.on { background: var(--navy-grad); color: var(--gold-xl); border-color: transparent; box-shadow: 0 4px 12px -6px rgba(20,31,45,.6); }
.hero .chips button { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(201,162,79,.35); }
.hero .chips button.on { background: var(--gold-grad); color: var(--navy-900); }
.seg-tabs { display: inline-flex; background: var(--bg-2); border-radius: 12px; padding: 4px; gap: 2px; margin-bottom: 14px; }
.seg-tabs button { border: 0; background: none; padding: 8px 14px; border-radius: 9px; font-weight: 700; color: var(--muted); cursor: pointer; font-size: 13.5px; }
.seg-tabs button.on { background: var(--card); color: var(--text); box-shadow: var(--shadow-sm); }

/* Baholar */
.g { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 30px; padding: 0 5px; border-radius: 9px;
  font-weight: 800; color: #fff; font-size: 14.5px; font-variant-numeric: tabular-nums; box-shadow: inset 0 -2px 0 rgba(0,0,0,.12); }
.g.s5 { background: var(--g5); } .g.s4 { background: var(--g4); } .g.s3 { background: var(--g3); } .g.s2 { background: var(--g2); }
.g.lg { min-width: 44px; height: 44px; font-size: 20px; border-radius: 13px; }
.avg { font-weight: 800; font-variant-numeric: tabular-nums; }
.avg.s5 { color: var(--g5); } .avg.s4 { color: var(--g4); } .avg.s3 { color: var(--g3); } .avg.s2 { color: var(--g2); }
.bar { height: 7px; border-radius: 9px; background: var(--bg-2); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 9px; background: var(--c, var(--gold)); }
.subj-card { padding: 14px; }
.subj-card .top { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.subj-card .avg-big { font-size: 24px; font-weight: 800; margin-left: auto; font-variant-numeric: tabular-nums; }
.gl { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 10px; }
.gl .g { min-width: 26px; height: 26px; font-size: 13px; border-radius: 8px; }

/* Jurnal jadvali */
.jwrap { overflow: auto; max-height: calc(100vh - 230px); background: var(--card); border-radius: var(--r); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
table.j { border-collapse: separate; border-spacing: 0; font-size: 14px; min-width: 100%; }
table.j th, table.j td { border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); text-align: center; padding: 0; height: 44px; min-width: 46px; }
table.j thead th { position: sticky; top: 0; background: var(--card); z-index: 2; font-size: 12.5px; font-weight: 800; padding: 6px 3px; cursor: pointer; }
table.j thead th:hover { background: var(--soft); }
table.j thead th .k { display: block; font-size: 10px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .3px; }
table.j thead th.today { background: var(--soft); color: var(--soft-text); }
table.j thead th .hwdot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); margin-left: 3px; vertical-align: 2px; }
table.j th.name, table.j td.name { position: sticky; left: 0; z-index: 1; background: var(--card); text-align: left; padding: 0 12px;
  min-width: 170px; max-width: 220px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 700; }
table.j td.name .n { color: var(--muted); font-weight: 600; margin-right: 6px; font-size: 12px; }
table.j thead th.name { z-index: 3; }
table.j td.c { cursor: pointer; }
table.j td.c:hover { background: var(--soft); }
table.j td.c .att { font-weight: 800; font-size: 11.5px; }
.att.absent { color: var(--bad); } .att.late { color: var(--warn); } .att.excused { color: var(--muted); }
table.j td.c.cm { background-image: linear-gradient(225deg, var(--gold) 6px, transparent 6px); }
table.j td.fin { background: var(--soft); font-weight: 800; cursor: pointer; color: var(--soft-text); }
table.j td.avgc { font-size: 14.5px; }

/* Dars jadvali */
.tt { width: 100%; border-collapse: separate; border-spacing: 6px; }
.tt th { font-size: 12px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); font-weight: 800; text-align: left; padding: 4px 6px; }
.tt td.no { width: 52px; color: var(--muted); font-weight: 800; font-size: 13px; vertical-align: middle; text-align: center; }
.tt td.no small { display: block; font-weight: 600; font-size: 11px; }
.slot { cursor: pointer; border-radius: 12px; padding: 8px 10px; background: var(--bg); min-height: 52px; border: 1px dashed transparent; transition: .15s; }
.slot:hover { border-color: var(--gold); }
.slot.f { background: color-mix(in srgb, var(--h) 13%, var(--card)); border-left: 3px solid var(--h); }
.slot.f b { display: block; font-size: 13px; line-height: 1.2; }
.slot.f small { display: block; color: var(--muted); font-size: 11.5px; font-weight: 600; margin-top: 2px; }
.slot.empty { display: flex; align-items: center; justify-content: center; color: var(--muted); border-color: var(--line-2); }
.day-card .lesson { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.day-card .lesson:last-child { border-bottom: 0; }
.day-card .lesson .tm { width: 54px; flex: none; font-size: 12px; font-weight: 700; color: var(--muted); line-height: 1.25; }
.day-card .lesson .tm b { display: block; color: var(--text); font-size: 14px; }
.day-card .lesson .dot { width: 4px; align-self: stretch; border-radius: 4px; background: var(--h, var(--gold)); flex: none; }
.day-card.today { border-color: var(--gold); box-shadow: 0 0 0 2px color-mix(in srgb, var(--gold) 25%, transparent), var(--shadow-sm); }
.cap-bar { height: 10px; border-radius: 10px; background: var(--bg-2); overflow: hidden; }
.cap-bar > i { display: block; height: 100%; background: var(--gold-grad); }
.cap-bar.over > i { background: var(--bad); }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line-2); border-radius: 11px; overflow: hidden; flex: none; }
.stepper button { width: 34px; height: 34px; border: 0; background: var(--bg); cursor: pointer; font-size: 18px; font-weight: 700; color: var(--text-2); }
.stepper b { min-width: 34px; text-align: center; font-variant-numeric: tabular-nums; }

/* Sheet / modal */
#sheetWrap { position: fixed; inset: 0; z-index: 60; }
#sheetWrap .backdrop { position: absolute; inset: 0; background: rgba(12, 18, 27, .5); backdrop-filter: blur(3px); animation: fadein .15s; }
@keyframes fadein { from { opacity: 0; } }
#sheetWrap .sheet { position: absolute; left: 0; right: 0; bottom: 0; max-height: 92vh; overflow: auto; background: var(--card);
  border-radius: 24px 24px 0 0; padding: 8px 18px calc(22px + env(safe-area-inset-bottom)); max-width: 640px; margin: 0 auto;
  animation: up .22s cubic-bezier(.2,.9,.3,1.1); box-shadow: var(--shadow-lg); }
@keyframes up { from { transform: translateY(60px); opacity: .4; } }
@media (min-width: 900px) {
  #sheetWrap .sheet { top: 50%; bottom: auto; left: 50%; right: auto; width: 560px; transform: translate(-50%, -50%); border-radius: 24px;
    padding: 24px 26px; max-height: 86vh; animation: pop .2s ease; margin: 0; padding-left: calc(26px); }
  #sheetWrap .sheet { margin-left: calc(var(--side-w) / 2); }
  @keyframes pop { from { transform: translate(-50%, -46%); opacity: 0; } }
  .grip { display: none; }
}
.grip { width: 42px; height: 5px; border-radius: 5px; background: var(--line-2); margin: 4px auto 12px; }
.sheet h2 { font-family: var(--head); font-size: 20px; margin: 2px 0 14px; font-weight: 800; line-height: 1.25; letter-spacing: -.3px; }
.gradebtns { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin: 12px 0; }
.gradebtns button { height: 56px; border-radius: 14px; border: 0; font-size: 22px; font-weight: 800; color: #fff; cursor: pointer;
  box-shadow: inset 0 -3px 0 rgba(0,0,0,.15); transition: .1s; }
.gradebtns button:active { transform: scale(.95); }
.gradebtns button.on { outline: 3px solid var(--text); outline-offset: 2px; }
.seg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 8px 0 14px; }
.seg button { border: 1px solid var(--line-2); background: var(--bg); border-radius: 11px; padding: 10px 4px; font-size: 13px; font-weight: 700; cursor: pointer; }
.seg button.on { background: var(--navy-grad); color: var(--gold-xl); border-color: transparent; }
.att-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin: 10px 0 14px; }
.att-grid button { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border-radius: 12px; border: 1px solid var(--line-2);
  background: var(--bg); cursor: pointer; text-align: left; font-weight: 700; font-size: 13px; }
.att-grid button i { font-style: normal; width: 22px; height: 22px; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800; color: #fff; background: var(--ok); flex: none; }
.att-grid button.absent i { background: var(--bad); } .att-grid button.late i { background: var(--warn); } .att-grid button.excused i { background: var(--muted); }
.att-grid button.absent { border-color: var(--bad); }

.chartbox { position: relative; height: 250px; }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th, table.t td { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: left; }
table.t th { color: var(--muted); font-weight: 800; font-size: 11.5px; text-transform: uppercase; letter-spacing: .5px; }
table.t tr:last-child td { border-bottom: 0; }
.tscroll { overflow-x: auto; }
.code { font-family: var(--sans); background: var(--soft); color: var(--soft-text); padding: 2px 8px; border-radius: 7px; user-select: all; font-weight: 700; letter-spacing: 1.2px; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.empty { text-align: center; color: var(--muted); padding: 34px 12px; font-weight: 600; }
.empty .big { width: 64px; height: 64px; margin: 0 auto 12px; border-radius: 20px; display: flex; align-items: center; justify-content: center; background: var(--soft); color: var(--gold-d); }
.empty .big svg.i { width: 30px; height: 30px; }
.banner { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 14px; background: var(--soft); color: var(--soft-text);
  font-weight: 700; margin-bottom: 14px; border: 1px solid color-mix(in srgb, var(--gold) 35%, transparent); }

.menu { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); gap: 12px; }
.menu button { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 14px; text-align: left; cursor: pointer;
  box-shadow: var(--shadow-sm); transition: .15s; display: flex; flex-direction: column; gap: 10px; }
.menu button:hover { box-shadow: var(--shadow); transform: translateY(-2px); border-color: color-mix(in srgb, var(--gold) 40%, transparent); }
.menu button b { display: block; font-size: 14.5px; }
.menu button small { color: var(--muted); font-size: 12.5px; font-weight: 600; line-height: 1.35; }

#toast { position: fixed; left: 50%; bottom: calc(100px + env(safe-area-inset-bottom)); transform: translateX(-50%) translateY(10px); background: var(--navy-900); color: #fff;
  padding: 11px 18px; border-radius: 14px; font-size: 14px; font-weight: 600; z-index: 80; opacity: 0; pointer-events: none; transition: .2s; max-width: 90vw;
  border: 1px solid rgba(201,162,79,.4); box-shadow: var(--shadow-lg); }
#toast.show { opacity: 1; transform: translateX(-50%); }
.loader { width: 34px; height: 34px; margin: 80px auto; border: 3px solid var(--line-2); border-top-color: var(--gold); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton { background: linear-gradient(90deg, var(--bg-2), var(--card), var(--bg-2)); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 12px; }
@keyframes sk { to { background-position: -200% 0; } }

/* Kirish ekrani */
body.full #app { padding-left: 0; }
body.full aside#side, body.full header#top, body.full nav#tabs { display: none !important; }
body.full main#view { padding: 0; max-width: none; }
.login { min-height: 100vh; display: grid; grid-template-columns: 1fr; background: var(--navy-900); }
.login .art { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: calc(var(--safe-top) + 40px) 24px 26px;
  background: radial-gradient(circle at 50% 30%, #34496a 0%, #1f2d3f 55%, #141f2d 100%); color: #fff; overflow: hidden; }
.login .art::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(201,162,79,.18) 1px, transparent 1px); background-size: 22px 22px; opacity: .5; }
.login .art img { width: 120px; height: 124px; object-fit: contain; filter: drop-shadow(0 10px 28px rgba(201,162,79,.4)); position: relative; }
.login .word { font-family: var(--serif); font-size: 64px; font-weight: 700; line-height: 1; margin-top: 12px; position: relative;
  background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.login .tag { font-family: var(--serif); color: var(--gold-l); font-size: 23px; font-weight: 600; border-top: 1px solid rgba(201,162,79,.6); padding-top: 4px; position: relative; letter-spacing: .5px; }
.login .claim { color: rgba(255,255,255,.7); max-width: 360px; text-align: center; margin-top: 18px; font-size: 14.5px; position: relative; }
.login .formside { display: flex; align-items: flex-start; justify-content: center; padding: 0 20px 40px; background: radial-gradient(circle at 50% 0, #1f2d3f, #141f2d 70%); }
.login .box { width: 100%; max-width: 380px; background: var(--card); color: var(--text); border-radius: 22px; padding: 24px; box-shadow: var(--shadow-lg);
  border: 1px solid rgba(201,162,79,.3); }
.login .box h2 { font-family: var(--head); font-size: 24px; font-weight: 800; margin: 0 0 4px; letter-spacing: -.3px; }
.login .box p { margin: 0 0 18px; color: var(--muted); font-size: 13.5px; font-weight: 600; }
.login .hint { color: var(--muted); font-size: 13px; text-align: center; margin-top: 16px; font-weight: 600; }
.login .hint a { color: var(--soft-text); font-weight: 800; }
@media (min-width: 900px) {
  .login { grid-template-columns: 1.15fr 1fr; }
  .login .formside { align-items: center; background: var(--bg); }
  .login .word { font-size: 92px; } .login .tag { font-size: 30px; } .login .art img { width: 170px; height: 176px; }
}

/* ═══════════ Jurnal (eMaktab uslubi) ═══════════ */
.jbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.jbar .chips { margin: 0; padding: 0; }
table.j thead th .wd { display: block; font-size: 10px; color: var(--muted); font-weight: 600; text-transform: uppercase; }
table.j thead th.fut, table.j td.fut { background: repeating-linear-gradient(135deg, transparent 0 6px, color-mix(in srgb, var(--line) 60%, transparent) 6px 7px); }
table.j thead th.fut { color: var(--muted); }
table.j thead th.pend::after { content: ""; display: block; width: 6px; height: 6px; border-radius: 50%; background: var(--warn); margin: 2px auto 0; }
table.j thead th.done::after { content: ""; display: block; width: 6px; height: 6px; border-radius: 50%; background: var(--ok); margin: 2px auto 0; }
table.j tfoot td { position: sticky; bottom: 0; background: var(--bg-2); font-weight: 700; font-size: 12.5px; color: var(--text-2); z-index: 1; }
table.j tfoot td.name { z-index: 2; background: var(--bg-2); }
table.j td.cnt { font-size: 12.5px; color: var(--muted); font-weight: 600; min-width: 40px; }
table.j td.nbc { color: var(--bad); font-size: 12.5px; font-weight: 700; min-width: 40px; }
table.j th.hs { background: var(--bg-2); font-size: 11px; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; font-size: 12.5px; color: var(--muted); margin-top: 10px; }
.legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; vertical-align: 1px; }
.colgrade .row-st { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.colgrade .row-st:last-child { border-bottom: 0; }
.colgrade .nm { flex: 1; min-width: 0; font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.colgrade .gb { display: flex; gap: 4px; flex: none; }
.colgrade .gb button { width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--bg); font-weight: 800; cursor: pointer; font-size: 14px; color: var(--text-2); }
.colgrade .gb button.on { color: #fff; border-color: transparent; }
.colgrade .gb button.x { color: var(--muted); font-weight: 600; }
.tabs-sheet { display: flex; gap: 4px; background: var(--bg-2); padding: 4px; border-radius: 12px; margin-bottom: 14px; }
.tabs-sheet button { flex: 1; border: 0; background: none; padding: 8px; border-radius: 9px; font-weight: 650; color: var(--muted); cursor: pointer; font-size: 13.5px; }
.tabs-sheet button.on { background: var(--card); color: var(--text); box-shadow: var(--shadow-sm); }
.class-group { margin-bottom: 16px; }
.class-group .cg-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); cursor: pointer; }
.class-group .cg-name { font-family: var(--head); font-size: 20px; font-weight: 800; line-height: 1; min-width: 56px; }
.class-group.closed .list { display: none; }
.class-group .chev { transition: .2s; color: var(--muted); transform: rotate(90deg); display: inline-flex; }
.class-group.closed .chev { transform: rotate(0); }
.drop { border: 2px dashed var(--line-2); border-radius: 14px; padding: 22px; text-align: center; color: var(--muted); cursor: pointer; transition: .15s; font-weight: 600; }
.drop:hover, .drop.over { border-color: var(--gold); background: var(--soft); color: var(--soft-text); }
.plan-prev { max-height: 260px; overflow: auto; border: 1px solid var(--line); border-radius: 12px; margin: 10px 0; }
.plan-prev div { display: flex; gap: 10px; padding: 7px 12px; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.plan-prev div b { color: var(--muted); min-width: 26px; font-weight: 600; }
@media (max-width: 899px) { .page-head .back-link { display: none; } }

/* Kompakt elementlar */
.hero { padding: 18px 22px; }
.hero::after { width: 160px; height: 160px; right: -20px; top: -14px; }
.hero-stats { margin-top: 14px; }
.cname { font-family: var(--head); font-weight: 800; letter-spacing: -.3px; }
.pick { display: flex; flex-wrap: wrap; gap: 8px; }
.pick button { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line-2); background: var(--card); border-radius: 12px;
  padding: 9px 14px; font-family: var(--head); font-weight: 700; font-size: 15px; color: var(--text); cursor: pointer; transition: .15s; }
.pick button small { font-family: var(--sans); font-weight: 500; font-size: 12px; color: var(--muted); }
.pick button:hover { border-color: var(--gold); }
.pick button.on { background: var(--navy-grad); color: var(--gold-xl); border-color: transparent; box-shadow: 0 4px 12px -6px rgba(20,31,45,.6); }
.pick button.on small { color: rgba(236,211,139,.75); }
.pick button .dot-w { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--warn); color: #fff; font-size: 11px; font-family: var(--sans); font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.subj-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--card);
  cursor: pointer; transition: .15s; margin-bottom: 8px; }
.subj-row:hover { border-color: var(--gold); box-shadow: var(--shadow-sm); transform: translateX(2px); }
.subj-row .sw { width: 6px; align-self: stretch; border-radius: 6px; flex: none; }
.subj-row .nm { font-family: var(--head); font-weight: 700; font-size: 15px; }
.jsel { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.jsel select { width: auto; min-width: 120px; padding: 8px 12px; font-weight: 600; font-family: var(--head); }
table.t td .cname { font-size: 15px; }

/* Kun mavzusi (ish rejadan) */
.topic-card { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; margin: 0 0 12px; border-radius: 12px; border: 1px solid var(--line); background: color-mix(in srgb, var(--ok) 8%, var(--card)); }
.topic-card.empty { background: var(--card); }
.topic-card.empty b { color: var(--muted); font-weight: 500; }
.topic-card small, .topic-card b, .topic-card span { display: block; }
.topic-card small { color: var(--muted); margin-bottom: 2px; }
.topic-card b { font-size: 15.5px; line-height: 1.35; overflow-wrap: anywhere; }
.topic-card span { font-size: 13.5px; margin-top: 4px; }
.plan-prev .pd { font-size: 12.5px; font-weight: 600; text-align: right; max-width: 40%; flex-shrink: 0; }

/* Jurnal pasporti: fan, o'qituvchi, sinf */
.jinfo { display: flex; flex-wrap: wrap; gap: 10px 28px; padding: 12px 16px; margin-bottom: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.jinfo > div { display: flex; align-items: center; gap: 11px; min-width: 0; }
.jinfo small { display: block; color: var(--muted); font-size: 12.5px; }
.jinfo b { display: block; font-size: 15px; line-height: 1.3; overflow-wrap: anywhere; }
@media (max-width: 600px) { .jinfo { flex-direction: column; } }

/* Excel faylni ilova ichida ko'rish */
.xl { overflow: auto; max-height: 60vh; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.xl table { border-collapse: collapse; font-size: 13px; }
.xl td { border: 1px solid var(--line); padding: 6px 9px; white-space: nowrap; max-width: 320px; overflow: hidden; text-overflow: ellipsis; }
.xl tr:first-child td { font-weight: 700; position: sticky; top: 0; background: var(--card); }

/* Ish rejalar: filtr va fan bo'limlari */
.plf { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 6px; }
.pl-s { border: 1px solid var(--line); border-radius: 14px; background: var(--card); margin-bottom: 8px; }
.pl-s summary { display: flex; align-items: center; gap: 12px; padding: 10px 14px; cursor: pointer; list-style: none; }
.pl-s summary::-webkit-details-marker { display: none; }
.pl-s summary::after { content: ""; width: 8px; height: 8px; border: solid var(--muted); border-width: 0 2px 2px 0; transform: rotate(45deg); margin: -4px 4px 0; flex-shrink: 0; }
.pl-s[open] summary::after { transform: rotate(225deg); margin-top: 4px; }
.pl-g { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 8px; padding: 4px 14px 14px; }
.pl-g.wide { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); padding: 0; }
.pl-t { text-align: left; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: inherit; font: inherit; cursor: pointer; min-width: 0; }
.pl-t:hover { border-color: var(--muted); }
.pl-t.ok { background: color-mix(in srgb, var(--ok) 9%, var(--card)); }
.pl-t b { display: block; font-size: 15px; }
.pl-t small { display: flex; align-items: center; gap: 4px; color: var(--muted); font-size: 12px; margin-top: 2px; }
.pl-t.ok small { color: var(--ok); }
.pl-t svg { width: 13px; height: 13px; flex-shrink: 0; }
#plc { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; margin-top: 6px; }
@media (max-width: 600px) { .plf { grid-template-columns: 1fr 1fr; } .plf label:last-child { grid-column: 1 / -1; } }

/* Sahifalash */
.pg-hide { display: none !important; }
.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin: 10px 2px 16px; }
.pager > div { display: flex; align-items: center; gap: 5px; }
.pager button { min-width: 38px; height: 38px; padding: 0 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: inherit; font: inherit; font-weight: 600; cursor: pointer; }
.pager button.on { background: #1f2d3f; color: #ecd38b; border-color: #1f2d3f; }
.pager button:disabled { opacity: .4; cursor: default; }
.pager i { font-style: normal; color: var(--muted); }
.hero-stats .clickable, .ins.clickable { cursor: pointer; }
.hero-stats .clickable:hover { opacity: .8; }
.ins-go { margin-left: auto; align-self: center; color: var(--muted); }

/* Til tanlash */
.lang-sw { display: flex; gap: 6px; margin: 8px 0; }
.lang-sw button { flex: 1; padding: 9px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: inherit; font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.lang-sw button.on { background: #1f2d3f; color: #ecd38b; border-color: #1f2d3f; }
#side .lang-sw { margin: 8px 4px 4px; }
#side .lang-sw button { background: transparent; color: #c9d1dc; border-color: rgba(255,255,255,.15); padding: 7px; }
#side .lang-sw button.on { background: rgba(201,162,79,.2); color: #ecd38b; border-color: rgba(201,162,79,.5); }
.lang-top { font-weight: 700; font-size: 13px; }
.hr-box { margin: 10px 0 14px; } .hr-box summary { display: flex; gap: 8px; align-items: center; }
.hr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; margin-top: 10px; }
table.mx td:not(:first-child), table.mx th:not(:first-child) { text-align: center; white-space: nowrap; }
table.mx td:first-child, table.mx th:first-child { position: sticky; left: 0; background: var(--card); z-index: 1; }

/* Monitoring (ball) */
.g.pt { width: auto; min-width: 32px; padding: 0 7px; }
.g.pt small { opacity: .8; font-size: .75em; font-weight: 600; }
.pt-box { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; }
.pt-box input { width: 78px; text-align: center; font-weight: 700; padding: 8px; }
.pt-in.bad { border-color: var(--bad); color: var(--bad); }
.pt-row { margin: 12px 0; align-items: center; gap: 10px; } .pt-row b, .pt-row .btn { white-space: nowrap; flex-shrink: 0; } .pt-row input { min-width: 0; } .pt-row input { font-size: 20px; font-weight: 700; text-align: center; }
.kind-row { display: grid; grid-template-columns: minmax(120px, 2fr) minmax(84px, 1fr) minmax(76px, 1fr) minmax(66px, 1fr) 40px; gap: 8px; align-items: end; padding: 8px 0; border-bottom: 1px solid var(--line); }
.kind-row .f { margin: 0; } .kind-row .kdel { grid-column: -2; } .kind-row .f span { font-size: 12px; }
#kadd { margin-top: 10px; }
@media (max-width: 600px) { .kind-row { grid-template-columns: 1fr 1fr 1fr 40px; } .kind-row .kn-l { grid-column: 1 / -1; } }

.slot + .slot { margin-top: 4px; }

/* O'qituvchi jadvali: barcha soatlar, "okno" */
.day-card.full .lesson { gap: 10px; padding: 7px 0; min-height: 48px; }
.day-card .lesson .no { width: 22px; height: 22px; flex: none; border-radius: 7px; background: var(--bg-2); color: var(--text-2); font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.day-card .lesson.okno { color: var(--muted); font-size: 13px; --h: var(--line-2); }
.day-card .lesson.okno .grow { border: 1px dashed var(--line-2); border-radius: 9px; padding: 6px 10px; background: repeating-linear-gradient(135deg, transparent 0 7px, color-mix(in srgb, var(--line) 45%, transparent) 7px 8px); }
.day-card .lesson.okno .tm b { color: var(--muted); }
/* To'liq ism-familiya */
table.j th.name, table.j td.name { white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.2; }
table.j td.name { padding-top: 5px; padding-bottom: 5px; }
table.j td.name .n { display: inline-block; min-width: 18px; } table.j td.name .fn { overflow-wrap: anywhere; }
.colgrade .nm { white-space: normal; overflow: visible; overflow-wrap: anywhere; line-height: 1.25; }
@media (max-width: 600px) { table.j th.name, table.j td.name { min-width: 138px; max-width: 150px; padding-left: 8px; padding-right: 6px; font-size: 13px; } }
@media (max-width: 520px) {
  .colgrade .row-st:has(.gb) { flex-wrap: wrap; row-gap: 6px; }
  .colgrade .row-st:has(.gb) .nm { flex: 1 1 calc(100% - 40px); font-size: 15px; }
  .colgrade .row-st .gb { width: 100%; padding-left: 30px; gap: 6px; } .colgrade .row-st .gb button { flex: 1; height: 38px; width: auto; }
}
/* Davomat — jurnal ko'rinishida */
.att-j { width: 100%; border-collapse: collapse; }
.att-j th { font-size: 11.5px; color: var(--muted); font-weight: 700; padding: 6px 2px; border-bottom: 2px solid var(--line); position: sticky; top: 0; background: var(--card); z-index: 1; }
.att-j th.n { text-align: left; padding-left: 8px; }
.att-j td { border-bottom: 1px solid var(--line); padding: 5px 2px; }
.att-j td.i { width: 26px; text-align: center; color: var(--muted); font-size: 12.5px; }
.att-j td.n { font-weight: 600; font-size: 14.5px; line-height: 1.25; padding: 6px 8px; overflow-wrap: anywhere; }
.att-j td.o { width: 44px; text-align: center; }
.att-j button { width: 40px; height: 38px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--bg); color: var(--muted); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; padding: 0; }
.att-j button.on[data-v=present] { background: var(--ok); } .att-j button.on[data-v=absent] { background: var(--bad); }
.att-j button.on[data-v=late] { background: var(--warn); } .att-j button.on[data-v=excused] { background: var(--info); }
.att-j button.on { color: #fff; border-color: transparent; }
.att-j tr.absent td { background: color-mix(in srgb, var(--bad) 7%, transparent); } .att-j tr.late td { background: color-mix(in srgb, var(--warn) 8%, transparent); } .att-j tr.excused td { background: color-mix(in srgb, var(--info) 7%, transparent); }
.att-leg { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 10px 2px 0; }
.sheet-foot { position: sticky; bottom: -60px; margin: 0 0 -60px; padding: 14px 0 72px; background: linear-gradient(transparent, var(--card) 14px); z-index: 2; }
.sheet-foot .btn { padding: 13px; }
@media (max-width: 400px) { .att-j td.o { width: 38px; } .att-j button { width: 35px; font-size: 12px; } .att-j td.n { font-size: 14px; padding: 6px 4px; } }

table.j td.name { position: sticky; padding-left: 34px !important; }
table.j td.name .n { position: absolute; left: 6px; top: 50%; transform: translateY(-50%); width: 22px; text-align: right; margin: 0; min-width: 0; }
table.j tfoot td.name { padding-left: 12px !important; }
@media (max-width: 380px) {
  .att-j thead { display: none; }
  .att-j tr { display: grid; grid-template-columns: 26px repeat(4, 1fr); padding: 6px 0; border-bottom: 1px solid var(--line); }
  .att-j td, .att-j td.o { border: 0; width: auto; padding: 3px; } .att-j td.n { grid-column: 2 / -1; padding: 2px 4px; font-size: 15px; }
  .att-j td.i { align-self: center; } .att-j td.o:nth-child(3) { grid-column: 2; } .att-j button { width: 100%; }
}
table.j th.name, table.j td.name { min-width: 240px; max-width: 280px; }
@media (max-width: 600px) { table.j th.name, table.j td.name { min-width: 162px; max-width: 172px; font-size: 12.5px; } table.j td.name { padding-left: 27px !important; padding-right: 4px; } table.j td.name .n { left: 1px; } }
