
:root{
  --bg:#f2f6f9; --surface:#ffffff; --surface2:#e9f0f5; --line:#d4dfe8;
  --text:#16232e; --muted:#5b6f7f;
  --brand:#0788cc; --brand-ink:#05669b; --on-brand:#ffffff;
  --ok:#00a651; --ok-bg:#e0f5ea;
  --late:#f58220; --late-bg:#fdefdf;
  --ret:#a3238e; --ret-bg:#f7e6f4;
  --block:#ed1c24; --block-bg:#fce3e4;
  --none:#8fa3b0; --none-bg:#edf1f4;
  --shadow:0 1px 3px rgba(22,35,46,.08);
}
@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]){
    --bg:#101a22; --surface:#182530; --surface2:#1f2f3c; --line:#2c4050;
    --text:#e8eef3; --muted:#93a7b5;
    --brand:#3aa2e8; --brand-ink:#7cc4f2; --on-brand:#0c1720;
    --ok:#2ec973; --ok-bg:#123527;
    --late:#ffab45; --late-bg:#3a2c14;
    --ret:#e173cd; --ret-bg:#3a1a34;
    --block:#ff6b6e; --block-bg:#421a1c;
    --none:#7d92a0; --none-bg:#22313d;
    --shadow:0 1px 3px rgba(0,0,0,.4);
  }
}
:root[data-theme="dark"]{
  --bg:#101a22; --surface:#182530; --surface2:#1f2f3c; --line:#2c4050;
  --text:#e8eef3; --muted:#93a7b5;
  --brand:#3aa2e8; --brand-ink:#7cc4f2; --on-brand:#0c1720;
  --ok:#2ec973; --ok-bg:#123527;
  --late:#ffab45; --late-bg:#3a2c14;
  --ret:#e173cd; --ret-bg:#3a1a34;
  --block:#ff6b6e; --block-bg:#421a1c;
  --none:#7d92a0; --none-bg:#22313d;
  --shadow:0 1px 3px rgba(0,0,0,.4);
}
*{box-sizing:border-box}
[hidden]{display:none !important}
body{background:var(--bg); color:var(--text); font:15px/1.5 "IBM Plex Sans",system-ui,sans-serif; margin:0; padding:0 0 48px}
h1,h2,h3{font-family:"Manrope","IBM Plex Sans",sans-serif; text-wrap:balance; margin:0}
.wrap{max-width:1240px; margin:0 auto; padding:0 20px}

header{background:var(--surface); border-bottom:1px solid var(--line)}
.hd{display:flex; align-items:center; gap:14px; padding:14px 0; flex-wrap:wrap}
.logo{flex:0 0 auto; display:block}
.hd h1{font-size:19px; font-weight:800; letter-spacing:-.01em}
.hd .sub{color:var(--muted); font-size:13px}
.hd .right{margin-left:auto; display:flex; align-items:center; gap:10px}
.role{display:flex; align-items:center; gap:8px; background:var(--surface2); border:1px solid var(--line); border-radius:999px; padding:4px 12px 4px 4px; font-size:13px; font-weight:600}
.role .av{width:26px;height:26px;border-radius:50%;background:var(--brand);color:var(--on-brand);display:grid;place-items:center;font-size:11px;font-weight:700}
.demo{font-size:11px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; color:var(--late); border:1px dashed var(--late); border-radius:6px; padding:2px 8px}

/* екран входу */
.loginpage{display:flex; justify-content:center; align-items:flex-start; padding:52px 20px}
.loginbox{width:100%; max-width:430px}
.loginbox{background:var(--surface); border:1px solid var(--line); border-radius:14px; padding:26px 28px; box-shadow:0 2px 12px rgba(22,35,46,.08)}
.lb-head{display:flex; gap:14px; align-items:center; padding-bottom:18px; border-bottom:1px solid var(--line); margin-bottom:20px}
.lb-head h1{font-size:17px; font-weight:800; line-height:1.3}
.lb-head p{margin:4px 0 0; font-size:12.5px; color:var(--muted); line-height:1.45}
.lb-form .ff{margin-bottom:13px}
.lb-form input[type=email], .lb-form input[type=password]{width:100%; background:var(--surface); color:var(--text); border:1px solid var(--line); border-radius:8px; padding:10px 12px; font:400 14px "IBM Plex Sans",sans-serif}
.remember{display:flex; gap:8px; align-items:center; font-size:13px; margin-bottom:16px; cursor:pointer}
.remember input{width:16px; height:16px; accent-color:var(--brand)}
.btn.big{padding:11px; font-size:14.5px}
.lb-links{display:flex; gap:9px; justify-content:center; margin-top:14px; font-size:13px}
.lb-links a{color:var(--brand); text-decoration:none}
.lb-links a:hover{text-decoration:underline}
.lb-links span{color:var(--muted)}
.lb-note{margin-top:20px; padding-top:16px; border-top:1px solid var(--line); font-size:12.5px; color:var(--muted); line-height:1.6}
.lb-note b{color:var(--text)}
.loginside{padding-top:8px}
.loginside h2{font-size:15px; font-weight:800; margin-bottom:14px}
.ls-item{display:flex; gap:12px; margin-bottom:14px}
.ls-n{flex:0 0 auto; width:24px; height:24px; border-radius:50%; background:var(--brand); color:var(--on-brand); font:700 12px/24px "Manrope",sans-serif; text-align:center}
.ls-item b{font-size:13.5px}
.ls-item p{margin:2px 0 0; font-size:12.5px; color:var(--muted); line-height:1.5}
.ls-foot{margin-top:20px; padding:12px 14px; background:var(--surface); border:1px solid var(--line); border-radius:10px; font-size:12.5px; color:var(--muted); line-height:1.6}
.ls-foot b{color:var(--text)}
/* конструктор чеклістів */
.wsum{margin-left:auto; font-size:13px; font-weight:600; padding:4px 11px; border-radius:7px}
.wsum.ok{background:var(--ok-bg); color:var(--ok)}
.wsum.bad{background:var(--block-bg); color:var(--block)}
.bl-group{border:1px solid var(--line); border-radius:10px; padding:11px 13px; margin-bottom:10px}
.bl-gh{display:flex; align-items:center; gap:10px; font-size:13.5px; font-weight:700; margin-bottom:8px}
.bl-gt{flex:1; max-width:460px; font:700 13.5px "IBM Plex Sans",sans-serif; background:var(--surface); color:var(--text); border:1px solid var(--line); border-radius:7px; padding:5px 9px}
.bl-row{display:grid; grid-template-columns:18px 1fr 1fr 74px 34px; gap:8px; align-items:center; margin-bottom:6px}
.bl-drag{color:var(--none); cursor:grab; text-align:center; font-size:14px}
.bl-t, .bl-d{background:var(--surface); color:var(--text); border:1px solid var(--line); border-radius:7px; padding:7px 9px; font:400 13px "IBM Plex Sans",sans-serif}
.bl-d{color:var(--muted); font-size:12.5px}
.bl-w{text-align:right; font:700 14px "IBM Plex Sans",sans-serif; font-variant-numeric:tabular-nums; background:var(--surface); color:var(--text); border:1.5px solid var(--brand); border-radius:7px; padding:6px 8px}
.bl-foot{display:flex; gap:14px; align-items:center; flex-wrap:wrap; margin-top:14px; padding-top:12px; border-top:1px solid var(--line)}
.bl-fixed{font-size:12.5px; color:var(--muted); line-height:1.55; max-width:70ch}
.months button small.mp-done{color:var(--ok)}
.months button small{display:block; font-size:10.5px; font-weight:500; color:var(--muted); line-height:1.2}
.months button.on small{color:var(--on-brand); opacity:.85}
@media(max-width:900px){.bl-row{grid-template-columns:18px 1fr 74px 34px} .bl-d{display:none}}
.prof-photo{display:flex; gap:16px; align-items:center; margin-bottom:16px; padding-bottom:14px; border-bottom:1px solid var(--line)}
.prof-actions{display:flex; gap:8px; margin-top:6px}
.handover{display:grid; grid-template-columns:1fr 1fr; gap:12px 20px}
@media(max-width:860px){.handover{grid-template-columns:1fr}}
.ho-step{display:flex; gap:11px; align-items:flex-start}
.ho-step b{font-size:13.5px}
.ho-step p{margin:3px 0 0; font-size:13px; color:var(--muted); line-height:1.55}
.chkline{display:block; font-size:11.5px; line-height:1.5}
.chkline.ok{color:var(--ok)}
.chkline.warn{color:var(--late); font-weight:600}
.nm-b{font-weight:600}

/* перемикач ролі */
.rolesw{display:flex; align-items:center; gap:7px; font-size:12.5px; color:var(--muted)}
.rolesw select{background:var(--surface); color:var(--text); border:1px solid var(--line); border-radius:8px; padding:5px 8px; font:600 12.5px "IBM Plex Sans",sans-serif}
.rolesw select:focus-visible{outline:2px solid var(--brand); outline-offset:2px}

/* кабінет директора */
.dircard{display:flex; align-items:center; gap:16px; flex-wrap:wrap; background:var(--surface); border:1px solid var(--line); border-radius:12px; padding:16px 18px; margin:22px 0 14px; box-shadow:var(--shadow)}
.dir-av{width:56px; height:56px; border-radius:50%; background:var(--brand); color:var(--on-brand); display:grid; place-items:center; font:800 18px "Manrope",sans-serif; flex:0 0 auto}
.dir-who h2{font-size:18px; font-weight:800}
.dir-who p{margin:4px 0 0; font-size:13px; color:var(--muted); line-height:1.5}
.dir-stat{margin-left:auto; text-align:right}
.ds-n{font:800 30px/1 "Manrope",sans-serif; color:var(--ok); font-variant-numeric:tabular-nums}
.ds-n small{font-size:14px; color:var(--muted)}
.ds-l{font-size:12.5px; color:var(--muted); margin-top:3px}
.ds-b{font-size:12px; color:var(--ok); font-weight:600}
.dirgrid{display:grid; grid-template-columns:1fr 1fr; gap:12px}
@media(max-width:900px){.dirgrid{grid-template-columns:1fr}}
.dirbox{background:var(--surface); border:1px solid var(--line); border-radius:12px; padding:15px 17px; box-shadow:var(--shadow)}
.dirbox.full{margin-top:12px}
.db-h{display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-bottom:10px}
.db-h h3{font-size:15px; font-weight:800}
.db-h .status, .db-h .db-note{margin-left:auto}
.db-note{font-size:12px; color:var(--muted)}
.db-sub{margin:0 0 11px; font-size:13px; color:var(--muted); line-height:1.55}
.dline{display:flex; gap:10px; padding:7px 0; border-bottom:1px dotted var(--line); font-size:13.5px}
.dline b{margin-left:auto; font-weight:600}
.dline.warn-line b{color:var(--late)}
.deadline{margin:12px 0; padding:11px 13px; background:var(--surface2); border-radius:9px}
.dl-bar{height:7px; border-radius:4px; background:var(--none-bg); overflow:hidden; margin-bottom:8px}
.dl-bar i{display:block; height:100%; background:var(--late); border-radius:4px}
.deadline p{margin:0; font-size:12.5px; line-height:1.55; color:var(--muted)}
.deadline b{color:var(--text)}
.btn.wide{width:100%; padding:9px}
table.cmp, table.hist{border-collapse:collapse; width:100%; min-width:auto; margin-bottom:12px}
table.cmp th, table.hist th{font-size:11px; text-transform:uppercase; letter-spacing:.05em; color:var(--muted); text-align:left; padding:7px 10px; background:var(--surface2); border-bottom:1px solid var(--line); position:static}
table.cmp td, table.hist td{padding:8px 10px; border-bottom:1px solid var(--line); font-size:13.5px}
table.cmp th:not(:first-child), table.cmp td:not(:first-child),
table.hist th:not(:first-child), table.hist td:not(:first-child){text-align:right}
table.cmp .num, table.hist .num{font-variant-numeric:tabular-nums; font-weight:600}
.cmp .same{color:var(--ok)}
.cmp .lowered{color:var(--late)}
.cmp .lowered span{font-size:11.5px; font-weight:700}
.cmp .tr-sum td{background:var(--surface2); font-weight:700; border-bottom:0}
.hist .st{color:var(--ok); font-weight:700}
.hist .muted-c{color:var(--none)}
.plan-row{display:flex; gap:11px; align-items:flex-start; padding:9px 0; border-top:1px dotted var(--line)}
.plan-row b{font-size:13.5px}
.plan-row p{margin:2px 0 0; font-size:13px; color:var(--muted); line-height:1.5}
.matchbar{display:flex; align-items:center; gap:12px; flex-wrap:wrap; margin-top:12px; padding-top:11px; border-top:1px solid var(--line); font-size:13.5px; font-weight:600}
.matchbar .score{margin-left:auto}

/* форма заповнення */
.fill-head{display:flex; align-items:center; gap:14px; flex-wrap:wrap; margin:20px 0 14px}
.fill-head h2{font-size:19px; font-weight:800}
.fill-sub{margin:3px 0 0; font-size:12.5px; color:var(--muted)}
.monthpick{display:flex; align-items:center; gap:12px; flex-wrap:wrap; background:var(--surface); border:1px solid var(--line); border-radius:12px; padding:12px 15px; margin-bottom:12px; box-shadow:var(--shadow)}
.mp-l{font-size:11px; text-transform:uppercase; letter-spacing:.05em; color:var(--muted); font-weight:700}
.mp-months{background:transparent; border:0; padding:0; gap:6px}
.mp-months button{display:flex; flex-direction:column; align-items:flex-start; gap:2px; border:1px solid var(--line); background:var(--surface); padding:7px 13px; line-height:1.3}
.mp-months button small{font-size:10.5px; font-weight:500; color:var(--muted)}
.mp-months button.on{background:var(--brand); border-color:var(--brand); color:var(--on-brand)}
.mp-months button.on small{color:var(--on-brand); opacity:.85}
.mp-months button[disabled]{opacity:.45; cursor:not-allowed}
.mp-state{margin-left:auto; font-size:12.5px; color:var(--muted)}
.fill-sum{margin-left:auto; text-align:right}
.fs-n{font:800 26px/1 "Manrope",sans-serif; color:var(--brand); font-variant-numeric:tabular-nums}
.fs-n small{font-size:13px; color:var(--muted)}
.fs-l{font-size:12px; color:var(--muted); margin-top:3px}
.fillbox{background:var(--surface); border:1px solid var(--line); border-radius:12px; padding:16px 18px; margin-bottom:12px; box-shadow:var(--shadow)}
.fb-h{display:flex; align-items:baseline; gap:10px; flex-wrap:wrap; margin-bottom:6px}
.fb-h h3{font-size:16px; font-weight:800}
.fb-max{font-size:12.5px; color:var(--muted)}
.fb-auto{margin-left:auto; font:700 14px "Manrope",sans-serif; color:var(--brand)}
.fb-sub{margin:0 0 12px; font-size:13px; color:var(--muted); line-height:1.55; max-width:78ch}
.chk{display:flex; gap:11px; align-items:flex-start; border:1px solid var(--line); border-radius:9px; padding:11px 13px; margin-bottom:7px; cursor:pointer}
.chk:has(.ck-in:checked){border-color:var(--ok); background:var(--ok-bg)}
.chk input[type=checkbox]{width:19px; height:19px; margin:1px 0 0; accent-color:var(--ok); flex:0 0 auto; cursor:pointer}
.chk-b{display:block; flex:1}
.chk-t{display:block; font-size:13.5px; font-weight:600; line-height:1.45}
.chk-w{font-size:11.5px; font-weight:700; color:var(--muted); margin-left:6px; white-space:nowrap}
.chk-d{display:block; font-size:12.5px; color:var(--muted); margin-top:3px; line-height:1.5}
.chk-note{display:block; width:100%; margin-top:8px; background:var(--surface); color:var(--text); border:1px solid var(--line); border-radius:7px; padding:6px 9px; font:400 12.5px "IBM Plex Sans",sans-serif}
.chk-group{border:1px solid var(--line); border-radius:9px; padding:11px 13px; margin-bottom:7px}
.cg-h{font-size:13.5px; font-weight:700; margin-bottom:8px; display:flex; gap:8px; flex-wrap:wrap; align-items:baseline}
.chk.sub{padding:7px 10px; margin-bottom:5px}
.chk.sub .chk-t{font-weight:500}
.upload{margin-top:12px; padding:11px 13px; background:var(--surface2); border-radius:9px}
.up-t{font-size:13px; font-weight:700; margin-bottom:8px}
.up-c{font-weight:500; color:var(--muted); margin-left:5px}
.thumb.ok{background:var(--surface); border-color:var(--ok); color:var(--ok); font-weight:600}
.thumb.add{border:1px dashed var(--brand); color:var(--brand); background:transparent; cursor:pointer; font-weight:600; font-family:inherit}
.up-n{margin:8px 0 0; font-size:12px; color:var(--muted)}
.selfrate{margin-top:14px; padding:12px 14px; border:1px solid var(--line); border-radius:9px; background:var(--surface2)}
.sr-h{display:flex; align-items:baseline; gap:10px; font-size:13.5px; font-weight:600}
.sr-v{margin-left:auto; font-variant-numeric:tabular-nums}
.sr-v b{font:800 19px "Manrope",sans-serif}
.sr-v small{color:var(--muted); font-size:12px}
.g-range.sr{margin:10px 0 6px}
.sr-n{margin:0; font-size:12.5px; color:var(--muted); line-height:1.5}
.kpicard{border:1px solid var(--line); border-radius:10px; margin-bottom:8px; overflow:hidden}
.kpicard.done{border-left:3px solid var(--ok)}
.kpicard.warn{border-left:3px solid var(--late)}
.kc-h{display:flex; align-items:center; gap:9px; flex-wrap:wrap; padding:10px 13px; background:var(--surface2); font-size:14px}
.kc-i{width:19px; min-width:19px; height:19px; border-radius:50%; background:var(--ok); color:#fff;
  font:700 12px/1 "IBM Plex Sans",sans-serif; display:inline-flex; align-items:center; justify-content:center; flex:0 0 auto}
