/* SAADI Business Hub: shared look (matches the Class Capacity page) */
:root{
  --bg:#f6f4f6; --surface:#ffffff; --surface-2:#f0eaef; --ink:#1d1a1f; --muted:#6b6470; --line:#e2dbe1;
  --brand:#f20779; --brand-ink:#ffffff; --accent:#d4066a; --accent-ink:#ffffff;
  --good:#12917f; --warn:#e07b12; --bad:#c8242e; --good-bg:#def3ef; --warn-bg:#fcecd9; --bad-bg:#fbe2e3;
  --none:#a59eaa; --none-bg:#efebef;
  --display:"Jost","Futura PT",Futura,"Century Gothic",system-ui,sans-serif;
  --body:"Figtree","Proxima Nova",system-ui,-apple-system,"Segoe UI",sans-serif;
  color-scheme:light;
}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]){
  --bg:#151216; --surface:#1f1b21; --surface-2:#2a242c; --ink:#f2edf2; --muted:#a9a0ad; --line:#362f39;
  --brand:#d10a6c; --accent:#ff4fa3; --accent-ink:#151216;
  --good:#3fc6ad; --warn:#f3a145; --bad:#ff6b6b; --good-bg:#16332e; --warn-bg:#3a2a16; --bad-bg:#3d1a1d;
  --none:#6f6773; --none-bg:#2a242c; color-scheme:dark}}
:root[data-theme="dark"]{
  --bg:#151216; --surface:#1f1b21; --surface-2:#2a242c; --ink:#f2edf2; --muted:#a9a0ad; --line:#362f39;
  --brand:#d10a6c; --accent:#ff4fa3; --accent-ink:#151216;
  --good:#3fc6ad; --warn:#f3a145; --bad:#ff6b6b; --good-bg:#16332e; --warn-bg:#3a2a16; --bad-bg:#3d1a1d;
  --none:#6f6773; --none-bg:#2a242c; color-scheme:dark}
*{box-sizing:border-box}
[hidden]{display:none!important}
body{margin:0;background:var(--bg);color:var(--ink);font-family:var(--body);font-size:15px;line-height:1.45;padding:20px 16px 48px}
.wrap{max-width:1200px;margin:0 auto;display:flex;flex-direction:column;gap:20px}
.wrap>*{min-width:0}
h1,h2,h3{font-family:var(--display);font-weight:600;margin:0;letter-spacing:.01em;text-wrap:balance}
h2{font-size:21px} h3{font-size:17px}
.eyebrow{font-size:12px;letter-spacing:.12em;text-transform:uppercase;color:var(--muted);font-weight:600}
.muted{color:var(--muted)} .num{font-variant-numeric:tabular-nums}
button,select,input,textarea{font:inherit;color:inherit}
button{cursor:pointer;border-radius:8px;border:1px solid var(--line);background:var(--surface);padding:8px 14px;font-weight:600}
button:hover{border-color:var(--accent)}
button.primary{background:var(--accent);color:var(--accent-ink);border-color:var(--accent)}
button.danger{color:var(--bad);border-color:var(--bad)}
button.ghost{background:transparent;border-color:transparent}
button:disabled{opacity:.45;cursor:not-allowed}
:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
select,input[type=date],input[type=text],input[type=search],input[type=password],textarea{background:var(--surface);border:1px solid var(--line);border-radius:8px;padding:7px 10px;min-width:0}
textarea{width:100%;min-height:90px;resize:vertical}
label.f{display:flex;flex-direction:column;gap:4px;font-size:13px;font-weight:600}
.row{display:flex;flex-wrap:wrap;gap:10px;align-items:center}

/* header */
header.top{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:14px;background:var(--brand);color:var(--brand-ink);border-radius:14px;padding:14px 18px}
.brand{display:flex;align-items:center;gap:14px;color:inherit;text-decoration:none}
.brand img{width:64px;height:auto;display:block}
.brand .eyebrow{color:rgba(255,255,255,.85)}
header.top h1{font-size:30px;text-transform:uppercase;letter-spacing:.04em;line-height:1.05}
header.top button{border-color:rgba(255,255,255,.6);background:transparent;color:var(--brand-ink)}
header.top button:hover{border-color:#fff}
.hubnav{display:flex;flex-wrap:wrap;gap:4px;background:rgba(255,255,255,.16);padding:4px;border-radius:10px}
.hubnav a{color:#fff;text-decoration:none;font-weight:600;font-size:14px;padding:6px 12px;border-radius:7px}
.hubnav a:hover{background:rgba(255,255,255,.18)}
.hubnav a[aria-current=page]{background:#fff;color:#c4055f}
.head-right{display:flex;flex-wrap:wrap;gap:10px;align-items:center}
body:not(.signed-in) .needs-auth{display:none!important}

.panel{background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:18px;display:flex;flex-direction:column;gap:14px;min-width:0}
.panel-head{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:baseline;gap:8px}
.notice{border-radius:10px;padding:10px 14px;background:var(--warn-bg);font-size:14px}
.auth{max-width:420px;margin:24px auto 0;width:100%}
.auth input[type=password]{width:100%}

/* KPI tiles */
.kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px}
.kpi{background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:14px 16px;display:flex;flex-direction:column;gap:2px;text-align:left}
button.kpi{font-weight:400}
.kpi .v{font-family:var(--display);font-size:34px;font-weight:600;line-height:1.05}
.kpi .s{font-size:13px;color:var(--muted)}
.kpi.bad .v{color:var(--bad)} .kpi.good .v{color:var(--good)} .kpi.warn .v{color:var(--warn)}

/* status pills: colour + icon + word, never colour alone */
.pill{display:inline-flex;align-items:center;gap:5px;padding:2px 9px;border-radius:99px;font-size:12px;font-weight:700;white-space:nowrap}
.pill.bad{background:var(--bad-bg);color:var(--bad)} .pill.warn{background:var(--warn-bg);color:var(--warn)} .pill.good{background:var(--good-bg);color:var(--good)} .pill.none{background:var(--none-bg);color:var(--muted)}

/* charts: horizontal stacked bars */
.grid2{display:grid;grid-template-columns:repeat(auto-fit,minmax(340px,1fr));gap:20px}
.grid3{display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:20px}
@media (max-width:420px){.grid2,.grid3{grid-template-columns:1fr}}
.hbars{display:flex;flex-direction:column;gap:9px}
.hbar{display:grid;grid-template-columns:minmax(80px,150px) 1fr 64px;gap:10px;align-items:center;font-size:14px;background:none;border:0;padding:2px 0;border-radius:6px;text-align:left;font-weight:400;width:100%}
.hbar:hover .lbl,.hbar.on .lbl{color:var(--accent)}
.hbar.on .lbl{font-weight:700}
.hbar .lbl{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.hbar .val{text-align:right;font-variant-numeric:tabular-nums;color:var(--muted);font-size:13px}
.stack{display:flex;gap:2px;height:16px;min-width:0}
.stack i{display:block;height:100%;min-width:3px}
.stack i:first-child{border-radius:4px 0 0 4px} .stack i:last-child{border-radius:0 4px 4px 0} .stack i:only-child{border-radius:4px}
.seg-done{background:var(--good)} .seg-progress{background:var(--warn)} .seg-not{background:var(--bad)}
.legend{display:flex;flex-wrap:wrap;gap:14px;font-size:13px;color:var(--muted)}
.legend i{display:inline-block;width:12px;height:12px;border-radius:3px;margin-right:6px;vertical-align:-1px}
/* column chart */
.cols{display:flex;align-items:flex-end;gap:6px;height:170px;padding-top:18px;border-bottom:1px solid var(--line)}
.col{flex:1;display:flex;flex-direction:column;justify-content:flex-end;align-items:stretch;height:100%;min-width:0;position:relative}
.col .bar{border-radius:4px 4px 0 0;min-height:2px}
.col .cv{position:absolute;left:0;right:0;text-align:center;font-size:12px;font-weight:700;font-variant-numeric:tabular-nums}
.col-labels{display:flex;gap:6px}
.col-labels span{flex:1;text-align:center;font-size:11px;color:var(--muted);min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tip{position:fixed;z-index:50;max-width:260px;background:var(--ink);color:var(--surface);font-size:13px;line-height:1.35;padding:7px 10px;border-radius:8px;pointer-events:none;box-shadow:0 4px 14px rgba(0,0,0,.18)}
.tip b{font-weight:700}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
@media (prefers-reduced-motion:no-preference){.stack i,.col .bar{transition:width .3s ease,height .3s ease}}
