/* Suite Monkey admin. Uses the Stacked tokens (public/tokens.css): Public Sans, ink, gray canvas, white surfaces. */
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;background:var(--canvas);color:var(--ink);font:400 13px/20px var(--font-ui);font-variant-numeric:tabular-nums}
a{color:inherit}
h1,h2,h3,h4,p{margin:0}
button,input,select,textarea{font:inherit;color:inherit}
:focus-visible{outline:2px solid var(--ink);outline-offset:2px}
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.skip{position:absolute;left:12px;top:-40px;background:var(--ink);color:#fff;padding:6px 10px;border-radius:6px;z-index:10}
.skip:focus{top:10px}
.muted{color:var(--text-muted)}

/* Top bar */
.topbar{height:52px;display:flex;align-items:center;gap:16px;padding:0 20px;background:var(--surface);border-bottom:1px solid var(--border);position:sticky;top:0;z-index:5}
.brand{display:flex;align-items:center;gap:8px;text-decoration:none;font-weight:600;font-size:14px}
.brand-area{font-weight:500;color:var(--text-2)}

/* Shell */
.shell{display:grid;grid-template-columns:196px minmax(0,1fr);min-height:calc(100vh - 52px)}
.sidebar{padding:16px 10px;border-right:1px solid var(--border);display:flex;flex-direction:column;gap:2px;position:sticky;top:52px;height:calc(100vh - 52px)}
.sidebar a{display:block;padding:7px 10px;border-radius:6px;text-decoration:none;color:var(--text-2);font-weight:500}
.sidebar a:hover{background:var(--hover-2)}
.sidebar a[aria-current]{background:var(--surface);color:var(--ink);box-shadow:inset 0 0 0 1px var(--border)}
main{padding:24px 32px 64px;max-width:1280px;width:100%;outline:none}
.page-head{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:18px}
h1{font-size:24px;line-height:32px;font-weight:600;letter-spacing:-.01em}
.crumb{display:inline-block;margin-bottom:6px;color:var(--text-muted);text-decoration:none;font-weight:500}
.crumb::before{content:'‹ '}
.crumb:hover{color:var(--ink)}

/* Blocks */
.block{background:var(--surface);border:1px solid var(--border);border-radius:10px;margin-bottom:16px;min-width:0}
.block-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 18px 10px}
h2{font-size:15px;line-height:22px;font-weight:600}
.two{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px;align-items:start}
.two>.block{margin-bottom:16px}
.foot{padding:10px 18px 14px;color:var(--text-muted);font-size:12px;border-top:1px solid var(--divider)}
.empty{padding:16px 18px 18px;color:var(--text-muted)}
.scroll{overflow-x:auto}
.scroll:focus-visible{outline-offset:-2px}

/* Spreadsheet-style tables */
.sheet{width:100%;border-collapse:collapse}
.sheet th,.sheet td{padding:9px 18px;text-align:left;vertical-align:top;border-top:1px solid var(--divider)}
.sheet thead th{background:var(--surface-sunk);color:var(--text-muted);font-weight:500;font-size:12px;line-height:16px;white-space:nowrap;border-top:1px solid var(--border);border-bottom:1px solid var(--border)}
.sheet tbody th{font-weight:600}
.sheet tbody th a{text-decoration:none}
.sheet tbody th a:hover{text-decoration:underline}
.sheet tfoot th,.sheet tfoot td{background:var(--surface-sunk);border-top:1px solid var(--border);font-weight:600}
.sheet tbody tr:hover{background:var(--hover)}
.sheet .num{text-align:right;white-space:nowrap}

