:root {
    --accent: #0078d4;
    --accent-hover: #106ebe;
    --accent-active: #005a9e;
    --accent-soft: #e8f1fb;
    --on-accent: #ffffff;
    --bg: #faf9f8;
    --surface: #ffffff;
    --surface-alt: #f3f2f1;
    --surface-sunken: #eeecea;
    --border: #e1dfdd;
    --border-strong: #c8c6c4;
    --text: #242424;
    --text-secondary: #5a5856;
    --text-tertiary: #8a8886;
    --success: #0e700e;
    --success-bg: #dff6dd;
    --warning: #8a6300;
    --warning-bg: #fff4ce;
    --danger: #a4262c;
    --danger-bg: #fde7e9;
    --shadow-1:
        0 1.6px 3.6px rgba(0, 0, 0, 0.11), 0 0.3px 0.9px rgba(0, 0, 0, 0.07);
    --shadow-2:
        0 6.4px 14.4px rgba(0, 0, 0, 0.13), 0 1.2px 3.6px rgba(0, 0, 0, 0.1);
    --radius: 2px;
    --radius-md: 4px;
    --font-ui:
        "Segoe UI", "Segoe UI Web", system-ui, -apple-system,
        BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
    --font-mono:
        "Cascadia Code", ui-monospace, SFMono-Regular, Consolas,
        "Liberation Mono", monospace;
}
@media (prefers-color-scheme: dark) {
    :root {
        --accent: #2899f5;
        --accent-hover: #4db2ff;
        --accent-active: #1379c9;
        --accent-soft: #0d2f4d;
        --on-accent: #06131f;
        --bg: #1f1f1f;
        --surface: #292929;
        --surface-alt: #333333;
        --surface-sunken: #202020;
        --border: #3b3a39;
        --border-strong: #4d4c4a;
        --text: #f3f2f1;
        --text-secondary: #c8c6c4;
        --text-tertiary: #9a9894;
        --success: #6bb700;
        --success-bg: #0f2a0f;
        --warning: #ffd335;
        --warning-bg: #3d3115;
        --danger: #f1707b;
        --danger-bg: #442726;
        --shadow-1:
            0 1.6px 3.6px rgba(0, 0, 0, 0.4), 0 0.3px 0.9px rgba(0, 0, 0, 0.3);
        --shadow-2:
            0 6.4px 14.4px rgba(0, 0, 0, 0.5), 0 1.2px 3.6px rgba(0, 0, 0, 0.4);
    }
}

* {
    box-sizing: border-box;
}
html,
body {
    height: 100%;
}
body {
    margin: 0;
    font-family: var(--font-ui);
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
}
button,
input,
select {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
}
table {
    border-collapse: collapse;
}
.num {
    font-variant-numeric: tabular-nums;
    font-family: var(--font-mono);
}
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
}
::selection {
    background: var(--accent-soft);
}

/* ---------- shell layout ---------- */
#app {
    display: flex;
    flex-direction: column;
    height: 100vh;
    min-height: 560px;
}

.disclaimer {
    flex: none;
    background: #3d3115;
    color: #ffe9a8;
    font-size: 12.5px;
    padding: 5px 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.1px;
}
.disclaimer b {
    color: #fff;
    font-weight: 600;
}
.disclaimer svg {
    flex: none;
    width: 14px;
    height: 14px;
    fill: #ffe9a8;
}

.topbar {
    flex: none;
    height: 48px;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0 8px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}
