/* ==========================================================================
   MRB Chinese — dizayn tizimi
   Brend: qizil #D31524, to'q ko'k #0E1B3D, och ko'k #CBD5E8 / #EEF2FA (logotip va slaydlardan).
   Aksent: nafis oltin #C9A44C. Sarlavhalar Georgia, xitoycha matn Microsoft YaHei.
   ========================================================================== */
:root {
  --brand: #d31524;
  --brand-600: #b8121f;
  --brand-700: #990f1a;
  --bordo: #7a0e1e;
  --brand-soft: #fdecee;
  --navy: #0e1b3d;
  --navy-2: #1b2a55;
  --navy-soft: #e8edf7;
  --gold: #c9a44c;
  --gold-600: #a9852f;
  --gold-soft: #f7f0dc;
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-2: #f0f3f9;
  --line: #e2e8f2;
  --line-strong: #cbd5e8;
  --text: #0e1b3d;
  --text-2: #3a4560;
  --muted: #5b6477;
  --green: #18804a;
  --green-soft: #e2f4ea;
  --orange: #b25d00;
  --orange-soft: #fdf0de;
  --red: var(--brand);
  --red-soft: var(--brand-soft);
  --blue-soft: var(--navy-soft);
  --on-navy: #ffffff;
  --shadow-sm: 0 1px 2px rgba(14, 27, 61, .05);
  --shadow: 0 1px 2px rgba(14, 27, 61, .04), 0 8px 24px rgba(14, 27, 61, .06);
  --shadow-lg: 0 12px 40px rgba(14, 27, 61, .14);
  --radius: 14px;
  --radius-sm: 10px;
  --sidebar: 264px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  /* Xitoycha "回" naqshi (huiwen) — bezak uchun, oltin rangda */
  --fret: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Cpath d='M2 26V2h24v20H6V6h16v12H10v-8h8v4' fill='none' stroke='%23c9a44c' stroke-width='1.4'/%3E%3C/svg%3E");
  --tabbar-h: 62px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --brand: #ef3a48;
    --brand-600: #e02434;
    --brand-700: #c81828;
    --brand-soft: #3a1622;
    --navy: #050d22;
    --navy-2: #13224a;
    --navy-soft: #16264d;
    --gold: #d9b862;
    --gold-600: #e6c877;
    --gold-soft: #33290f;
    --bg: #07112a;
    --surface: #0e1b3d;
    --surface-2: #13234a;
    --line: #22325c;
    --line-strong: #2e4170;
    --text: #eef2fa;
    --text-2: #c9d2e6;
    --muted: #a3aec6;
    --green: #4cc27e;
    --green-soft: #11301f;
    --orange: #f0a040;
    --orange-soft: #3a2a14;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .3);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, .5);
    color-scheme: dark;
  }
}

/* ---------- asos ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15.5px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Microsoft YaHei", "Noto Sans SC", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; font-family: Georgia, "Times New Roman", "Microsoft YaHei", serif; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.22rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 .8em; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.tiny { font-size: .78rem; }
.zh { font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", sans-serif; }
.num { font-variant-numeric: tabular-nums; }
.ic { flex: none; vertical-align: -3px; }
::selection { background: var(--gold-soft); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- ochiq sahifalar sarlavhasi ---------- */
.top { position: sticky; top: 0; z-index: 20; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.top::after { content: ""; display: block; height: 3px; background: linear-gradient(90deg, var(--brand), var(--bordo) 60%, var(--gold)); }
.top-inner { max-width: 1160px; margin: 0 auto; padding: 8px 20px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); }
.brand:hover { text-decoration: none; }
/* Logotip oq fonda chizilgan: tungi rejimda ham oq "plashka" ichida turadi, proporsiyasi saqlanadi. */
.logo { height: 52px; width: auto; display: block; background: #fff; border-radius: 10px; padding: 3px 6px; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; margin-left: auto; align-items: center; }
.nav a { color: var(--text-2); padding: 8px 12px; border-radius: 10px; font-size: .95rem; font-weight: 500; display: inline-flex; gap: 6px; align-items: center; transition: background .2s, color .2s; }
.nav a:hover, .nav a.on { background: var(--brand-soft); color: var(--brand); text-decoration: none; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 26px 20px 60px; }

/* ---------- ilova (kirgandan keyin): yon menyu + asosiy qism ---------- */
.app { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--surface);
  border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 18px 14px; z-index: 40;
}
.sidebar .brand { padding: 4px 6px 14px; border-bottom: 1px solid var(--line); margin-bottom: 10px; justify-content: center; }
.sidebar .logo { height: 64px; }
.nav-section { font-size: .72rem; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); font-weight: 700; padding: 14px 12px 6px; }
.nav-item {
  display: flex; align-items: center; gap: 11px; padding: 9px 12px; margin: 1px 0; border-radius: 10px;
  color: var(--text-2); font-weight: 500; position: relative; transition: background .18s var(--ease), color .18s;
}
.nav-item:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.nav-item.on { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.nav-item.on::before { content: ""; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--brand); }
.nav-item .count { margin-left: auto; background: var(--brand); color: #fff; font-size: .72rem; font-weight: 700; padding: 1px 7px; border-radius: 99px; }
.sidebar-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; }
.avatar {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: linear-gradient(135deg, var(--brand), var(--bordo)); color: #fff; font-weight: 700; font-size: .95rem;
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--gold);
}
.avatar.lg { width: 64px; height: 64px; font-size: 1.4rem; }
.user-chip b { display: block; font-size: .92rem; line-height: 1.2; }
.user-chip span { font-size: .78rem; color: var(--muted); }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30; display: none; align-items: center; gap: 12px;
  padding: 8px 16px; background: var(--surface); border-bottom: 1px solid var(--line);
}
.topbar .logo { height: 42px; }
.content { padding: 28px 32px 60px; max-width: 1240px; width: 100%; animation: rise .35s var(--ease) both; }
.nav-toggle { display: none; }
.icon-btn {
  width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface);
  color: var(--text); display: inline-grid; place-items: center; cursor: pointer;
}
.scrim { display: none; }
/* Faqat yengil siljish: shaffoflik ishlatilmaydi, sekin qurilmada sahifa xira ko'rinmasin. */
@keyframes rise { from { transform: translateY(6px); } to { transform: none; } }

/* ---------- sahifa sarlavhasi ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head h1 { margin: 0; display: flex; align-items: center; gap: 10px; }
.page-head p { margin: 4px 0 0; color: var(--muted); }
.eyebrow { font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--gold-600); }
.back { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; margin-bottom: 8px; }

/* ---------- kartalar va to'rlar ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 20px;
}
.card.flat { box-shadow: none; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.card-head h2, .card-head h3 { margin: 0; display: flex; align-items: center; gap: 8px; }
.grid { display: grid; gap: 16px; }
.grid > * { min-width: 0; }            /* katta rasm yoki jadval ustunni ekrandan kengaytirib yubormasin */
.g2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.g4 { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.g3x { grid-template-columns: repeat(3, 1fr); }
.split { grid-template-columns: 2fr 1fr; }
@media (max-width: 1100px) { .split { grid-template-columns: 1fr; } }
@media (max-width: 900px) { .g3x { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .g3x { grid-template-columns: 1fr; } }
.stack > * + * { margin-top: 14px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.mt { margin-top: 16px; }
.mt-lg { margin-top: 28px; }

/* KPI (statistika kartalari) */
.kpi { display: flex; gap: 14px; align-items: flex-start; padding: 18px; transition: transform .2s var(--ease), box-shadow .2s; }
.kpi:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.kpi-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; flex: none; background: var(--brand-soft); color: var(--brand); }
.kpi-icon.navy { background: var(--navy-soft); color: var(--navy); }
.kpi-icon.gold { background: var(--gold-soft); color: var(--gold-600); }
.kpi-icon.green { background: var(--green-soft); color: var(--green); }
@media (prefers-color-scheme: dark) { .kpi-icon.navy { color: var(--text); } }
.kpi > div:last-child { min-width: 0; }
.kpi b { display: block; font-size: clamp(1.1rem, 1.6vw, 1.4rem); line-height: 1.25; font-variant-numeric: tabular-nums; white-space: nowrap; }
.kpi span { color: var(--muted); font-size: .85rem; }
a.kpi { color: var(--text); }
a.kpi:hover { text-decoration: none; }
/* eski "stat" kartalari ham shu uslubda */
.stat { text-align: center; padding: 16px 12px; }
.stat b { display: block; font-size: 1.5rem; line-height: 1.25; font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: .85rem; }

/* ---------- tugmalar ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: 11px; border: 1px solid transparent;
  background: var(--brand); color: #fff; font: inherit; font-weight: 600; cursor: pointer;
  text-decoration: none; min-height: 44px; line-height: 1.2; white-space: nowrap;
  box-shadow: 0 1px 0 rgba(255,255,255,.15) inset, 0 4px 12px rgba(211, 21, 36, .22);
  transition: background .18s, transform .18s var(--ease), box-shadow .18s;
}
.btn:hover { background: var(--brand-600); text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: none; }
.btn.ghost { background: var(--surface); color: var(--text); border-color: var(--line-strong); box-shadow: none; }
.btn.ghost:hover { background: var(--surface-2); border-color: var(--brand); color: var(--brand); }
.btn.navy { background: var(--navy); color: var(--on-navy); box-shadow: 0 4px 12px rgba(14, 27, 61, .25); }
.btn.navy:hover { background: var(--navy-2); }
.btn.gold { background: linear-gradient(135deg, #d8b75e, var(--gold-600)); color: #1f1606; box-shadow: 0 4px 12px rgba(169, 133, 47, .3); }
.btn.gold:hover { filter: brightness(1.05); }
.btn.danger { background: var(--surface); color: var(--brand); border-color: var(--brand); box-shadow: none; }
.btn.danger:hover { background: var(--brand-soft); }
.btn.small { padding: 6px 12px; min-height: 34px; font-size: .88rem; border-radius: 9px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }

/* ---------- formalar ---------- */
label { display: block; font-weight: 600; margin: 14px 0 6px; font-size: .92rem; color: var(--text-2); }
input, select, textarea {
  width: 100%; padding: 11px 13px; border-radius: 11px; border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--text); font: inherit; min-height: 44px;
  transition: border-color .18s, box-shadow .18s;
}
textarea { min-height: 96px; resize: vertical; }
input:hover, select:hover, textarea:hover { border-color: var(--muted); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
input[type=checkbox], input[type=radio] { width: auto; min-height: 0; accent-color: var(--brand); }
input[type=file] { padding: 9px; background: var(--surface-2); }
.hint { font-size: .82rem; color: var(--muted); margin-top: 5px; }
.form-card { max-width: 440px; margin: 10px auto; }
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.inline-form input, .inline-form select { flex: 1 1 160px; width: auto; }
.check-row { display: flex; gap: 6px; flex-wrap: wrap; }
.check-row label { margin: 0; font-weight: 500; display: inline-flex; gap: 6px; align-items: center; padding: 7px 11px; border: 1px solid var(--line-strong); border-radius: 10px; cursor: pointer; }
.check-row label:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }

/* ---------- xabarlar, nishonlar ---------- */
.flash { display: flex; gap: 10px; align-items: center; padding: 12px 16px; border-radius: 12px; margin-bottom: 16px; background: var(--green-soft); color: var(--green); font-weight: 500; border: 1px solid transparent; animation: rise .3s var(--ease) both; }
.flash.error { background: var(--brand-soft); color: var(--brand); }
.flash.info { background: var(--navy-soft); color: var(--text); }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 99px; font-size: .78rem; font-weight: 600; background: var(--navy-soft); color: var(--text); white-space: nowrap; }
.badge.red { background: var(--brand-soft); color: var(--brand); }
.badge.green { background: var(--green-soft); color: var(--green); }
.badge.gold { background: var(--gold-soft); color: var(--gold-600); }
.badge.orange { background: var(--orange-soft); color: var(--orange); }
.code { font-family: ui-monospace, Consolas, monospace; font-weight: 700; letter-spacing: .14em; font-size: 1.1rem; background: var(--gold-soft); color: var(--text); padding: 4px 10px; border-radius: 8px; border: 1px dashed var(--gold); }
.price { font-family: Georgia, serif; font-weight: 700; font-size: 1.35rem; color: var(--text); }
.price small { font-family: system-ui, sans-serif; font-size: .8rem; color: var(--muted); font-weight: 500; }
.free { color: var(--green); }

/* ---------- progress va grafiklar ---------- */
.bar { height: 8px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; }
.bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), var(--bordo)); border-radius: 99px; transition: width .6s var(--ease); }
.bar.gold > i { background: linear-gradient(90deg, #d8b75e, var(--gold-600)); }
.chart { display: flex; align-items: flex-end; gap: 8px; height: 220px; padding: 10px 4px 0; border-bottom: 1px solid var(--line); }
.chart .col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 3px; min-width: 0; }
.chart .stackbar { width: 100%; max-width: 44px; display: flex; flex-direction: column-reverse; border-radius: 8px 8px 3px 3px; overflow: hidden; background: transparent; }
.chart .seg { width: 100%; transition: height .6s var(--ease); }
.chart .seg.a { background: linear-gradient(180deg, var(--brand), var(--bordo)); }
.chart .seg.b { background: linear-gradient(180deg, #e3c56f, var(--gold-600)); }
.chart .val { font-size: .72rem; color: var(--muted); white-space: nowrap; }
.chart-labels { display: flex; gap: 8px; padding: 6px 4px 0; }
.chart-labels span { flex: 1; text-align: center; font-size: .75rem; color: var(--muted); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: .85rem; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.donut { width: 150px; height: 150px; border-radius: 50%; position: relative; flex: none; }
.donut::after { content: ""; position: absolute; inset: 24px; border-radius: 50%; background: var(--surface); }
.donut-wrap { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.ring { --p: 0; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: conic-gradient(var(--brand) calc(var(--p) * 1%), var(--surface-2) 0); }
.ring span { width: 48px; height: 48px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; font-weight: 700; font-size: .85rem; }

/* ---------- jadvallar ---------- */
.table-wrap { overflow-x: auto; border-radius: 12px; }
table.t { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .93rem; }
table.t th { position: sticky; top: 0; background: var(--surface-2); color: var(--muted); font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; text-align: left; padding: 10px 12px; white-space: nowrap; }
table.t th:first-child { border-radius: 10px 0 0 10px; }
table.t th:last-child { border-radius: 0 10px 10px 0; }
table.t td { padding: 12px; border-bottom: 1px solid var(--line); white-space: nowrap; vertical-align: middle; }
table.t tr:last-child td { border-bottom: none; }
table.t tbody tr, table.t tr { transition: background .15s; }
table.t tr:hover td { background: color-mix(in srgb, var(--surface-2) 60%, transparent); }
.cell-user { display: flex; align-items: center; gap: 10px; }
.cell-user .avatar { width: 34px; height: 34px; font-size: .82rem; box-shadow: none; }
.att { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; font-size: .8rem; font-weight: 700; }
.att.present { background: var(--green-soft); color: var(--green); }
.att.late { background: var(--orange-soft); color: var(--orange); }
.att.absent { background: var(--brand-soft); color: var(--brand); }
.radio-group { display: flex; gap: 6px; flex-wrap: wrap; }
.radio-group label { margin: 0; font-weight: 500; display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border: 1px solid var(--line-strong); border-radius: 10px; cursor: pointer; transition: all .15s; }
.radio-group label:has(input[value=present]:checked) { border-color: var(--green); background: var(--green-soft); color: var(--green); }
.radio-group label:has(input[value=late]:checked) { border-color: var(--orange); background: var(--orange-soft); color: var(--orange); }
.radio-group label:has(input[value=absent]:checked) { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 7px 14px; border-radius: 99px; border: 1px solid var(--line-strong); color: var(--text-2); font-size: .9rem; font-weight: 500; background: var(--surface); }
.chip:hover { border-color: var(--brand); color: var(--brand); text-decoration: none; }
.chip.on { background: var(--navy); border-color: var(--navy); color: #fff; }
@media (prefers-color-scheme: dark) { .chip.on { background: var(--brand); border-color: var(--brand); } }

/* ---------- bo'sh holat, xatolik ---------- */
.empty { text-align: center; padding: 42px 20px; color: var(--muted); }
.empty .ic { color: var(--line-strong); margin-bottom: 10px; }
.empty b { display: block; color: var(--text); font-size: 1.05rem; margin-bottom: 4px; }
.error-page { max-width: 520px; margin: 40px auto; text-align: center; }
.error-page .code-big { font-family: Georgia, serif; font-size: 5rem; font-weight: 700; line-height: 1; background: linear-gradient(135deg, var(--brand), var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- bosh sahifa (hero) ---------- */
.hero {
  background: radial-gradient(1200px 400px at 85% -10%, rgba(201, 164, 76, .25), transparent 60%),
              linear-gradient(135deg, #0e1b3d 0%, #1b2540 55%, #08264b 100%);
  color: #fff; border-radius: 24px; padding: 48px 40px; position: relative; overflow: hidden;
  display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: center; box-shadow: var(--shadow-lg);
}
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: linear-gradient(90deg, var(--brand), var(--bordo) 60%, var(--gold)); }
.hero::before { content: ""; position: absolute; inset: 0; background: var(--fret); opacity: .07; pointer-events: none;
  -webkit-mask-image: linear-gradient(110deg, transparent 35%, #000 90%); mask-image: linear-gradient(110deg, transparent 35%, #000 90%); }
.hero h1 { font-size: 2.4rem; color: #fff; }
.hero h1 em { font-style: normal; color: #ff5a66; }
.hero p { opacity: .88; max-width: 560px; font-size: 1.05rem; }
.hero .eyebrow { color: var(--gold); }
.hero .big-zh { position: absolute; right: 24px; bottom: -34px; font-size: 10rem; opacity: .06; font-weight: 700; pointer-events: none; }
.hero .btn { background: var(--brand); color: #fff; }
.hero .btn.ghost { background: rgba(255,255,255,.06); color: #fff; border-color: rgba(255,255,255,.35); }
.hero .btn.ghost:hover { background: rgba(255,255,255,.14); }
.hero-logo { width: 230px; background: #fff; border-radius: 20px; padding: 14px; box-shadow: 0 16px 40px rgba(0,0,0,.35); position: relative; }
.hero-stats { display: flex; gap: 28px; margin-top: 26px; flex-wrap: wrap; }
.hero-stats b { display: block; font-family: Georgia, serif; font-size: 1.6rem; color: var(--gold); }
.hero-stats span { font-size: .85rem; opacity: .8; }
.feature { transition: transform .2s var(--ease), box-shadow .2s; }
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.feature b { display: block; margin: 12px 0 4px; font-size: 1.02rem; }
.feature .kpi-icon { width: 48px; height: 48px; }
.emoji { font-size: 1.6rem; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 36px 0 16px; }
.section-title h2 { margin: 0; font-size: 1.4rem; display: flex; align-items: center; gap: 12px; }
/* Qizil xitoycha muhr (印章) — bo'lim sarlavhalari oldida */
.seal {
  width: 34px; height: 34px; flex: none; display: inline-grid; place-items: center; border-radius: 7px;
  background: linear-gradient(135deg, var(--brand), var(--bordo)); color: #fff; font-size: 1.05rem; font-weight: 700;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .28), 0 3px 8px rgba(211, 21, 36, .25); transform: rotate(-4deg);
}

/* ---------- narxlar, savol-javob, chaqiriq ---------- */
.plan { display: flex; flex-direction: column; gap: 14px; position: relative; }
.plan.best { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold), var(--shadow-lg); }
.plan-tag { position: absolute; top: -12px; right: 16px; }
.plan-head { display: flex; gap: 12px; align-items: center; }
.plan-head b { display: block; font-size: 1.05rem; }
.plan .price { font-size: 1.6rem; }
.plan .btn { margin-top: auto; }
.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; color: var(--text-2); font-size: .93rem; }
.ticks li { display: flex; gap: 8px; align-items: flex-start; }
.ticks .ic { color: var(--green); margin-top: 3px; }
.ticks li.trial { color: var(--gold-600); font-weight: 600; }
.ticks li.trial .ic { color: var(--gold-600); }
.teacher, .place { display: flex; gap: 16px; align-items: flex-start; }
.teacher .avatar.lg { width: 72px; height: 72px; font-size: 1.15rem; letter-spacing: .02em; }
.teacher-name { display: block; font-family: Georgia, "Times New Roman", serif; font-size: 1.2rem; margin-top: 2px; }
.place .kpi-icon { width: 52px; height: 52px; }
/* ---------- to'lov: karta va cheklar ---------- */
.step { width: 26px; height: 26px; border-radius: 50%; display: inline-grid; place-items: center; flex: none;
  background: var(--brand); color: #fff; font: 700 .85rem system-ui, sans-serif; }
.paycard { border-radius: 16px; padding: 18px 20px; color: #fff; position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 60%, var(--bordo) 140%); box-shadow: var(--shadow-lg); }
.paycard::before { content: ""; position: absolute; inset: 0; background: var(--fret); opacity: .08; pointer-events: none; }
.paycard > * { position: relative; }
.paycard-top { display: flex; justify-content: space-between; font-size: .8rem; opacity: .8; letter-spacing: .06em; }
.paycard-num { font-size: clamp(1.25rem, 4.6vw, 1.6rem); font-weight: 700; letter-spacing: .08em; margin: 18px 0 14px; }
.paycard .row span { font-size: .9rem; opacity: .9; text-transform: uppercase; letter-spacing: .04em; }
.paycard-copy { background: rgba(255, 255, 255, .14); box-shadow: none; }
.paycard-copy:hover { background: rgba(255, 255, 255, .24); }
.receipt-card { display: flex; gap: 16px; align-items: flex-start; }
.receipt-thumb { width: 130px; height: 170px; flex: none; border-radius: 12px; overflow: hidden; border: 1px solid var(--line);
  background: var(--surface-2); display: grid; place-items: center; color: var(--muted); }
.receipt-thumb img { width: 100%; height: 100%; object-fit: cover; }
.receipt-thumb span { display: grid; justify-items: center; gap: 4px; }
.receipt-body { flex: 1; min-width: 0; }
.receipt-amount { font-family: Georgia, serif; font-size: 1.4rem; font-weight: 700; margin: 6px 0 4px; }
@media (max-width: 640px) { .receipt-card { flex-direction: column; } .receipt-thumb { width: 100%; height: 220px; } }
.faq { padding: 6px 20px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:last-child { border-bottom: none; }
.faq summary { cursor: pointer; list-style: none; padding: 16px 28px 16px 0; font-weight: 600; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 2px; top: 12px; font-size: 1.4rem; color: var(--brand); transition: transform .2s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--text-2); margin: -4px 0 16px; }
.cta {
  margin-top: 40px; border-radius: 22px; padding: 30px 32px; display: flex; gap: 20px; align-items: center; justify-content: space-between; flex-wrap: wrap;
  color: #fff; position: relative; overflow: hidden; background: linear-gradient(135deg, var(--brand) 0%, var(--bordo) 100%); box-shadow: var(--shadow-lg);
}
.cta::before { content: ""; position: absolute; inset: 0; background: var(--fret); opacity: .12; pointer-events: none; }
.cta > * { position: relative; }
.cta h2 { color: #fff; margin: 0 0 4px; font-size: 1.45rem; }
.cta p { margin: 0; opacity: .9; max-width: 560px; }
.cta .btn { background: #fff; color: var(--brand); box-shadow: 0 4px 14px rgba(0, 0, 0, .18); }
.cta .btn:hover { background: #fff3f4; }
.cta .btn.ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .55); box-shadow: none; }
.cta .btn.ghost:hover { background: rgba(255, 255, 255, .12); }

/* ---------- kurs va mahsulot kartalari ---------- */
.lesson-card { display: block; color: var(--text); position: relative; overflow: hidden; transition: transform .2s var(--ease), border-color .2s, box-shadow .2s; }
.lesson-card > :not(.wm) { position: relative; }
/* Dars raqami xitoycha, kartaning burchagida xira suv belgisi sifatida */
.lesson-card .wm { position: absolute; right: 10px; bottom: -18px; font-size: 4.6rem; font-weight: 700; line-height: 1; color: var(--brand); opacity: .07; pointer-events: none; transition: opacity .2s; }
.lesson-card:hover .wm { opacity: .14; }
.lessons .grammar { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.lesson-card:hover { text-decoration: none; border-color: var(--brand); transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.lesson-num { color: var(--brand); font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; }
.lesson-title { font-size: 1.15rem; font-weight: 700; margin: 4px 0 8px; }
.course-card { display: flex; flex-direction: column; padding: 0; overflow: hidden; color: var(--text); transition: transform .2s var(--ease), box-shadow .2s; }
.course-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); text-decoration: none; }
.course-cover { height: 120px; position: relative; display: grid; place-items: center; color: #fff; overflow: hidden;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%); }
.course-cover.free { background: linear-gradient(135deg, var(--brand) 0%, var(--bordo) 100%); }
.course-cover .lvl { font-family: Georgia, serif; font-size: 2.2rem; font-weight: 700; letter-spacing: .02em; }
.course-cover .zh-bg { position: absolute; right: -6px; bottom: -22px; font-size: 6rem; opacity: .1; font-weight: 700; }
.course-cover .tag { position: absolute; top: 12px; left: 12px; }
.course-body { padding: 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.course-body .row:last-child { margin-top: auto; }
.product-card { display: flex; flex-direction: column; gap: 10px; color: var(--text); transition: transform .2s var(--ease), box-shadow .2s; }
.product-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); text-decoration: none; }
.product-thumb { height: 120px; border-radius: 12px; display: grid; place-items: center; background: linear-gradient(135deg, var(--gold-soft), var(--surface-2)); color: var(--gold-600); }
/* Mahsulot rasmi (masalan, kaligrafiya qatori) — eski kichik joyning o'zida, oq fonda */
.product-thumb.has-img { display: flex; align-items: center; justify-content: center; background: #fff;
  border: 1px solid var(--line); padding: 8px 12px; overflow: hidden; }
.product-thumb.has-img img { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; }
.material { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.material:last-child { border-bottom: none; }
.material:has(.video-frame, audio) { align-items: flex-start; }
.material .kpi-icon { width: 40px; height: 40px; }
.material .grow { flex: 1; min-width: 0; }
.video-frame { position: relative; padding-top: 56.25%; border-radius: 12px; overflow: hidden; background: #000; margin-top: 10px; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.title-uz { margin: 0; color: var(--text-2); font-size: 1.05rem; font-style: italic; }
.lesson-uz { color: var(--muted); font-size: .85rem; font-style: italic; margin: -4px 0 8px; }
/* ---------- dars grammatikasi ---------- */
.gram { padding: 18px 0; border-bottom: 1px solid var(--line); }
.gram:first-of-type { padding-top: 4px; }
.gram:last-of-type { border-bottom: none; }
.gram h3 { display: flex; align-items: center; gap: 10px; font-size: 1.1rem; margin-bottom: 8px; }
.gram-num { width: 26px; height: 26px; border-radius: 8px; flex: none; display: inline-grid; place-items: center; font-family: system-ui, sans-serif;
  font-size: .82rem; background: var(--gold-soft); color: var(--gold-600); }
.gram > p { color: var(--text-2); margin-bottom: 10px; }
.pattern { display: inline-block; background: var(--navy-soft); border-left: 4px solid var(--brand); border-radius: 8px; padding: 8px 14px;
  font-weight: 600; margin-bottom: 10px; }
.example { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; margin-top: 8px; border-radius: 12px; background: var(--surface-2); }
.example .play { width: 34px; height: 34px; margin-top: 2px; }
.ex-zh { font-size: 1.15rem; font-weight: 600; }
/* ---------- kabinet: mening o'qishim ---------- */
.badge.navy-b { background: var(--navy); color: #fff; }
.study-card + .study-card { margin-top: 14px; }
.study-head { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; }
.study-stats { flex: none; }
.lesson-days { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.lesson-day { border: 1px solid var(--line); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 8px; background: var(--surface); }
.lesson-day.off { background: var(--brand-soft); border-color: transparent; }
.ld-date { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.ld-date b { font-size: 1.05rem; }
.ld-date span { color: var(--muted); font-size: .9rem; }
.ld-date i { font-style: normal; }
.ld-note { color: var(--brand); overflow-wrap: anywhere; }
.ld-form summary { list-style: none; width: 100%; }
.ld-form summary::-webkit-details-marker { display: none; }
.ld-form input { min-height: 38px; padding: 7px 10px; font-size: .9rem; }
.lesson-day .btn.small { width: 100%; }
.study-foot { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: center;
  margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }

/* ---------- guruh reytingi: shohsupa ---------- */
.podium-card { padding: 26px 16px 0; overflow: hidden; }
.podium { display: flex; justify-content: center; align-items: flex-end; gap: 12px; max-width: 560px; margin: 0 auto; }
.podium-col { flex: 1; max-width: 190px; display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 0; }
.podium-col .avatar { width: 58px; height: 58px; font-size: 1.05rem; position: relative; margin-bottom: 8px;
  background: var(--surface); color: var(--text); box-shadow: 0 0 0 3px #c0c6d2; }
.podium-col.p1 .avatar { width: 68px; height: 68px; box-shadow: 0 0 0 4px var(--gold); }
.podium-col.p3 .avatar { box-shadow: 0 0 0 3px #c98a5a; }
.podium-col .avatar.me { background: var(--gold-soft); }
.crown { position: absolute; top: -20px; left: 50%; transform: translateX(-50%); font-size: 1.2rem; }
.podium-name { font-size: .9rem; line-height: 1.25; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.podium-score { font-family: Georgia, serif; font-weight: 700; font-size: 1.15rem; }
.podium-block { width: 100%; margin-top: 8px; border-radius: 12px 12px 0 0; display: grid; place-items: center;
  font-family: Georgia, serif; font-size: 2rem; font-weight: 700; color: rgba(14, 27, 61, .55); }
.p1 .podium-block { height: 150px; background: linear-gradient(180deg, #f3d36b, #d9a92a); color: rgba(80, 55, 0, .7); }
.p2 .podium-block { height: 110px; background: linear-gradient(180deg, #e3e7ee, #b7bfcc); }
.p3 .podium-block { height: 85px; background: linear-gradient(180deg, #e7a873, #c47a43); color: rgba(80, 30, 0, .6); }
@media (max-width: 640px) { .study-head { flex-direction: column; } .lesson-days { grid-template-columns: 1fr 1fr; }
  .podium { gap: 6px; } .p1 .podium-block { height: 120px; } .p2 .podium-block { height: 90px; } .p3 .podium-block { height: 70px; } }

/* ---------- kurs yo'li: Dars → Test → ... ---------- */
.path-card { padding: 0; overflow: hidden; }
.path-hero { text-align: center; padding: 26px 20px 20px;
  background: radial-gradient(420px 180px at 50% 30%, var(--gold-soft), transparent 70%), var(--surface); }
/* Medal: oq doira ichida MRB logotipi (o'zgartirilmaydi), oltin hoshiya va qizil lentalar */
.medal { position: relative; width: 112px; height: 128px; margin: 0 auto; }
.medal span { position: absolute; z-index: 1; left: 0; top: 0; width: 112px; height: 112px; border-radius: 50%; display: flex;
  align-items: center; justify-content: center; background: #fff; border: 5px solid var(--gold);
  box-shadow: 0 0 0 3px var(--gold-soft), 0 8px 18px rgba(169, 133, 47, .3); }
.medal span img { width: 80px; height: auto; display: block; }
.medal i { position: absolute; top: 80px; width: 30px; height: 46px; background: var(--brand); clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 78%, 0 100%); }
.medal i:first-of-type { left: 22px; transform: rotate(18deg); }
.medal i:last-of-type { right: 22px; transform: rotate(-18deg); background: var(--bordo); }
.medal.won span { box-shadow: 0 0 0 3px var(--gold-soft), 0 0 26px rgba(201, 164, 76, .75); }
.path-num { font-size: .75rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--brand); }
.path-zh { font-size: 1.15rem; font-weight: 700; line-height: 1.3; color: var(--text); }
.path-link .path-zh + b { font-weight: 500; font-size: .95rem; color: var(--text-2); }
.path-head { padding: 16px 20px 6px; margin: 0; border-top: 1px solid var(--line); }
.path-count { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: .92rem; }
.path-count b { color: var(--green); }
.path-step { margin: 0 16px 10px; border: 1px solid var(--line); border-radius: 16px; transition: border-color .15s, box-shadow .15s; }
.path-step:last-child { margin-bottom: 18px; }
.path-step:not(.locked):hover { border-color: var(--brand); box-shadow: var(--shadow); }
.path-link { display: flex; align-items: center; gap: 14px; padding: 14px 16px; color: var(--text); }
.path-link:hover { text-decoration: none; }
.path-link .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.path-link b { font-size: 1.02rem; line-height: 1.35; }
.path-icon { width: 52px; height: 52px; border-radius: 14px; flex: none; display: grid; place-items: center; }
.path-icon.video { background: var(--brand-soft); color: var(--brand); }
.path-icon.video .ic { fill: currentColor; }
.path-icon.test { background: var(--navy-soft); color: var(--navy); }
.path-state { color: var(--muted); flex: none; }
.path-step.done .path-state { color: var(--green); }
.path-step.locked .path-link { cursor: default; }
.path-step.locked .path-state { color: var(--gold-600); }
.path-step.locked .path-icon { filter: grayscale(.6); opacity: .7; }
.path-extra { display: inline-flex; align-items: center; gap: 5px; margin: -6px 0 12px 82px; }
@media (prefers-color-scheme: dark) { .path-icon.test { color: var(--text); } }
@media (max-width: 640px) { .path-step { margin: 0 10px 10px; } .path-icon { width: 44px; height: 44px; } .path-extra { margin-left: 72px; } }
.words { width: 100%; border-collapse: collapse; }
.words td { padding: 12px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.words tr:last-child td { border-bottom: none; }
.words .hz { font-size: 1.45rem; font-weight: 700; white-space: nowrap; width: 30%; }
.words .pinyin { color: var(--brand); font-weight: 600; }
.play {
  width: 40px; height: 40px; border-radius: 50%; border: none; cursor: pointer; display: inline-grid; place-items: center;
  background: var(--brand-soft); color: var(--brand); transition: background .18s, color .18s, transform .18s;
}
.play:hover { background: var(--brand); color: #fff; transform: scale(1.06); }

/* ---------- mashq ---------- */
.quiz { max-width: 680px; margin: 0 auto; }
.quiz-prompt { font-size: 1.25rem; white-space: pre-line; margin: 10px 0 18px; }
.quiz-focus { font-size: 4.2rem; font-weight: 700; text-align: center; line-height: 1.2; margin: -6px 0 18px; color: var(--text); }
.options { display: grid; gap: 10px; }
.options.two { grid-template-columns: 1fr 1fr; }
.opt {
  width: 100%; text-align: left; padding: 14px 16px; border-radius: 12px; cursor: pointer;
  border: 2px solid var(--line); background: var(--surface); color: var(--text); font: inherit; font-size: 1.08rem;
  transition: border-color .15s, background .15s, transform .15s var(--ease);
}
.opt:hover:not([disabled]) { border-color: var(--brand); transform: translateY(-1px); }
.opt.right { border-color: var(--green); background: var(--green-soft); }
.opt.wrong { border-color: var(--brand); background: var(--brand-soft); }
.opt[disabled] { cursor: default; }
.opt.picked:not(.right):not(.wrong) { border-color: var(--navy); background: var(--navy-soft); }
.sfx-toggle { background: none; border: 1px solid var(--line); border-radius: 8px; padding: 2px 7px; cursor: pointer; font-size: .95rem; line-height: 1.3; }
.explain { background: var(--navy-soft); border-left: 4px solid var(--gold); border-radius: 12px; padding: 12px 14px; white-space: pre-line; margin-top: 14px; }
.big-play { width: 76px; height: 76px; }

/* ---------- mock imtihon ---------- */
.exam-bar {
  position: sticky; top: 0; z-index: 25; display: flex; justify-content: space-between; align-items: center; gap: 10px;
  max-width: 820px; margin: 0 auto; padding: 12px 18px; border-radius: 14px; background: var(--navy); color: #fff; box-shadow: var(--shadow-lg);
}
.listen i { font-style: normal; }
.timer { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 1.15rem; display: inline-flex; gap: 6px; align-items: center;
  background: rgba(255,255,255,.1); padding: 4px 12px; border-radius: 10px; }
.timer.warn { background: var(--brand); animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .75; } }
.exam-q { padding: 16px 0; border-bottom: 1px solid var(--line); }
.exam-q:last-child { border-bottom: none; }
.exam-q.ok .qnum { background: var(--green); color: #fff; }
.exam-q.bad .qnum { background: var(--brand); color: #fff; }
.qnum { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex: none; font-weight: 700; font-size: .85rem;
  background: var(--navy-soft); color: var(--text); }
.exam-prompt { font-size: 1.12rem; margin: 6px 0 10px; white-space: pre-line; }
.exam-material { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin: 8px 0; white-space: pre-line; line-height: 1.8; font-size: 1.05rem; }
.exam-opts { display: grid; gap: 8px; }
.exam-opts.two { grid-template-columns: 1fr 1fr; }
.exam-opt { display: flex; gap: 10px; align-items: center; margin: 0; font-weight: 500; padding: 11px 14px; border: 2px solid var(--line);
  border-radius: 12px; cursor: pointer; transition: border-color .15s, background .15s; }
.exam-opt:hover { border-color: var(--brand); }
.exam-opt:has(input:checked) { border-color: var(--navy); background: var(--navy-soft); }
.exam-opt.right { border-color: var(--green); background: var(--green-soft); }
.exam-opt.wrong { border-color: var(--brand); background: var(--brand-soft); }
.exam-opt b { color: var(--muted); }
.order-pool { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0; }
.order-pool .chip { cursor: pointer; font-size: 1.05rem; }
.order-pool .chip.on { opacity: .35; }
.order-result { min-height: 46px; border: 2px dashed var(--line-strong); border-radius: 12px; padding: 10px 14px; font-size: 1.15rem; margin: 6px 0; }
.script { background: var(--gold-soft); border-radius: 10px; padding: 8px 12px; margin: 8px 0; font-size: .95rem; }
@media (max-width: 640px) { .exam-opts.two { grid-template-columns: 1fr; } .exam-bar { border-radius: 0; margin: -20px -16px 0; } }

footer { text-align: center; color: var(--muted); font-size: .85rem; padding: 24px 16px 40px; position: relative; }
footer::before { content: ""; display: block; width: 168px; height: 14px; margin: 0 auto 16px; background: var(--fret) center / 14px 14px repeat-x; opacity: .55; }

/* ---------- telefonda pastki menyu ---------- */
.tabbar { display: none; }
.tab {
  display: flex; flex-direction: column; align-items: center; gap: 2px; margin: 0; padding: 6px 0 4px; border-radius: 12px;
  font-size: .7rem; font-weight: 600; color: var(--muted); cursor: pointer; position: relative; transition: color .15s;
}
.tab:hover { text-decoration: none; color: var(--text); }
.tab.on { color: var(--brand); }
.tab.on::before { content: ""; position: absolute; top: -7px; left: 30%; right: 30%; height: 3px; border-radius: 0 0 3px 3px; background: var(--brand); }
.contact { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; margin-top: 6px; }
.contact a { display: inline-flex; gap: 6px; align-items: center; }

/* ---------- planshet va telefon ---------- */
@media (max-width: 1023px) {
  .app { grid-template-columns: 1fr; }
  .topbar { display: flex; }
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; width: min(86vw, 300px); transform: translateX(-102%);
    transition: transform .28s var(--ease); box-shadow: var(--shadow-lg);
  }
  .nav-toggle:checked ~ .sidebar { transform: none; }
  .nav-toggle:checked ~ .scrim { display: block; position: fixed; inset: 0; background: rgba(5, 13, 34, .45); z-index: 35; }
  .content { padding: 20px 16px 50px; }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); background: var(--surface);
    border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(14, 27, 61, .07);
  }
  .tabbar ~ .main { padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); }
}
@media (max-width: 640px) {
  body { font-size: 15px; }
  h1 { font-size: 1.45rem; }
  .hero { padding: 30px 20px; grid-template-columns: 1fr; border-radius: 18px; }
  .hero h1 { font-size: 1.7rem; }
  .hero-logo { display: none; }
  .top-inner { padding: 8px 14px; flex-wrap: nowrap; gap: 8px; }
  .logo { height: 44px; }
  .nav { flex-wrap: nowrap; gap: 2px; }
  .nav a { padding: 8px 9px; font-size: .9rem; }
  .nav .lbl { display: none; }                       /* Kurslar, Do'kon — faqat belgi */
  .nav .btn.small { padding: 6px 10px; }
  /* Kabinet: raqamlar 2×2, tezkor mashq 2×2, darslar ixcham 2 ustunda */
  .kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpis .kpi { flex-direction: column; gap: 8px; padding: 14px; }
  .kpis .kpi-icon { width: 38px; height: 38px; }
  .kpis .kpi span { font-size: .78rem; line-height: 1.35; display: block; }
  .quick { grid-template-columns: 1fr 1fr; gap: 10px; }
  .lessons { grid-template-columns: 1fr 1fr; gap: 10px; }
  .lessons .lesson-card { padding: 14px 12px; }
  .lessons .lesson-title { font-size: 1rem; margin: 2px 0 8px; }
  .lessons .lesson-num { font-size: .72rem; }
  .lessons .grammar { -webkit-line-clamp: 2; font-size: .8rem; line-height: 1.45; }
  .lessons .badge { padding: 2px 6px; }
  .lesson-card .wm { font-size: 3.4rem; bottom: -12px; }
  .section-title { margin: 28px 0 12px; }
  .section-title h2 { font-size: 1.2rem; gap: 10px; }
  .section-title > a { font-size: .9rem; white-space: nowrap; }
  .seal { width: 30px; height: 30px; font-size: .95rem; }
  .features { grid-template-columns: 1fr 1fr; gap: 10px; }
  .features .feature { padding: 14px; }
  .features .feature b { font-size: .95rem; margin-top: 10px; }
  .features .kpi-icon { width: 40px; height: 40px; }
  .plans { gap: 22px; }
  .cta { padding: 24px 20px; border-radius: 18px; }
  .cta .row, .cta .btn { width: 100%; }
  .options.two { grid-template-columns: 1fr; }
  .card { padding: 16px; }
  .wrap { padding: 18px 14px 50px; }
  .page-head .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
