:root {
  --page:#F5F5F7; --card:#FFFFFF; --line:#E4E7EC;
  --ink:#1D1D1F; --sub:#424245; --muted:#6E6E73;
  --navy:#1F3A5F; --dark:#0F1B33; --gold:#A8834C; --gold-text:#8C6D3A;
  --red:#B03227; --red-bg:#FBECEB; --amber:#9A6B2A; --amber-bg:#F8EFDC;
  --blue-bg:#EAF0F7; --cream:#FBF7EF; --thead:#F4F6F9;
  --body:"PingFang SC","HarmonyOS Sans SC","Microsoft YaHei","Segoe UI",sans-serif;
  --number:Bahnschrift,"DIN Alternate","Segoe UI",var(--body);
}
* {box-sizing:border-box}
[hidden] {display:none!important}
body {margin:0;min-width:1200px;background:var(--page);color:var(--ink);font:14px/1.55 var(--body)}
button,input,select,textarea {font:inherit;color:inherit}
button {padding:5px 13px;border:1px solid #D8DDE5;border-radius:999px;background:var(--card);cursor:pointer;color:var(--navy);white-space:nowrap}
button:hover {background:var(--thead);border-color:#BFC8D7}
button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible {outline:2px solid var(--navy);outline-offset:2px}
button:disabled {opacity:.55;cursor:wait}
button.primary {background:var(--dark);border-color:var(--dark);color:white;font-weight:600}
button.primary:hover {background:var(--navy)}
button.text-button {background:none;border:0;border-radius:4px;padding:0;color:var(--navy);text-align:left;white-space:normal;text-decoration:underline;text-underline-offset:3px}
input,select,textarea {border:1px solid #CED5DF;border-radius:8px;background:white;padding:8px 11px;min-width:0}
input[type="month"] {border-radius:999px;color:var(--navy);background:var(--cream);font-family:var(--number)}
input[type="checkbox"] {accent-color:var(--navy)}
input[readonly], fieldset:disabled input,fieldset:disabled textarea {background:var(--thead)}
textarea {resize:vertical;min-height:68px}
h1,h2,p {margin-top:0}
h1 {margin:0;color:var(--navy);font-size:27px;line-height:1.24;letter-spacing:.4px}
h2 {font-size:16px;line-height:1.3;color:var(--navy);margin:0}
small {font-size:12px;color:var(--muted)}
#shell {display:flex;min-height:calc(100vh - 64px)}
.top {position:sticky;top:0;z-index:5;display:flex;align-items:center;gap:16px;height:64px;padding:0 26px;
  background:rgba(255,255,255,.82);backdrop-filter:saturate(170%) blur(18px);border-bottom:1px solid var(--line)}
.top img {display:block;height:34px;width:auto}
.top>span {border-left:1px solid #D2D2D7;padding-left:16px;color:var(--navy);font-size:17px;font-weight:700;letter-spacing:.75px}
#account {margin-left:auto;display:flex;align-items:center;gap:16px;color:var(--navy)}
#account strong,#account small {display:block;text-align:right;line-height:1.3}
#account small {margin-top:3px}
nav {flex:0 0 204px;background:white;border-right:1px solid var(--line);padding:18px 0}
.nav-group {margin-bottom:18px}
.nav-group p {margin:4px 22px;color:var(--gold-text);font-size:12px;letter-spacing:2px}
.nav-group button {width:100%;display:flex;align-items:center;justify-content:space-between;border:0;border-left:4px solid transparent;
  border-radius:0;text-align:left;padding:9px 18px;font-size:14px;color:var(--sub)}
.nav-group button[aria-current="page"] {background:var(--thead);border-left-color:var(--gold);color:var(--navy);font-weight:700}
.badge {font-family:var(--number);font-size:12px;color:#fff;background:var(--red);min-width:18px;text-align:center;border-radius:999px;padding:0 5px}
main {min-width:0;flex:1;padding:26px 28px 42px}
.page-head {display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin-bottom:18px}
.eyebrow {color:var(--gold-text);font-size:12px;font-weight:700;letter-spacing:2.6px;margin:0 0 7px}
.month {display:flex;align-items:center;gap:9px;font-size:12px;color:var(--muted);white-space:nowrap}
.logged-out main {display:grid;align-content:start;justify-content:center}
.login.card {width:410px;margin-top:10vh;padding:30px 32px 34px;border-top:4px solid var(--gold)}
.login h1 {margin-bottom:22px}
.login button {min-width:92px}
.card {min-width:0;background:var(--card);border:1px solid var(--line);border-radius:14px;padding:16px 18px;margin-bottom:16px}
.section-head {display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-bottom:12px}
.section-head h2 {border-left:4px solid var(--gold);padding-left:10px;margin-right:auto}
.conclusion {background:var(--cream);border-left:6px solid var(--gold);border-radius:0 10px 10px 0;color:var(--navy);font-weight:500;
  padding:13px 16px;margin-bottom:16px;font-size:15px}
.conclusion strong {font-family:var(--number),var(--body);font-weight:700}
.negative,.error {color:var(--red)}
.error {margin:8px 0}
.error:empty {display:none}
.reminder {background:var(--red-bg);color:var(--red);border:1px solid #EBC7C3;border-left:5px solid var(--red);border-radius:7px;
  padding:9px 14px;margin-bottom:15px}
.reminder button {margin-left:6px}
.num,.kpi-value {font-family:var(--number);font-variant-numeric:tabular-nums;letter-spacing:.13px}
.kpis {display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);gap:14px;margin-bottom:16px}
.kpi {background:white;border:1px solid var(--line);border-top:4px solid var(--navy);border-radius:0 0 14px 14px;padding:12px 15px;min-width:0}
.kpi.gold {border-top-color:var(--gold)}
.kpi.red {border-top-color:var(--red)}
.kpi.red .kpi-value {color:var(--red)}
.kpi-label {color:var(--sub);font-size:13px;font-weight:600}
.kpi-value {color:var(--navy);font-weight:700;font-size:30px;line-height:1.25;margin:4px 0 1px}
.kpi small {display:block}
.split {display:grid;grid-template-columns:minmax(0,1.4fr) minmax(0,1fr);gap:16px}
.overview-split {grid-template-columns:minmax(0,1.75fr) minmax(0,1fr)}
.split>div {min-width:0}
.table-wrap {overflow:auto}
.table-wrap + .table-wrap {margin-top:12px}
table {width:100%;border-collapse:collapse;font-size:13px;text-align:left}
th,td {padding:9px 10px;vertical-align:middle;border-bottom:1px solid var(--line);overflow-wrap:anywhere}
thead th {border-bottom:2px solid var(--navy);background:var(--thead);font-weight:700;color:var(--navy)}
tbody tr:last-child td {border-bottom:0}
tfoot th,tfoot td {background:var(--cream);border-top:1px solid var(--gold);border-bottom:0;color:var(--navy)}
td small {display:block;margin-top:3px;line-height:1.4}
td button:not(.matrix-cell) {margin:2px 3px 2px 0}
td input[type=number] {width:100%;min-width:92px}
td .field {margin:0}
td .field>span {font-size:12px;color:var(--muted)}
.overview-split th,.overview-split td {padding:7px}
.overview-split .section-head .pill {margin-left:8px}
.legend,.tabs,.switches {display:flex;align-items:center;gap:7px;flex-wrap:wrap;margin-bottom:14px}
.legend {margin-bottom:11px}
.tabs .primary,.switches .primary {font-weight:700}
.switches .field {margin:0}
.scope-trail {margin:0 0 14px;color:var(--muted)}
.scope-trail button {margin-left:8px}
.pill {display:inline-block;max-width:100%;border-radius:999px;padding:2px 8px;font-size:12px;white-space:nowrap;font-weight:600;margin:2px 3px 2px 0}
.ok {color:var(--navy);background:var(--blue-bg)}
.warn {color:var(--amber);background:var(--amber-bg)}
.bad {color:var(--red);background:var(--red-bg)}
.info {color:var(--navy);background:var(--thead)}
.gray {color:var(--muted);background:#F0F2F5}
.matrix-cell {width:100%;padding:5px 4px;border-radius:7px;border:1px solid transparent;white-space:normal;line-height:1.28;min-width:58px}
.matrix-cell strong {font-size:16px}
.matrix-cell:hover,.matrix-cell.selected {border-color:currentColor}
.matrix-cell.ok {background:var(--blue-bg)}
.matrix-cell.warn {background:var(--amber-bg)}
.matrix-cell.bad {background:var(--red-bg)}
.matrix-cell.gray {background:#F0F2F5}
.matrix-cell small {font-size:10px;margin-top:3px;color:inherit;display:block}
.compact-number {white-space:nowrap}
.matrix-empty {display:block;text-align:center;color:#89919C}
.bar {position:relative;display:inline-block;width:min(100%,160px);height:7px;margin:0 5px 0 0;background:#E8EBF1;vertical-align:middle;
  border-radius:999px;min-width:60px}
.bar i,.bar b {display:block;position:absolute}
.bar i {border-radius:999px;height:100%;background:var(--navy)}
.bar.warn i {background:var(--gold)}
.bar.bad i {background:var(--red)}
.bar b {height:12px;top:-2px;border-left:2px solid var(--dark)}
.chart {height:130px;display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);gap:7px;padding-top:4px}
.chart-col {min-width:0;display:flex;gap:4px;align-items:center;flex-direction:column;font-size:11px;color:var(--muted)}
.chart-col .num {color:var(--navy);font-size:13px;font-weight:700}
.chart-track {position:relative;flex:1;width:70%;border-bottom:1px solid var(--line);min-height:45px}
.chart-track i {display:block;position:absolute;left:0;right:0;bottom:0;background:var(--navy);border-radius:4px 4px 0 0}
.current .chart-track i {background:var(--gold)}
.field {display:flex;align-items:flex-start;flex-direction:column;gap:4px;margin:9px 0;color:var(--sub);font-weight:500}
.field>input,.field>textarea,.field>select {width:100%}
.switches .field {flex-direction:row;align-items:center;gap:9px}
.switches select {max-width:520px}
.check {display:inline-flex;gap:6px;align-items:center;margin:5px 13px 5px 0}
fieldset {margin:10px 0;padding:8px 12px;border:1px solid var(--line);border-radius:8px;min-width:0}
.daily-fieldset {padding:0;margin:0;border:0}
form:not(.edit-form) input[type=file] {width:min(560px,100%)}
#people-search {width:min(420px,100%)}
.form-actions {display:flex;justify-content:flex-start;gap:6px;margin-top:12px}
.hint,.muted,.empty {color:var(--muted);font-size:13px}
.hint,.empty {margin:9px 0}
.review-note dt {font-weight:700;color:var(--navy);margin:12px 0 5px}
.review-note dd {margin:0;white-space:pre-wrap}
dialog {width:min(800px,85vw);max-height:86vh;overflow:auto;border:1px solid var(--line);border-radius:14px;padding:20px 23px;
  background:white;color:var(--ink);box-shadow:0 14px 45px #0f1b3328}
dialog::backdrop {background:#0f1b3352}
.dialog-head {display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:14px}
.dialog-head button {font-size:20px;line-height:1;padding:4px 9px}
#toast {position:fixed;right:26px;bottom:22px;z-index:8;padding:10px 16px;border-radius:9px;background:var(--dark);color:#fff;
  max-width:480px;box-shadow:0 5px 18px #0f1b3328}

.sr-only {position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
.directory-grid {display:grid;grid-template-columns:300px minmax(0,1fr);gap:16px;align-items:start}
.directory-sidebar {display:flex;flex-direction:column;min-width:0;height:clamp(430px,calc(100vh - 190px),830px);margin:0;padding:13px}
.directory-search {display:flex;align-items:center;gap:8px;margin-bottom:10px}
.directory-search label,.directory-search input {width:100%;min-width:0}
.directory-search input {padding:7px 10px}
.directory-tree {flex:1;overflow:auto;border-top:1px solid var(--line);padding:6px 0}
.directory-row {display:flex;align-items:center;gap:2px;border-radius:7px;padding-left:calc(var(--tree-depth,0) * 12px)}
.directory-row:hover,.directory-row:focus-within {background:var(--thead)}
.directory-row.selected {background:#f7efdf;box-shadow:inset 3px 0 var(--gold)}
.directory-row.matched .directory-select {font-weight:700;color:var(--gold-text)}
.directory-select {border:0;border-radius:7px;min-width:0;flex:1;text-align:left;color:var(--navy);background:transparent;padding:7px 5px}
.directory-row .directory-select {display:flex;align-items:center;gap:6px}
.directory-row .directory-select span:first-child {min-width:0;overflow:hidden;text-overflow:ellipsis}
.directory-select:hover {background:transparent}
.directory-row button.disclosure,.directory-menu {border:0;background:transparent;padding:0;width:23px;flex:0 0 23px}
.directory-menu {opacity:0}
.directory-row:hover .directory-menu,.directory-row:focus-within .directory-menu,.directory-menu[aria-expanded="true"] {opacity:1}
.tree-spacer {flex:0 0 23px}
.review-dot {width:7px;height:7px;flex:0 0 7px;border-radius:50%;background:var(--gold)}
.directory-menu-items,.directory-actions {display:flex;align-items:center;flex-wrap:wrap;gap:6px}
.directory-menu-items {padding:4px 2px 7px 18px}
.directory-menu-items button {padding:3px 7px;font-size:12px}
.directory-groups {display:grid;border-top:1px solid var(--line);padding-top:8px}
.directory-groups button[aria-current="true"] {background:#f7efdf;box-shadow:inset 3px 0 var(--gold)}
.directory-main {min-width:0;margin:0}
.directory-main .section-head {justify-content:space-between}
.directory-lead {display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:7px 0 13px;color:var(--sub)}
.directory-actions {margin:10px 0;color:var(--sub)}
.directory-actions span {margin-left:5px}
.directory-members label.check {float:right}
.directory-members .table-wrap {clear:both;margin-top:9px}
.directory-members table {min-width:770px}
.directory-members td:last-child {min-width:130px}
.directory-phone {white-space:nowrap}
.directory-members td .pill {margin:0 0 3px 5px}
.audit-filters {display:flex;align-items:end;flex-wrap:wrap;gap:8px;margin-bottom:15px}
.audit-filters .field {margin:0}
.audit-filters .form-actions {margin:0}
.audit-status {font-weight:600;margin:12px 0}
.audit-details {max-width:650px}
.audit-details ul {padding-left:19px}
.audit-details p,.audit-details li {overflow-wrap:anywhere}
.activation-explanation {max-width:840px;color:var(--sub);padding:0 0 8px}
.activation-explanation h3 {font-size:15px;color:var(--navy);margin:12px 0 4px}
.activation-explanation ul {margin:0 0 10px;padding-left:22px}
.activation-current {color:var(--navy);font-weight:600;margin:8px 0}