.kc-i.warn{background:var(--late)}
.kc-badge{font-size:10.5px; font-weight:700; background:var(--ok-bg); color:var(--ok); border-radius:4px; padding:2px 6px}
.kc-act{margin-left:auto}
.kc-body{padding:10px 13px}
.kc-q{display:grid; grid-template-columns:112px 1fr; gap:11px; padding:5px 0; font-size:13px}
.kc-q > span{font-size:10.5px; font-weight:700; text-transform:uppercase; letter-spacing:.04em; color:var(--muted); padding-top:2px}
.kc-q p{margin:0; line-height:1.5}
.kc-q.empty p{color:var(--late); font-style:italic}
@media(max-width:620px){.kc-q{grid-template-columns:1fr; gap:1px}}
.btn.dashed{border:1px dashed var(--brand); color:var(--brand); background:transparent}
.submitbar{display:flex; align-items:center; gap:14px; flex-wrap:wrap; background:var(--surface); border:1px solid var(--line); border-left:3px solid var(--late); border-radius:0 12px 12px 0; padding:13px 16px; box-shadow:var(--shadow)}
.sb-warn{font-size:13.5px; color:var(--late); font-weight:600}
.sb-act{margin-left:auto; display:flex; gap:8px}
.btn[disabled]{opacity:.45; cursor:not-allowed}
/* поля модалки показника */
.ff{margin-bottom:15px}
.ff label{display:flex; align-items:baseline; gap:8px; font-size:13px; font-weight:700; margin-bottom:5px}
.ff-ok{font-size:10.5px; font-weight:700; color:var(--ok); background:var(--ok-bg); border-radius:4px; padding:1px 6px}
.ff-need{font-size:10.5px; font-weight:700; color:var(--late); background:var(--late-bg); border-radius:4px; padding:1px 6px}
.ff input[type=text], .ff textarea{width:100%; background:var(--surface); color:var(--text); border:1px solid var(--line); border-radius:8px; padding:8px 10px; font:400 13.5px/1.5 "IBM Plex Sans",sans-serif; resize:vertical}
.ff.need textarea{border-color:var(--late); background:var(--late-bg)}
.ff input:focus-visible, .ff textarea:focus-visible{outline:2px solid var(--brand); outline-offset:1px}
.ff-h{margin:5px 0 0; font-size:12px; color:var(--muted); line-height:1.5}
.devbox{display:flex; gap:9px; align-items:flex-start; border:1px solid var(--line); border-radius:8px; padding:9px 11px; margin-bottom:15px; font-size:13px; line-height:1.5; cursor:pointer}
.devbox input{width:17px; height:17px; margin:1px 0 0; accent-color:var(--ok); flex:0 0 auto}

/* вкладки верхнього рівня */
.tabs{background:var(--surface); border-bottom:1px solid var(--line)}
.tabs-in{display:flex; gap:2px}
.tab{border:0; background:transparent; color:var(--muted); font:600 14px "IBM Plex Sans",sans-serif; padding:11px 16px; cursor:pointer; border-bottom:2.5px solid transparent; margin-bottom:-1px}
.tab:hover{color:var(--text)}
.tab.on{color:var(--brand); border-bottom-color:var(--brand)}
.tab:focus-visible{outline:2px solid var(--brand); outline-offset:-3px}

/* річні плани */
.plan-head{display:flex; gap:16px; align-items:flex-start; flex-wrap:wrap; margin:22px 0 14px}
.plan-head h2{font-size:19px; font-weight:800}
.plan-sub{margin:5px 0 0; font-size:13.5px; color:var(--muted); max-width:78ch; line-height:1.55}
.plan-head .export{margin-left:auto}
#plans{min-width:1080px}
#plans td.inst{width:250px; min-width:250px}
.pcell{font-size:13px; line-height:1.45; max-width:240px; vertical-align:top; padding-top:10px}

/* інструкція */
.instr{max-width:82ch; margin:24px 0}
.instr h2{font-size:20px; font-weight:800; margin-bottom:12px}
.instr h3{font-size:15px; font-weight:800; margin:24px 0 8px}
.steps{padding-left:0; list-style:none; counter-reset:s; display:grid; gap:9px}
.steps li{counter-increment:s; position:relative; padding:11px 14px 11px 46px; background:var(--surface); border:1px solid var(--line); border-radius:9px; font-size:14px; line-height:1.55}
.steps li::before{content:counter(s); position:absolute; left:13px; top:11px; width:22px; height:22px; border-radius:50%; background:var(--brand); color:var(--on-brand); font:700 12px/22px "Manrope",sans-serif; text-align:center}
table.mini{border-collapse:collapse; min-width:auto; width:100%; max-width:520px; background:var(--surface); border:1px solid var(--line); border-radius:9px; overflow:hidden}
table.mini td{padding:9px 14px; border-bottom:1px solid var(--line); font-size:14px}
table.mini td.num{text-align:right; font-variant-numeric:tabular-nums}
table.mini tr.sum td{background:var(--surface2); font-weight:700; border-bottom:0}
.reqs{padding-left:20px; font-size:14px; line-height:1.65; display:grid; gap:5px}
.warn{border:1px solid var(--line); border-left:3px solid var(--late); border-radius:0 10px 10px 0; padding:13px 16px; background:var(--surface); font-size:14px; line-height:1.6}
.warn p{margin:0 0 10px}
.warn p:first-child{font-size:14.5px}
.warn .reqs{margin:0 0 10px}
.warn-foot{margin:0; padding-top:10px; border-top:1px dotted var(--line); color:var(--muted)}
.instr .lead{font-size:14px; line-height:1.6; color:var(--text); max-width:72ch}
.fields{display:grid; gap:10px; margin:14px 0 4px}
.fld{display:flex; gap:13px; background:var(--surface); border:1px solid var(--line); border-radius:10px; padding:13px 15px}
.fld-n{flex:0 0 auto; width:26px; height:26px; border-radius:50%; background:var(--brand); color:var(--on-brand); font:800 13px/26px "Manrope",sans-serif; text-align:center}
.fld h4{margin:2px 0 5px; font:800 14.5px "Manrope",sans-serif}
.fld p{margin:0 0 8px; font-size:13.5px; line-height:1.55}
.fld p:last-child{margin-bottom:0}
.ex{background:var(--surface2); border-radius:7px; padding:8px 11px; line-height:1.7 !important}
.good{color:var(--ok); font-weight:700}
.bad{color:var(--block); font-weight:700}
table.mini.wide{max-width:none}
table.mini th{text-align:left; padding:9px 14px; font-size:12px; text-transform:uppercase; letter-spacing:.05em; background:var(--surface2); border-bottom:1px solid var(--line); position:static}
table.mini.wide td{width:50%; vertical-align:top; font-size:13.5px}
table.mini.wide tr td:first-child{border-right:1px solid var(--line)}
.cases{display:grid; gap:10px; margin-top:12px}
.case{background:var(--surface); border:1px solid var(--line); border-left:3px solid var(--ok); border-radius:0 10px 10px 0; padding:13px 16px}
.case.bad-case{border-left-color:var(--block)}
.case-t{font:800 14.5px "Manrope",sans-serif; margin-bottom:7px}
.case p{margin:0 0 6px; font-size:13.5px; line-height:1.55}
.case-note{margin:8px 0 0 !important; padding-top:8px; border-top:1px dotted var(--line); color:var(--muted)}

