/* Carousel dispatcher. Local CSS only; shared by every server-rendered page. */
:root {
    --bg: #fbfcfd;
    --card-bg: #fff;
    --sidebar-bg: #263541;
    --sidebar-fg: #b7c9d7;
    --sidebar-fg-active: #fff;
    --text: #142a43;
    --text-muted: #72839a;
    --border: #dfe7ee;
    --accent: #14768a;
    --accent-hover: #106477;
    --accent-bg: #e5f2f5;
    --ok: #269a59;
    --ok-bg: #edf7f0;
    --warn: #956213;
    --warn-bg: #fff5df;
    --off: #8191a5;
    --off-bg: #edf1f5;
    --danger: #bb4140;
    --danger-bg: #fff0ef;
    --rail-width: 94px;
    --rail-width-expanded: 236px;
    --pool-sidebar-width: 244px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; }
button, a, summary, input, select, textarea { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid #67b5c6; outline-offset: 3px; }
input:focus, select:focus, textarea:focus { outline: 2px solid #bce0e7; outline-offset: 1px; border-color: var(--accent); }
h1, h2, h3, p { overflow-wrap: break-word; }
h1 { font-size: 32px; line-height: 1.2; letter-spacing: -.8px; font-weight: 650; }
h2 { font-size: 18px; font-weight: 600; }
h3 { font-size: 15px; }
.icon { display: inline-block; vertical-align: middle; flex-shrink: 0; }
.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; }
.skip-link { position: fixed; top: -80px; left: 110px; z-index: 100; background: white; padding: 12px; border: 1px solid var(--accent); }
.skip-link:focus { top: 12px; }
.app-shell { display: flex; min-height: 100vh; align-items: flex-start; }
/* Reserves the collapsed rail's layout space in the flex row; the visual
   sidebar itself is fixed-positioned and overlays on top of it, so
   expanding it on hover never reflows/pushes the rest of the page. */
.sidebar-rail { flex: 0 0 var(--rail-width); width: var(--rail-width); height: 100vh; height: 100dvh; }
.sidebar {
    --sidebar-size: var(--rail-width);
    --sidebar-label-opacity: 0;
    --sidebar-label-visibility: hidden;
    --sidebar-label-delay: 0s;
    --sidebar-word-offset: -24px;
    --sidebar-logo-turn: 0deg;
    position: fixed; top: 0; left: 0; width: var(--sidebar-size);
    height: 100vh; height: 100dvh; overflow-x: hidden; overflow-y: auto;
    scrollbar-width: none; display: flex; flex-direction: column;
    background: var(--sidebar-bg); color: var(--sidebar-fg); z-index: 30;
    transition: width .32s cubic-bezier(.22, 1, .36, 1), box-shadow .2s ease;
}
@media (min-width: 801px) {
    /* One state drives both the panel and its contents. Previously the
       wordmark reacted to hover even when the width's media query did not. */
    .sidebar:is(:hover, :focus-within) {
        --sidebar-size: var(--rail-width-expanded);
        --sidebar-label-opacity: 1;
        --sidebar-label-visibility: visible;
        --sidebar-label-delay: .1s;
        --sidebar-word-offset: 0px;
        --sidebar-logo-turn: 360deg;
        box-shadow: 6px 0 28px #0003;
    }
}
.sidebar-title { height: 83px; min-height: 83px; width: var(--rail-width-expanded); display: grid; grid-template-columns: var(--rail-width) 1fr; align-items: center; padding-right: 16px; text-decoration: none; color: #79c0cf; }
.sidebar-title span {
    opacity: var(--sidebar-label-opacity); visibility: var(--sidebar-label-visibility);
    transform: translateX(var(--sidebar-word-offset));
    font-size: 21px; font-weight: 650; color: inherit; white-space: nowrap;
    letter-spacing: -.3px; min-width: max-content;
    transition: opacity .2s ease var(--sidebar-label-delay), transform .32s ease var(--sidebar-label-delay), visibility 0s linear var(--sidebar-label-delay);
}
.brand-mark { width: 39px; height: 39px; flex-shrink: 0; }
.sidebar-title .brand-mark { justify-self: center; position: relative; z-index: 1; transform: rotate(var(--sidebar-logo-turn)); transition: transform .6s cubic-bezier(.22, 1, .36, 1); }
.sidebar-nav { display: flex; flex-direction: column; gap: 3px; width: var(--rail-width-expanded); }
.sidebar-nav a { min-height: 52px; display: grid; grid-template-columns: calc(var(--rail-width) - 6px) 1fr; align-items: center; padding: 9px 14px 9px 0; color: var(--sidebar-fg); text-decoration: none; border-left: 3px solid transparent; border-right: 3px solid transparent; font-size: 14px; font-weight: 500; }
.sidebar-nav a>.icon { justify-self: center; }
.sidebar-nav a .icon { color: #a7bece; }
.sidebar-nav a span { opacity: var(--sidebar-label-opacity); visibility: var(--sidebar-label-visibility); transition: opacity .2s ease var(--sidebar-label-delay), visibility 0s linear var(--sidebar-label-delay); }
.sidebar-nav a:hover { color: white; background: #ffffff08; }
.sidebar-nav a.nav-active { background: #344955; color: white; border-left-color: #4aafc0; }
.sidebar-nav .nav-active .icon { color: #65c0ce; }
.sidebar-footer { margin-top: auto; padding: 20px 0; display: flex; flex-direction: column; gap: 6px; width: var(--rail-width-expanded); }
.sidebar-footer a, .sidebar-footer button { display: grid; grid-template-columns: var(--rail-width) minmax(0, 1fr); align-items: center; gap: 0; padding: 0 16px 0 0; color: #a7bece; font-size: 14px; text-decoration: none; white-space: nowrap; background: none; border: 0; width: 100%; text-align: left; cursor: pointer; }
.sidebar-footer .icon { justify-self: center; }
.sidebar-footer button:hover { color: white; }
.sidebar-footer a span, .sidebar-footer button span { opacity: var(--sidebar-label-opacity); visibility: var(--sidebar-label-visibility); transition: opacity .2s ease var(--sidebar-label-delay), visibility 0s linear var(--sidebar-label-delay); overflow: hidden; text-overflow: ellipsis; }
.sidebar-logout { margin: 0; }
.workspace { flex: 1; min-width: 0; }
.workspace-bar { height: 55px; display: flex; align-items: center; gap: 10px; padding: 0 28px; font-size: 14px; background: #eef4f7; border-bottom: 1px solid #e8eff3; }
.workspace-brand { color: var(--text); font-weight: 650; font-size: 16px; text-decoration: none; letter-spacing: -.3px; }
.workspace-divider { color: #8195a4; }
.workspace-caption { margin-left: auto; font-size: 12px; color: #657a8d; }
.content { padding: 24px 28px 40px; min-width: 0; max-width: 1800px; margin: 0 auto; }
.breadcrumb { display: flex; align-items: center; gap: 10px; margin: 0 0 24px; color: #61788e; font-size: 13px; }
.breadcrumb a { text-decoration: none; }
.breadcrumb>span { color: #99a8b8; }
.content-header h1 { margin: 0 0 26px; }
/* Pool navigator: a separate working column, not another card. */
.pool-sidebar { position: sticky; top: 0; flex: 0 0 var(--pool-sidebar-width); width: var(--pool-sidebar-width); height: 100vh; height: 100dvh; padding: 70px 14px 24px; border-right: 1px solid #e4ebf1; background: #f9fbfd; overflow-y: auto; }
.pool-sidebar h2 { margin: 0 6px 20px; font-size: 20px; letter-spacing: -.35px; }
.pool-sidebar h2 a { text-decoration: none; color: var(--text); }
.pool-search { margin: 0 3px 17px; }
.search-input { position: relative; display: flex; align-items: center; gap: 10px; }
.search-input>.icon { position: absolute; left: 14px; color: #8a9aae; pointer-events: none; }
.search-input input[type="search"] { padding-left: 42px; }
.pool-search input[type="search"] { padding-right: 30px; }
.search-submit { position: absolute; right: 3px; display: grid; place-items: center; min-height: 34px; width: 27px; padding: 0; color: var(--text-muted); background: transparent; border: 0; }
.search-submit:hover { background: var(--accent-bg); color: var(--accent); }
.pool-list { display: flex; flex-direction: column; gap: 3px; }
.pool-list-item { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 55px; padding: 13px 14px; color: var(--text); border-radius: 4px; text-decoration: none; font-size: 14px; }
.pool-list-item>span:first-child { min-width: 0; overflow-wrap: anywhere; }
.pool-list-item small { display: block; color: var(--text-muted); font-size: 11px; font-weight: 400; }
.pool-list-item:hover { background: #edf4f7; }
.pool-list-item.is-selected { color: #106c82; font-weight: 600; background: #d9ebf0; }
.pool-list-count { color: #75889c; font-variant-numeric: tabular-nums; white-space: nowrap; }
.is-selected .pool-list-count { color: #106c82; }
.pool-create { display: flex; align-items: center; gap: 8px; margin: 22px 3px 0; padding: 19px 7px 0; border-top: 1px solid var(--border); text-decoration: none; font-weight: 600; }
.pool-all-link { display: block; margin: 12px 14px 0; font-size: 12px; }
.sidebar-empty { color: var(--text-muted); padding: 0 14px; font-size: 13px; }
/* Shared controls and surfaces. */
.panel { background: var(--card-bg); border: 1px solid var(--border); border-radius: 6px; padding: 22px; margin-bottom: 22px; }
.panel h2 { margin-top: 0; font-size: 17px; }
.panel-danger { background: var(--danger-bg); border-color: #edc3c0; }
.panel-danger h2 { color: var(--danger); }
details>summary { cursor: pointer; font-weight: 600; }
details[open]>summary { margin-bottom: 18px; }
.understated-panel { background: transparent; border-width: 1px 0 0; border-radius: 0; padding: 16px 0; margin: 0; }
.understated-panel>summary { font-size: 13px; color: #61788e; }
button, .btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 42px; padding: 10px 16px; border: 1px solid transparent; border-radius: 5px; background: var(--accent); color: white; font-size: 13px; font-weight: 600; cursor: pointer; text-decoration: none; line-height: 1.4; }
button:hover, .btn:hover { background: var(--accent-hover); }
button.btn-secondary, .btn-secondary { background: white; color: var(--accent); border-color: var(--border); }
button.btn-secondary:hover, .btn-secondary:hover { background: #eff6f8; border-color: #a2c9d2; }
.btn-outline { color: var(--accent); border-color: var(--accent); background: transparent; }
.btn-outline:hover { background: var(--accent-bg); }
button.btn-danger, .btn-danger { background: var(--danger-bg); color: var(--danger); border: 1px solid #e6b3b1; }
button.btn-danger:hover { background: #ffe5e2; }
button:disabled { cursor: default; opacity: .5; }
input[type="text"], input[type="number"], input[type="search"], input[type="password"], input[type="email"], input[type="url"], select, textarea { width: 100%; padding: 10px 12px; min-height: 42px; background: #fff; border: 1px solid #dce5ee; border-radius: 5px; color: var(--text); font-size: 14px; }
input::placeholder, textarea::placeholder { color: #8e9cb0; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); width: 16px; height: 16px; flex-shrink: 0; }
input[type="file"] { max-width: 100%; font-size: 13px; }
input[type="file"]::file-selector-button { padding: 9px 12px; margin-right: 12px; border: 1px solid var(--border); border-radius: 4px; color: var(--accent); background: #f5f9fb; cursor: pointer; }
textarea { resize: vertical; }
label { display: block; color: #65798e; font-size: 12px; margin-bottom: 6px; }
.checkbox-field { display: flex; align-items: center; gap: 8px; min-height: 42px; }
.checkbox-field label { margin: 0; }
form.inline-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); align-items: end; gap: 16px; }
form.stacked-form { display: flex; flex-direction: column; max-width: 700px; gap: 18px; }
.auth-body { background: var(--sidebar-bg); min-height: 100vh; margin: 0; }
.auth-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth-card { width: 100%; max-width: 360px; background: var(--card-bg); border-radius: 10px; padding: 36px 32px; box-shadow: 0 20px 60px #0004; }
.auth-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 28px; color: var(--sidebar-bg); font-size: 20px; font-weight: 650; }
.auth-brand .brand-mark { width: 34px; height: 34px; color: var(--accent); }
.auth-card form.stacked-form { max-width: none; gap: 16px; }
.auth-card .actions-row { margin-top: 6px; }
.auth-card button { width: 100%; }
.actions-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.inline-form .actions-row { margin: 0; }
.row-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 9px 15px; }
.row-actions .table-link { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.remove-form { display: inline; }
.text-muted { color: var(--text-muted); }
.metric-note { color: var(--text-muted); font-size: 12px; margin: 9px 0 0; }
.table-link { font-weight: 500; text-decoration: none; }
.table-link:hover, .number-link:hover { text-decoration: underline; }
.cell-subtitle { display: block; color: #8292a8; font-size: 11px; margin-top: 4px; overflow-wrap: anywhere; font-weight: 400; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; font-size: 12px; }
.numeric { font-variant-numeric: tabular-nums; }
.flash { padding: 13px 16px; margin-bottom: 20px; border: 1px solid; border-radius: 5px; font-size: 13px; }
.flash-success { background: var(--ok-bg); border-color: #c9e6d3; color: #247845; }
.flash-error { background: var(--danger-bg); border-color: #edc3c0; color: var(--danger); }
.cb-banner { display: flex; flex-direction: column; gap: 6px; background: var(--danger); color: white; padding: 12px 16px; border-radius: 5px; margin-bottom: 20px; font-size: 13px; }
.cb-banner-row { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.cb-banner a { color: white; font-weight: 600; }
.badge { display: inline-block; padding: 4px 9px; border-radius: 4px; font-size: 11px; font-weight: 500; }
.badge-ok { color: var(--ok); background: var(--ok-bg); }
.badge-warn { color: var(--warn); background: var(--warn-bg); }
.badge-off { color: #6c7d90; background: var(--off-bg); }
.badge-danger { color: var(--danger); background: var(--danger-bg); }
.badge-live { color: var(--accent); background: var(--accent-bg); }
.status-label { display: inline-flex; align-items: center; gap: 11px; font-size: 13px; white-space: nowrap; }
.status-label::before { content: ""; width: 8px; height: 8px; flex: 0 0 8px; border-radius: 50%; background: var(--off); }
.status-label.is-on::before { background: var(--ok); }
.status-label.is-live::before { background: var(--accent); }
.status-label.is-warn::before { background: #d6a045; }
.status-label.is-off { color: var(--text-muted); }
/* Tables keep real actions, pagination and readable spacing. */
.table-scroll { overflow-x: auto; border: 1px solid #e7edf2; border-radius: 6px; }
table { width: 100%; border-spacing: 0; border-collapse: separate; background: white; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 13px 17px; font-size: 13px; vertical-align: middle; border-bottom: 1px solid #edf2f6; }
th { color: var(--text); background: #edf3f7; font-weight: 600; font-size: 12px; white-space: nowrap; }
thead th:first-child { border-top-left-radius: 5px; }
thead th:last-child { border-top-right-radius: 5px; }
tbody tr:nth-child(even) { background: #f3f7fa; }
tbody tr:hover { background: #eaf3f6; }
tbody tr:last-child td { border-bottom: 0; }
.content>table { border: 1px solid var(--border); border-radius: 6px; margin: 20px 0; }
.sort-link { color: inherit; text-decoration: none; white-space: nowrap; }
.sort-link:hover, .sort-link.sort-active { color: var(--accent); }
.empty-state { color: var(--text-muted); text-align: center; padding: 48px 20px; line-height: 2; }
.tab-nav { display: flex; gap: 6px; margin: 0 0 20px; border-bottom: 1px solid var(--border); overflow-x: auto; }
.tab-nav a { padding: 10px 17px; text-decoration: none; white-space: nowrap; color: var(--text-muted); border-bottom: 2px solid transparent; }
.tab-nav a.tab-active { color: var(--accent); border-color: var(--accent); font-weight: 600; }
.pagination { display: flex; align-items: center; justify-content: flex-end; gap: 17px; font-size: 13px; font-variant-numeric: tabular-nums; }
.icon-button { display: inline-grid; place-items: center; width: 38px; height: 38px; color: #70849c; border: 1px solid var(--border); background: white; border-radius: 5px; text-decoration: none; }
.icon-button:hover { background: var(--accent-bg); border-color: #b9d5dd; }
.icon-button.is-disabled { opacity: .4; }
/* Pool detail follows the dispatcher reference. */
.pool-breadcrumb { margin-bottom: 22px; }
.pool-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.title-with-status { display: flex; align-items: center; flex-wrap: wrap; gap: 20px; }
.title-with-status h1 { margin: 0; font-size: 37px; letter-spacing: -.9px; }
.title-with-status .is-on { color: var(--ok); }
.pool-subtitle { margin: 7px 0 0; color: var(--text-muted); font-size: 14px; }
.pool-subtitle>span { margin: 0 10px; }
.pool-heading-actions { display: flex; gap: 12px; flex-wrap: wrap; padding-top: 0; }
.pool-heading-actions .btn { min-height: 46px; padding: 11px 19px; font-size: 14px; }
.pool-metrics { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 18px 0; margin-bottom: 18px; }
.pool-metrics>div { text-align: center; border-right: 1px solid var(--border); }
.pool-metrics>div:last-child { border: 0; }
.pool-metrics strong { display: block; font-size: 31px; letter-spacing: -.6px; line-height: 1.25; font-weight: 650; font-variant-numeric: tabular-nums; }
.pool-metrics span { display: block; color: var(--text-muted); font-size: 14px; margin-top: 1px; }
.pool-toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.pool-toolbar .number-search { width: 320px; max-width: 40%; }
.pool-toolbar select { width: 190px; }
.pool-toolbar input, .pool-toolbar select { min-height: 44px; }
.pool-toolbar .btn { min-height: 44px; }
.filter-reset { font-size: 12px; text-decoration: none; }
.pool-numbers-table th, .pool-numbers-table td { padding: 13px 16px; font-size: 14px; }
.pool-table-scroll { max-height: max(280px, calc(100dvh - 455px)); }
.pool-numbers-table thead th { position: sticky; top: 0; z-index: 1; }
.pool-numbers-table th { padding-top: 15px; padding-bottom: 15px; font-size: 13px; }
.pool-numbers-table th:first-child { width: 17%; }
.pool-numbers-table th:nth-child(2) { width: 27%; }
.pool-numbers-table td { height: 59px; border-bottom: 0; }
.number-link { color: var(--text); text-decoration: none; white-space: nowrap; }
.number-carrier { display: block; font-size: 10px; line-height: 1.3; margin-top: 3px; }
.number-carrier a { color: #8997a8; text-decoration: none; }
.number-carrier a:hover { color: var(--accent); }
.answer-rate { display: flex; align-items: center; gap: 24px; min-width: 182px; }
.rate-track { display: block; width: 120px; height: 6px; border-radius: 6px; background: #dde6ee; overflow: hidden; }
.rate-track>span { height: 100%; display: block; background: var(--accent); }
.rate-value { min-width: 57px; line-height: 1.35; }
.rate-value small { display: block; font-size: 11px; color: #8c9bb0; margin-top: 1px; white-space: nowrap; }
.is-initial .rate-track { height: 3px; border-radius: 0; background: repeating-linear-gradient(to right, #bdcbd9 0, #bdcbd9 7px, transparent 7px, transparent 11px); }
.is-initial .rate-track>span { display: none; }
.pool-numbers-table .action-heading, .pool-numbers-table .action-cell { text-align: center; width: 48px; padding-left: 9px; padding-right: 9px; }
.action-heading .icon { color: #698298; }
.row-menu { display: inline-block; text-align: left; }
.row-menu>summary { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 4px; color: #7990a4; list-style: none; cursor: pointer; margin: 0; }
.row-menu>summary::-webkit-details-marker { display: none; }
.row-menu>summary:hover, .row-menu[open]>summary { color: var(--accent); background: #dceef2; }
.row-menu-content { position: absolute; right: 32px; z-index: 60; width: 210px; padding: 5px; border: 1px solid var(--border); border-radius: 6px; background: white; box-shadow: 0 6px 24px #152f481a; }
.row-menu-content a, .row-menu-content button { display: flex; gap: 10px; align-items: center; justify-content: flex-start; width: 100%; padding: 10px 9px; border: 0; border-radius: 3px; color: var(--text); background: transparent; font-weight: 400; text-decoration: none; min-height: 36px; font-size: 12px; }
.row-menu-content .menu-danger { color: var(--danger); }
.row-menu-content a:hover, .row-menu-content button:hover { background: #f0f6f8; }
.row-menu-content .menu-danger:hover { background: var(--danger-bg); }
.pool-table-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin: 26px 0 24px; }
.pool-table-footer>span { color: var(--text-muted); font-size: 12px; }
.pool-secondary-actions { display: flex; flex-wrap: wrap; gap: 20px; padding: 3px 0 19px; }
.text-action { display: inline-flex; align-items: center; gap: 7px; text-decoration: none; font-size: 12px; }
.active-calls-list { display: flex; flex-wrap: wrap; gap: 10px 22px; list-style: none; padding: 0; margin: 0; }
.section-intro { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.section-intro p { margin: 0; }
.pool-overview-table .row-actions { font-size: 12px; }
/* Existing operational pages use the same quiet surfaces and typography. */
.overview-hero { display: grid; grid-template-columns: 1.5fr 1fr; gap: 30px; align-items: center; padding: 30px; border: 1px solid var(--border); border-radius: 6px; background: #f1f7f9; margin-bottom: 26px; }
.eyebrow { font-size: 11px; color: var(--accent); letter-spacing: 1px; text-transform: uppercase; font-weight: 600; }
.overview-hero h2 { font-size: 33px; font-weight: 600; letter-spacing: -.9px; line-height: 1.2; margin: 14px 0; }
.overview-hero p { max-width: 420px; color: var(--text-muted); }
.flow-preview { width: 100%; max-width: 300px; justify-self: end; }
.flow-node { padding: 10px 14px; background: white; border: 1px solid var(--border); border-radius: 4px; font-size: 13px; font-weight: 500; }
.flow-node>span { float: left; color: #8da1b2; font-size: 11px; padding: 3px 12px 0 0; }
.flow-node small { display: block; color: var(--text-muted); font-size: 11px; font-weight: 400; padding-left: 26px; }
.flow-primary { border-color: #85bdc9; background: #eaf5f7; }
.flow-connector { text-align: center; color: #94adb9; line-height: 22px; }
.flow-preview p { text-align: center; font-size: 11px; margin-bottom: 0; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.section-heading h2 { margin: 0; font-size: 16px; }
.section-heading>span, .section-heading>a { font-size: 12px; color: var(--text-muted); text-decoration: none; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin-bottom: 28px; }
.card { background: white; border: 1px solid var(--border); border-radius: 6px; padding: 20px 22px; }
.card-label { color: var(--text-muted); font-size: 13px; }
.card-label span { float: right; color: #8da1b2; }
.card-value { font-size: 30px; font-weight: 600; letter-spacing: -.7px; margin: 6px 0; }
.metric-link { color: var(--text); text-decoration: none; }
.metric-link:hover { border-color: #a4cbd4; background: #f7fbfc; }
.metrics-strip { display: grid; grid-template-columns: repeat(4, 1fr); border-block: 1px solid var(--border); padding: 20px 0; margin-bottom: 24px; }
.metrics-strip>div { padding: 0 20px; border-right: 1px solid var(--border); }
.metrics-strip>div:last-child { border: 0; }
.metrics-strip span { color: var(--text-muted); font-size: 12px; display: block; }
.metrics-strip strong { font-size: 26px; font-weight: 600; display: block; margin-top: 5px; }
.dashboard-columns { display: grid; grid-template-columns: 1.6fr 1fr; gap: 22px; }
.bar-chart { height: 135px; display: flex; align-items: end; gap: 5px; border-bottom: 1px solid var(--border); background: repeating-linear-gradient(to top, transparent 0, transparent 32px, #eff3f6 33px, #eff3f6 34px); }
.bar-slot { display: flex; align-items: end; flex: 1; height: 100%; min-width: 0; }
.bar-slot>span { width: 100%; min-height: 2px; border-radius: 2px 2px 0 0; background: #69aebb; }
.bar-slot>span[data-count="0"] { background: #dce8ed; }
.bar-slot:hover>span { background: var(--accent); }
.chart-axis { display: flex; justify-content: space-between; color: var(--text-muted); font-size: 10px; margin-top: 8px; }
.sip-metric { display: flex; gap: 14px; align-items: center; margin: 16px 0; font-size: 13px; }
.meter { flex: 1; height: 6px; background: #edf2f6; border-radius: 4px; }
.meter>span { display: block; height: 100%; background: #6badb8; border-radius: 4px; }
.system-panel { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.system-panel h2 { margin: 0; }
.health-list { display: flex; flex-wrap: wrap; gap: 12px; }
.detail-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
dt { color: var(--text-muted); font-size: 12px; }
dd { margin: 7px 0 0; overflow-wrap: anywhere; }
.settings-list>div { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--border); }
.settings-list dd { margin: 0; font-weight: 600; }
.session-summary { margin-top: 22px; }
.current-attempt-row { background: var(--warn-bg); }
.sip-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.check-list { padding-left: 20px; }
.check-list li { padding: 9px 0 10px 8px; color: var(--accent); }
.check-list a { text-decoration: none; font-weight: 500; }
.check-list small { display: block; font-size: 12px; color: var(--text-muted); margin-top: 5px; }
.capacity-target { display: flex; flex-direction: column; gap: 12px; justify-self: center; }
.capacity-target strong { font-size: 44px; letter-spacing: -1px; line-height: 1.1; }
.capacity-target small { font-size: 16px; letter-spacing: 0; color: var(--text-muted); }
.capacity-target>span { font-size: 13px; }
.compact-hero h2 { font-size: 30px; }
.readiness-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.readiness-grid article { padding: 16px 0; }
.readiness-grid p { color: var(--text-muted); font-size: 13px; }
.step-number { color: #6d9ba9; font-size: 12px; font-weight: 600; }
/* SIP provisioning retains every existing control and disclosure. */
.connection-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 22px; }
.connection-heading h2 { margin: 0; font-size: 21px; }
.connection-heading h2 small { font-size: 13px; margin-left: 8px; }
.connection-form { max-width: 1100px; }
.connection-form h2, .connection-form legend { font-size: 17px; font-weight: 600; }
.connection-form fieldset { min-width: 0; }
.connection-form legend { padding: 0 8px; }
.connection-form summary { cursor: pointer; font-weight: 600; }
.connection-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.connection-endpoint { display: grid; grid-template-columns: minmax(180px, 1fr) 110px 120px; gap: 16px; }
.connection-field { margin: 18px 0; }
.connection-endpoint>.connection-field { margin: 0; }
.connection-form input:not([type="checkbox"]), .connection-form select, .connection-form textarea { width: 100%; }
.connection-form small { display: block; }
.connection-form h3 { margin-top: 26px; font-size: 15px; }
.connection-notice { background: #f0f7f9; font-size: 13px; }
.connection-notice .badge { margin-right: 8px; }
.connection-notice li { margin-bottom: 6px; }
.connection-secret-note { padding: 14px; background: #f2f7f9; border-left: 3px solid #85b6c2; font-size: 13px; }
@media (min-width: 1600px) {
    :root { --pool-sidebar-width: 260px; }
    .content { padding: 27px 32px 44px; }
    .pool-numbers-table th, .pool-numbers-table td { padding-left: 20px; padding-right: 20px; }
    .rate-track { width: 144px; }
}
@media (max-height: 830px) and (min-width: 801px) {
    .sidebar-title { height: 66px; min-height: 66px; }
    .sidebar-nav a { min-height: 48px; }
    .sidebar-nav .icon { width: 23px; height: 23px; }
    .sidebar-footer { padding: 15px 0; }
}
@media (max-width: 1200px) {
    :root { --rail-width: 84px; --pool-sidebar-width: 205px; }
    .content { padding: 22px; }
    .workspace-bar { padding-inline: 22px; }
    .pool-sidebar { padding-inline: 10px; }
    .pool-sidebar h2 { font-size: 18px; }
    .pool-list-item { padding-inline: 11px; font-size: 13px; }
    .pool-heading { flex-wrap: wrap; }
    .title-with-status h1 { font-size: 33px; }
    .pool-numbers-table { min-width: 760px; }
    .pool-numbers-table th, .pool-numbers-table td { font-size: 13px; padding-inline: 12px; }
    .answer-rate { min-width: 155px; gap: 15px; }
    .rate-track { width: 90px; }
    .pool-heading-actions .btn { padding-inline: 14px; font-size: 13px; min-height: 42px; }
    .content>table { display: block; overflow-x: auto; }
    .dashboard-columns { grid-template-columns: 1.3fr 1fr; }
}
@media (max-width: 800px) {
    .app-shell { flex-wrap: wrap; }
    .sidebar-rail { flex: 0 0 100%; width: 100%; height: auto; }
    .sidebar { position: relative; flex: 0 0 100%; width: 100%; height: auto; flex-direction: row; align-items: center; overflow: hidden; transition: none; box-shadow: none; }
    .sidebar-nav a span { opacity: 1; visibility: visible; transition: none; }
    .sidebar-title { width: 62px; min-width: 62px; height: 78px; min-height: 0; grid-template-columns: 1fr; padding: 0; }
    .sidebar-title span { display: none; }
    .sidebar-title .brand-mark { transform: none; transition: none; }
    .brand-mark { width: 31px; height: 31px; }
    .sidebar-nav { flex-direction: row; flex: 1; min-width: 0; width: auto; overflow-x: auto; gap: 0; }
    .sidebar-nav a { display: flex; flex-direction: column; justify-content: center; text-align: center; min-width: 80px; min-height: 78px; border-left: 0; border-right: 0; border-bottom: 3px solid transparent; font-size: 10px; padding: 8px; gap: 6px; }
    .sidebar-nav .icon { width: 22px; height: 22px; }
    .sidebar-nav a.nav-active { border-left: 0; border-bottom-color: #4aafc0; }
    .sidebar-footer { display: none; }
    .pool-sidebar { position: static; flex: 0 0 100%; height: auto; width: 100%; padding: 16px; border-right: 0; border-bottom: 1px solid var(--border); display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; }
    .pool-sidebar h2 { font-size: 17px; margin: 0; }
    .pool-search { margin: 0; width: 200px; }
    .pool-list { flex-direction: row; overflow-x: auto; grid-column: 1 / -1; }
    .pool-list-item { min-width: 150px; white-space: nowrap; min-height: 45px; padding: 10px 12px; }
    .pool-create { grid-column: 1 / -1; border: 0; margin: 0; padding: 0; font-size: 12px; }
    .workspace { flex: 0 0 100%; }
    .workspace-bar { height: 49px; padding-inline: 18px; font-size: 12px; }
    .workspace-brand { font-size: 15px; }
    .content { padding: 22px 18px; }
    .pool-heading { gap: 18px; margin-bottom: 22px; }
    .pool-heading-actions { gap: 8px; }
    .pool-metrics strong { font-size: 26px; }
    .pool-metrics span { font-size: 12px; }
    .pool-toolbar { flex-wrap: wrap; gap: 8px; }
    .pool-toolbar .number-search { width: 100%; max-width: none; }
    .pool-toolbar select { flex: 1; width: auto; }
    .pool-table-footer { justify-content: flex-start; margin-top: 20px; }
    .pool-table-footer .pagination { margin-left: auto; }
    .section-intro { flex-wrap: wrap; }
    .overview-hero { padding: 24px; }
    .overview-hero h2 { font-size: 28px; }
    .dashboard-columns, .connection-grid { grid-template-columns: 1fr; }
    .cards, .metrics-strip, .readiness-grid, .detail-grid { grid-template-columns: repeat(2, 1fr); }
    .metrics-strip>div { padding: 12px 16px; }
    .metrics-strip>div:nth-child(2) { border-right: 0; }
    .system-panel { align-items: start; flex-direction: column; }
}
@media (max-width: 480px) {
    .workspace-caption { display: none; }
    .pool-sidebar { gap: 10px; }
    .pool-search { width: 175px; }
    .pool-search input[type="search"] { font-size: 12px; }
    .pool-heading-actions { width: 100%; }
    .pool-heading-actions .btn { flex: 1; padding: 10px 9px; font-size: 12px; gap: 6px; }
    .pool-heading-actions .icon { width: 17px; }
    .title-with-status { gap: 14px; }
    .title-with-status h1 { font-size: 31px; }
    .pool-subtitle { font-size: 12px; }
    .pool-metrics strong { font-size: 23px; }
    .pool-metrics span { font-size: 11px; }
    .pool-table-footer .pagination { margin-inline: auto; }
    .pool-secondary-actions { gap: 12px; }
    .content-header h1 { font-size: 28px; }
    .panel { padding: 18px; }
    .understated-panel { padding: 16px 0; }
    .overview-hero, .readiness-grid, .connection-endpoint { grid-template-columns: 1fr; }
    .flow-preview { display: none; }
    .connection-heading { flex-direction: column; align-items: start; }
    .card { padding: 16px; }
    .card-value { font-size: 25px; }
    .capacity-target { justify-self: start; }
    .section-heading>span { text-align: right; max-width: 45%; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }
