        :root {
            color-scheme: dark;
            --bg-color: #07111f;
            --card-bg: rgba(16, 31, 51, 0.88);
            --card-raised: #13243a;
            --border-color: rgba(148, 181, 216, 0.16);
            --primary: #57d5ff;
            --success: #42d392;
            --danger: #ff6b78;
            --warning: #ffcc70;
            --text-main: #f2f7fc;
            --text-muted: #9aacc2;
        }

        * { box-sizing: border-box; }
        body {
            min-height: 100vh;
            margin: 0;
            padding: 30px clamp(16px, 4vw, 56px) 48px;
            color: var(--text-main);
            background:
                radial-gradient(ellipse at 12% 0%, rgba(19, 110, 150, 0.2), transparent 34rem),
                radial-gradient(ellipse at 92% 10%, rgba(72, 81, 170, 0.16), transparent 30rem),
                var(--bg-color);
            font-family: Inter, "Segoe UI", system-ui, sans-serif;
        }

        button, input, select { font: inherit; }
        button { cursor: pointer; }
        button:focus-visible, input:focus-visible, select:focus-visible {
            outline: 2px solid var(--primary);
            outline-offset: 3px;
        }
        .shell { max-width: 1440px; margin: 0 auto; }
        .header {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            gap: 24px;
            margin-bottom: 26px;
        }
        .eyebrow {
            color: var(--primary);
            font-size: 11px;
            font-weight: 800;
            letter-spacing: .16em;
            text-transform: uppercase;
        }
        .header h1 { margin: 9px 0 7px; font-size: clamp(26px, 3vw, 38px); letter-spacing: -.04em; }
        .subtitle { color: var(--text-muted); font-size: 14px; line-height: 1.6; }
        .header-status { display: flex; align-items: center; gap: 10px; margin-top: 9px; white-space: nowrap; }
        .badge {
            display: inline-flex;
            align-items: center;
            gap: 7px;
            padding: 7px 11px;
            border: 1px solid var(--border-color);
            border-radius: 999px;
            font-size: 10px;
            font-weight: 800;
            letter-spacing: .06em;
            text-transform: uppercase;
        }
        .badge::before { width: 7px; height: 7px; border-radius: 50%; background: currentColor; content: ""; }
        .badge-healthy { color: var(--success); background: rgba(66, 211, 146, .08); border-color: rgba(66, 211, 146, .28); }
        .badge-danger { color: var(--danger); background: rgba(255, 107, 120, .08); border-color: rgba(255, 107, 120, .3); }
        .badge-pending { color: var(--warning); background: rgba(255, 204, 112, .08); }

        .section-label {
            display: flex;
            align-items: center;
            gap: 9px;
            margin: 28px 0 13px;
            color: #dce8f5;
            font-size: 13px;
            font-weight: 750;
        }
        .section-label span { color: var(--text-muted); font-size: 11px; font-weight: 500; }
        .config-bar, .card, .console-card {
            background: linear-gradient(145deg, rgba(20, 38, 61, .94), rgba(13, 27, 45, .96));
            border: 1px solid var(--border-color);
            border-radius: 16px;
            box-shadow: 0 16px 40px rgba(0, 0, 0, .16);
        }
        .config-bar { display: grid; grid-template-columns: auto 1fr 1fr auto; gap: 12px; align-items: center; padding: 16px; }
        .config-title { color: #dce8f5; font-size: 12px; font-weight: 700; }
        input, select {
            width: 100%;
            min-width: 0;
            padding: 11px 12px;
            color: var(--text-main);
            background: rgba(4, 12, 23, .72);
            border: 1px solid var(--border-color);
            border-radius: 9px;
            font-size: 12px;
            transition: border-color .2s, box-shadow .2s;
        }
        input:focus, select:focus { border-color: rgba(87, 213, 255, .6); box-shadow: 0 0 0 3px rgba(87, 213, 255, .08); outline: none; }
        .grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
        .card { min-width: 0; padding: 20px; transition: border-color .2s, transform .2s, box-shadow .2s; }
        .card:hover { border-color: rgba(87, 213, 255, .3); box-shadow: 0 18px 46px rgba(0, 0, 0, .22); }
        .region-card.healthy { border-top: 2px solid var(--success); }
        .region-card.down { border-top: 2px solid var(--danger); }
        .region-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
        .region-title { display: flex; align-items: center; gap: 11px; }
        .region-icon {
            display: grid;
            width: 42px;
            height: 42px;
            place-items: center;
            border: 1px solid var(--border-color);
            border-radius: 12px;
            background: rgba(87, 213, 255, .08);
            font-size: 20px;
        }
        .region-header h3 { margin: 0; font-size: 16px; }
        .region-code { display: block; margin-top: 4px; color: var(--text-muted); font-size: 11px; }
        .region-copy { margin: 18px 0 14px; color: var(--text-muted); font-size: 12px; line-height: 1.6; }
        .btn-group { display: flex; gap: 9px; }
        button {
            min-height: 39px;
            padding: 9px 13px;
            color: #04111d;
            background: var(--primary);
            border: 1px solid transparent;
            border-radius: 9px;
            font-size: 12px;
            font-weight: 750;
            transition: transform .18s, filter .18s, border-color .18s;
        }
        button:hover { transform: translateY(-1px); filter: brightness(1.08); }
        button:active { transform: translateY(0); }
        button:disabled { cursor: wait; opacity: .6; transform: none; }
        .btn-danger { color: #fff; background: rgba(255, 107, 120, .16); border-color: rgba(255, 107, 120, .32); }
        .btn-secondary { color: var(--text-main); background: rgba(148, 181, 216, .09); border-color: var(--border-color); }
        .btn-success { color: #062016; background: var(--success); }
        .btn-small { min-height: 35px; white-space: nowrap; }
        .form-card { display: flex; flex-direction: column; }
        .card-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 18px; }
        .card-heading h3 { margin: 0; font-size: 16px; }
        .card-heading p { margin: 5px 0 0; color: var(--text-muted); font-size: 11px; line-height: 1.5; }
        .method-tag { padding: 5px 8px; border-radius: 6px; color: var(--primary); background: rgba(87, 213, 255, .08); font-family: Consolas, monospace; font-size: 10px; font-weight: 700; }
        .form-group { margin-bottom: 13px; }
        .form-group label { display: block; margin-bottom: 7px; color: #c4d2e3; font-size: 11px; font-weight: 650; }
        .form-hint { display: block; margin-top: 6px; color: var(--text-muted); font-size: 10px; }
        .form-action { width: 100%; margin-top: auto; }
        .table-card { padding: 0; overflow: hidden; }
        .table-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px; }
        .table-tools { display: flex; align-items: center; gap: 9px; }
        .table-tools select { width: 165px; }
        .table-tools input { width: 190px; }
        .live-refresh {
            display: inline-flex;
            align-items: center;
            gap: 7px;
            color: var(--text-muted);
            font-size: 10px;
            white-space: nowrap;
            cursor: pointer;
        }
        .live-refresh input { width: 14px; height: 14px; margin: 0; accent-color: var(--success); }
        .live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 10px rgba(66, 211, 146, .65); }
        .live-refresh input:not(:checked) + .live-dot { background: var(--text-muted); box-shadow: none; }
        .table-wrap { width: 100%; overflow-x: auto; }
        table { width: 100%; border-collapse: collapse; text-align: left; font-size: 12px; }
        th, td { padding: 13px 18px; border-top: 1px solid var(--border-color); }
        th { color: var(--text-muted); background: rgba(3, 11, 21, .3); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
        td { color: #dce7f3; white-space: nowrap; }
        tbody tr { transition: background .16s; }
        tbody tr:hover { background: rgba(87, 213, 255, .04); }
        .empty-cell { padding: 28px; color: var(--text-muted); text-align: center; white-space: normal; }
        .console-card { margin-top: 16px; padding: 19px; }
        .auth-wrapper {
            display: grid;
            grid-template-columns: 1fr 1.2fr;
            min-height: 560px;
            max-width: 960px;
            margin: 40px auto;
            overflow: hidden;
            background: linear-gradient(145deg, rgba(20, 38, 61, .97), rgba(13, 27, 45, .99));
            border: 1px solid var(--border-color);
            border-radius: 20px;
            box-shadow: 0 24px 60px rgba(0, 0, 0, .35);
        }
        .auth-hero {
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            padding: 42px 36px;
            background: linear-gradient(145deg, rgba(14, 116, 144, .22), rgba(30, 41, 59, .38));
            border-right: 1px solid var(--border-color);
        }
        .auth-hero h2 { margin: 10px 0 12px; color: #fff; font-size: 25px; letter-spacing: -.025em; }
        .auth-hero p { margin: 0; color: var(--text-muted); font-size: 13px; line-height: 1.7; }
        .auth-hero-specs { display: grid; gap: 12px; margin: 32px 0 0; padding: 0; color: #cbd5e1; font-size: 11px; list-style: none; overflow-wrap: anywhere; }
        .auth-hero-specs li::before { margin-right: 8px; color: var(--primary); content: "✓"; font-weight: 800; }
        .auth-hero-specs code { color: var(--primary); }
        .auth-form-container { display: flex; flex-direction: column; justify-content: center; padding: 42px clamp(24px, 5vw, 48px); }
        .auth-modes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; margin-bottom: 24px; padding: 4px; background: rgba(4, 12, 23, .65); border: 1px solid var(--border-color); border-radius: 10px; }
        .auth-modes button { min-height: 38px; padding: 9px; color: var(--text-muted); background: transparent; border: 0; font-size: 12px; }
        .auth-modes button.active { color: #04111d; background: var(--primary); }
        .auth-form-heading { margin-bottom: 20px; }
        .auth-form-heading h2 { margin: 0 0 6px; font-size: 20px; }
        .auth-form-heading p { margin: 0; color: var(--text-muted); font-size: 12px; line-height: 1.5; }
        .auth-form-container .form-group { margin-bottom: 16px; }
        .auth-form-container .form-group label { margin-bottom: 6px; color: #cbd5e1; font-size: 12px; }
        .auth-form-container input { padding: 11px 14px; font-size: 13px; }
        .auth-form-container .password-input-group button { padding: 0 14px; }
        .auth-message { min-height: 20px; margin: 12px 0 0; color: var(--text-muted); font-size: 12px; line-height: 1.5; }
        .auth-message.error { color: var(--danger); }
        .auth-actions { display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: 8px; }
        .btn-auth-submit { width: 100%; margin-top: 8px; padding: 12px; font-size: 14px; }
        .password-input-group { display: flex; gap: 8px; }
        .password-input-group input { flex: 1; }
        .password-input-group button { min-width: 66px; }
        .auth-switch { margin-top: 16px; color: var(--text-muted); font-size: 12px; text-align: center; }
        .auth-switch button { min-height: auto; padding: 3px; color: var(--primary); background: transparent; text-decoration: underline; }
        [hidden] { display: none !important; }
        .console-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
        .console-title { font-size: 13px; font-weight: 750; }
        #latency-metric { color: var(--text-muted); font-size: 11px; }
        pre {
            min-height: 120px;
            max-height: 340px;
            margin: 0;
            padding: 16px;
            overflow: auto;
            color: #a7e8ff;
            background: rgba(3, 10, 19, .78);
            border: 1px solid var(--border-color);
            border-radius: 10px;
            font: 11px/1.65 Consolas, "Courier New", monospace;
            white-space: pre-wrap;
            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; }
        @media (max-width: 820px) {
            body { padding: 22px 16px 36px; }
            .auth-wrapper { grid-template-columns: 1fr; max-width: 520px; min-height: auto; }
            .auth-hero { display: none; }
            .config-bar { grid-template-columns: 1fr 1fr; }
            .config-title { grid-column: 1 / -1; }
            .config-bar button { grid-column: 1 / -1; }
            .table-top { align-items: flex-start; flex-direction: column; }
        }
        @media (max-width: 600px) {
            .header { flex-direction: column; }
            .header-status { margin-top: 0; }
            .grid-2 { grid-template-columns: 1fr; }
            .auth-form-container { padding: 30px 22px; }
            .config-bar { grid-template-columns: 1fr; }
            .config-title, .config-bar button { grid-column: auto; }
            .region-header { flex-direction: column; }
            .btn-group { flex-direction: column; }
            .table-tools { width: 100%; flex-wrap: wrap; }
            .table-tools select, .table-tools input { flex: 1 1 140px; width: auto; }
            .card { padding: 17px; }
        }
        @media (prefers-reduced-motion: reduce) {
            *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
        }
