/* =====================================================================
   Litsey Test — "yangi texnologiyalar" uslubi
   Kosmik kók sarlavha, jonli neyron tarmoq, gradientli ilova ikonkalari
   ===================================================================== */
:root {
  --ink: #0b1026;          /* kosmik kók */
  --ink-2: #131a3a;
  --prussian: #2a3fd6;
  --primary: #3b5bff;      /* elektr kók */
  --primary-soft: #eaeeff;
  --violet: #7c5cff;
  --cyan: #22d3ee;
  --teal: #0ea5b7;
  --teal-soft: #e0f7fa;
  --amber: #a86b00;
  --amber-soft: #fdf3d8;
  --flame: #ffd84a;
  --bg: #f4f6fb;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #5b6785;
  --line: #e2e7f2;
  --green: #0f8a4f;
  --green-soft: #e2f6ec;
  --red: #c42b3c;
  --red-soft: #fdeaec;
  --radius: 14px;
  --grad: linear-gradient(135deg, #3b5bff 0%, #7c5cff 55%, #22d3ee 120%);
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px rgba(30, 41, 90, .06);
  --display: "Unbounded", "Inter", system-ui, sans-serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--sans);
  color: var(--text); font-size: 15px; line-height: 1.55;
  background-color: var(--bg);
  /* nuqtali tór — dastur muharriri foni kabi */
  background-image: radial-gradient(rgba(59, 91, 255, .10) 1px, transparent 1.2px);
  background-size: 22px 22px;
  background-attachment: fixed;
  min-height: 100vh; display: flex; flex-direction: column;
  -webkit-font-smoothing: antialiased;
}
#app { flex: 1; display: flex; flex-direction: column; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3 { margin: 0 0 .5em; line-height: 1.22; color: var(--heading); }
h1 { font-family: var(--display); font-size: 1.6rem; font-weight: 600; letter-spacing: -.01em; }
h2 { font-family: var(--display); font-size: 1.15rem; font-weight: 600; }
h3 { font-size: 1.05rem; font-weight: 700; }
:focus-visible { outline: 3px solid rgba(59, 91, 255, .45); outline-offset: 2px; }
.loading { padding: 4rem; text-align: center; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.row { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.spread { justify-content: space-between; }
.grow { flex: 1; }
.hidden { display: none !important; }
.mt { margin-top: 1rem; } .mb { margin-bottom: 1rem; }

/* ---------- texnik iş banneri ---------- */
.maint {
  position: sticky; top: 0; z-index: 30;
  background: #ffd84a; color: #3a2a00; font-weight: 600; font-size: .92rem;
  padding: .55rem 1rem; text-align: center;
  border-bottom: 4px solid transparent;
  border-image: repeating-linear-gradient(-45deg, #2b2100 0 10px, #ffd84a 10px 20px) 4;
}
.maint b { font-weight: 800; }
body.has-maint .topbar { top: var(--maint-h, 42px); }

/* ---------- sarlavha ---------- */
.topbar {
  background: rgba(11, 16, 38, .92); color: #dfe6ff;
  backdrop-filter: saturate(160%) blur(12px); -webkit-backdrop-filter: saturate(160%) blur(12px);
  position: sticky; top: 0; z-index: 10;
  border-bottom: 1px solid rgba(124, 92, 255, .25);
}
.topbar-in { max-width: 1180px; margin: 0 auto; padding: .55rem 1rem; display: flex; align-items: center; gap: 1rem; flex-wrap: nowrap; }
.brand { font-weight: 700; display: flex; align-items: center; gap: .65rem; color: #fff; font-size: 1rem; }
.brand:hover { text-decoration: none; }
.brand-logo {
  width: 36px; height: 36px; flex: none; border-radius: 10px;
  background: var(--grad); color: #fff;
  display: grid; place-items: center; font-family: var(--display); font-weight: 700; font-size: 14px; letter-spacing: .02em;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .15) inset, 0 6px 18px rgba(59, 91, 255, .45);
}
.brand-sub { display: block; font-size: .7rem; font-weight: 500; color: #9aa6d6; line-height: 1.15; margin-top: 2px; }
.topbar .brand { flex: none; }
.nav { display: flex; gap: .15rem; flex: 1; min-width: 0; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { padding: .42rem .75rem; border-radius: 9px; color: #b3bde6; font-weight: 500; font-size: .9rem; white-space: nowrap; }
.nav a:hover { background: rgba(255, 255, 255, .07); color: #fff; text-decoration: none; }
.nav a.active { background: rgba(59, 91, 255, .22); color: #fff; box-shadow: inset 0 0 0 1px rgba(124, 92, 255, .5); }
.user-box { margin-left: auto; display: flex; align-items: center; gap: .55rem; flex: none; }
.uname { color: #fff; font-weight: 500; }
.role-chip { font-size: .74rem; padding: .15rem .6rem; border-radius: 99px; background: rgba(34, 211, 238, .14); color: #a5f0fb; }
.topbar .btn { background: rgba(255, 255, 255, .04); color: #dfe6ff; border-color: rgba(255, 255, 255, .16); }
.topbar .btn:hover { background: rgba(255, 255, 255, .12); }
.topbar .btn-primary { background: var(--grad); border-color: transparent; color: #fff; }
@media (max-width: 1280px) { .user-box .uname { display: none; } }
@media (max-width: 900px) {
  .topbar-in { flex-wrap: wrap; }
  .nav { order: 3; flex-basis: 100%; }
}
main { width: 100%; max-width: 1180px; margin: 0 auto; padding: 1.75rem 1rem 3.5rem; flex: 1; }

/* ---------- kartalar ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.25rem; }
.card + .card { margin-top: 1rem; }
.grid > .card + .card { margin-top: 0; }
.grid { display: grid; gap: 1rem; }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.grid-cards { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.stat { position: relative; color: var(--text); overflow: hidden; }
.stat::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--grad); }
a.stat:hover { text-decoration: none; border-color: #c7d0f5; }
.stat .num { font-family: var(--display); font-size: 1.9rem; font-weight: 600; color: var(--heading); line-height: 1.15; font-variant-numeric: tabular-nums; }
.stat .lbl { color: var(--muted); font-size: .88rem; }

/* ---------- formalar ---------- */
label { display: block; font-weight: 600; font-size: .87rem; margin-bottom: .3rem; color: #27314f; }
.field { margin-bottom: .9rem; }
input[type=text], input[type=password], input[type=number], input[type=date], select, textarea {
  width: 100%; padding: .6rem .75rem; border: 1px solid #d5dcec; border-radius: 10px;
  font: inherit; background: #fff; color: inherit; transition: border-color .12s, box-shadow .12s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(59, 91, 255, .14); }
textarea { resize: vertical; min-height: 70px; }
.check { display: flex; align-items: center; gap: .45rem; font-weight: 400; cursor: pointer; color: var(--text); }
.check input { width: 17px; height: 17px; accent-color: var(--primary); }

.btn {
  display: inline-flex; align-items: center; gap: .35rem; justify-content: center;
  padding: .52rem 1rem; border-radius: 10px; border: 1px solid #d5dcec;
  background: #fff; color: var(--text); font: inherit; font-weight: 600; font-size: .9rem; cursor: pointer; white-space: nowrap;
  transition: background .12s, border-color .12s, box-shadow .12s;
}
.btn:hover { background: #f3f5fd; text-decoration: none; }
.btn:disabled { opacity: .55; cursor: default; }
.btn-primary { background: var(--grad); border-color: transparent; color: #fff; box-shadow: 0 6px 16px rgba(59, 91, 255, .28); }
.btn-primary:hover { background: var(--grad); box-shadow: 0 8px 22px rgba(59, 91, 255, .4); }
.btn-danger { color: var(--red); }
.btn-danger:hover { background: var(--red-soft); }
.btn-sm { padding: .3rem .65rem; font-size: .83rem; border-radius: 8px; }
.btn-block { width: 100%; }

/* ---------- jadvallar ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: .62rem .55rem; border-bottom: 1px solid #edf0f7; vertical-align: middle; }
th { font-size: .8rem; color: var(--muted); font-weight: 600; background: #f8f9fd; }
tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: #fafbff; }

.badge { display: inline-block; padding: .14rem .58rem; border-radius: 99px; font-size: .78rem; font-weight: 600; }
.b-green { background: var(--green-soft); color: var(--green); }
.b-red { background: var(--red-soft); color: var(--red); }
.b-amber { background: var(--amber-soft); color: var(--amber); }
.b-gray { background: #eef1f8; color: var(--muted); }
.b-blue { background: var(--primary-soft); color: var(--primary); }
.b-teal { background: var(--teal-soft); color: var(--teal); }

/* ---------- kiriş sahifasi: tarmoq panel + forma ---------- */
.auth-wrap { flex: 1; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(340px, .9fr); min-height: calc(100vh - 60px); }
.auth-board { background: var(--ink); color: #dfe6ff; padding: 3rem clamp(1.5rem, 5vw, 4rem); display: flex; flex-direction: column; justify-content: center; position: relative; overflow: hidden; isolation: isolate; }
.auth-board > *:not(.net):not(.glow) { position: relative; z-index: 1; }
.auth-board h1 { color: #fff; font-size: clamp(1.6rem, 3vw, 2.3rem); max-width: 18ch; }
.auth-board p { color: #aab4dc; max-width: 46ch; }
.auth-side { display: grid; place-items: center; padding: 2rem 1rem; }
.auth-card { width: 100%; max-width: 390px; }
.auth-card .brand { color: var(--heading); justify-content: center; margin-bottom: 1.1rem; font-size: 1.1rem; }
.auth-card h2 { text-align: center; }
@media (max-width: 820px) {
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-board { padding: 2.2rem 1.25rem; min-height: 220px; }
}

/* ---------- jonli neyron tarmoq (canvas) ---------- */
.net { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.glow { position: absolute; z-index: 0; border-radius: 50%; filter: blur(70px); opacity: .55; pointer-events: none; }
.glow.g1 { width: 420px; height: 420px; background: #3b5bff; top: -120px; right: -80px; }
.glow.g2 { width: 360px; height: 360px; background: #7c5cff; bottom: -140px; left: -100px; opacity: .4; }
.tech-chips { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: 1.4rem; }
.tech-chips span { font-size: .8rem; padding: .3rem .7rem; border-radius: 99px; border: 1px solid rgba(124, 92, 255, .45); background: rgba(59, 91, 255, .12); color: #c9d2ff; }

/* ---------- fan ikonkasi (gradientli ilova ikonkasi) ---------- */
.el-tile {
  display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 13px; flex: none;
  color: #fff; font-family: var(--display); font-weight: 600; font-size: 1rem;
  background: linear-gradient(135deg, #3b5bff, #7c5cff); box-shadow: 0 6px 16px rgba(59, 91, 255, .25);
}
.el-tile.c1 { background: linear-gradient(135deg, #3b5bff, #6d5dfc); }
.el-tile.c2 { background: linear-gradient(135deg, #0ea5b7, #22d3ee); box-shadow: 0 6px 16px rgba(14, 165, 183, .25); }
.el-tile.c3 { background: linear-gradient(135deg, #7c5cff, #c05cff); box-shadow: 0 6px 16px rgba(124, 92, 255, .25); }
.el-tile.c4 { background: linear-gradient(135deg, #f0567a, #ff8a5c); box-shadow: 0 6px 16px rgba(240, 86, 122, .22); }

/* ---------- savol muharriri ---------- */
.q-edit { border: 1px solid var(--line); border-radius: 12px; padding: 1rem; margin-bottom: .9rem; background: #fff; border-left: 3px solid var(--violet); }
.q-edit-head { display: flex; align-items: center; gap: .5rem; margin-bottom: .6rem; }
.q-num { font-family: var(--display); font-weight: 600; color: var(--primary); }
.opt-row { display: flex; align-items: center; gap: .5rem; margin-bottom: .4rem; }
.opt-row input[type=radio] { width: 18px; height: 18px; accent-color: var(--green); flex: none; }
.opt-letter { width: 1.4rem; font-weight: 700; color: var(--muted); flex: none; }

/* ---------- test işlaş ---------- */
.take-head { position: sticky; top: 56px; z-index: 5; padding: .5rem 0; }
.timer { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 1.15rem; padding: .35rem .85rem; border-radius: 10px; background: var(--ink); color: #fff; box-shadow: inset 0 0 0 1px rgba(124, 92, 255, .5); }
.timer.warn { background: var(--red); box-shadow: none; }
.qnav { display: flex; flex-wrap: wrap; gap: .35rem; }
.qnav button { width: 34px; height: 34px; border-radius: 9px; border: 1px solid #d5dcec; background: #fff; cursor: pointer; font: inherit; font-weight: 700; font-size: .85rem; color: var(--text); }
.qnav button.done { background: var(--grad); border-color: transparent; color: #fff; }
.question { scroll-margin-top: 140px; }
.question .qtext { font-size: 1.05rem; line-height: 1.6; margin-bottom: .8rem; white-space: pre-wrap; color: var(--heading); font-weight: 500; }
.option {
  display: flex; gap: .6rem; align-items: flex-start; padding: .68rem .9rem; border: 1px solid #dbe1ef;
  border-radius: 11px; margin-bottom: .45rem; cursor: pointer; background: #fff; white-space: pre-wrap; font-weight: 400;
}
.option:hover { border-color: #a9b8ff; }
.option input { margin-top: .25rem; accent-color: var(--primary); }
.option.sel { border-color: var(--primary); background: var(--primary-soft); box-shadow: 0 0 0 3px rgba(59, 91, 255, .1); }
.option.correct { border-color: #86d3a0; background: var(--green-soft); }
.option.wrong { border-color: #f0a8b0; background: var(--red-soft); }

.result-big { text-align: center; padding: 2rem 1rem; }
.result-big .pct { font-family: var(--display); font-size: 3.2rem; font-weight: 600; line-height: 1.1; }
.bar { height: 8px; background: #e6eaf5; border-radius: 99px; overflow: hidden; min-width: 80px; }
.bar > span { display: block; height: 100%; background: var(--primary); }

/* ---------- oyna va xabarlar ---------- */
.modal { position: fixed; inset: 0; background: rgba(11, 16, 38, .55); backdrop-filter: blur(4px); display: grid; place-items: center; z-index: 50; padding: 1rem; }
.modal-box { background: #fff; border-radius: 16px; padding: 1.4rem; width: 100%; max-width: 560px; max-height: 90vh; overflow: auto; box-shadow: 0 30px 80px rgba(11, 16, 38, .35); }
#toast { position: fixed; bottom: 1.2rem; left: 50%; transform: translateX(-50%); z-index: 60; display: flex; flex-direction: column; gap: .5rem; align-items: center; }
.toast { background: var(--ink); color: #fff; padding: .62rem 1.1rem; border-radius: 10px; box-shadow: var(--shadow); font-size: .92rem; border: 1px solid rgba(124, 92, 255, .4); }
.toast.err { background: var(--red); border-color: transparent; }
.empty { text-align: center; padding: 2.5rem 1rem; color: var(--muted); }
.creds td { font-family: ui-monospace, Consolas, monospace; font-size: .9rem; }
.creds td:first-child { font-family: var(--sans); }

/* ---------- qatʼiy rejim ---------- */
.strict-box { border: 1px dashed #bcc8f5; border-radius: 12px; padding: .8rem 1rem; background: #f8f9ff; }
body.exam-mode .topbar, body.exam-mode .site-foot { display: none; }
body.exam-mode main { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
body.exam-mode .take-head { top: 0; }
body.exam-mode.has-maint .take-head { top: var(--maint-h, 42px); }
body.exam-mode .question { scroll-margin-top: 110px; }
.watermark { position: fixed; inset: 0; pointer-events: none; z-index: 4; background-repeat: repeat; }
#paper { transition: filter .15s; }
#paper.blurred { filter: blur(14px); pointer-events: none; }
.gate { position: fixed; inset: 0; z-index: 40; background: rgba(11, 16, 38, .62); backdrop-filter: blur(3px); display: grid; place-items: center; padding: 1rem; }
.gate-box { background: #fff; border-radius: 18px; padding: 1.6rem; max-width: 470px; width: 100%; text-align: center; box-shadow: 0 20px 60px rgba(0, 0, 0, .25); }
.gate-icon { font-size: 2.6rem; margin-bottom: .3rem; }
.gate .rules { text-align: left; padding-left: 1.2rem; margin: 1rem 0 1.3rem; }
.gate .rules li { margin-bottom: .35rem; }
.viol-num { font-family: var(--display); font-size: 2.3rem; font-weight: 600; color: var(--red); margin: .3rem 0; }
.help-step { border: 1px solid var(--line); border-radius: 12px; padding: .8rem 1rem; margin-bottom: .7rem; }
.help-step ol { margin: .3rem 0 0; padding-left: 1.2rem; }
.help-step li { margin-bottom: .4rem; }

/* ---------- bólimlar ---------- */
.tabs { display: flex; gap: .2rem; flex-wrap: wrap; border-bottom: 1px solid #dde3f1; }
.tabs a { padding: .55rem .9rem; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a:hover { color: var(--heading); text-decoration: none; }
.tabs a.active { color: var(--primary); border-bottom-color: var(--primary); }
tr.me-row td { background: var(--primary-soft); }
.dropzone { display: block; text-align: center; padding: 2rem 1rem; border: 2px dashed #b6c3fb; cursor: pointer; background: #f8f9ff; }
.dropzone.over { border-color: var(--primary); background: var(--primary-soft); }
.dropzone.busy { opacity: .6; pointer-events: none; }
.spinner { width: 46px; height: 46px; margin: 0 auto; border: 4px solid var(--primary-soft); border-top-color: var(--primary); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.key-q { padding: 1rem; }
.key-q.missing { border-color: #f0d38c; background: #fffcf3; }
.key-q textarea { min-height: 42px; }
.key-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: .45rem; margin-top: .6rem; }
.key-opt { display: flex; gap: .4rem; align-items: center; }
.key-opt .letter { width: 36px; height: 36px; flex: none; border-radius: 50%; border: 2px solid var(--line); background: #fff; cursor: pointer; font: inherit; font-weight: 700; }
.key-opt .letter:hover { border-color: var(--green); }
.key-opt.is-correct .letter { background: var(--green); border-color: var(--green); color: #fff; }
.key-opt.is-correct input { border-color: #86d3a0; background: var(--green-soft); }
.grid-subjects { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.subject-card { display: flex; flex-direction: column; gap: .4rem; color: var(--text); }
.subject-card:hover { text-decoration: none; border-color: #b6c3fb; }
.task-card.today { border-color: #a9b8ff; box-shadow: 0 0 0 3px var(--primary-soft); }
.cert-layout { display: grid; grid-template-columns: 1fr 320px; gap: 1rem; align-items: start; }
@media (max-width: 860px) { .cert-layout { grid-template-columns: 1fr; } }
code { background: #eef1fa; padding: .1rem .35rem; border-radius: 5px; font-size: .88em; }

/* ---------- portal (boş sahifa) ---------- */
.portal-top { background: transparent; border-bottom: 0; backdrop-filter: none; -webkit-backdrop-filter: none; position: absolute; top: 0; left: 0; right: 0; z-index: 5; }
body.has-maint .portal-top { top: var(--maint-h, 42px); }
.portal-hero { background: var(--ink); color: #fff; padding: 6rem 1rem 3.6rem; position: relative; overflow: hidden; isolation: isolate; }
.portal-hero-in { max-width: 1180px; margin: 0 auto; position: relative; z-index: 1; }
.portal-hero h1 { color: #fff; font-size: clamp(1.8rem, 4.2vw, 3.1rem); margin-bottom: .8rem; max-width: 20ch; line-height: 1.12; }
.portal-hero p { max-width: 56ch; margin: 0 0 1.6rem; color: #aab4dc; font-size: 1.03rem; }
.portal-search { max-width: 560px; }
.portal-search input { padding: .9rem 1.15rem; font-size: 1.02rem; border-radius: 14px; border: 1px solid rgba(124, 92, 255, .5); background: rgba(255, 255, 255, .96); box-shadow: 0 14px 40px rgba(0, 0, 0, .3); }
.portal-stats { display: flex; gap: 2rem; margin-top: 1.5rem; flex-wrap: wrap; color: #aab4dc; }
.portal-stats b { font-family: var(--display); font-size: 1.6rem; font-weight: 600; color: #fff; display: block; line-height: 1.1; }
.chips { display: flex; gap: .4rem; flex-wrap: wrap; }
.chip { border: 1px solid #d5dcec; background: #fff; border-radius: 99px; padding: .36rem .88rem; cursor: pointer; font: inherit; font-size: .88rem; color: var(--muted); }
.chip span { background: #eef1f8; border-radius: 99px; padding: 0 .4rem; margin-left: .2rem; font-size: .78rem; }
.chip.active { background: var(--ink); border-color: var(--heading); color: #fff; }
.chip.active span { background: rgba(255, 255, 255, .2); }
.region { margin-bottom: 1.6rem; }
.region h2 { font-size: 1rem; color: var(--muted); }
.school-card { display: flex; align-items: center; gap: .9rem; color: var(--text); }
.school-card:hover { text-decoration: none; border-color: #b6c3fb; }
.school-card > div { flex: 1; }
.school-card .go { color: var(--primary); font-size: 1.2rem; }
.continue-card { display: block; margin-bottom: 1rem; background: var(--primary-soft); border-color: #c8d2ff; color: var(--text); }
.exam-box { border: 1px solid #d6defc; background: #f8f9ff; border-radius: 12px; padding: .8rem 1rem; }
.period-card { border-left: 3px solid var(--cyan); }
.gb { display: inline-block; min-width: 54px; text-align: center; padding: .15rem .4rem; border-radius: 7px; font-weight: 700; font-size: .85rem; }
.gb.g5 { background: var(--green-soft); color: var(--green); }
.gb.g4 { background: var(--primary-soft); color: var(--primary); }
.gb.g3 { background: var(--amber-soft); color: var(--amber); }
.gb.g2 { background: var(--red-soft); color: var(--red); }
.mark { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; color: #fff; }
.mark.m5 { background: var(--green); } .mark.m4 { background: var(--primary); } .mark.m3 { background: var(--amber); } .mark.m2 { background: var(--red); }
.gb-matrix th.vh { height: 150px; vertical-align: bottom; padding: .3rem .2rem; min-width: 60px; }
.gb-matrix th.vh span { writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap; font-size: .78rem; }
.gb-matrix td { text-align: center; } .gb-matrix td:nth-child(2) { text-align: left; white-space: nowrap; }
.total-row td { background: #f4f6fb; }

/* ---------- ota-onalar ---------- */
.child-card { display: grid; grid-template-columns: auto 1fr; gap: 1rem; align-items: start; color: var(--text); }
a.child-card:hover { text-decoration: none; border-color: #b6c3fb; }
.avatar { width: 56px; height: 56px; border-radius: 16px; background: var(--grad); color: #fff; display: grid; place-items: center; font-family: var(--display); font-size: 1.2rem; font-weight: 600; box-shadow: 0 8px 20px rgba(59, 91, 255, .3); }
.kv { display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; margin-top: .55rem; }
.kv div { font-size: .84rem; color: var(--muted); }
.kv b { display: block; font-family: var(--display); font-size: 1.2rem; font-weight: 600; color: var(--heading); }
.child-head { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }

/* ---------- xavfsizlik ---------- */
.sev { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: .35rem; vertical-align: middle; }
.sev-low { background: #9aa6c3; } .sev-medium { background: #f2b600; } .sev-high { background: #f0563c; } .sev-critical { background: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
.switch-card { border-left: 4px solid #f2b600; }

/* ---------- sahifa osti ---------- */
.site-foot { background: var(--ink); color: #9aa6d6; font-size: .88rem; margin-top: auto; border-top: 1px solid rgba(124, 92, 255, .25); }
.site-foot-in { max-width: 1180px; margin: 0 auto; padding: 1.1rem 1rem; display: flex; gap: .6rem 2rem; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.site-foot a { color: #fff; font-weight: 600; white-space: nowrap; }
.site-foot .phones { display: flex; gap: .4rem 1rem; flex-wrap: wrap; align-items: center; }
.site-foot .by { color: #8590c0; }
.site-foot .by b { color: #7fe7f7; font-weight: 700; }

@media print { body.exam-mode main { display: none !important; } }
@media print {
  .topbar, .no-print, #toast, .maint, .site-foot { display: none !important; }
  body { background: #fff; }
  .card { box-shadow: none; border: none; padding: 0; }
}
@media (max-width: 640px) {
  .take-head { top: 0; }
  h1 { font-size: 1.35rem; }
  main { padding-top: 1.25rem; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

.nav { -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent); mask-image: linear-gradient(90deg, #000 88%, transparent); padding-right: 1.5rem; }

/* =====================================================================
   🖼 Logotiplar
   ===================================================================== */
:root { --heading: #0b1026; }
.brand-img { width: 38px; height: 38px; flex: none; border-radius: 10px; object-fit: contain; background: #fff; padding: 3px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .25), 0 6px 18px rgba(0, 0, 0, .25); }
.auth-card .brand-img { width: 44px; height: 44px; box-shadow: 0 0 0 1px var(--line); }
.school-logo { width: 46px; height: 46px; flex: none; border-radius: 13px; object-fit: contain; background: #fff; padding: 3px; border: 1px solid var(--line); }
.school-logo.sm { width: 34px; height: 34px; border-radius: 9px; }
.logo-card { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.logo-preview { width: 72px; height: 72px; border-radius: 16px; border: 1px dashed #c3cdee; display: grid; place-items: center; text-align: center; background: #fff; overflow: hidden; }
.logo-preview img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
/* hamkorlar (bosh sahifa tepasida) */
.partners { display: flex; flex-wrap: wrap; gap: .7rem 1.4rem; align-items: center; margin-bottom: 1.8rem; }
.partner { display: flex; align-items: center; gap: .6rem; color: #dfe6ff; font-size: .85rem; font-weight: 600; max-width: 260px; line-height: 1.25; }
.partner:hover { text-decoration: none; color: #fff; }
.partner-img { width: 52px; height: 52px; flex: none; border-radius: 14px; background: #fff; display: grid; place-items: center; overflow: hidden; box-shadow: 0 8px 22px rgba(0, 0, 0, .3); }
.partner-img img { width: 100%; height: 100%; object-fit: contain; padding: 5px; }
.partner-img.light { box-shadow: 0 0 0 1px var(--line); }
.partner-admin { display: grid; gap: .6rem; }
.partner-row { display: flex; gap: .8rem; align-items: center; padding: .5rem; border: 1px solid var(--line); border-radius: 12px; }
@media (max-width: 640px) { .partner-name { display: none; } }
/* kiriş sahifasidagi rejim tugmasi */
.auth-side { position: relative; }
.auth-tools { position: absolute; top: 1rem; right: 1rem; }
.theme-btn { min-width: 36px; font-size: 1rem; line-height: 1; }

/* =====================================================================
   🌙 Tungi rejim
   ===================================================================== */
[data-theme="dark"] {
  color-scheme: dark;
  --heading: #f1f3ff;
  --bg: #060a1c;
  --card: #10163a;
  --text: #e3e8ff;
  --muted: #98a3cf;
  --line: #242d5c;
  --primary: #6b85ff;
  --primary-soft: rgba(91, 117, 255, .18);
  --green: #3ddc8f; --green-soft: rgba(61, 220, 143, .14);
  --red: #ff6b7f; --red-soft: rgba(255, 107, 127, .14);
  --amber: #ffc24a; --amber-soft: rgba(255, 194, 74, .14);
  --teal: #4fe0f2; --teal-soft: rgba(79, 224, 242, .14);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px rgba(0, 0, 0, .35);
}
[data-theme="dark"] body { background-image: radial-gradient(rgba(124, 146, 255, .12) 1px, transparent 1.2px); }
[data-theme="dark"] label { color: #c5cdf2; }
[data-theme="dark"] input[type=text], [data-theme="dark"] input[type=password], [data-theme="dark"] input[type=number],
[data-theme="dark"] input[type=date], [data-theme="dark"] select, [data-theme="dark"] textarea { background: #0b1130; border-color: #2c3668; color: var(--text); }
[data-theme="dark"] .btn { background: #141b45; border-color: #2c3668; color: var(--text); }
[data-theme="dark"] .btn:hover { background: #1b2356; }
[data-theme="dark"] .btn-primary { background: var(--grad); border-color: transparent; color: #fff; }
[data-theme="dark"] .btn-danger { color: var(--red); }
[data-theme="dark"] th { background: #0d1334; }
[data-theme="dark"] th, [data-theme="dark"] td { border-bottom-color: #1e2650; }
[data-theme="dark"] tbody tr:hover td { background: #131a43; }
[data-theme="dark"] .b-gray, [data-theme="dark"] .chip span, [data-theme="dark"] code { background: #1a2150; color: var(--muted); }
[data-theme="dark"] .option, [data-theme="dark"] .qnav button, [data-theme="dark"] .q-edit, [data-theme="dark"] .key-opt .letter,
[data-theme="dark"] .modal-box, [data-theme="dark"] .gate-box, [data-theme="dark"] .chip { background: var(--card); border-color: #2c3668; color: var(--text); }
[data-theme="dark"] .chip.active { background: var(--primary); border-color: var(--primary); }
[data-theme="dark"] .option.sel { background: var(--primary-soft); border-color: var(--primary); }
[data-theme="dark"] .option.correct { background: var(--green-soft); border-color: #2c8a5c; }
[data-theme="dark"] .option.wrong { background: var(--red-soft); border-color: #8a2c3a; }
[data-theme="dark"] .strict-box, [data-theme="dark"] .exam-box, [data-theme="dark"] .dropzone { background: #0d1334; border-color: #2c3668; }
[data-theme="dark"] .total-row td, [data-theme="dark"] tr.me-row td { background: #151c48; }
[data-theme="dark"] .key-q.missing { background: rgba(255, 194, 74, .06); border-color: #6b5420; }
[data-theme="dark"] .tabs { border-bottom-color: #242d5c; }
[data-theme="dark"] .bar { background: #1e2650; }
[data-theme="dark"] .timer { background: #1b2356; }
[data-theme="dark"] .continue-card { background: var(--primary-soft); border-color: #34408a; }
[data-theme="dark"] .logo-preview { background: #0b1130; border-color: #34408a; }
[data-theme="dark"] .partner-row { border-color: #242d5c; }
[data-theme="dark"] .card[style*="background:var(--amber-soft)"] { border-color: #6b5420; }

/* litsey logotipi — dumaloq muhrlar uçun */
.brand-img { border-radius: 50%; padding: 0; width: 40px; height: 40px; }
.auth-card .brand-img { width: 64px; height: 64px; }
.auth-card .brand { flex-direction: column; gap: .5rem; }
.board-logo { width: 120px; height: 120px; border-radius: 50%; object-fit: contain; margin-bottom: 1.2rem; box-shadow: 0 0 0 6px rgba(255, 255, 255, .08), 0 18px 50px rgba(59, 91, 255, .45); }
.school-logo { border-radius: 50%; padding: 0; }
.logo-preview img { padding: 0; border-radius: 50%; }
@media (max-width: 820px) { .board-logo { width: 84px; height: 84px; } }

/* hamkorlar — dumaloq nishonlar */
.partner-img { width: 68px; height: 68px; border-radius: 50%; background: transparent; box-shadow: 0 0 0 3px rgba(255, 255, 255, .12), 0 10px 28px rgba(0, 0, 0, .35); }
.partner-img img { padding: 0; }
.partner-img.light { width: 48px; height: 48px; box-shadow: 0 0 0 1px var(--line); }
.partner { font-size: .9rem; max-width: 240px; }
.partners { gap: .9rem 1.8rem; }

/* =====================================================================
   Litsey Test Markazi — brend
   ===================================================================== */
.brand-icon { width: 38px; height: 38px; flex: none; border-radius: 9px; object-fit: contain; filter: drop-shadow(0 6px 14px rgba(255, 176, 32, .35)); }
.auth-card .brand-icon { width: 56px; height: 56px; }
/* rasmiy chiziq: vazirlik va agentlik logotiplari (tungi rejimda ham ochiq — logotiplar yaxşi kórinsin) */
.gov-band { background: #fff; border-bottom: 1px solid #e3e7f2; position: relative; z-index: 6; }
.gov-band-in { max-width: 1180px; margin: 0 auto; padding: .7rem 1rem; display: flex; align-items: center; gap: 1rem; }
.gov-logos { display: flex; align-items: center; gap: 1.2rem 2.4rem; flex-wrap: wrap; flex: 1; min-width: 0; }
.gov-logo { display: flex; align-items: center; gap: .75rem; color: #0b1026; font-weight: 700; font-size: .92rem; line-height: 1.25; max-width: 330px; }
.gov-logo:hover { text-decoration: none; color: #2a3fd6; }
.gov-logo img { height: 74px; width: auto; max-width: 120px; object-fit: contain; flex: none; }
.gov-band .user-box { margin-left: auto; }
.gov-band .btn { background: #fff; color: #0b1026; border-color: #d5dcec; }
.gov-band .btn-primary { background: var(--grad); color: #fff; border-color: transparent; }
@media (max-width: 760px) {
  .gov-band-in { flex-wrap: wrap; }
  .gov-logo span { display: none; }
  .gov-logo img { height: 58px; }
  .gov-logos { gap: 1rem; }
}
/* bosh sahifa: katta logotip */
.portal-hero { padding-top: 3rem; }
.hero-lockup { margin: 0 0 1.2rem; max-width: 560px; }
.hero-lockup img { display: block; width: 100%; height: auto; }
@media (max-width: 640px) { .hero-lockup { max-width: 100%; } .portal-hero { padding-top: 2rem; } }

.portal-hero h1.hero-lockup { max-width: 500px; font-size: inherit; margin: 0 0 1.4rem; }
@media (max-width: 640px) { .portal-hero h1.hero-lockup { max-width: 100%; } }

/* bosh sahifa: ixçam sarlavha (ikonka + nom), ostida hamkorlar çizig'i */
.portal-head .brand { font-size: 1.02rem; }
.portal-head .brand-icon { width: 40px; height: 40px; }
.gov-band { position: static; }
.gov-band-in { justify-content: center; padding: .6rem 1rem; }
.gov-logos { justify-content: center; flex: 0 1 auto; gap: 1rem 3rem; }
.gov-logo img { height: 60px; max-width: 100px; }
.gov-logo { font-size: .88rem; max-width: 300px; }
.portal-hero { padding: 3.2rem 1rem 3.4rem; }
.portal-hero h1 { font-size: clamp(1.7rem, 3.6vw, 2.7rem); max-width: 22ch; }
@media (max-width: 760px) { .gov-logo img { height: 50px; } .gov-logos { gap: 1.2rem; } }

@media (max-width: 900px) { .portal-head .topbar-in { flex-wrap: nowrap; } }
@media (max-width: 640px) { .portal-head .brand-sub { display: none; } .portal-head .brand { font-size: .95rem; } }

/* hamkorlar — to'q fonda, çap tomonda, oq çiziqsiz */
.hero-partners { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2.4rem; margin: 0 0 2rem; }
.hero-partner { display: flex; align-items: center; gap: .85rem; color: #e6ebff; font-weight: 600; font-size: .95rem; line-height: 1.3; max-width: 320px; }
.hero-partner:hover { text-decoration: none; color: #fff; }
.hero-partner img { height: 64px; width: auto; max-width: 110px; object-fit: contain; flex: none; }
@media (max-width: 640px) { .hero-partner span { display: none; } .hero-partner img { height: 52px; } .hero-partners { gap: 1.2rem; } }
.partner-img.light { background: var(--ink); }
/* til tanlaş */
.lang-sel { width: auto; padding: .3rem 1.6rem .3rem .55rem; font-size: .84rem; font-weight: 600; border-radius: 8px; cursor: pointer;
  background: rgba(255, 255, 255, .04) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%239aa6d6'/%3E%3C/svg%3E") no-repeat right .55rem center;
  -webkit-appearance: none; appearance: none; color: #dfe6ff; border: 1px solid rgba(255, 255, 255, .16); }
.lang-sel option { color: #0f172a; background: #fff; }
.auth-tools { display: flex; gap: .4rem; }
.auth-tools .lang-sel { background-color: #fff; color: var(--text); border-color: #d5dcec; }
[data-theme="dark"] .auth-tools .lang-sel { background-color: #141b45; color: var(--text); border-color: #2c3668; }
@media (max-width: 640px) { .topbar .lang-sel { max-width: 92px; } }
@media (max-width: 640px) {
  .portal-head .topbar-in { gap: .5rem; }
  .portal-head .brand { flex: 1 1 auto; min-width: 0; font-size: .86rem; }
  .portal-head .brand > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .portal-head .brand-icon { width: 34px; height: 34px; }
  .topbar .lang-sel { max-width: 62px; padding-right: 1.2rem; }
  .user-box { gap: .35rem; }
}
