/* OmniBSIC ICDD — Shared Stylesheet */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@300;400;500;600&family=DM+Mono:wght@400;500&display=swap');

:root {
  --bg:#0f1117;--surface:#181c27;--surface2:#1e2335;--surface3:#252b3d;
  --border:rgba(255,255,255,0.07);--border2:rgba(255,255,255,0.13);
  --text:#e8eaf0;--text2:#8b92a8;--text3:#5a6070;
  --accent:#4f8ef7;--accent2:#7c5ff7;
  --green:#22c55e;--amber:#f59e0b;--red:#ef4444;--teal:#14b8a6;
  --font:'DM Sans',sans-serif;--mono:'DM Mono',monospace;
  --radius:10px;--radius-sm:6px;--shadow:0 2px 12px rgba(0,0,0,.4);
}
body.light {
  --bg:#f3f4f8;--surface:#fff;--surface2:#f0f1f5;--surface3:#e4e6ed;
  --border:rgba(0,0,0,.08);--border2:rgba(0,0,0,.14);
  --text:#1a1d2e;--text2:#5a6070;--text3:#9aa0b0;
  --accent:#2563eb;--green:#16a34a;--amber:#d97706;--red:#dc2626;
  --shadow:0 2px 12px rgba(0,0,0,.08);
}
*{box-sizing:border-box;margin:0;padding:0}
body{font-family:var(--font);background:var(--bg);color:var(--text);font-size:14px;line-height:1.5;min-height:100vh}
button{font-family:var(--font);cursor:pointer;border:none;outline:none}
input,select,textarea{font-family:var(--font);outline:none}

/* TOPBAR */
.topbar{display:flex;align-items:center;justify-content:space-between;padding:0 1.5rem;height:56px;background:var(--surface);border-bottom:1px solid var(--border);position:sticky;top:0;z-index:100}
.topbar-left{display:flex;align-items:center;gap:12px}
.topbar-brand{font-size:16px;font-weight:600;letter-spacing:-.3px;text-decoration:none;color:var(--text)}
.topbar-brand span{color:var(--accent)}
.topbar-divider{width:1px;height:20px;background:var(--border2)}
.topbar-section{font-size:13px;color:var(--text2)}
.topbar-right{display:flex;align-items:center;gap:10px}
.user-pill{display:flex;align-items:center;gap:8px;background:var(--surface2);border:1px solid var(--border);border-radius:20px;padding:5px 12px 5px 5px}
.user-avatar{width:26px;height:26px;border-radius:50%;background:var(--accent2);display:flex;align-items:center;justify-content:center;font-size:11px;font-weight:600;color:#fff}
.user-name{font-size:13px;font-weight:500}
.role-badge{font-size:10px;padding:2px 7px;border-radius:10px;font-weight:500}
.role-admin{background:rgba(79,142,247,.18);color:var(--accent)}
.role-user{background:rgba(20,184,166,.18);color:var(--teal)}
.theme-toggle{background:var(--surface2);border:1px solid var(--border2);border-radius:20px;padding:5px 10px;color:var(--text2);font-size:13px;cursor:pointer;display:flex;align-items:center;gap:6px}
.theme-toggle:hover{color:var(--text)}
.btn-logout{background:transparent;border:1px solid var(--border2);border-radius:var(--radius-sm);padding:6px 12px;color:var(--text2);font-size:12px}
.btn-logout:hover{color:var(--text);background:var(--surface2)}

/* LAYOUT */
.app-body{display:flex;min-height:calc(100vh - 56px)}
.sidebar{width:220px;min-width:220px;background:var(--surface);border-right:1px solid var(--border);padding:.75rem 0;position:sticky;top:56px;height:calc(100vh - 56px);overflow-y:auto;flex-shrink:0}
.sidebar-label{font-size:10px;color:var(--text3);font-weight:600;letter-spacing:.08em;text-transform:uppercase;padding:4px 16px;margin-top:8px;display:block}
.nav-link{display:flex;align-items:center;gap:9px;padding:8px 12px;color:var(--text2);font-size:13px;text-decoration:none;transition:all .15s;width:100%;background:transparent;border:none;text-align:left;cursor:pointer}
.nav-link:hover{background:var(--surface2);color:var(--text)}
.nav-link.active{background:rgba(79,142,247,.12);color:var(--accent);font-weight:500}
.nav-icon{width:18px;text-align:center;font-size:14px;flex-shrink:0}
.nav-count{margin-left:auto;font-size:10px;background:var(--surface3);color:var(--text3);padding:1px 6px;border-radius:8px;font-family:var(--mono)}
.nav-divider{height:1px;background:var(--border);margin:6px 12px}
.main{flex:1;padding:1.5rem;min-width:0;overflow-x:hidden}

/* CONTENT */
.page-header{display:flex;align-items:flex-start;justify-content:space-between;margin-bottom:1.5rem;flex-wrap:wrap;gap:12px}
.page-title{font-size:20px;font-weight:600;letter-spacing:-.3px}
.page-subtitle{font-size:13px;color:var(--text2);margin-top:3px}
.header-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}

/* METRICS */
.metrics-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px;margin-bottom:1.5rem}
.metric-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:16px}
.metric-label{font-size:11px;color:var(--text2);font-weight:500;letter-spacing:.05em;text-transform:uppercase;margin-bottom:8px}
.metric-value{font-size:26px;font-weight:600;font-family:var(--mono);letter-spacing:-1px}
.metric-sub{font-size:11px;color:var(--text2);margin-top:4px}
.metric-bar{height:3px;background:var(--surface3);border-radius:2px;margin-top:10px;overflow:hidden}
.metric-bar-fill{height:100%;border-radius:2px;transition:width .5s}

/* PANEL */
.panel{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:1.25rem;margin-bottom:1.25rem}
.panel-title{font-size:14px;font-weight:600;margin-bottom:1rem}
.stat-row{display:flex;align-items:center;padding:7px 0;border-bottom:1px solid var(--border)}
.stat-row:last-child{border-bottom:none}
.progress-thin{flex:1;height:4px;background:var(--surface3);border-radius:2px;overflow:hidden;margin:0 12px}
.progress-thin-fill{height:100%;border-radius:2px}

/* TABLE */
.table-wrap{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);overflow:hidden;margin-bottom:1.5rem}
.table-toolbar{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;border-bottom:1px solid var(--border);gap:12px;flex-wrap:wrap}
.table-title{font-size:14px;font-weight:600}
table{width:100%;border-collapse:collapse}
th{padding:9px 14px;font-size:11px;font-weight:500;color:var(--text2);text-align:left;letter-spacing:.05em;text-transform:uppercase;border-bottom:1px solid var(--border);white-space:nowrap}
td{padding:10px 14px;border-bottom:1px solid var(--border);font-size:13px;vertical-align:middle}
tr:last-child td{border-bottom:none}
tr:hover td{background:rgba(255,255,255,.02)}
body.light tr:hover td{background:rgba(0,0,0,.015)}

