/* Operational admin surfaces: one workspace, compact summary, filters, records.
   Module tints identify sections; warning colors always retain a text label. */
:root {
  --primary:#2864ba;
  --ink:#303846;
  --muted:#707b89;
  --line:#dfe4eb;
  --canvas:#f0f2f5;
  --sidebar:192px;
  --nav-bg:#263446;
  --nav-ink:#c3cbd6;
  --header-height:50px;
  --history-height:34px;
  --module-tint:#f3f6fa;
  --module-accent:#4a6e9e;
  font:14px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;
  color:var(--ink);
  background:var(--canvas);
}
* { box-sizing:border-box; }
body { margin:0; min-width:280px; }
[hidden],.workspace-background { display:none!important; }
button,input,select,textarea { font:inherit; }
button { border:1px solid transparent; border-radius:3px; padding:4px 12px; min-height:32px; background:var(--primary); color:#fff; cursor:pointer; margin:0; line-height:1.5; }
button:hover:not(:disabled) { background:#20539c; }
button.secondary { background:#fff; color:#4e5969; border-color:#d3d8df; }
button.secondary:hover:not(:disabled) { color:var(--primary); border-color:#8ca8d0; background:#f5f8fd; }
button:disabled { opacity:.5; cursor:not-allowed; }
button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible,a:focus-visible { outline:3px solid #89b4ed; outline-offset:2px; }
h1,h2,h3 { color:var(--ink); font-weight:600; }
h1 { font-size:18px; margin:0; } h2 { font-size:15px; margin:0; } h3 { font-size:14px; }
label { display:block; margin:14px 0; color:#536176; line-height:1.7; }
input,textarea,select { display:block; width:100%; margin-top:6px; padding:6px 10px; min-height:32px; color:var(--ink); border:1px solid #cdd5e0; border-radius:3px; background:#fff; }
textarea { min-height:80px; resize:vertical; }
input[type=checkbox] { accent-color:var(--primary); min-height:0; }
fieldset { min-width:0; border:1px solid var(--line); border-radius:4px; }
.muted { color:var(--muted); line-height:1.7; }
.danger { color:#b43d35; font-weight:600; }
.success { color:#32735b; }
.notice { padding:10px 13px; border:1px solid #e5ddc9; border-radius:4px; color:#74603d; background:#fffaf0; font-size:12px; line-height:1.8; }
.card { background:#fff; border:1px solid var(--line); border-radius:3px; padding:20px; margin-bottom:16px; min-width:0; }
.bar { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:10px; }
.bar>div:last-child:has(button) { display:flex; flex-wrap:wrap; gap:8px; }
.actions { display:flex; justify-content:flex-end; flex-wrap:wrap; gap:8px; margin-top:18px; padding-top:16px; border-top:1px solid var(--line); }
.table-wrap { max-width:100%; overflow-x:auto; scrollbar-width:thin; border:1px solid var(--line); border-radius:3px; }
table { border-collapse:collapse; width:100%; text-align:left; }
th { background:#eef1f5; color:#596575; font-weight:500; white-space:nowrap; }
td,th { padding:9px 14px; border-bottom:1px solid #e9edf2; font-size:13px; vertical-align:middle; line-height:1.5; }
th+th { border-left:0; }
td small { display:block; color:var(--muted); font-size:12px; margin-top:3px; font-weight:400; }
tbody tr:last-child td { border-bottom:0; }
tbody tr:nth-child(even) { background:#fcfdfe; }
tbody tr:hover { background:#f2f6fd; }
tbody tr.warning { background:#fffbf3; }
.numeric { text-align:right; font-variant-numeric:tabular-nums; white-space:nowrap; }
.badge,.subtle-pill { display:inline-block; padding:1px 6px; background:#edf1f6; color:#5c6d83; font-size:11px; border-radius:3px; font-weight:400; }
.state-pill { display:inline-flex; align-items:center; padding:2px 7px; border:1px solid #dce2eb; border-radius:3px; font-size:12px; color:#5b687a; background:#f4f6f9; white-space:nowrap; }
.state-pill.active { color:#30704d; background:#eff7f2; border-color:#d3e8dc; }
.state-pill.suspended { color:#a2463e; background:#fcf1ef; border-color:#efd7d3; }
.management-row-actions { white-space:nowrap; position:sticky; right:0; background:#fff; box-shadow:-1px 0 #e0e6ee; z-index:1; }
th.management-row-actions { background:#eef1f5; }
#managementRows tr:hover .management-row-actions { background:#f2f6fd; }
#managementRows td:not(.management-empty) { white-space:nowrap; }
.management-row-actions button+button { margin-left:6px; }
.management-empty { text-align:center; color:#718096; padding:28px; }
.management-context { display:flex; align-items:baseline; flex-wrap:wrap; gap:6px 12px; padding:0 0 14px; font-size:12px; color:var(--muted); }
.management-context strong { color:var(--ink); font-size:14px; font-weight:600; }
.management-context code { font-size:12px; overflow-wrap:anywhere; }
.management-context #managementSiteDomain { overflow-wrap:anywhere; }
.management-readonly { margin-left:auto; color:#397965; }
.management-tabs { overflow-x:auto; scrollbar-width:thin; }
.management-tabs button { flex:none; white-space:nowrap; }
.management-query-view { min-width:0; }
.management-query-view>form.bar { justify-content:flex-start; align-items:flex-end; gap:12px 20px; padding:14px 16px; margin:16px 0 10px; background:#f5f7f9; border:1px solid var(--line); }
.management-query-view>form.bar label { display:flex; align-items:center; gap:10px; margin:0; font-size:13px; }
.management-query-view>form.bar input,.management-query-view>form.bar select { width:190px; margin:0; font-size:13px; }
.management-query-hint { margin:10px 0 6px; color:var(--muted); font-size:12px; }
#managementStatus { color:var(--muted); font-size:12px; overflow-wrap:anywhere; margin:6px 0 14px; }
#managementStatus:empty { display:none; }
.management-identity { font-variant-numeric:tabular-nums; }
.management-table-scroll { max-height:60dvh; overflow:auto; }
.management-table-scroll:focus-visible { outline:2px solid #89b4ed; outline-offset:2px; }
.management-table-scroll th { position:sticky; top:0; z-index:2; }
.management-table-scroll th.management-row-actions { z-index:3; }
.management-pagination { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:10px; padding:12px 0 0; color:var(--muted); font-size:12px; }
.management-pagination>div { display:flex; gap:8px; }
.management-query-view[data-kind=SUMMARY] .management-pagination { display:none; }
.management-query-view[data-kind=SUMMARY]>form.bar { padding:0; background:transparent; border:0; justify-content:flex-end; margin:10px 0; }
.management-query-view[data-kind=SUMMARY] th { width:33.33%; }
.management-query-view[data-kind=SUMMARY] td { font-size:24px; font-weight:500; padding:18px 14px; font-variant-numeric:tabular-nums; }
.management-query-view[data-kind=SUMMARY] td+td,.management-query-view[data-kind=SUMMARY] th+th { border-left:1px solid var(--line); }
@media(max-width:640px) {
  .management-query-view>form.bar label { width:100%; justify-content:space-between; gap:8px; }
  .management-query-view>form.bar input,.management-query-view>form.bar select { width:min(190px,65%); min-width:0; }
  .management-readonly { margin-left:0; }
  .management-query-view[data-kind=SUMMARY] th { white-space:normal; padding:9px; }
  .management-query-view[data-kind=SUMMARY] td { font-size:21px; padding:14px 9px; }
}
.recovery-report-import { border:1px solid var(--line); padding:12px 16px; background:#f8f9fb; }
.recovery-report-import summary,#recoveryReportsDetail summary { cursor:pointer; color:#536176; }
.recovery-report-import textarea[name=receiptJson] { max-height:200px; font-family:monospace; font-size:12px; }
.recovery-report-pager { margin:12px 0 22px; color:var(--muted); font-size:12px; }
.recovery-report-detail-head { border-top:1px solid var(--line); margin-top:20px; padding-top:8px; }
.recovery-report-facts { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); margin:0 0 14px; background:#f5f7fa; border:1px solid var(--line); }
.recovery-report-facts>div { min-width:0; padding:10px 14px; }
.recovery-report-facts dt { font-size:12px; color:var(--muted); }
.recovery-report-facts dd { margin:4px 0 0; overflow-wrap:anywhere; }
.recovery-report-note { padding:14px 16px; background:#f7f9fc; border:1px solid var(--line); margin:18px 0; }
.recovery-report-note-fields { display:grid; grid-template-columns:minmax(140px,1fr) 3fr; gap:16px; }
.recovery-report-note-fields label { margin:0; }
.recovery-report-check { display:flex; gap:8px; align-items:flex-start; }
.recovery-report-check input { width:auto; margin-top:6px; }
#recoveryReportsDetailIdentity { white-space:pre-wrap; overflow-wrap:anywhere; }
#recoveryReportsIssueSelection,#recoveryReportsUnverified { overflow-wrap:anywhere; }
#recoveryReportsPanel td { max-width:440px; overflow-wrap:anywhere; }
#recoveryReportsPanel table { min-width:680px; }
#recoveryReportsPanel td:first-child,#recoveryReportsPanel td:last-child { white-space:nowrap; }
@media(max-width:900px) { .recovery-report-facts { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:640px) { .recovery-report-note-fields,.recovery-report-facts { grid-template-columns:1fr; } }
.withdrawal-review-query { display:grid; grid-template-columns:1fr 1fr auto; align-items:end; gap:12px; padding-bottom:16px; }
.withdrawal-review-query label { margin:0; }
.withdrawal-review-facts { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); border:1px solid var(--line); background:#f6f8fb; margin:0 0 18px; }
.withdrawal-review-facts:empty { display:none; }
.withdrawal-review-facts>div { padding:10px 14px; border-bottom:1px solid var(--line); min-width:0; }
.withdrawal-review-facts dt { color:var(--muted); font-size:12px; }
.withdrawal-review-facts dd { margin:4px 0 0; overflow-wrap:anywhere; font-variant-numeric:tabular-nums; }
.withdrawal-review-decision { display:grid; grid-template-columns:minmax(200px,1fr) 2fr; gap:16px; }
.withdrawal-review-decision label { margin:0; }
.withdrawal-review-consent { display:flex; align-items:flex-start; gap:8px; }
.withdrawal-review-consent input { display:inline-block; width:auto; flex:none; margin-top:5px; }
.withdrawal-review-effect { padding:10px 12px; border-left:3px solid #b58b45; background:#fffaf0; color:#775c32; }
.withdrawal-review-effect:empty { display:none; }
.withdrawal-review-pending { margin-top:16px; padding:14px; border:1px solid #ddc99f; background:#fffbf3; }
.withdrawal-review-pending h3 { margin:0; }
#withdrawalReviewPendingText { white-space:pre-wrap; }
#withdrawalReviewPendingText,#withdrawalReviewStatus,#withdrawalReviewHistoryStatus { overflow-wrap:anywhere; }
#withdrawalReviewHistory td { min-width:100px; max-width:300px; overflow-wrap:anywhere; }
#withdrawalReviewHistory td:first-child { min-width:170px; }
@media(max-width:700px) {
  .withdrawal-review-query,.withdrawal-review-decision { grid-template-columns:1fr; }
  .withdrawal-review-facts { grid-template-columns:repeat(2,minmax(0,1fr)); }
  #managementRows .management-row-actions { white-space:normal; min-width:112px; width:112px; max-width:112px; }
  .management-row-actions button { display:block; white-space:nowrap; }
  .management-row-actions button+button { margin:4px 0 0; }
}
.credit-alert,.warning-metric>strong { color:#9b6321; }
.credit-alert small { color:#9b6321; }
.text-button { background:transparent; border:0; padding:5px 0; color:var(--primary); }
.text-button:hover:not(:disabled) { background:transparent; color:#173f80; text-decoration:underline; }
.empty-state { text-align:center; color:var(--muted); padding:30px 16px; line-height:1.8; }
.empty-state strong { display:block; font-weight:500; }
.metrics { margin:14px 0; }
.metric-facts { display:grid; grid-template-columns:repeat(auto-fit,minmax(160px,1fr)); margin:0; background:#f7f8f9; border:1px solid var(--line); }
.metric-facts>div { min-width:0; padding:10px 14px; border-right:1px solid var(--line); }
.metric-facts>div:last-child { border-right:0; }
.metric-facts dt { color:var(--muted); font-size:12px; }
.metric-facts dd { margin:6px 0 0; font-size:18px; font-weight:500; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
#message { white-space:pre-wrap; overflow-wrap:anywhere; }
#message:empty { display:none; }
#message:not(:empty) { padding:10px 14px; background:#f0f7f3; color:#32735b; border:1px solid #d5e7db; border-radius:4px; }
#message.error { background:#fff4f2; color:#a43a32; border-color:#ead0cb; }
#creditRequest { overflow-wrap:anywhere; }
.history-context { display:flex; flex-wrap:wrap; align-items:center; gap:6px 12px; padding:12px 0; font-size:12px; color:var(--muted); }
.history-context strong { font-size:14px; color:var(--ink); font-weight:600; }
.history-context code,.history-context span { overflow-wrap:anywhere; }
.history-readonly { color:#397965; margin-left:auto; }
.history-hint { padding:9px 12px; margin:12px 0; background:#f5f7f9; border-left:3px solid #a4b5ca; font-size:12px; color:#647184; }
.history-status,.history-read-at { font-size:12px; color:var(--muted); margin:10px 0; }
.history-status.danger { color:#b43d35; }
.history-status:empty,.history-read-at:empty { display:none; }
.history-table-scroll { max-height:58dvh; overflow:auto; }
.history-table-scroll table { min-width:850px; }
.history-table-scroll th { position:sticky; top:0; z-index:1; }
.history-time { white-space:nowrap; font-variant-numeric:tabular-nums; }
.history-actor { min-width:100px; max-width:170px; overflow-wrap:anywhere; }
.history-change { font-weight:600; }
.history-change.positive { color:#32735b; }
.history-change.negative { color:#b43d35; }
.history-detail { min-width:220px; max-width:480px; overflow-wrap:anywhere; }
.history-action { min-width:170px; max-width:240px; overflow-wrap:anywhere; }
.history-detail details { margin:4px 0; }
.history-detail summary { color:var(--primary); cursor:pointer; font-size:12px; }
.history-detail pre { white-space:pre-wrap; overflow-wrap:anywhere; margin:6px 0; padding:10px; font:12px/1.7 monospace; background:#f4f6f9; border:1px solid var(--line); }
.history-pagination { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:10px; padding-top:12px; color:var(--muted); font-size:12px; }
.history-pagination>div { display:flex; gap:8px; }
@media(max-width:640px) { .history-readonly { margin-left:0; } .history-context { gap:6px 10px; } }

/* Existing module-specific sizing and safe confirmation forms. */
pre#provisionManifest{white-space:pre-wrap;overflow-wrap:anywhere;background:#f3f6fb;padding:14px;border-radius:8px;font-size:12px;line-height:1.7}
.activation-observations{display:grid;grid-template-columns:1fr 1fr;gap:16px}.activation-observations>div{min-width:0;background:#f3f6fb;border:1px solid #dde3ed;border-radius:8px;padding:12px 16px}.activation-observations h3{margin:4px 0}#activationPanel p{overflow-wrap:anywhere;white-space:pre-line;line-height:1.7}#activationPanel form{max-width:780px}#activationForm label:has(input[type=checkbox]){display:flex;gap:8px;align-items:flex-start}#activationForm input[type=checkbox]{width:auto;flex:0 0 auto;margin-top:4px}#activationForm .actions{flex-wrap:wrap}@media(max-width:650px){.activation-observations{grid-template-columns:1fr}}
.deployment-identity{overflow-wrap:anywhere;font:13px/1.7 monospace}#deploymentPanel form{max-width:720px}#deploymentPanel table{min-width:1080px}#deploymentRows td:nth-child(5),#deploymentRows td:nth-child(6){font-family:monospace;min-width:180px;max-width:240px;overflow-wrap:anywhere;white-space:normal}#deploymentForm label:has(input[type=checkbox]){display:flex;align-items:flex-start;gap:8px}#deploymentForm input[type=checkbox]{width:auto;flex:0 0 auto;margin-top:4px}
#provisionJobForm{max-width:800px}#provisionJobForm label:has(input[type=checkbox]){display:flex;align-items:flex-start;gap:8px}#provisionJobForm input[type=checkbox]{width:auto;flex:0 0 auto;margin-top:5px}#provisionJobReviewers{line-height:1.7;overflow-wrap:anywhere}
#fencePanel form{max-width:800px}#fenceForm textarea[name=receiptJson]{font:12px/1.5 monospace;min-height:140px;overflow-wrap:anywhere}#fenceForm label:has(input[type=checkbox]){display:flex;gap:8px;align-items:flex-start}#fenceForm input[type=checkbox]{width:auto;flex:0 0 auto;margin-top:4px}#fencePanel table{min-width:1250px}#fenceRows td{min-width:150px;max-width:250px;overflow-wrap:anywhere;white-space:normal}#fenceRows td:nth-child(n+5){font-family:monospace}#fenceResult{line-height:1.7;overflow-wrap:anywhere}
#recoveryPanel form{max-width:760px}#recoveryStatus{overflow-wrap:anywhere;line-height:1.7}#recoveryPanel table{min-width:1000px}#recoveryRows td{min-width:130px;max-width:230px;overflow-wrap:anywhere;white-space:normal}#recoveryRows td:nth-child(n+4){font-family:monospace;min-width:190px}#recoveryForm label:has(input[type=checkbox]){display:flex;align-items:flex-start;gap:8px}#recoveryForm input[type=checkbox]{width:auto;flex:0 0 auto;margin-top:4px}
#reportEvidenceDialog{width:min(1100px,96vw)}#reportEvidenceDialog td{min-width:150px;overflow-wrap:anywhere;max-width:340px}#reportEvidenceIdentity,#reportEvidencePositions{overflow-wrap:anywhere}#reportEvidenceTotals{grid-template-columns:repeat(auto-fit,minmax(160px,1fr))}#reportEvidenceTotals .card{margin-bottom:0}#reportEvidencePositions details{margin:12px 0;padding:12px;border:1px solid #dde3ed;border-radius:8px}#reportEvidencePositions summary{cursor:pointer;line-height:1.7}
#catalogGames td small{overflow-wrap:anywhere;max-width:380px}#catalogAuditContent{white-space:pre-wrap;overflow-wrap:anywhere;max-height:360px;overflow:auto;background:#f3f6fb;padding:14px;border-radius:3px}#catalogJobs p{font-size:12px;overflow-wrap:anywhere}
#gameCreditSummary{grid-template-columns:repeat(auto-fit,minmax(180px,1fr))}#gameCreditSummary .card{margin-bottom:0}#gameCreditSummary strong{overflow-wrap:anywhere}#gameCreditBody td{min-width:125px}#gameCreditBody small{max-width:240px;overflow-wrap:anywhere}#gameCreditReconciliation{line-height:1.7}.success{color:#1c7150}
#lotteryMutationForm input[type=checkbox]{display:inline-block;width:auto;margin:0 8px 0 0;vertical-align:middle}#lotteryScheduleFields{border:1px solid #dde3ed;border-radius:8px;padding:0 14px 10px}#lotteryHistory{overflow-wrap:anywhere;line-height:1.6}#lotteryHistory section+section{border-top:1px solid #dde3ed;padding-top:8px}#lotteryRows td{min-width:150px}#lotteryRequest{overflow-wrap:anywhere}
#rulesForm input[type=checkbox]{display:inline-block;width:auto;margin:0 8px 0 0}#rulesFields{border:1px solid #dde3ed;border-radius:8px;padding:12px}.rules-table{max-height:480px;overflow:auto}.rules-table th{position:sticky;top:0;z-index:1}.rules-table td:first-child{min-width:190px}.rules-table input:not([type=checkbox]){min-width:100px;margin:0}#rulesHistory pre{white-space:pre-wrap;overflow-wrap:anywhere;background:#f3f6fb;padding:12px}#rulesHistory section{border-top:1px solid #dde3ed}#rulesHistory p,#rulesStatus{overflow-wrap:anywhere}
#adminForm input[type=checkbox]{display:inline-block;width:auto;margin:0 8px 0 0;vertical-align:middle}#adminRows td{min-width:100px;overflow-wrap:anywhere;max-width:260px}#adminRows td:last-child{min-width:270px}#adminAuditRows td{overflow-wrap:anywhere;max-width:360px}#adminTitle{overflow-wrap:anywhere}
#mfaRecoverPanel summary{cursor:pointer;line-height:1.7}#mfaRecoverPanel p,#mfaRecoveryDialog p{line-height:1.7}#mfaRecoverForm input[type=checkbox],#mfaIssueForm input[type=checkbox]{display:inline-block;width:auto;margin:0 8px 0 0;vertical-align:middle}#mfaIssuedCodes{padding-left:24px;line-height:2.2}#mfaIssuedCodes code,#mfaSecret{overflow-wrap:anywhere}#mfaIssuedCodes code{font-size:13px}@media(max-width:650px){header{flex-wrap:wrap;gap:10px}#identity{overflow-wrap:anywhere;max-width:45vw}}
#memberActionForm{max-width:800px}#memberActionForm .check{display:flex;align-items:flex-start;gap:8px}#memberActionForm input[type=checkbox]{width:auto;flex:0 0 auto;margin-top:4px}#memberActionStatus,#memberActionSnapshot,#memberActionTitle{overflow-wrap:anywhere;line-height:1.7}#memberActionPanel table{min-width:1000px}#memberActionHistory td{min-width:120px;max-width:250px;overflow-wrap:anywhere;white-space:normal}
#memberActionPanel .actions{flex-wrap:wrap}#memberActionPanel .actions>button{white-space:nowrap}

#upgradePanel form { max-width:1000px; }
#upgradeForm textarea[name=planJson] { font:12px/1.6 monospace; min-height:125px; overflow-wrap:anywhere; }
#upgradeForm .check { display:flex; align-items:flex-start; gap:8px; font-size:12px; }
#upgradeForm input[type=checkbox] { width:auto; flex:none; margin-top:5px; }
#upgradePanel input[type=file] { font-size:12px; }
#upgradeRows td { max-width:240px; overflow-wrap:anywhere; }
#upgradePanel table { min-width:900px; }
#upgradeRequest,#upgradeError,#upgradeResult { overflow-wrap:anywhere; }
#releasePanel form { max-width:1000px; }
#releaseForm textarea[name=planJson] { font:12px/1.6 monospace; min-height:125px; overflow-wrap:anywhere; }
#releaseForm .check { display:flex; align-items:flex-start; gap:8px; font-size:12px; }
#releaseForm input[type=checkbox] { width:auto; flex:none; margin-top:5px; }
#releasePanel input[type=file] { font-size:12px; }
#releaseRows td { max-width:240px; overflow-wrap:anywhere; }
#releasePanel table { min-width:900px; }
#releaseRequest,#releaseError,#releaseResult { overflow-wrap:anywhere; }
#releaseEvidencePanel form { max-width:1000px; }
#releaseEvidenceForm textarea[name=receiptJson] { font:12px/1.6 monospace; min-height:140px; overflow-wrap:anywhere; }
#releaseEvidenceForm .check { display:flex; align-items:flex-start; gap:8px; font-size:12px; }
#releaseEvidenceForm input[type=checkbox] { width:auto; flex:none; margin-top:5px; }
#releaseEvidencePanel input[type=file] { font-size:12px; }
#releaseEvidencePanel table { min-width:900px; }
#releaseEvidenceRows td { max-width:240px; overflow-wrap:anywhere; }
#releaseEvidenceRequest,#releaseEvidenceError,#releaseEvidenceResult { overflow-wrap:anywhere; }
#handoffPanel form { max-width:1000px; }
#handoffForm .check { display:flex; align-items:flex-start; gap:8px; font-size:12px; }
#handoffForm input[type=checkbox] { width:auto; flex:none; margin-top:5px; }
#handoffRequest,#handoffError,#handoffResult { overflow-wrap:anywhere; }
#candidateActivationPanel form { max-width:1000px; }
#candidateActivationForm textarea[name=receiptJson] { font:12px/1.6 monospace; min-height:140px; overflow-wrap:anywhere; }
#candidateActivationForm .check { display:flex; align-items:flex-start; gap:8px; font-size:12px; }
#candidateActivationForm input[type=checkbox] { width:auto; flex:none; margin-top:5px; }
#candidateActivationPanel input[type=file] { font-size:12px; }
#candidateActivationRequest,#candidateActivationError,#candidateActivationResult { overflow-wrap:anywhere; }
.upgrade-facts { display:grid; grid-template-columns:150px minmax(0,1fr); border:1px solid var(--line); background:#fff; font-size:12px; }
.upgrade-facts dt,.upgrade-facts dd { margin:0; padding:8px 12px; border-bottom:1px solid var(--line); overflow-wrap:anywhere; }
.upgrade-facts dt { color:var(--muted); background:#f1f3f6; }
.upgrade-facts dd { font-family:monospace; }
.upgrade-facts dt:last-of-type,.upgrade-facts dd:last-of-type { border-bottom:0; }
@media(max-width:650px) { .upgrade-facts { grid-template-columns:110px minmax(0,1fr); } .upgrade-facts dt,.upgrade-facts dd { padding:7px 8px; } }

/* Navigation and page shell. */
.sidebar { position:fixed; inset:0 auto 0 0; z-index:40; width:var(--sidebar); background:var(--nav-bg); border-right:1px solid #223042; color:var(--nav-ink); display:flex; flex-direction:column; padding:0 0 12px; }
.brand { display:flex; align-items:center; gap:10px; height:var(--header-height); flex:none; padding:10px 18px; border-bottom:1px solid #ffffff12; text-decoration:none; color:#fff; font-size:15px; font-weight:600; background:#202c3c; }
.brand-mark { display:grid; place-items:center; width:24px; height:24px; flex:none; color:#afc4e2; }
.brand-mark svg { width:24px; height:24px; fill:none; stroke:currentColor; stroke-width:1.5; stroke-linecap:round; stroke-linejoin:round; }
.sidebar nav { flex:1; overflow:auto; scrollbar-width:thin; scrollbar-color:#536176 transparent; padding:8px 0; }
.nav-group { padding:0 0 8px; border:0; margin:0; }
.nav-group+.nav-group { border-top:1px solid #ffffff0d; }
.nav-group:last-child { border-bottom:0; }
.nav-group>summary { display:flex; align-items:center; justify-content:space-between; list-style:none; padding:14px 18px 8px; color:#95a3b5; font-size:11px; cursor:pointer; }
.nav-group>summary::-webkit-details-marker { display:none; }
.nav-group>summary::after { content:''; width:5px; height:5px; border-right:1px solid currentColor; border-bottom:1px solid currentColor; transform:rotate(-45deg); }
.nav-group[open]>summary::after { transform:rotate(45deg); }
.nav-group>summary:hover { color:#fff; background:transparent; }
.nav-item { width:100%; display:flex; gap:10px; align-items:center; min-height:40px; padding:9px 18px 9px 15px; margin:0; background:transparent; border:0; border-left:3px solid transparent; border-radius:0; color:var(--nav-ink); font-size:13px; text-align:left; }
.nav-item:hover:not(:disabled) { background:#304158; color:#fff; }
.nav-item[aria-current=page] { background:#334b69; color:#fff; border-left-color:#71a9f2; font-weight:500; }
.nav-item[aria-current=page]:hover:not(:disabled) { background:#3b5473; color:#fff; }
.nav-icon { flex:none; width:17px; height:17px; fill:none; stroke:currentColor; stroke-width:1.6; stroke-linecap:round; stroke-linejoin:round; color:#b3c6df; }
.nav-item[aria-current=page] .nav-icon,.nav-item[aria-current=page] .nav-count { color:#d9e8fc; }
.nav-count { margin-left:auto; color:#c0cfe4; font-size:12px; }
.topbar { height:var(--header-height); position:sticky; top:0; z-index:25; margin-left:var(--sidebar); padding:0 20px; display:flex; align-items:center; gap:12px; background:#fff; border-bottom:1px solid var(--line); }
.breadcrumb { display:flex; gap:12px; min-width:0; flex:1; color:var(--muted); white-space:nowrap; font-size:14px; }
.breadcrumb>span { color:#c0c7d2; }
.breadcrumb strong { min-width:0; overflow:hidden; text-overflow:ellipsis; color:var(--ink); font-weight:500; }
.topbar-account { margin-left:auto; flex:none; display:flex; gap:12px; align-items:center; font-size:12px; }
.account-avatar { display:grid; place-items:center; width:26px; height:26px; border-radius:50%; background:#edf0f3; color:#637181; font-size:12px; }
.topbar-account:has(#identity:empty) .account-avatar { display:none; }
#identity { max-width:200px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:#526077; }
.topbar button.secondary { font-size:12px; border:0; background:transparent; padding:5px 2px; color:#617087; }
.topbar button.secondary:hover:not(:disabled) { color:var(--primary); background:transparent; text-decoration:underline; }
.icon-button { display:none; background:transparent; color:#53657e; border-color:#d9e0e9; padding:4px 8px; }
.icon-button:hover:not(:disabled) { background:#eef2f8; }
.workspace-history { position:sticky; top:var(--header-height); z-index:24; display:flex; align-items:stretch; height:var(--history-height); margin-left:var(--sidebar); padding:0 16px; background:#f8f9fb; border-bottom:1px solid var(--line); }
.workspace-tabs { display:flex; flex:1; min-width:0; overflow-x:auto; scrollbar-width:thin; }
.workspace-tab { display:flex; flex:none; min-width:0; max-width:300px; align-items:stretch; border-right:1px solid var(--line); border-bottom:2px solid transparent; }
.workspace-tab:first-child { border-left:1px solid var(--line); }
.workspace-tab:has([aria-current=page]) { border-bottom-color:var(--primary); background:#fff; }
.workspace-tab button { min-height:0; padding:5px 13px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:12px; font-weight:400; border:0; border-radius:0; color:#667181; background:transparent; }
.workspace-tab button:hover:not(:disabled) { background:#edf1f7; color:var(--primary); }
.workspace-tab button[aria-current=page] { color:var(--primary); }
.workspace-tab .workspace-tab-close { flex:none; width:26px; padding:0; font-size:16px; color:#7c8898; }
.workspace-shelf-toggle { display:flex; flex:none; align-items:center; gap:6px; margin-left:auto; padding:4px 12px; border:0; border-left:1px solid var(--line); border-radius:0; font-size:12px; color:#667181; background:#f8f9fb; }
.workspace-shelf-toggle:hover:not(:disabled) { background:#edf1f7; color:var(--primary); }
.workspace-shelf { position:fixed; inset:calc(var(--header-height) + var(--history-height) + 6px) 18px auto auto; margin:0; width:min(340px,calc(100vw - 24px)); max-height:calc(100dvh - 110px); overflow:auto; padding:0; color:var(--ink); background:#fff; border:1px solid var(--line); border-radius:3px; box-shadow:0 6px 18px #18283d20; }
.workspace-shelf-heading { display:flex; align-items:center; justify-content:space-between; padding:10px 14px; border-bottom:1px solid var(--line); background:#f5f7fa; font-size:13px; }
.workspace-shelf-heading button { min-height:26px; padding:0 5px; font-size:20px; color:var(--muted); background:transparent; }
.workspace-shelf-heading button:hover { color:var(--primary); background:#e9eef5; }
.workspace-shelf p { margin:0; padding:10px 14px; line-height:1.7; font-size:12px; color:var(--muted); border-bottom:1px solid var(--line); }
#workspaceShelfItems button { display:block; width:100%; padding:11px 14px; text-align:left; color:var(--ink); background:#fff; border:0; border-bottom:1px solid #edf0f4; border-radius:0; overflow-wrap:anywhere; font-size:13px; }
#workspaceShelfItems button:hover:not(:disabled) { color:var(--primary); background:#f2f6fc; }
main { margin-left:var(--sidebar); padding:16px 18px 28px; min-height:calc(100vh - var(--header-height) - var(--history-height)); scroll-margin-top:calc(var(--header-height) + var(--history-height)); outline:none; }
main>* { max-width:1600px; margin-left:auto; margin-right:auto; }
.overview,.site-directory,main section.card { scroll-margin-top:calc(var(--header-height) + var(--history-height) + 16px); outline:none; }
.deployment-notice { margin-top:16px; color:var(--muted); font-size:11px; border-top:1px solid var(--line); }
.deployment-notice summary { display:flex; align-items:center; flex-wrap:wrap; gap:6px 14px; padding:10px 0; list-style:none; cursor:pointer; }
.deployment-notice summary::-webkit-details-marker { display:none; }
.deployment-notice summary>span:first-child::before { content:'›'; display:inline-block; font-size:15px; margin-right:7px; }
.deployment-notice[open] summary>span:first-child::before { transform:rotate(90deg); }
.deployment-notice summary>span:last-child { margin-left:auto; color:#788496; }
.deployment-notice p { line-height:1.8; padding:0 10px; }
.preview-notice { display:flex; align-items:baseline; flex-wrap:wrap; gap:4px 14px; background:#f7f8fa; border:1px solid var(--line); border-left:3px solid #9ba9bb; border-radius:0; color:#687480; font-size:11px; line-height:1.6; padding:6px 10px; margin:0 0 12px; }
.preview-notice .preview-label { font-weight:600; color:#526174; }
.preview-notice .preview-translation { margin-left:auto; font-size:10px; color:#7c8590; }
.overview { background:transparent; border:0; }
.overview-tools { display:flex; align-items:center; flex-wrap:wrap; gap:8px; }
.overview-tools button { font-size:13px; }
.update-stamp { display:flex; align-items:center; gap:6px; font-size:11px; color:var(--muted); }
.status-dot { width:5px; height:5px; border-radius:50%; background:#96a1af; }
.update-stamp[data-loaded=true] .status-dot { background:#528873; }
.update-stamp[data-stale=true] { color:#956421; }
.update-stamp[data-stale=true] .status-dot { background:#b67b2b; }
.auto-refresh-control { font-size:11px; min-height:28px; white-space:normal; text-align:left; }
.auto-refresh-control[data-state=paused],.auto-refresh-control[data-state=idle],.auto-refresh-control[data-state=busy] { color:var(--muted); }
.auto-refresh-control[data-state=offline] { color:#956421; }
.refresh-overview { display:flex; align-items:center; gap:6px; font-size:12px; }
.overview-summary { border:1px solid var(--line); border-radius:3px; background:#fff; margin:0 0 14px; overflow:hidden; }
.overview-metrics { display:grid; grid-template-columns:1fr 1fr 1.4fr 1fr; background:#fff; border:0; margin:0; padding:16px 0; }
button.metric-card { position:relative; display:flex; flex-direction:row; align-items:center; justify-content:space-between; gap:12px; background:transparent; text-align:left; border:0; border-right:1px solid var(--line); border-radius:0; color:var(--ink); padding:0 20px; min-width:0; min-height:32px; }
button.metric-card:last-child { border-right:0; }
button.metric-card:hover:not(:disabled) { background:#f6f8fb; }
.metric-label { display:block; color:#59667a; font-size:13px; }
.metric-unit { margin-left:6px; color:#8391a4; font-size:10px; font-weight:400; }
.metric-card strong { display:block; font-size:22px; font-weight:600; font-variant-numeric:tabular-nums; line-height:1.3; margin:0; overflow-wrap:anywhere; min-width:0; }
#metricCredit strong { color:var(--ink); }
.portfolio { display:grid; grid-template-columns:auto minmax(0,1fr); padding:0; margin:0; background:#fff; border:1px solid var(--line); border-radius:3px; overflow:hidden; }
.portfolio>.snapshot-heading,.portfolio>.snapshot-table-wrap,.portfolio>.snapshot-footer { grid-column:1 / -1; min-width:0; }
.snapshot-heading { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:8px 12px; padding:10px 16px; background:#f8faff; border-bottom:1px solid var(--line); border-left:3px solid var(--module-accent); }
.snapshot-heading h2 { font-size:14px; }
.snapshot-heading h2,.module-heading h2,.directory-heading h2 { color:var(--ink); padding:0; }
.snapshot-heading .table-unit { margin:0; }
.snapshot-caption { color:var(--muted); font-size:11px; }
.portfolio>.bar { padding:10px 16px; min-height:52px; background:#fff; border-bottom:1px solid var(--line); border-radius:4px 4px 0 0; }
.portfolio>.bar h2,.directory-heading h2,.module-heading h2 { line-height:20px; font-size:14px; }
.portfolio>.bar>div { gap:8px; }
.portfolio>.bar button { font-size:13px; }
.portfolio .text-button,.attention .text-button { font-size:13px; padding:5px 0; }
.table-unit { font-size:11px; font-weight:400; color:var(--muted); margin-left:12px; white-space:nowrap; }
.attention { margin:0; background:#fffcf6; border:0; border-top:1px solid #eee6d7; }
.attention>summary { display:flex; align-items:center; gap:8px; padding:8px 16px; cursor:pointer; color:#87622d; background:#fffaf0; list-style:none; font-size:12px; }
.attention>summary::-webkit-details-marker { display:none; }
.warning-indicator { display:grid; place-items:center; width:15px; height:15px; border:1px solid #bb924e; border-radius:50%; font-size:10px; }
.attention #warningSummary { color:#8a714e; font-size:12px; }
.disclosure-arrow { margin-left:auto; font-size:16px; }
.attention[open] .disclosure-arrow { transform:rotate(180deg); }
.attention[data-warning=false] { border-top-color:var(--line); }
.attention[data-warning=false]>summary { background:#f5f7fa; color:#65778e; }
.attention[data-warning=false] #warningSummary { color:#738095; }
.attention[data-warning=false] .warning-indicator { border-color:#a9b4c3; }
.attention>.bar { padding:0 18px; border-top:1px solid var(--line); }
.attention .small-note { padding:10px 0; border:0; }
.snapshot-toolbar { display:flex; flex-wrap:wrap; align-items:center; gap:10px; background:#f6f7f9; padding:0 16px; border-bottom:1px solid var(--line); }
.status-legend { display:flex; flex-wrap:wrap; gap:18px; padding:0; border:0; }
.legend-row { display:flex; align-items:center; gap:6px; color:#676f7c; background:transparent; border:0; border-bottom:2px solid transparent; border-radius:0; padding:12px 0 10px; font-size:13px; }
button.legend-row:hover:not(:disabled) { background:transparent; color:var(--primary); }
.legend-row strong { min-width:19px; padding:0 5px; border-radius:3px; background:#f0f2f5; font-size:11px; font-weight:500; color:#647187; text-align:center; }
.legend-row[aria-pressed=true] { border-bottom-color:var(--primary); color:var(--primary); font-weight:600; }
.legend-row[aria-pressed=true] strong { color:var(--primary); background:#eaf1fc; }
.snapshot-query { display:flex; align-items:center; justify-content:flex-end; flex-wrap:wrap; gap:10px; padding:9px 16px; background:#f6f7f9; border-bottom:1px solid var(--line); }
.snapshot-search { display:flex; align-items:center; gap:12px; margin:0; }
.snapshot-query>button { font-size:13px; min-height:34px; }
.snapshot-search input { width:260px; min-height:34px; margin:0; font-size:13px; }
.snapshot-table-wrap { border:0; border-radius:0; }
.snapshot-table { min-width:910px; }
.snapshot-table td,.snapshot-table th { font-size:13px; padding:9px 16px; }
.snapshot-table .snapshot-name { font-weight:500; min-width:150px; max-width:210px; overflow-wrap:anywhere; }
.snapshot-table th { background:#eef1f5; font-size:12px; color:#5f6b7a; font-weight:500; padding-top:9px; padding-bottom:9px; }
.snapshot-table th+th { border-left:0; }
.snapshot-table td small { font-size:12px; color:#747e89; margin-top:3px; }
.snapshot-table .snapshot-name .site-name-link { padding:0; color:#303844; font-size:14px; font-weight:500; min-height:0; line-height:20px; text-decoration:none; }
.snapshot-table .site-name-link:hover { color:var(--primary); text-decoration:underline; }
.snapshot-table .credit-alert small { color:#9b6321; }
.snapshot-table .numeric { white-space:nowrap; }
.snapshot-table td:nth-child(5) { font-weight:600; }
.snapshot-table .text-button { min-height:28px; }
.snapshot-actions { white-space:nowrap; }
.snapshot-actions button+button { margin-left:8px; }
.snapshot-actions button:last-child { border-left:1px solid var(--line); padding-left:8px; }
.snapshot-actions button:last-child { color:#596b7e; }
.snapshot-table th:last-child,.snapshot-table td:last-child { position:sticky; right:0; background:#fff; border-left:1px solid var(--line); }
.snapshot-table th:last-child { background:#eef1f5; }
.snapshot-table tr:nth-child(even) td:last-child { background:#fcfdfe; }
.snapshot-table tr:hover td:last-child { background:#f2f6fd; }
.small-note { font-size:11px; line-height:1.7; margin:0; padding:10px 16px; color:var(--muted); border-top:1px solid #e8ecf1; }
.snapshot-footer { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:10px 16px; border-top:1px solid var(--line); background:#fff; }
.snapshot-footnotes { display:flex; align-items:center; flex-wrap:wrap; gap:4px 16px; }
.snapshot-footnotes .table-unit { margin:0; }
.snapshot-footer .small-note { padding:0; border:0; }
.snapshot-pagination { display:flex; align-items:center; gap:12px; color:#78879a; font-size:12px; }
.snapshot-pagination button { min-width:28px; padding:1px 7px; font-size:18px; line-height:24px; }
.warning-list { padding:0 18px; }
button.warning-entry { display:flex; justify-content:space-between; flex-wrap:wrap; gap:8px 12px; width:100%; text-align:left; padding:10px 0; color:var(--ink); background:transparent; border:0; border-bottom:1px solid #e8ecf1; border-radius:0; font-weight:400; }
button.warning-entry:last-child { border-bottom:0; }
button.warning-entry:hover:not(:disabled) { background:#fffaf2; }
.warning-name { min-width:0; flex:1 1 110px; overflow-wrap:anywhere; }
.warning-name strong { font-size:13px; font-weight:500; }
.warning-value { text-align:right; }
.warning-value b { font-size:14px; color:#9b6321; font-weight:600; font-variant-numeric:tabular-nums; }
.warning-entry small { display:block; margin-top:4px; font-size:11px; color:#7b8798; }
.overview-footer { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:8px 16px; padding:7px 0; margin:0; font-size:12px; background:transparent; border:0; }
.overview-footer .update-stamp { margin-left:auto; }
.quick-actions { display:flex; align-items:center; flex-wrap:wrap; gap:16px; flex-shrink:0; }
.quick-actions .text-button { color:#69778b; font-size:12px; }
.overview-help { max-width:560px; color:var(--muted); text-align:right; }
.overview-help summary { cursor:pointer; padding:5px 0; }
.overview-help p { text-align:left; margin:4px 0 0; padding:10px 12px; border:1px solid var(--line); background:#fff; line-height:1.8; }

/* Each module has its own heading, filter surface, table and action boundary. */
[data-family=overview],[data-family=sites] { --module-tint:#f3f6fc; --module-accent:#295bd4; }
[data-family=finance],[data-family=members] { --module-tint:#f2f7f5; --module-accent:#397965; }
[data-family=catalog],[data-family=lottery] { --module-tint:#f4f6fa; --module-accent:#557397; }
[data-family=system] { --module-tint:#f5f4f8; --module-accent:#77658e; }
[data-family=risk] { --module-tint:#faf7f0; --module-accent:#9b773a; }
.module-heading { padding:12px 20px 12px 17px; margin:-20px -20px 16px; min-height:56px; border-bottom:1px solid var(--line); border-left:3px solid var(--module-accent); border-radius:3px 3px 0 0; background:var(--module-tint); }
.module-heading h2 { color:var(--ink); font-size:15px; }
.module-surface { border-top:1px solid var(--line); }
.module-surface th { background:#eef1f5; }
.module-heading button { font-size:13px; }
.module-notes { margin:0 0 12px; font-size:12px; color:var(--muted); }
.module-notes summary { width:fit-content; max-width:100%; cursor:pointer; padding:3px 0; }
.module-notes[open] { padding-bottom:10px; border-bottom:1px solid var(--line); }
.module-notes p { margin:8px 0 0; padding:10px 12px; border:0; border-left:2px solid #cdd6e2; background:#f7f8fa; color:#637083; font-size:12px; line-height:1.8; }
.module-surface>.notice { border-color:var(--line); background:#f8fafc; color:#607085; }
.module-surface[data-family=risk]>.notice { background:#fffbf3; border-color:#e9deca; color:#80633b; }
.module-surface>form { padding:12px 0; background:#fff; border:0; border-bottom:1px solid var(--line); border-radius:0; margin:12px 0; }
.module-surface>form.bar,.report-view>form.bar { padding:16px; background:var(--module-tint); border:1px solid var(--line); border-radius:4px; margin:16px 0; }
.module-surface>section { padding:12px 0; background:#fff; border:0; border-top:1px solid var(--line); border-radius:0; margin:12px 0; }
.module-surface>form.bar,.report-view>form.bar { align-items:flex-end; justify-content:flex-start; gap:12px 16px; }
.module-surface>form.bar label,.report-view>form.bar label { display:flex; align-items:center; gap:8px; margin:0; font-size:13px; white-space:nowrap; }
.module-surface>form.bar label input:not([type=checkbox]),.module-surface>form.bar label select,.report-view>form.bar label input:not([type=checkbox]),.report-view>form.bar label select { width:150px; margin:0; }
.module-surface>form.bar>button,.report-view>form.bar>button { min-height:34px; }
.module-surface>form.bar label:has(input[type=checkbox]),.report-view>form.bar label:has(input[type=checkbox]) { display:flex; align-items:center; gap:7px; padding-bottom:8px; }
.module-surface>form.bar input[type=checkbox],.report-view>form.bar input[type=checkbox] { width:auto; margin:0; }
.module-surface>.section-toolbar { margin:20px 0 0; padding:10px 12px; border:1px solid var(--line); border-bottom:0; background:var(--module-tint); color:var(--module-accent); }
.module-surface>.section-toolbar h3 { margin:0; font-size:13px; }
.reconciliation-results { margin:0 0 18px; border-top:1px solid var(--line); }
.reconciliation-results>div { display:grid; grid-template-columns:90px minmax(0,1fr); align-items:baseline; gap:12px; padding:9px 12px; border-bottom:1px solid #e9edf2; font-size:12px; }
.reconciliation-results dt { color:#536176; }
.reconciliation-results dd { display:flex; flex-wrap:wrap; gap:4px 12px; margin:0; min-width:0; }
.reconciliation-results dd strong { flex:0 0 88px; font-weight:500; color:#596575; }
.reconciliation-results dd span { flex:1 1 280px; color:var(--muted); overflow-wrap:anywhere; }
.reconciliation-results [data-result=matched] strong { color:#32735b; }
.reconciliation-results [data-result=warning] strong { color:#946423; }
.reconciliation-results [data-result=error] { background:#fff5f3; }
.reconciliation-results [data-result=error] strong,.reconciliation-results [data-result=error] dd span { color:#a43a32; }
.module-surface>.credit-records-heading { padding:0 12px; margin-top:18px; background:#f6f7f9; gap:0 18px; }
.module-surface .credit-records-heading .credit-views { gap:20px; }
.credit-views button.secondary { padding:12px 0 10px; color:var(--muted); background:transparent; border:0; border-bottom:2px solid transparent; border-radius:0; font-size:13px; }
.credit-views button.secondary:hover:not(:disabled) { background:transparent; color:var(--primary); }
.credit-views button[aria-pressed=true] { color:var(--primary); font-weight:600; border-bottom-color:var(--primary); }
.credit-page-info { display:flex; flex-wrap:wrap; gap:6px 18px; }
#gameCreditReadAt { color:var(--muted); font-size:11px; }
.credit-records:focus-visible { outline:2px solid #89b4ed; outline-offset:2px; }
@media(max-width:760px) {
  .reconciliation-results>div { grid-template-columns:68px minmax(0,1fr); gap:8px; padding:9px 0; }
  .reconciliation-results dd { display:block; }
  .reconciliation-results dd span { display:block; margin-top:3px; }
  .module-surface>.credit-records-heading { padding:10px 10px 0; }
  .module-surface .credit-records-heading .credit-views { width:100%; gap:16px; }
  .credit-views button.secondary { font-size:12px; }
}
.module-surface>.table-pager,.report-view>.table-pager { margin:0; padding:10px 0; border:0; background:transparent; font-size:12px; color:var(--muted); }
.module-surface>.table-pager button,.report-view>.table-pager button { font-size:12px; }
.module-surface td button.secondary { padding:3px 0; min-height:26px; margin-right:12px; color:var(--primary); background:transparent; border:0; font-size:12px; }
.module-surface td button.secondary:hover:not(:disabled) { background:transparent; text-decoration:underline; }
.module-tabs { display:flex; gap:24px; margin:0 0 14px; border-bottom:1px solid var(--line); }
.module-tabs button { display:flex; align-items:center; gap:8px; background:transparent; color:var(--muted); padding:10px 0; border:0; border-bottom:2px solid transparent; border-radius:0; }
.module-tabs button[aria-selected=true] { color:var(--primary); border-bottom-color:var(--primary); font-weight:600; }
.module-tabs button:hover:not(:disabled) { background:transparent; color:var(--primary); }
.tab-indicator { padding:0 5px; border:1px solid #e7d6b7; border-radius:3px; background:#fff9ed; color:#906725; font-size:11px; font-weight:400; }
.report-view { min-width:0; }
.report-view>form.bar label:not(:has(input[type=checkbox])) { flex:0 0 auto; min-width:0; }
.module-sections { display:grid; grid-template-columns:1fr 1fr; align-items:start; gap:16px; margin:16px 0; }
.module-block { min-width:0; background:#fff; border:1px solid var(--line); border-radius:3px; padding:12px; overflow-wrap:anywhere; }
.module-block h3 { font-size:13px; margin:-12px -12px 12px; padding:10px 12px; background:var(--module-tint); border-bottom:1px solid var(--line); }
.module-block p { font-size:12px; line-height:1.8; }
#reportsPanel table { min-width:1120px; }
#royalReportsPanel table { min-width:980px; }
#royalReportsPanel td { white-space:pre-line; overflow-wrap:anywhere; }
#royalReportsPanel .module-block { margin-top:16px; }
#royalReportsPanel .module-block>summary { cursor:pointer; font-weight:600; padding:8px 0; }
#reportsPanel .report-monitor-table { min-width:460px; table-layout:fixed; }
.report-monitor-table th,.report-monitor-table td { font-size:12px; padding:8px; overflow-wrap:anywhere; }
.report-monitor-table td small { font-size:11px; }
.report-monitor-table .danger { font-weight:500; }
.report-settings { display:grid; grid-template-columns:auto 1fr auto 1fr; gap:6px 12px; font-size:12px; padding:0; margin:10px 0; }
.report-settings dt { color:var(--muted); }
.report-settings dd { margin:0; font-variant-numeric:tabular-nums; }
#reportsPanel td:nth-child(4),#reportsPanel td:nth-child(5) { white-space:nowrap; font-variant-numeric:tabular-nums; }
#reportJobs p { padding:10px 0; margin:0; border-bottom:1px solid var(--line); }
#reportJobs p:last-child { border-bottom:0; }
.site-directory { padding:0; }
.directory-heading { padding:12px 20px 12px 17px; min-height:56px; border-bottom:1px solid var(--line); border-left:3px solid var(--module-accent); border-radius:3px 3px 0 0; background:var(--module-tint); }
.directory-heading h2 { display:flex; align-items:center; gap:0; font-size:16px; }
.directory-heading h2 .badge { margin-left:9px; }
.directory-filters { display:flex; align-items:center; flex-wrap:wrap; gap:12px; padding:12px 20px; border-bottom:1px solid var(--line); background:#fafbfc; }
.directory-filters label { margin:0; display:flex; align-items:center; gap:10px; }
.filter-label { flex:none; font-size:13px; color:#536176; }
.directory-filters input,.directory-filters select { margin:0; font-size:13px; min-height:34px; }
.search-field { flex:1; max-width:390px; min-width:230px; }
.directory-filters select { min-width:130px; }
.directory-filters .warning-filter { display:flex; align-items:center; gap:7px; font-size:12px; white-space:nowrap; }
.warning-filter input { width:14px; min-height:14px; }
.directory-filters>span { margin-left:auto; font-size:11px; }
.site-directory>.table-wrap { border:0; border-radius:0; }
.site-table { min-width:920px; }
.site-table td,.site-table th { padding:9px 16px; }
.site-table td { font-size:13px; white-space:nowrap; }
.site-table td:first-child { min-width:160px; }
.site-identity .site-name-link { padding:0; color:var(--ink); font-size:14px; font-weight:500; background:transparent; border:0; }
.site-identity .site-name-link:hover:not(:disabled) { color:var(--primary); background:transparent; text-decoration:underline; }
.site-available { font-weight:600; }
.site-table td:nth-child(n+4) { font-variant-numeric:tabular-nums; }
.site-table th:last-child,.site-table td:last-child { position:sticky; right:0; background:#fff; }
.site-table th:last-child { background:#eef1f5; }
.site-table tr:nth-child(even) td:last-child { background:#fcfdfe; }
.site-table tr.warning { background:#fff; }
.site-table tr.warning:nth-child(even) { background:#fcfdfe; }
.site-table tr:hover td:last-child { background:#f2f6fd; }
.site-row-actions>.text-button { margin-right:12px; font-size:13px; }
.site-manage { color:var(--primary); border:0; background:transparent; white-space:nowrap; padding:5px 0; font-size:13px; }
.site-manage::after { content:''; display:inline-block; width:5px; height:5px; border-top:1px solid currentColor; border-right:1px solid currentColor; transform:rotate(45deg); margin:0 2px 1px 6px; }
.site-manage:hover:not(:disabled) { background:transparent; color:#244e94; text-decoration:underline; }
.directory-foot { padding:11px 18px; background:#f8f9fb; border-top:1px solid var(--line); color:var(--muted); display:flex; flex-wrap:wrap; justify-content:space-between; gap:8px; font-size:11px; }

/* Native dialogs and popovers keep focus, escape and confirmation behavior. */
dialog,.site-menu { border:1px solid #d0d9e5; border-radius:3px; padding:20px; background:white; color:var(--ink); box-shadow:0 8px 24px #18283d20; }
dialog { width:min(520px,94vw); max-height:90dvh; overflow:auto; }
dialog::backdrop,.site-menu::backdrop { background:#17283e55; }
dialog h2 { margin:0 0 15px; font-size:17px; padding-bottom:14px; border-bottom:1px solid var(--line); }
#runtimeDialog { width:min(600px,94vw); }
#runtimeDialog p,#runtimeDialog dd { overflow-wrap:anywhere; }
.runtime-site { margin:0 0 16px; font-weight:600; }
.runtime-fields { margin:0; border:1px solid var(--line); border-radius:3px; }
.runtime-fields>div { display:grid; grid-template-columns:116px minmax(0,1fr); border-bottom:1px solid var(--line); }
.runtime-fields>div:last-child { border-bottom:0; }
.runtime-fields dt { padding:10px 12px; color:var(--muted); background:#f5f7fa; }
.runtime-fields dd { margin:0; padding:10px 12px; }
.runtime-fields .state-pill { white-space:normal; }
.runtime-feedback { font-size:13px; margin-top:16px; }
#runtimeScope { font-size:12px; border-top:1px solid var(--line); padding-top:12px; }
@media(max-width:440px) { .runtime-fields>div { grid-template-columns:94px minmax(0,1fr); }.runtime-fields dt,.runtime-fields dd { padding:9px 8px; font-size:12px; } }
.site-menu { position:fixed; inset:0 0 0 auto; margin:0; width:min(560px,100%); height:100dvh; max-height:100dvh; overflow:auto; border-radius:0; border-width:0 0 0 1px; box-shadow:-4px 0 16px #18283d18; }
.site-menu:not(:popover-open) { display:none; }
.site-menu-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:-20px -20px 20px; padding:16px 20px; border-bottom:1px solid var(--line); background:#f2f4f7; }
.site-menu-head strong { font-size:17px; }
.site-menu-head small { display:block; color:var(--muted); margin-top:5px; font-size:12px; }
.site-menu-head button { background:transparent; color:#647489; font-size:20px; padding:0 5px; }
.site-menu-info { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; margin:-4px 0 16px; }
.site-menu-info>.state-pill { flex:none; }
.site-menu-details { min-width:0; flex:1; }
.site-menu-details>summary { width:fit-content; color:var(--muted); font-size:12px; cursor:pointer; padding:3px 0; }
.site-menu-facts { display:grid; grid-template-columns:64px minmax(0,1fr); gap:7px 12px; font-size:12px; margin:12px 0 0; }
.site-menu-facts dt { color:var(--muted); }
.site-menu-facts dd { margin:0; overflow-wrap:anywhere; white-space:normal; font-variant-numeric:tabular-nums; }
.site-menu-balances { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); margin:0 0 16px; border:1px solid var(--line); background:#f8f9fb; }
.site-menu-balances>div { min-width:0; padding:10px 12px; }
.site-menu-balances>div+div { border-left:1px solid var(--line); }
.site-menu-balances dt { font-size:11px; color:var(--muted); }
.site-menu-balances dd { margin:5px 0 0; font-size:16px; font-weight:500; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; white-space:normal; }
.site-menu-balances dd small { font-size:11px; font-weight:400; color:inherit; }
.site-menu-tabs { position:sticky; top:-20px; z-index:1; display:flex; gap:24px; border-bottom:1px solid var(--line); margin-bottom:18px; background:#fff; }
.site-menu-tabs button { color:var(--muted); background:transparent; border:0; border-bottom:2px solid transparent; border-radius:0; padding:10px 0; font-size:14px; }
.site-menu-tabs button[aria-selected=true] { color:var(--primary); border-bottom-color:var(--primary); font-weight:600; }
.site-menu-tabs button:hover:not(:disabled) { color:var(--primary); background:transparent; }
.site-menu-grid { display:grid; grid-template-columns:1fr; gap:16px; }
.site-menu-group { min-width:0; border:0; padding:0; }
.site-menu-group>span { display:block; color:var(--module-accent); font-size:12px; font-weight:500; padding:7px 12px; margin:0; background:var(--module-tint); border-bottom:1px solid var(--line); }
.site-menu-action { display:grid; grid-template-columns:152px minmax(0,1fr); align-items:center; gap:8px; padding:0 12px; border-bottom:1px solid #edf0f4; }
.site-menu-action:focus-within,.site-menu-action:hover { background:#f5f7fa; }
.site-menu-action small { color:var(--muted); font-size:12px; line-height:1.6; white-space:normal; overflow-wrap:anywhere; }
.site-menu-group button { text-align:left; font-size:13px; min-height:42px; padding:10px 0; margin:0; color:var(--primary); border:0; border-radius:0; background:transparent; overflow-wrap:anywhere; white-space:normal; }
.site-menu-group button:hover:not(:disabled) { background:transparent; color:#1d5798; text-decoration:underline; }
.site-menu-group.risk button { color:#89643b; }
.narrow { max-width:430px; margin:55px auto; padding:28px; }
.narrow form>button { width:100%; margin-top:10px; }
.snapshot-notice { border:1px solid #e5d6b5; background:#fff8e9; color:#835d27; border-radius:4px; padding:10px 14px; line-height:1.7; margin:0 0 14px; }
.work-status { position:fixed; top:10px; left:50%; transform:translateX(-50%); z-index:60; max-width:calc(100vw - 24px); display:flex; gap:9px; align-items:center; padding:9px 14px; border:1px solid #d5deeb; border-radius:4px; background:#fff; color:#53647c; box-shadow:0 3px 12px #16203d14; pointer-events:none; font-size:12px; }
.work-spinner { flex:none; width:14px; height:14px; border:2px solid #dfe5ee; border-top-color:var(--primary); border-radius:50%; animation:workspace-spin .8s linear infinite; }
@keyframes workspace-spin { to { transform:rotate(360deg); } }
.skip-link { position:fixed; top:-80px; left:230px; z-index:100; background:#fff; color:var(--primary); padding:12px; }
.skip-link:focus { top:8px; }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
@media(max-width:1200px) {
  :root { --sidebar:188px; }
  .brand { padding-left:16px; font-size:15px; }
  .nav-item { padding:7px 16px; gap:9px; font-size:14px; }
  button.metric-card { padding:4px 12px; }
  .metric-card strong { font-size:20px; }
  .portfolio { grid-template-columns:minmax(0,1fr); }
  .snapshot-query { justify-content:flex-start; background:#f7f8fa; }
}
@media(max-width:1050px) {
  .module-sections { grid-template-columns:1fr; }
  button.metric-card { flex-direction:column; align-items:flex-start; padding:4px 14px; }
  .topbar #identity { max-width:110px; }
}
@media(max-width:760px) {
  :root { --sidebar:0px; --header-height:54px; }
  .sidebar { width:230px; transform:translateX(-100%); visibility:hidden; }
  body.nav-open .sidebar { transform:translateX(0); visibility:visible; }
  #navBackdrop:not([hidden]) { position:fixed; inset:0; z-index:35; background:#17283e66; }
  .icon-button { display:block; }
  .topbar { height:54px; padding:0 12px; gap:10px; flex-wrap:nowrap; }
  .breadcrumb { font-size:11px; gap:7px; min-width:0; flex:1; }
  .breadcrumb strong { min-width:0; overflow:hidden; text-overflow:ellipsis; }
  .topbar-account { gap:8px; flex-shrink:0; }
  .topbar #identity,.account-avatar { display:none; }
  .topbar button.secondary { font-size:11px; }
  .workspace-history { padding:0 8px; }
  .workspace-tab { max-width:230px; }
  .workspace-tab button[data-view] { padding:6px 10px; }
  .workspace-shelf-toggle { padding:4px 8px; }
  main { padding:14px 12px 24px; }
  .overview,.site-directory,main section.card { scroll-margin-top:calc(var(--header-height) + var(--history-height) + 14px); }
  .deployment-notice summary>span:last-child { margin-left:0; }
  .overview-tools { gap:6px; }
  .refresh-overview { font-size:11px; }
  button.metric-card { padding:12px 14px; min-height:62px; }
  .overview-metrics { grid-template-columns:1fr 1fr; padding:0; }
  button.metric-card:nth-child(2) { border-right:0; }
  button.metric-card:nth-child(-n+2) { border-bottom:1px solid var(--line); }
  .metric-card strong { font-size:18px; }
  .metric-label { font-size:12px; }
  button.metric-card { display:flex; flex-direction:column; align-items:flex-start; justify-content:center; gap:5px; }
  .metric-card strong { margin:0; font-size:20px; }
  .overview-footer { padding:8px 12px; }
  .overview-footer .update-stamp { margin-left:0; }
  .overview-help { text-align:left; }
  .card:not(.portfolio):not(.attention):not(.site-directory) { padding:16px; }
  .module-heading { margin:-16px -16px 14px; padding:12px 16px; }
  .module-surface>form,.module-surface>section { padding:12px 0; }
  .module-surface>form.bar,.report-view>form.bar { padding:12px; }
  .report-settings { grid-template-columns:100px minmax(0,1fr); }
  .module-surface>form.bar label,.report-view>form.bar label:not(:has(input[type=checkbox])) { flex:1 1 130px; min-width:0; }
  .module-surface>form.bar label,.report-view>form.bar label { display:block; white-space:normal; }
  .module-surface>form.bar label input:not([type=checkbox]),.module-surface>form.bar label select,.report-view>form.bar label input:not([type=checkbox]),.report-view>form.bar label select { width:100%; margin-top:5px; }
  .module-surface>form.bar input,.module-surface>form.bar select,.report-view>form.bar input,.report-view>form.bar select { max-width:100%; }
  .module-heading>div { gap:6px; }
  .snapshot-toolbar { padding:0 12px; gap:0; }
  .snapshot-heading { padding:10px 12px; }
  .snapshot-heading .overview-tools { margin-left:auto; }
  .snapshot-heading .overview-tools button { font-size:12px; padding:4px 8px; }
  .snapshot-caption { margin:0; }
  .status-legend { padding:0; gap:14px; }
  .legend-row { font-size:11px; padding:12px 0; }
  .snapshot-search { margin:0; gap:8px; }
  .snapshot-search input { width:100%; min-width:0; }
  .snapshot-query { width:100%; padding:10px 12px; flex-wrap:nowrap; }
  .snapshot-query .snapshot-search { flex:1; min-width:0; }
  .snapshot-query>button { margin-top:0; flex:none; }
  .snapshot-footer { padding:10px 12px; flex-wrap:wrap; align-items:flex-start; }
  .snapshot-footnotes { flex:1 1 160px; gap:3px 10px; }
  .snapshot-pagination { margin-left:auto; }
  .snapshot-table { min-width:800px; }
  .snapshot-table td,.snapshot-table th { padding:10px 12px; }
  .snapshot-table th:last-child,.snapshot-table td:last-child { position:static; }
  .directory-heading,.directory-filters { padding:12px 14px; }
  .search-field { max-width:none; flex-basis:100%; }
  .directory-filters>span { margin-left:0; }
  .site-table { min-width:0; display:block; }
  .site-table thead { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
  .site-table tbody { display:block; padding:12px; }
  .site-table tr { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); border:1px solid var(--line); border-radius:4px; overflow:hidden; margin-bottom:12px; }
  .site-table tr:last-child { margin-bottom:0; }
  .site-table td { display:block; padding:10px 12px; border:0; font-size:12px; white-space:normal; overflow-wrap:anywhere; min-width:0; }
  .site-table td::before { content:attr(data-label); display:block; font-size:11px; color:var(--muted); margin-bottom:4px; font-weight:400; }
  .site-table .numeric { text-align:left; }
  .site-table td.site-identity { grid-column:1 / -1; padding:13px 12px; background:#f2f5f9; border-bottom:1px solid var(--line); min-width:0; }
  .site-table tr.warning .site-identity { background:#fcf5e8; }
  .site-table .site-identity::before { display:none; }
  .site-table td:nth-child(2),.site-table td:nth-child(3) { grid-column:1 / -1; }
  .site-table th:last-child,.site-table td:last-child { position:static; }
  .site-table td:last-child { grid-column:1 / -1; display:flex; align-items:center; justify-content:flex-end; gap:18px; border-top:1px solid var(--line); }
  .site-row-actions>.text-button { margin:0; white-space:nowrap; min-height:38px; }
  .site-table td:last-child::before { display:none; }
  .site-table td.empty-state { grid-column:1 / -1; padding:24px 16px; }
  .site-manage { min-height:38px; }
  .directory-foot>span:last-child { display:none; }
  .site-menu { padding:16px; }
  .site-menu-head { margin:-16px -16px 14px; padding:14px 16px; }
  .site-menu-grid { gap:12px; }
  .site-menu-tabs { gap:20px; top:-16px; }
  .site-menu-balances>div { padding:8px; }
  .site-menu-balances dd { font-size:14px; }
  .site-menu-group button { font-size:14px; min-height:44px; }
  .site-menu-action { grid-template-columns:minmax(0,1fr); gap:0; padding:6px 10px 10px; }
  .site-menu-action small { margin-top:-3px; }
  dialog { padding:16px; }
  .metric-facts { grid-template-columns:1fr 1fr; }
  .metric-facts>div { border-right:0; border-bottom:1px solid var(--line); }
  .metric-facts>div:nth-child(odd) { border-right:1px solid var(--line); }
  .metric-facts dd { font-size:16px; }
  .metrics { margin-bottom:16px; }
  .skip-link { left:12px; }
}
@media(prefers-reduced-motion:reduce) { * { animation:none!important; transition:none!important; scroll-behavior:auto!important; } }