.toolbar{display:flex; gap:10px; align-items:center; flex-wrap:wrap; margin:18px 0 14px}
.months{display:flex; gap:4px; background:var(--surface); border:1px solid var(--line); border-radius:10px; padding:4px}
.months button{border:0; background:transparent; color:var(--muted); font:600 13px "IBM Plex Sans",sans-serif; padding:6px 14px; border-radius:7px; cursor:pointer}
.months button.on{background:var(--brand); color:var(--on-brand)}
.months button:focus-visible, .filters :focus-visible, .btn:focus-visible{outline:2px solid var(--brand); outline-offset:2px}
.filters{display:flex; gap:8px; flex-wrap:wrap; margin-left:auto}
.filters select,.filters input{background:var(--surface); color:var(--text); border:1px solid var(--line); border-radius:8px; padding:7px 10px; font:400 13px "IBM Plex Sans",sans-serif; min-width:120px}
.filters input{min-width:210px}

.stats{display:grid; grid-template-columns:repeat(4,1fr); gap:9px}
@media(max-width:1100px){.stats{grid-template-columns:repeat(4,1fr)}}
@media(max-width:980px){.stats{grid-template-columns:repeat(3,1fr)}}
@media(max-width:600px){.stats{grid-template-columns:repeat(2,1fr)}}
.stat{background:var(--surface); border:1px solid var(--line); border-radius:10px; padding:11px 13px; box-shadow:var(--shadow); border-top:3px solid var(--sc,var(--brand))}
.stat .n{font:800 24px/1.1 "Manrope",sans-serif; font-variant-numeric:tabular-nums}
.stat .l{font-size:12px; color:var(--muted); font-weight:500}
.stat .p{font-size:12px; font-weight:600; color:var(--sc,var(--brand))}
.progress{margin:14px 0 4px; background:var(--surface); border:1px solid var(--line); border-radius:10px; padding:12px 14px}
.progress .cap{display:flex; justify-content:space-between; gap:10px; flex-wrap:wrap; font-size:13px; color:var(--muted); margin-bottom:8px}
.progress .cap b{color:var(--text)}
.bar{display:flex; height:12px; border-radius:6px; overflow:hidden; background:var(--none-bg)}
.bar span{display:block; height:100%}

section{margin-top:26px}
.sec-hd{display:flex; align-items:baseline; gap:12px; flex-wrap:wrap; margin-bottom:10px}
.sec-hd h2{font-size:16px; font-weight:800}
.legend{display:flex; gap:14px; flex-wrap:wrap; font-size:12.5px; color:var(--muted); margin-left:auto}
.legend i{display:inline-block; width:11px; height:11px; border-radius:3px; margin-right:5px; vertical-align:-1px}
.export{display:flex; gap:8px}
.btn{border:1px solid var(--line); background:var(--surface); color:var(--text); border-radius:8px; padding:6px 12px; font:600 13px "IBM Plex Sans",sans-serif; cursor:pointer}
.btn.primary{background:var(--brand); border-color:var(--brand); color:var(--on-brand)}
.btn.mini{padding:4px 9px; font-size:12px}
.btn.danger{color:var(--block); border-color:var(--block)}

.tablebox{background:var(--surface); border:1px solid var(--line); border-radius:12px; box-shadow:var(--shadow); overflow:auto; max-height:540px}
table{border-collapse:collapse; width:100%; min-width:900px}
th{font-size:11.5px; text-transform:uppercase; letter-spacing:.06em; color:var(--muted); font-weight:600; text-align:left; padding:10px 12px; border-bottom:1px solid var(--line); background:var(--surface2); position:sticky; top:0; z-index:1}
td{padding:8px 12px; border-bottom:1px solid var(--line); vertical-align:middle}
tbody tr:hover{background:var(--surface2)}
tbody tr{cursor:pointer}
.inst .nm{font-weight:600; line-height:1.3}
.inst .meta{font-size:12px; color:var(--muted)}

/* двошарова шапка матриці */
#matrix{min-width:1180px}
#matrix .hg th{border-bottom:1px solid var(--line); text-align:center; font-size:12px; letter-spacing:.04em; color:var(--text); background:var(--surface2)}
#matrix .hg th:first-child{text-align:left}
#matrix .hs th{top:37px; font-size:10.5px; letter-spacing:.04em; text-align:center; font-weight:600; padding:6px 8px}
#matrix .hg th + th{border-left:2px solid var(--line)}
#matrix th.mstart, #matrix td.mstart{border-left:2px solid var(--line)}
#matrix th.sep, #matrix td.sep{border-left:1px dotted var(--line)}
#matrix td{text-align:center}
#matrix td.inst{text-align:left; width:300px; min-width:300px; max-width:300px}
#matrix td.inst .nm{display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; font-size:13.5px}
#matrix td.inst .meta{white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
#detail td.inst{max-width:280px}
#detail td.inst .nm{display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; font-size:13.5px}
#matrix tbody tr td:nth-child(2), #matrix tbody tr td:nth-child(7),
#matrix tbody tr td:nth-child(12), #matrix tbody tr td:nth-child(17){border-left:2px solid var(--line)}
#matrix .hs th:nth-child(1), #matrix .hs th:nth-child(6),
#matrix .hs th:nth-child(11), #matrix .hs th:nth-child(16){border-left:2px solid var(--line)}
#matrix{min-width:1620px}

.score{display:inline-flex; align-items:center; gap:7px; min-width:100px}
.score .tr{flex:1; height:7px; border-radius:4px; background:var(--none-bg); overflow:hidden}
.score .tr i{display:block; height:100%; border-radius:4px}
.score b{font-size:12.5px; font-variant-numeric:tabular-nums; min-width:34px; text-align:right}
.score b.cut{color:var(--late); position:relative}
.score b.cut::after{content:"▾"; font-size:9px; margin-left:1px; vertical-align:1px}
.score.none{color:var(--none); font-size:13px; min-width:auto; justify-content:center; display:inline-block}
.tot-cell{font:800 15px "Manrope",sans-serif; font-variant-numeric:tabular-nums; color:var(--ok)}
.tot-cell small{font-size:11px; font-weight:600; color:var(--muted)}
.tot-cell.lower{color:var(--text)}

.cell{display:inline-flex; flex-direction:column; align-items:center; gap:1px; min-width:92px; padding:4px 8px; border-radius:7px; font-size:12px; font-weight:700; line-height:1.25}
.cell small{font-size:10.5px; font-weight:600; opacity:.85}
.c-ok{background:var(--ok-bg); color:var(--ok)}
.c-late{background:var(--late-bg); color:var(--late)}
.c-ret{background:var(--ret-bg); color:var(--ret)}
.c-block{background:var(--block-bg); color:var(--block)}
.c-none{background:var(--none-bg); color:var(--none); font-weight:600}
.c-open{background:transparent; border:1px dashed var(--line); color:var(--muted); font-weight:600}

