/* QDTU Mustaqil taʼlim — asosiy uslublar (maket asosida) */
:root {
  --ink: #0F172A; --muted: #475569; --faint: #64748B;
  --line: #E2E8F0; --line-2: #CBD5E1; --bg: #F8FAFC; --card: #FFFFFF;
  --brand: #0F2A5F; --accent: #1D4ED8; --accent-dark: #1E3A8A; --accent-soft: #DBEAFE; --accent-softer: #EFF6FF;
  --ok: #15803D; --ok-soft: #DCFCE7; --warn: #B45309; --warn-soft: #FEF3C7; --bad: #B91C1C; --bad-soft: #FEE2E2;
  --radius: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink); background: var(--bg); font-size: 15px; line-height: 1.5; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); }
h1, h2, h3 { margin: 0; line-height: 1.2; }
h1 { font-size: 26px; font-weight: 700; }
h2 { font-size: 17px; font-weight: 600; }
h3 { font-size: 15px; font-weight: 600; }
p { margin: 0; }
img { max-width: 100%; }

/* ── Karkas ─────────────────────────────── */
.shell { display: flex; flex-wrap: wrap; min-height: 100vh; }
.sidebar { flex: 1 1 230px; max-width: 260px; background: var(--brand); color: #E0E7FF; padding: 18px 14px; display: flex; flex-direction: column; gap: 4px; }
.sidebar .brand { display: flex; align-items: center; gap: 10px; color: #fff; padding: 4px 8px 18px; font-weight: 600; }
.sidebar .brand img { width: 40px; height: 40px; border-radius: 50%; background: #fff; }
.sidebar .brand small { display: block; font-weight: 400; color: #A5B4FC; font-size: 12px; }
.sidebar a.nav { padding: 11px 12px; border-radius: 8px; color: #E0E7FF; font-size: 14px; display: flex; justify-content: space-between; align-items: center; }
.sidebar a.nav:hover { background: rgba(255,255,255,.08); color: #fff; }
.sidebar a.nav.active { background: rgba(255,255,255,.14); color: #fff; font-weight: 600; }
.sidebar .nav-group { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: #A5B4FC; padding: 14px 12px 4px; }
.sidebar .who { margin-top: auto; padding: 14px 8px 0; border-top: 1px solid rgba(255,255,255,.15); font-size: 13px; }
.sidebar .who small { color: #A5B4FC; }
.pill-count { background: #F59E0B; color: #1C1917; border-radius: 999px; padding: 0 8px; font-size: 12px; font-weight: 700; }
.main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; }
.topbar { background: #fff; border-bottom: 1px solid var(--line); padding: 10px 24px; display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 12px; }
.content { padding: 26px 24px 48px; max-width: 1280px; width: 100%; margin: 0 auto; display: flex; flex-direction: column; gap: 20px; }
.page-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px; }
.page-head .sub { font-size: 13px; color: var(--muted); margin-bottom: 4px; }

/* Talaba — yuqori menyu */
.studentbar { background: #fff; border-bottom: 1px solid var(--line); padding: 10px 24px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.studentbar .brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 600; }
.studentbar .brand img { width: 40px; height: 40px; border-radius: 50%; }
.studentbar nav { display: flex; flex-wrap: wrap; gap: 4px; }
.studentbar nav a { padding: 9px 14px; border-radius: 8px; color: #334155; font-size: 14px; }
.studentbar nav a.active { background: var(--accent-softer); color: var(--accent); font-weight: 600; }

/* ── Kartalar va panellar ──────────────── */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.card.flush { padding: 0; overflow: hidden; }
.card-head { padding: 16px 20px; border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; }
.grid { display: grid; gap: 16px; }
.grid.kpi { grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr)); }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr)); }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); }
.kpi .card { display: flex; flex-direction: column; gap: 4px; }
.kpi .label { font-size: 13px; color: var(--muted); }
.kpi .value { font-size: 30px; font-weight: 700; }
.kpi .hint { font-size: 13px; color: var(--muted); }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.between { justify-content: space-between; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.bold { font-weight: 600; }
.ok { color: var(--ok); } .warn { color: var(--warn); } .bad { color: var(--bad); }
.note { background: var(--accent-softer); border: 1px solid #BFDBFE; border-radius: 12px; padding: 12px 14px; font-size: 14px; color: #1E293B; }
.note.warn { background: #FFFBEB; border-color: #FDE68A; color: #78350F; }
.note.bad { background: var(--bad-soft); border-color: #FCA5A5; color: #7F1D1D; }
.note.ok { background: #F0FDF4; border-color: #BBF7D0; color: #14532D; }

/* ── Tugmalar va formalar ──────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: 10px; border: 1px solid transparent; background: var(--accent); color: #fff; font: 600 14px/1 inherit; font-family: inherit; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--accent-dark); color: #fff; }
.btn.secondary { background: #fff; color: var(--ink); border-color: var(--line-2); font-weight: 500; }
.btn.secondary:hover { background: #F1F5F9; color: var(--ink); }
.btn.success { background: var(--ok); } .btn.success:hover { background: #166534; }
.btn.danger { background: #fff; color: var(--bad); border-color: #FCA5A5; }
.btn.danger:hover { background: var(--bad-soft); }
.btn.sm { height: 36px; padding: 0 12px; font-size: 13px; }
.btn.lg { height: 50px; padding: 0 28px; font-size: 15px; }
.btn.block { width: 100%; }
.btn[disabled], .btn.disabled { background: #CBD5E1; color: #334155; cursor: not-allowed; border-color: transparent; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .label-text { font-size: 14px; font-weight: 500; }
.field .help { font-size: 12px; color: var(--faint); }
.input, select.input, textarea.input { height: 46px; border: 1px solid var(--line-2); border-radius: 10px; padding: 0 14px; font-size: 15px; font-family: inherit; background: #fff; color: var(--ink); width: 100%; }
textarea.input { height: auto; min-height: 96px; padding: 12px 14px; line-height: 1.5; resize: vertical; }
textarea.mono, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 14px; }
.input:focus { outline: 2px solid #93C5FD; outline-offset: 0; border-color: var(--accent); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 14px; }
.check { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; line-height: 1.55; }
.check input { width: 20px; height: 20px; margin-top: 2px; flex-shrink: 0; }
.errors { background: var(--bad-soft); color: #7F1D1D; border-radius: 10px; padding: 12px 14px; font-size: 14px; }
.errors ul { margin: 0; padding-left: 18px; }
.inline-form { display: inline; }

/* ── Jadvallar ─────────────────────────── */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { background: #F8FAFC; color: var(--muted); text-align: left; font-weight: 600; padding: 10px 12px; white-space: nowrap; }
.table td { padding: 12px; border-top: 1px solid #F1F5F9; vertical-align: middle; }
.table tr:hover td { background: #FAFCFF; }
.table th:first-child, .table td:first-child { padding-left: 20px; }
.bar { width: 90px; height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; display: inline-block; vertical-align: middle; }
.bar > span { display: block; height: 6px; background: var(--accent); }

/* ── Belgilar ──────────────────────────── */
.badge { display: inline-block; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: #F1F5F9; color: #475569; white-space: nowrap; }
.badge.blue { background: var(--accent-soft); color: var(--accent-dark); }
.badge.green { background: var(--ok-soft); color: #166534; }
.badge.amber { background: var(--warn-soft); color: #92400E; }
.badge.red { background: var(--bad-soft); color: #991B1B; }
.badge.violet { background: #EDE9FE; color: #5B21B6; }
.grade-excellent { color: var(--ok); } .grade-good { color: var(--accent); } .grade-satisfactory { color: var(--warn); } .grade-fail { color: var(--bad); }

/* Shkala */
.scale { display: flex; height: 34px; border-radius: 8px; overflow: hidden; font-size: 12px; font-weight: 600; }
.scale > div { display: flex; align-items: center; justify-content: center; text-align: center; }
.scale .f { background: #FEE2E2; color: #991B1B; } .scale .s { background: #FEF3C7; color: #92400E; }
.scale .g { background: #DBEAFE; color: #1E3A8A; } .scale .e { background: #DCFCE7; color: #166534; }

/* Vazifalar roʻyxati */
.task-row { padding: 14px 20px; border-top: 1px solid #F1F5F9; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.task-row .num { width: 34px; height: 34px; border-radius: 8px; background: #F1F5F9; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 13px; flex-shrink: 0; }
.task-row .body { flex: 1 1 280px; min-width: 0; }
.task-row .score { width: 72px; text-align: right; font-weight: 600; }

/* ── Kirish va roʻyxatdan oʻtish ───────── */
.auth { min-height: 100vh; display: flex; flex-wrap: wrap; }
.auth .hero { flex: 1 1 460px; background: var(--brand); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; gap: 32px; }
.auth .hero .logo { display: flex; align-items: center; gap: 14px; }
.auth .hero .logo img { width: 64px; height: 64px; border-radius: 50%; background: #fff; }
.auth .hero h1 { font-size: 40px; line-height: 1.1; }
.auth .hero p { color: #E0E7FF; font-size: 17px; line-height: 1.6; }
.auth .feature { background: rgba(255,255,255,.08); border-radius: 12px; padding: 14px 16px; }
.auth .feature b { display: block; font-size: 15px; }
.auth .feature span { font-size: 13px; color: #C7D2FE; }
.auth .panel { flex: 1 1 460px; display: flex; align-items: center; justify-content: center; padding: 48px 24px; }
.auth .panel > div { width: 100%; max-width: 430px; display: flex; flex-direction: column; gap: 22px; }
.lang-switch { position: relative; display: inline-block; }
.lang-switch > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 6px; height: 38px; padding: 0 12px; border-radius: 10px; background: #E2E8F0; font-size: 14px; font-weight: 700; color: var(--ink); user-select: none; }
.lang-switch > summary::-webkit-details-marker { display: none; }
.lang-switch > summary:hover, .lang-switch[open] > summary { background: #CBD5E1; }
.lang-switch .caret { font-size: 11px; color: var(--muted); transition: transform .15s; }
.lang-switch[open] .caret { transform: rotate(180deg); }
.lang-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 50; min-width: 190px; margin: 0; padding: 6px; list-style: none; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 30px rgba(15,23,42,.15); }
.lang-menu a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; font-size: 14px; color: var(--ink); }
.lang-menu a:hover, .lang-menu a:focus-visible { background: #F1F5F9; }
.lang-menu a.active { font-weight: 600; background: var(--accent-softer, #EFF6FF); }
.lang-menu .code { min-width: 26px; font-size: 12px; font-weight: 700; color: var(--muted); }
.lang-menu .tick { margin-left: auto; color: var(--ok); }
.register-wrap { max-width: 1060px; margin: 0 auto; padding: 28px 20px 56px; display: flex; flex-direction: column; gap: 20px; }
.face-box { display: flex; gap: 16px; align-items: center; border: 1px dashed #94A3B8; border-radius: 12px; padding: 14px; flex-wrap: wrap; }
.face-box video, .face-box img { width: 160px; height: 120px; object-fit: cover; border-radius: 10px; background: #1E293B; }

/* ── Vazifa bajarish (proktoring) ──────── */
.exam { min-height: 100vh; background: #F1F5F9; user-select: none; -webkit-user-select: none; }
.exam input, .exam textarea { user-select: text; -webkit-user-select: text; }
.exam-top { background: #0F172A; color: #fff; padding: 12px 20px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; position: sticky; top: 0; z-index: 20; }
.exam-top .chips { display: flex; flex-wrap: wrap; gap: 8px; font-size: 12px; font-weight: 600; }
.chip { padding: 6px 10px; border-radius: 999px; background: #1E293B; color: #E2E8F0; }
.chip.on { background: #14532D; color: #DCFCE7; }
.chip.alert { background: #7F1D1D; color: #FEE2E2; }
.timer { font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; }
.timer.low { color: #FCA5A5; }
.exam-body { max-width: 1240px; margin: 0 auto; padding: 20px; display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.exam-main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.exam-side { flex: 1 1 290px; min-width: 0; display: flex; flex-direction: column; gap: 16px; position: sticky; top: 80px; }
.question { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.question .q-text { font-size: 17px; line-height: 1.65; white-space: pre-line; }
.option { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.option:has(input:checked) { border-color: var(--accent); background: var(--accent-softer); }
.option input { width: 18px; height: 18px; margin-top: 3px; }
.save-state { font-size: 12px; color: var(--faint); }
.cam { aspect-ratio: 4 / 3; width: 100%; border-radius: 10px; background: #1E293B; object-fit: cover; transform: scaleX(-1); }
.rec { display: inline-block; background: var(--bad); color: #fff; font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 4px; }
.gate { position: fixed; inset: 0; background: rgba(15,23,42,.92); z-index: 50; display: flex; align-items: center; justify-content: center; padding: 20px; }
.gate .box { background: #fff; border-radius: 16px; padding: 28px; max-width: 520px; width: 100%; display: flex; flex-direction: column; gap: 16px; }
.gate[hidden] { display: none; }
.toast { position: fixed; left: 50%; top: 76px; transform: translateX(-50%); background: #7F1D1D; color: #fff; padding: 12px 18px; border-radius: 10px; font-weight: 600; z-index: 60; box-shadow: 0 10px 30px rgba(0,0,0,.25); max-width: 90vw; text-align: center; }
.toast[hidden] { display: none; }
.log { display: flex; flex-direction: column; gap: 6px; font-size: 13px; max-height: 260px; overflow: auto; }
.log div { display: flex; gap: 10px; } .log time { color: var(--faint); font-variant-numeric: tabular-nums; flex-shrink: 0; }
.progress-dots { display: flex; gap: 6px; flex-wrap: wrap; }
.progress-dots span { width: 32px; height: 8px; border-radius: 4px; background: #CBD5E1; }
.progress-dots span.done { background: var(--accent); }

/* Tekshiruv sahifasidagi media */
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.thumbs a { display: block; position: relative; }
.thumbs img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 8px; display: block; }
.thumbs .t { position: absolute; left: 6px; bottom: 6px; background: rgba(15,23,42,.75); color: #fff; font-size: 11px; padding: 2px 6px; border-radius: 4px; }
.videos { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.videos video { width: 100%; border-radius: 8px; background: #000; }

/* Sertifikat (veb) */
.cert { background: #fff; border-radius: 6px; padding: 14px; box-shadow: 0 1px 3px rgba(15,23,42,.08); }
.cert .b1 { border: 2px solid var(--brand); padding: 6px; }
.cert .b2 { border: 1px solid #93A3C4; padding: 34px 40px; display: flex; flex-direction: column; gap: 18px; text-align: center; }
.cert .title { font-family: Georgia, "Times New Roman", serif; font-size: 42px; font-weight: 700; letter-spacing: .08em; color: var(--brand); }
.cert .name { font-family: Georgia, "Times New Roman", serif; font-size: 28px; font-weight: 600; }

/* Sahifalash */
.pagination { display: flex; gap: 4px; list-style: none; padding: 0; margin: 0; flex-wrap: wrap; }
.pagination .page-link { display: block; padding: 8px 12px; border: 1px solid var(--line-2); border-radius: 8px; color: var(--ink); background: #fff; font-size: 13px; }
.pagination .active .page-link { background: var(--accent); color: #fff; border-color: var(--accent); }
.pagination .disabled .page-link { color: #94A3B8; }
nav[role="navigation"] p.small { display: none; }

@media (max-width: 700px) {
  .sidebar { max-width: none; flex-basis: 100%; flex-direction: row; flex-wrap: wrap; padding: 10px; }
  .sidebar .brand { padding: 4px 8px; width: 100%; }
  .sidebar .nav-group, .sidebar .who { display: none; }
  .content { padding: 18px 14px 40px; }
  .auth .hero { padding: 28px 22px; }
  .auth .hero h1 { font-size: 30px; }
  .exam-side { position: static; }
  .timer { font-size: 20px; }
  .cert .b2 { padding: 20px 16px; }
  .cert .title { font-size: 30px; }
}

/* ── Bir nechta rol: faol rol rangi va almashtirgich ───────── */
.sidebar.role-super_admin { background: #1E293B; }
.sidebar.role-teacher { background: #134E4A; }
.role-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--brand); }
.role-dot.role-super_admin { background: #1E293B; }
.role-dot.role-head { background: #0F2A5F; }
.role-dot.role-teacher { background: #0F766E; }
.role-switch > summary { background: var(--accent-softer); font-weight: 600; }
.role-menu { min-width: 290px; }
.role-menu form { margin: 0; }
.role-item { width: 100%; min-height: 52px; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 0; border-radius: 8px; background: none; font: inherit; color: var(--ink); cursor: pointer; }
.role-item:hover, .role-item:focus-visible { background: #F1F5F9; }
.role-item.active { background: var(--accent-softer); }
.role-item small { font-size: 12px; }
.role-option { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 12px 14px; border: 2px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; }
.role-option:has(input:checked) { border-color: var(--accent); background: var(--accent-softer); }
.role-option input { width: 20px; height: 20px; }
.role-option span { display: flex; flex-direction: column; }

/* Sinov rejimi — yuguruvchi qator */
.test-banner { position: relative; z-index: 10; overflow: hidden; white-space: nowrap; background: #FEF3C7; color: #92400E; border-bottom: 1px solid #FCD34D; font-size: 13px; font-weight: 600; line-height: 30px; height: 30px; }
.test-banner-track { display: inline-flex; gap: 120px; padding-left: 100%; animation: test-banner-run 28s linear infinite; }
.test-banner:hover .test-banner-track { animation-play-state: paused; }
@keyframes test-banner-run { from { transform: translateX(0); } to { transform: translateX(-100%); } }
@media (prefers-reduced-motion: reduce) {
    .test-banner { white-space: normal; height: auto; line-height: 1.4; padding: 6px 12px; text-align: center; }
    .test-banner-track { animation: none; padding-left: 0; }
    .test-banner-track span + span { display: none; }
}
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* Qidiruvli tanlash */
.combo { position: relative; display: inline-block; min-width: 220px; vertical-align: middle; }
.field .combo, .stack > .combo, .form-grid .combo { display: block; width: 100%; }
.combo-input { width: 100%; padding-right: 32px; background-image: linear-gradient(45deg, transparent 50%, #64748B 50%), linear-gradient(135deg, #64748B 50%, transparent 50%); background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.combo-native { position: absolute !important; left: 0; bottom: 0; width: 100% !important; height: 1px !important; opacity: 0; pointer-events: none; padding: 0 !important; border: 0 !important; }
.combo-list { position: absolute; z-index: 40; left: 0; right: 0; top: calc(100% + 4px); min-width: 100%; max-height: 280px; overflow-y: auto; margin: 0; padding: 4px; list-style: none; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 30px rgba(15,23,42,.14); }
.combo-item { padding: 8px 10px; border-radius: 7px; cursor: pointer; font-size: 14px; line-height: 1.35; }
.combo-item b { color: var(--accent); }
.combo-item.active { background: #EFF6FF; }
.combo-item.selected { font-weight: 600; }
.combo-empty { padding: 8px 10px; color: var(--muted); font-size: 14px; }

/* ── Telefon va planshet: moslashuvchan karkas ───────────── */
.nav-toggle, .nav-close, .topbar-brand, .nav-backdrop { display: none; }
.topbar-logout { display: none; margin: 0; }
.topbar-gap { flex: 1; }
@media (max-width: 1024px) {
  .shell { display: block; }
  .main { min-height: 100vh; }
  .topbar { position: sticky; top: 0; z-index: 30; padding: 8px 12px; gap: 8px; justify-content: flex-start; }
  .nav-toggle { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px; border: 0; border-radius: 10px; background: var(--brand); color: #fff; font: inherit; font-weight: 600; cursor: pointer; }
  .topbar-brand { display: inline-flex; }
  .topbar-brand img { width: 34px; height: 34px; border-radius: 50%; }
  .topbar-logout { display: inline-block; }
  /* Yon menyu — chapdan chiqib keladi */
  .sidebar { position: fixed; z-index: 70; top: 0; left: 0; bottom: 0; width: min(300px, 86vw); max-width: none; overflow-y: auto; transform: translateX(-105%); transition: transform .2s ease; box-shadow: 0 0 40px rgba(15,23,42,.35); padding-top: 14px; }
  .sidebar.open { transform: none; }
  .sidebar .nav-group, .sidebar .who { display: block; }
  .sidebar .who { margin-top: 18px; }
  .sidebar a.nav { padding: 13px 12px; font-size: 15px; }
  .nav-close { display: block; align-self: flex-end; width: 40px; height: 40px; border: 0; border-radius: 10px; background: rgba(255,255,255,.12); color: #fff; font-size: 18px; cursor: pointer; }
  .nav-backdrop { position: fixed; inset: 0; z-index: 60; background: rgba(15,23,42,.45); }
  .nav-backdrop:not([hidden]) { display: block; }
  body.nav-locked { overflow: hidden; }
}
@media (max-width: 700px) {
  /* Eski telefondagi “bir qatorga tiqilgan” menyu oʻrniga — yuqoridagi chiqib keladigan menyu */
  .sidebar { flex-direction: column; flex-wrap: nowrap; padding: 14px; }
  .sidebar .brand { width: auto; padding: 4px 8px 14px; }
  .topbar .nav-toggle span, .topbar-brand, .role-prefix { display: none; }
  .topbar { flex-wrap: nowrap; }
  .topbar-gap { flex: 1 1 0; min-width: 0; }
  .topbar .role-switch > summary, .topbar .lang-switch > summary { padding: 0 8px; gap: 4px; }
  .topbar-logout .btn { padding: 0 10px; }
  .topbar .lang-switch > summary { padding: 0 10px; }
  h1 { font-size: 22px; }
  .page-head { align-items: stretch; }
  .page-head > .btn, .page-head > a.btn, .page-head > .row { width: 100%; }
  .page-head > .row > .btn, .page-head > .row > a.btn { flex: 1 1 auto; }
  .card.row > .btn, form.row > .btn { flex: 1 1 auto; }
  .combo { min-width: 0; width: 100%; }
  .table { font-size: 13px; }
  .role-menu, .lang-menu { right: 0; left: auto; max-width: 92vw; }
  /* Talaba yuqori paneli */
  /* Jadval → kartochkalar (data-label bilan) */
  .table.cards-sm thead { display: none; }
  .table.cards-sm, .table.cards-sm tbody, .table.cards-sm tr, .table.cards-sm td { display: block; width: 100%; }
  .table.cards-sm tr { padding: 12px 16px; border-bottom: 1px solid var(--line); }
  .table.cards-sm td { border: 0; padding: 3px 0; }
  .table.cards-sm td[data-label]::before { content: attr(data-label); display: block; font-size: 12px; color: var(--muted); }
  .table.cards-sm form.row { flex-wrap: nowrap; }
  .table.cards-sm form.row .combo { flex: 1; }
  .table.cards-sm form.row > .btn { flex: none; }
  .studentbar { padding: 8px 12px; gap: 8px; }
  .studentbar .brand span { display: none; }
  .studentbar-who { display: none; }
  .studentbar-right { flex-wrap: nowrap; gap: 8px; }
  .studentbar nav { order: 3; width: 100%; flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .studentbar nav::-webkit-scrollbar { display: none; }
  .studentbar nav a { white-space: nowrap; flex: none; }
}
@media (pointer: coarse) {
  .btn.sm { height: 40px; }
  .lang-switch > summary { height: 42px; }
}

/* ═══════════ 2-avlod dizayn: “Liquid Glass” (2026-12 maket asosida) ═══════════ */
:root { --bg: #EEF2F8; --brand: #081633; --radius: 20px; --navy: #0A1A3F;
  --s1: #257de0; --s-e: #0f4a96; --s-g: #2370cd; --s-s: #84b9f3; --s-f: #ec4647; --s-r: #f2a600; --s-n: #E2E8F0; }
body { background: var(--bg); }
h1 { font-weight: 800; letter-spacing: -.02em; }
.card { border-color: #E3E8F1; box-shadow: 0 1px 2px rgba(15,23,42,.04), 0 12px 32px rgba(15,23,42,.05); }
.card-head { border-bottom-color: #EDF1F7; padding: 18px 22px; }
.table th { background: transparent; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.table td { border-top-color: #EDF1F7; }
.bar { height: 8px; border-radius: 4px; background: #EEF2F8; }
.bar > span { height: 8px; border-radius: 4px; background: var(--s1); }
.badge { padding: 4px 10px; }

/* Tugmalar: pill + shisha yorugʻligi */
.btn { border-radius: 999px; padding: 0 20px; font-weight: 600; transition: filter .2s, transform .15s, background .2s;
  background: linear-gradient(180deg, #4F8FF7, #1D4ED8); border-color: rgba(255,255,255,.35);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.45), inset 0 -1px 1px rgba(255,255,255,.12), 0 6px 16px rgba(29,78,216,.25); }
.btn:hover { background: linear-gradient(180deg, #5B9AFA, #1E4FE0); filter: brightness(1.04); }
.btn:active { transform: scale(.97); }
.btn.secondary { background: rgba(255,255,255,.75); color: var(--ink); border-color: #fff; font-weight: 600;
  -webkit-backdrop-filter: blur(20px) saturate(160%); backdrop-filter: blur(20px) saturate(160%);
  box-shadow: inset 0 1px 0 #fff, 0 1px 2px rgba(15,23,42,.08), 0 6px 18px rgba(15,23,42,.08); }
.btn.secondary:hover { background: #fff; }
.btn.success { background: linear-gradient(180deg, #34D399, #059669); box-shadow: inset 0 1px 0 rgba(255,255,255,.45), 0 6px 16px rgba(5,150,105,.25); }
.btn.success:hover { background: linear-gradient(180deg, #3EE0A6, #047857); }
.btn.danger { background: rgba(255,255,255,.75); color: var(--bad); border-color: #FECACA; box-shadow: inset 0 1px 0 #fff, 0 4px 12px rgba(185,28,28,.08); }
.btn.danger:hover { background: var(--bad-soft); }
.btn[disabled], .btn.disabled { background: #E2E8F0; color: #64748B; box-shadow: none; transform: none; filter: none; }
.input, select.input, textarea.input { border-radius: 12px; }

/* Shisha qatlam (toʻq fon ustida) */
.glass { background: rgba(255,255,255,.13); -webkit-backdrop-filter: blur(24px) saturate(180%); backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255,255,255,.32); box-shadow: inset 0 1px 0 rgba(255,255,255,.55), inset 0 -1px 1px rgba(255,255,255,.12), 0 12px 32px rgba(3,10,40,.28); }
.hero .btn, .btn.glass { color: #fff; background: rgba(255,255,255,.13); border: 1px solid rgba(255,255,255,.32);
  -webkit-backdrop-filter: blur(24px) saturate(180%); backdrop-filter: blur(24px) saturate(180%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55), inset 0 -1px 1px rgba(255,255,255,.12), 0 10px 28px rgba(3,10,40,.3); }
.hero .btn:hover { background: rgba(255,255,255,.24); color: #fff; }
.hero .btn.tint { background: linear-gradient(180deg, rgba(96,165,250,.85), rgba(29,78,216,.85)); }
.hero .btn.success { background: linear-gradient(180deg, rgba(52,211,153,.9), rgba(5,150,105,.9)); }

/* Sahifa boshidagi toʻq “hero” band */
.hero { position: relative; overflow: hidden; isolation: isolate; background: var(--navy); color: #fff; border-radius: 28px; padding: 28px 28px 30px; display: flex; flex-direction: column; gap: 26px; }
.hero::before, .hero::after { content: ""; position: absolute; z-index: -1; border-radius: 50%; pointer-events: none; }
.hero::before { width: 520px; height: 520px; background: #2563EB; filter: blur(120px); opacity: .55; top: -280px; right: -80px; }
.hero::after { width: 380px; height: 380px; background: #00B894; filter: blur(130px); opacity: .28; bottom: -250px; left: 100px; }
.hero.violet::before { background: #6a4ce2; opacity: .45; right: auto; left: 30%; }
.hero .sub { font-size: 13px; color: #A5B4FC; letter-spacing: .04em; text-transform: uppercase; font-weight: 600; margin-bottom: 6px; }
.hero h1 { font-size: 36px; color: #fff; }
.hero .page-head { align-items: flex-end; }
.hero select.input { background: rgba(255,255,255,.13); color: #fff; border-color: rgba(255,255,255,.32); border-radius: 999px; height: 42px; }
.hero select.input option { color: var(--ink); }
.hero a:not(.btn) { color: #BFDBFE; }
.hero .kpi .card { background: rgba(255,255,255,.13); border: 1px solid rgba(255,255,255,.32); color: #fff; border-radius: 22px;
  -webkit-backdrop-filter: blur(24px) saturate(180%); backdrop-filter: blur(24px) saturate(180%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55), inset 0 -1px 1px rgba(255,255,255,.12), 0 12px 32px rgba(3,10,40,.28); }
.hero .kpi .label { color: #C7D2FE; } .hero .kpi .hint { color: #A5B4FC; font-size: 12px; }
.hero .kpi .value { font-size: 34px; font-weight: 800; }
.hero .kpi .value small { font-size: 16px; color: #A5B4FC; font-weight: 600; }
.hero .up { color: #6EE7B7 !important; } .hero .amber { color: #FCD34D !important; } .hero .rose { color: #FCA5A5 !important; }
@media (max-width: 700px) { .hero { border-radius: 22px; padding: 20px 16px; } .hero h1 { font-size: 26px; } }

/* ── Diagrammalar ─────────────────────── */
.chart-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px; }
.chart-sub { font-size: 13px; color: var(--faint); }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.sw { width: 12px; height: 12px; border-radius: 4px; display: inline-block; flex: none; }
/* Chiziqli/maydonli grafik (SVG) — nuqta ustiga kelganda izoh */
.area svg { width: 100%; height: auto; display: block; overflow: visible; }
.area .pt .tip, .area .pt .dot, .area .pt .cross { opacity: 0; transition: opacity .12s; }
.area .pt:hover .tip, .area .pt:hover .dot, .area .pt:hover .cross, .area .pt:focus .tip, .area .pt:focus .dot, .area .pt:focus .cross { opacity: 1; }
.area .pt:focus { outline: none; }
.area text { font-family: inherit; }
/* Segmentli chiziq (100%) */
.seg { display: flex; gap: 2px; height: 40px; border-radius: 10px; overflow: hidden; }
.seg > span { min-width: 2px; }
.dist-row { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.dist-row .n { font-weight: 700; } .dist-row .p { color: var(--faint); width: 44px; text-align: right; }
/* Gorizontal reyting chiziqlari */
.hbars { display: flex; flex-direction: column; gap: 14px; }
.hbar { display: grid; grid-template-columns: minmax(90px, 34%) 1fr 48px; gap: 12px; align-items: center; font-size: 14px; }
.hbar .track { height: 12px; background: #EEF2F8; border-radius: 6px; }
.hbar .track > span { display: block; height: 12px; border-radius: 6px; background: var(--s1); }
.hbar .name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar b { text-align: right; }
/* Issiqlik xaritasi */
.heat { display: grid; grid-template-columns: 28px repeat(8, minmax(0, 1fr)); gap: 4px; font-size: 11px; color: var(--faint); }
.heat .c { height: 30px; border-radius: 6px; }
.heat .d { display: flex; align-items: center; font-weight: 600; color: var(--muted); }
.heat .c.l0 { background: #F4F7FB; } .heat .c.l1 { background: #cce3fd; } .heat .c.l2 { background: #84b9f3; }
.heat .c.l3 { background: #338ced; } .heat .c.l4 { background: #1b64be; } .heat .c.l5 { background: #0e3d7e; }
.heat-scale { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--faint); }
.heat-scale i { width: 20px; height: 10px; border-radius: 3px; display: inline-block; }
/* Ustunli grafik (HTML) */
.cols { position: relative; height: 240px; display: flex; align-items: flex-end; gap: 12px; padding-left: 36px; border-bottom: 1px solid var(--line-2); }
.cols .grid-l { position: absolute; left: 0; right: 0; top: 0; height: 100%; display: flex; flex-direction: column; justify-content: space-between; font-size: 11px; color: var(--faint); pointer-events: none; }
.cols .grid-l div { border-top: 1px solid #EDF1F7; line-height: 1; padding-top: 2px; }
.cols .thr { position: absolute; left: 36px; right: 0; border-top: 2px dashed var(--s-f); pointer-events: none; }
.cols .thr span { position: absolute; right: 0; top: -22px; font-size: 12px; font-weight: 600; color: #B91C1C; background: #fff; padding: 0 4px; }
.cols .col { position: relative; flex: 1; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; min-width: 0; }
.cols .col b { font-size: 12px; color: #334155; margin-bottom: 4px; }
.cols .col i { display: block; width: 100%; max-width: 44px; border-radius: 8px 8px 0 0; background: var(--s1); }
.cols .col.low i { background: var(--s-f); } .cols .col.none i { background: var(--s-n); }
.cols-x { display: flex; gap: 12px; padding-left: 36px; margin-top: 8px; font-size: 12px; color: var(--faint); }
.cols-x span { flex: 1; text-align: center; min-width: 0; }
/* Halqa (foiz) */
.ring { display: block; margin: 0 auto; }
.ring text { font-family: inherit; }
.mini-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; text-align: center; font-size: 12px; color: var(--faint); }
.mini-stats div { background: #F4F7FB; border-radius: 14px; padding: 10px 4px; }
.mini-stats b { display: block; font-size: 20px; color: var(--ink); }
/* Vazifa holati kataklari */
.dots { display: flex; gap: 3px; flex-wrap: nowrap; }
.dots span { width: 15px; height: 15px; border-radius: 5px; background: var(--s-n); flex: none; }
.dots .g { background: var(--s-g); } .dots .r { background: var(--s-r); } .dots .f { background: var(--s-f); }
.avatar { width: 36px; height: 36px; border-radius: 50%; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; flex: none; }
.sample-note { font-size: 12px; color: var(--faint); }

/* Yon menyu: chuqur toʻq koʻk va shisha faol band */
.sidebar { background: var(--brand); }
.sidebar a.nav { border-radius: 14px; min-height: 44px; }
.sidebar a.nav.active { background: rgba(255,255,255,.13); border: 1px solid rgba(255,255,255,.22); box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 6px 18px rgba(0,0,0,.25); }
.sidebar.role-super_admin { background: #111827; }
.sidebar.role-teacher { background: #0B2E2C; }

/* Talaba: pastki suzuvchi shisha menyu (telefonda) */
.tabbar { display: none; }
@media (max-width: 700px) {
  .tabbar { display: flex; position: fixed; z-index: 40; left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); gap: 4px; padding: 6px; border-radius: 999px;
    background: rgba(255,255,255,.72); -webkit-backdrop-filter: blur(24px) saturate(180%); backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(255,255,255,.95); box-shadow: inset 0 1px 0 #fff, 0 10px 30px rgba(15,23,42,.18); }
  .tabbar a { flex: 1; min-height: 50px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border-radius: 999px; font-size: 11px; font-weight: 600; color: #475569; }
  .tabbar a.active { background: rgba(29,78,216,.12); color: #1D4ED8; }
  .tabbar svg { width: 22px; height: 22px; }
  body.has-tabbar .content { padding-bottom: 110px; }
  body.has-tabbar .studentbar nav { display: none; }
}
@media (prefers-reduced-motion: reduce) { .btn, .area .pt * { transition: none; } .btn:active { transform: none; } }
.grid > .span-2 { grid-column: span 2; }
@media (max-width: 1100px) { .grid > .span-2 { grid-column: auto; } }
@media (max-width: 700px) {
  .hero .kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .hero .kpi .card { padding: 14px; border-radius: 18px; }
  .hero .kpi .value { font-size: 26px; }
  .cols { gap: 4px; padding-left: 28px; } .cols-x { gap: 4px; padding-left: 28px; font-size: 10px; }
  .cols .col b { display: none; }
  .cols .thr span { font-size: 11px; }
}
@media (max-width: 700px) { .hero .kpi .card:last-child:nth-child(odd) { grid-column: span 2; } }

/* ── Chap menyu (2-avlod): shisha logo, ikonkalar, rol rangidagi yorugʻlik ── */
.sidebar { --glow: rgba(37,99,235,.38); --glow2: rgba(0,184,148,.16); padding: 22px 14px 18px; gap: 3px; isolation: isolate;
  background: radial-gradient(420px 320px at -10% -5%, var(--glow), transparent 65%), radial-gradient(360px 300px at 110% 105%, var(--glow2), transparent 60%), linear-gradient(180deg, #0A1A3F, #081633); }
.sidebar.role-super_admin { --glow: rgba(124,92,255,.42); --glow2: rgba(37,99,235,.18); background-color: #120E2E;
  background-image: radial-gradient(420px 320px at -10% -5%, var(--glow), transparent 65%), radial-gradient(360px 300px at 110% 105%, var(--glow2), transparent 60%), linear-gradient(180deg, #17123A, #0E0B24); }
.sidebar.role-teacher { --glow: rgba(0,184,148,.36); --glow2: rgba(37,99,235,.16);
  background-image: radial-gradient(420px 320px at -10% -5%, var(--glow), transparent 65%), radial-gradient(360px 300px at 110% 105%, var(--glow2), transparent 60%), linear-gradient(180deg, #08302E, #061F22); }
.sidebar .brand { padding: 2px 6px 20px; gap: 12px; }
.sidebar .brand small { display: flex; align-items: center; gap: 6px; margin-top: 2px; }
.logo-tile { width: 46px; height: 46px; border-radius: 15px; display: inline-flex; align-items: center; justify-content: center; flex: none;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.3); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 8px 22px rgba(0,0,0,.3); }
.sidebar .brand .logo-tile img { width: 36px; height: 36px; }
.sidebar .brand .role-dot { width: 8px; height: 8px; box-shadow: 0 0 0 2px rgba(255,255,255,.35); }
.role-dot.role-super_admin { background: #A78BFA; } .role-dot.role-head { background: #60A5FA; } .role-dot.role-teacher { background: #34D399; }
.sidebar .nav-group { padding: 16px 12px 6px; color: #8FA0D8; font-weight: 600; }
.sidebar a.nav { justify-content: flex-start; gap: 12px; padding: 0 12px; min-height: 44px; color: #C7D2FE; border: 1px solid transparent; transition: background .15s, color .15s; }
.sidebar a.nav > span:not(.pill-count) { flex: 1; min-width: 0; }
.sidebar a.nav .ico { flex: none; opacity: .8; }
.sidebar a.nav:hover { background: rgba(255,255,255,.08); color: #fff; }
.sidebar a.nav:hover .ico, .sidebar a.nav.active .ico { opacity: 1; }
.sidebar a.nav.active { color: #fff; background: rgba(255,255,255,.13); border-color: rgba(255,255,255,.24);
  -webkit-backdrop-filter: blur(20px) saturate(160%); backdrop-filter: blur(20px) saturate(160%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 8px 22px rgba(0,0,0,.28); }
.sidebar .who { padding: 16px 6px 0; border-top-color: rgba(255,255,255,.12); display: flex; flex-direction: column; gap: 12px; }
.who-row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.who-row .avatar { background: linear-gradient(180deg, #60A5FA, #1D4ED8); box-shadow: inset 0 1px 0 rgba(255,255,255,.4); }
.sidebar.role-super_admin .who-row .avatar { background: linear-gradient(180deg, #A78BFA, #6D28D9); }
.sidebar.role-teacher .who-row .avatar { background: linear-gradient(180deg, #34D399, #047857); }
.who-name { color: #fff; font-weight: 600; font-size: 13px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who-name small { display: block; color: #93A4D8; font-weight: 400; font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
.who-links { display: flex; flex-wrap: wrap; gap: 6px; }
.who-links a, .who-links button { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 10px; border-radius: 999px; font: 500 12px inherit; font-family: inherit;
  color: #DCE3FF; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); cursor: pointer; }
.who-links a:hover, .who-links button:hover { background: rgba(255,255,255,.16); color: #fff; }
.topbar { background: rgba(255,255,255,.72); -webkit-backdrop-filter: blur(20px) saturate(160%); backdrop-filter: blur(20px) saturate(160%); border-bottom-color: rgba(226,232,240,.8); }
@media (max-width: 1024px) { .nav-toggle { border-radius: 999px; background: linear-gradient(180deg, #1E3A8A, #0A1A3F); box-shadow: inset 0 1px 0 rgba(255,255,255,.3); } }
.mini-tile { background: #F4F7FB; border-radius: 16px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; font-size: 12px; color: var(--faint); min-width: 0; }
.mini-tile b { font-size: 22px; color: var(--ink); font-weight: 800; } .mini-tile b.bad { color: var(--bad); }
.meter { display: block; height: 10px; border-radius: 5px; background: #EEF2F8; overflow: hidden; }
.meter > span { display: block; height: 100%; border-radius: 5px; background: var(--s1); }
.meter > span.hot { background: var(--s-f); }
.hero .btn .ico { opacity: .9; }

/* ── Kirish sahifasi (2-avlod) ─────────── */
.auth2 { position: relative; isolation: isolate; overflow: hidden; min-height: calc(100vh - 30px); background: linear-gradient(160deg, #0A1A3F, #081633 60%, #0B1230);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 48px 64px; padding: 48px clamp(18px, 5vw, 80px); color: #fff; }
.auth2::before, .auth2::after, .auth2 .blob { content: ""; position: absolute; z-index: -1; border-radius: 50%; pointer-events: none; }
.auth2::before { width: 640px; height: 640px; background: #2563EB; filter: blur(140px); opacity: .55; top: -260px; right: 10%; }
.auth2::after { width: 520px; height: 520px; background: #00B894; filter: blur(150px); opacity: .28; bottom: -260px; left: -120px; }
.auth2 .blob.b3 { width: 420px; height: 420px; background: #7C5CFF; filter: blur(140px); opacity: .32; top: 40%; left: 35%; }
.auth2 .intro { flex: 1 1 440px; max-width: 620px; display: flex; flex-direction: column; gap: 32px; }
.auth2 .logo { display: flex; align-items: center; gap: 14px; }
.logo-tile.lg { width: 64px; height: 64px; border-radius: 20px; }
.logo-tile.lg img { width: 52px; height: 52px; border-radius: 50%; }
.auth2 .kicker { font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #A5B4FC; }
.auth2 h1 { font-size: clamp(32px, 4.2vw, 52px); line-height: 1.05; color: #fff; }
.auth2 .intro p { color: #DCE3FF; font-size: 17px; line-height: 1.6; }
.auth2 .features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.auth2 .feature { border-radius: 20px; padding: 16px; display: flex; flex-direction: column; gap: 4px; }
.auth2 .feature b { font-size: 15px; } .auth2 .feature > span:last-child { font-size: 13px; color: #C7D2FE; }
.auth2 .f-ico { width: 38px; height: 38px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 6px;
  background: rgba(255,255,255,.16); box-shadow: inset 0 1px 0 rgba(255,255,255,.4); color: #fff; }
.auth2 .copy { color: #8FA0D8; }
.login-card { flex: 0 1 440px; width: 100%; color: var(--ink); border-radius: 32px; padding: 34px; display: flex; flex-direction: column; gap: 20px;
  background: rgba(255,255,255,.9); -webkit-backdrop-filter: blur(28px) saturate(180%); backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid rgba(255,255,255,.95); box-shadow: inset 0 1px 0 #fff, 0 30px 80px rgba(0,0,0,.35); }
.login-card h2 { font-size: 28px; font-weight: 800; letter-spacing: -.02em; }
.login-card .input { height: 52px; border-radius: 14px; background: rgba(255,255,255,.95); }
.login-card a:not(.btn) { color: var(--accent); }
@media (max-width: 700px) {
  .auth2 { padding: 24px 14px 32px; gap: 24px; align-items: stretch; }
  .auth2 .intro { gap: 18px; } .auth2 .intro > .stack p, .auth2 .copy { display: none; }
  .auth2 .features { gap: 8px; } .auth2 .feature { padding: 12px; border-radius: 16px; } .auth2 .f-ico { display: none; }
  .login-card { padding: 22px 18px; border-radius: 26px; order: -1; }
  .auth2 .intro { order: 0; }
}

/* ── Tepadagi panel har doim yuqori qatlamda: rol/til menyusi hero ostida qolmasin ── */
.topbar { position: relative; z-index: 40; }
@media (max-width: 1024px) { .topbar { position: sticky; top: 0; z-index: 40; } }

/* ── Chap menyu: asosiy ekran fonidek och shisha (3-avlod) ── */
.sidebar, .sidebar.role-super_admin, .sidebar.role-teacher, .sidebar.role-head {
  background-color: var(--bg); color: var(--ink);
  background-image: radial-gradient(380px 300px at -20% -10%, var(--glow), transparent 65%), radial-gradient(340px 280px at 120% 108%, var(--glow2), transparent 60%), linear-gradient(180deg, rgba(255,255,255,.75), rgba(255,255,255,.45));
  border-right: 1px solid rgba(203,213,225,.7); box-shadow: 1px 0 0 rgba(255,255,255,.9) inset; }
.sidebar { --glow: rgba(37,99,235,.12); --glow2: rgba(0,184,148,.08); }
.sidebar.role-super_admin { --glow: rgba(124,92,255,.14); --glow2: rgba(37,99,235,.08); }
.sidebar.role-teacher { --glow: rgba(0,184,148,.13); --glow2: rgba(37,99,235,.07); }
.sidebar .brand { color: var(--ink); }
.sidebar .brand small { color: var(--faint); }
.sidebar .brand .role-dot { box-shadow: 0 0 0 2px #fff; }
.logo-tile { background: rgba(255,255,255,.8); border-color: rgba(203,213,225,.9); box-shadow: inset 0 1px 0 #fff, 0 6px 16px rgba(15,23,42,.08); }
.sidebar .nav-group { color: var(--faint); }
.sidebar a.nav { color: #334155; }
.sidebar a.nav .ico { opacity: .7; }
.sidebar a.nav:hover { background: rgba(255,255,255,.7); color: var(--ink); }
.sidebar a.nav.active { color: var(--accent); background: rgba(255,255,255,.92); border-color: rgba(255,255,255,1);
  box-shadow: inset 0 1px 0 #fff, 0 6px 18px rgba(15,23,42,.08), 0 0 0 1px rgba(203,213,225,.6); }
.sidebar.role-super_admin a.nav.active { color: #6D28D9; }
.sidebar.role-teacher a.nav.active { color: #047857; }
.sidebar .who { border-top-color: rgba(203,213,225,.8); }
.who-name { color: var(--ink); }
.who-name small, .sidebar .who small { color: var(--faint); }
.who-links a, .who-links button { color: #334155; background: rgba(255,255,255,.75); border-color: rgba(203,213,225,.9); }
.who-links a:hover, .who-links button:hover { background: #fff; color: var(--ink); }
.sidebar .nav-close { color: var(--ink); background: rgba(15,23,42,.06); }
.group-row { border-bottom: 1px solid var(--line); }
.group-row > summary { list-style: none; cursor: pointer; padding: 8px 0; gap: 8px; }
.group-row > summary::-webkit-details-marker { display: none; }
.group-row > summary .link { color: var(--accent); font-weight: 600; }
.group-row[open] > summary .link { color: var(--faint); }

/* ── Talaba: semestr tugmalari va oʻzlashtirish jadvali ── */
.term-tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.term-tabs::-webkit-scrollbar { display: none; }
.term-tabs a { flex: none; display: flex; flex-direction: column; gap: 0; padding: 8px 16px; border-radius: 16px; color: #DCE3FF; font-weight: 700; font-size: 14px;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16); }
.term-tabs a small { font-weight: 500; font-size: 11px; color: #A5B4FC; }
.term-tabs a:hover { background: rgba(255,255,255,.14); color: #fff; }
.term-tabs a.active { color: #0A1A3F; background: rgba(255,255,255,.92); border-color: #fff; box-shadow: inset 0 1px 0 #fff, 0 8px 20px rgba(0,0,0,.25); }
.term-tabs a.active small { color: var(--faint); }
tr.row-current > td { background: var(--accent-softer); }

/* ── Monitoring filtrlari: bitta qatorda, shisha panel ── */
.filter-bar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; padding: 14px 16px; margin-bottom: 16px; border-radius: 22px;
  background: rgba(255,255,255,.75); border: 1px solid rgba(255,255,255,.95); -webkit-backdrop-filter: blur(20px) saturate(160%); backdrop-filter: blur(20px) saturate(160%);
  box-shadow: inset 0 1px 0 #fff, 0 6px 20px rgba(15,23,42,.06), 0 0 0 1px rgba(203,213,225,.5); }
.filter-grid { flex: 1 1 600px; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.filter-bar .f { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.filter-bar .f > span { font-size: 12px; font-weight: 600; color: var(--faint); }
.filter-bar .input { height: 40px; padding: 0 10px; font-size: 14px; border-radius: 12px; }
.filter-bar .combo .input { height: 40px; }
@media (max-width: 700px) { .filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .filter-bar { padding: 12px; } }
.section-title { font-size: 18px; font-weight: 700; margin: 8px 0 -4px; color: var(--ink); }
.table.wrap-head th { white-space: normal; vertical-align: bottom; }

/* ── Roʻyxatdan oʻtish: 3 qadam, har biri bitta ekranga sigʻadi ── */
.register-wrap { padding-top: 18px; padding-bottom: 24px; gap: 14px; }
.reg-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.reg-head h1 { font-size: clamp(22px, 2.4vw, 30px); margin: 0 0 4px; }
.reg-head p { margin: 0; }
.reg-steps { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; flex-wrap: wrap; }
.reg-steps li { display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--muted, #64748B); background: rgba(255,255,255,.6); border: 1px solid var(--line, #E2E8F0); }
.reg-steps li span { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: #E2E8F0; color: #475569; font-size: 12px; }
.reg-steps li.is-active { color: var(--accent, #2563EB); border-color: currentColor; background: #fff; }
.reg-steps li.is-active span, .reg-steps li.is-done span { background: var(--accent, #2563EB); color: #fff; }
.reg-form { display: flex; flex-direction: column; gap: 14px; }
.reg-form .card { gap: 14px; }
.reg-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 16px; }
.reg-grid .field { gap: 4px; }
.reg-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--line, #E2E8F0); padding-top: 14px; }
.reg-nav [data-next], .reg-nav #register-submit { margin-left: auto; }
.reg-form .check { padding: 10px 12px; border-radius: 12px; background: rgba(248,250,252,.8); border: 1px solid var(--line, #E2E8F0); }
.reg-wizard .reg-step:not(.is-current) { display: none; }
@media (max-width: 860px) { .reg-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .reg-grid { grid-template-columns: 1fr; } .reg-head { align-items: flex-start; } }
.reg-form .face-box { padding: 10px 12px; gap: 14px; }
.reg-form .face-box video, .reg-form .face-box img { width: 128px; height: 96px; }
.reg-form .card > h2 { margin: 0; }
.reg-form .reg-step[data-step="3"] { gap: 10px; }
.reg-form .check { padding: 8px 12px; }