.icon-btn {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius);
    cursor: pointer;
    color: var(--text-secondary);
}
.icon-btn:hover {
    background: var(--surface-alt);
    color: var(--text);
}
.icon-btn svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}
.brand {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 6px 0 4px;
    margin-right: 4px;
}
.brand-mark {
    width: 24px;
    height: 24px;
    flex: none;
}
.brand-text {
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
}
.brand-text .dim {
    color: var(--text-tertiary);
    font-weight: 400;
}
.exercise-tag {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.2px;
    color: var(--accent);
    background: var(--accent-soft);
    border-radius: 999px;
    padding: 3px 9px;
    white-space: nowrap;
}
.topbar-search {
    flex: 1;
    max-width: 620px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--surface-alt);
    border: 1px solid transparent;
    border-radius: var(--radius);
    height: 30px;
    padding: 0 8px;
    color: var(--text-tertiary);
    margin: 0 12px;
}
.topbar-search svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
    flex: none;
}
.topbar-search span {
    font-size: 13px;
}
.topbar-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 2px;
}
.topbar-account {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 10px;
    border-radius: var(--radius);
    cursor: default;
}
.avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--accent);
    color: var(--on-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    flex: none;
}
.topbar-account .who {
    font-size: 12px;
    line-height: 1.25;
}
.topbar-account .who b {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
}
.badge-count {
    position: absolute;
    transform: translate(9px, -9px);
    min-width: 14px;
    height: 14px;
    border-radius: 7px;
    background: var(--danger);
    color: #fff;
    font-size: 9.5px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
}

.body-row {
    flex: 1;
    display: flex;
    min-height: 0;
}

.nav {
    flex: none;
    width: 280px;
    background: var(--surface);
    border-right: 1px solid var(--border);
    overflow-y: auto;
    padding: 6px 0 16px;
    transition:
        width 0.15s ease,
        opacity 0.15s ease;
}
.nav.collapsed {
    width: 0;
    overflow: hidden;
    opacity: 0;
}
.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    text-align: left;
    background: transparent;
    border: none;
    padding: 7px 14px;
    cursor: pointer;
    color: var(--text);
    font-size: 13px;
    border-left: 2px solid transparent;
}
.nav-item:hover {
    background: var(--surface-alt);
}
.nav-item.active {
    background: var(--accent-soft);
    border-left-color: var(--accent);
    color: var(--accent);
    font-weight: 600;
}
.nav-item svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
    flex: none;
}
.nav-item.child {
    padding-left: 34px;
    font-size: 12.5px;
}
.nav-item.grandchild {
    padding-left: 54px;
    font-size: 12.5px;
}
.nav-section-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-tertiary);
    padding: 14px 14px 4px;
}
.nav hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 8px 10px;
}

.main {
    flex: 1;
    min-width: 0;
    overflow-y: auto;
    background: var(--bg);
}
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 22px;
    font-size: 12.5px;
    color: var(--text-secondary);
    flex-wrap: wrap;
}
.breadcrumb .sep {
    color: var(--text-tertiary);
}
.breadcrumb .current {
    color: var(--text);
    font-weight: 600;
}
.breadcrumb button {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 2px 0;
    font-size: 12.5px;
}
.breadcrumb button:hover {
    color: var(--accent);
    text-decoration: underline;
}

.blade {
    padding: 0 22px 40px;
    max-width: 1180px;
}
.blade-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}
.blade-header .titlewrap {
    flex: 1;
    min-width: 240px;
}
.blade-icon {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-md);
    background: var(--accent-soft);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
    margin-top: 2px;
}
.blade-icon svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}
.blade-title {
    font-size: 22px;
    font-weight: 600;
    margin: 0;
    text-wrap: balance;
}
.blade-subtitle {
    color: var(--text-secondary);
    font-size: 12.5px;
    margin-top: 3px;
}

.cmdbar {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin: 10px 0 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}
.btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 30px;
    padding: 0 12px;
    border-radius: var(--radius);
    border: 1px solid var(--border-strong);
    background: var(--surface);
    color: var(--text);
    font-size: 13px;
    cursor: pointer;
}
.btn svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}
.btn:hover {
    background: var(--surface-alt);
}
.btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}
.btn-primary {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--on-accent);
}
.btn-primary:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
}
.btn-danger {
    color: var(--danger);
    border-color: var(--border-strong);
}
.btn-danger:hover {
    background: var(--danger-bg);
}
.btn-link {
    border: none;
    background: none;
    color: var(--accent);
    padding: 0;
    height: auto;
    cursor: pointer;
    font-size: 13px;
}
.btn-link:hover {
    text-decoration: underline;
}
.btn-sm {
    height: 24px;
    padding: 0 8px;
    font-size: 12px;
}