.who{display:flex; align-items:center; gap:10px}
.who .av{width:32px;height:32px;border-radius:50%;display:grid;place-items:center;font-size:11px;font-weight:700;color:#fff;flex:0 0 auto}
.who .nm{font-weight:600; line-height:1.25}
.who .sc{font-size:11.5px; color:var(--muted)}
.num{font-variant-numeric:tabular-nums; white-space:nowrap}
.late-d{color:var(--late); font-weight:700}
.status{display:inline-block; font-size:12px; font-weight:700; border-radius:6px; padding:2px 9px; white-space:nowrap}
.files-n{display:inline-flex; align-items:center; gap:4px; font-size:12.5px; color:var(--muted); font-variant-numeric:tabular-nums}

.mbar{display:inline-flex; align-items:center; gap:8px; min-width:126px}
.mbar .tr{flex:1; height:7px; border-radius:4px; background:var(--none-bg); overflow:hidden}
.mbar .tr i{display:block; height:100%; border-radius:4px}
.mbar b{font-size:12.5px; font-variant-numeric:tabular-nums; min-width:36px; text-align:right}

.note{margin-top:22px; font-size:13px; color:var(--muted); border-left:3px solid var(--brand); padding:8px 12px; background:var(--surface); border-radius:0 8px 8px 0}
.note b{color:var(--text)}

.overlay{position:fixed; inset:0; background:rgba(10,20,28,.55); display:none; align-items:flex-start; justify-content:center; padding:3vh 16px; z-index:50}
.overlay.open{display:flex}
.modal{background:var(--surface); color:var(--text); border:1px solid var(--line); border-radius:14px; max-width:800px; width:100%; max-height:92vh; overflow:auto; box-shadow:0 16px 48px rgba(0,0,0,.32)}
.modal .mh{display:flex; gap:12px; align-items:flex-start; padding:16px 20px 13px; border-bottom:1px solid var(--line); position:sticky; top:0; background:var(--surface); z-index:2}
.modal .mh h3{font-size:17px; font-weight:800}
.modal .mh .meta{font-size:13px; color:var(--muted); margin-top:3px; line-height:1.6}
.modal .close{margin-left:auto; border:1px solid var(--line); background:var(--surface2); color:var(--text); width:30px; height:30px; border-radius:8px; cursor:pointer; font-size:15px; flex:0 0 auto}
.modal .mb{padding:16px 20px 18px}

.lock{display:flex; gap:9px; align-items:flex-start; background:var(--surface2); border:1px solid var(--line); border-left:3px solid var(--brand); border-radius:0 8px 8px 0; padding:9px 12px; font-size:13px; margin-bottom:16px}
.lock b{display:block}
.blk{margin-bottom:20px}
.blk-hd{display:flex; align-items:baseline; gap:10px; margin-bottom:8px; flex-wrap:wrap}
.blk-hd h3{font-size:13px; font-weight:800; text-transform:uppercase; letter-spacing:.05em}
.blk-hd .tot{margin-left:auto; font:800 15px "Manrope",sans-serif}
.ck{display:flex; gap:10px; align-items:flex-start; padding:7px 10px; border:1px solid var(--line); border-radius:8px; margin-bottom:6px; font-size:13.5px}
.ck .tick{flex:0 0 auto; width:20px; height:20px; border-radius:6px; display:grid; place-items:center; font-size:12px; font-weight:800}
.ck.on .tick{background:var(--ok-bg); color:var(--ok)}
.ck.off .tick{background:var(--block-bg); color:var(--block)}
.ck .w{margin-left:auto; font-weight:700; font-variant-numeric:tabular-nums; color:var(--muted); white-space:nowrap}
.ck.on .w{color:var(--ok)}
.proj{border:1px solid var(--line); border-radius:10px; padding:12px 14px; margin-bottom:8px}
.proj .t{font-weight:700; font-size:14.5px; margin-bottom:9px}
.proj .q{display:grid; grid-template-columns:148px 1fr; gap:12px; padding:6px 0; border-top:1px dotted var(--line)}
.proj .q p{margin:0; font-size:13.5px; line-height:1.5}
.q-l{font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.05em; color:var(--muted); padding-top:2px}
.proj .q-foot{display:grid; grid-template-columns:148px 1fr; gap:12px; align-items:center; padding:8px 0 2px; border-top:1px solid var(--line); margin-top:4px}
@media(max-width:620px){.proj .q, .proj .q-foot{grid-template-columns:1fr; gap:2px}}
.thumbs{display:flex; gap:6px; margin-top:9px; flex-wrap:wrap}
.thumb{width:64px; height:48px; border-radius:6px; border:1px solid var(--line); display:grid; place-items:center; font-size:10px; color:var(--muted); background:var(--surface2); text-align:center; line-height:1.2}
/* оцінка департаменту */
.grade{margin-top:10px; border:1px solid var(--line); border-radius:9px; padding:10px 12px; background:var(--surface2)}
.g-row{display:flex; align-items:center; gap:10px; font-size:13.5px; padding:3px 0}
.g-l{color:var(--muted)}
.g-v{margin-left:auto; font-weight:700; font-variant-numeric:tabular-nums}
.g-row.edit .g-l{color:var(--text); font-weight:600}
.g-num{margin-left:auto; font-variant-numeric:tabular-nums}
.g-num b{font:800 19px/1 "Manrope",sans-serif}
.g-num small{font-size:12px; color:var(--muted)}
.g-range{-webkit-appearance:none; appearance:none; width:100%; height:8px; margin:10px 0 2px; border-radius:5px; cursor:pointer;
  background:linear-gradient(to right, var(--c) 0 var(--p), var(--none-bg) var(--p) 100%)}
.g-range::-webkit-slider-thumb{-webkit-appearance:none; width:20px; height:20px; border-radius:50%; background:var(--surface); border:3px solid var(--c); cursor:grab; box-shadow:0 1px 4px rgba(0,0,0,.25)}
.g-range::-moz-range-thumb{width:16px; height:16px; border-radius:50%; background:var(--surface); border:3px solid var(--c); cursor:grab}
.g-range:focus-visible{outline:2px solid var(--brand); outline-offset:3px}
.g-scale{display:flex; justify-content:space-between; font-size:11px; color:var(--muted); font-variant-numeric:tabular-nums}
.ck-c{font-size:12px; color:var(--muted); margin-top:1px}
.cpv-badge{display:inline-block; font-size:10.5px; font-weight:700; background:var(--late-bg); color:var(--late); border-radius:4px; padding:1px 5px; margin-left:5px; vertical-align:1px}
.sumbox{display:flex; align-items:baseline; gap:12px; flex-wrap:wrap; border:1px solid var(--line); border-left:3px solid var(--ok); border-radius:0 10px 10px 0; padding:11px 14px; margin-bottom:20px; background:var(--surface2)}
.sumbox > span:first-child{font-weight:700}
.sumbox b{font:800 22px/1 "Manrope",sans-serif; color:var(--ok); font-variant-numeric:tabular-nums}
.sumbox b small{font-size:12px; font-weight:600; color:var(--muted)}
.sum-split{margin-left:auto; font-size:13px; color:var(--muted)}
.claimed{font-size:11.5px; color:var(--late); margin-top:2px}
.gatebox{border:1px solid var(--line); border-radius:10px; padding:12px 14px; background:var(--surface2)}
.gatebox.fail{border-color:var(--block); background:color-mix(in srgb, var(--block-bg) 55%, var(--surface))}
.gate-sub{margin:0 0 10px; font-size:12.5px; color:var(--muted); line-height:1.5}
.gate-i{display:flex; gap:10px; align-items:flex-start; padding:7px 9px; border-radius:7px; background:var(--surface); border:1px solid var(--line); margin-bottom:5px; cursor:pointer; font-size:13px}
.gate-i input{width:17px; height:17px; margin:1px 0 0; accent-color:var(--ok); flex:0 0 auto}
.gate-i.off{border-color:var(--block)}
.gate-i.off b{color:var(--block)}
.gate-i b{display:block; font-weight:600; line-height:1.4}
.gate-i small{display:block; font-size:11.5px; color:var(--muted); margin-top:1px}
.gate-res{margin-top:9px; padding-top:9px; border-top:1px dotted var(--line); font-size:13.5px}
.pt-row{display:flex; gap:10px; align-items:center; padding:7px 10px; border:1px solid var(--line); border-radius:8px; margin-bottom:6px; font-size:13.5px; background:var(--surface)}
.pt-row.off{background:var(--block-bg)}
.pt-row .tick{flex:0 0 auto; width:20px; height:20px; border-radius:6px; display:grid; place-items:center; font-size:12px; font-weight:800; background:var(--ok-bg); color:var(--ok)}
.pt-row.off .tick{background:var(--surface); color:var(--block)}
.pt-t{flex:1; line-height:1.4}
.pt-t small{display:block; font-size:11.5px; color:var(--muted); margin-top:1px}
.pt-in{display:inline-flex; align-items:center; gap:5px; flex:0 0 auto}
.pt-in input{width:62px; text-align:right; font:700 14px "IBM Plex Sans",sans-serif; font-variant-numeric:tabular-nums; background:var(--surface); color:var(--text); border:1.5px solid var(--brand); border-radius:7px; padding:5px 8px}
.pt-in small{font-size:12px; color:var(--muted)}
.blk-claim{margin-left:auto; font-size:12.5px; color:var(--muted)}
.blk-hd .blk-claim + .tot{margin-left:12px}
.blk-note{margin:0 0 9px; font-size:12.5px; color:var(--muted); line-height:1.5}
.proj .pt-row{margin:10px 0 0; background:var(--surface2)}
.cpv-sub{font-size:11px; color:var(--late); font-weight:700; margin-top:2px}
.cpv-sub span{color:var(--muted); font-weight:500}
.substat{font-size:11px; margin-top:3px; font-weight:600}
.btn.help{border-color:var(--brand); color:var(--brand); font-size:12.5px; padding:5px 11px}
.sel-w{width:100%; background:var(--surface); color:var(--text); border:1px solid var(--line); border-radius:8px; padding:8px 10px; font:400 13.5px "IBM Plex Sans",sans-serif}
.techinfo{border:1px solid var(--line); border-radius:9px; padding:11px 13px; background:var(--surface2); margin-bottom:12px}
.ti-h{font-size:11px; text-transform:uppercase; letter-spacing:.05em; color:var(--muted); font-weight:700; margin-bottom:8px}
.ti-r{display:flex; gap:12px; font-size:12.5px; padding:3px 0; line-height:1.5}
.ti-r > span{color:var(--muted); min-width:132px; flex:0 0 auto}
.ti-r b{font-weight:600}
/* журнал */
#logtable{min-width:1080px}
#logtable td{font-size:12.5px; vertical-align:top; padding:9px 12px}
.lg-who{font-weight:600; line-height:1.35}
.lg-who div{font-weight:400; color:var(--muted); font-size:12px}
.lg-d{line-height:1.5; max-width:420px}
.lg-ip{color:var(--muted); white-space:nowrap; font-size:11.5px}
.lg-t{display:inline-block; font-size:11px; font-weight:700; border-radius:5px; padding:2px 7px; white-space:nowrap}
.lg-t.send{background:var(--ok-bg); color:var(--ok)}
.lg-t.edit{background:var(--late-bg); color:var(--late)}
.lg-t.grade{background:var(--surface2); color:var(--brand-ink)}
.lg-t.open{background:var(--block-bg); color:var(--block)}
.lg-t.cmt, .lg-t.help{background:var(--ret-bg); color:var(--ret)}
.lg-t.sys, .lg-t.in, .lg-t.lock{background:var(--none-bg); color:var(--none)}
tr.lg-warn td{background:color-mix(in srgb, var(--late-bg) 45%, transparent)}
.mbar b small{font-size:10.5px; font-weight:500; color:var(--muted)}
.cmp td small, .dline small{color:var(--muted); font-weight:400}
table.mini.wide tr td:first-child{width:auto}
table.mini.wide td:not(:first-child){width:26%; text-align:right}
.addc-hint{font-size:12.5px; color:var(--muted); margin:6px 0 10px}

.cmt{border:1px solid var(--line); border-radius:8px; padding:9px 12px; margin-bottom:7px; font-size:13.5px}
.cmt .h{font-size:12px; color:var(--muted); margin-bottom:3px}
.cmt.mod{border-left:3px solid var(--ret)}
.cmt.dir{border-left:3px solid var(--brand)}
.addc{display:flex; gap:8px; margin-top:8px}
.addc input{flex:1; background:var(--surface); color:var(--text); border:1px solid var(--line); border-radius:8px; padding:8px 10px; font:400 13.5px "IBM Plex Sans",sans-serif}
.mf{display:flex; gap:8px; justify-content:flex-end; align-items:center; padding:0 20px 18px; flex-wrap:wrap}
.mf-note{margin-right:auto; font-size:12.5px; color:var(--muted); font-style:italic}
.planref{border:1px solid var(--line); border-left:3px solid var(--brand); border-radius:0 9px 9px 0; padding:9px 12px; margin-bottom:16px; font-size:13px; line-height:1.75; background:var(--surface2)}
.planref-m{display:block; margin-top:4px; color:var(--muted)}
.planref-m b{color:var(--text)}
.tag{display:inline-block; font-size:11px; font-weight:700; border-radius:5px; padding:1px 7px; margin-right:6px; vertical-align:1px}
.tag.i{background:var(--surface2); color:var(--brand-ink)}
.tag.o{background:var(--ret-bg); color:var(--ret)}
.tag.u{background:var(--late-bg); color:var(--late)}

/* робочий застосунок */
.rolesw,.demo{display:none !important}
.msg{border-radius:9px;padding:10px 13px;font-size:13.5px;margin:10px 0}
.msg.err{background:var(--block-bg);color:var(--block)}
.msg.ok{background:var(--ok-bg);color:var(--ok)}
.msg.info{background:var(--surface2);color:var(--text)}
.stub{border:1px dashed var(--line);border-radius:12px;padding:28px;text-align:center;color:var(--muted);margin-top:22px}
.stub b{display:block;color:var(--text);font-size:15px;margin-bottom:6px}
.toolbar-r{margin-left:auto;display:flex;gap:8px}
.ph-img{width:56px;height:56px;border-radius:50%;object-fit:cover}

/* у робочому застосунку місяці й вкладки — посилання, а не кнопки */
.months a{display:inline-flex;flex-direction:column;align-items:flex-start;gap:2px;
  border:0;background:transparent;color:var(--muted);font:600 13px "IBM Plex Sans",sans-serif;
  padding:6px 14px;border-radius:7px;cursor:pointer;text-decoration:none;line-height:1.3}
.months a.on{background:var(--brand);color:var(--on-brand)}
.months a small{font-size:10.5px;font-weight:500;color:var(--muted)}
.months a.on small{color:var(--on-brand);opacity:.85}
.mp-months a{border:1px solid var(--line);background:var(--surface)}
.mp-months a.on{background:var(--brand);border-color:var(--brand)}
a.tab{text-decoration:none}
.kc-title{flex:1;min-width:220px;font:700 14px "IBM Plex Sans",sans-serif;background:var(--surface);
  color:var(--text);border:1px solid var(--line);border-radius:7px;padding:6px 10px}
.kc-dev{display:inline-flex;align-items:center;gap:6px;font-size:12px;color:var(--muted);cursor:pointer}
.kc-dev input{width:15px;height:15px;accent-color:var(--ok)}
.thumb-del{display:block;font-size:9.5px;color:var(--block);cursor:pointer;margin-top:2px}
.thumb-del input{width:11px;height:11px;vertical-align:-1px}
label.thumb.add{cursor:pointer}
.msg a{color:var(--brand)}

/* ── коефіцієнти закладів ────────────────────────────────────────────────── */
.coef-cell{display:inline-block;font:700 14px "IBM Plex Sans",sans-serif;font-variant-numeric:tabular-nums;
  background:var(--surface2);color:var(--brand-ink);border-radius:6px;padding:2px 8px;white-space:nowrap}
.coef-cell.big{font-size:16px;padding:4px 11px}
.coef-sub{font-size:11px;color:var(--muted);margin-top:2px}
.tot-cell.final{color:var(--brand-ink)}
.coef-form{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin:0}
.st-in{width:74px;text-align:right;font:600 13px "IBM Plex Sans",sans-serif;font-variant-numeric:tabular-nums;
  background:var(--surface);color:var(--text);border:1px solid var(--line);border-radius:7px;padding:5px 8px}
.chk-in{display:inline-flex;gap:5px;align-items:center;font-size:12.5px;color:var(--muted);white-space:nowrap;cursor:pointer}
.chk-in input{width:15px;height:15px;accent-color:var(--ok);margin:0}
.gr-badge{display:inline-block;font-size:11.5px;font-weight:600;border-radius:6px;padding:2px 8px;white-space:nowrap}
.gr-badge.g1{background:var(--block-bg);color:var(--block)}
.gr-badge.g2{background:var(--late-bg);color:var(--late)}
.gr-badge.g3{background:var(--ret-bg);color:var(--ret)}
.gr-badge.g4{background:var(--ok-bg);color:var(--ok)}
.cf-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-bottom:12px}
@media(max-width:1000px){.cf-grid{grid-template-columns:repeat(2,1fr)}}
.cf-card{border:1px solid var(--line);border-radius:10px;overflow:hidden;background:var(--surface)}
.cf-h{display:flex;justify-content:space-between;align-items:baseline;gap:8px;padding:8px 12px;
  background:var(--surface2);font:800 13.5px "Manrope",sans-serif;border-bottom:1px solid var(--line)}
