/*
 VOICE: calm, formal office tool — like a well-kept university register
 IDEA: the official A4 report page; every screen leads toward it
 PICTURE: progress rings and the live report sheet
 COLOUR+TYPE: white & graphite, cobalt #2453d4 accent, status green/amber/red; system sans, Times for the report
 LAYOUT: fixed sidebar, sticky header, cards on a soft grey ground; drawer under 960px
*/
:root{--bg:#f4f6f9;--surface:#fff;--ink:#141c2b;--ink2:#344054;--muted:#667085;--line:#e3e7ee;--line2:#eef1f5;--acc:#2453d4;--acc2:#1b3fb0;--accw:#eef2ff;--ok:#067647;--okw:#e7f8ef;--warn:#a15c07;--warnw:#fff6e5;--bad:#b42318;--badw:#fef1f0;--r:14px;--sh:0 1px 2px #1018280d,0 1px 3px #1018280f;font-family:"Segoe UI",Inter,system-ui,-apple-system,Roboto,Arial,sans-serif;color:var(--ink);background:var(--bg)}
*{box-sizing:border-box;min-width:0}body{margin:0;font-size:15px;line-height:1.5;overflow-x:clip}
button,input,select,textarea{font:inherit;color:inherit}button{cursor:pointer}button:disabled{opacity:.55;cursor:not-allowed}
a{color:var(--acc)}h1,h2,h3,h4{line-height:1.2;margin:0}.hidden{display:none!important}.muted{color:var(--muted)}
svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex:none}
:focus-visible{outline:3px solid #2453d455;outline-offset:2px;border-radius:8px}
.boot{position:fixed;inset:0;display:grid;place-items:center;background:var(--bg);z-index:50}.spinner{width:34px;height:34px;border:3px solid var(--line);border-top-color:var(--acc);border-radius:50%;animation:sp 1s linear infinite}@keyframes sp{to{transform:rotate(1turn)}}

/* Kirish */
.auth{min-height:100vh;display:grid;grid-template-columns:1.1fr 1fr;background:var(--surface)}
.auth-art{background:linear-gradient(160deg,#16307f,#2453d4 70%,#3b6cf0);color:#fff;padding:48px clamp(28px,5vw,72px);display:flex;flex-direction:column;gap:28px;position:relative;overflow:hidden}
.auth-brand{display:flex;align-items:center;gap:10px;font-weight:700;letter-spacing:.02em}.logo{width:36px;height:36px;border-radius:10px;background:#fff;color:var(--acc);display:grid;place-items:center;font-weight:800;font-size:18px}
.auth-copy h1{font-size:clamp(28px,3.4vw,44px);line-height:1.08;text-wrap:balance;max-width:560px}.auth-copy p{color:#dbe4ff;font-size:17px;max-width:500px}
.auth-pic{width:min(460px,100%);height:auto;margin-top:auto;align-self:center;stroke:none}
.auth-side{display:grid;place-items:center;padding:32px}.auth-card{width:min(420px,100%)}.auth-card h2{font-size:28px;margin-bottom:6px}
.form-error{color:var(--bad);font-size:14px;min-height:20px;margin:4px 0 8px}

/* Asosiy karkas */
.app{display:flex;min-height:100vh}
.side{min-height:100vh;width:256px;background:var(--surface);border-right:1px solid var(--line);display:flex;flex-direction:column;position:sticky;top:0;height:100vh;padding:18px 14px;flex:none;z-index:30}
.side-brand{display:flex;gap:10px;align-items:center;padding:4px 8px 18px}.side-brand .logo{background:var(--acc);color:#fff}.side-brand small{display:block;color:var(--muted);font-size:12px;line-height:1.3}
nav{display:flex;flex-direction:column;gap:2px;overflow:auto}.nav-sec{font-size:11.5px;color:var(--muted);font-weight:600;padding:14px 10px 6px}
.nav-a{display:flex;align-items:center;gap:11px;padding:10px 11px;border-radius:10px;color:var(--ink2);text-decoration:none;font-weight:550;font-size:14.5px;min-height:42px}
.nav-a:hover{background:var(--line2)}.nav-a.on{background:var(--accw);color:var(--acc2)}.nav-a .cnt{margin-left:auto;background:var(--warnw);color:var(--warn);font-size:12px;border-radius:99px;padding:1px 8px;font-weight:700}
.side-foot{margin-top:auto;padding:10px;color:var(--muted);font-size:12px}
.main{flex:1;display:flex;flex-direction:column}
.top{position:sticky;top:0;z-index:20;background:#ffffffeb;backdrop-filter:blur(8px);border-bottom:1px solid var(--line);display:flex;align-items:center;gap:14px;padding:12px 28px;min-height:68px}
.top-title{flex:1}.top-title h1{font-size:20px}.top-title p{margin:2px 0 0;color:var(--muted);font-size:13px}
.top-user{display:flex;align-items:center;gap:10px}.who{display:flex;flex-direction:column;line-height:1.25;font-size:13.5px}.who small{color:var(--muted)}
.avatar{width:36px;height:36px;border-radius:50%;background:var(--accw);color:var(--acc2);display:grid;place-items:center;font-weight:700;font-size:14px}
.icon-btn{border:1px solid var(--line);background:var(--surface);width:40px;height:40px;border-radius:10px;display:grid;place-items:center;color:var(--ink2)}.icon-btn:hover{background:var(--line2)}
.menu-btn{display:none}.scrim{display:none}
.view{padding:26px 28px 60px;max-width:1320px;width:100%;margin:0 auto}

/* Elementlar */
.btn{text-decoration:none;display:inline-flex;align-items:center;justify-content:center;gap:8px;border:1px solid var(--line);background:var(--surface);color:var(--ink2);border-radius:10px;padding:9px 15px;font-weight:600;font-size:14px;min-height:40px;white-space:nowrap}
.btn:hover{background:var(--line2)}.btn.primary{background:var(--acc);border-color:var(--acc);color:#fff}.btn.primary:hover{background:var(--acc2)}
.btn.danger{color:var(--bad);border-color:#f5c7c2}.btn.danger:hover{background:var(--badw)}.btn.ok{background:var(--ok);border-color:var(--ok);color:#fff}
.btn.sm{min-height:34px;padding:6px 11px;font-size:13px}.btn.block{width:100%;min-height:46px}.btn svg{width:18px;height:18px}
.field{display:flex;flex-direction:column;gap:6px;margin:0 0 14px;font-size:13.5px;font-weight:600;color:var(--ink2)}
.field input,.field select,.field textarea,.input{border:1px solid #d0d5dd;border-radius:10px;padding:10px 12px;background:#fff;font-size:16px;font-weight:400;width:100%;min-height:44px}
.field textarea{min-height:80px;resize:vertical}.field input:focus,.field select:focus,.field textarea:focus{border-color:var(--acc);outline:3px solid #2453d422}
.field small{font-weight:400;color:var(--muted)}
.row{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.row.end{justify-content:flex-end}.spread{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap}
.g2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 14px}.g3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0 14px}
.card{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);box-shadow:var(--sh);padding:20px}
.card h3{font-size:16px}.card-h{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:14px;flex-wrap:wrap}
.stack-16>*+*{margin-top:16px}.mt{margin-top:18px}.mt-l{margin-top:28px}
.stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}
.stat{padding:16px 18px}.stat small{color:var(--muted);font-size:13px;font-weight:550}.stat b{display:block;font-size:30px;line-height:1.1;margin-top:6px;font-variant-numeric:tabular-nums}.stat span{font-size:12.5px;color:var(--muted)}
.tag{display:inline-flex;align-items:center;gap:5px;border-radius:99px;padding:3px 10px;font-size:12px;font-weight:650;background:var(--line2);color:var(--ink2);white-space:nowrap}
.tag.ok{background:var(--okw);color:var(--ok)}.tag.warn{background:var(--warnw);color:var(--warn)}.tag.bad{background:var(--badw);color:var(--bad)}.tag.acc{background:var(--accw);color:var(--acc2)}
.tag.ok::before,.tag.warn::before,.tag.bad::before{content:"";width:6px;height:6px;border-radius:50%;background:currentColor}
.bar{height:8px;background:var(--line2);border-radius:99px;overflow:hidden}.bar i{display:block;height:100%;background:var(--acc);border-radius:99px}.bar.ok i{background:#12b76a}
.hero{display:grid;grid-template-columns:auto 1fr;gap:26px;align-items:center}
.ring{--p:0;width:132px;height:132px;border-radius:50%;background:conic-gradient(var(--acc) calc(var(--p)*1%),var(--line2) 0);display:grid;place-items:center}
.ring>div{width:104px;height:104px;border-radius:50%;background:var(--surface);display:grid;place-items:center;text-align:center}.ring b{font-size:28px;line-height:1}.ring small{display:block;font-size:11.5px;color:var(--muted)}
.hero h2{font-size:22px;margin-bottom:6px}.hero p{margin:0 0 12px;color:var(--ink2)}
.cols{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(0,1fr);gap:18px}
.list>*{padding:12px 0;border-bottom:1px solid var(--line2)}.list>*:last-child{border-bottom:0}
.li{display:flex;gap:12px;align-items:center;justify-content:space-between}.li b{font-weight:600}.li small{display:block;color:var(--muted);font-size:12.5px}
table{width:100%;border-collapse:collapse;font-size:14px}th,td{text-align:left;padding:11px 12px;border-bottom:1px solid var(--line2);vertical-align:middle}
th{font-size:12.5px;color:var(--muted);font-weight:600;background:#f9fafb}td.n,th.n{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
.tbl{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);overflow:auto;box-shadow:var(--sh)}.tbl table{min-width:640px}
.toolbar{display:flex;gap:10px;flex-wrap:wrap;align-items:center;margin-bottom:16px}.toolbar .input{width:auto;min-width:180px}
.search{position:relative;flex:1;min-width:200px;max-width:360px}.search svg{position:absolute;left:11px;top:12px;color:var(--muted)}.search .input{padding-left:38px;width:100%}
.chips{display:flex;gap:6px;flex-wrap:wrap}.chip{border:1px solid var(--line);background:var(--surface);border-radius:99px;padding:6px 12px;font-size:13px;font-weight:600;color:var(--ink2);min-height:34px}.chip.on{background:var(--ink);color:#fff;border-color:var(--ink)}
.work{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px 16px;padding:16px 18px}
.work+.work{border-top:1px solid var(--line2)}.work h4{font-size:15px;font-weight:650;margin:4px 0}.work p{margin:0;color:var(--ink2);font-size:13.5px}.work .meta{display:flex;gap:8px;flex-wrap:wrap;align-items:center;font-size:12.5px;color:var(--muted)}
.work .acts{display:flex;gap:6px;align-items:flex-start;flex-wrap:wrap;justify-content:flex-end}
.note{background:var(--warnw);color:#7a4a05;border-radius:10px;padding:11px 14px;font-size:13.5px}.note.info{background:var(--accw);color:#24346b}.note.bad{background:var(--badw);color:var(--bad)}
.thumbs{display:flex;gap:6px;flex-wrap:wrap;margin-top:8px}.thumbs button{width:52px;height:52px;border-radius:8px;border:1px solid var(--line);background:#f2f4f7 center/cover no-repeat;padding:0;font-size:11px;font-weight:700;color:var(--bad)}
.preview{background:#f6f8ff;border:1px solid #dfe6fb;border-radius:10px;padding:12px 14px;font-size:14px;color:#1f2a44}.preview>small{display:block;font-size:11.5px;color:var(--muted);font-weight:650;margin-bottom:4px}
.tpls{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:14px}.tpl{display:flex;flex-direction:column;gap:12px}.tpl h4{font-size:15px}.tpl .preview{flex:1;font-size:13px}
.sec-h{font-size:17px;margin:28px 0 12px;display:flex;align-items:center;gap:10px}.sec-h:first-child{margin-top:0}
.course-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(270px,1fr));gap:14px}.course .hrs{font-size:26px;font-weight:700;margin:10px 0 2px}
.hr-split{display:flex;height:8px;border-radius:99px;overflow:hidden;background:var(--line2);margin:8px 0}.hr-split i{display:block;height:100%}
.legend{display:flex;gap:10px;flex-wrap:wrap;font-size:12px;color:var(--muted)}.legend i{display:inline-block;width:9px;height:9px;border-radius:3px;margin-right:4px}
.filechip{display:flex;align-items:center;gap:10px;justify-content:space-between;border:1px solid var(--line);border-radius:10px;padding:8px 10px;margin-bottom:6px;font-size:13.5px}
.drop{border:1.5px dashed #b9c4d8;border-radius:12px;padding:18px;text-align:center;color:var(--muted);font-size:14px;background:#fafbfd}.drop.on{border-color:var(--acc);background:var(--accw)}
.empty{padding:40px 20px;text-align:center;color:var(--muted)}.empty b{display:block;color:var(--ink);font-size:16px;margin-bottom:4px}

/* Modal va xabarlar */
.modal-bg{position:fixed;inset:0;background:#0f172a80;display:flex;align-items:flex-start;justify-content:center;padding:5vh 16px;z-index:60;overflow:auto}
.modal{background:var(--surface);border-radius:16px;width:min(640px,100%);box-shadow:0 20px 60px #0f172a40;animation:pop .16s ease-out}.modal.wide{width:min(980px,100%)}
.modal-h{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:18px 22px;border-bottom:1px solid var(--line2)}.modal-h h3{font-size:18px}.modal-b{padding:20px 22px}.modal-f{padding:14px 22px;border-top:1px solid var(--line2);display:flex;gap:10px;justify-content:flex-end;flex-wrap:wrap}
@keyframes pop{from{transform:translateY(8px);opacity:0}}
.toasts{position:fixed;right:18px;bottom:18px;display:flex;flex-direction:column;gap:8px;z-index:80}.toast{background:var(--ink);color:#fff;padding:12px 16px;border-radius:10px;font-size:14px;box-shadow:0 8px 24px #0003;max-width:360px}.toast.bad{background:var(--bad)}.toast.ok{background:var(--ok)}
@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}

/* Rasmiy hisobot sahifasi */
.rep-opts{display:flex;gap:12px;flex-wrap:wrap;align-items:flex-end}.rep-opts .field{margin:0;min-width:210px}
.chk{display:flex;gap:8px;align-items:center;font-size:14px;font-weight:550;min-height:44px}.chk input{width:18px;height:18px}
.sheet{background:#fff;width:min(210mm,100%);margin:20px auto 0;padding:20mm 15mm 20mm 25mm;box-shadow:0 4px 24px #10182824;border:1px solid var(--line);font-family:"Times New Roman",Times,serif;font-size:14pt;line-height:1.45;color:#000}
.sheet p{margin:0 0 6pt;text-align:justify}.sheet p.c{text-align:center}.sheet p.l{text-align:left}.sheet p.ind{text-indent:1.25cm}.sheet p.cap{text-align:center;font-style:italic;font-size:12pt}.sheet p.miss{color:#9a5b00;font-style:italic}
.sheet table{border-collapse:collapse;margin:6pt 0 10pt;font-size:11pt}.sheet table.t td,.sheet table.t th{border:1px solid #000;padding:3pt 4pt;background:none;color:#000;font-size:10.5pt;text-align:center;overflow-wrap:anywhere;hyphens:auto}.sheet table.t{min-width:0;table-layout:auto}.sheet table.t td:nth-child(2){text-align:left}.sheet table.t th{font-weight:700}
.sheet table.s td{border:0;padding:5pt 0;font-weight:700;font-size:14pt}.sheet .fig{text-align:center;margin:10pt 0 2pt;break-inside:avoid}.sheet .fig img{max-width:100%;max-height:230mm;border:1px solid #999}.sheet .pb{border-top:1.5px dashed #c8d0dc;margin:24pt 0}
@media(max-width:700px){.sheet{padding:18px 14px;font-size:12.5pt}}

/* Moslashuvchan */
@media(max-width:1100px){.stats{grid-template-columns:repeat(2,minmax(0,1fr))}.cols{grid-template-columns:1fr}}
@media(max-width:960px){.side{position:fixed;left:0;top:0;transform:translateX(-105%);transition:transform .2s;box-shadow:0 10px 40px #0003}.app.open .side{transform:none}.app.open .scrim{display:block;position:fixed;inset:0;background:#0f172a55;z-index:25}.menu-btn{display:grid}.top{padding:10px 16px}.view{padding:18px 16px 50px}}
@media(max-width:820px){.auth{grid-template-columns:1fr}.auth-art{padding:28px 22px}.auth-pic{display:none}.auth-copy h1{font-size:26px}}
@media(max-width:600px){.who{display:none}.g2,.g3{grid-template-columns:1fr}.hero{grid-template-columns:1fr;justify-items:center;text-align:center}.work{grid-template-columns:1fr}.work .acts{justify-content:flex-start}.stat b{font-size:24px}.top-title p{display:none}.modal-bg{padding:0;align-items:stretch}.modal{border-radius:0;min-height:100%}}
@media print{@page{size:A4;margin:20mm 15mm 20mm 25mm}body,:root{background:#fff}.side,.top,.no-print,#modalRoot,.toasts,.scrim{display:none!important}.view{padding:0;max-width:none}.app{display:block}.sheet{margin:0;box-shadow:none;border:0;width:auto;padding:0}.sheet .pb{border:0;margin:0;break-after:page}}