/* Buttons */
button{cursor:pointer;height:32px;padding:0 12px;border-radius:6px;border:1px solid var(--control);background:var(--surface);font-weight:500}
button:hover{border-color:var(--control-strong)}
button.primary{background:var(--ink);border-color:var(--ink);color:#fff}
button.primary:hover{background:var(--ink-hover)}
button.link{border:0;height:auto;padding:0;background:none;text-decoration:underline}
button:disabled{opacity:.5;cursor:default}

/* Overview */
.trend{padding:0 18px 16px}
.todo{list-style:none;margin:0;padding:0}
.todo li{border-top:1px solid var(--divider)}
.todo a,.todo li>div{display:block;padding:9px 18px;text-decoration:none}
.todo a:hover{background:var(--hover)}
.todo strong{display:block;font-weight:600}
.todo span{display:block;color:var(--text-muted);font-size:12px;line-height:16px}

/* Organization detail */
.facts{display:flex;flex-wrap:wrap;gap:0;margin:0 0 16px;background:var(--surface);border:1px solid var(--border);border-radius:10px}
.facts>div{padding:12px 18px;border-right:1px solid var(--divider);min-width:150px}
.facts>div:last-child{border-right:0}
.facts dt{color:var(--text-muted);font-size:12px;line-height:16px}
.facts dd{margin:2px 0 0;font-weight:600}
.facts dd a{font-weight:500}
.tabs{display:inline-flex;gap:2px;padding:3px;background:var(--seg-track);border-radius:8px;margin-bottom:12px}
.tabs button{height:28px;border:0;background:none;color:var(--text-2)}
.tabs button[aria-selected="true"]{background:var(--surface);color:var(--ink);box-shadow:0 1px 2px rgb(var(--ink-rgb)/.08)}
.tab-body{background:var(--surface);border:1px solid var(--border);border-radius:10px;overflow:hidden}
.tab-body .facts{border:0;margin:0}
.tab-body>.foot{border-top:1px solid var(--divider)}

/* Filters and forms */
.filters{display:flex;flex-wrap:wrap;gap:12px;margin-bottom:14px}
.filters label,.form label{display:flex;flex-direction:column;gap:4px;font-size:12px;font-weight:500;color:var(--text-2)}
input[type=search],input[type=date],input:not([type]),select,textarea{height:34px;padding:0 10px;border:1px solid var(--control);border-radius:6px;background:var(--surface);font-size:13px;color:var(--ink)}
input[type=search]{min-width:240px}
input:hover,select:hover,textarea:hover{border-color:var(--control-strong)}
.form{display:flex;flex-direction:column;gap:12px;padding:0 18px 18px}
.form-error{color:var(--danger);font-size:12px;min-height:0}
.form-error:empty{display:none}

/* Phone */
@media (max-width:820px){
 .topbar{padding:0 12px;gap:10px}
 .brand{white-space:nowrap}
 .shell{display:block}
 .sidebar{display:flex;position:static;height:auto;border-right:0;border-bottom:1px solid var(--border);background:var(--surface);padding:8px}
 main{padding:18px 16px 48px}
 h1{font-size:20px;line-height:28px}
 .two{grid-template-columns:1fr}
 .facts>div{flex:1 1 45%;border-right:0;border-bottom:1px solid var(--divider)}
 input[type=search]{min-width:0;width:100%}
 .filters label{flex:1 1 140px}
}

.staff-role{margin-left:auto}.auth{max-width:430px;margin:60px auto;padding:24px}.auth .page-head{margin-bottom:22px}.auth .form{padding:0}.auth>button{margin-top:14px}.auth input{height:36px;border:1px solid var(--control);border-radius:6px;padding:0 10px;background:var(--surface)}.auth img{max-width:100%;display:block}.auth h1{margin-bottom:16px}.auth .form-error{margin-top:12px}.weekly{display:flex;gap:12px;height:180px;align-items:end}.week{display:flex;flex-direction:column;align-items:center;gap:5px;flex:1;min-width:0;font-size:11px}.week meter{writing-mode:vertical-lr;direction:rtl;width:22px;height:110px}.week meter::-webkit-meter-bar{background:var(--divider);border:0}.week meter::-webkit-meter-optimum-value{background:var(--ink)}
@media(max-width:820px){.sidebar{display:flex;flex-direction:row;flex-wrap:wrap}.topbar{height:auto;min-height:52px;flex-wrap:wrap;padding:10px 12px}.brand{font-size:12px}.staff-role{font-size:12px}.auth{margin:20px auto}.weekly{gap:4px}.week span{font-size:10px}.sheet{min-width:620px}.tabs{max-width:100%}.shell{min-height:0}}

@media(max-width:820px){.auth input,.auth button{min-height:44px;font-size:16px}.auth .form label{font-size:14px}}
.rollout-note{margin:12px 0;max-width:78ch}.access-summary{padding:18px;border-bottom:1px solid var(--border)}.access-summary p{margin:8px 0;max-width:78ch}.sheet td p{max-width:30ch}.rollout-dialog{width:min(860px,calc(100% - 24px));max-height:calc(100dvh - 24px);overflow:auto;padding:24px;border:1px solid var(--border);border-radius:10px;background:var(--surface);color:var(--ink)}.rollout-dialog::backdrop{background:#1d273380}.dialog-head{display:flex;justify-content:space-between;gap:12px;margin-bottom:16px}.rollout-dialog p{margin:12px 0;max-width:78ch}.rollout-dialog .form{padding:0;margin-top:18px}.rollout-dialog input,.rollout-dialog textarea{width:100%;min-height:36px;padding:8px;border:1px solid var(--control);border-radius:6px}.rollout-dialog textarea{min-height:90px}.rollout-dialog [role=alert]{color:var(--danger)}.review-metadata{overflow-wrap:anywhere}.review-metadata>div{display:grid;grid-template-columns:1fr 2fr;border-bottom:1px solid var(--border);padding:6px 0}.review-metadata dd{margin:0}.review-metadata dt{color:var(--text-muted)}#receipt-status:empty{display:none}#receipt-status{padding:10px 0}.tabs{display:flex;width:fit-content;flex-wrap:wrap}body{overflow-wrap:anywhere}@media(max-width:820px){.rollout-dialog{padding:16px}.rollout-dialog .two{display:block}.tabs button{padding:0 8px}.sidebar a{padding:7px 8px}}
/* Keep operational words intact in named phone scroll regions. */
.release-ledger .sheet{min-width:1040px}.access-ledger .sheet{min-width:1080px}.release-ledger .sheet td,.access-ledger .sheet td{overflow-wrap:normal;word-break:normal}.release-ledger .sheet td:first-child,.access-ledger .sheet td:first-child{min-width:155px}.release-ledger .sheet td:nth-child(2){min-width:140px}.release-ledger .sheet td:nth-child(3){min-width:120px}.release-ledger .sheet td:nth-child(4){min-width:130px}.release-ledger .sheet td:last-child{min-width:220px}.access-ledger .sheet td:nth-child(2){min-width:235px}.access-ledger .sheet td:nth-child(3){min-width:220px}.access-ledger .sheet td:last-child{min-width:350px}
/* Preserve the Area/action association at either horizontal scroll edge. */
.release-ledger .sheet,.access-ledger .sheet{isolation:isolate}
.release-ledger .sheet th:first-child,.release-ledger .sheet td:first-child,
.access-ledger .sheet th:first-child,.access-ledger .sheet td:first-child{position:sticky;left:0;min-width:155px;background:var(--surface);box-shadow:1px 0 0 var(--border);z-index:1}
.release-ledger .sheet thead th:first-child,.access-ledger .sheet thead th:first-child{background:var(--surface-sunk);z-index:2}
.release-ledger .sheet tbody tr:hover td:first-child,.access-ledger .sheet tbody tr:hover td:first-child{background:var(--hover)}
/* A fixed Area column and a scrollport-sized action pane share the phone width. */
.release-ledger .sheet,.access-ledger .sheet{table-layout:fixed}
.release-ledger .area-column,.access-ledger .area-column{width:155px}
.release-ledger .action-column{width:220px}.access-ledger .action-column{width:350px}
.release-ledger .sheet th:first-child,.release-ledger .sheet td:first-child,
.access-ledger .sheet th:first-child,.access-ledger .sheet td:first-child{width:155px;max-width:155px}
@media(max-width:820px){
 .release-ledger .scroll,.access-ledger .scroll{container-type:inline-size}
 .release-ledger .action-context,.access-ledger .action-context,
 .release-ledger th:last-child .column-label,.access-ledger th:last-child .column-label{display:block;width:min(180px,max(0px,calc(100cqw - 155px - 40px)));margin-left:auto;text-align:left}
 .release-ledger .action-context button,.access-ledger .action-context button{max-width:100%;height:auto;min-height:32px;white-space:normal;padding-top:6px;padding-bottom:6px}
 .release-ledger .action-context p,.access-ledger .action-context p{max-width:none;overflow-wrap:anywhere}
}
.policy-history .sheet td:nth-child(2){min-width:130px;white-space:nowrap;overflow-wrap:normal;word-break:normal}

/* Auth recovery follows the existing Public Sans, ink and white Admin form. */
.setup-description{color:var(--text-2);margin-bottom:18px}.setup-label{font-weight:600;margin:0 0 12px}.setup-choices{margin:0 0 18px;padding:12px;border:1px solid var(--border);border-radius:6px}.setup-choices legend{padding:0 4px}.setup-choices label{display:flex;align-items:center;gap:10px;min-height:44px;cursor:pointer}.auth .setup-choices input{height:20px;width:20px;min-height:20px}.setup-recovery{border-top:1px solid var(--divider);padding-top:18px;margin-top:20px}.setup-recovery p{margin-bottom:10px}.setup-help{margin-top:18px;padding:14px;background:var(--surface-sunk);border:1px solid var(--border);border-radius:6px}.setup-help p{margin-top:8px}.manual-key{font-family:monospace;overflow-wrap:anywhere;padding:12px 0}#enrollment{margin-bottom:18px}#enrollment img{width:240px;margin:0 auto 12px}.auth details summary{cursor:pointer;min-height:44px;display:flex;align-items:center}

.setup-description{margin-bottom:18px}.setup-label{margin-bottom:12px;font-weight:500}.auth #verify+.setup-description{margin-top:12px}
