:root {
    color-scheme: light;
    --brand-primary: #2C4966;
    --brand-accent: #79A98F;
    --surface-raised: #F2F2EC;
    --surface-page: #FFFFFF;
    --surface-control: #FFFFFF;
    --text-main: #111111;
    --text-muted: #5B5B58;
    --line-color: #D8D8D2;
    --danger: #B10E1C;
    font-family: "Segoe UI Variable", "IBM Plex Sans", "Segoe UI", sans-serif;
    font-size: 14px;
}

* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; min-width: 320px; margin: 0; overflow: hidden; }
#app { height: 100%; overflow-y: auto; overscroll-behavior-y: contain; }
body { color: var(--text-main); background: var(--surface-page); }
button, a { font: inherit; }
a { color: inherit; }
.app-frame { display: flex; min-height: 100vh; height: auto; flex-direction: column; overflow: visible; background: var(--surface-page); color: var(--text-main); }
.app-frame--dark { --surface-raised: #252A2F; --surface-page: #171A1E; --surface-control: #202429; --text-main: #F2F2F2; --text-muted: #B7BDC2; --line-color: #454C52; }
.app-topbar { display: flex; min-height: 28px; justify-content: flex-end; padding: 0 max(24px, calc((100vw - 1180px) / 2)); background: #000; font-size: 13px; }
.header-tools { display: flex; align-items: center; gap: 8px; color: #fff; }
.header-tools fluent-button, .header-tools button { color: #fff; }
.header-user { max-width: 180px; overflow: hidden; color: #fff; text-overflow: ellipsis; white-space: nowrap; }
.app-header { display: flex; min-height: 88px; align-items: center; gap: 12px; padding: 12px max(24px, calc((100vw - 1180px) / 2)); color: #fff; background: var(--brand-primary); }
.brand-home { display: inline-flex; align-items: center; }
.brand-logo { display: block; width: auto; height: 64px; }
.brand-divider { width: 1px; height: 60px; margin: 0 8px; background: rgb(255 255 255 / 70%); }
.brand-title { font-size: 22px; font-weight: 700; }
.app-nav { display: flex; gap: 4px; padding: 0 max(24px, calc((100vw - 1180px) / 2)); background: #101010; }
.nav-tab { display: inline-flex; min-height: 42px; align-items: center; padding: 0 14px; border-bottom: 2px solid transparent; border-radius: 4px 4px 0 0; color: #fff; text-decoration: none; }
.nav-tab.active { border-bottom-color: var(--brand-accent); background: var(--brand-primary); }
.admin-main { width: min(100%, 1180px); flex: 1 0 auto; margin: 0 auto; padding: 28px 24px 40px; overflow: visible; }
.page-section { display: flex; flex-direction: column; gap: 16px; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
h1, h2, p { margin: 0; }
h1 { font-size: 24px; }
h2 { font-size: 16px; }
.eyebrow { margin-bottom: 4px; color: var(--muted); font-size: 11px; font-weight: 650; }
.view-tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--line-color); }
.view-tab { padding: 10px 14px; border: 0; border-bottom: 3px solid transparent; background: transparent; color: var(--text-muted); cursor: pointer; }
.view-tab--active { border-bottom-color: var(--brand-accent); color: var(--text-main); font-weight: 650; }
.metric-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); gap: 8px; }
.metric { min-height: 74px; display: flex; flex-direction: column; justify-content: space-between; padding: 12px; border: 1px solid var(--line-color); border-radius: 6px; background: var(--surface-raised); }
.metric span, .section-hint, .footnote { color: var(--text-muted); font-size: 12px; }
.metric strong { font-size: 20px; font-variant-numeric: tabular-nums; }
.data-section { padding: 16px; border: 1px solid var(--line-color); border-radius: 6px; background: var(--surface-raised); }
.section-heading--compact { margin-bottom: 12px; }
.table-scroll { overflow-x: auto; }
.data-table { width: 100%; min-width: 900px; border-collapse: collapse; }
.data-table th { padding: 9px 10px; background: color-mix(in srgb, var(--brand-primary) 5%, var(--surface-page)); color: var(--text-muted); font-size: 10px; font-weight: 650; text-align: left; text-transform: uppercase; }
.data-table td { padding: 10px; border-bottom: 1px solid var(--line-color); font-size: 12px; vertical-align: middle; }
.data-table tr:last-child td { border-bottom: 0; }
.sub-value { display: block; margin-top: 3px; color: var(--text-muted); font-size: 11px; }
.status-pill, .result-pill { display: inline-flex; padding: 2px 7px; border: 1px solid currentColor; border-radius: 999px; font-size: 11px; white-space: nowrap; }
.status-pill--completed, .result-pill--success { color: #176b3a; }
.status-pill--failed, .result-pill--failure { color: var(--danger); }
.status-pill--provisioning { color: #895b00; }
.status-pill--decommissioning { color: #895b00; }
.decommission-panel { display: grid; width: min(320px, 100%); gap: 8px; padding: 10px; border-left: 3px solid var(--danger); background: var(--surface-page); }
.details-panel, .migration-panel { display: grid; width: min(320px, 100%); gap: 8px; padding: 10px; border-left: 3px solid var(--brand-accent); background: var(--surface-page); }
.details-panel label, .migration-panel label { display: grid; gap: 4px; }
.details-panel input, .migration-panel input { width: 100%; min-width: 0; min-height: 36px; padding: 6px 8px; border: 1px solid var(--line-color); border-radius: 4px; background: var(--surface-control); color: var(--text-main); }
.details-panel p, .migration-panel p { color: var(--text-muted); line-height: 1.4; }
.migration-panel fieldset { display: grid; gap: 8px; min-width: 0; margin: 0; padding: 0; border: 0; }
.migration-panel legend { margin-bottom: 8px; font-weight: 600; }
.migration-panel .notice--error { color: var(--danger); }
.decommission-panel p { color: var(--text-muted); line-height: 1.4; }
.decommission-check, .decommission-input { display: grid; grid-template-columns: auto 1fr; align-items: start; gap: 7px; line-height: 1.4; }
.decommission-input { grid-template-columns: 1fr; }
.decommission-input input { width: 100%; min-width: 0; min-height: 36px; padding: 6px 8px; border: 1px solid var(--line-color); border-radius: 4px; background: var(--surface-control); color: var(--text-main); }
.decommission-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.empty-state, .notice { padding: 18px; color: var(--text-muted); }
.notice--error { color: var(--danger); }
.loading-state { padding: 40px; text-align: center; color: var(--text-muted); }
.footnote { line-height: 1.5; }
.app-footer { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; margin-top: auto; padding: 32px max(24px, calc((100vw - 1180px) / 2)) 40px; color: #fff; background: #000; }
.footer-heading { margin: 0; font-size: 26px; font-weight: 700; }
.footer-link, .footer-link:visited { color: #fff; font-size: 16px; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.footer-link:hover, .footer-link:focus-visible { color: #fff; text-decoration-thickness: 2px; }
#blazor-error-ui { display: none; }

@media (max-width: 640px) {
    .app-topbar { padding: 0 14px; }
    .app-header { min-height: 64px; padding: 8px 14px; }
    .brand-logo { height: 40px; }
    .brand-divider { height: 40px; margin: 0 2px; }
    .brand-title { font-size: 16px; }
    .app-nav { padding: 0 10px; overflow-x: auto; }
    .nav-tab { white-space: nowrap; }
    .admin-main { padding: 20px 14px 32px; }
    .header-user { display: none; }
    .app-footer { padding: 24px 14px 28px; }
    .section-heading { align-items: flex-start; }
}