:root {
  --navy: #14267a;
  --navy-dark: #0c1850;
  --gold: #c8a24a;
  --gold-soft: #f6efdc;
  --bg: #ffffff;
  --card: #ffffff;
  --soft: #f5f7fc;
  --text: #15183a;
  --muted: #6a7092;
  --line: #e4e8f3;
  --ok: #1f8a4c;
  --no: #c0392b;
  --radius: 16px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; font-family: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--text); background: var(--bg); line-height: 1.6;
}
a { color: var(--navy); text-decoration: none; }
a:hover { color: var(--gold); }
img { max-width: 100%; }
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(520px, 100% - 32px); }

/* header */
.top { position: sticky; top: 0; z-index: 10; background: var(--top-bg, rgba(255,255,255,.92)); backdrop-filter: blur(8px);
       border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: .08em; font-size: 20px; color: var(--navy); }
.brand img { width: 40px; height: 40px; border-radius: 50%; }
nav { display: flex; align-items: center; gap: 22px; font-weight: 600; font-size: 15px; }
.burger { display: none; font-size: 26px; cursor: pointer; color: var(--navy); }

/* buttons */
.btn { display: inline-block; background: var(--navy); color: #fff; padding: 12px 24px; border-radius: 999px;
       font-weight: 700; border: 2px solid var(--navy); cursor: pointer; font-family: inherit; font-size: 15px;
       transition: .2s; }
