/* =========================================================
   MyTest Uz — klassik Windows (MyTest) ko'rinishi
   ========================================================= */

:root{
  --face:#f0f0f0;
  --face-2:#e8e8e8;
  --face-grad-a:#fdfdfd;
  --face-grad-b:#e4e4e4;
  --border:#adadad;
  --border-dk:#7a7a7a;
  --border-lt:#ffffff;
  --client:#ffffff;
  --sel:#cce8ff;
  --sel-bd:#99d1ff;
  --hot:#e5f3ff;
  --hot-bd:#a7d3f3;
  --text:#000000;
  --text-dim:#5a5a5a;
  --mt-green:#1a9e5c;
  --mt-green-dk:#137a46;
  --mt-blue:#0a3d91;
  --ok:#1a9e5c;
  --bad:#c42b1c;
  --warn:#b8860b;
  --menu-hi:#91c9f7;
  --font:"Tahoma","Segoe UI","DejaVu Sans",sans-serif;
  --mono:"Consolas","DejaVu Sans Mono",monospace;
  --fs:1;   /* savol matni kattaligi — A−/A+ boshqaradi */
}

*{box-sizing:border-box}
button,.opt,.tile,.menu-item,.li,.subrow,.radioline,.tab,.winbtn{touch-action:manipulation}
html,body{height:100%}
body{
  margin:0;padding:0;
  /* telefonda ikki marta bosilganda ekran yaqinlashib ketmasin
     (barmoq bilan kengaytirish — pinch — baribir ishlayveradi) */
  touch-action:manipulation;
  -webkit-text-size-adjust:100%;
  font-family:var(--font);
  font-size:12px;
  color:var(--text);
  background:#5b7fa6;
  background-image:linear-gradient(160deg,#6d8fb5 0%,#43607f 100%);
  -webkit-font-smoothing:antialiased;
  overflow:hidden;
}

/* ---------- Oyna ---------- */
.window{
  position:fixed;inset:8px;
  display:flex;flex-direction:column;
  background:var(--face);
  border:1px solid #5a6a7a;
  border-radius:6px 6px 3px 3px;
  box-shadow:0 10px 40px rgba(0,0,0,.45),0 0 0 1px rgba(255,255,255,.35) inset;
  overflow:hidden;
}

/* ---------- Sarlavha paneli ---------- */
.titlebar{
  display:flex;align-items:center;gap:7px;
  height:29px;flex:0 0 29px;padding:0 4px 0 7px;
  background:linear-gradient(180deg,#f6f9fc 0%,#e3ecf5 48%,#d6e2ee 52%,#e9f0f7 100%);
  border-bottom:1px solid #b7c4d2;
  user-select:none;
}
.titlebar .logo{width:16px;height:16px;flex:0 0 16px}
.titlebar .title{font-size:12px;font-weight:700;color:#14314f;letter-spacing:.1px}
.titlebar .title small{font-weight:400;color:#5a6a7a}
.titlebar .spacer{flex:1}
.winbtns{display:flex;gap:2px}
.winbtn{
  width:29px;height:21px;border:1px solid transparent;border-radius:3px;
  background:transparent;display:grid;place-items:center;cursor:default;
}
.winbtn:hover{background:#e6effa;border-color:#b6ccdf}
.winbtn.close:hover{background:#e81123;border-color:#c50f1f}
.winbtn.close:hover svg{stroke:#fff}
.winbtn svg{stroke:#2b3c4d;stroke-width:1.1;fill:none}

/* ---------- Menyu ---------- */
.menubar{
  display:flex;align-items:stretch;height:22px;flex:0 0 22px;
  background:var(--face);border-bottom:1px solid #dcdcdc;
  padding:0 2px;user-select:none;
}
.menu{position:relative}
.menu > .menu-title{
  padding:0 9px;height:100%;display:flex;align-items:center;
  font-size:12px;border:1px solid transparent;cursor:default;
}
.menu:hover > .menu-title,.menu.open > .menu-title{
  background:var(--hot);border-color:var(--hot-bd);
}
.menu-pop{
  display:none;position:absolute;top:100%;left:0;z-index:60;
  min-width:212px;padding:2px;
  background:#fff;border:1px solid #b0b0b0;
  box-shadow:3px 3px 9px rgba(0,0,0,.24);
}
.menu.open .menu-pop{display:block}
.menu-item{
  display:flex;align-items:center;gap:8px;
  padding:4px 10px 4px 26px;position:relative;cursor:default;white-space:nowrap;
}
.menu-item:hover{background:var(--sel)}
.menu-item .key{margin-left:auto;padding-left:24px;color:var(--text-dim);font-size:11px}
.menu-item.disabled{color:#9a9a9a}
.menu-item.disabled:hover{background:transparent}
.menu-item .tick{position:absolute;left:8px;color:var(--mt-green);font-weight:700}
.menu-sep{height:1px;background:#e0e0e0;margin:3px 2px}

/* ---------- Toolbar ---------- */
.toolbar{
  display:flex;align-items:center;gap:1px;flex:0 0 32px;height:32px;padding:0 4px;
  background:linear-gradient(180deg,#fbfbfb 0%,#eeeeee 100%);
  border-bottom:1px solid #cfcfcf;user-select:none;overflow-x:auto;
}
.toolbar::-webkit-scrollbar{height:0}
.tbtn{
  display:flex;align-items:center;gap:5px;height:25px;padding:0 7px;
  border:1px solid transparent;border-radius:3px;background:transparent;
  font-family:var(--font);font-size:12px;color:var(--text);cursor:default;white-space:nowrap;
}
.tbtn:hover:not(:disabled){background:var(--hot);border-color:var(--hot-bd)}
.tbtn:active:not(:disabled){background:#cbe4f7;border-color:#7cb7e0}
.tbtn.active{background:var(--sel);border-color:var(--sel-bd)}
.tbtn:disabled{opacity:.42}
.tbtn svg{width:16px;height:16px;flex:0 0 16px}
.tsep{width:1px;height:20px;background:#d0d0d0;margin:0 4px;flex:0 0 1px}
.tspacer{flex:1}

/* ---------- Client ---------- */
.client{flex:1;display:flex;min-height:0;background:var(--face);position:relative}
.pane{display:none;flex:1;min-height:0;min-width:0}
.pane.show{display:flex}

/* ---------- Status bar ---------- */
.statusbar{
  display:flex;align-items:center;flex:0 0 23px;height:23px;
  background:var(--face);border-top:1px solid #dcdcdc;
  font-size:11px;color:#333;user-select:none;
}
.sb{
  padding:0 9px;height:17px;display:flex;align-items:center;gap:6px;
  border:1px solid transparent;margin:0 2px;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0;
}
.sb.sunken{border-color:#c8c8c8 #fff #fff #c8c8c8;background:#f6f6f6}
.sb.grow{flex:1 1 auto;min-width:0}
.sb#sbTest,.sb#sbUser{flex:0 1 auto;max-width:230px}
.sb b{font-weight:700}
.credit{color:#a4b0bb;font-weight:400;font-size:10px;letter-spacing:.2px}
.launcher .foot .credit{font-size:11px}
.sb .dot{width:7px;height:7px;border-radius:50%;background:var(--mt-green);flex:0 0 7px}
.sb .dot.off{background:#b9b9b9}
/* talaba uchun pastda ism·guruh va "Talaba" yorlig'i ko'rinmaydi (minimalizm) */
body:not(.is-teacher) #sbUser,body:not(.is-teacher) #sbRole{display:none}

/* ---------- Umumiy boshqaruvlar ---------- */
button,input,select,textarea{font-family:var(--font);font-size:12px;color:var(--text)}
.btn{
  min-width:82px;height:25px;padding:0 13px;
  background:linear-gradient(180deg,var(--face-grad-a) 0%,var(--face-grad-b) 100%);
  border:1px solid var(--border);border-radius:3px;cursor:default;
}
.btn:hover:not(:disabled){background:linear-gradient(180deg,#eaf6fd 0%,#d7effc 100%);border-color:#4aa3dd}
.btn:active:not(:disabled){background:linear-gradient(180deg,#c4e5f6 0%,#b0dcf4 100%);border-color:#2c8bc8}
.btn:disabled{opacity:.45}
.btn.primary{
  background:linear-gradient(180deg,#2fb673 0%,#159152 100%);
  border-color:var(--mt-green-dk);color:#fff;font-weight:700;
}
.btn.primary:hover:not(:disabled){background:linear-gradient(180deg,#39c47f 0%,#199d5a 100%)}
.btn.danger{background:linear-gradient(180deg,#e26a5e 0%,#c42b1c 100%);border-color:#a42315;color:#fff}
.btn.sm{height:22px;min-width:0;padding:0 9px}

.inp,select.inp,textarea.inp{
  height:23px;padding:2px 6px;background:#fff;
  border:1px solid #7a7a7a;border-radius:2px;outline:none;width:100%;
}
.inp:focus{border-color:#2c8bc8;box-shadow:0 0 0 2px rgba(44,139,200,.18)}
textarea.inp{height:auto;padding:5px 6px;resize:vertical;line-height:1.5}
select.inp{height:23px;padding:1px 4px}
label.fld{display:block;margin-bottom:9px}
label.fld > span{display:block;margin-bottom:3px;color:#333}

.group{
  border:1px solid #d8d8d8;border-radius:3px;margin:0 0 11px;padding:11px 11px 4px;position:relative;background:#fafafa;
}
.group > legend,.group > .gtitle{
  padding:0 5px;margin-left:-3px;font-weight:700;color:#14314f;font-size:12px;
}

/* ---------- Boshlash ekrani ---------- */
.launcher{
  flex:1;min-height:0;display:flex;flex-direction:column;align-items:center;
  justify-content:flex-start;gap:26px;
  overflow-y:auto;padding:24px 16px;
  background:linear-gradient(180deg,#fbfcfd 0%,#eef2f6 100%);
}
/* markazga tortamiz, lekin joy yetmasa tepaga chiqib ketmasin */
.launcher > :first-child{margin-top:auto}
.launcher > :last-child{margin-bottom:auto}
.launcher .brand{display:flex;flex-direction:column;align-items:center;gap:9px;flex:0 0 auto}
.launcher .tiles,.launcher .foot{flex:0 0 auto}
.launcher .brand svg{width:60px;height:60px}

/* past oynada ixchamlashtiramiz */
@media (max-height:620px){
  .launcher{gap:16px;padding:16px 14px}
  .launcher .brand svg{width:42px;height:42px}
  .launcher h1{font-size:20px}
  .tile{padding:13px 11px}
  .tile svg{width:30px;height:30px;margin-bottom:6px}
}
.launcher h1{margin:0;font-size:25px;font-weight:700;color:#14314f;letter-spacing:-.3px}
.launcher .sub{color:var(--text-dim);font-size:12px;margin-top:-4px}
.tiles{display:flex;gap:15px;flex-wrap:wrap;justify-content:center;max-width:760px}
.tile{
  width:172px;padding:19px 15px;text-align:center;cursor:default;
  background:#fff;border:1px solid #d5dde5;border-radius:5px;
  box-shadow:0 1px 3px rgba(20,49,79,.07);transition:.12s;
}
.tile:hover{border-color:var(--mt-green);box-shadow:0 3px 12px rgba(26,158,92,.2);transform:translateY(-2px)}
.tile svg{width:38px;height:38px;margin-bottom:9px}
.tile b{display:block;font-size:13px;color:#14314f;margin-bottom:4px}
.tile span{display:block;color:var(--text-dim);font-size:11px;line-height:1.5}
.launcher .foot{color:#8b98a5;font-size:11px;text-align:center;line-height:1.7}

/* ---------- Ikki panelli tartib (muharrir / jurnal) ---------- */
.split{display:flex;flex:1;min-height:0;min-width:0}
.sidebar{
  flex:0 0 302px;display:flex;flex-direction:column;min-height:0;
  background:var(--face);border-right:1px solid #cfcfcf;
}
.sidebar .sbar-head{
  display:flex;align-items:center;gap:6px;padding:5px 7px;
  border-bottom:1px solid #dcdcdc;background:linear-gradient(180deg,#fbfbfb,#f1f1f1);
}
.sidebar .sbar-head .ttl{font-weight:700;color:#14314f}
.sidebar .sbar-head .cnt{margin-left:auto;color:var(--text-dim)}
.listbox{
  flex:1;overflow-y:auto;background:var(--client);
  border:1px solid #c8c8c8;border-top-color:#9a9a9a;border-left-color:#9a9a9a;
  margin:6px;border-radius:2px;
}
.li{
  display:flex;align-items:flex-start;gap:7px;padding:5px 8px;
  border-bottom:1px solid #f2f2f2;cursor:default;line-height:1.45;
}
.li:hover{background:var(--hot)}
.li.sel{background:var(--sel);border-bottom-color:var(--sel-bd)}
.li .num{
  flex:0 0 26px;text-align:right;color:var(--text-dim);font-variant-numeric:tabular-nums;font-size:11px;
}
.li .body{flex:1;min-width:0}
.li .qt{
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;
}
.li .meta{color:var(--text-dim);font-size:10px;margin-top:2px}
.badge{
  display:inline-block;padding:0 5px;border-radius:8px;font-size:10px;line-height:15px;
  background:#e8eef5;color:#3a5a7a;border:1px solid #d3dfeb;
}
.badge.multi{background:#fff2d8;color:#8a5f00;border-color:#f0dcae}
.badge.ok{background:#e2f6ec;color:#12734a;border-color:#bfe8d3}
.badge.bad{background:#fdeceb;color:#a42315;border-color:#f6ccc8}

.editor{flex:1;display:flex;flex-direction:column;min-width:0;min-height:0;background:var(--face)}
.editor .ed-body{flex:1;overflow-y:auto;padding:12px 14px}
.editor .ed-foot{
  flex:0 0 auto;display:flex;gap:7px;align-items:center;
  padding:7px 12px;border-top:1px solid #dcdcdc;background:var(--face);
}

.optrow{
  display:flex;align-items:flex-start;gap:8px;padding:5px 7px;margin-bottom:5px;
  background:#fff;border:1px solid #d8d8d8;border-radius:3px;
}
.optrow.correct{background:#f2fbf6;border-color:#a8dcc1}
.optrow input[type=text]{flex:1;border:none;outline:none;background:transparent;padding:3px 2px;font-size:12px}
.optrow .mark{flex:0 0 auto;display:flex;align-items:center;gap:5px;padding-top:3px}
.optrow .del{
  flex:0 0 20px;width:20px;height:20px;border:1px solid transparent;border-radius:3px;
  background:transparent;color:#a42315;cursor:default;font-size:13px;line-height:1;
}
.optrow .del:hover{background:#fdeceb;border-color:#f0bcb6}

/* ---------- Test ishlash ---------- */
.exam{flex:1;display:flex;flex-direction:column;min-height:0;min-width:0;overflow:hidden;background:#eef2f6}
.exam-head{
  flex:0 0 auto;display:flex;align-items:center;gap:12px;padding:8px 14px;
  background:linear-gradient(180deg,#ffffff,#f3f6f9);border-bottom:1px solid #d5dde5;
}
.exam-head .tname{font-weight:700;color:#14314f;font-size:13px}
.exam-head .mode{
  padding:1px 8px;border-radius:9px;font-size:11px;
  background:#e8eef5;border:1px solid #d3dfeb;color:#3a5a7a;
}
.exam-head .mode.exam{background:#fdeceb;border-color:#f6ccc8;color:#a42315}
.exam-head .mode.drill{background:#fff2d8;border-color:#f0dcae;color:#8a5f00}
.exam-head .mode.study{background:#eaf4fc;border-color:#bcd9ef;color:#24516f}
.exam-head .sp{flex:1}
.fsize{display:flex;gap:3px;flex:0 0 auto}
.fbtn{
  width:30px;height:25px;display:grid;place-items:center;
  border:1px solid #c3d2e0;border-radius:3px;
  background:linear-gradient(180deg,#fdfefe,#eaf1f8);
  font-family:var(--font);font-size:13px;font-weight:700;color:#3a5a7a;
  cursor:default;line-height:1;padding:0;
}
.fbtn small{font-size:10px;margin-left:1px}
.fbtn:hover:not(:disabled){background:linear-gradient(180deg,#eaf6fd,#d7effc);border-color:#4aa3dd;color:#14314f}
.fbtn:active:not(:disabled){background:linear-gradient(180deg,#c4e5f6,#b0dcf4)}
.fbtn:disabled{opacity:.4}
.exam-head .counter{font-variant-numeric:tabular-nums;color:#3a5a7a}
.clock{
  display:flex;align-items:center;gap:6px;font-variant-numeric:tabular-nums;
  font-weight:700;color:#14314f;font-size:13px;
  padding:2px 9px;background:#fff;border:1px solid #d5dde5;border-radius:3px;
}
.clock.low{color:#a42315;border-color:#f6ccc8;background:#fdeceb}

/* ---------- Ko'rinish tanlash (ro'yxat / bittalab) ---------- */
.viewtoggle{display:none;gap:3px;flex:0 0 auto}
body.study-mode .viewtoggle,body.practice-mode .viewtoggle{display:flex}
.vbtn{
  width:30px;height:25px;display:grid;place-items:center;
  border:1px solid #c3d2e0;border-radius:3px;
  background:linear-gradient(180deg,#fdfefe,#eaf1f8);
  color:#3a5a7a;cursor:default;padding:0;
}
.vbtn svg{width:15px;height:15px;display:block}
.vbtn:hover{background:linear-gradient(180deg,#eaf6fd,#d7effc);border-color:#4aa3dd;color:#14314f}
.vbtn.on{background:linear-gradient(180deg,#2fb673,#159152);border-color:var(--mt-green-dk);color:#fff}

/* ---------- Qidiruv: tugma bosilganda ochiladi ---------- */
.navrow{display:none;align-items:stretch;gap:0;flex:0 0 auto;min-width:0;
  background:#f7f9fb;border-bottom:1px solid #d5dde5}
body.has-qnav .navrow{display:flex}
body.has-qnav .navrow .qnav{display:flex;border-bottom:0;flex:1}
.qsbtn{
  display:none;flex:0 0 auto;width:38px;
  border:0;border-right:1px solid #e2e8ef;background:transparent;
  color:#5a7489;cursor:default;place-items:center;
}
body.study-mode.study-list .qsbtn,body.practice-mode.practice-list .qsbtn{display:grid}
.qsbtn svg{width:16px;height:16px;display:block}
.qsbtn:hover{background:#eaf4fc;color:#14314f}
.qsbtn.on{background:#e8f5ee;color:var(--mt-green-dk)}
.qsearch{
  display:none;align-items:center;gap:8px;flex:0 0 auto;
  padding:8px 12px;background:#f7f9fb;border-bottom:1px solid #d5dde5;
}
body.study-list.search-open .qsearch,body.practice-list.search-open .qsearch{display:flex}
.qsearch .inp{flex:1;min-width:0;height:28px}
.qsx{
  width:26px;height:26px;flex:0 0 26px;border:1px solid transparent;border-radius:3px;
  background:transparent;color:#7d8d9c;cursor:default;font-size:13px;line-height:1;
}
.qsx:hover{background:#e6effa;border-color:#b6ccdf;color:#14314f}
.qsearch .muted{flex:0 0 auto;font-size:11px;white-space:nowrap}

/* ---------- O'rganish / Mashq: ro'yxat ko'rinishi ---------- */
body.study-list .exam-body,body.practice-list .exam-body{display:block;padding:14px 16px}
@media (max-width:620px){ body.study-list .exam-body,body.practice-list .exam-body{padding:10px} }
.qlrow.answered{border-color:#cdd8e3}
html.dark .qlrow.answered{border-color:#39424d}
.qlist{width:100%;max-width:880px;margin:0 auto;display:flex;flex-direction:column;gap:12px}
.qlrow{
  background:#fff;border:1px solid #d5dde5;border-radius:4px;padding:12px 14px;
  scroll-margin-top:12px;
}
.qlrow.seen{border-color:#bfe8d3;background:#fafffc}
.qlhead{display:flex;align-items:flex-start;gap:9px;margin-bottom:10px}
.qlno{
  flex:0 0 auto;min-width:26px;height:21px;padding:0 7px;border-radius:3px;
  background:var(--mt-green);color:#fff;font-size:12px;font-weight:700;
  display:inline-flex;align-items:center;justify-content:center;font-variant-numeric:tabular-nums;
}
.qltext{flex:1;min-width:0;font-size:calc(14px * var(--fs));line-height:1.6;color:#14314f;font-weight:700}
.qlopts{display:flex;flex-direction:column;gap:5px}
.qlopts .opt{padding:8px 11px}
.qlfoot{display:flex;align-items:center;gap:9px;margin-top:11px}
.qlfoot .btn{height:32px;min-width:120px}
@media (max-width:620px){
  .qlfoot{margin-top:12px}
  .qlfoot .btn{flex:1;height:44px;font-size:14px;font-weight:700;border-radius:6px}
}
.qlmore{
  width:100%;max-width:880px;margin:14px auto 0;padding:11px;text-align:center;
  color:var(--text-dim);font-size:12px;
}
.qlempty{width:100%;max-width:880px;text-align:center;color:var(--text-dim);padding:36px 12px;line-height:1.7}
mark.hit{background:#ffe9a8;color:inherit;border-radius:2px;padding:0 1px}

/* ---------- Savollar raqami qatori (o'rganish va mashqda) ---------- */
.qnav{
  display:none;flex:0 0 auto;align-items:center;gap:7px;
  width:100%;min-width:0;max-width:100%;
  padding:9px 12px 11px;overflow-x:auto;overflow-y:hidden;white-space:nowrap;
  background:#f7f9fb;border-bottom:1px solid #d5dde5;
  scrollbar-width:none;-ms-overflow-style:none;
}
.qnav::-webkit-scrollbar{height:0;display:none}
body.has-qnav .qnav{display:flex}
.qn{
  position:relative;flex:0 0 auto;
  min-width:32px;height:32px;padding:0 7px;
  display:inline-flex;align-items:center;justify-content:center;
  border:1px solid #cfd9e3;border-radius:16px;background:#fff;
  font-family:var(--font);font-size:12px;font-weight:700;color:#3a5a7a;
  font-variant-numeric:tabular-nums;cursor:default;transition:.1s;
}
.qn:hover{border-color:#4aa3dd;background:#eaf6fd}
.qn.ok{background:var(--ok);border-color:var(--mt-green-dk);color:#fff}
.qn.bad{background:var(--bad);border-color:#a42315;color:#fff}
.qn.seen{background:#e2f6ec;border-color:#bfe8d3;color:#12734a}
.qn.cur{color:#14314f;border-color:#14314f;background:#fff;font-size:13px}
.qn.cur.ok,.qn.cur.bad{color:#fff}
.qn.cur::after{
  content:'';position:absolute;left:18%;right:18%;bottom:-7px;height:3px;
  background:var(--mt-green);border-radius:2px;
}
.qn .dot{
  position:absolute;top:1px;right:2px;width:6px;height:6px;border-radius:50%;
  background:#3a76a8;border:1px solid #fff;
}

.exam-body{flex:1;overflow-y:auto;padding:16px 18px;display:flex;justify-content:center}
.qcard{width:100%;max-width:880px}
.qtext{
  background:#fff;border:1px solid #c8c8c8;border-top-color:#9a9a9a;border-left-color:#9a9a9a;
  border-radius:3px;padding:14px 16px;font-size:calc(15px * var(--fs));line-height:1.6;color:#14314f;margin-bottom:13px;
}
.qtext .qno{
  display:inline-block;margin-right:9px;padding:1px 8px;border-radius:3px;
  background:var(--mt-green);color:#fff;font-size:12px;font-weight:700;vertical-align:2px;
}
.starbtn{
  float:right;margin:-4px -5px 4px 12px;
  width:30px;height:30px;display:grid;place-items:center;
  border:1px solid #d5dde5;border-radius:50%;background:#fff;
  color:#b3bec8;cursor:default;transition:.12s;
}
.starbtn:hover{background:#eaf4fc;border-color:#a7d3f3;color:#3a76a8}
.starbtn svg{width:16px;height:16px;display:block}
.starbtn.on{background:#3a76a8;border-color:#2f6291;color:#fff}
.starbtn.on:hover{background:#4a86b8;border-color:#3a76a8;color:#fff}

/* o'rganib chiqilgan savol — sezilar-sezilmas belgi */
.donemark{
  float:right;margin:7px 9px 0 0;
  width:15px;height:15px;display:grid;place-items:center;
  color:#b9ddc9;opacity:.85;
}
.donemark svg{width:13px;height:13px;display:block}

.qhint{
  margin-top:9px;padding:8px 11px;background:#fffbe9;border:1px solid #f0e0a8;
  border-radius:3px;font-size:calc(12px * var(--fs));color:#6b5400;
}
.opts{display:flex;flex-direction:column;gap:6px}
.opt{
  display:flex;align-items:flex-start;gap:10px;padding:10px 13px;
  background:#fff;border:1px solid #d5dde5;border-radius:3px;cursor:default;
  font-size:calc(13px * var(--fs));line-height:1.5;transition:.08s;
}
.opt:hover{background:var(--hot);border-color:var(--hot-bd)}
.opt.picked{background:var(--sel);border-color:#5aa9de}
.opt .box{
  flex:0 0 17px;width:17px;height:17px;margin-top:1px;
  border:1px solid #8a9aa8;background:#fff;display:grid;place-items:center;
  font-size:11px;font-weight:700;color:#fff;
}
.opt .box.radio{border-radius:50%}
.opt.picked .box{background:var(--mt-blue);border-color:var(--mt-blue)}
.opt .ltr{
  flex:0 0 auto;font-weight:700;color:#5a6a7a;min-width:15px;
}
.opt.right{background:#eefaf3;border-color:#7fcfa5}
.opt.right .box{background:var(--ok);border-color:var(--ok)}
.opt.wrong{background:#fdeceb;border-color:#e9a79f}
.opt.wrong .box{background:var(--bad);border-color:var(--bad)}
.opt.missed{background:#fffbe9;border-color:#e8d48f}
.opt .tag{margin-left:auto;font-size:11px;font-weight:700;padding-left:10px;white-space:nowrap}
.opt.right .tag{color:var(--ok)}
.opt.wrong .tag{color:var(--bad)}
.opt.missed .tag{color:var(--warn)}
.opt.locked{cursor:default}

.verdict{
  margin:12px 0 0;padding:10px 14px;border-radius:3px;font-size:calc(13px * var(--fs));font-weight:700;
  display:flex;align-items:center;gap:9px;
}
.verdict.ok{background:#e2f6ec;border:1px solid #a8dcc1;color:#12734a}
.verdict.bad{background:#fdeceb;border:1px solid #f0bcb6;color:#a42315}

.exam-foot{
  flex:0 0 auto;display:flex;align-items:center;gap:11px;padding:9px 14px;
  background:linear-gradient(180deg,#f7f9fb,#eaeff4);border-top:1px solid #d5dde5;
}
.progress{
  flex:1;height:17px;background:#fff;border:1px solid #bcc7d2;border-radius:3px;
  overflow:hidden;position:relative;min-width:80px;
}
.progress > i{
  display:block;height:100%;width:0;
  background:linear-gradient(180deg,#3fca84 0%,#18a05d 50%,#12894f 51%,#2bb975 100%);
  transition:width .2s;
}
.progress > span{
  position:absolute;inset:0;display:grid;place-items:center;
  font-size:10px;font-weight:700;color:#14314f;font-variant-numeric:tabular-nums;
}

/* ---------- Natija ---------- */
.result{max-width:640px;margin:0 auto;width:100%}
.result .score-hero{
  text-align:center;padding:22px 16px;background:#fff;
  border:1px solid #c8c8c8;border-radius:4px;margin-bottom:13px;
}
.result .mark{font-size:57px;font-weight:700;line-height:1;color:var(--mt-green)}
.result .mark.m2{color:var(--bad)}
.result .mark.m3{color:#c07800}
.result .pc{font-size:17px;color:#14314f;margin-top:7px;font-weight:700}
.result .det{color:var(--text-dim);margin-top:4px}
.gridstat{display:grid;grid-template-columns:repeat(auto-fit,minmax(122px,1fr));gap:8px;margin-bottom:13px}
.gridstat .s{background:#fff;border:1px solid #d5dde5;border-radius:3px;padding:10px 12px}
.gridstat .s b{display:block;font-size:20px;color:#14314f;font-variant-numeric:tabular-nums}
.gridstat .s span{color:var(--text-dim);font-size:11px}

/* ---------- Jadval ---------- */
.tblwrap{flex:1;overflow:auto;background:#fff;border:1px solid #c8c8c8;margin:6px;border-radius:2px}
table.grid{width:100%;border-collapse:collapse;font-size:12px}
table.grid th{
  position:sticky;top:0;z-index:2;text-align:left;padding:5px 9px;white-space:nowrap;
  background:linear-gradient(180deg,#fbfbfb,#eaeaea);border:1px solid #d0d0d0;border-top:none;
  font-weight:700;color:#14314f;cursor:default;
}
table.grid th:hover{background:linear-gradient(180deg,#f0f8ff,#dcecf9)}
table.grid td{padding:4px 9px;border-bottom:1px solid #eee;border-right:1px solid #f4f4f4;white-space:nowrap}
table.grid tbody tr:hover{background:var(--hot)}
table.grid tbody tr.sel{background:var(--sel)}
table.grid td.num{text-align:right;font-variant-numeric:tabular-nums}
.pct{display:inline-flex;align-items:center;gap:6px}
.pct i{display:block;height:9px;border-radius:2px;background:var(--mt-green);min-width:2px}
.pct i.bad{background:var(--bad)}
.pct i.mid{background:#d9a441}

/* ---------- Dialog ---------- */
.veil{
  position:fixed;inset:0;z-index:100;background:rgba(20,35,50,.35);
  display:none;align-items:center;justify-content:center;padding:20px;
}
.veil.show{display:flex}
.dlg{
  background:var(--face);border:1px solid #5a6a7a;border-radius:5px;
  box-shadow:0 12px 44px rgba(0,0,0,.4);width:100%;max-width:470px;
  display:flex;flex-direction:column;max-height:88vh;overflow:hidden;
}
.dlg.wide{max-width:720px}
.dlg .dtitle{
  display:flex;align-items:center;gap:8px;padding:6px 7px 6px 11px;
  background:linear-gradient(180deg,#f6f9fc,#dfe9f3);border-bottom:1px solid #b7c4d2;
  font-weight:700;color:#14314f;
}
.dlg .dtitle .sp{flex:1}
.dlg .dbody{padding:14px 16px;overflow-y:auto}
.dlg .dfoot{
  display:flex;gap:7px;justify-content:flex-end;padding:9px 13px;
  background:var(--face);border-top:1px solid #dcdcdc;
}
.dlg .dfoot .left{margin-right:auto}

/* ---------- Kichik yordamchilar ---------- */
/* ---------- Tab chizig'i (Statistika bo'limi) ---------- */
.tabstrip{
  display:flex;gap:2px;flex:0 0 auto;padding:6px 8px 0;
  background:linear-gradient(180deg,#f7f9fb,#eef2f6);border-bottom:1px solid #d5dde5;
}
.tabstrip .tab{
  padding:6px 15px;border:1px solid #d5dde5;border-bottom:none;
  border-radius:4px 4px 0 0;background:#e9eef3;color:#4a5a6a;
  font-family:var(--font);font-size:12px;cursor:default;position:relative;top:1px;
}
.tabstrip .tab:hover{background:#f2f6fa}
.tabstrip .tab.active{background:#fff;color:#14314f;font-weight:700;border-bottom:1px solid #fff}

/* ---------- O'rganish rejimi ---------- */
.opt.study{background:#fff;border-color:#d5dde5;cursor:default}
.opt.study.right{background:#eefaf3;border-color:#7fcfa5}
.studybar{
  margin:12px 0 0;padding:9px 13px;border-radius:3px;font-size:calc(12px * var(--fs));
  background:#eaf4fc;border:1px solid #bcd9ef;color:#24516f;line-height:1.6;
}

/* ---------- Diqqat rejimi (Focus) ---------- */
.focusbtn{
  display:flex;align-items:center;gap:5px;height:21px;padding:0 9px;margin-right:5px;
  border:1px solid #c3d2e0;border-radius:3px;
  background:linear-gradient(180deg,#fdfefe,#eaf1f8);
  font-family:var(--font);font-size:11px;color:#3a5a7a;cursor:default;white-space:nowrap;
}
.focusbtn:hover{background:linear-gradient(180deg,#eaf6fd,#d7effc);border-color:#4aa3dd;color:#14314f}
.focusbtn svg{width:13px;height:13px;flex:0 0 13px}
body.focus-mode .focusbtn{
  background:linear-gradient(180deg,#2fb673,#159152);border-color:var(--mt-green-dk);
  color:#fff;font-weight:700;
}
body.focus-mode .focusbtn:hover{background:linear-gradient(180deg,#39c47f,#199d5a);color:#fff}

body.focus-mode .menubar,
body.focus-mode .toolbar,
body.focus-mode .statusbar{display:none !important}
body.focus-mode .window{inset:0;border-radius:0;border:none;box-shadow:none}
body.focus-mode .titlebar{
  height:26px;flex:0 0 26px;
  background:linear-gradient(180deg,#fbfdff,#eef4fa);
}
body.focus-mode #btnFull{display:none}   /* focus allaqachon to'liq ekran */
body.focus-mode .exam-body{padding:26px 18px}
body.focus-mode .qcard{max-width:940px}
body.focus-mode .qtext{font-size:calc(16px * var(--fs))}
body.focus-mode .opt{font-size:calc(14px * var(--fs));padding:12px 15px}
@media (max-width:620px){
  .focusbtn span{display:none}
  .focusbtn{padding:0 7px}
}

/* --- Chalg'iganda chiqadigan rag'bat --- */
.nudge{
  position:fixed;left:50%;top:0;z-index:150;
  display:flex;align-items:center;gap:10px;max-width:min(620px,92vw);
  padding:11px 18px;border-radius:0 0 7px 7px;
  background:linear-gradient(180deg,#1c4b74,#14314f);color:#fff;
  font-size:13px;line-height:1.5;
  box-shadow:0 7px 26px rgba(10,30,50,.4);
  transform:translate(-50%,-115%);opacity:0;
  transition:transform .26s cubic-bezier(.2,.9,.3,1.3),opacity .2s;
  pointer-events:none;
}
.nudge.show{transform:translate(-50%,0);opacity:1}
.nudge svg{width:17px;height:17px;flex:0 0 17px;color:#7fe0ae}

.nudgebig{
  position:fixed;inset:0;z-index:160;display:none;
  align-items:center;justify-content:center;padding:24px;
  background:rgba(12,28,44,.72);backdrop-filter:blur(3px);
}
.nudgebig.show{display:flex}
.nudgebig .ncard{
  width:100%;max-width:480px;text-align:center;
  padding:30px 28px 24px;border-radius:9px;
  background:linear-gradient(180deg,#ffffff,#f3f7fa);
  border:1px solid #c3d2e0;box-shadow:0 18px 60px rgba(0,0,0,.42);
  animation:npop .24s cubic-bezier(.2,.9,.3,1.25);
}
@keyframes npop{from{transform:scale(.92);opacity:0}to{transform:none;opacity:1}}
.nudgebig .nicon{width:34px;height:34px;color:var(--mt-green);margin-bottom:12px}
.nudgebig .nmsg{
  font-size:16px;line-height:1.65;color:#14314f;font-weight:700;
  margin-bottom:19px;
}
.nudgebig .btn{min-width:150px;height:30px}

/* ---------- Imtihon nazorati (to'liq ekran) ---------- */
/* Test ketayotganda (o'rganish · mashq · imtihon) yuqoridagi asboblar
   qatori yashiriladi — savoldan chalg'itmasligi uchun. Test tugashi
   bilan o'zi qaytib keladi. */
body.in-test .toolbar,
body.in-test .menubar{display:none}

body.exam-locked .menubar,
body.exam-locked .toolbar,
body.exam-locked .titlebar .winbtns,
body.exam-locked .focusbtn{display:none !important}
body.exam-locked .window{inset:0;border-radius:0;border:none}
body.exam-locked .exam-body,
body.exam-locked .qtext,
body.exam-locked .opt{
  user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;
}

/* ---------- Yo'riqnoma ---------- */
.guide .gi{
  width:15px;height:15px;display:inline-block;vertical-align:-3px;flex:0 0 auto;
}
.guide h4{margin:14px 0 5px;font-size:12px;color:#14314f}
.guide h4:first-child{margin-top:0}
.guide p{margin:0 0 7px;line-height:1.6;color:#33414f}
.guide ul{margin:0 0 7px;padding-left:19px;line-height:1.75;color:#33414f}
.guide .k{
  display:inline-block;padding:0 6px;border-radius:3px;background:#eef2f6;
  border:1px solid #dbe3ea;font-size:11px;color:#3a5a7a;
}

/* ---------- Rol: o'qituvchi elementlari ---------- */
.teacher-only{display:none !important}
/* talabaga menyu satri kerak emas — hammasi asboblar panelida */
body:not(.is-teacher) .menubar{display:none}
body.is-teacher .teacher-only{display:flex !important}
body.is-teacher .menu-item.teacher-only{display:flex !important}
body.is-teacher .tile.teacher-only{display:block !important}
body.is-teacher .tsep.teacher-only{display:block !important}

.li.flagged{background:#fff7f6}
.li.flagged:hover{background:#fdeceb}
.li.flagged.sel{background:var(--sel)}
.btn.sm.active{background:linear-gradient(180deg,#d7effc,#bfe4f8);border-color:#4aa3dd}

.muted{color:var(--text-dim)}
.row{display:flex;gap:9px;align-items:center}
.row.wrap{flex-wrap:wrap}
.col{display:flex;flex-direction:column;gap:9px}
.mb0{margin-bottom:0}
.mt8{margin-top:8px}
.hr{height:1px;background:#e0e0e0;margin:11px 0}
.empty{
  flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;
  gap:11px;color:#8b98a5;text-align:center;padding:30px;
}
.empty svg{width:44px;height:44px;opacity:.4}
.chip{
  display:inline-flex;align-items:center;gap:5px;padding:2px 9px;border-radius:11px;
  background:#e8eef5;border:1px solid #d3dfeb;color:#3a5a7a;font-size:11px;
}
.radioline{display:flex;align-items:center;gap:7px;padding:5px 3px;cursor:default}
.radioline:hover{background:var(--hot)}
.radioline b{font-weight:700}
.radioline .d{color:var(--text-dim);font-size:11px}

/* ---- Fanlar kutubxonasi ---- */
.subrow{display:flex;align-items:center;gap:8px;padding:7px 4px;border-bottom:1px solid #f0f0f0}
.subrow:last-of-type{border-bottom:0}
.subrow:hover{background:var(--hot)}
.subrow .submeta{flex:1;min-width:0}
.subrow .submeta b{font-weight:700;display:block;line-height:1.4}
.subrow .submeta .d{color:var(--text-dim);font-size:11px;line-height:1.5}
.subrow.off .submeta b{color:#45586b}
.subrow .subdot{width:15px;height:15px;flex:0 0 15px;display:flex;align-items:center;justify-content:center;opacity:.75}
.subrow .subdot svg{width:15px;height:15px}
.subrow .btn.sm{flex:0 0 auto}
.okmark{color:#12734a;font-weight:700}

/* ---- sinxronizatsiya kodi ---- */
.synccode{
  font-family:var(--mono);font-size:22px;font-weight:700;letter-spacing:3px;
  text-align:center;padding:12px 10px;user-select:all;-webkit-user-select:all;
  background:#fff;border:1px solid #c3d2e0;border-radius:4px;color:#14314f;
  word-break:break-all;
}
@media (max-width:620px){ .synccode{font-size:19px;letter-spacing:2px;padding:11px 8px} }
canvas.chart{width:100%;height:190px;display:block;background:#fff;border:1px solid #d5dde5;border-radius:3px}

.toast{
  position:fixed;right:18px;top:96px;z-index:200;
  background:#14314f;color:#fff;padding:9px 15px;border-radius:4px;
  box-shadow:0 5px 20px rgba(0,0,0,.33);font-size:12px;
  opacity:0;transform:translateY(-9px);transition:.18s;pointer-events:none;
}
.toast.show{opacity:1;transform:none}
.toast.err{background:#a42315}

::-webkit-scrollbar{width:16px;height:16px}
::-webkit-scrollbar-track{background:#f0f0f0}
::-webkit-scrollbar-thumb{background:#c9c9c9;border:3px solid #f0f0f0;border-radius:8px}
::-webkit-scrollbar-thumb:hover{background:#a8a8a8}

@media (max-width:820px){
  .window{inset:env(safe-area-inset-top,0px) 0 env(safe-area-inset-bottom,0px) 0;border-radius:0;border:none}
  .sidebar{flex:0 0 232px}
  .tbtn span{display:none}
  .tbtn{padding:0 6px}
  .titlebar .title small{display:none}
}
@media (max-width:620px){
  /* --- telefon: tepa panel bitta qator, ortiqcha takror yo'q ---
     test ketayotganda asboblar qatori yashiriladi, fan nomi ham —
     rejim belgisi va sanoq yetarli  */
  .exam-head{gap:7px;padding:7px 9px;flex-wrap:nowrap}
  .exam-head .tname{display:none}
  .exam-head .mode{flex:0 1 auto;max-width:42vw;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .exam-head .counter{font-size:12px;flex:0 0 auto;white-space:nowrap;order:-1}
  .exam-head .mode{order:-2}
  .fbtn{width:36px;height:30px;font-size:14px}
  .split{flex-direction:column}
  .sidebar{flex:0 0 190px;border-right:none;border-bottom:1px solid #cfcfcf}
  .tiles{gap:9px}
  .tile{width:138px;padding:14px 10px}
  .exam-body{padding:10px}
  .qnav{padding:8px 9px 10px;gap:6px}
  .qn{min-width:36px;height:36px;font-size:13px}
  .vbtn{width:36px;height:30px}
  .qsearch{padding:7px 9px;gap:6px}
  .qsearch .inp{height:36px}
  .qsbtn{width:42px}
  .qlrow{padding:11px 11px}
  .qn.cur{font-size:14px}

  /* --- telefon: pastki qator barmoqqa qulay bo'lsin ---
     progress alohida qatorga chiqadi, tugmalar esa kattalashadi  */
  .exam-foot{
    gap:7px;padding:8px 9px calc(9px + env(safe-area-inset-bottom,0px));
    flex-wrap:wrap;align-items:stretch;
  }
  .exam-foot .progress{order:-1;flex:1 1 100%;height:16px;margin-bottom:1px}
  .exam-foot .btn{
    min-width:0;height:48px;padding:0 10px;white-space:nowrap;
    border-radius:6px;font-size:14px;font-weight:700;
  }
  .exam-foot #exPrev{flex:0 0 auto;padding:0 13px;font-weight:400}
  .exam-foot #exStop{flex:0 1 auto;max-width:34vw;overflow:hidden;text-overflow:ellipsis}
  .exam-foot #exNext{flex:1 1 42%;min-width:38vw}

  /* --- pastki holat satri telefonda joy egallamasin --- */
  .statusbar{display:none}

  /* --- juda tor ekran: «Orqaga» faqat belgi bo'lib qoladi --- */
  @media (max-width:430px){
    .exam-foot #exPrev{font-size:0;padding:0 14px}
    .exam-foot #exPrev::before{content:'‹';font-size:22px;line-height:1}
    .exam-foot #exStop{max-width:36vw;font-size:13px}
  }

  /* --- natija ekrani telefonda siqilmasin --- */
  .result .score-hero{padding:16px 11px;margin-bottom:10px}
  .result .mark{font-size:46px}
  .result .pc{font-size:15px}
  .result .det{font-size:11px;line-height:1.5}
  .gridstat{grid-template-columns:1fr 1fr;gap:6px;margin-bottom:10px}
  .gridstat .s{padding:8px 9px}
  .gridstat .s b{font-size:17px}
  .result .group{padding:9px 9px 3px}
  .result .row.wrap{gap:7px}
  .result .row.wrap .btn{flex:1 1 calc(50% - 4px);min-width:0;height:38px;padding:0 8px}
  .result .row.wrap .btn.primary{flex:1 1 100%}

  /* --- xabar sarlavhani to'smasin: pastda chiqadi --- */
  .toast{
    right:10px;left:10px;top:auto;bottom:calc(96px + env(safe-area-inset-bottom,0px));
    text-align:center;font-size:13px;padding:11px 14px;
    transform:translateY(9px);
  }
  .toast.show{transform:none}
}

/* =========================================================
   QORONG'U REJIM
   ---------------------------------------------------------
   Avtomatik: qurilma sozlamasi qorong'u bo'lsa (body.theme-light
   bo'lmagan holda). Qo'lda: body.theme-dark / body.theme-light.
   ========================================================= */
html.dark{
  --face:#20262d;
  --face-2:#1b2027;
  --face-grad-a:#2b323a;
  --face-grad-b:#232931;
  --border:#434c57;
  --border-dk:#59636f;
  --border-lt:#2d343c;
  --client:#171b21;
  --sel:#1d3c58;
  --sel-bd:#2f5f89;
  --hot:#25303b;
  --hot-bd:#36485b;
  --text:#dfe6ee;
  --text-dim:#97a3b0;
  --mt-green:#2fc07a;
  --mt-green-dk:#1d8c57;
  --mt-blue:#5b9cf0;
  --ok:#2fc07a;
  --bad:#f0695c;
  --warn:#d9a441;
  --menu-hi:#2f5f89;
}

/* qurilma sozlamasi qorong'u bo'lsa — avtomatik */
@media (prefers-color-scheme: dark){
  html:not(.theme-light){ color-scheme:dark; }
}

/* --- umumiy sirtlar --- */
html.dark{ color-scheme:dark; }
html.dark body{
  background:#0e1216;
  background-image:linear-gradient(160deg,#131a21 0%,#0b0f13 100%);
  color:var(--text);
}
html.dark .window{border-color:#39424d;box-shadow:0 10px 40px rgba(0,0,0,.6),0 0 0 1px rgba(255,255,255,.04) inset}
html.dark .titlebar{
  background:linear-gradient(180deg,#2b333c 0%,#232a33 48%,#1f252d 52%,#262e37 100%);
  border-bottom-color:#39424d;
}
html.dark .titlebar .title{color:#e8eef5}
html.dark .titlebar .title small{color:var(--text-dim)}
html.dark .winbtn svg{stroke:#c5cfda}
html.dark .winbtn:hover{background:#2f3842;border-color:#45515e}
html.dark .menubar{background:var(--face);border-bottom-color:#2d343c}
html.dark .menu-pop{background:#232a33;border-color:#434c57;box-shadow:3px 3px 12px rgba(0,0,0,.5)}
html.dark .menu-sep{background:#343d47}
html.dark .toolbar{
  background:linear-gradient(180deg,#272f38 0%,#212830 100%);border-bottom-color:#343d47;
}
html.dark .tsep{background:#3a444f}
html.dark .client{background:var(--face)}
html.dark .statusbar{background:var(--face);border-top-color:#2d343c;color:var(--text-dim)}
html.dark .sb.sunken{border-color:#171b21 #39424d #39424d #171b21;background:#1b2027}
html.dark .credit{color:#5d6a77}

/* --- bosh sahifa --- */
html.dark .launcher{background:linear-gradient(180deg,#1b2129 0%,#141920 100%)}
html.dark .launcher h1{color:#e8eef5}
html.dark .tile{background:#242c35;border-color:#39424d;box-shadow:0 1px 3px rgba(0,0,0,.35)}
html.dark .tile:hover{border-color:var(--mt-green);box-shadow:0 3px 14px rgba(47,192,122,.22)}
html.dark .tile b{color:#e8eef5}
html.dark .launcher .foot{color:#6b7783}

/* --- boshqaruvlar --- */
html.dark .btn{
  background:linear-gradient(180deg,var(--face-grad-a) 0%,var(--face-grad-b) 100%);
  border-color:var(--border);color:var(--text);
}
html.dark .btn:hover:not(:disabled){background:linear-gradient(180deg,#31414f 0%,#27333f 100%);border-color:#4a7fa8}
html.dark .btn:active:not(:disabled){background:linear-gradient(180deg,#27333f,#1f2730)}
html.dark .btn.primary{
  background:linear-gradient(180deg,#2fb673 0%,#179152 100%);border-color:#12713f;color:#fff;
}
html.dark .btn.primary:hover:not(:disabled){background:linear-gradient(180deg,#3cc783 0%,#1c9e5c 100%);border-color:#12713f;color:#fff}
html.dark .btn.primary:active:not(:disabled){background:linear-gradient(180deg,#2aa96a 0%,#15814a 100%)}
html.dark .btn.danger{background:linear-gradient(180deg,#c8584c 0%,#a7281b 100%);border-color:#8c2015;color:#fff}
html.dark .btn.danger:hover:not(:disabled){background:linear-gradient(180deg,#d4675b 0%,#b53022 100%);border-color:#8c2015;color:#fff}
html.dark .focusbtn{
  background:linear-gradient(180deg,#2f3842,#262e37);border-color:#434c57;color:#9fb6cc;
}
html.dark .focusbtn:hover{background:linear-gradient(180deg,#36424e,#2b343d);border-color:#4a7fa8;color:#dfe6ee}
html.dark body.focus-mode .focusbtn{background:linear-gradient(180deg,#2fb673,#179152);border-color:#12713f;color:#fff}
html.dark body.focus-mode .titlebar{background:linear-gradient(180deg,#262e37,#1f252d)}
html.dark .inp,html.dark select.inp,html.dark textarea.inp{
  background:#171b21;border-color:#4a545f;color:var(--text);
}
html.dark .inp:focus{border-color:#4a9ad6;box-shadow:0 0 0 2px rgba(74,154,214,.22)}
html.dark .group{background:#1e242b;border-color:#39424d}
html.dark .group > .gtitle,html.dark .group > legend{color:#9fc4e4}
html.dark .hr{background:#343d47}
html.dark .chip{background:#25303b;border-color:#3b4857;color:#9fb6cc}
html.dark .fbtn{background:linear-gradient(180deg,#2f3842,#262e37);border-color:#434c57;color:#9fb6cc}
html.dark .fbtn:hover:not(:disabled){background:linear-gradient(180deg,#31414f,#27333f);border-color:#4a7fa8;color:#dfe6ee}

/* --- savol ekrani --- */
html.dark .exam{background:#13181e}
html.dark .exam-head{background:linear-gradient(180deg,#232a33,#1d232a);border-bottom-color:#343d47}
html.dark .exam-head .tname{color:#e8eef5}
html.dark .exam-head .mode{background:#25303b;border-color:#3b4857;color:#9fb6cc}
html.dark .exam-head .mode.exam{background:#3a2422;border-color:#5e3630;color:#f0a79d}
html.dark .exam-head .mode.drill{background:#38301c;border-color:#5a4b28;color:#e0bd72}
html.dark .exam-head .mode.study{background:#1f2e3b;border-color:#345170;color:#9fc4e4}
html.dark .exam-head .counter{color:#9fb6cc}
html.dark .clock{background:#1b2027;border-color:#3b4857;color:#e8eef5}
html.dark .clock.low{background:#3a2422;border-color:#5e3630;color:#f0a79d}
html.dark .qtext{background:#1e242b;border-color:#3b4857;border-top-color:#4a545f;border-left-color:#4a545f;color:#e8eef5}
html.dark .qhint{background:#332d1c;border-color:#564c2a;color:#ddc98a}
html.dark .opt{background:#1e242b;border-color:#39424d;color:var(--text)}
html.dark .opt:hover{background:var(--hot);border-color:var(--hot-bd)}
html.dark .opt.picked{background:#1d3c58;border-color:#3f78ad}
html.dark .opt .box{background:#171b21;border-color:#5a6672}
html.dark .opt.picked .box{background:#3f78ad;border-color:#5b9cf0}
html.dark .opt .ltr{color:#8b99a7}
html.dark .opt.right{background:#15301f;border-color:#2c6b47}
html.dark .opt.right .box{background:var(--ok);border-color:var(--ok)}
html.dark .opt.wrong{background:#331e1c;border-color:#6b322b}
html.dark .opt.wrong .box{background:var(--bad);border-color:var(--bad)}
html.dark .opt.missed{background:#332d1c;border-color:#5a4b28}
html.dark .opt.study{background:#1e242b;border-color:#39424d}
html.dark .opt.study.right{background:#15301f;border-color:#2c6b47}
html.dark .verdict.ok{background:#15301f;border-color:#2c6b47;color:#7fe0ae}
html.dark .verdict.bad{background:#331e1c;border-color:#6b322b;color:#f0a79d}
html.dark .studybar{background:#1f2e3b;border-color:#345170;color:#a9c6e0}
html.dark .exam-foot{background:linear-gradient(180deg,#232a33,#1b2027);border-top-color:#343d47}
html.dark .progress{background:#171b21;border-color:#434c57}
html.dark .progress > span{color:#cfdae6}
html.dark .starbtn{background:#1e242b;border-color:#3b4857;color:#6f7d8b}
html.dark .starbtn:hover{background:#25303b;border-color:#4a7fa8;color:#9fc4e4}
html.dark .starbtn.on{background:#3f78ad;border-color:#5b9cf0;color:#fff}
html.dark .donemark{color:#3f6b52}

/* --- natija --- */
html.dark .result .score-hero{background:#1e242b;border-color:#3b4857}
html.dark .result .pc{color:#e8eef5}
html.dark .gridstat .s{background:#1e242b;border-color:#39424d}
html.dark .gridstat .s b{color:#e8eef5}

/* --- muharrir / ro'yxatlar / jadval --- */
html.dark .sidebar{background:var(--face);border-right-color:#2d343c}
html.dark .sidebar .sbar-head{background:linear-gradient(180deg,#272f38,#212830);border-bottom-color:#343d47}
html.dark .sidebar .sbar-head .ttl{color:#9fc4e4}
html.dark .listbox,html.dark .tblwrap{background:var(--client);border-color:#39424d;border-top-color:#2a313a;border-left-color:#2a313a}
html.dark .li{border-bottom-color:#242b33}
html.dark .li:hover{background:var(--hot)}
html.dark .li.sel{background:var(--sel);border-bottom-color:var(--sel-bd)}
html.dark .li.flagged{background:#2a1e1d}
html.dark .li.flagged:hover{background:#352422}
html.dark .editor{background:var(--face)}
html.dark .editor .ed-foot{background:var(--face);border-top-color:#2d343c}
html.dark .optrow{background:#1e242b;border-color:#39424d}
html.dark .optrow.correct{background:#15301f;border-color:#2c6b47}
html.dark .optrow input[type=text]{color:var(--text)}
html.dark .optrow .del:hover{background:#331e1c;border-color:#6b322b}
html.dark table.grid th{background:linear-gradient(180deg,#272f38,#212830);border-color:#39424d;color:#9fc4e4}
html.dark table.grid th:hover{background:linear-gradient(180deg,#2d3a46,#26303a)}
html.dark table.grid td{border-bottom-color:#242b33;border-right-color:#1f252c}
html.dark table.grid tbody tr:hover{background:var(--hot)}
html.dark table.grid tbody tr.sel{background:var(--sel)}
html.dark canvas.chart{background:#1e242b;border-color:#39424d}
html.dark .tabstrip{background:linear-gradient(180deg,#232a33,#1d232a);border-bottom-color:#343d47}
html.dark .tabstrip .tab{background:#232a33;border-color:#39424d;color:#9fb6cc}
html.dark .tabstrip .tab:hover{background:#2a323c}
html.dark .tabstrip .tab.active{background:#13181e;color:#e8eef5;border-bottom-color:#13181e}

/* --- belgilar --- */
html.dark .badge{background:#25303b;border-color:#3b4857;color:#9fb6cc}
html.dark .badge.multi{background:#38301c;border-color:#5a4b28;color:#e0bd72}
html.dark .badge.ok{background:#15301f;border-color:#2c6b47;color:#7fe0ae}
html.dark .badge.bad{background:#331e1c;border-color:#6b322b;color:#f0a79d}
html.dark .okmark{color:#7fe0ae}

/* --- dialoglar --- */
html.dark .veil{background:rgba(0,0,0,.6)}
html.dark .dlg{background:var(--face);border-color:#39424d;box-shadow:0 12px 44px rgba(0,0,0,.6)}
html.dark .dlg .dtitle{background:linear-gradient(180deg,#2b333c,#232a33);border-bottom-color:#39424d;color:#e8eef5}
html.dark .dlg .dfoot{background:var(--face);border-top-color:#2d343c}
html.dark .subrow{border-bottom-color:#2a313a}
html.dark .subrow:hover{background:var(--hot)}
html.dark .subrow.off .submeta b{color:#aab7c4}
html.dark .guide p,html.dark .guide ul{color:#bcc8d4}
html.dark .guide h4{color:#9fc4e4}
html.dark .guide .k{background:#25303b;border-color:#3b4857;color:#9fb6cc}
html.dark pre{background:#171b21 !important;border-color:#39424d !important;color:#cfdae6}
html.dark .empty{color:#6b7783}

/* --- rag'bat oynalari --- */
html.dark .nudgebig .ncard{background:linear-gradient(180deg,#242c35,#1c222a);border-color:#3b4857}
html.dark .nudgebig .nmsg{color:#e8eef5}

/* --- aylantirish chizig'i --- */
html.dark ::-webkit-scrollbar-track{background:#171b21}
html.dark ::-webkit-scrollbar-thumb{background:#3a444f;border-color:#171b21}
html.dark ::-webkit-scrollbar-thumb:hover{background:#4a545f}

/* --- qolgan matnlar o'qilarli bo'lsin --- */
html.dark label.fld > span{color:#b7c3cf}
html.dark .statusbar{color:#97a3b0}
html.dark .optrow .mark{color:#b7c3cf}
html.dark .li .meta,html.dark .li .qt{color:var(--text)}
html.dark .exam-head .counter{color:#9fb6cc}
html.dark .guide .k{color:#9fb6cc}
html.dark .nudge{background:linear-gradient(180deg,#223246,#16222f)}
html.dark .result .det{color:var(--text-dim)}
html.dark .subrow .submeta b{color:#e8eef5}
html.dark .radioline:hover{background:var(--hot)}
html.dark #dlgBody,html.dark .dbody{color:var(--text)}
html.dark .empty svg{opacity:.3}

/* --- savollar raqami qatori: qorong'u --- */
html.dark .qnav{background:#1b2027;border-bottom-color:#343d47}
html.dark .qn{background:#242c35;border-color:#3b4857;color:#9fb6cc}
html.dark .qn:hover{border-color:#4a7fa8;background:#2a333d}
html.dark .qn.ok{background:#1f8d58;border-color:#177246;color:#fff}
html.dark .qn.bad{background:#b2402f;border-color:#8c2015;color:#fff}
html.dark .qn.seen{background:#17331f;border-color:#2c6b47;color:#7fe0ae}
html.dark .qn.cur{background:#2d3741;border-color:#9fc4e4;color:#e8eef5}
html.dark .qn.cur.ok,html.dark .qn.cur.bad{color:#fff}
html.dark .qn .dot{background:#5b9cf0;border-color:#1b2027}

html.dark .synccode{background:#171b21;border-color:#434c57;color:#e8eef5}

/* --- ro'yxat ko'rinishi va qidiruv: qorong'u --- */
html.dark .vbtn{background:linear-gradient(180deg,#2f3842,#262e37);border-color:#434c57;color:#9fb6cc}
html.dark .vbtn:hover{background:linear-gradient(180deg,#36424e,#2b343d);border-color:#4a7fa8;color:#dfe6ee}
html.dark .vbtn.on{background:linear-gradient(180deg,#2fb673,#179152);border-color:#12713f;color:#fff}
html.dark .qsearch{background:#1b2027;border-bottom-color:#343d47}
html.dark .qsx:hover{background:#2f3842;border-color:#45515e;color:#dfe6ee}
html.dark .qlrow{background:#1e242b;border-color:#39424d}
html.dark .qlrow.seen{background:#17221d;border-color:#2c6b47}
html.dark .qltext{color:#e8eef5}
html.dark mark.hit{background:#5a4a16;color:#ffe9a8}

html.dark .navrow{background:#1b2027;border-bottom-color:#343d47}
html.dark .qsbtn{color:#9fb6cc;border-right-color:#2a313a}
html.dark .qsbtn:hover{background:#25303b;color:#dfe6ee}
html.dark .qsbtn.on{background:#22402f;color:#7fd6a4}