.grid {
    display: grid;
    gap: 16px;
}
.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-1);
    padding: 16px;
}
.card h3 {
    margin: 0 0 4px;
    font-size: 14px;
    font-weight: 600;
}
.card .card-sub {
    color: var(--text-secondary);
    font-size: 12px;
    margin-bottom: 12px;
}

.essentials {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px 28px;
    padding: 14px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: 18px;
}
.essentials .item .k {
    font-size: 11.5px;
    color: var(--text-secondary);
}
.essentials .item .v {
    font-size: 13px;
    margin-top: 2px;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}
.pill-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex: none;
}
.pill-good {
    background: var(--success-bg);
    color: var(--success);
}
.pill-good .pill-dot {
    background: var(--success);
}
.pill-warn {
    background: var(--warning-bg);
    color: var(--warning);
}
.pill-warn .pill-dot {
    background: var(--warning);
}
.pill-bad {
    background: var(--danger-bg);
    color: var(--danger);
}
.pill-bad .pill-dot {
    background: var(--danger);
}
.pill-neutral {
    background: var(--surface-alt);
    color: var(--text-secondary);
}
.pill-neutral .pill-dot {
    background: var(--text-tertiary);
}

table.grid-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.table-scroll {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}
table.grid-table th {
    text-align: left;
    font-weight: 600;
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: var(--text-secondary);
    background: var(--surface-alt);
    padding: 9px 12px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
table.grid-table td {
    padding: 9px 12px;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
    vertical-align: middle;
}
table.grid-table tbody tr:last-child td {
    border-bottom: none;
}
table.grid-table tbody tr:hover td {
    background: var(--surface-alt);
}
table.grid-table tr.row-danger td {
    background: color-mix(in srgb, var(--danger-bg) 55%, var(--surface));
}
table.grid-table tr.row-success td {
    background: color-mix(in srgb, var(--success-bg) 45%, var(--surface));
}
table.grid-table code {
    font-family: var(--font-mono);
    font-size: 12px;
    background: var(--surface-alt);
    padding: 1px 5px;
    border-radius: 3px;
}

.toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}
.toggle input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}
.toggle .track {
    width: 34px;
    height: 18px;
    border-radius: 999px;
    background: var(--border-strong);
    position: relative;
    transition: background 0.15s;
    flex: none;
}
.toggle .track::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--surface);
    transition: transform 0.15s;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}
.toggle input:checked + .track {
    background: var(--accent);
}
.toggle input:checked + .track::after {
    transform: translateX(16px);
}
.toggle input:focus-visible + .track {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}
.toggle .lbl {
    font-size: 12.5px;
}

.callout {
    display: flex;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    font-size: 12.5px;
    align-items: flex-start;
    border: 1px solid transparent;
}
.callout svg {
    width: 15px;
    height: 15px;
    flex: none;
    margin-top: 1px;
}
.callout-info {
    background: var(--accent-soft);
    color: var(--text);
    border-color: color-mix(in srgb, var(--accent) 35%, transparent);
}
.callout-info svg {
    fill: var(--accent);
}
.callout-warn {
    background: var(--warning-bg);
    border-color: color-mix(in srgb, var(--warning) 35%, transparent);
}
.callout-warn svg {
    fill: var(--warning);
}
.callout-danger {
    background: var(--danger-bg);
    border-color: color-mix(in srgb, var(--danger) 35%, transparent);
}
.callout-danger svg {
    fill: var(--danger);
}
.callout-good {
    background: var(--success-bg);
    border-color: color-mix(in srgb, var(--success) 35%, transparent);
}
.callout-good svg {
    fill: var(--success);
}

/* ---------- score gauge ---------- */
.score-wrap {
    display: flex;
    align-items: center;
    gap: 18px;
}
.score-ring {
    flex: none;
}
.score-mid {
    font-size: 26px;
    font-weight: 700;
}
.score-band {
    font-size: 12px;
    font-weight: 600;
    margin-top: 2px;
}

