:root {
  color-scheme: dark;
  --bg: #071426;
  --bg-deep: #030a15;
  --panel: rgba(11, 27, 47, 0.9);
  --panel-solid: #0b1b30;
  --panel-high: #112740;
  --line: rgba(153, 188, 216, 0.17);
  --line-strong: rgba(153, 188, 216, 0.31);
  --text: #edf7fa;
  --muted: #91a8bd;
  --cyan: #70dce1;
  --cyan-dark: #123b4e;
  --violet: #9b92ef;
  --danger: #ff7f88;
  --warning: #f5c86b;
  --success: #69d89c;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
  --radius: 18px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg-deep); }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 8% 15%, rgba(112, 220, 225, .48) 0 1px, transparent 1.5px) 0 0 / 257px 257px,
    radial-gradient(circle at 88% 70%, rgba(155, 146, 239, .3) 0 1px, transparent 1.5px) 0 0 / 389px 389px,
    radial-gradient(ellipse at 86% -12%, rgba(112, 220, 225, .09), transparent 34rem),
    radial-gradient(ellipse at 10% 112%, rgba(155, 146, 239, .08), transparent 30rem),
    linear-gradient(145deg, var(--bg), var(--bg-deep));
}
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }

.ambient { position: fixed; z-index: 0; pointer-events: none; opacity: .42; }
.ambient-one { width: 34vw; height: 34vw; min-width: 280px; min-height: 280px; right: -12vw; top: -16vw; border: 1px solid rgba(112, 220, 225, .2); border-radius: 50%; box-shadow: inset 0 0 100px rgba(112, 220, 225, .08); }
.ambient-two { width: 22vw; height: 22vw; left: 18vw; bottom: -15vw; background: rgba(155, 146, 239, .06); border-radius: 40%; transform: rotate(25deg); }

.wordmark { display: inline-flex; align-items: center; gap: 12px; font-size: 1.05rem; font-weight: 650; letter-spacing: .02em; }
.wordmark .mark { display: grid; place-items: center; width: 36px; height: 36px; color: #061526; background: linear-gradient(145deg, #9af0e9, var(--cyan)); border-radius: 11px 11px 3px 11px; font-weight: 900; box-shadow: 0 0 32px rgba(112, 220, 225, .2); }
.wordmark.compact { font-size: 1rem; }
.wordmark.compact .mark { width: 32px; height: 32px; }
.eyebrow { margin: 0 0 8px; color: var(--cyan); font-size: .7rem; font-weight: 800; letter-spacing: .17em; text-transform: uppercase; }
.muted { color: var(--muted); }
.mono { font-family: "SFMono-Regular", Consolas, monospace; font-size: .75rem; overflow-wrap: anywhere; }
.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; }