.cf-h span{font:500 11.5px "IBM Plex Sans",sans-serif;color:var(--muted)}
.cf-b{padding:10px 12px}
.cf-b label{display:block;font-size:11px;text-transform:uppercase;letter-spacing:.05em;color:var(--muted);font-weight:700;margin:0 0 4px}
.cf-b label:nth-of-type(2){margin-top:10px}
.cf-fixed{display:flex;gap:6px;align-items:center;font-size:13px;color:var(--muted)}
.cf-fixed input{width:72px;text-align:right;font:600 13px "IBM Plex Sans",sans-serif;
  background:var(--surface);color:var(--text);border:1px solid var(--line);border-radius:7px;padding:5px 8px}
.cf-k{width:100%;text-align:center;font:800 18px "Manrope",sans-serif;font-variant-numeric:tabular-nums;
  background:var(--surface);color:var(--brand);border:1.5px solid var(--brand);border-radius:8px;padding:6px 8px}
.cf-add{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-bottom:12px}
@media(max-width:800px){.cf-add{grid-template-columns:1fr}}
.cf-one{border:1px solid var(--line);border-radius:10px;padding:10px 12px;background:var(--surface)}
.cf-one label{display:block;font-size:12px;color:var(--muted);line-height:1.4;margin-bottom:6px;min-height:34px}
.cf-one input{width:100%;text-align:center;font:700 15px "IBM Plex Sans",sans-serif;font-variant-numeric:tabular-nums;
  background:var(--surface);color:var(--text);border:1px solid var(--line);border-radius:7px;padding:6px 8px}