/* ---------- recommendations ---------- */
.rec-list {
    display: flex;
    flex-direction: column;
}
.rec-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 2px;
    border-bottom: 1px solid var(--border);
}
.rec-item:last-child {
    border-bottom: none;
}
.rec-sev {
    width: 3px;
    align-self: stretch;
    border-radius: 2px;
    flex: none;
}
.rec-sev.high {
    background: var(--danger);
}
.rec-sev.med {
    background: var(--warning);
}
.rec-sev.done {
    background: var(--success);
}
.rec-body {
    flex: 1;
    min-width: 0;
}
.rec-title {
    font-size: 13px;
    font-weight: 600;
}
.rec-desc {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 1px;
}

/* ---------- checklist ---------- */
.checklist {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.check-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 9px 6px;
    border-radius: var(--radius-md);
}
.check-row:hover {
    background: var(--surface-alt);
}
.check-box {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    border: 1.5px solid var(--border-strong);
    flex: none;
    margin-top: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface);
    cursor: pointer;
}
.check-box.done {
    background: var(--success);
    border-color: var(--success);
}
.check-box.done svg {
    width: 11px;
    height: 11px;
    fill: #fff;
}
.check-box.locked {
    cursor: default;
}
.check-text {
    font-size: 13px;
}
.check-text .step-no {
    color: var(--text-tertiary);
    font-family: var(--font-mono);
    font-size: 11.5px;
    margin-right: 6px;
}
.check-row.done .check-text {
    color: var(--text-secondary);
    text-decoration: line-through;
    text-decoration-color: var(--border-strong);
}
.progress-bar {
    height: 6px;
    border-radius: 3px;
    background: var(--surface-alt);
    overflow: hidden;
    margin: 10px 0 14px;
}
.progress-bar > span {
    display: block;
    height: 100%;
    background: var(--accent);
    transition: width 0.3s ease;
}