/* BADGES */
.badge{display:inline-flex;align-items:center;font-size:11px;font-weight:500;padding:2px 8px;border-radius:10px}
.badge-daily{background:rgba(239,68,68,.12);color:#f87171}
.badge-weekly{background:rgba(79,142,247,.12);color:#7eb4fa}
.badge-monthly{background:rgba(245,158,11,.12);color:#fbbf24}
.badge-quarterly{background:rgba(20,184,166,.12);color:var(--teal)}
.badge-annually{background:rgba(124,95,247,.12);color:#a78bfa}
.badge-bi{background:rgba(236,72,153,.12);color:#f472b6}
.pct-high{background:rgba(34,197,94,.15);color:var(--green)}
.pct-mid{background:rgba(245,158,11,.15);color:var(--amber)}
.pct-low{background:rgba(239,68,68,.15);color:var(--red)}

/* CHECKBOXES */
.check-grid{display:flex;gap:3px;flex-wrap:wrap}
.cbox{width:22px;height:22px;border-radius:4px;font-size:9px;font-family:var(--mono);display:flex;align-items:center;justify-content:center;cursor:pointer;border:1px solid var(--border2);color:var(--text3);background:var(--surface2);user-select:none}
.cbox:hover{border-color:var(--accent);color:var(--accent)}
.cbox.done{background:var(--green);border-color:var(--green);color:#fff}
.cbox.na{opacity:.35;cursor:default}
body.light .cbox{background:#e8eaf0;border-color:#c5c9d6;color:#6b7280}

/* BUTTONS */
.btn{display:inline-flex;align-items:center;gap:6px;padding:8px 14px;border-radius:var(--radius-sm);font-size:13px;font-weight:500;cursor:pointer;border:none;text-decoration:none}
.btn-sm{padding:5px 10px;font-size:12px}
.btn-accent{background:var(--accent);color:#fff}
.btn-accent:hover{opacity:.88}
.btn-outline{background:transparent;border:1px solid var(--border2);color:var(--text2)}
.btn-outline:hover{color:var(--text);background:var(--surface2)}
.btn-ghost{background:transparent;color:var(--text2)}
.btn-ghost:hover{color:var(--text);background:var(--surface2)}
.btn-red{background:rgba(239,68,68,.12);color:var(--red)}
.btn-red:hover{background:rgba(239,68,68,.2)}
.btn-green{background:rgba(34,197,94,.12);border:1px solid rgba(34,197,94,.25);color:var(--green)}
.btn-green:hover{background:rgba(34,197,94,.2)}

/* BRANCH CARDS */
.card-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:10px;margin-bottom:1.5rem}
.unit-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:14px;cursor:pointer;transition:border-color .15s,transform .15s;text-decoration:none;display:block;color:var(--text)}
.unit-card:hover{border-color:var(--accent);transform:translateY(-1px)}
.unit-card.selected{border-color:var(--accent);background:rgba(79,142,247,.05)}
.unit-card-name{font-size:12px;font-weight:600;margin-bottom:8px}
.unit-card-pct{font-size:22px;font-weight:600;font-family:var(--mono)}
.unit-card-bar{height:3px;background:var(--surface3);border-radius:2px;margin-top:8px;overflow:hidden}
.unit-card-fill{height:100%;border-radius:2px}

/* MODAL */
.modal-bg{position:fixed;inset:0;background:rgba(0,0,0,.65);z-index:1000;display:none;align-items:center;justify-content:center;padding:1rem}
.modal-bg.open{display:flex}
.modal{background:var(--surface);border:1px solid var(--border2);border-radius:14px;padding:1.75rem;width:100%;max-width:540px;max-height:90vh;overflow-y:auto}
.modal-hdr{font-size:17px;font-weight:600;margin-bottom:1.25rem;display:flex;align-items:center;justify-content:space-between}
.modal-close{background:transparent;border:1px solid var(--border2);border-radius:var(--radius-sm);padding:4px 10px;color:var(--text2);font-size:16px;cursor:pointer}
.field{margin-bottom:1rem}
.field label{display:block;font-size:11px;color:var(--text2);margin-bottom:5px;font-weight:500;letter-spacing:.04em;text-transform:uppercase}
.field input,.field select,.field textarea{width:100%;background:var(--surface2);border:1px solid var(--border);border-radius:var(--radius-sm);padding:9px 12px;color:var(--text);font-size:13px}
.field input:focus,.field select:focus,.field textarea:focus{outline:none;border-color:var(--accent)}
.field input::placeholder{color:var(--text3)}
.modal-actions{display:flex;gap:8px;justify-content:flex-end;margin-top:1.25rem}
.multi-list{max-height:260px;overflow-y:auto;border:1px solid var(--border);border-radius:var(--radius-sm)}
.multi-item{display:flex;align-items:center;gap:10px;padding:8px 12px;border-bottom:1px solid var(--border);font-size:13px}
.multi-item:last-child{border-bottom:none}
.multi-item:hover{background:var(--surface2)}
.multi-item input[type=checkbox]{accent-color:var(--accent);width:14px;height:14px;cursor:pointer}

/* MISC */
.empty{text-align:center;padding:3rem 1rem;color:var(--text2)}
.empty-icon{font-size:36px;margin-bottom:12px}
.text-sm{font-size:12px}
.text-muted{color:var(--text2)}
select{background:var(--surface2);border:1px solid var(--border);border-radius:var(--radius-sm);padding:7px 10px;color:var(--text);font-size:13px}
.view-btns{display:flex;border:1px solid var(--border2);border-radius:var(--radius-sm);overflow:hidden}
.vbtn{padding:6px 12px;font-size:12px;font-weight:500;background:var(--surface2);color:var(--text2);border:none;cursor:pointer;border-left:1px solid var(--border)}
.vbtn:first-child{border-left:none}
.vbtn.active{background:var(--accent);color:#fff}
::-webkit-scrollbar{width:5px;height:5px}
::-webkit-scrollbar-track{background:transparent}
::-webkit-scrollbar-thumb{background:var(--surface3);border-radius:4px}
.toast{position:fixed;bottom:1.5rem;right:1.5rem;background:var(--surface);border:1px solid var(--border2);border-radius:var(--radius);padding:12px 18px;font-size:13px;font-weight:500;z-index:9999;box-shadow:var(--shadow);opacity:0;transform:translateY(8px);transition:all .25s;pointer-events:none}
.toast.show{opacity:1;transform:translateY(0)}
.toast.ok{border-color:rgba(34,197,94,.4);color:var(--green)}
.toast.err{border-color:rgba(239,68,68,.4);color:var(--red)}
.spinner{display:inline-block;width:18px;height:18px;border:2px solid var(--border2);border-top-color:var(--accent);border-radius:50%;animation:spin .7s linear infinite;vertical-align:middle;margin-right:8px}
@keyframes spin{to{transform:rotate(360deg)}}
.loading-row{text-align:center;padding:2rem;color:var(--text2)}
.mark-done-btn{display:inline-flex;align-items:center;gap:6px;background:rgba(79,142,247,.12);color:var(--accent);border:1px solid rgba(79,142,247,.25);border-radius:20px;padding:6px 14px;font-size:12px;font-weight:500;cursor:pointer}
.mark-done-btn:hover{background:rgba(79,142,247,.2)}
.done-pill{display:inline-flex;align-items:center;gap:6px;background:rgba(34,197,94,.15);color:var(--green);border:1px solid rgba(34,197,94,.3);border-radius:20px;padding:5px 12px;font-size:12px;font-weight:500}
.not-done-pill{display:inline-flex;align-items:center;gap:6px;background:rgba(239,68,68,.08);color:var(--text2);border:1px solid var(--border2);border-radius:20px;padding:5px 12px;font-size:12px}

/* UI polish added in v2 */
body{background:radial-gradient(circle at top left,rgba(79,142,247,.12),transparent 28rem),var(--bg)}
.topbar,.sidebar,.panel,.table-wrap,.metric-card,.unit-card{box-shadow:var(--shadow)}
.topbar{backdrop-filter:saturate(1.15) blur(8px)}
.page-title{font-size:24px;font-weight:700}
.page-subtitle{max-width:760px}
.table-wrap{border-radius:16px}
th{background:rgba(255,255,255,.025)}
body.light th{background:rgba(37,99,235,.035)}
.btn{transition:transform .15s ease, background .15s ease, border-color .15s ease, opacity .15s ease}
.btn:hover{transform:translateY(-1px)}
.unit-card{border-radius:16px;padding:16px;background:linear-gradient(180deg,rgba(255,255,255,.025),transparent),var(--surface)}
.unit-card-name{min-height:32px;line-height:1.35}
.unit-card-pct{font-size:26px}.unit-card-bar{height:6px;border-radius:999px}.unit-card-fill{border-radius:999px}
.cbox{width:26px;height:26px;border-radius:8px;font-size:10px;transition:all .12s ease}.cbox.done{box-shadow:0 6px 18px rgba(34,197,94,.22)}
.mark-done-btn,.done-pill,.not-done-pill{border-radius:999px}
.field input,.field select,.field textarea,select{border-radius:10px}
textarea{line-height:1.55;resize:vertical}
.checklist-layout{display:grid;grid-template-columns:minmax(340px,1fr) minmax(360px,.85fr);gap:16px;align-items:start}
.checklist-card{border:1px solid var(--border);border-radius:14px;background:var(--surface);padding:14px;margin-bottom:10px;transition:border-color .15s,transform .15s,background .15s}
.checklist-card:hover{border-color:var(--border2);transform:translateY(-1px);background:var(--surface2)}
.checklist-card.active{border-color:var(--accent);box-shadow:0 0 0 3px rgba(79,142,247,.10)}
.checklist-card-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}
.checklist-card-title{font-weight:700;font-size:14px;line-height:1.35}
.checklist-desc{color:var(--text2);font-size:12px;margin-top:8px;line-height:1.6;max-height:78px;overflow:hidden}
.checklist-actions{display:flex;gap:6px;flex-wrap:wrap;margin-top:12px}
.sticky-editor{position:sticky;top:76px}
.helper-box{background:rgba(79,142,247,.08);border:1px solid rgba(79,142,247,.18);border-radius:14px;padding:12px 14px;color:var(--text2);font-size:12px;margin-bottom:12px}
@media(max-width:980px){.checklist-layout{grid-template-columns:1fr}.sticky-editor{position:static}.sidebar{display:none}.main{padding:1rem}.topbar{padding:0 1rem}.user-name{display:none}}


/* v3 usability fixes */
html{scroll-behavior:smooth}
.reveal-target{scroll-margin-top:84px;animation:softReveal .32s ease-out}
@keyframes softReveal{from{opacity:.72;transform:translateY(8px)}to{opacity:1;transform:none}}
body.light .cbox.done{background:var(--green)!important;border-color:var(--green)!important;color:#fff!important;box-shadow:0 6px 18px rgba(22,163,74,.22)}
body.light .cbox.done:hover{background:var(--green)!important;color:#fff!important}
body.light .done-pill{background:rgba(22,163,74,.13);border-color:rgba(22,163,74,.35);color:#15803d}

/* Cleaner checklist editor matching a wide supervisor table */
.checklist-page .page-header{align-items:center;margin-bottom:1.8rem}
.checklist-selector-panel{background:transparent;border:none;padding:0;margin-bottom:2rem;box-shadow:none}
.checklist-selector-panel .field label{font-size:13px;letter-spacing:.08em;color:#9fb2df;margin-bottom:10px}
.checklist-selector-panel select{max-width:600px;min-height:62px;border-radius:9px;font-size:17px;padding:0 24px;background:#172035;border:1px solid #5d8dfc;color:#fff}
body.light .checklist-selector-panel select{background:#fff;border-color:#2563eb;color:#111827;box-shadow:0 6px 22px rgba(37,99,235,.10)}
.checklist-table-card{background:var(--surface);border:1px solid var(--border);border-radius:14px;overflow:hidden;box-shadow:var(--shadow)}
.checklist-table-head{display:flex;justify-content:space-between;align-items:center;padding:18px 24px;border-bottom:1px solid var(--border);gap:12px;flex-wrap:wrap}
.checklist-table-title{font-size:18px;font-weight:800;letter-spacing:-.02em}
.checklist-table-sub{font-size:12px;color:var(--text2);margin-top:3px}
.checklist-table{width:100%;border-collapse:collapse}
.checklist-table th{padding:15px 22px;font-size:13px;color:#9fb2df;background:rgba(255,255,255,.015)}
.checklist-table td{padding:18px 22px;font-size:15px}
.checklist-row-title{font-size:16px;font-weight:800;color:var(--text);line-height:1.35}
.checklist-row-desc{font-size:13px;color:#9da8c7;margin-top:7px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:760px}
.checklist-action-link{background:transparent;color:#9fb2df;padding:7px 10px;border-radius:8px;text-decoration:none;font-weight:600}
.checklist-action-link:hover{color:var(--accent);background:rgba(79,142,247,.12)}
.checklist-delete{background:rgba(239,68,68,.13);color:#ff5959;border:none;border-radius:9px;padding:9px 16px;font-weight:700}
.checklist-delete:hover{background:rgba(239,68,68,.22)}
.checklist-form-panel{border-color:rgba(79,142,247,.45);box-shadow:0 18px 48px rgba(0,0,0,.22)}
.checklist-form-panel textarea{min-height:180px}
@media(max-width:760px){.checklist-table-card{overflow-x:auto}.checklist-table{min-width:720px}.checklist-selector-panel select{max-width:100%;font-size:15px}.checklist-table-head{padding:15px}.checklist-table th,.checklist-table td{padding:14px 16px}}


/* v4 light-theme completion visibility fix
   Make completed day boxes unmistakable in light mode and robust when the
   light class is applied by either PHP/cookie or JavaScript/localStorage. */
.cbox.done{
  background:#22c55e !important;
  border-color:#16a34a !important;
  color:#ffffff !important;
  font-weight:800 !important;
  box-shadow:0 6px 18px rgba(22,163,74,.28) !important;
}
.cbox.done::before{
  content:"✓";
  font-weight:900;
  font-size:11px;
  line-height:1;
  margin-right:2px;
}
body.light .cbox.done,
html.light body .cbox.done{
  background:#16a34a !important;
  border-color:#15803d !important;
  color:#ffffff !important;
  outline:2px solid rgba(22,163,74,.25) !important;
  outline-offset:1px;
}
body.light .cbox.done:hover,
html.light body .cbox.done:hover{
  background:#15803d !important;
  border-color:#166534 !important;
  color:#ffffff !important;
}
body.light .check-grid .cbox.done,
html.light body .check-grid .cbox.done{
  opacity:1 !important;
}


/* v5 blue/white frontend refresh + faster-feeling interactions */
:root{
  --bg:#eef6ff;
  --surface:#ffffff;
  --surface2:#f2f7ff;
  --surface3:#e3efff;
  --border:rgba(37,99,235,.14);
  --border2:rgba(37,99,235,.24);
  --text:#0b1b3a;
  --text2:#47638f;
  --text3:#7b93bd;
  --accent:#2563eb;
  --accent2:#0ea5e9;
  --green:#16a34a;
  --amber:#f59e0b;
  --red:#dc2626;
  --teal:#0284c7;
  --radius:14px;
  --radius-sm:10px;
  --shadow:0 14px 38px rgba(30,64,175,.10);
}
body.light{
  --bg:#eef6ff;
  --surface:#ffffff;
  --surface2:#f5f9ff;
  --surface3:#e6f0ff;
  --border:rgba(37,99,235,.14);
  --border2:rgba(37,99,235,.25);
  --text:#0b1b3a;
  --text2:#47638f;
  --text3:#7b93bd;
  --accent:#2563eb;
  --accent2:#0ea5e9;
  --shadow:0 14px 38px rgba(30,64,175,.10);
}
body{background:radial-gradient(circle at top left,rgba(14,165,233,.16),transparent 32rem),linear-gradient(180deg,#f7fbff 0%,var(--bg) 100%);color:var(--text)}
body:not(.light){background:linear-gradient(180deg,#0b1b3a 0%,#102a55 100%);--bg:#0b1b3a;--surface:#102a55;--surface2:#15396f;--surface3:#1d4d91;--border:rgba(147,197,253,.18);--border2:rgba(147,197,253,.30);--text:#f8fbff;--text2:#b8d3ff;--text3:#83aee8;--accent:#60a5fa;--accent2:#38bdf8;--shadow:0 18px 46px rgba(0,0,0,.28)}
.topbar{height:64px;background:rgba(255,255,255,.86);backdrop-filter:blur(16px);box-shadow:0 10px 30px rgba(37,99,235,.08)}
body:not(.light) .topbar{background:rgba(16,42,85,.84)}
.topbar-brand{font-size:18px;font-weight:800;color:#0b1b3a}.topbar-brand span{color:#2563eb}body:not(.light) .topbar-brand{color:#fff}
.topbar-section{color:var(--text2);font-weight:600}.user-pill,.theme-toggle,.btn-logout{box-shadow:0 8px 20px rgba(37,99,235,.07)}
.user-avatar{background:linear-gradient(135deg,#2563eb,#0ea5e9);box-shadow:0 8px 18px rgba(37,99,235,.30)}
.sidebar{top:64px;height:calc(100vh - 64px);background:rgba(255,255,255,.72);backdrop-filter:blur(14px);padding:1rem .65rem;border-right:1px solid var(--border)}
body:not(.light) .sidebar{background:rgba(16,42,85,.72)}
.nav-link{border-radius:12px;margin:3px 0;padding:10px 12px;font-weight:650;transition:background .08s ease,color .08s ease,transform .08s ease}
.nav-link:hover{transform:translateX(2px);background:linear-gradient(90deg,rgba(37,99,235,.12),rgba(14,165,233,.08));color:var(--accent)}
.nav-link.active{background:linear-gradient(90deg,#2563eb,#0ea5e9);color:#fff;box-shadow:0 10px 22px rgba(37,99,235,.24)}
.nav-link.active .nav-count{background:rgba(255,255,255,.20);color:#fff}.nav-count{background:#e6f0ff;color:#2563eb;font-weight:800}
.main{padding:2rem}.page-title{font-size:28px;letter-spacing:-.04em;color:var(--text)}.page-subtitle{font-size:15px;color:var(--text2)}
.panel,.table-wrap,.metric-card,.checklist-table-card,.checklist-form-panel{background:rgba(255,255,255,.92);border:1px solid var(--border);box-shadow:var(--shadow);border-radius:20px}
body:not(.light) .panel,body:not(.light) .table-wrap,body:not(.light) .metric-card,body:not(.light) .checklist-table-card,body:not(.light) .checklist-form-panel{background:rgba(16,42,85,.88)}
.metric-card{position:relative;overflow:hidden}.metric-card:before{content:"";position:absolute;inset:0 0 auto 0;height:4px;background:linear-gradient(90deg,#2563eb,#0ea5e9)}
.table-toolbar,.checklist-table-head{background:linear-gradient(90deg,rgba(37,99,235,.08),rgba(14,165,233,.06));padding:18px 22px}
th{background:#f0f6ff!important;color:#315481;font-weight:800}body:not(.light) th{background:rgba(96,165,250,.12)!important;color:#b8d3ff}td{font-size:14px}tr:hover td{background:rgba(37,99,235,.035)!important}
.btn{border-radius:12px;font-weight:800;transition:transform .08s ease,box-shadow .08s ease,background .08s ease,opacity .08s ease}.btn:hover{transform:translateY(-1px)}.btn:active,.cbox:active,.unit-card:active{transform:scale(.985)}
.btn-accent{background:linear-gradient(135deg,#2563eb,#0ea5e9);box-shadow:0 10px 22px rgba(37,99,235,.24)}.btn-outline{background:#fff;color:#2563eb;border-color:rgba(37,99,235,.25)}body:not(.light) .btn-outline{background:rgba(255,255,255,.06)}
.badge-daily,.badge-weekly,.badge-monthly,.badge-quarterly,.badge-annually,.badge-bi{background:#eaf3ff;color:#2563eb;border:1px solid rgba(37,99,235,.12);font-weight:800}
body:not(.light) .badge-daily,body:not(.light) .badge-weekly,body:not(.light) .badge-monthly,body:not(.light) .badge-quarterly,body:not(.light) .badge-annually,body:not(.light) .badge-bi{background:rgba(96,165,250,.15);color:#93c5fd}
.pct-high{background:#dcfce7;color:#15803d}.pct-mid{background:#fff7ed;color:#c2410c}.pct-low{background:#fee2e2;color:#b91c1c}
.unit-card{background:linear-gradient(180deg,#ffffff,#f4f9ff);border-color:rgba(37,99,235,.16);box-shadow:0 10px 28px rgba(37,99,235,.08);transition:transform .08s ease,border-color .08s ease,box-shadow .08s ease}.unit-card:hover,.unit-card.selected{border-color:#2563eb;box-shadow:0 16px 34px rgba(37,99,235,.16)}body:not(.light) .unit-card{background:linear-gradient(180deg,rgba(29,78,216,.20),rgba(15,23,42,.12))}
.cbox{background:#eef5ff!important;border-color:#bfdbfe!important;color:#2563eb!important;font-weight:800;transition:transform .06s ease,background .06s ease,border-color .06s ease,color .06s ease}.cbox:hover{background:#dbeafe!important}.cbox.done{background:linear-gradient(135deg,#16a34a,#22c55e)!important;border-color:#15803d!important;color:#fff!important}.cbox.pending{opacity:.75;position:relative}.cbox.pending:after{content:"";position:absolute;inset:-3px;border-radius:inherit;border:2px solid rgba(37,99,235,.30);animation:pulseWait .7s linear infinite}@keyframes pulseWait{from{opacity:.9;transform:scale(.94)}to{opacity:0;transform:scale(1.15)}}
input,select,textarea{background:#fff!important;border:1px solid rgba(37,99,235,.22)!important;color:var(--text)!important;border-radius:12px!important;box-shadow:0 8px 18px rgba(37,99,235,.05)}input:focus,select:focus,textarea:focus{border-color:#2563eb!important;box-shadow:0 0 0 4px rgba(37,99,235,.12)!important}body:not(.light) input,body:not(.light) select,body:not(.light) textarea{background:rgba(255,255,255,.06)!important;color:#fff!important}
.checklist-page .page-header{background:linear-gradient(135deg,#2563eb,#0ea5e9);color:#fff;padding:22px 24px;border-radius:22px;box-shadow:0 18px 42px rgba(37,99,235,.22)}.checklist-page .page-title,.checklist-page .page-subtitle{color:#fff}.checklist-page .page-subtitle{opacity:.86}
.checklist-selector-panel{background:#fff;border:1px solid var(--border);border-radius:20px;padding:18px;box-shadow:var(--shadow);margin-bottom:1.3rem}body:not(.light) .checklist-selector-panel{background:rgba(16,42,85,.88)}.checklist-selector-panel select{max-width:720px;background:#f8fbff!important;border:1px solid #93c5fd!important;color:#0b1b3a!important;font-weight:800;box-shadow:none!important}
.checklist-table-title{font-size:20px;color:var(--text)}.checklist-table-sub{font-size:13px}.checklist-table td{padding:20px 24px}.checklist-row-title{font-size:17px}.checklist-row-desc{max-width:860px;color:var(--text2);font-size:14px}.checklist-action-link{color:#2563eb;background:#eef5ff}.checklist-action-link:hover{background:#dbeafe;color:#1d4ed8}.checklist-delete{background:#fee2e2;color:#b91c1c}.checklist-delete:hover{background:#fecaca}
.done-pill{background:#dcfce7!important;color:#15803d!important;border:1px solid #86efac!important}.not-done-pill{background:#eff6ff!important;color:#2563eb!important;border:1px solid #bfdbfe!important}
.toast{border-radius:14px;box-shadow:0 16px 38px rgba(37,99,235,.22)}
@media(max-width:980px){.main{padding:1rem}.topbar{height:auto;min-height:64px;flex-wrap:wrap;padding:.75rem 1rem}.app-body{min-height:calc(100vh - 64px)}.page-title{font-size:24px}.checklist-page .page-header{padding:18px}}

/* v6: Edit Checklists compact refix
   The v5 blue refresh made the checklist editor too large on some screens.
   This override restores a balanced, compact supervisor editing view without
   changing the blue/white theme elsewhere. */
.checklist-page .page-header{
  padding:16px 18px !important;
  border-radius:16px !important;
  margin-bottom:1rem !important;
}
.checklist-page .page-title{font-size:22px !important;line-height:1.15 !important}
.checklist-page .page-subtitle{font-size:13px !important;margin-top:2px !important}
.checklist-selector-panel{
  padding:12px 14px !important;
  border-radius:16px !important;
  margin-bottom:1rem !important;
}
.checklist-selector-panel .field{max-width:560px !important}
.checklist-selector-panel select{
  min-height:44px !important;
  height:44px !important;
  max-width:560px !important;
  font-size:14px !important;
  padding:0 14px !important;
  border-radius:10px !important;
}
.checklist-table-card{border-radius:16px !important;overflow:hidden !important}
.checklist-table-head{
  padding:12px 16px !important;
  gap:10px !important;
}
.checklist-table-title{font-size:16px !important;line-height:1.2 !important}
.checklist-table-sub{font-size:11px !important;margin-top:2px !important}
.checklist-table th{
  padding:9px 14px !important;
  font-size:11px !important;
}
.checklist-table td{
  padding:10px 14px !important;
  font-size:13px !important;
  vertical-align:middle !important;
}
.checklist-row-title{font-size:14px !important;line-height:1.3 !important}
.checklist-row-desc{
  font-size:12px !important;
  line-height:1.45 !important;
  margin-top:4px !important;
  max-width:620px !important;
}
.checklist-table .badge{font-size:11px !important;padding:3px 9px !important}
.checklist-action-link{
  padding:6px 9px !important;
  font-size:12px !important;
  border-radius:8px !important;
}
.checklist-delete{
  padding:6px 10px !important;
  font-size:12px !important;
  border-radius:8px !important;
}
.checklist-form-panel{
  margin-top:1rem !important;
  max-width:820px !important;
  padding:1rem !important;
  border-radius:16px !important;
}
.checklist-form-panel textarea{min-height:120px !important}
.checklist-form-panel .panel-title{font-size:16px !important}
.checklist-form-panel .field{margin-bottom:.75rem !important}
.checklist-form-panel input,
.checklist-form-panel select{height:40px !important;font-size:13px !important}
.checklist-form-panel textarea{font-size:13px !important}
.checklist-page .btn{padding:7px 11px !important;font-size:12px !important;border-radius:10px !important}
@media(max-width:900px){
  .checklist-table-card{overflow-x:auto !important}
  .checklist-table{min-width:650px !important}
  .checklist-table th:nth-child(2),.checklist-table td:nth-child(2){width:120px !important}
  .checklist-table th:nth-child(3),.checklist-table td:nth-child(3){width:160px !important}
}
@media(max-width:640px){
  .checklist-page .page-header{display:block !important}
  .checklist-page .page-header .btn{margin-top:10px !important}
  .checklist-selector-panel select{width:100% !important;max-width:100% !important}
  .checklist-table{min-width:590px !important}
  .checklist-row-desc{max-width:340px !important}
}

/* v7: Full responsive layout for phones, tablets, and small browser widths */
html,body{max-width:100%;overflow-x:hidden}
img,svg,video{max-width:100%;height:auto}
.main{width:100%}
.table-wrap,.panel,.checklist-table-card,.metrics-grid,.card-grid{max-width:100%}

@media (max-width:1200px){
  .main{padding:1.25rem}
  .card-grid{grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:9px}
  .metrics-grid{grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:10px}
  .checklist-row-desc{max-width:520px!important}
}

@media (max-width:980px){
  .topbar{position:sticky;top:0;height:auto;min-height:58px;padding:.65rem .8rem;gap:.55rem}
  .topbar-left{min-width:0;flex:1 1 100%}
  .topbar-brand{font-size:16px;white-space:nowrap}
  .topbar-section{font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .topbar-right{width:100%;justify-content:space-between;gap:6px}
  .theme-toggle,.btn-logout{padding:6px 9px;font-size:12px}
  .user-pill{padding:4px 8px 4px 4px;max-width:48%;overflow:hidden}
  .user-name{display:block;max-width:110px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:12px}
  .role-badge{display:none}

  .app-body{display:block;min-height:auto}
  .sidebar{display:block!important;position:sticky;top:105px;z-index:90;width:100%;min-width:0;height:auto;max-height:none;overflow-x:auto;overflow-y:hidden;padding:.45rem .55rem;border-right:0;border-bottom:1px solid var(--border);white-space:nowrap;background:rgba(255,255,255,.94)}
  body:not(.light) .sidebar{background:rgba(16,42,85,.94)}
  .sidebar nav{display:flex;align-items:center;gap:6px;min-width:max-content}
  .sidebar-label,.nav-divider{display:none!important}
  .nav-link{display:inline-flex;width:auto;margin:0;padding:8px 10px;font-size:12px;border-radius:999px;gap:5px;flex:0 0 auto}
  .nav-link:hover{transform:none}
  .nav-icon{width:auto;font-size:13px}
  .nav-count{margin-left:4px;font-size:9px;padding:1px 5px}
  .main{padding:1rem .8rem}

  .page-header{display:block;margin-bottom:1rem}
  .page-title{font-size:22px!important;line-height:1.15}
  .page-subtitle{font-size:13px!important;margin-top:4px}
  .header-actions{margin-top:10px;width:100%}
  .header-actions>*{max-width:100%}

  .table-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch;border-radius:14px}
  .table-wrap table{min-width:680px}
  th,td{padding:9px 10px;font-size:12px}
  .table-toolbar{padding:12px;align-items:flex-start}
  .table-title{font-size:13px}

  .panel{padding:1rem;border-radius:16px}
  .metric-card{padding:12px;border-radius:16px}
  .metric-value{font-size:22px}
  .unit-card{padding:12px;border-radius:14px}
  .unit-card-pct{font-size:22px}
  .unit-card-name{min-height:auto;font-size:12px}
  .cbox{width:24px;height:24px;border-radius:7px;font-size:9px}
  .check-grid{gap:4px}

  .modal{max-width:calc(100vw - 24px);padding:1.1rem;border-radius:16px}
  .modal-actions{justify-content:stretch;flex-wrap:wrap}
  .modal-actions .btn{flex:1 1 auto;justify-content:center}
  .toast{left:.8rem;right:.8rem;bottom:.8rem;text-align:center}
}

@media (max-width:760px){
  body{font-size:13px;line-height:1.45}
  .topbar-left{gap:8px}
  .topbar-divider{display:none}
  .topbar-section{font-size:11px}
  .user-avatar{width:24px;height:24px;font-size:10px}
  .user-pill{max-width:54%}
  .theme-toggle{font-size:0}
  .theme-toggle::first-letter{font-size:13px}

  .main{padding:.8rem .65rem}
  .metrics-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .card-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .btn{padding:7px 10px;font-size:12px;border-radius:10px}
  .btn-sm{padding:5px 8px;font-size:11px}
  select,input,textarea{font-size:13px!important;max-width:100%}

  .checklist-page .page-header{padding:14px!important;border-radius:16px!important}
  .checklist-selector-panel{padding:10px!important;border-radius:14px!important}
  .checklist-selector-panel .field{max-width:100%!important}
  .checklist-selector-panel select{width:100%!important;max-width:100%!important;height:42px!important;min-height:42px!important;font-size:13px!important}

  /* Convert the edit checklist table into readable cards on mobile */
  .checklist-table-card{overflow:visible!important;border-radius:16px!important}
  .checklist-table{min-width:0!important;width:100%!important;display:block!important}
  .checklist-table thead{display:none!important}
  .checklist-table tbody{display:block!important;padding:8px!important}
  .checklist-table tr{display:block!important;background:#fff;border:1px solid var(--border);border-radius:14px;margin:0 0 10px 0;overflow:hidden;box-shadow:0 8px 20px rgba(37,99,235,.07)}
  body:not(.light) .checklist-table tr{background:rgba(255,255,255,.06)}
  .checklist-table td{display:block!important;width:100%!important;border-bottom:0!important;padding:10px 12px!important}
  .checklist-table td:nth-child(2)::before{content:'Frequency';display:block;font-size:10px;text-transform:uppercase;letter-spacing:.08em;color:var(--text3);font-weight:800;margin-bottom:4px}
  .checklist-table td:nth-child(3)::before{content:'Actions';display:block;font-size:10px;text-transform:uppercase;letter-spacing:.08em;color:var(--text3);font-weight:800;margin-bottom:6px}
  .checklist-row-title{font-size:14px!important}
  .checklist-row-desc{white-space:normal!important;max-width:100%!important;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
  .checklist-table-head{padding:12px!important;display:block!important}
  .checklist-table-head .btn{margin-top:10px;width:100%;justify-content:center}

  .checklist-form-panel{max-width:100%!important;padding:12px!important}
  .checklist-form-panel [style*="grid-template-columns"]{display:block!important}
  .checklist-form-panel textarea{min-height:130px!important}
}

@media (max-width:520px){
  .topbar{padding:.55rem .6rem}
  .topbar-brand{font-size:15px}
  .topbar-section{display:none}
  .topbar-right{gap:5px}
  .user-pill{max-width:58%;padding-right:6px}
  .user-name{max-width:95px}
  .sidebar{top:94px;padding:.4rem .45rem}
  .nav-link{padding:7px 9px;font-size:11px}
  .nav-icon{font-size:12px}
  .main{padding:.65rem .5rem}
  .page-title{font-size:20px!important}
  .page-subtitle{font-size:12px!important}

  .metrics-grid{grid-template-columns:1fr 1fr}
  .metric-label{font-size:10px}.metric-value{font-size:20px}
  .card-grid{grid-template-columns:1fr}
  .unit-card{display:grid;grid-template-columns:1fr auto;gap:8px;align-items:center}
  .unit-card-bar{grid-column:1/-1;margin-top:0}
  .unit-card-pct{font-size:20px}

  .table-wrap table{min-width:560px}
  .table-toolbar{display:block}.table-toolbar .btn,.table-toolbar select{margin-top:8px;width:100%;justify-content:center}
  .check-grid{max-width:100%}
  .cbox{width:23px;height:23px}

  .field{margin-bottom:.75rem}
  .field label{font-size:10px}
  .modal-hdr{font-size:15px}
}

@media (max-width:380px){
  .metrics-grid{grid-template-columns:1fr}
  .theme-toggle,.btn-logout{padding:5px 7px}
  .user-name{max-width:72px}
  .nav-link{padding:6px 8px}
}

/* v8 Exceptions & Reports module */
.exceptions-hero{background:linear-gradient(135deg,rgba(37,99,235,.10),rgba(96,165,250,.05));border:1px solid rgba(37,99,235,.12);border-radius:18px;padding:18px 20px}
.tabs-wrap{display:flex;gap:8px;flex-wrap:wrap;margin:-.4rem 0 1rem}
.tab-link{display:inline-flex;align-items:center;padding:9px 13px;border:1px solid var(--border);background:var(--surface);color:var(--text2);border-radius:999px;text-decoration:none;font-weight:700;font-size:12px;transition:.15s ease}
.tab-link:hover{border-color:var(--accent);color:var(--accent);transform:translateY(-1px)}
.tab-link.active{background:var(--accent);border-color:var(--accent);color:#fff;box-shadow:0 10px 26px rgba(37,99,235,.18)}
.compact-settings{padding:14px 16px}.settings-row{display:flex;align-items:end;gap:10px;flex-wrap:wrap}.settings-row label{font-size:12px;color:var(--text2);font-weight:700}.settings-row input{max-width:130px;background:var(--surface2);border:1px solid var(--border);border-radius:10px;padding:8px 10px;color:var(--text)}
.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.wide-modal{max-width:760px}
.responsive-table{overflow-x:auto;-webkit-overflow-scrolling:touch}.responsive-table table{min-width:860px}
.task-board{display:grid;gap:12px;padding:14px}.task-card{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:14px;align-items:start;background:var(--surface);border:1px solid var(--border);border-radius:16px;padding:16px}.task-card.overdue{border-color:rgba(239,68,68,.35);background:linear-gradient(180deg,rgba(239,68,68,.055),transparent),var(--surface)}.task-title{font-size:16px;font-weight:800;margin-bottom:4px}.task-card p{color:var(--text2);font-size:13px;margin:8px 0 12px;line-height:1.55}.task-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}.submission-box{display:none;grid-column:1/-1;border-top:1px solid var(--border);padding-top:10px}.submission-box.open{display:block}.submission-item{padding:10px;border:1px solid var(--border);border-radius:12px;background:var(--surface2);margin-top:8px;color:var(--text2);font-size:13px}
body.light .exceptions-hero{background:linear-gradient(135deg,#eaf2ff,#ffffff)}body.light .tab-link{background:#fff}body.light .task-card{background:#fff}
@media(max-width:760px){.exceptions-hero{padding:14px}.tabs-wrap{overflow-x:auto;flex-wrap:nowrap;padding-bottom:4px}.tab-link{white-space:nowrap;font-size:11px;padding:8px 11px}.form-grid{grid-template-columns:1fr}.task-board{padding:10px}.task-card{display:block;padding:13px}.task-actions{justify-content:stretch;margin-top:12px}.task-actions .btn{flex:1 1 auto;justify-content:center}.responsive-table table{min-width:760px}.wide-modal{max-width:calc(100vw - 18px)}}

/* v9 exception report format + category scope UI */
.required-note{margin:0 0 12px;padding:10px 12px;border-radius:12px;background:#eff6ff;color:#1d4ed8;font-size:.9rem;font-weight:600}
.exception-form-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.category-pill{display:inline-flex;align-items:center;padding:5px 9px;border-radius:999px;background:#dbeafe;color:#1e40af;font-weight:700;font-size:.78rem;line-height:1.1;white-space:normal}
.category-page{background:#fff;border:1px solid #dbeafe;border-radius:20px;box-shadow:0 12px 28px rgba(37,99,235,.08);padding:16px}
.category-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-top:14px}
.category-card{border:1px solid #dbeafe;border-radius:18px;background:linear-gradient(180deg,#ffffff,#f8fbff);padding:15px;box-shadow:0 8px 20px rgba(37,99,235,.06)}
.category-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin-bottom:10px}
.category-card h3{font-size:.95rem;line-height:1.25;color:#0f3d82;margin:0;font-weight:800;letter-spacing:.01em}
.category-scope{font-size:.9rem;line-height:1.55;color:#334155;white-space:normal}
.exceptions-table table th,.exceptions-table table td{vertical-align:top}
.exceptions-table table td:nth-child(2){min-width:260px}
@media (max-width:1100px){.exception-form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.category-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:720px){.exception-form-grid{grid-template-columns:1fr}.category-grid{grid-template-columns:1fr}.category-page{padding:12px}.category-card{padding:12px}.exceptions-table .responsive-table table,.exceptions-table .responsive-table thead,.exceptions-table .responsive-table tbody,.exceptions-table .responsive-table th,.exceptions-table .responsive-table td,.exceptions-table .responsive-table tr{display:block}.exceptions-table .responsive-table thead{display:none}.exceptions-table .responsive-table tr{border:1px solid #dbeafe;border-radius:16px;margin:0 0 12px;padding:10px;background:#fff}.exceptions-table .responsive-table td{border:0!important;padding:8px 4px!important;display:flex;justify-content:space-between;gap:12px}.exceptions-table .responsive-table td:before{content:attr(data-label);font-weight:800;color:#1e40af;min-width:110px}.exceptions-table .responsive-table td:last-child{justify-content:flex-end}.exceptions-table .responsive-table td:last-child:before{display:none}}

/* v10 Exceptions workflow polish */
.exceptions-tabs{align-items:center;gap:.45rem;overflow-x:auto;padding-bottom:.25rem}
.admin-guidance{display:flex;align-items:center;justify-content:space-between;gap:1rem;flex-wrap:wrap}
.record-exception-landing{display:grid;grid-template-columns:minmax(260px,380px) 1fr;gap:1rem;align-items:start}
.record-card{background:linear-gradient(135deg,#f8fbff,#e9f3ff);border:1px solid rgba(37,99,235,.16);border-radius:22px;padding:1.35rem;box-shadow:0 18px 40px rgba(30,64,175,.10)}
body:not(.light) .record-card{background:linear-gradient(135deg,rgba(15,23,42,.96),rgba(30,58,138,.45));border-color:rgba(96,165,250,.22)}
.record-card h2{margin:.25rem 0 .5rem;color:#0f3f8a}.record-card p{color:#48617f;line-height:1.6}.record-icon{width:54px;height:54px;border-radius:18px;background:#dbeafe;display:grid;place-items:center;font-size:1.7rem;box-shadow:inset 0 0 0 1px rgba(37,99,235,.14)}
body:not(.light) .record-card h2{color:#dbeafe} body:not(.light) .record-card p{color:#cbd5e1}
.exception-select-list{display:grid;gap:.55rem;max-height:360px;overflow:auto;padding:.25rem}
.exception-check{display:flex;gap:.7rem;align-items:flex-start;border:1px solid rgba(37,99,235,.16);border-radius:14px;padding:.7rem;background:#fff;cursor:pointer;transition:.12s ease}
.exception-check:hover{border-color:#2563eb;box-shadow:0 8px 22px rgba(37,99,235,.10);transform:translateY(-1px)}
.exception-check input{margin-top:.2rem;width:18px;height:18px;accent-color:#2563eb}.exception-check span{display:grid;gap:.15rem}.exception-check small{color:#64748b}.exception-check em{font-style:normal;color:#334155;font-size:.9rem}
body:not(.light) .exception-check{background:rgba(15,23,42,.72);border-color:rgba(96,165,250,.22)} body:not(.light) .exception-check em{color:#dbeafe}
.hidden{display:none!important}.exception-task{border-left:4px solid #2563eb}.task-card.overdue{border-left:4px solid #dc2626}
@media (max-width: 860px){.record-exception-landing{grid-template-columns:1fr}.admin-guidance{align-items:stretch}.settings-row{width:100%;justify-content:space-between}.exception-select-list{max-height:300px}}
@media (max-width: 520px){.record-card{padding:1rem;border-radius:18px}.record-icon{width:46px;height:46px}.exception-check{padding:.6rem}.exceptions-tabs .tab-link{white-space:nowrap}}
/* v11 exception workflow hotfix: keep active exception tabs readable in light mode */
body.light .tab-link.active{background:var(--accent)!important;border-color:var(--accent)!important;color:#fff!important;}

/* v12 exception scoring/workflow + active tab visibility */
.exceptions-tabs .tab-link.active,
body.light .exceptions-tabs .tab-link.active,
body.light .tabs-wrap .tab-link.active{
  background:linear-gradient(90deg,#2563eb,#0ea5e9)!important;
  border-color:#2563eb!important;
  color:#fff!important;
  box-shadow:0 10px 26px rgba(37,99,235,.22)!important;
}
.exceptions-tabs .tab-link.active *{color:#fff!important}
.btn-danger{background:rgba(220,38,38,.10);border:1px solid rgba(220,38,38,.22);color:#dc2626}
.btn-danger:hover{background:rgba(220,38,38,.18);color:#b91c1c}
.reject-note{margin-top:.45rem;padding:.5rem .65rem;border-radius:10px;background:#fff1f2;color:#9f1239;font-size:.8rem;line-height:1.35}
body:not(.light) .reject-note{background:rgba(244,63,94,.13);color:#fecdd3}
.no-exception-check{border-style:dashed;background:#f8fbff}.no-exception-check b{color:#1d4ed8}
.compact-empty{padding:1rem;color:#64748b;text-align:left}
#rtUser[multiple]{min-height:145px;padding:8px}#rtUser option{padding:7px 8px;border-radius:8px;margin:2px 0}

/* v13 deadline, responsive analytics, and active-tab fix */
.tabs-wrap .tab-link.active,
.exceptions-tabs .tab-link.active,
body.light .tabs-wrap .tab-link.active,
body.light .exceptions-tabs .tab-link.active{
  background:linear-gradient(90deg,#1d4ed8,#0284c7)!important;
  color:#fff!important;
  border-color:#1d4ed8!important;
  min-width:max-content;
}
.tabs-wrap .tab-link.active::before{content:none!important;display:none!important}
.filter-bar{display:flex;gap:.6rem;flex-wrap:wrap;margin:0 0 1rem;padding:.8rem;background:#f8fbff;border:1px solid #dbeafe;border-radius:16px}
.filter-bar select{min-width:180px;background:#fff}
.member-overview,.metrics-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:.8rem;margin:0 0 1rem}
.mini-stat{background:#fff;border:1px solid #dbeafe;border-radius:16px;padding:1rem;box-shadow:0 10px 24px rgba(30,64,175,.07)}
.mini-stat b{display:block;font-size:1.45rem;color:#1d4ed8}.mini-stat span{font-size:.82rem;color:#475569;font-weight:700}
.upcoming-box{grid-column:span 2;background:#fff;border:1px solid #dbeafe;border-radius:16px;padding:1rem;box-shadow:0 10px 24px rgba(30,64,175,.07)}
.upcoming-box div{display:flex;justify-content:space-between;gap:.75rem;border-top:1px solid #eaf2ff;padding:.45rem 0;color:#334155}.upcoming-box span{color:#1d4ed8;font-weight:700}
.dashboard-analytics{display:grid;gap:1rem}.table-wrap.inner{box-shadow:none;margin-top:.25rem}
.trend-chart{display:grid;gap:.65rem;padding:.75rem}.trend-row{display:grid;grid-template-columns:90px 1fr 56px;gap:.75rem;align-items:center}.trend-row div{height:12px;background:#eaf2ff;border-radius:999px;overflow:hidden}.trend-row i{display:block;height:100%;background:linear-gradient(90deg,#2563eb,#0ea5e9);border-radius:999px}.trend-row b{color:#1d4ed8}
body:not(.light) .filter-bar,body:not(.light) .mini-stat,body:not(.light) .upcoming-box{background:rgba(15,23,42,.76);border-color:rgba(96,165,250,.2)}
body:not(.light) .mini-stat span,body:not(.light) .upcoming-box div{color:#cbd5e1}
body:not(.light) .trend-row div{background:rgba(96,165,250,.16)}
@media(max-width:720px){.filter-bar{display:grid;grid-template-columns:1fr}.filter-bar select,.filter-bar .btn{width:100%}.upcoming-box{grid-column:span 1}.trend-row{grid-template-columns:72px 1fr 48px}.table-toolbar{gap:.75rem;align-items:flex-start}.task-card{overflow:hidden}.task-actions .btn{min-width:0}.modal{padding:1rem}.page-title{font-size:22px}}

/* v16 Exceptions & Reports UI refinements */
.exceptions-tabs{display:flex;flex-wrap:wrap;gap:12px;align-items:center;margin:0 0 1.25rem}
.exceptions-tabs .tab-link{
  min-height:48px;display:inline-flex;align-items:center;justify-content:center;
  padding:0 18px;border:1px solid #cfe0ff;border-radius:999px;background:#fff;
  color:#24508f!important;font-weight:700;text-decoration:none;box-shadow:0 8px 22px rgba(37,99,235,.06);
  white-space:nowrap;transition:transform .12s ease,box-shadow .12s ease,background .12s ease;
}
.exceptions-tabs .tab-link:hover{transform:translateY(-1px);box-shadow:0 12px 26px rgba(37,99,235,.12)}
.exceptions-tabs .tab-link.active{
  color:#fff!important;background:linear-gradient(135deg,#2563eb,#0ea5e9)!important;
  border-color:#2563eb!important;box-shadow:0 14px 30px rgba(37,99,235,.25)!important;
}
body.light .exceptions-tabs .tab-link.active{color:#fff!important}
body.light .exceptions-tabs .tab-link.active:empty::after,
.exceptions-tabs .tab-link.active:empty::after{content:"Open Exceptions";color:#fff;font-weight:700}
.reports-shell{background:rgba(255,255,255,.72);border:1px solid #dbeafe;border-radius:22px;padding:18px;box-shadow:0 18px 45px rgba(37,99,235,.08)}
body:not(.light) .reports-shell{background:var(--surface);border-color:var(--border)}
.section-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;flex-wrap:wrap;margin-bottom:14px}
.section-actions{display:flex;gap:8px;flex-wrap:wrap}
.pro-filter{background:#f8fbff;border:1px solid #dbeafe;border-radius:18px;padding:12px;margin:12px 0 16px;display:flex;gap:10px;flex-wrap:wrap}
.pro-filter select{min-width:190px}
.pro-overview{display:grid;grid-template-columns:repeat(3,minmax(130px,1fr)) minmax(240px,2fr);gap:12px;margin:12px 0 18px}
.pro-overview .mini-stat,.score-metrics .mini-stat{background:#fff;border:1px solid #dbeafe;border-radius:18px;padding:16px;box-shadow:0 10px 24px rgba(37,99,235,.06)}
.pro-overview .mini-stat b,.score-metrics .mini-stat b{font-size:28px;color:#0b3b78;display:block}
.pro-overview .mini-stat span,.score-metrics .mini-stat span{color:#42608e;font-weight:700}
.upcoming-box{background:#fff;border:1px solid #dbeafe;border-radius:18px;padding:14px;box-shadow:0 10px 24px rgba(37,99,235,.06)}
.upcoming-box>div{display:flex;justify-content:space-between;gap:10px;padding:7px 0;border-bottom:1px solid #eef4ff}
.upcoming-box>div:last-child{border-bottom:0}
.upcoming-box strong{color:#1d4ed8;font-size:12px}
.task-board{display:grid;grid-template-columns:repeat(auto-fit,minmax(320px,1fr));gap:14px}
.pro-task{display:flex;flex-direction:column;gap:12px;background:#fff;border:1px solid #dbeafe;border-radius:20px;padding:16px;box-shadow:0 12px 28px rgba(37,99,235,.08)}
.pro-task:hover{border-color:#93c5fd;box-shadow:0 18px 34px rgba(37,99,235,.13)}
.task-title-row{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}
.task-title{font-size:16px;font-weight:800;color:#082554}
.task-meta{margin-top:4px;color:#48628f;font-size:13px;font-weight:600}
.task-main p{margin:10px 0;color:#42526e}
.task-badges{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.task-actions{display:flex;gap:8px;flex-wrap:wrap;align-items:center;padding-top:8px;border-top:1px solid #eef4ff}
.rejected-task{border-color:#fecaca;background:#fffafa}
.pro-table{border-radius:18px;border-color:#dbeafe;overflow:hidden}
.trend-chart{display:flex;flex-direction:column;gap:10px;padding:10px 0}
.trend-row{display:grid;grid-template-columns:90px 1fr 60px;align-items:center;gap:10px}
.trend-row div{height:10px;background:#e8f1ff;border-radius:999px;overflow:hidden}
.trend-row i{display:block;height:100%;background:linear-gradient(90deg,#2563eb,#0ea5e9);border-radius:999px}
.category-pill{background:#eaf2ff;color:#1d4ed8;border-radius:999px;padding:4px 8px;font-weight:700;font-size:12px}
.reject-note{margin-top:8px;background:#fff1f2;border:1px solid #fecdd3;color:#9f1239;border-radius:10px;padding:8px}
body:not(.light) .exceptions-tabs .tab-link{background:var(--surface);border-color:var(--border2);color:var(--text)!important}
body:not(.light) .pro-task,body:not(.light) .upcoming-box,body:not(.light) .pro-overview .mini-stat,body:not(.light) .score-metrics .mini-stat{background:var(--surface2);border-color:var(--border)}
body:not(.light) .task-title{color:var(--text)}
body:not(.light) .task-meta,body:not(.light) .task-main p{color:var(--text2)}
body:not(.light) .task-actions{border-top-color:var(--border)}
@media (max-width:900px){.pro-overview{grid-template-columns:1fr 1fr}.upcoming-box{grid-column:1/-1}.task-board{grid-template-columns:1fr}.section-head{flex-direction:column}}
@media (max-width:640px){.exceptions-tabs{gap:8px}.exceptions-tabs .tab-link{width:100%;justify-content:center;min-height:44px}.reports-shell{padding:12px;border-radius:16px}.pro-overview{grid-template-columns:1fr}.pro-filter select,.pro-filter button{width:100%}.task-title-row{flex-direction:column}.task-actions .btn{width:100%}}

/* v18 grouped assignments, Ghana holiday calendar, and visibility refinements */
.cbox.na.holiday{background:#eff6ff!important;border-color:#bfdbfe!important;color:#1d4ed8!important;position:relative}
.cbox.na.holiday::after{content:'H';position:absolute;right:3px;top:1px;font-size:8px;font-weight:900;color:#2563eb;opacity:.85}
.task-group-card{grid-column:1/-1;background:linear-gradient(180deg,#fff,#f8fbff);border:1px solid #bfdbfe;border-radius:22px;padding:18px;box-shadow:0 14px 34px rgba(37,99,235,.08)}
.task-group-card .assigned-users{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}
.user-chip{display:inline-flex;align-items:center;gap:6px;border:1px solid #dbeafe;background:#fff;color:#1e3a8a;border-radius:999px;padding:6px 10px;font-size:12px;font-weight:800}
.user-chip.submitted-on-time,.user-chip.reviewed,.user-chip.closed{border-color:#bbf7d0;background:#f0fdf4;color:#166534}
.user-chip.submitted-late{border-color:#fed7aa;background:#fff7ed;color:#9a3412}
.user-chip.missed,.user-chip.rejected{border-color:#fecaca;background:#fff1f2;color:#991b1b}
.group-detail{display:none;margin-top:16px;border-top:1px solid #dbeafe;padding-top:16px}
.group-detail.open{display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:12px}
.group-detail .task-card{box-shadow:none;border-style:dashed}
.grouped-board{grid-template-columns:1fr}
body:not(.light) .task-group-card{background:var(--surface2);border-color:var(--border)}
body:not(.light) .user-chip{background:rgba(15,23,42,.6);border-color:var(--border2);color:var(--text)}