.cf-example{border:1px solid var(--line);border-left:3px solid var(--brand);border-radius:0 9px 9px 0;
  padding:11px 14px;background:var(--surface2);font-size:12.5px;line-height:1.65}
.cf-warn{border:1px solid var(--late);border-left:3px solid var(--late);border-radius:0 9px 9px 0;
  padding:11px 14px;background:var(--late-bg);font-size:13px;line-height:1.55;margin:12px 0}
.imp-ta{width:100%;background:var(--surface);color:var(--text);border:1px solid var(--line);border-radius:8px;
  padding:9px 11px;font:400 13px/1.6 "IBM Plex Sans",sans-serif;resize:vertical}

/* ── погодження пункту: бали + підстава ─────────────────────────────────── */
.pt-row{flex-direction:column;align-items:stretch;gap:0}
.pt-main{display:flex;gap:10px;align-items:center}
.pt-row.cut-row{border-color:var(--late);background:var(--late-bg)}
.pt-note{display:flex;gap:9px;align-items:center;margin:8px 0 0;padding-top:8px;border-top:1px dotted var(--line)}
.pt-note input{flex:1;background:var(--surface);color:var(--text);border:1px solid var(--line);border-radius:7px;
  padding:6px 9px;font:400 12.5px "IBM Plex Sans",sans-serif}
.pt-row.cut-row .pt-note input{border-color:var(--late)}
.pt-note-req{font-size:11px;color:var(--muted);white-space:nowrap}
.pt-note-ro{margin-top:8px;padding-top:8px;border-top:1px dotted var(--line);font-size:12.5px;line-height:1.5;color:var(--late)}
.btn.zero{border-color:var(--late);color:var(--late);white-space:nowrap}

/* ── місце в групі, премія, розбивка по групах ──────────────────────────── */
.place{display:inline-block;font:700 15px "IBM Plex Sans",sans-serif;font-variant-numeric:tabular-nums;
  background:var(--surface2);color:var(--text);border-radius:6px;padding:2px 9px;white-space:nowrap}
.place.top{background:var(--ok-bg);color:var(--ok)}
.place small{font-size:11px;font-weight:500;color:var(--muted)}
.prem{display:inline-block;font:700 14px "IBM Plex Sans",sans-serif;font-variant-numeric:tabular-nums;
  color:var(--brand-ink);white-space:nowrap}
.prem small{font-size:11px;font-weight:500;color:var(--muted)}
.cf-k.rate{font-size:16px;color:var(--brand-ink);border-color:var(--brand-ink)}
.grp-strip{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin:12px 0}
@media(max-width:1000px){.grp-strip{grid-template-columns:repeat(2,1fr)}}
.grp-item{background:var(--surface);border:1px solid var(--line);border-radius:10px;padding:10px 13px;box-shadow:var(--shadow)}
.gi-l{font-size:11.5px;color:var(--muted);font-weight:600;line-height:1.35;min-height:32px}
.gi-n{font:800 21px/1.1 "Manrope",sans-serif;font-variant-numeric:tabular-nums;color:var(--text);margin-top:4px}
.gi-n small{font-size:12px;font-weight:600;color:var(--muted)}
.gi-s{font-size:11.5px;color:var(--muted);margin-top:3px}

/* ── закритий замок: «змінити не можна» ─────────────────────────────────── */
.lock-tag{display:inline-flex;align-items:center;gap:6px;font-size:12.5px;font-weight:600;color:var(--muted);
  background:var(--surface2);border:1px solid var(--line);border-radius:7px;padding:3px 10px}
.lock-i{flex:0 0 auto;color:var(--muted)}
.mp-state .lock-tag{background:transparent;border:0;padding:0;font-weight:500}
.lock .lock-i{width:19px;height:19px;color:var(--brand-ink)}
.selfrate.auto{background:var(--surface2)}
.selfrate.auto .sr-h{font-weight:600}
.selfrate.auto .sr-v b{color:var(--brand)}

/* ── річний план: проєкти по напрямах ───────────────────────────────────── */
.pj-sec{margin-bottom:16px}
.pj-sh{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:8px}
.pj-hint{font-size:12px;color:var(--muted);flex:1;min-width:200px}
.pj-count{font-size:11.5px;font-weight:600;color:var(--muted);background:var(--surface2);border-radius:6px;padding:2px 9px}
.pj-list{display:grid;gap:9px}
.pj{background:var(--surface);border:1px solid var(--line);border-radius:11px;overflow:hidden;box-shadow:var(--shadow)}
.pj-h{display:flex;align-items:center;gap:9px;padding:9px 12px;background:var(--surface2);border-bottom:1px solid var(--line)}
.pj-n{flex:0 0 auto;width:22px;height:22px;border-radius:50%;background:var(--brand);color:var(--on-brand);
  font:800 12px/22px "Manrope",sans-serif;text-align:center}