/* ---------- panels (side blades) ---------- */
.scrim {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 40;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s;
}
.scrim.show {
    opacity: 1;
    pointer-events: auto;
}
.panel {
    position: fixed;
    top: 0;
    right: 0;
    height: 100%;
    width: min(420px, 100vw);
    background: var(--surface);
    box-shadow: var(--shadow-2);
    z-index: 41;
    transform: translateX(100%);
    transition: transform 0.18s ease-out;
    display: flex;
    flex-direction: column;
    border-left: 1px solid var(--border);
}
.panel.show {
    transform: translateX(0);
}
.panel-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
}
.panel-head h2 {
    font-size: 15px;
    font-weight: 600;
    margin: 0;
    flex: 1;
}
.panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.panel-foot {
    padding: 12px 16px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.field label {
    font-size: 12.5px;
    font-weight: 600;
}
.field .hint {
    font-size: 11.5px;
    color: var(--text-secondary);
    font-weight: 400;
}
.field input[type="text"],
.field input[type="password"],
.field select {
    height: 30px;
    padding: 0 9px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text);
}
.field input:focus,
.field select:focus {
    border-color: var(--accent);
}
.check-line {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}
.port-config {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.port-config-head {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 13px;
}
.port-config-head code {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 400;
}

.active-req {
    border: 1px solid var(--border);
    border-left: 3px solid var(--success);
    border-radius: var(--radius-md);
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
}
.active-req.expiring {
    border-left-color: var(--warning);
}
.active-req .info {
    flex: 1;
    font-size: 12.5px;
}
.active-req .countdown {
    font-family: var(--font-mono);
    font-size: 15px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

/* ---------- toasts ---------- */
.toast-stack {
    position: fixed;
    bottom: 16px;
    right: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 60;
    width: min(340px, calc(100vw - 32px));
}
.toast {
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    box-shadow: var(--shadow-2);
    border-radius: var(--radius-md);
    padding: 10px 12px;
    font-size: 12.5px;
    display: flex;
    gap: 9px;
    align-items: flex-start;
    animation: toast-in 0.18s ease-out;
}
.toast svg {
    width: 15px;
    height: 15px;
    flex: none;
    margin-top: 1px;
}
.toast.success {
    border-left-color: var(--success);
}
.toast.success svg {
    fill: var(--success);
}
.toast.warning {
    border-left-color: var(--warning);
}
.toast.warning svg {
    fill: var(--warning);
}
.toast.danger {
    border-left-color: var(--danger);
}
.toast.danger svg {
    fill: var(--danger);
}
.toast.info svg {
    fill: var(--accent);
}
@keyframes toast-in {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}
@media (prefers-reduced-motion: reduce) {
    .toast {
        animation: none;
    }
    .panel,
    .scrim,
    .nav {
        transition: none;
    }
}

/* ---------- activity flyout ---------- */
.activity-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.activity-item {
    display: flex;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}
.activity-item:last-child {
    border-bottom: none;
}
.activity-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-top: 5px;
    flex: none;
}
.activity-dot.success {
    background: var(--success);
}
.activity-dot.warning {
    background: var(--warning);
}
.activity-dot.danger {
    background: var(--danger);
}
.activity-dot.info {
    background: var(--accent);
}
.activity-text {
    font-size: 12.5px;
}
.activity-time {
    font-size: 11px;
    color: var(--text-tertiary);
    font-family: var(--font-mono);
    margin-top: 1px;
}
.empty-hint {
    color: var(--text-tertiary);
    font-size: 12.5px;
    padding: 20px 4px;
    text-align: center;
}

/* ---------- login modal ---------- */
.modal-scrim {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 50;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.modal-scrim.show {
    display: flex;
}
.login-box {
    width: 380px;
    max-width: 100%;
    background: var(--surface);
    border-radius: 6px;
    box-shadow: var(--shadow-2);
    overflow: hidden;
    border: 1px solid var(--border);
    position: relative;
}
.sim-ribbon {
    position: absolute;
    top: 10px;
    right: -34px;
    transform: rotate(40deg);
    background: var(--danger);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 3px 40px;
    z-index: 2;
}
.login-body {
    padding: 28px 32px 24px;
}
.login-logo {
    width: 22px;
    height: 22px;
    margin-bottom: 18px;
}
.login-title {
    font-size: 19px;
    font-weight: 400;
    margin: 0 0 4px;
}
.login-sub {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 18px;
}
.login-domain {
    font-size: 11.5px;
    color: var(--text-tertiary);
    font-family: var(--font-mono);
    margin-top: -10px;
    margin-bottom: 18px;
}
.login-box input[type="text"],
.login-box input[type="password"] {
    width: 100%;
    height: 34px;
    padding: 0 10px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text);
    margin-bottom: 14px;
}
.login-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 8px;
}
.mfa-number {
    font-size: 44px;
    font-weight: 700;
    text-align: center;
    letter-spacing: 4px;
    background: var(--surface-alt);
    border-radius: var(--radius-md);
    padding: 16px;
    margin: 6px 0 16px;
    font-family: var(--font-mono);
}
.phone-frame {
    width: 56px;
    height: 100px;
    border: 2px solid var(--text-secondary);
    border-radius: 10px;
    margin: 0 auto 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.phone-frame::after {
    content: "";
    position: absolute;
    bottom: 5px;
    width: 18px;
    height: 2px;
    border-radius: 1px;
    background: var(--text-secondary);
}
.spinner {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-top-color: #fff;
    animation: spin 0.7s linear infinite;
    display: inline-block;
}
.btn .spinner.dark {
    border-color: var(--border-strong);
    border-top-color: var(--accent);
}
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
@media (prefers-reduced-motion: reduce) {
    .spinner {
        animation: spin 1.4s linear infinite;
    }
}

.kv-note {
    font-size: 11.5px;
    color: var(--text-tertiary);
    margin-top: 10px;
}
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

@media (max-width: 860px) {
    .nav {
        position: fixed;
        top: 78px;
        bottom: 0;
        z-index: 30;
        box-shadow: var(--shadow-2);
    }
    .nav.collapsed {
        display: none;
    }
}