.auth-layout { position: relative; z-index: 1; min-height: 100vh; }
.brand-panel { display: flex; flex-direction: column; justify-content: space-between; padding: clamp(32px, 5vw, 72px); border-right: 1px solid var(--line); }
.brand-copy { max-width: 720px; margin: auto 0; padding: 80px 0; }
.brand-copy h1 { margin: 0; font-size: clamp(2.7rem, 5.6vw, 6rem); line-height: .98; letter-spacing: -.055em; font-weight: 580; }
.brand-copy h1 span, .subscriber-hero h1 span { color: var(--cyan); }
.brand-copy > p:last-child { max-width: 620px; margin: 30px 0 0; color: var(--muted); font-size: 1.02rem; line-height: 1.8; }
.trust-strip { display: flex; flex-wrap: wrap; gap: 24px; color: #b5c9d4; font-size: .78rem; }
.trust-strip span { display: inline-flex; align-items: center; gap: 8px; }
.trust-strip i { width: 6px; height: 6px; background: var(--cyan); border-radius: 50%; box-shadow: 0 0 12px var(--cyan); }
.login-panel { display: grid; min-height: 100vh; place-items: center; padding: 24px; }
.login-card { width: min(380px, 100%); padding: 34px; background: var(--panel-solid); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.login-brand { margin-bottom: 34px; }
.login-card h1 { margin: 0 0 24px; font-size: 1.55rem; letter-spacing: -.03em; }
.card-kicker { display: inline-flex; margin-bottom: 28px; padding: 7px 10px; color: var(--cyan); border: 1px solid rgba(112, 220, 225, .28); border-radius: 999px; font-size: .63rem; font-weight: 800; letter-spacing: .16em; }
.login-card h2 { margin: 0 0 12px; font-size: 2rem; letter-spacing: -.035em; }
.login-card > .muted { margin: 0 0 32px; line-height: 1.65; }
label { display: block; margin: 14px 0 7px; color: #c8d8e0; font-size: .76rem; font-weight: 700; }
input, select { width: 100%; padding: 13px 14px; color: var(--text); background: rgba(4, 12, 19, .74); border: 1px solid var(--line-strong); border-radius: 10px; outline: none; transition: border .18s, box-shadow .18s, background .18s; }
input:focus, select:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(112, 220, 225, .12); background: #091722; }
.form-error { min-height: 20px; margin: 12px 0; color: var(--danger); font-size: .78rem; }
.login-footnote { margin: 20px 0 0; color: #67808f; font-size: .7rem; line-height: 1.6; }

.button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 40px; padding: 9px 15px; border: 1px solid transparent; border-radius: 10px; cursor: pointer; font-weight: 750; font-size: .78rem; transition: transform .16s, border-color .16s, background .16s, opacity .16s; }
.button:hover:not(:disabled), .icon-button:hover:not(:disabled) { transform: translateY(-1px); }
.button:focus-visible, .icon-button:focus-visible, .nav-item:focus-visible, .tab:focus-visible, .dialog-close:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.button:disabled { cursor: not-allowed; opacity: .42; }
.button.primary { color: #031518; background: var(--cyan); box-shadow: 0 8px 28px rgba(112, 220, 225, .12); }
.button.quiet { color: #c5d5de; background: rgba(139, 169, 187, .08); border-color: var(--line); }
.button.danger { color: #220608; background: var(--danger); }
.button.full { width: 100%; justify-content: space-between; margin-top: 4px; padding-inline: 18px; }
.icon-button { width: 40px; height: 40px; color: #bdd0db; background: rgba(139, 169, 187, .08); border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font-size: 1.1rem; }

.console { position: relative; z-index: 1; display: grid; grid-template-columns: 208px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; display: flex; flex-direction: column; height: 100vh; padding: 22px 16px; background: linear-gradient(180deg, #050f1d, #061425); border-right: 1px solid var(--line); }
.sidebar nav { display: grid; gap: 6px; margin-top: 32px; }
.nav-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 13px; color: #819aa9; background: transparent; border: 1px solid transparent; border-radius: 9px; cursor: pointer; text-align: left; font-size: .82rem; font-weight: 700; }
.nav-item.active { color: var(--text); background: rgba(112, 220, 225, .08); border-color: rgba(112, 220, 225, .13); }
.nav-item span { color: var(--cyan); font-size: 1rem; }
.sidebar-boundary { display: flex; align-items: center; gap: 11px; margin-top: auto; padding: 14px 12px; border: 1px solid var(--line); border-radius: 12px; }
.boundary-light { width: 8px; height: 8px; background: var(--success); border-radius: 50%; box-shadow: 0 0 12px var(--success); }
.sidebar-boundary strong, .sidebar-boundary small { display: block; }
.sidebar-boundary strong { font-size: .72rem; }
.sidebar-boundary small { margin-top: 3px; color: #718997; font-size: .65rem; }
.sidebar-links { display: grid; gap: 2px; margin-top: auto; }
.subscriber-link { display: flex; justify-content: space-between; padding: 10px 4px; color: #718997; font-size: .72rem; }
.subscriber-link:hover { color: var(--cyan); }
.workspace { min-width: 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 68px; padding: 12px 26px; border-bottom: 1px solid var(--line); }
.topbar h1 { margin: 0; font-size: 1.45rem; letter-spacing: -.025em; }
.top-actions { display: flex; align-items: center; gap: 12px; }
.identity { display: flex; align-items: center; gap: 10px; padding: 0 10px; }
.identity > span { display: grid; place-items: center; width: 34px; height: 34px; color: var(--cyan); background: var(--cyan-dark); border: 1px solid rgba(112, 220, 225, .2); border-radius: 50%; font-size: .75rem; font-weight: 900; }
.identity strong, .identity small { display: block; }
.identity strong { font-size: .75rem; }
.identity small { margin-top: 2px; color: #718997; font-size: .62rem; }
.content { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); gap: 12px; width: min(1500px, 100%); height: calc(100vh - 68px); margin: 0 auto; padding: 18px 26px; overflow: hidden; }
.content[data-active-section="overview"] .metrics { grid-column: 1 / -1; }
.content[data-active-section="overview"] .inventory-panel,
.content[data-active-section="overview"] .deliveries-panel,
.content[data-active-section="overview"] .grants-panel { display: none; }
.content[data-active-section="overview"] .operations-panel,
.content[data-active-section="overview"] .accounts-panel { min-width: 0; }
.content[data-active-section="overview"] .operation-filters > :not(:first-child),
.content[data-active-section="overview"] .account-filters > :not(:first-child) { display: none; }
.content[data-active-section="overview"] tbody tr:nth-child(n + 7) { display: none; }
.content[data-active-section="overview"] .panel-footer .overview-link { display: inline-flex; }
.content[data-active-section="overview"] .panel-footer .button { display: none; }
.content[data-active-section="pools"],
.content[data-active-section="accounts"],
.content[data-active-section="operations"],
.content[data-active-section="deliveries"],
.content[data-active-section="grants"] { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }
.content[data-active-section="pools"] .metrics,
.content[data-active-section="pools"] .operations-panel,
.content[data-active-section="pools"] .accounts-panel,
.content[data-active-section="pools"] .deliveries-panel,
.content[data-active-section="pools"] .grants-panel,
.content[data-active-section="accounts"] .metrics,
.content[data-active-section="accounts"] .operations-panel,
.content[data-active-section="accounts"] .inventory-panel,
.content[data-active-section="accounts"] .deliveries-panel,
.content[data-active-section="accounts"] .grants-panel,
.content[data-active-section="operations"] .metrics,
.content[data-active-section="operations"] .accounts-panel,
.content[data-active-section="operations"] .inventory-panel,
.content[data-active-section="operations"] .deliveries-panel,
.content[data-active-section="operations"] .grants-panel,
.content[data-active-section="deliveries"] .metrics,
.content[data-active-section="deliveries"] .operations-panel,
.content[data-active-section="deliveries"] .accounts-panel,
.content[data-active-section="deliveries"] .inventory-panel,
.content[data-active-section="deliveries"] .grants-panel,
.content[data-active-section="grants"] .metrics,
.content[data-active-section="grants"] .operations-panel,
.content[data-active-section="grants"] .accounts-panel,
.content[data-active-section="grants"] .deliveries-panel,
.content[data-active-section="grants"] .inventory-panel { display: none; }
.overview-link { display: none; }
.hero-row { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 30px; }
.hero-row h2 { margin: 0; font-size: clamp(1.7rem, 3vw, 2.7rem); letter-spacing: -.045em; }
.hero-row .muted { margin: 10px 0 0; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.metrics article { position: relative; overflow: hidden; padding: 12px 16px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
.metrics article::after { content: ""; position: absolute; width: 70px; height: 70px; right: -34px; top: -34px; border: 1px solid rgba(112, 220, 225, .14); border-radius: 50%; }
.metrics span, .metrics small { display: block; color: var(--muted); font-size: .68rem; }
.metrics strong { display: block; margin-top: 4px; font-size: 1.55rem; font-weight: 620; letter-spacing: -.04em; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 15px 50px rgba(0,0,0,.14); }
.support-banner { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 10px; padding: 11px 14px; color: #e6fbf7; background: rgba(112, 220, 225, .08); border: 1px solid rgba(112, 220, 225, .24); border-radius: 8px; }
.support-banner[hidden] { display: none; }
.support-banner span { color: var(--muted); font-size: .75rem; }
.inventory-panel, .operations-panel, .accounts-panel, .deliveries-panel, .grants-panel { display: flex; min-height: 0; flex-direction: column; overflow: hidden; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 16px; border-bottom: 1px solid var(--line); }
.panel-heading h2 { margin: 0; font-size: 1rem; letter-spacing: -.015em; }
.panel-actions { display: flex; align-items: center; gap: 9px; }
.operation-filters, .account-filters, .delivery-filters { flex: 1; justify-content: flex-end; }
.filter-label { width: min(230px, 42vw); margin: 0; color: var(--muted); }
.compact-filter { width: min(180px, 25vw); }
.filter-label select { padding-block: 9px; }
.table-wrap { flex: 1; overflow: auto; scrollbar-color: rgba(151, 183, 207, .25) transparent; }
.operations-table-wrap, .accounts-table-wrap, .deliveries-table-wrap, .grants-table-wrap { min-height: 0; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 11px 16px; border-bottom: 1px solid rgba(151, 183, 207, .1); text-align: left; white-space: nowrap; }
.delivery-correlation { min-width: 210px; white-space: normal; }
.delivery-correlation small { display: block; margin-top: 4px; color: var(--muted); font-family: inherit; }
th { color: #6f8998; font-size: .64rem; letter-spacing: .09em; text-transform: uppercase; }
thead { position: sticky; z-index: 1; top: 0; background: var(--panel-solid); }
td { color: #bcd0da; font-size: .76rem; }
td:first-child { color: var(--text); font-weight: 750; }
tbody tr { transition: background .15s; }
tbody tr:hover { background: rgba(112, 220, 225, .035); }
.row-button { color: var(--cyan); background: transparent; border: 0; cursor: pointer; font-weight: 750; }
.fleet-actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; }
.state-pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; color: #abc0cb; background: rgba(139,169,187,.08); border: 1px solid var(--line); border-radius: 999px; font-size: .66rem; }
.state-pill::before { content: ""; width: 5px; height: 5px; background: currentColor; border-radius: 50%; }
.state-pill.ready, .state-pill.healthy, .state-pill.active, .state-pill.succeeded { color: var(--success); }
.state-pill.degraded, .state-pill.stopped, .state-pill.pending, .state-pill.running, .state-pill.unobserved, .state-pill.cooling, .state-pill.quota_exhausted, .state-pill.validating, .state-pill.pending_import, .state-pill.removing { color: var(--warning); }
.state-pill.error, .state-pill.provision_failed, .state-pill.deleted, .state-pill.retryable_failed, .state-pill.terminal_failed, .state-pill.invalid, .state-pill.revoked, .state-pill.expired, .state-pill.disabled { color: var(--danger); }
.empty-state { display: grid; min-height: 160px; place-items: center; color: var(--muted); text-align: center; }
.compact-empty { min-height: 90px; }
.empty-state strong { color: var(--text); }
.panel-footer { display: flex; align-items: center; justify-content: space-between; min-height: 42px; padding: 6px 16px; color: var(--muted); border-top: 1px solid var(--line); font-size: .7rem; }

.error-text { color: var(--danger) !important; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.dialog { width: min(620px, calc(100vw - 28px)); max-height: calc(100vh - 28px); padding: 0; color: var(--text); background: transparent; border: 0; }
.dialog::backdrop { background: rgba(0, 5, 10, .72); backdrop-filter: blur(7px); }
.dialog-shell { overflow: auto; max-height: calc(100vh - 28px); padding: 26px; background: #0b1925; border: 1px solid var(--line-strong); border-radius: 18px; box-shadow: var(--shadow); }
.detail-dialog { width: min(900px, calc(100vw - 28px)); }
.dialog-header { display: flex; align-items: start; justify-content: space-between; gap: 20px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.dialog-header h2 { margin: 0; font-size: 1.5rem; letter-spacing: -.03em; }
.dialog-header p:last-child { margin: 7px 0 0; }
.dialog-close { display: grid; place-items: center; flex: 0 0 auto; width: 34px; height: 34px; color: var(--muted); background: rgba(139,169,187,.07); border: 1px solid var(--line); border-radius: 9px; cursor: pointer; font-size: 1.25rem; }
.dialog-footer { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; }
.detail-status { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 20px 0; }
.detail-status article { padding: 13px; background: rgba(4,12,19,.5); border: 1px solid var(--line); border-radius: 10px; }
.detail-status span, .detail-status small { display: block; color: var(--muted); font-size: .64rem; }
.detail-status strong { display: block; margin-top: 5px; font-size: .82rem; overflow-wrap: anywhere; }
.control-plane-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin: 0 0 18px; overflow: hidden; background: var(--line); border: 1px solid var(--line); border-radius: 12px; }
.control-plane-summary article { min-width: 0; padding: 13px; background: #091721; }
.control-plane-summary span, .control-plane-summary small { display: block; color: var(--muted); font-size: .61rem; overflow-wrap: anywhere; }
.control-plane-summary strong { display: block; margin: 5px 0; font-size: .76rem; overflow-wrap: anywhere; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 22px; }
.access-disclosure { margin: -8px 0 22px; padding: 16px; background: rgba(112,220,225,.08); border: 1px solid rgba(112,220,225,.28); border-radius: 12px; }
.access-disclosure > div:first-child { display: flex; align-items: baseline; justify-content: space-between; gap: 18px; }
.access-disclosure code { display: block; margin: 14px 0; padding: 12px; overflow-wrap: anywhere; color: #dffffa; background: #041217; border-radius: 9px; user-select: all; }
.disclosure-actions, .operation-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.tabs { display: flex; gap: 6px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.tab { padding: 8px 12px; color: var(--muted); background: transparent; border: 0; border-radius: 8px; cursor: pointer; font-size: .75rem; font-weight: 750; }
.tab.active { color: var(--cyan); background: rgba(112,220,225,.08); }
.detail-list { min-height: 180px; padding-top: 10px; }
.detail-item { display: grid; grid-template-columns: minmax(120px, .9fr) minmax(120px, .7fr) minmax(150px, 1.2fr) auto; gap: 12px; align-items: center; padding: 13px 4px; border-bottom: 1px solid rgba(151,183,207,.1); font-size: .72rem; }
.detail-item strong { overflow-wrap: anywhere; }
.detail-item span { color: var(--muted); overflow-wrap: anywhere; }
.mini-button { padding: 6px 9px; color: var(--cyan); background: transparent; border: 1px solid var(--line-strong); border-radius: 7px; cursor: pointer; font-size: .65rem; }
.mini-button:hover { border-color: var(--cyan); }
.mini-button:disabled { cursor: not-allowed; opacity: .42; }
.detail-empty { display: grid; place-items: center; min-height: 170px; color: var(--muted); font-size: .8rem; }
.confirm-name { display: block; margin: 14px 0; padding: 12px; color: var(--danger); background: rgba(255,127,136,.07); border: 1px solid rgba(255,127,136,.2); border-radius: 8px; overflow-wrap: anywhere; }
.dialog-hint { margin: 12px 0 4px; color: var(--muted); font-size: .76rem; line-height: 1.55; }
.danger-text { color: var(--danger); }
code { color: var(--cyan); background: rgba(112,220,225,.08); padding: 2px 5px; border-radius: 4px; }
.toast { position: fixed; z-index: 20; right: 24px; bottom: 24px; max-width: min(420px, calc(100vw - 48px)); padding: 13px 16px; color: #dcebf1; background: #142634; border: 1px solid var(--line-strong); border-radius: 10px; box-shadow: var(--shadow); font-size: .78rem; }
.toast.error { color: #ffd2d5; border-color: rgba(255,127,136,.35); }
.is-busy .workspace { cursor: progress; }

.subscriber-page { min-height: 100vh; }
.public-header, .public-footer { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; width: min(1320px, calc(100% - 48px)); margin: 0 auto; }
.public-header { padding: 28px 0; }
.subscriber-main { position: relative; z-index: 1; width: min(1320px, calc(100% - 48px)); margin: 0 auto; padding: clamp(55px, 9vw, 130px) 0 80px; }
.subscriber-hero { max-width: 880px; }
.subscriber-hero h1 { margin: 0; font-size: clamp(3rem, 7.3vw, 7rem); line-height: .92; letter-spacing: -.065em; font-weight: 560; }
.subscriber-hero > p:not(.eyebrow) { max-width: 720px; margin: 32px 0; color: var(--muted); font-size: 1rem; line-height: 1.8; }
.status-banner { display: inline-flex; align-items: center; gap: 13px; padding: 13px 16px; background: rgba(245,200,107,.07); border: 1px solid rgba(245,200,107,.2); border-radius: 12px; }
.status-banner strong, .status-banner small { display: block; }
.status-banner strong { font-size: .8rem; }
.status-banner small { margin-top: 4px; color: #9eaa9e; font-size: .68rem; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; }
.status-dot.pending { background: var(--warning); box-shadow: 0 0 14px var(--warning); }
.capability-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin-top: 100px; background: var(--line); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.capability-grid article { position: relative; min-height: 310px; padding: 30px; background: rgba(9, 21, 31, .96); }
.cap-number { display: block; margin-bottom: 55px; color: #456071; font-family: monospace; font-size: .75rem; }
.capability-grid h2 { margin: 0 0 14px; font-size: 1.25rem; }
.capability-grid article > p:not(.eyebrow) { color: var(--muted); font-size: .78rem; line-height: 1.7; }
.cap-state { position: absolute; left: 30px; bottom: 28px; padding: 6px 9px; border-radius: 999px; font-size: .64rem; font-weight: 800; }
.cap-state.pending { color: var(--warning); background: rgba(245,200,107,.08); }
.cap-state.planned { color: var(--violet); background: rgba(155,146,239,.08); }
.cap-state.unavailable { color: #8097a5; background: rgba(128,151,165,.08); }
.truth-panel { display: flex; align-items: center; justify-content: space-between; gap: 50px; margin-top: 30px; padding: 34px; background: rgba(12,25,36,.72); border: 1px solid var(--line); border-radius: 18px; }
.truth-panel h2 { margin: 0; font-size: 1.7rem; }
.truth-panel ul { display: grid; grid-template-columns: 1fr 1fr; gap: 11px 30px; margin: 0; padding: 0; list-style: none; color: var(--muted); font-size: .74rem; }
.truth-panel li::before { content: "✓"; margin-right: 8px; color: var(--cyan); }
.public-footer { padding: 25px 0; color: #5e7785; border-top: 1px solid var(--line); font-size: .68rem; }

.app-console-page { overflow: hidden; }
.app-header { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; width: min(1180px, calc(100% - 40px)); min-height: 65px; margin: 0 auto; border-bottom: 1px solid var(--line); }
.app-nav { display: flex; align-items: center; gap: 3px; padding: 4px; background: rgba(139,169,187,.05); border: 1px solid var(--line); border-radius: 10px; }
.app-nav-item { padding: 7px 13px; color: var(--muted); background: transparent; border: 0; border-radius: 7px; cursor: pointer; font-size: .75rem; font-weight: 750; }
.app-nav-item:hover { color: var(--text); }
.app-nav-item.active { color: var(--text); background: rgba(112,220,225,.1); }
.app-nav-item:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.app-header-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; }
.app-shell { display: flex; width: min(1180px, calc(100% - 40px)); height: calc(100vh - 65px); margin: 0 auto; padding: 18px 0; flex-direction: column; overflow: hidden; }
.app-title-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 14px; }
.app-title-row h1 { max-width: min(700px, 62vw); margin: 0; overflow: hidden; font-size: clamp(1.7rem, 3.3vw, 2.5rem); line-height: 1.05; letter-spacing: -.045em; text-overflow: ellipsis; white-space: nowrap; }
.app-title-actions { display: flex; align-items: center; gap: 10px; }
.app-auth-panel { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 22px; background: rgba(12,25,36,.78); border: 1px solid var(--line); border-radius: 14px; }
.app-auth-panel h2 { margin: 0 0 5px; font-size: 1.25rem; }
.app-auth-panel p { margin: 0; }
#app-dashboard:not([hidden]) { display: flex; min-height: 0; flex: 1; flex-direction: column; }
#app-dashboard .support-banner { margin-bottom: 10px; }
.app-workspace { min-height: 0; flex: 1; }
.app-section { width: 100%; height: 100%; min-height: 0; overflow: auto; background: rgba(10,24,35,.8); border: 1px solid var(--line); border-radius: 14px; scrollbar-color: rgba(151,183,207,.25) transparent; }
.app-overview-section { display: flex; flex-direction: column; overflow: hidden; }
.app-vitals { display: grid; min-height: 0; flex: 1; grid-template-columns: repeat(6, minmax(0, 1fr)); }
.app-vitals > div { display: flex; min-width: 0; padding: clamp(18px, 2.6vw, 34px) 16px; flex-direction: column; justify-content: center; border-right: 1px solid var(--line); }
.app-vitals > div:last-child { border-right: 0; }
.app-vitals span, .app-vitals small, .app-access-facts span, .app-access-facts small, .app-telemetry-facts span, .app-usage-row-facts span, .app-account-facts span { display: block; color: var(--muted); font-size: .62rem; line-height: 1.45; }
.app-vitals strong { display: block; margin: 12px 0 8px; overflow: hidden; font-size: clamp(.9rem, 1.4vw, 1.1rem); text-overflow: ellipsis; white-space: nowrap; }
.app-vitals small { min-height: 2.8em; overflow: hidden; }
.app-vital-action { align-self: flex-start; margin-top: 8px; color: var(--cyan); font-size: .68rem; font-weight: 750; text-decoration: none; }
.app-vital-action:hover { text-decoration: underline; text-underline-offset: 4px; }
.app-vital-action[hidden] { display: none; }
.app-route-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 17px 18px; border-top: 1px solid var(--line); }
.card-label { color: var(--muted); font-size: .68rem; font-weight: 750; }
.domain-url { max-width: min(780px, 68vw); margin: 6px 0 0; overflow: hidden; color: var(--cyan); font-family: "SFMono-Regular", Consolas, monospace; font-size: .76rem; text-overflow: ellipsis; white-space: nowrap; }
.account-card { display: flex; flex-direction: column; overflow: hidden; }
.compact-heading { padding: 12px 15px; }
.compact-heading small { display: block; margin-top: 4px; }
.app-account-list { min-height: 0; flex: 1; overflow: auto; }
.app-account-row { padding: 16px; border-bottom: 1px solid var(--line); }
.app-account-row:last-child { border-bottom: 0; }
.app-account-row > summary { list-style: none; cursor: pointer; }
.app-account-row > summary::-webkit-details-marker { display: none; }
.app-account-row > summary::after { content: "展开"; margin-left: 12px; color: var(--muted); font-size: .62rem; font-weight: 600; }
.app-account-row[open] > summary::after { content: "收起"; }
.app-account-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; }
.app-account-actions small { color: var(--muted); font-size: .62rem; }
.app-account-action-buttons { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 12px; }
.row-button.danger { color: var(--danger); }
.row-button.danger.confirming { text-decoration: underline; text-underline-offset: 4px; }
.app-account-heading, .app-usage-row-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.app-account-copy { min-width: 0; }
.app-account-copy > strong, .app-usage-row-heading strong { display: block; overflow: hidden; font-size: .82rem; text-overflow: ellipsis; white-space: nowrap; }
.app-account-copy > small, .app-usage-row-heading small { display: block; margin-top: 5px; color: var(--muted); font-size: .64rem; }
.app-account-facts, .app-usage-row-facts { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 14px; margin-top: 15px; }
.app-account-facts > div, .app-usage-row-facts > div { min-width: 0; padding-left: 11px; border-left: 1px solid var(--line); }
.app-account-facts strong, .app-usage-row-facts strong { display: block; margin-top: 5px; overflow: hidden; font-size: .69rem; text-overflow: ellipsis; white-space: nowrap; }
.app-account-facts small, .app-usage-row-facts small { display: block; margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-account-empty { display: grid; min-height: 180px; place-items: center; color: var(--muted); }
#app-telemetry-panel { display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; overflow: hidden; }
.app-telemetry-facts { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.app-telemetry-facts > div { min-width: 0; padding: 14px 15px; border-right: 1px solid var(--line); }
.app-telemetry-facts > div:last-child { border-right: 0; }
.app-telemetry-facts strong { display: block; margin-top: 5px; overflow: hidden; font-size: .73rem; text-overflow: ellipsis; white-space: nowrap; }
.app-usage-ledger { min-height: 0; overflow: auto; }
.app-usage-row { padding: 15px 16px; border-bottom: 1px solid var(--line); }
.app-usage-row:last-child { border-bottom: 0; }
.app-usage-models { margin: 8px 0 0; overflow: hidden; color: #b8cbd5; font-family: "SFMono-Regular", Consolas, monospace; font-size: .63rem; text-overflow: ellipsis; white-space: nowrap; }
.app-settings { border-top: 1px solid var(--line); }
.app-settings-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(180px, 260px); align-items: center; gap: 14px; padding: 14px 15px 8px; }
.app-settings-grid label { margin: 0; color: var(--muted); font-size: .68rem; }
.app-settings-grid select { min-height: 38px; padding: 9px 11px; font-size: .74rem; }
.app-settings-status { min-height: 18px; margin: 0; padding: 0 15px 13px; color: var(--muted); font-size: .64rem; }
.app-account-heading-row { border-top: 1px solid var(--line); }
.app-access-section { display: flex; min-height: 0; flex-direction: column; overflow: auto; }
.app-unified-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px; }
.app-unified-head strong, .app-unified-head small { display: block; }
.app-unified-head strong { margin-top: 7px; font-size: 1rem; }
.app-unified-head small { margin-top: 5px; }
.app-management-lists { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-block: 1px solid var(--line); }
.app-management-lists > section { min-width: 0; }
.app-management-lists > section + section { border-left: 1px solid var(--line); }
.app-management-list-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 12px 15px; }
.app-management-list { min-height: 0; }
.app-management-item { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-width: 0; padding: 12px 15px; border-top: 1px solid var(--line); }
.app-management-item > div { min-width: 0; }
.app-management-item strong, .app-management-item small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-management-item strong { font-size: .75rem; }
.app-management-item small { margin-top: 4px; color: var(--muted); font-size: .62rem; }
.app-management-empty { padding: 18px 15px; color: var(--muted); font-size: .68rem; }
.app-access-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px; }
.app-access-head strong, .app-access-head small { display: block; }
.app-access-head strong { margin-top: 7px; font-size: 1rem; }
.app-access-head small { margin-top: 5px; }
.app-access-facts { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border-block: 1px solid var(--line); }
.app-access-facts > div { min-width: 0; padding: 13px 14px; border-right: 1px solid var(--line); }
.app-access-facts > div:last-child { border-right: 0; }
.app-access-facts strong { display: block; margin-top: 5px; overflow: hidden; font-size: .72rem; text-overflow: ellipsis; white-space: nowrap; }
.app-access-facts small { margin-top: 4px; }
.downstream-card { display: flex; min-height: 0; flex-direction: column; overflow: hidden; }
.downstream-heading-actions, .downstream-actions { display: flex; align-items: center; gap: 8px; }
.downstream-list { flex: 1; min-height: 0; overflow: auto; scrollbar-color: rgba(151, 183, 207, .25) transparent; }
.downstream-item { padding: 13px 15px; background: #0a1823; border-bottom: 1px solid var(--line); }
.downstream-item:last-child { border-bottom: 0; }
.downstream-summary { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.downstream-summary > strong { min-width: 0; overflow: hidden; font-size: .82rem; text-overflow: ellipsis; white-space: nowrap; }
.downstream-scope { margin: 7px 0 10px; overflow: hidden; color: var(--muted); font-size: .66rem; text-overflow: ellipsis; white-space: nowrap; }
.downstream-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 11px; }
.downstream-facts div { min-width: 0; padding: 7px 8px; background: rgba(4,12,19,.48); border-radius: 7px; }
.downstream-facts span, .downstream-facts strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.downstream-facts span { color: var(--muted); font-size: .58rem; }
.downstream-facts strong { margin-top: 4px; font-family: "SFMono-Regular", Consolas, monospace; font-size: .65rem; }
.downstream-actions { flex-wrap: wrap; }
.downstream-actions .mini-button.primary { color: #031518; background: var(--cyan); border-color: var(--cyan); }
.downstream-actions .mini-button.danger { color: var(--danger); border-color: rgba(255,127,136,.3); }
.downstream-empty { display: flex; align-items: center; justify-content: center; gap: 14px; min-height: 120px; padding: 18px; color: var(--muted); font-size: .76rem; }
.grant-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; margin-top: 12px; }
.grant-form-wide { grid-column: 1 / -1; }
.grant-api-key { display: block; margin-top: 18px; padding: 14px; color: #dffffa; background: #041217; border: 1px solid rgba(112,220,225,.18); border-radius: 10px; font-size: .78rem; line-height: 1.6; overflow-wrap: anywhere; user-select: all; }

@media (max-width: 1050px) {
  .console { grid-template-columns: 176px minmax(0, 1fr); }
  .content { padding-inline: 18px; }
  .metrics { grid-template-columns: 1fr 1fr; }
  .capability-grid { grid-template-columns: 1fr 1fr; }
  .app-vitals { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .app-vitals > div { border-bottom: 1px solid var(--line); }
  .app-vitals > div:nth-child(3n) { border-right: 0; }
  .app-vitals > div:nth-child(n + 4) { border-bottom: 0; }
  .app-account-facts, .app-usage-row-facts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .app-telemetry-facts, .app-access-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .app-telemetry-facts > div:nth-child(3), .app-access-facts > div:nth-child(3) { border-right: 0; }
}

@media (max-width: 760px) {
  .console { grid-template-columns: 1fr; }
  .sidebar { position: sticky; z-index: 5; flex-direction: row; flex-wrap: wrap; align-items: center; height: auto; padding: 12px 14px; }
  .sidebar .wordmark { flex: 1; }
  .sidebar nav { display: flex; order: 3; width: 100%; gap: 4px; margin-top: 10px; overflow-x: auto; }
  .nav-item { justify-content: center; flex: 1 0 auto; width: auto; padding: 8px 10px; }
  .sidebar-boundary { display: none; }
  .sidebar-links { display: flex; margin: 0 0 0 auto; }
  .subscriber-link:last-child { display: none; }
  .topbar { align-items: start; padding: 18px; }
  .top-actions { gap: 7px; }
  .identity div { display: none; }
  .topbar .eyebrow { display: none; }
  .content { display: grid; height: auto; min-height: calc(100vh - 68px); padding: 14px; overflow: visible; }
  .content[data-active-section="overview"] { grid-template-columns: 1fr; grid-template-rows: auto auto auto; }
  .content[data-active-section="overview"] tbody tr:nth-child(n + 5) { display: none; }
  .hero-row { align-items: start; flex-direction: column; }
  .metrics { grid-template-columns: 1fr 1fr; }
  .panel-heading { align-items: start; flex-direction: column; }
  .panel-actions, .operation-filters, .account-filters, .delivery-filters { width: 100%; flex-wrap: wrap; justify-content: stretch; }
  .filter-label { width: 100%; }
  .compact-filter { flex: 1 1 160px; }
  .detail-status { grid-template-columns: 1fr 1fr; }
  .control-plane-summary { grid-template-columns: 1fr 1fr; }
  .detail-item { grid-template-columns: 1fr; gap: 5px; }
  .form-grid { grid-template-columns: 1fr; gap: 0; }
  .public-header, .public-footer, .subscriber-main { width: min(100% - 30px, 1320px); }
  .subscriber-main { padding-top: 65px; }
  .capability-grid { grid-template-columns: 1fr; margin-top: 70px; }
  .capability-grid article { min-height: 250px; }
  .cap-number { margin-bottom: 35px; }
  .truth-panel { align-items: start; flex-direction: column; }
  .truth-panel ul { grid-template-columns: 1fr; }
  .app-auth-panel, .app-title-row { align-items: flex-start; flex-direction: column; }
  .app-console-page { overflow: auto; }
  .app-header { grid-template-columns: 1fr auto; width: min(100% - 26px, 1180px); padding: 10px 0; }
  .app-nav { grid-column: 1 / -1; grid-row: 2; width: 100%; justify-self: stretch; justify-content: stretch; margin-top: 9px; overflow-x: auto; }
  .app-nav-item { min-width: 74px; flex: 1; }
  .app-shell { height: auto; min-height: calc(100vh - 105px); padding: 15px 0 24px; overflow: visible; }
  .app-title-row h1 { max-width: 100%; }
  .app-title-actions { width: 100%; justify-content: space-between; }
  #app-dashboard:not([hidden]) { display: block; }
  .app-workspace { min-height: auto; }
  .app-section { height: auto; min-height: 360px; overflow: visible; }
  .app-overview-section { display: block; }
  .app-vitals { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .app-vitals > div, .app-vitals > div:nth-child(3n), .app-vitals > div:nth-child(n + 4) { min-height: 125px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .app-vitals > div:nth-child(2n) { border-right: 0; }
  .app-vitals > div:nth-child(n + 5) { border-bottom: 0; }
  .app-route-row, .app-access-head { align-items: flex-start; flex-direction: column; }
  .domain-url { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
  .app-account-list, .app-usage-ledger { overflow: visible; }
  .app-account-facts, .app-usage-row-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #app-telemetry-panel, .app-access-section { display: block; }
  .app-unified-head { align-items: flex-start; flex-direction: column; gap: 10px; }
  .app-management-lists { grid-template-columns: 1fr; }
  .app-management-lists > section + section { border-top: 1px solid var(--line); border-left: 0; }
  .app-telemetry-facts, .app-access-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .app-telemetry-facts > div, .app-access-facts > div { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .app-telemetry-facts > div:nth-child(2n), .app-access-facts > div:nth-child(2n) { border-right: 0; }
  .downstream-card { min-height: 300px; }
  .app-settings-grid { grid-template-columns: 1fr; gap: 6px; }
}

@media (max-width: 480px) {
  .login-panel { padding: 15px; }
  .login-card { padding: 28px 22px; }
  .metrics { grid-template-columns: 1fr 1fr; }
  .identity { display: none; }
  .button { padding-inline: 12px; }
  .detail-status { grid-template-columns: 1fr; }
  .control-plane-summary { grid-template-columns: 1fr; }
  .subscriber-hero h1 { font-size: 3.2rem; }
  .public-header .button { font-size: .68rem; }
  .app-header, .app-shell { width: min(100% - 26px, 1180px); }
  .app-header-actions .mono { display: none; }
  .grant-form-grid, .downstream-facts { grid-template-columns: 1fr 1fr; }
  .app-title-actions { align-items: stretch; flex-direction: column; }
  .app-title-actions .state-pill { align-self: flex-start; }
  #app-primary-action { width: 100%; }
  .app-account-facts, .app-usage-row-facts { gap: 11px; }
  .app-account-actions { align-items: flex-start; flex-direction: column; }
  .app-account-action-buttons { justify-content: flex-start; }
  .app-management-item { align-items: flex-start; flex-direction: column; }
  .app-management-item .state-pill { align-self: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

/* C-12 product-wide closure: lower visual noise and stable workspace controls. */
:root { --radius: 10px; }

.wordmark .mark,
.wordmark.compact .mark {
  border-radius: 8px;
  box-shadow: none;
}

.button:hover:not(:disabled),
.icon-button:hover:not(:disabled) { transform: none; }

.panel,
.metrics article,
.app-auth-panel,
.app-section,
.dialog-shell {
  border-radius: 10px;
}

.panel,
.metrics article,
.dialog-shell { box-shadow: none; }
.metrics article::after { display: none; }

.app-nav {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.app-nav-item {
  min-height: 40px;
  padding-inline: 14px;
}

.app-nav-item[aria-selected="true"] {
  color: var(--text);
  background: rgba(112, 220, 225, .1);
}

.app-workspace[data-active-section="overview"] {
  flex: 0 0 auto;
}

.app-workspace[data-active-section="overview"] .app-overview-section {
  height: auto;
  min-height: 0;
}

.app-workspace[data-active-section="overview"] .app-vitals {
  min-height: 142px;
  flex: none;
}

.app-workspace[data-active-section="overview"] .app-vitals > div {
  justify-content: flex-start;
  padding: 18px 16px;
}

.detail-list:focus-visible,
.app-section:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: -2px;
}

@media (max-width: 760px) {
  html,
  body,
  .console,
  .workspace {
    max-width: 100%;
    overflow-x: hidden;
  }

  .sidebar,
  .sidebar nav,
  .topbar,
  .content,
  .panel,
  .table-wrap {
    min-width: 0;
    max-width: 100%;
  }

  .sidebar {
    overflow: hidden;
  }

  .sidebar nav {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    overflow: visible;
  }

  .nav-item {
    min-width: 0;
    gap: 5px;
    padding: 8px 4px;
    font-size: .7rem;
    white-space: nowrap;
  }

  .nav-item span {
    font-size: .8rem;
  }

  .table-wrap {
    width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
  }

  .table-wrap table {
    min-width: 620px;
  }

  .app-workspace[data-active-section="overview"] .app-vitals {
    min-height: 0;
  }

  .app-workspace[data-active-section="overview"] .app-vitals > div,
  .app-workspace[data-active-section="overview"] .app-vitals > div:nth-child(3n),
  .app-workspace[data-active-section="overview"] .app-vitals > div:nth-child(n + 4) {
    min-height: 96px;
    padding: 14px;
  }

  .app-vitals strong {
    margin-block: 7px 4px;
  }

  .app-route-row {
    gap: 12px;
    padding: 14px;
  }
}

@media (max-width: 420px) {
  .sidebar nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* C-17: keep fleet observation on the overview and return each task its full viewport. */
.content[data-active-section="overview"] {
  grid-template-rows: auto auto minmax(0, 1fr);
}

.fleet-telemetry-panel {
  grid-column: 1 / -1;
  min-height: 0;
  overflow: hidden;
}

.content:not([data-active-section="overview"]) .fleet-telemetry-panel {
  display: none;
}

.fleet-telemetry-panel .panel-heading {
  padding-block: 10px;
}

#fleet-telemetry-summary {
  display: flex;
  min-height: 48px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 16px;
  overflow: visible;
}

#fleet-telemetry-summary p {
  margin: 0;
}

@media (max-width: 760px) {
  .content[data-active-section="overview"] {
    grid-template-rows: auto auto auto auto;
  }

  #fleet-telemetry-summary {
    min-height: 0;
    align-items: flex-start;
    flex-direction: column;
    padding: 11px 14px;
  }

}

/* C-18: mobile Pool inventory is a complete record, not a clipped desktop row. */
@media (max-width: 760px) {
  .inventory-panel .table-wrap {
    overflow: visible;
  }

  .inventory-panel table {
    display: block;
    min-width: 0;
  }

  .inventory-panel thead {
    display: none;
  }

  #pool-table-body {
    display: grid;
    gap: 10px;
    padding: 12px;
  }

  #pool-table-body tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 14px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: rgba(4, 12, 19, .34);
  }

  #pool-table-body td {
    display: grid;
    min-width: 0;
    gap: 4px;
    padding: 0;
    border: 0;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  #pool-table-body td::before {
    color: var(--muted);
    font-size: .58rem;
    font-weight: 750;
    letter-spacing: .06em;
    text-transform: uppercase;
  }

  #pool-table-body td:first-child,
  #pool-table-body td:last-child {
    grid-column: 1 / -1;
  }

  #pool-table-body td:last-child {
    padding-top: 3px;
  }

  #pool-table-body td:last-child .row-button {
    width: 100%;
    min-height: 38px;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
  }

  #pool-table-body td:nth-child(1)::before { content: "Pool"; }
  #pool-table-body td:nth-child(2)::before { content: "租户"; }
  #pool-table-body td:nth-child(3)::before { content: "期望"; }
  #pool-table-body td:nth-child(4)::before { content: "当前"; }
  #pool-table-body td:nth-child(5)::before { content: "修订"; }
  #pool-table-body td:nth-child(6)::before { content: "操作"; }
}

/* C-27: fleet tasks, accounts, and deliveries remain complete touch records on mobile. */
@media (max-width: 760px) {
  .operations-table-wrap,
  .accounts-table-wrap,
  .deliveries-table-wrap {
    overflow: visible;
  }

  .operations-table-wrap table,
  .accounts-table-wrap table,
  .deliveries-table-wrap table {
    display: block;
    min-width: 0;
  }

  .operations-table-wrap thead,
  .accounts-table-wrap thead,
  .deliveries-table-wrap thead {
    display: none;
  }

  #fleet-operation-table-body,
  #fleet-account-table-body,
  #fleet-delivery-table-body {
    display: grid;
    gap: 10px;
    padding: 12px;
  }

  #fleet-operation-table-body tr,
  #fleet-account-table-body tr,
  #fleet-delivery-table-body tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 14px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: rgba(4, 12, 19, .34);
  }

  #fleet-operation-table-body td,
  #fleet-account-table-body td,
  #fleet-delivery-table-body td {
    display: grid;
    min-width: 0;
    gap: 4px;
    padding: 0;
    border: 0;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  #fleet-operation-table-body td::before,
  #fleet-account-table-body td::before,
  #fleet-delivery-table-body td::before {
    color: var(--muted);
    font-size: .58rem;
    font-weight: 750;
    letter-spacing: .06em;
    text-transform: uppercase;
  }

  #fleet-operation-table-body td:first-child,
  #fleet-operation-table-body td:last-child,
  #fleet-account-table-body td:first-child,
  #fleet-account-table-body td:last-child,
  #fleet-delivery-table-body td:first-child,
  #fleet-delivery-table-body td:last-child {
    grid-column: 1 / -1;
  }

  #fleet-operation-table-body td:last-child,
  #fleet-account-table-body td:last-child,
  #fleet-delivery-table-body td:last-child {
    display: flex;
    padding-top: 3px;
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  #fleet-operation-table-body td:last-child > *,
  #fleet-account-table-body td:last-child > *,
  #fleet-delivery-table-body td:last-child > * {
    min-height: 36px;
    flex: 1 1 112px;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
  }

  #fleet-delivery-table-body .delivery-correlation {
    min-width: 0;
  }

  #fleet-operation-table-body td:nth-child(1)::before { content: "Pool"; }
  #fleet-operation-table-body td:nth-child(2)::before { content: "任务"; }
  #fleet-operation-table-body td:nth-child(3)::before { content: "状态"; }
  #fleet-operation-table-body td:nth-child(4)::before { content: "尝试"; }
  #fleet-operation-table-body td:nth-child(5)::before { content: "更新时间"; }
  #fleet-operation-table-body td:nth-child(6)::before { content: "操作"; }
  #fleet-account-table-body td:nth-child(1)::before { content: "Pool"; }
  #fleet-account-table-body td:nth-child(2)::before { content: "账号"; }
  #fleet-account-table-body td:nth-child(3)::before { content: "健康"; }
  #fleet-account-table-body td:nth-child(4)::before { content: "状态"; }
  #fleet-account-table-body td:nth-child(5)::before { content: "检查时间"; }
  #fleet-account-table-body td:nth-child(6)::before { content: "操作"; }
  #fleet-delivery-table-body td:nth-child(1)::before { content: "Pool"; }
  #fleet-delivery-table-body td:nth-child(2)::before { content: "交付 / 订单"; }
  #fleet-delivery-table-body td:nth-child(3)::before { content: "状态"; }
  #fleet-delivery-table-body td:nth-child(4)::before { content: "尝试"; }
  #fleet-delivery-table-body td:nth-child(5)::before { content: "安全错误"; }
  #fleet-delivery-table-body td:nth-child(6)::before { content: "重试时间"; }
  #fleet-delivery-table-body td:nth-child(7)::before { content: "操作"; }
}

/* C-19 / R-106: the quiet star-sea control deck. */
::selection {
  color: #061526;
  background: rgba(112, 220, 225, .72);
}

.app-console-page { background: var(--bg-deep); }

.panel,
.metrics article,
.app-auth-panel,
.app-section,
.dialog-shell,
.login-card {
  border-color: color-mix(in srgb, var(--line) 86%, var(--violet));
}

.nav-item.active,
.app-nav-item[aria-selected="true"] {
  background: rgba(112, 220, 225, .09);
  border-color: rgba(112, 220, 225, .14);
}

.button.primary {
  background: linear-gradient(135deg, #8ce9e5, var(--cyan));
}

@media (prefers-reduced-motion: reduce) {
  .ambient { display: none; }
}

/* C-20 / R-107: resilient control states and lower-cost ambient paint. */
html {
  scrollbar-gutter: stable;
}

button,
a {
  touch-action: manipulation;
}

.ambient {
  contain: layout paint;
  filter: none;
}

.button,
.icon-button,
.nav-item,
.tab,
.dialog-close,
.row-button,
.mini-button,
.app-nav-item,
.app-vital-action,
.subscriber-link {
  transition:
    background 140ms ease,
    border-color 140ms ease,
    color 140ms ease,
    transform 100ms ease;
}

.button:active:not(:disabled),
.icon-button:active:not(:disabled),
.nav-item:active:not(:disabled),
.tab:active:not(:disabled),
.dialog-close:active:not(:disabled),
.row-button:active:not(:disabled),
.mini-button:active:not(:disabled),
.app-nav-item:active:not(:disabled),
.app-vital-action:active,
.subscriber-link:active {
  transform: translateY(1px);
}

.button:focus-visible,
.icon-button:focus-visible,
.nav-item:focus-visible,
.tab:focus-visible,
.dialog-close:focus-visible,
.row-button:focus-visible,
.mini-button:focus-visible,
.app-nav-item:focus-visible,
.app-vital-action:focus-visible,
.subscriber-link:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

button:disabled {
  cursor: not-allowed;
  opacity: .48;
}

.nav-item:hover:not(.active),
.app-nav-item:hover:not(.active) {
  color: var(--text);
  background: rgba(112, 220, 225, .05);
}

@supports (contain: layout) {
  .app-account-row,
  .app-usage-row,
  .downstream-item {
    contain: layout paint;
  }
}

@media (max-width: 760px) {
  html { scrollbar-gutter: auto; }
  body,
  .app-console-page {
    background: var(--bg-deep);
  }
  .ambient { display: none; }
}

/* The owner console is one continuous overview. */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.app-console-page {
  overflow-y: auto;
  letter-spacing: 0;
}

.app-console-page * { letter-spacing: 0; }

.app-header {
  position: sticky;
  z-index: 5;
  top: 0;
  grid-template-columns: 1fr auto 1fr;
  background: color-mix(in srgb, var(--bg-deep) 94%, transparent);
  backdrop-filter: blur(12px);
}

.app-shell {
  width: min(1120px, calc(100% - 40px));
  height: auto;
  min-height: calc(100vh - 65px);
  padding: 22px 0 64px;
  overflow: visible;
}

.app-title-row {
  min-height: 0;
  justify-content: flex-end;
  margin: 0 0 12px;
}

.app-title-row:has(#app-primary-action[hidden]) { display: none; }

#app-dashboard:not([hidden]) { display: block; }

.app-workspace,
.app-workspace[data-active-section="overview"] {
  display: block;
  min-height: 0;
}

.app-section,
.app-workspace[data-active-section="overview"] .app-overview-section {
  width: 100%;
  height: auto;
  min-height: 0;
  overflow: visible;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.app-route-row {
  gap: 20px;
  padding: 22px 0 26px;
  border-top: 0;
  border-bottom: 1px solid var(--line);
}

.app-route-copy { min-width: 0; }

.domain-url {
  display: block;
  max-width: min(780px, 70vw);
  margin-top: 7px;
  text-decoration: none;
}

.domain-url[href]:hover {
  color: #c7fffa;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.app-workspace[data-active-section="overview"] .app-vitals {
  min-height: 0;
  border-bottom: 1px solid var(--line);
}

.app-workspace[data-active-section="overview"] .app-vitals > div {
  min-height: 120px;
  padding: 24px 18px;
}

.app-console-block {
  scroll-margin-top: 78px;
  padding: 30px 0;
  border-bottom: 1px solid var(--line);
}

.app-console-block:last-child { border-bottom: 0; }

.account-card,
.app-access-section,
#app-telemetry-panel {
  display: block;
  height: auto;
  overflow: visible;
}

.panel-heading,
.compact-heading,
.app-unified-head,
.app-access-head {
  padding: 0 0 15px;
  border: 0;
}

.app-management-lists {
  margin: 4px 0 24px;
  border-block: 0;
  border-bottom: 1px solid var(--line);
}

.app-management-list-head,
.app-management-item { padding-inline: 0; }

.app-account-heading-row,
.app-settings { border-top: 0; }

.app-account-row,
.app-usage-row,
.downstream-item {
  padding-inline: 0;
  background: transparent;
}

.app-account-list,
.app-usage-ledger,
.downstream-list {
  max-height: none;
  overflow: visible;
}

.app-access-facts,
.app-telemetry-facts {
  border-block: 0;
  border-bottom: 1px solid var(--line);
}

.app-access-facts > div:first-child,
.app-telemetry-facts > div:first-child { padding-left: 0; }

.app-settings-grid { padding-inline: 0; }
.app-settings-status { padding-inline: 0; }

.downstream-card {
  margin-top: 26px;
  overflow: visible;
}

@media (max-width: 760px) {
  .app-header,
  .app-shell { width: min(100% - 28px, 1120px); }

  .app-header { grid-template-columns: 1fr auto auto; }

  .app-shell { padding-top: 14px; }

  .app-route-row {
    align-items: flex-start;
    padding: 18px 0 22px;
  }

  .domain-url { max-width: 100%; }

  .app-workspace[data-active-section="overview"] .app-vitals {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .app-workspace[data-active-section="overview"] .app-vitals > div,
  .app-workspace[data-active-section="overview"] .app-vitals > div:nth-child(3n),
  .app-workspace[data-active-section="overview"] .app-vitals > div:nth-child(n + 4) {
    min-height: 102px;
    padding: 18px 12px;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }

  .app-workspace[data-active-section="overview"] .app-vitals > div:nth-child(2n) { border-right: 0; }
  .app-workspace[data-active-section="overview"] .app-vitals > div:nth-last-child(-n + 2) { border-bottom: 0; }

  .app-console-block { padding: 24px 0; }

  .app-management-lists { grid-template-columns: 1fr; }
  .app-management-lists > section + section {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .app-access-facts,
  .app-telemetry-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .app-access-facts > div,
  .app-telemetry-facts > div,
  .app-access-facts > div:first-child,
  .app-telemetry-facts > div:first-child { padding: 12px 8px; }

  .app-settings-grid { grid-template-columns: 1fr; }
}

@media (prefers-contrast: more) {
  :root {
    --muted: #b4c6d2;
    --line: rgba(211, 231, 241, .36);
    --line-strong: rgba(225, 241, 248, .62);
  }
  .button.quiet,
  .icon-button,
  .mini-button,
  .panel,
  .app-section,
  .dialog-shell { border-color: var(--line-strong); }
}

@media (prefers-reduced-transparency: reduce) {
  body,
  .app-console-page { background: var(--bg-deep); }
  .ambient { display: none; }
  .dialog::backdrop { backdrop-filter: none; }
}

@media (forced-colors: active) {
  body,
  .app-console-page,
  .sidebar,
  .panel,
  .app-section,
  .dialog-shell { color: CanvasText; background: Canvas; }
  .ambient { display: none; }
  .button,
  .icon-button,
  .nav-item,
  .tab,
  .dialog-close,
  .row-button,
  .mini-button,
  .app-nav-item {
    color: ButtonText;
    background: ButtonFace;
    border: 1px solid ButtonText;
  }
  .button:focus-visible,
  .icon-button:focus-visible,
  .nav-item:focus-visible,
  .tab:focus-visible,
  .dialog-close:focus-visible,
  .row-button:focus-visible,
  .mini-button:focus-visible,
  .app-nav-item:focus-visible { outline-color: Highlight; }
  .nav-item[aria-current="page"],
  .app-nav-item[aria-selected="true"],
  .tab[aria-selected="true"] {
    color: HighlightText;
    background: Highlight;
    border-color: Highlight;
  }
}

/* The subscriber page is a single overview, not a stack of dashboard cards. */
.app-console-page {
  background: var(--bg-deep);
}

.app-console-page .ambient {
  display: none;
}

.app-console-page .app-header {
  box-shadow: none;
}

.app-console-page .app-route-row {
  align-items: flex-end;
  justify-content: flex-start;
  gap: 16px;
}

.app-console-page .app-route-copy {
  flex: 0 1 auto;
}

.app-console-page .app-route-row .button {
  flex: 0 0 auto;
  min-height: 32px;
  padding-inline: 0;
  color: var(--cyan);
  background: transparent;
  border-color: transparent;
}

.app-console-page .app-console-block,
.app-console-page .account-card,
.app-console-page .app-access-section,
.app-console-page #app-telemetry-panel,
.app-console-page .downstream-card,
.app-console-page .app-section {
  background: transparent;
  border-radius: 0;
  box-shadow: none;
}

.app-console-page .app-workspace[data-active-section="overview"] .app-vitals,
.app-console-page .app-access-facts,
.app-console-page .app-telemetry-facts,
.app-console-page .app-management-lists {
  background: transparent;
  box-shadow: none;
}

.app-console-page .app-workspace[data-active-section="overview"] .app-vitals {
  gap: 28px;
  padding: 28px 0;
}

.app-console-page .app-access-facts,
.app-console-page .app-telemetry-facts {
  gap: 28px;
  padding: 18px 0 24px;
}

.app-console-page .app-workspace[data-active-section="overview"] .app-vitals > div,
.app-console-page .app-access-facts > div,
.app-console-page .app-telemetry-facts > div,
.app-console-page .downstream-facts div {
  min-height: 0;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.app-console-page .app-workspace[data-active-section="overview"] .app-vitals > div {
  justify-content: flex-start;
}

.app-console-page .app-workspace[data-active-section="overview"] .app-vitals strong {
  margin: 9px 0 5px;
}

.app-console-page .downstream-item,
.app-console-page .app-account-row,
.app-console-page .app-usage-row {
  background: transparent;
  border-radius: 0;
  box-shadow: none;
}

.app-console-page .panel-heading,
.app-console-page .app-access-head,
.app-console-page .app-unified-head {
  background: transparent;
}

@media (max-width: 760px) {
  .app-console-page .app-route-row {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .app-console-page .app-route-copy {
    min-width: 0;
    flex-basis: 100%;
  }

  .app-console-page .app-route-row .button {
    min-height: 30px;
  }

  .app-console-page .app-workspace[data-active-section="overview"] .app-vitals {
    gap: 24px 18px;
    padding: 24px 0;
  }

  .app-console-page .app-workspace[data-active-section="overview"] .app-vitals > div,
  .app-console-page .app-workspace[data-active-section="overview"] .app-vitals > div:nth-child(3n),
  .app-console-page .app-workspace[data-active-section="overview"] .app-vitals > div:nth-child(n + 4),
  .app-console-page .app-workspace[data-active-section="overview"] .app-vitals > div:nth-child(2n),
  .app-console-page .app-workspace[data-active-section="overview"] .app-vitals > div:nth-last-child(-n + 2) {
    min-height: 76px;
    padding: 0;
    border: 0;
  }

  .app-console-page .app-access-facts,
  .app-console-page .app-telemetry-facts {
    gap: 22px 16px;
  }

  .app-console-page .app-access-facts > div,
  .app-console-page .app-telemetry-facts > div,
  .app-console-page .app-access-facts > div:first-child,
  .app-console-page .app-telemetry-facts > div:first-child {
    padding: 0;
    border: 0;
  }
}
