/* OTR School / College Dashboard — extends admin dashboard visual system */
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
:root{
  --bg:#080a14;--bg2:#0d1020;--bg3:#121626;--bg4:#181d30;
  --border:rgba(250,204,21,.12);--border2:rgba(250,204,21,.22);
  --yellow:#facc15;--yellow2:#fde047;--yellow-dim:#a16207;
  --teal:#2dd4bf;--red:#ef4444;--green:#22c55e;--blue:#38bdf8;--purple:#a78bfa;
  --text:#e8eaf0;--text2:#9aa3c2;--text3:#596180;
  --radius:10px;--radius-lg:16px;
  --sidebar-w:244px;--header-h:56px;
  --shadow:0 4px 24px rgba(0,0,0,.55);
}
html,body{height:100%;font-family:'Inter',system-ui,sans-serif;background:var(--bg);color:var(--text);font-size:13px;line-height:1.5;overflow:hidden}
a{color:var(--yellow);text-decoration:none}
button{cursor:pointer;font-family:inherit;font-size:12px;font-weight:600;border:none;border-radius:6px;padding:.38rem .75rem;transition:opacity .15s,transform .1s}
button:active{transform:scale(.97)}
button:disabled{opacity:.45;cursor:not-allowed}
input,select,textarea{font-family:inherit;font-size:13px;border-radius:6px;border:1px solid var(--border2);background:var(--bg3);color:var(--text);padding:.38rem .6rem;outline:none}
input:focus,select:focus,textarea:focus{border-color:var(--yellow)}
pre{font-size:11px;background:var(--bg);border:1px solid var(--border);border-radius:8px;padding:.65rem;overflow:auto;max-height:240px;color:var(--text2)}
table{width:100%;border-collapse:collapse;font-size:12px}
th{color:var(--text3);font-weight:600;text-transform:uppercase;letter-spacing:.06em;padding:.4rem .6rem;border-bottom:1px solid var(--border);text-align:left}
td{padding:.4rem .6rem;border-bottom:1px solid rgba(255,255,255,.04)}
tr:hover td{background:rgba(250,204,21,.03)}
h2{font-size:1rem;font-weight:700;color:var(--yellow);margin-bottom:.75rem;letter-spacing:.02em}
h3{font-size:.82rem;font-weight:600;color:var(--text2);margin-bottom:.5rem}
::-webkit-scrollbar{width:5px;height:5px}
::-webkit-scrollbar-track{background:var(--bg2)}
::-webkit-scrollbar-thumb{background:var(--border2);border-radius:4px}
#layout{display:flex;height:100%;overflow:hidden}
#sidebar{width:var(--sidebar-w);flex-shrink:0;background:var(--bg2);border-right:1px solid var(--border);display:flex;flex-direction:column;overflow-y:auto;overflow-x:hidden;z-index:50}
.sb-logo{height:var(--header-h);display:flex;align-items:center;gap:.6rem;padding:0 1rem;border-bottom:1px solid var(--border);flex-shrink:0}
.sb-circle{width:32px;height:32px;border-radius:50%;background:linear-gradient(135deg,#facc15,#a16207);display:flex;align-items:center;justify-content:center;font-weight:900;font-size:.8rem;color:#000;flex-shrink:0}
.sb-title{font-weight:800;font-size:.88rem;color:var(--yellow);letter-spacing:.04em}
.sb-sub{font-size:.62rem;color:var(--text3);margin-top:-2px}
.sb-nav{flex:1;padding:.4rem 0}
.nav-group{font-size:.63rem;font-weight:700;text-transform:uppercase;letter-spacing:.1em;color:var(--text3);padding:.7rem 1rem .3rem}
.nav-item{display:flex;align-items:center;gap:.5rem;padding:.42rem 1rem;color:var(--text2);cursor:pointer;transition:background .15s,color .15s;position:relative;font-weight:500;font-size:.78rem}
.nav-item:hover{background:rgba(250,204,21,.06);color:var(--text)}
.nav-item.active{background:rgba(250,204,21,.1);color:var(--yellow)}
.nav-item.active::before{content:"";position:absolute;left:0;top:50%;transform:translateY(-50%);width:3px;height:60%;border-radius:0 2px 2px 0;background:var(--yellow)}
.nav-icon{font-size:.95rem;width:18px;text-align:center;flex-shrink:0}
.nav-badge{margin-left:auto;font-size:.62rem;padding:.1rem .38rem;border-radius:9999px;background:var(--red);color:#fff;font-weight:700}
.nav-badge.g{background:var(--green)}
.nav-badge.y{background:var(--yellow);color:#000}
.sb-foot{padding:.65rem 1rem;border-top:1px solid var(--border);font-size:.72rem;color:var(--text3);flex-shrink:0}
#main{flex:1;display:flex;flex-direction:column;overflow:hidden;min-width:0}
#hdr{height:var(--header-h);flex-shrink:0;background:var(--bg2);border-bottom:1px solid var(--border);display:flex;align-items:center;gap:.75rem;padding:0 1.1rem}
.hdr-brand{font-weight:800;font-size:.88rem;color:var(--yellow);letter-spacing:.06em}
.hdr-spacer{flex:1}
.status-dot{width:7px;height:7px;border-radius:50%;background:var(--green);box-shadow:0 0 6px var(--green);display:inline-block;margin-right:.28rem}
.status-dot.red{background:var(--red);box-shadow:0 0 6px var(--red)}
.status-dot.y{background:var(--yellow);box-shadow:0 0 6px var(--yellow)}
.hdr-stat{display:flex;align-items:center;gap:.3rem;font-size:.75rem;color:var(--text2);padding:.18rem .5rem;background:var(--bg3);border-radius:6px;border:1px solid var(--border)}
.hdr-stat strong{color:var(--text);font-weight:700}
#hdr-clock{font-family:'Courier New',monospace;font-size:.78rem;font-weight:700;color:var(--yellow)}
.hdr-avatar{width:26px;height:26px;border-radius:50%;background:linear-gradient(135deg,#facc15,#a16207);display:flex;align-items:center;justify-content:center;font-weight:700;font-size:.68rem;color:#000}
#sch-bar{flex-shrink:0;background:rgba(250,204,21,.04);border-bottom:1px solid var(--border);padding:.48rem 1.1rem;display:flex;flex-wrap:wrap;gap:.5rem;align-items:center}
#sch-bar label{font-size:.73rem;color:var(--text3);font-weight:600}
#g-schedule{width:220px}
#cmd-bar{flex-shrink:0;background:var(--bg3);border-bottom:1px solid var(--border);padding:.42rem 1.1rem;display:flex;flex-wrap:wrap;gap:.38rem;align-items:center}
.cb{font-size:.7rem;padding:.28rem .58rem;border-radius:5px;font-weight:700;letter-spacing:.02em;transition:all .15s}
.cb.danger{background:rgba(239,68,68,.14);color:#fca5a5;border:1px solid rgba(239,68,68,.28)}
.cb.danger:hover{background:rgba(239,68,68,.28)}
.cb.warn{background:rgba(234,179,8,.11);color:#fde047;border:1px solid rgba(234,179,8,.24)}
.cb.warn:hover{background:rgba(234,179,8,.24)}
.cb.ok{background:rgba(34,197,94,.11);color:#86efac;border:1px solid rgba(34,197,94,.24)}
.cb.ok:hover{background:rgba(34,197,94,.24)}
.cb.info{background:rgba(56,189,248,.11);color:#7dd3fc;border:1px solid rgba(56,189,248,.24)}
.cb.info:hover{background:rgba(56,189,248,.24)}
.cb.purple{background:rgba(167,139,250,.11);color:#c4b5fd;border:1px solid rgba(167,139,250,.24)}
.cb.purple:hover{background:rgba(167,139,250,.24)}
.cb.n{background:rgba(255,255,255,.06);color:var(--text2);border:1px solid var(--border)}
.cb.n:hover{background:rgba(255,255,255,.1)}
.cmd-sep{width:1px;height:18px;background:var(--border);flex-shrink:0}
#cmd-search{flex:1;min-width:160px;max-width:260px;padding:.26rem .58rem;font-size:.73rem}
#content{flex:1;overflow-y:auto;padding:1.1rem;display:flex;flex-direction:column;gap:1.1rem}
#login-overlay{position:fixed;inset:0;background:rgba(8,10,20,.97);display:flex;align-items:center;justify-content:center;z-index:1000}
.lc{background:var(--bg2);border:1px solid var(--border2);border-radius:var(--radius-lg);padding:1.75rem 2.25rem;width:380px;max-width:95vw;box-shadow:var(--shadow)}
.lc-circle{width:52px;height:52px;border-radius:50%;margin:0 auto .65rem;background:linear-gradient(135deg,#facc15,#a16207);display:flex;align-items:center;justify-content:center;font-weight:900;font-size:1.2rem;color:#000}
.lc-title{text-align:center;font-size:1.1rem;font-weight:800;color:var(--yellow);letter-spacing:.04em}
.lc-sub{text-align:center;font-size:.75rem;color:var(--text3);margin-top:.15rem;margin-bottom:1rem}
.lc-field{margin-top:.75rem}
.lc-field label{font-size:.72rem;color:var(--text3);display:block;margin-bottom:.25rem;font-weight:600}
.lc-field input,.lc-field textarea{width:100%}
.lc-field textarea{height:60px;resize:none;font-size:.72rem}
.lc-btn{width:100%;margin-top:1rem;padding:.6rem;background:var(--yellow);color:#000;font-size:.85rem;font-weight:800;border-radius:8px}
.lc-btn:hover{background:var(--yellow2)}
#login-err{color:#fca5a5;font-size:.75rem;margin-top:.6rem;text-align:center;min-height:.9rem}
.modal-bd{position:fixed;inset:0;background:rgba(0,0,0,.7);z-index:900;display:none;align-items:center;justify-content:center}
.modal-bd.open{display:flex}
.modal-box{background:var(--bg2);border:1px solid var(--border2);border-radius:var(--radius-lg);padding:1.4rem;width:460px;max-width:95vw;max-height:90vh;overflow-y:auto;box-shadow:var(--shadow)}
.modal-title{font-size:.95rem;font-weight:700;color:var(--yellow);margin-bottom:.85rem}
.modal-acts{display:flex;gap:.4rem;justify-content:flex-end;margin-top:1rem}
#toast-c{position:fixed;bottom:1rem;right:1rem;z-index:2000;display:flex;flex-direction:column;gap:.4rem}
.toast{min-width:240px;max-width:360px;padding:.6rem .9rem;border-radius:8px;font-size:.78rem;font-weight:600;box-shadow:0 4px 18px rgba(0,0,0,.5);border-left:4px solid;animation:toastin .2s ease}
.toast.ok{background:#052e16;border-color:var(--green);color:#86efac}
.toast.err{background:#2d0000;border-color:var(--red);color:#fca5a5}
.toast.info{background:#0c1a2e;border-color:var(--blue);color:#7dd3fc}
.toast.warn{background:#1c1200;border-color:var(--yellow);color:#fde047}
@keyframes toastin{from{opacity:0;transform:translateX(16px)}to{opacity:1;transform:none}}
.tile{background:var(--bg2);border:1px solid var(--border);border-radius:var(--radius-lg);overflow:hidden;display:none}
.tile.active{display:block}
.tile-hdr{display:flex;align-items:center;gap:.55rem;padding:.7rem 1rem;border-bottom:1px solid var(--border);background:var(--bg3)}
.tile-icon{font-size:1rem}
.tile-title{font-weight:700;font-size:.88rem;color:var(--yellow);letter-spacing:.03em;flex:1}
.tile-sub{font-size:.68rem;color:var(--text3);margin-top:1px}
.tile-acts{display:flex;gap:.35rem;align-items:center}
.tile-body{padding:1rem}
.sg{display:grid;grid-template-columns:repeat(auto-fill,minmax(148px,1fr));gap:.65rem;margin-bottom:.9rem}
.sc{background:var(--bg3);border:1px solid var(--border);border-radius:var(--radius);padding:.65rem .9rem;min-height:72px}
.sl{font-size:.67rem;color:var(--text3);font-weight:600;text-transform:uppercase;letter-spacing:.06em}
.sv{font-size:1.35rem;font-weight:800;color:var(--text);margin:.18rem 0;font-variant-numeric:tabular-nums}
.sv.y{color:var(--yellow)}.sv.g{color:var(--green)}.sv.r{color:var(--red)}.sv.b{color:var(--blue)}
.sm{font-size:.68rem;color:var(--text3)}
.sm.up{color:var(--green)}.sm.dn{color:var(--red)}
.pr{display:flex;align-items:center;gap:.6rem;margin-bottom:.4rem}
.pr-lbl{font-size:.72rem;color:var(--text2);width:96px;flex-shrink:0}
.pr-trk{flex:1;height:5px;background:var(--bg4);border-radius:9999px;overflow:hidden}
.pr-fill{height:100%;border-radius:9999px;background:var(--yellow);transition:width .4s}
.pr-fill.t{background:var(--teal)}.pr-fill.b{background:var(--blue)}.pr-fill.r{background:var(--red)}.pr-fill.g{background:var(--green)}
.pr-pct{font-size:.68rem;color:var(--text3);width:42px;text-align:right;flex-shrink:0}
.alert{border-radius:8px;padding:.5rem .8rem;font-size:.75rem;margin-bottom:.45rem;display:flex;align-items:flex-start;gap:.45rem}
.alert.danger{background:rgba(239,68,68,.09);border:1px solid rgba(239,68,68,.22);color:#fca5a5}
.alert.warn{background:rgba(234,179,8,.07);border:1px solid rgba(234,179,8,.18);color:#fde047}
.alert.info{background:rgba(56,189,248,.07);border:1px solid rgba(56,189,248,.18);color:#7dd3fc}
.alert.ok{background:rgba(34,197,94,.07);border:1px solid rgba(34,197,94,.18);color:#86efac}
.alert-icon{flex-shrink:0;margin-top:.05rem}
.c2{display:grid;grid-template-columns:1fr 1fr;gap:.9rem}
.c3{display:grid;grid-template-columns:1fr 1fr 1fr;gap:.9rem}
@media(max-width:860px){.c2,.c3{grid-template-columns:1fr}}
.panel{background:var(--bg3);border:1px solid var(--border);border-radius:var(--radius);padding:.8rem}
.ir{display:flex;align-items:center;gap:.45rem;flex-wrap:wrap;margin-bottom:.55rem}
.ir label{font-size:.72rem;color:var(--text3);font-weight:600;width:104px;flex-shrink:0}
.ir input,.ir select{flex:1;min-width:110px}
.ar{display:flex;flex-wrap:wrap;gap:.38rem;margin-top:.6rem}
.pill{display:inline-flex;align-items:center;padding:.12rem .48rem;border-radius:9999px;font-size:.67rem;font-weight:700}
.pill.g{background:rgba(34,197,94,.14);color:#86efac}
.pill.r{background:rgba(239,68,68,.14);color:#fca5a5}
.pill.y{background:rgba(250,204,21,.14);color:#fde047}
.pill.b{background:rgba(56,189,248,.14);color:#7dd3fc}
.pill.gray{background:rgba(255,255,255,.07);color:var(--text3)}
.spin{display:inline-block;width:14px;height:14px;border:2px solid var(--border2);border-top-color:var(--yellow);border-radius:50%;animation:sp .6s linear infinite}
@keyframes sp{to{transform:rotate(360deg)}}
.sep{height:1px;background:var(--border);margin:.75rem 0}
.ll{max-height:240px;overflow-y:auto}
.llr{display:flex;align-items:center;gap:.45rem;padding:.32rem .45rem;font-size:.73rem;border-bottom:1px solid rgba(255,255,255,.04)}
.llr:last-child{border-bottom:none}
.llr-name{flex:1;color:var(--text);font-weight:500}
.lt{font-size:.62rem;padding:.08rem .32rem;border-radius:9999px;font-weight:700}
.lt.ok{background:rgba(34,197,94,.14);color:#86efac}
.lt.warn{background:rgba(234,179,8,.14);color:#fde047}
.lt.hot{background:rgba(239,68,68,.14);color:#fca5a5}
.hg{display:grid;grid-template-columns:repeat(auto-fill,minmax(130px,1fr));gap:.6rem}
.hc{background:var(--bg3);border:1px solid var(--border);border-radius:var(--radius);padding:.6rem;text-align:center}
.hv{font-size:1.2rem;font-weight:800;font-variant-numeric:tabular-nums}
.hl{font-size:.62rem;color:var(--text3);text-transform:uppercase;letter-spacing:.06em;margin-top:.18rem}

/* School-only */
#foot-bar{flex-shrink:0;background:var(--bg3);border-top:1px solid var(--border);padding:.45rem 1.1rem;display:flex;flex-wrap:wrap;gap:.65rem;align-items:center;font-size:.72rem;color:var(--text3)}
#foot-bar strong{color:var(--text2)}
.school-hero{display:grid;grid-template-columns:minmax(200px,260px) 1fr;gap:1rem;margin-bottom:.25rem}
@media(max-width:960px){.school-hero{grid-template-columns:1fr}}
.brand-col{display:flex;flex-direction:column;gap:.55rem}
.brand-slot{background:var(--bg3);border:1px dashed var(--border2);border-radius:var(--radius);padding:.75rem;text-align:center;font-size:.7rem;color:var(--text3);min-height:88px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.35rem}
.brand-slot img{max-width:100%;max-height:72px;border-radius:6px;object-fit:contain}
.data-table-wrap{overflow-x:auto;max-height:420px;overflow-y:auto;border:1px solid var(--border);border-radius:var(--radius)}
.data-table-wrap table{font-size:11px}
.data-table-wrap tbody tr{cursor:pointer}
.data-table-wrap tbody tr.sel td{background:rgba(250,204,21,.12)}
.tbadge{font-size:.62rem;padding:.12rem .45rem;border-radius:9999px;border:1px solid var(--border);color:var(--text3);font-weight:700}
.tbadge.ok{border-color:rgba(34,197,94,.35);color:#86efac}
.tbadge.warn{border-color:rgba(234,179,8,.35);color:#fde047}
.detail-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:.5rem}
.detail-grid .ir{margin-bottom:0}
.detail-grid input[readonly]{opacity:.92}
.class-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:.65rem}
.class-card{background:var(--bg3);border:1px solid var(--border);border-radius:var(--radius);padding:.75rem;font-size:.78rem}
.class-card h4{color:var(--yellow);font-size:.85rem;margin-bottom:.35rem}