.pj-t{flex:1;background:var(--surface);color:var(--text);border:1px solid var(--line);border-radius:7px;
  padding:7px 10px;font:600 14px "IBM Plex Sans",sans-serif}
.pj-x{flex:0 0 auto;width:26px;height:26px;border:1px solid var(--line);background:var(--surface);color:var(--muted);
  border-radius:7px;cursor:pointer;font-size:13px;line-height:1}
.pj-x:hover{border-color:var(--block);color:var(--block)}
.pj-b{padding:10px 12px}
.pj-b label{display:block;font-size:11px;text-transform:uppercase;letter-spacing:.05em;color:var(--muted);
  font-weight:700;margin:0 0 4px}
.pj-b label:nth-of-type(2){margin-top:9px}
.pj-b textarea,.pj-b input{width:100%;background:var(--surface);color:var(--text);border:1px solid var(--line);
  border-radius:8px;padding:8px 10px;font:400 13.5px/1.55 "IBM Plex Sans",sans-serif;resize:vertical}
.btn.pj-add{width:100%;margin-top:9px}
.pj-foot{display:flex;align-items:center;gap:14px;flex-wrap:wrap;background:var(--surface);border:1px solid var(--line);
  border-radius:12px;padding:13px 16px;box-shadow:var(--shadow)}
.pj-note{flex:1;font-size:12.5px;color:var(--muted);min-width:220px}

/* ── профіль: особисті дані ─────────────────────────────────────────────── */
.prof-id{display:flex;align-items:center;gap:13px;padding:11px 13px;background:var(--surface2);
  border-radius:11px;margin-bottom:14px}
.prof-av{flex:0 0 auto;width:46px;height:46px;border-radius:50%;background:var(--brand);color:var(--on-brand);
  display:grid;place-items:center;font:800 16px "Manrope",sans-serif}
.prof-name{font:800 15.5px "Manrope",sans-serif;line-height:1.3}
.prof-role{font-size:12.5px;color:var(--muted);margin-top:2px}
.prof-row{display:grid;grid-template-columns:1fr 1fr;gap:12px}
@media(max-width:760px){.prof-row{grid-template-columns:1fr}}
.ff-req{font-size:10.5px;font-weight:700;color:var(--late);background:var(--late-bg);border-radius:4px;padding:1px 6px}
.mp-late{color:var(--late);font-weight:600}

/* ── типи закладів: школи працюють, решта згодом ────────────────────────── */
.type-strip{display:flex;gap:7px;flex-wrap:wrap;margin:18px 0 4px}
.ts{display:inline-flex;flex-direction:column;gap:1px;padding:7px 14px;border:1px solid var(--line);
  border-radius:9px;background:var(--surface);color:var(--text);text-decoration:none;
  font:700 13.5px "IBM Plex Sans",sans-serif;line-height:1.3}
.ts small{font:500 10.5px "IBM Plex Sans",sans-serif;color:var(--muted)}
.ts.on{background:var(--brand);border-color:var(--brand);color:var(--on-brand)}
.ts.on small{color:var(--on-brand);opacity:.85}
.ts.off{opacity:.5;cursor:not-allowed}

/* ── самооцінка: число + смуга ───────────────────────────────────────────── */
.selfrate .sr-h{align-items:center}
.sr-box{margin-left:auto;display:inline-flex;align-items:center;gap:6px}
.sr-num{width:66px;text-align:center;font:800 17px "Manrope",sans-serif;font-variant-numeric:tabular-nums;
  background:var(--surface);color:var(--text);border:1.5px solid var(--brand);border-radius:8px;padding:5px 6px}
.sr-num:focus-visible{outline:2px solid var(--brand);outline-offset:2px}
.sr-max{font-size:12px;color:var(--muted);white-space:nowrap}
.sr-step{width:28px;height:30px;border:1px solid var(--line);background:var(--surface);color:var(--text);
  border-radius:7px;cursor:pointer;font:600 16px/1 "IBM Plex Sans",sans-serif}
.sr-step:hover:not(:disabled){border-color:var(--brand);color:var(--brand)}
.sr-step:disabled{opacity:.4;cursor:not-allowed}
/* смуга: видима рамка, щоб було зрозуміло, що це елемент керування */
.sr-track{margin:12px 0 4px;padding:8px 10px 4px;background:var(--surface);border:1px solid var(--line);border-radius:9px}
.g-range.sr{margin:0;height:10px;border:1px solid var(--line)}
.g-range.sr::-webkit-slider-thumb{width:24px;height:24px;border-width:4px;box-shadow:0 2px 6px rgba(0,0,0,.3)}
.g-range.sr::-moz-range-thumb{width:20px;height:20px;border-width:4px}
.sr-scale{display:flex;justify-content:space-between;font-size:11px;color:var(--muted);
  font-variant-numeric:tabular-nums;margin-top:5px}

/* ── реєстрація: пошук закладу ──────────────────────────────────────────── */
.inst-pick{width:100%;background:var(--surface);color:var(--text);border:1.5px solid var(--brand);
  border-radius:8px;padding:10px 12px;font:400 14px "IBM Plex Sans",sans-serif}
.inst-pick:focus-visible{outline:2px solid var(--brand);outline-offset:2px}
.ff-hint-i{font-size:11px;font-weight:500;color:var(--muted);text-transform:none;letter-spacing:0}
.ok-h{color:var(--ok) !important}
.warn-h{color:var(--late) !important}

/* поле пошуку закладу — на всю ширину форми, як інші поля */
.lb-form .inst-pick, .ff .inst-pick{width:100%;box-sizing:border-box;min-width:0}
.ff .ff-h{margin-top:5px}

/* ── попередження: пошта не підключена (лише адміністратор) ───────────── */
.mail-warn{display:flex;gap:11px;align-items:flex-start;margin:14px 0 0;padding:11px 14px;
  background:var(--late-bg);border:1px solid var(--late);border-radius:10px;
  font-size:13px;line-height:1.55;color:var(--text)}
.mail-warn > :first-child{flex:0 0 auto;font-size:15px;color:var(--late)}

/* ── що потребує дії ────────────────────────────────────────────────────── */
.tab-badge{display:inline-flex;align-items:center;justify-content:center;min-width:19px;height:19px;
  margin-left:6px;padding:0 5px;border-radius:10px;background:var(--block);color:#fff;
  font:800 11px/1 "IBM Plex Sans",sans-serif;vertical-align:1px}
.tab-badge.soft{background:var(--ret)}
.todo{margin:16px 0 0;border:1px solid var(--brand);border-radius:12px;overflow:hidden;background:var(--surface);box-shadow:var(--shadow)}
.todo-h{padding:9px 14px;background:var(--brand);color:var(--on-brand);
  font:800 13px "Manrope",sans-serif;letter-spacing:.02em}
.todo-i{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:11px 14px;
  border-top:1px solid var(--line);text-decoration:none;color:var(--text)}
.todo-i:first-of-type{border-top:0}
.todo-i:hover{background:var(--surface2)}
.todo-t{font-weight:700;font-size:14px}
.todo-d{font-size:12.5px;color:var(--muted);flex:1;min-width:160px}
.todo-go{font-size:12.5px;font-weight:600;color:var(--brand)}

/* ── пошук у списку керівників закладів ─────────────────────────────────── */
#dyr-list .filters{margin:0 0 10px}
#dyr-list .filters input[type=search]{min-width:260px;flex:1}

/* ── сторінка «дію не виконано»: застаріла вкладка ─────────────────────── */
.lb-warn{margin-bottom:16px;padding:12px 14px;background:var(--late-bg);border:1px solid var(--late);
  border-radius:10px;font-size:13px;line-height:1.6}
.lb-warn b{display:block;margin-bottom:6px;font-size:14px}
.lb-warn p{margin:6px 0 0;color:var(--muted)}