.btn:hover { background: var(--navy-dark); color: #fff; }
.btn.small { padding: 8px 18px; font-size: 14px; }
.btn.ghost { background: transparent; color: var(--navy); border-color: var(--gold); }
.btn.ghost:hover { background: var(--gold-soft); color: var(--navy); }
.block-btn { width: 100%; margin-top: 6px; }

/* hero */
.hero { background: linear-gradient(180deg, var(--soft), var(--card)); padding: 64px 0 40px; }
.hero-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 40px; align-items: center; }
.eyebrow { color: var(--gold); font-weight: 700; text-transform: uppercase; letter-spacing: .12em; font-size: 13px; margin: 0 0 12px; }
h1 { font-size: clamp(36px, 6vw, 60px); line-height: 1.08; margin: 0 0 18px; color: var(--navy); letter-spacing: -.02em; }
.lead { font-size: 18px; color: var(--muted); max-width: 520px; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.hero-logo img { width: min(360px, 100%); display: block; margin-inline: auto; filter: drop-shadow(0 20px 40px rgba(20,38,122,.18)); }

/* sections */
.block { padding: 36px 0; }
h2 { font-size: 26px; color: var(--navy); margin: 32px 0 16px; letter-spacing: -.01em; }
h3 { margin: 0 0 6px; font-size: 18px; color: var(--navy); }
.page { font-size: clamp(28px, 4vw, 38px); margin-bottom: 8px; }
.muted { color: var(--muted); }
.center { text-align: center; }
.right { text-align: right; }
.small-text { font-size: 13px; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; }

.cards { display: grid; gap: 16px; margin-top: 12px; }
.cards.two { grid-template-columns: repeat(2, 1fr); }
.cards.three { grid-template-columns: repeat(3, 1fr); }
.cards.four { grid-template-columns: repeat(4, 1fr); }
.cards.five { grid-template-columns: repeat(5, 1fr); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card p { margin: 6px 0 0; }
.subject { font-weight: 700; color: var(--navy); display: flex; align-items: center; gap: 10px; background: var(--soft); border-color: transparent; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--gold); flex: none; }

.parent { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap;
          background: var(--navy); color: #fff; border-radius: 24px; padding: 32px; }
.parent h2 { color: #fff; margin: 0 0 8px; }
.parent p { margin: 0; opacity: .85; max-width: 560px; }
.parent .btn { background: var(--gold); border-color: var(--gold); color: var(--navy-dark); }
.parent .btn:hover { background: var(--card); border-color: #fff; }

/* teachers */
.avatar { width: 52px; height: 52px; border-radius: 50%; background: var(--gold-soft); color: var(--navy);
          display: grid; place-items: center; font-weight: 800; font-size: 22px; border: 2px solid var(--gold); }
.badge { display: inline-grid; place-items: center; min-width: 28px; height: 28px; padding: 0 8px; border-radius: 999px;
         background: var(--gold-soft); color: var(--navy); font-weight: 800; font-size: 13px; }
.score { font-size: 28px; font-weight: 800; color: var(--navy); margin: 8px 0 0; }
.score small { font-size: 13px; color: var(--muted); font-weight: 600; }
.mini-stats { display: flex; gap: 16px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.mini-stats div { display: flex; flex-direction: column; }
.mini-stats strong { font-size: 20px; color: var(--navy); }
.mini-stats span { font-size: 12px; color: var(--muted); }

/* tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted);
     background: var(--soft); padding: 12px 16px; }
td { padding: 12px 16px; border-top: 1px solid var(--line); }
table.compact { margin-top: 10px; }
table.compact td { padding: 8px 4px; }

/* stats */
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat .label { font-size: 13px; color: var(--muted); font-weight: 600; }
.stat strong { font-size: 36px; color: var(--navy); line-height: 1.1; }
.stat strong small { font-size: 16px; color: var(--muted); }
.progress { height: 8px; background: var(--soft); border-radius: 99px; overflow: hidden; margin-top: 8px; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--navy), var(--gold)); border-radius: 99px; }
.pill { padding: 3px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; }
.pill.ok { background: #e6f5ec; color: var(--ok); }
.pill.no { background: #fbe9e7; color: var(--no); }
.pill.mid { background: var(--gold-soft); color: #8a6d1d; }

/* forms */
.form-card { padding: 32px; }
.form-logo { width: 84px; display: block; margin: 0 auto 8px; }
.form-card .page { text-align: center; }
label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 14px; }
input { display: block; width: 100%; margin-top: 6px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px;
        font: inherit; background: var(--soft); }
input:focus { outline: 2px solid var(--gold); background: var(--card); }
.alert { background: #fbe9e7; color: var(--no); padding: 10px 14px; border-radius: 12px; font-weight: 600; }

footer { margin-top: 48px; background: var(--navy-dark); color: #dfe3f6; padding: 32px 0; font-size: 14px; }
footer a { color: var(--gold); }
footer p { margin: 4px 0; }
.foot { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; text-align: left; }
  .hero-logo { order: -1; }
  .hero-logo img { width: 200px; }
  .cards.three, .cards.four, .cards.five { grid-template-columns: repeat(2, 1fr); }
  .burger { display: block; }
  nav { display: none; position: absolute; top: 68px; left: 0; right: 0; background: var(--card); flex-direction: column;
        padding: 16px; gap: 14px; border-bottom: 1px solid var(--line); align-items: flex-start; }
  #menu-toggle:checked ~ nav { display: flex; }
}
@media (max-width: 560px) {
  .cards.two, .cards.three, .cards.four, .cards.five { grid-template-columns: 1fr; }
  .hero { padding-top: 32px; }
}

/* ---- 2-yangilanish ---- */
.menu-toggle { display: none !important; }
nav a { white-space: nowrap; }
.backbar { padding-top: 14px; font-weight: 600; font-size: 14px; }
.btn.disabled { opacity: .6; cursor: default; pointer-events: none; }

.choices { display: grid; gap: 8px; margin-bottom: 16px; }
.choice { display: flex; align-items: center; margin: 0; padding: 12px 14px; border: 1px solid var(--line);
          border-radius: 12px; cursor: pointer; background: var(--soft); }
.choice input[type=radio] { display: inline-block; width: auto; margin: 0 10px 0 0; accent-color: var(--navy); }
.login-box { background: var(--gold-soft); padding: 4px 12px; border-radius: 8px; color: var(--navy); }

.hw-list { display: grid; gap: 12px; margin-top: 12px; }
.hw.is-done { opacity: .7; }
.hw-text { white-space: pre-wrap; background: var(--soft); padding: 12px 14px; border-radius: 12px; margin: 10px 0; }
.pill.new { background: var(--gold); color: var(--navy-dark); margin-left: 8px; }

.fab { position: fixed; right: 18px; bottom: 18px; z-index: 20; background: var(--navy); color: #fff; border: 2px solid var(--gold);
       padding: 12px 20px; border-radius: 999px; font: 700 15px "Manrope", sans-serif; cursor: pointer;
       box-shadow: 0 10px 30px rgba(20,38,122,.35); }
.fab:hover { background: var(--navy-dark); }
dialog#report-dialog, dialog#install-dialog { border: 0; border-radius: 20px; padding: 26px; width: min(520px, calc(100% - 24px)); color: var(--text);
                       box-shadow: 0 30px 80px rgba(12,24,80,.35); }
dialog#report-dialog::backdrop, dialog#install-dialog::backdrop { background: rgba(12,24,80,.45); backdrop-filter: blur(2px); }
dialog#report-dialog h3, dialog#install-dialog h3 { font-size: 22px; margin: 0 0 6px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0; }
.chip { flex: 1 1 auto; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--soft);
        font: 600 14px "Manrope", sans-serif; cursor: pointer; color: var(--text); }
.chip.on { background: var(--navy); color: #fff; border-color: var(--navy); }
dialog textarea { width: 100%; padding: 12px 14px; border: 2px solid var(--navy); border-radius: 12px; font: inherit;
                  background: var(--soft); resize: vertical; }
dialog textarea:focus { outline: 2px solid var(--gold); }
.dlg-actions { display: flex; gap: 10px; margin-top: 12px; }
.dlg-actions .btn { flex: 1; text-align: center; }
.ok-note { background: #e6f5ec; color: var(--ok); padding: 10px 14px; border-radius: 12px; font-weight: 600; }
@media (max-width: 860px) { nav a { white-space: normal; } }

/* ---- 3-yangilanish: panel, yangiliklar, sharoit, guruh chati ---- */
input[type=checkbox], input[type=radio] { display: inline-block; width: auto; margin: 0 6px 0 0; accent-color: var(--navy); }
input[type=file] { background: var(--card); padding: 10px; }
textarea, select { display: block; width: 100%; margin-top: 6px; padding: 12px 14px; border: 1px solid var(--line);
                   border-radius: 12px; font: inherit; background: var(--soft); }
textarea:focus, select:focus { outline: 2px solid var(--gold); background: var(--card); }
img.avatar { width: 52px; height: 52px; object-fit: cover; display: block; }
.av-sm { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; vertical-align: middle; margin-right: 8px; border: 1px solid var(--line); }
.av-lg { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; border: 3px solid var(--gold); display: block; }
.who { display: flex; align-items: center; gap: 4px; }
.backbar { display: flex; gap: 18px; }
.backbar a { color: var(--navy); }

.row-gap { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.form-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); align-items: end; }
.form-grid label { margin: 0; }
.inline-form { display: inline; }
.btn.danger { background: var(--card); color: var(--no); border-color: var(--no); }
.btn.danger:hover { background: #fbe9e7; color: var(--no); }
.btn.mini { padding: 4px 12px; font-size: 13px; }
.panel-links { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin-top: 12px; }
.panel-links a.card { display: block; color: var(--text); }
.panel-links a.card:hover { border-color: var(--gold); }
.panel-links h3 { margin-bottom: 2px; }
.notice { background: var(--gold-soft); border: 1px solid var(--gold); padding: 12px 16px; border-radius: 12px; margin: 12px 0; }
.big-cred { font: 700 18px/1.7 "Manrope", monospace; }
.att-row td { vertical-align: middle; }
.att-opt { display: inline-flex; align-items: center; margin: 0 12px 0 0; font-weight: 600; cursor: pointer; }
.att-opt.no { color: var(--no); }
.att-opt.ok { color: var(--ok); }
.tbl-input { width: 90px; margin: 0; padding: 8px 10px; }
.tbl-input.wide { width: 100%; min-width: 140px; }
.right { text-align: right; }
.sub-nav { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 18px; }
details.edit > summary { cursor: pointer; font-weight: 700; color: var(--navy); margin: 8px 0; }
.pay-bar { height: 12px; }

/* yangiliklar */
.posts { display: grid; gap: 18px; max-width: 760px; margin: 12px auto 0; }
.post-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.post-head .av-sm { width: 40px; height: 40px; margin: 0; }
.post-text { white-space: pre-wrap; margin: 8px 0; font-size: 16px; }
.post-sticker { font-size: 72px; line-height: 1.1; margin: 6px 0; }
.post-media { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin-top: 10px; }
.post-media img, .post-media video { width: 100%; border-radius: 12px; max-height: 420px; object-fit: cover; background: #000; }
.sticker-pick { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 14px; }
.sticker-pick label { margin: 0; cursor: pointer; }
.sticker-pick input { position: absolute; opacity: 0; width: 0; height: 0; }
.sticker-pick span { display: block; font-size: 28px; padding: 4px 8px; border-radius: 12px; border: 2px solid transparent; }
.sticker-pick input:checked + span { border-color: var(--gold); background: var(--gold-soft); }

/* sharoit */
.gallery { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); margin-top: 14px; }
.gallery figure { margin: 0; position: relative; }
.gallery img { width: 100%; height: 210px; object-fit: cover; border-radius: 16px; display: block; }
.gallery figcaption { font-size: 14px; color: var(--muted); margin-top: 6px; }

/* guruh chati */
.members { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); margin-top: 12px; }
.member { display: flex; align-items: center; gap: 12px; padding: 12px; }
.member img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; flex: none; }
.member small { color: var(--muted); display: block; }
.chat { background: var(--soft); border-radius: 16px; padding: 14px; max-height: 460px; overflow-y: auto; display: grid; gap: 10px; }
.msg { display: flex; gap: 10px; align-items: flex-start; }
.msg img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; flex: none; }
.bubble { background: var(--card); border: 1px solid var(--line); padding: 8px 12px; border-radius: 4px 14px 14px 14px; max-width: 100%; word-break: break-word; }
.bubble b { font-size: 13px; color: var(--navy); }
.bubble time { font-size: 11px; color: var(--muted); margin-left: 6px; }
.bubble p { margin: 2px 0 0; white-space: pre-wrap; }
.msg.teacher .bubble { border-color: var(--gold); background: var(--gold-soft); }
.chat-form { display: flex; gap: 8px; margin-top: 10px; }
.chat-form input { margin: 0; }
.link-btn { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 12px; padding: 0 0 0 8px; }
.chat-form .btn { flex: none; }
.profile-top { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.pre-text { white-space: pre-wrap; }
.teacher-extra { margin-top: 10px; font-size: 14px; color: var(--muted); }
.teacher-extra strong { color: var(--navy); }
nav { gap: 18px; }
nav a { font-size: 14px; }

/* ---- 4-yangilanish: aloqa kartalari va yangi footer ---- */
.contact-cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.card.contact { text-align: center; padding: 28px 22px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.card.contact p { color: var(--muted); flex: 1; }
.c-icon { width: 58px; height: 58px; border-radius: 50%; background: var(--gold-soft); color: var(--navy); display: grid; place-items: center; margin-bottom: 8px; }
.card.contact .btn { margin-top: 14px; }
footer { padding: 44px 0 20px; }
.foot-grid { display: grid; gap: 32px; grid-template-columns: 1.6fr 1fr 1.2fr; }
.foot-brand p { color: #c4cae8; max-width: 460px; }
.brand.light { color: #fff; }
.brand.light:hover { color: var(--gold); }
footer h4 { color: var(--gold); margin: 0 0 14px; font-size: 16px; }
.foot-links, .foot-contact { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.foot-links a { color: #dfe3f6; }
.foot-links a::before { content: "› "; color: var(--gold); }
.foot-links a:hover, .foot-contact a:hover { color: var(--gold); }
.foot-contact small { display: block; color: #9aa2cf; font-size: 12px; }
.foot-contact a { color: #fff; font-weight: 600; }
.socials { display: flex; gap: 10px; margin-top: 16px; }
.socials a { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; }
.socials .s-tg { background: #2a8bd8; }
.socials .s-ig { background: linear-gradient(45deg, #f09433, #dc2743, #bc1888); }
.foot-copy { margin-top: 28px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.12); color: #9aa2cf; font-size: 13px; }
@media (max-width: 860px) { .foot-grid { grid-template-columns: 1fr; } }

/* ---- 5-yangilanish ---- */
.g { font-weight: 800; font-size: 16px; }
.g1 { color: #8e1111; }
.g2 { color: #e53935; }
.g3 { color: #f57c00; }
.g4 { color: #7cb342; }
.g5 { color: #1b8a3a; }
.cap-form { display: flex; gap: 6px; margin-top: 6px; }
.cap-form input { margin: 0; padding: 8px 10px; }
.gallery figure form { margin-top: 6px; }

/* ---- 6-yangilanish ---- */
.att-strip { display: flex; gap: 4px; flex-wrap: wrap; margin: 10px 0; }
.att-box { display: inline-block; width: 18px; height: 18px; border-radius: 4px; vertical-align: middle; }

/* haftalik jadval */
.week{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:12px;margin-bottom:18px}
.week-day p{margin:8px 0 0}
.week-day.today{border-color:var(--gold);box-shadow:0 0 0 2px rgba(200,162,74,.35)}

/* natijalar */
.result-big { font-size: 28px; font-weight: 800; color: var(--navy); margin: 0; }

/* qorong'u rejim */
html[data-theme="dark"] {
  --bg: #0e1330; --card: #171d45; --soft: #1d2552; --text: #e8ebff; --muted: #9aa3d0; --line: #2b3470;
  --navy: #8fa2ff; --navy-dark: #0a0f2a; --gold-soft: #2a2a4a; --top-bg: rgba(14,19,48,.92);
  color-scheme: dark;
}
html[data-theme="dark"] .btn { color: #0a0f2a; }
html[data-theme="dark"] .btn.ghost { color: var(--navy); }
html[data-theme="dark"] .btn.ghost:hover { color: var(--navy); }
html[data-theme="dark"] .btn:hover { color: #0a0f2a; background: var(--gold); }
html[data-theme="dark"] .pill.ok { background: #14301f; color: #6fdc98; }
html[data-theme="dark"] .pill.no { background: #3a1a1a; color: #ff8f84; }
html[data-theme="dark"] .pill.mid { background: #3a3220; color: #e6c872; }
html[data-theme="dark"] .alert { background: #3a1a1a; color: #ff8f84; }
html[data-theme="dark"] input, html[data-theme="dark"] select, html[data-theme="dark"] textarea { color: var(--text); }
html[data-theme="dark"] input:focus { background: var(--card); }
html[data-theme="dark"] img.form-logo, html[data-theme="dark"] .brand img { background: #fff; border-radius: 50%; }
.theme-btn { background: transparent; border: 1px solid var(--line); color: var(--text); border-radius: 999px; width: 36px; height: 36px;
             cursor: pointer; font-size: 16px; line-height: 1; }
.theme-btn:hover { border-color: var(--gold); }
html[data-theme="dark"] .parent, html[data-theme="dark"] .fab, html[data-theme="dark"] .chip.on { background: #26358f; color: #fff; border-color: var(--gold); }
html[data-theme="dark"] .parent .btn { color: #0a0f2a; }
html[data-theme="dark"] .score, html[data-theme="dark"] h1.page, html[data-theme="dark"] h2 { color: var(--text); }

html[data-theme="dark"] .btn.danger { background: transparent; color: #ff8f84; border-color: #e0574b; }
html[data-theme="dark"] .btn.danger:hover { background: #3a1a1a; color: #ffb1a9; }
/* qorong'u rejimda ham menyu yorug' rejimdagi joyida qoladi (logotip va nom yopilmaydi) */
html[data-theme="dark"] nav { background: transparent; }

.install-btn { background: var(--gold); color: var(--navy-dark) !important; padding: 6px 14px; border-radius: 999px; font-weight: 800; }
.install-btn[hidden] { display: none !important; }
dialog#install-dialog ol { padding-left: 20px; line-height: 1.6; }

/* ---- Telefon: menyu doim ko'rinadi (☰ siz) — gorizontal suriladigan tugmalar qatori ---- */
@media (max-width: 860px) {
  .top .bar { flex-wrap: wrap; height: auto; padding-top: 8px; row-gap: 0; }
  .top .brand { height: 44px; }
  .top .brand img { width: 34px; height: 34px; }
  .burger { display: none !important; }
  nav, #menu-toggle:checked ~ nav {
    display: flex; position: static; order: 3; width: 100%; flex-direction: row; flex-wrap: nowrap; align-items: center;
    gap: 8px; padding: 6px 0 10px; border: 0; background: transparent; overflow-x: auto; overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch; scrollbar-width: none; scroll-snap-type: x proximity;
    -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent); mask-image: linear-gradient(90deg, #000 88%, transparent);
  }
  nav::-webkit-scrollbar { display: none; }
  nav a, nav .theme-btn { flex: none; scroll-snap-align: start; }
  nav a { white-space: nowrap; font-size: 14px; padding: 7px 14px; border-radius: 999px; background: var(--soft);
          border: 1px solid var(--line); color: var(--navy); }
  nav a.on { background: var(--navy); color: #fff; border-color: var(--navy); }
  nav a.btn { order: -3; background: var(--navy); color: #fff; border-color: var(--navy); padding: 7px 16px; font-size: 14px; line-height: inherit; }
  nav a.nav-yoz { order: -2; border-color: var(--gold); }
  nav a.install-btn { order: -1; background: var(--gold); border-color: var(--gold); color: var(--navy-dark); }
  nav .theme-btn { width: 34px; height: 34px; }
  html[data-theme="dark"] nav { background: transparent; }
  html[data-theme="dark"] nav a { color: var(--text); }
  html[data-theme="dark"] nav a.on, html[data-theme="dark"] nav a.btn { background: #26358f; color: #fff; }
  html[data-theme="dark"] nav a.install-btn { background: var(--gold); color: var(--navy-dark); }
}

.owner-row { display: flex; gap: 8px; flex-wrap: wrap; }
.owner-row .choice { flex: 1 1 120px; margin: 0; }
.choice input[type=radio], .choice input[type=checkbox] { display: inline-block; width: auto; margin: 0 10px 0 0; accent-color: var(--navy); }

/* Yorug'/qorong'u tugmasi: telefonda tepada, logotip qatorida alohida */
.theme-top { display: none; }
@media (max-width: 860px) {
  .theme-top { display: grid; place-items: center; margin-left: auto; width: 40px; height: 40px; font-size: 18px; }
  nav .theme-btn { display: none; }
}

/* Ochilish e'loni (eng tepada) */
.open-bar { background: var(--gold); color: var(--navy-dark); text-align: center; font-weight: 700; font-size: 14px; padding: 8px 16px; line-height: 1.4; }
.open-bar a { color: var(--navy-dark); text-decoration: underline; white-space: nowrap; }
.ob-short { display: none; }
@media (max-width: 600px) {
  .open-bar { font-size: 13px; padding: 6px 12px; }
  .ob-long { display: none; }
  .ob-short { display: inline; }
}

/* ---------- Bosh sahifa: natijalar vitrinasi ---------- */
.showcase .sc-head { text-align: center; max-width: 640px; margin: 0 auto 22px; }
.showcase .sc-head h2 { margin: 0 0 6px; }
.sc-sub { margin: 0; font-size: 20px; color: var(--navy); }
.podium-card { position: relative; overflow: hidden; border-radius: 24px; padding: 24px 22px 18px;
  background: radial-gradient(120% 140% at 50% 0%, #22379c 0%, var(--navy-dark) 70%); color: #fff; }
.podium-card::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at 15% 20%, rgba(200,162,74,.25) 0 2px, transparent 3px) 0 0/46px 46px; opacity: .6; }
.podium-title { display: flex; gap: 12px; align-items: center; position: relative; }
.podium-title > span { font-size: 34px; }
.podium-title h3 { margin: 0; color: #fff; }
.podium-card .muted { color: rgba(255,255,255,.72); margin: 2px 0 0; }
.podium { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); align-items: end; gap: 12px; margin-top: 18px; }
.pd { display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 0; }
.pd-avatar { position: relative; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center;
  font-size: 26px; font-weight: 800; color: var(--navy-dark); background: linear-gradient(145deg, #fff, var(--gold-soft));
  border: 3px solid var(--gold); box-shadow: 0 8px 24px rgba(0,0,0,.25); }
.pd-1 .pd-avatar { width: 82px; height: 82px; font-size: 32px; }
.pd-medal { position: absolute; bottom: -8px; right: -6px; font-size: 22px; }
.pd-name { margin-top: 10px; font-weight: 700; font-size: 14px; line-height: 1.25; max-width: 100%; overflow-wrap: anywhere; }
.pd-pts { color: var(--gold); font-weight: 800; font-size: 18px; }
.pd-pts small { font-size: 12px; color: rgba(255,255,255,.7); font-weight: 600; }
.pd-step { width: 100%; margin-top: 10px; border-radius: 14px 14px 0 0; display: grid; place-items: center;
  font-size: 28px; font-weight: 900; color: rgba(255,255,255,.9); background: linear-gradient(180deg, rgba(200,162,74,.95), rgba(200,162,74,.55)); }
.pd-1 .pd-step { height: 96px; } .pd-2 .pd-step { height: 70px; opacity: .85; } .pd-3 .pd-step { height: 52px; opacity: .75; }
.podium-card .btn.ghost { color: #fff; border-color: rgba(255,255,255,.55); background: transparent; }
.podium-card .btn.ghost:hover { border-color: var(--gold); color: var(--gold); }

.t-strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 1fr); gap: 14px; overflow-x: auto;
  padding: 14px 2px 10px; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.t-card { scroll-snap-align: start; display: flex; flex-direction: column; gap: 6px; padding: 18px; border-radius: 20px;
  background: var(--card); border: 1px solid var(--line); color: var(--text); position: relative; transition: transform .15s, box-shadow .15s; }
.t-card::after { content: ""; position: absolute; left: 18px; right: 18px; top: 0; height: 4px; border-radius: 0 0 6px 6px;
  background: linear-gradient(90deg, var(--gold), var(--navy)); }
.t-card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(20,38,122,.12); color: var(--text); }
.t-top { display: flex; justify-content: space-between; align-items: flex-start; }
.t-ava { width: 68px; height: 68px; border-radius: 50%; object-fit: cover; border: 3px solid var(--gold-soft); background: var(--soft); }
.t-score { background: var(--navy); color: #fff; font-weight: 800; border-radius: 999px; padding: 4px 10px; font-size: 14px; }
.t-score small { font-weight: 600; opacity: .8; }
.t-card h4 { margin: 6px 0 0; font-size: 17px; color: var(--navy); }
.t-subj { margin: 0; color: var(--gold); font-weight: 700; font-size: 14px; }
.t-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.t-chips span { background: var(--gold-soft); color: var(--navy-dark); border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 600; }
.t-prev { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.45; }
.t-foot { margin-top: auto; padding-top: 8px; display: flex; gap: 12px; flex-wrap: wrap; font-size: 13px; color: var(--muted); border-top: 1px dashed var(--line); }

.r-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; margin-top: 14px; }
.r-tile { border-radius: 20px; padding: 18px; text-align: center; background: linear-gradient(160deg, var(--gold-soft), #fff);
  border: 1px solid #ecdcb2; }
.r-big { font-size: 26px; font-weight: 900; color: var(--navy); line-height: 1.15; }
.r-name { margin-top: 8px; font-weight: 700; }
.r-meta { color: var(--muted); font-size: 13px; }

html[data-theme="dark"] .t-card h4, html[data-theme="dark"] .sc-sub { color: var(--text); }
html[data-theme="dark"] .r-tile { background: linear-gradient(160deg, #2a2a1c, var(--card)); border-color: #4a4128; }
html[data-theme="dark"] .r-big { color: var(--gold); }
@media (max-width: 600px) {
  .podium-card { padding: 20px 14px 14px; }
  .pd-avatar { width: 54px; height: 54px; font-size: 22px; } .pd-1 .pd-avatar { width: 68px; height: 68px; }
  .pd-name { font-size: 12.5px; }
  .t-strip { grid-auto-columns: 78%; }
}

/* Qo'shimcha telefon raqamlari */
.xp-box { margin: -4px 0 14px; text-align: left; }
.xp-row { display: grid; grid-template-columns: 1fr 120px 36px; gap: 6px; margin-bottom: 6px; align-items: center; }
.xp-row input, .xp-row select { margin: 0; }
.xp-del { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: var(--soft); color: var(--no);
  font-size: 18px; font-weight: 700; cursor: pointer; }
.xp-add { background: none; border: 1px dashed var(--gold); color: var(--navy); border-radius: 999px; padding: 6px 14px;
  font-weight: 700; font-size: 13px; cursor: pointer; font-family: inherit; }
.xp-add:hover { background: var(--gold-soft); }
html[data-theme="dark"] .xp-add { color: var(--text); }
@media (max-width: 420px) { .xp-row { grid-template-columns: 1fr 96px 36px; } }

/* Ustoz afzalliklari */
.t-exp { margin: 4px 0; color: var(--navy); font-size: 14px; }
.t-why { margin: 10px 0; padding: 12px 14px; border-radius: 14px; background: var(--gold-soft); color: var(--navy-dark); }
.t-why ul { margin: 6px 0 0; padding-left: 0; list-style: none; }
.t-why li { position: relative; padding-left: 22px; margin: 4px 0; font-size: 14px; line-height: 1.45; }
.t-why li::before { content: "✓"; position: absolute; left: 0; color: var(--navy); font-weight: 900; }
.t-why-mini { margin: 2px 0 0; padding: 0; list-style: none; font-size: 13.5px; color: var(--text); }
.t-why-mini li { padding-left: 18px; position: relative; margin: 2px 0; }
.t-why-mini li::before { content: "✓"; position: absolute; left: 0; color: var(--gold); font-weight: 900; }
html[data-theme="dark"] .t-exp { color: var(--text); }
html[data-theme="dark"] .t-why { background: #2a2a1c; color: var(--text); }
html[data-theme="dark"] .t-why li::before { color: var(--gold); }

/* ---------- Haftalik dars jadvali (elektron jurnal ko'rinishi) ---------- */
.tt-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 6px 0 14px; }
.tt-nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tt-arrow { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--soft);
  border: 1px solid var(--line); color: var(--navy); font-size: 14px; }
.tt-arrow:hover { background: var(--navy); color: #fff; }
.tt-range { margin-left: 6px; font-size: 18px; }
.tt-range .muted { font-size: 14px; margin-left: 6px; }
.tt-tools { display: flex; gap: 10px; align-items: center; }
.tt-filter select { margin: 0; min-width: 170px; }
.tt-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 18px; background: var(--card); }
.tt { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 860px; table-layout: fixed; }
.tt th { position: sticky; top: 0; background: var(--soft); color: var(--navy); font-weight: 800; font-size: 14px;
  padding: 12px 8px; text-align: center; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tt th small { display: block; font-size: 11px; color: var(--gold); font-weight: 800; text-transform: uppercase; letter-spacing: .5px; }
.tt th.tt-off { color: #d14343; }
.tt td { vertical-align: top; padding: 8px; border-bottom: 1px solid var(--line); border-left: 1px solid var(--line); }
.tt tr:last-child td { border-bottom: 0; }
.tt .tt-n { width: 42px; min-width: 42px; text-align: center; font-weight: 800; color: var(--muted); border-left: 0; vertical-align: middle;
  background: var(--soft); position: sticky; left: 0; z-index: 1; }
.tt th.tt-today, .tt td.tt-today { background: rgba(200,162,74,.10); }
.tt th.tt-today { box-shadow: inset 0 -3px 0 var(--gold); }
.tt-card { border: 1px solid var(--line); border-left: 4px solid var(--navy); border-radius: 10px; padding: 7px 9px; background: var(--card);
  font-size: 13px; line-height: 1.35; margin-bottom: 6px; box-shadow: 0 2px 6px rgba(20,38,122,.05); }
.tt-card:last-child { margin-bottom: 0; }
.tt-subj { display: block; color: #1f77c9; font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tt-teach, .tt-room { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tt th:first-child { width: 42px; }
.tt-teach { color: var(--text); }
.tt-time { color: var(--text); font-weight: 600; }
.tt-room { color: var(--muted); font-size: 12px; }
.tt-hint { display: none; }
html[data-theme="dark"] .tt th { color: var(--text); }
html[data-theme="dark"] .tt-subj { color: #7cb8ff; }
html[data-theme="dark"] .tt-arrow { color: var(--text); }
@media (max-width: 860px) { .tt-hint { display: block; } .tt-range { font-size: 16px; } }

.tt-chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 14px; }
.tt-chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--soft); color: var(--navy); font-weight: 600; font-size: 14px; cursor: pointer; user-select: none; }
.tt-chip input { width: auto; margin: 0; accent-color: var(--navy); }
.tt-chip.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.tt-chip.on input { accent-color: var(--gold); }
html[data-theme="dark"] .tt-chip { color: var(--text); }
html[data-theme="dark"] .tt-chip.on { background: #26358f; color: #fff; }

.notify-card { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; margin: 14px 0 6px;
  border-left: 4px solid #d14343; }
.notify-card.on { border-left-color: #2e9e5b; }
.alert.ok { background: #e7f6ec; color: #1f7a45; }
html[data-theme="dark"] .alert.ok { background: #16301f; color: #7fdc9f; }

/* ---------- Panel: guruhlar fan bo'yicha ixcham ro'yxat ---------- */
.gl-filter { margin: 12px 0 4px; }
.gl-filter input { margin: 0; max-width: 420px; }
.gl-sec { margin: 18px 0; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: var(--card); }
.gl-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 18px; background: var(--soft);
  border-bottom: 1px solid var(--line); }
.gl-head h3 { margin: 0; font-size: 18px; color: var(--navy); }
.gl-head span { color: var(--muted); font-size: 13px; font-weight: 600; }
.gl-row { display: grid; grid-template-columns: 90px 170px 1fr 110px 80px; align-items: center; gap: 12px; padding: 12px 18px;
  border-bottom: 1px solid var(--line); color: var(--text); transition: background .12s; }
.gl-row:last-child { border-bottom: 0; }
.gl-row:hover { background: rgba(200,162,74,.08); color: var(--text); }
.gl-name { font-weight: 800; color: var(--navy); font-size: 16px; }
.gl-time b { display: block; font-size: 15px; }
.gl-time small { color: var(--muted); font-size: 12.5px; }
.gl-teach { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gl-none { color: #d14343; font-style: normal; font-weight: 600; }
.gl-count { font-weight: 800; font-size: 16px; text-align: right; }
.gl-count small { font-weight: 500; color: var(--muted); font-size: 12px; }
.gl-count.zero { color: var(--muted); }
.gl-go { text-align: right; color: var(--gold); font-weight: 700; font-size: 13px; }
html[data-theme="dark"] .gl-head h3, html[data-theme="dark"] .gl-name { color: var(--text); }
@media (max-width: 700px) {
  .gl-row { grid-template-columns: 70px 1fr auto; grid-template-areas: "name time count" "name teach count"; row-gap: 2px; padding: 10px 14px; }
  .gl-name { grid-area: name; } .gl-time { grid-area: time; } .gl-teach { grid-area: teach; font-size: 13px; color: var(--muted); }
  .gl-count { grid-area: count; } .gl-go { display: none; }
  .gl-time b { display: inline; } .gl-time small { margin-left: 6px; }
}
.gl-time small { white-space: nowrap; }
