:root {
    color-scheme: light;
    --bg: #f5f7fb;
    --bg-soft: #eef3f8;
    --panel: #ffffff;
    --panel-2: #f8fafc;
    --panel-3: #edf2f7;
    --elevated: #ffffff;
    --text: #172033;
    --muted: #64748b;
    --line: #d9e2ee;
    --line-strong: #c7d3e3;
    --accent: #f97316;
    --accent-2: #c95b0c;
    --info: #0f8ea0;
    --warn: #a16207;
    --danger: #dc2626;
    --ok: #15803d;
    --surface-shadow: 0 16px 40px rgba(31, 41, 55, 0.08);
    --shadow: var(--surface-shadow);
    --body-bg:
        radial-gradient(circle at top left, rgba(249, 115, 22, 0.10), transparent 22rem),
        radial-gradient(circle at 88% 10%, rgba(14, 165, 233, 0.10), transparent 24rem),
        linear-gradient(180deg, #f8fafc 0%, #eef3f8 100%);
    --sidebar-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(245, 248, 252, 0.98));
    --topbar-bg: rgba(255, 255, 255, 0.86);
    --subtle-bg: rgba(241, 245, 249, 0.78);
    --subtle-border: rgba(203, 213, 225, 0.88);
    --control-bg: #ffffff;
    --control-bg-hover: #f8fafc;
    --code-bg: #f8fafc;
    --hero-bg:
        linear-gradient(135deg, rgba(249, 115, 22, 0.11), rgba(14, 165, 233, 0.07)),
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.98));
    --card-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(248, 250, 252, 0.99));
    --metric-bg: linear-gradient(160deg, rgba(255, 255, 255, 0.99), rgba(241, 245, 249, 0.99));
}

html[data-theme="dark"] {
    color-scheme: dark;
    --bg: #0b1220;
    --bg-soft: #0f172a;
    --panel: #111b2e;
    --panel-2: #17243a;
    --panel-3: #0e1728;
    --elevated: #17243a;
    --text: #e6edf7;
    --muted: #9aa8bc;
    --line: #263650;
    --line-strong: #31445f;
    --accent: #f97316;
    --accent-2: #ffb067;
    --info: #39c5cf;
    --warn: #d29922;
    --danger: #f87171;
    --ok: #4ade80;
    --surface-shadow: 0 20px 55px rgba(0, 0, 0, 0.32);
    --body-bg:
        radial-gradient(circle at top left, rgba(249, 115, 22, 0.12), transparent 22rem),
        radial-gradient(circle at 85% 12%, rgba(57, 197, 207, 0.10), transparent 22rem),
        linear-gradient(180deg, #0b1220 0%, #08101d 100%);
    --sidebar-bg: linear-gradient(180deg, rgba(17, 27, 46, 0.98), rgba(11, 18, 32, 0.99));
    --topbar-bg: rgba(17, 27, 46, 0.84);
    --subtle-bg: rgba(23, 36, 58, 0.68);
    --subtle-border: rgba(49, 68, 95, 0.84);
    --control-bg: #0f1728;
    --control-bg-hover: #17243a;
    --code-bg: #0c1525;
    --hero-bg:
        linear-gradient(135deg, rgba(249, 115, 22, 0.18), rgba(57, 197, 207, 0.07)),
        linear-gradient(180deg, rgba(17, 27, 46, 0.98), rgba(11, 18, 32, 0.98));
    --card-bg: linear-gradient(180deg, rgba(17, 27, 46, 0.98), rgba(12, 20, 35, 0.98));
    --metric-bg: linear-gradient(160deg, rgba(23, 36, 58, 0.98), rgba(17, 27, 46, 0.98));
}

.pending-agents-badge {
    align-items: center;
    background: rgba(245, 158, 11, 0.18);
    border: 1px solid rgba(245, 158, 11, 0.36);
    border-radius: 999px;
    color: #fbbf24;
    display: inline-flex;
    font-size: 11px;
    gap: 4px;
    line-height: 1;
    margin-left: auto;
    padding: 3px 7px;
    white-space: nowrap;
}

.pending-agents-badge.is-critical {
    background: rgba(220, 38, 38, 0.18);
    border-color: rgba(220, 38, 38, 0.42);
    color: #fca5a5;
}

.pending-agents-panel {
    margin-bottom: 18px;
}

.pending-agent-list {
    display: grid;
    gap: 10px;
}

.pending-agent-card {
    align-items: center;
    background: rgba(11, 17, 24, 0.72);
    border: 1px solid rgba(48, 54, 61, 0.84);
    border-radius: 8px;
    display: flex;
    gap: 14px;
    justify-content: space-between;
    padding: 12px;
}

.pending-agent-card.is-new {
    border-color: rgba(245, 158, 11, 0.72);
    box-shadow: inset 3px 0 0 #f59e0b;
}

.pending-agent-card strong,
.pending-agent-card span,
.pending-agent-card small {
    display: block;
}

.pending-agent-card small {
    color: var(--muted);
}

.pending-agent-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.agent-toast-region {
    bottom: 18px;
    display: grid;
    gap: 10px;
    position: fixed;
    right: 18px;
    width: min(360px, calc(100vw - 36px));
    z-index: 50;
}

.agent-toast {
    background: rgba(18, 24, 33, 0.98);
    border: 1px solid rgba(245, 158, 11, 0.72);
    border-radius: 8px;
    box-shadow: var(--shadow);
    color: var(--text);
    display: grid;
    gap: 6px;
    padding: 14px;
    position: relative;
}

.agent-toast strong,
.agent-toast span,
.agent-toast small {
    display: block;
}

.agent-toast small {
    color: var(--muted);
}

.agent-toast-muted {
    border-color: rgba(57, 197, 207, 0.48);
}

.agent-toast-close {
    background: transparent;
    border: 0;
    border-radius: 50%;
    color: var(--muted);
    font-size: 18px;
    height: 26px;
    line-height: 1;
    padding: 0;
    position: absolute;
    right: 8px;
    top: 8px;
    width: 26px;
}

@media (max-width: 760px) {
    .pending-agent-card {
        align-items: stretch;
        flex-direction: column;
    }

    .pending-agent-actions {
        justify-content: flex-start;
    }
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--body-bg);
    color: var(--text);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
    overflow-x: hidden;
    overflow-y: auto;
}

a {
    color: var(--text);
    text-decoration: none;
}

.topbar {
    align-items: center;
    background: var(--topbar-bg);
    border-bottom: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    min-height: 60px;
    padding: 0 24px;
}

.brand {
    font-weight: 700;
}

.app-shell {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

.sidebar {
    background: var(--sidebar-bg);
    border-right: 1px solid var(--subtle-border);
    display: flex;
    flex: 0 0 280px;
    flex-direction: column;
    justify-content: space-between;
    left: 0;
    min-height: 100vh;
    padding: 20px 16px;
    position: fixed;
    top: 0;
    width: 280px;
}

.sidebar-brand {
    display: grid;
    gap: 12px;
    padding: 4px 4px 16px;
}

.brand-mark {
    align-items: center;
    color: var(--text);
    display: flex;
    gap: 12px;
    font-size: 18px;
    line-height: 1.15;
}

.brand-mark strong,
.brand-mark small {
    display: block;
}

.brand-mark small {
    color: var(--accent-2);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.brand-icon,
.metric-icon {
    align-items: center;
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.22), rgba(57, 197, 207, 0.12));
    border: 1px solid rgba(249, 115, 22, 0.38);
    border-radius: 8px;
    color: var(--accent-2);
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 16px;
    height: 38px;
    justify-content: center;
    width: 38px;
}

.brand-svg,
.menu-icon,
.hero-icon-svg,
.hero-tool-icon,
.card-icon-svg,
.section-icon-svg,
.status-icon,
.action-icon,
.login-card-icon-svg,
.login-input-icon,
.login-toggle-icon,
.login-submit-icon,
.login-config-icon,
.theme-icon {
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.brand-svg {
    height: 21px;
    width: 21px;
}

.menu-icon {
    height: 17px;
    width: 17px;
}

.sidebar-brand p {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.4;
    margin: 0;
}

.sidebar-nav {
    display: grid;
    gap: 7px;
    margin: 24px 0;
}

.sidebar-link {
    align-items: center;
    border: 1px solid transparent;
    border-radius: 8px;
    color: var(--muted);
    display: flex;
    gap: 11px;
    padding: 10px 11px;
    position: relative;
}

.sidebar-link:hover {
    background: rgba(139, 148, 158, 0.08);
    border-color: rgba(249, 115, 22, 0.18);
    color: var(--text);
}

.sidebar-link.is-active {
    background: linear-gradient(90deg, rgba(249, 115, 22, 0.18), rgba(249, 115, 22, 0.06));
    border-color: rgba(249, 115, 22, 0.42);
    box-shadow: inset 3px 0 0 var(--accent);
    color: var(--text);
}

.nav-icon {
    align-items: center;
    background: rgba(139, 148, 158, 0.08);
    border: 1px solid rgba(139, 148, 158, 0.12);
    border-radius: 7px;
    color: var(--info);
    display: inline-flex;
    font-size: 13px;
    height: 28px;
    justify-content: center;
    width: 28px;
}

.sidebar-link:hover .nav-icon {
    background: rgba(249, 115, 22, 0.12);
    border-color: rgba(249, 115, 22, 0.28);
    color: var(--accent-2);
}

.sidebar-link.is-active .nav-icon {
    background: rgba(249, 115, 22, 0.18);
    border-color: rgba(249, 115, 22, 0.35);
    color: var(--accent-2);
}

.sidebar-footer {
    display: grid;
    gap: 12px;
    margin-top: auto;
}

.sidebar-status {
    align-items: center;
    background: rgba(13, 17, 23, 0.78);
    border: 1px solid rgba(48, 54, 61, 0.9);
    border-radius: 8px;
    display: grid;
    gap: 2px 8px;
    grid-template-columns: auto 1fr;
    padding: 11px 12px;
}

.sidebar-status span:not(.status-dot) {
    font-size: 13px;
    font-weight: 800;
}

.sidebar-status small {
    color: var(--muted);
    font-size: 12px;
    grid-column: 2;
}

.status-dot {
    background: var(--ok);
    border-radius: 999px;
    box-shadow: 0 0 0 4px rgba(63, 185, 80, 0.12);
    height: 9px;
    width: 9px;
}

.sidebar-logout {
    width: 100%;
}

.app-footer {
    color: rgba(150, 163, 180, 0.72);
    display: block;
    font-size: 12px;
    text-align: center;
}

.content-wrap {
    flex: 1 1 auto;
    min-width: 0;
    margin-left: 280px;
    max-width: 100%;
    min-height: 100vh;
}

.content-inner {
    max-width: none;
    min-width: 0;
    padding: 18px 22px 28px;
}

.dashboard-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(0, 1.18fr) minmax(340px, 0.82fr);
    margin-bottom: 14px;
    min-width: 0;
    max-width: 100%;
}

.dashboard-main-grid {
    align-items: start;
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(0, 1.22fr) minmax(340px, 0.78fr);
    min-width: 0;
    max-width: 100%;
}

.dashboard-panel {
    display: grid;
    gap: 10px;
    min-width: 0;
}

.dashboard-panel-wide {
    grid-column: 1 / -1;
}

.dashboard-metrics {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}

.mini-metric {
    background: linear-gradient(180deg, rgba(13, 17, 23, 0.86), rgba(10, 15, 22, 0.86));
    border: 1px solid rgba(48, 54, 61, 0.9);
    border-radius: 8px;
    padding: 11px 12px;
}

.mini-metric span {
    color: var(--muted);
    display: block;
    font-size: 12px;
    margin-bottom: 6px;
}

.mini-metric strong {
    display: block;
    font-size: 20px;
    line-height: 1.1;
}

.dashboard-list {
    display: grid;
    gap: 10px;
}

.dashboard-row {
    align-items: center;
    background: rgba(13, 17, 23, 0.62);
    border: 1px solid rgba(48, 54, 61, 0.85);
    border-radius: 8px;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    padding: 10px 11px;
}

.dashboard-row strong {
    display: block;
    font-size: 14px;
    line-height: 1.2;
}

.dashboard-row span {
    color: var(--muted);
    display: block;
    font-size: 12px;
}

.dashboard-row-badges {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.dashboard-shell {
    display: grid;
    gap: 12px;
}

.page-shell {
    display: grid;
    gap: 12px;
    min-width: 0;
    max-width: 100%;
}

.page-hero,
.premium-hero {
    align-items: flex-start;
    background:
        linear-gradient(135deg, rgba(249, 115, 22, 0.2), rgba(57, 197, 207, 0.07)),
        linear-gradient(180deg, rgba(18, 25, 35, 0.98), rgba(10, 15, 23, 0.98));
    border: 1px solid rgba(249, 115, 22, 0.32);
    border-radius: 8px;
    box-shadow: var(--shadow);
    display: flex;
    gap: 18px;
    justify-content: space-between;
    min-height: 124px;
    padding: 18px;
    min-width: 0;
    max-width: 100%;
}

.page-hero-icon,
.premium-hero-main {
    align-items: flex-start;
    display: flex;
    gap: 16px;
    min-width: 0;
}

.hero-icon,
.card-icon,
.section-icon {
    align-items: center;
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.22), rgba(57, 197, 207, 0.08));
    border: 1px solid rgba(249, 115, 22, 0.36);
    border-radius: 8px;
    color: var(--accent-2);
    display: inline-flex;
    flex: 0 0 auto;
    justify-content: center;
}

.hero-icon {
    height: 50px;
    width: 50px;
}

.hero-icon-svg {
    height: 27px;
    width: 27px;
}

.page-hero h1,
.premium-hero h1 {
    font-size: 32px;
    line-height: 1.08;
    margin: 4px 0 8px;
}

.page-hero p,
.premium-hero p {
    color: var(--muted);
    font-size: 14px;
    margin: 0;
    max-width: 720px;
}

.hero-tool {
    align-items: center;
    background: rgba(13, 17, 23, 0.58);
    border: 1px solid rgba(48, 54, 61, 0.86);
    border-radius: 999px;
    color: var(--muted);
    display: inline-flex;
    font-size: 11px;
    font-weight: 700;
    gap: 7px;
    line-height: 1.2;
    padding: 5px 9px;
    white-space: nowrap;
}

.hero-tool-icon {
    color: var(--accent-2);
    height: 15px;
    width: 15px;
}

.metric-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    min-width: 0;
    max-width: 100%;
}

.metric-card {
    background:
        linear-gradient(160deg, rgba(22, 31, 43, 0.98), rgba(12, 18, 27, 0.98));
    border: 1px solid rgba(48, 54, 61, 0.92);
    border-radius: 8px;
    align-items: flex-start;
    display: flex;
    gap: 11px;
    min-width: 0;
    padding: 11px 12px;
}

.card-icon {
    height: 36px;
    width: 36px;
}

.card-icon-alert {
    background: linear-gradient(135deg, rgba(248, 81, 73, 0.18), rgba(249, 115, 22, 0.1));
    border-color: rgba(248, 81, 73, 0.28);
    color: var(--danger);
}

.card-icon-svg {
    height: 19px;
    width: 19px;
}

.metric-card > div {
    min-width: 0;
}

.metric-card span,
.metric-card small {
    color: var(--muted);
    display: block;
    font-size: 12px;
}

.metric-card .card-icon {
    display: inline-flex;
}

.metric-card strong {
    display: block;
    font-size: 24px;
    line-height: 1.08;
    margin: 4px 0 2px;
    overflow-wrap: break-word;
}

.metric-card .metric-card-long {
    font-size: 15px;
    line-height: 1.28;
    min-height: 34px;
}

.dashboard-primary-grid,
.dashboard-secondary-grid {
    align-items: start;
    display: grid;
    gap: 12px;
    min-width: 0;
    max-width: 100%;
}

.dashboard-primary-grid {
    grid-template-columns: minmax(0, 1.62fr) minmax(300px, 0.62fr);
}

.dashboard-secondary-grid {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 0.7fr);
}

.side-stack {
    display: grid;
    gap: 14px;
    min-width: 0;
}

.dashboard-table-card {
    min-width: 0;
    max-width: 100%;
}

.dashboard-panel-wide {
    min-width: 0;
}

.section-title h2 {
    align-items: center;
    display: flex;
    gap: 9px;
}

.section-icon {
    height: 30px;
    width: 30px;
}

.section-icon-svg {
    height: 16px;
    width: 16px;
}

.table-scroll {
    overflow-x: auto;
    max-width: 100%;
}

.compact-table {
    min-width: 700px;
    table-layout: fixed;
    width: 100%;
    max-width: 100%;
}

.compact-table th,
.compact-table td {
    padding: 9px 10px;
}

.compact-table th {
    font-size: 12px;
}

.compact-table td {
    font-size: 12px;
}

.compact-table td strong,
.table-subtext {
    display: block;
}

.premium-table-card th,
.premium-table-card td,
.compact-table th,
.compact-table td {
    overflow-wrap: break-word;
    word-break: break-word;
}

.responsive-table table {
    width: 100%;
    max-width: 100%;
}

.responsive-table .button,
.responsive-table button {
    white-space: nowrap;
}

.email-cell,
.document-cell,
.company-name-cell,
.license-company-cell,
.license-date-cell {
    overflow-wrap: break-word;
    word-break: normal;
}

.company-actions,
.license-actions,
.blocklist-actions {
    gap: 8px;
}

.company-actions form,
.license-actions form,
.blocklist-actions form {
    margin: 0;
}

.table-subtext {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.35;
    margin-top: 2px;
}

.table-empty {
    padding: 0 18px 18px;
}

.api-security-card,
.status-summary-card,
.alert-card,
.chart-card {
    display: grid;
    gap: 12px;
}

.api-security-card .section-title h2,
.premium-table-card .section-title h2 {
    white-space: normal;
}

.security-list {
    display: grid;
    gap: 9px;
}

.security-list div,
.status-summary-grid div {
    background: rgba(13, 17, 23, 0.68);
    border: 1px solid rgba(48, 54, 61, 0.86);
    border-radius: 8px;
    min-width: 0;
    padding: 10px 11px;
}

.security-list span,
.status-summary-grid span {
    color: var(--muted);
    display: block;
    font-size: 12px;
    margin-bottom: 4px;
}

.security-list strong,
.status-summary-grid strong {
    display: block;
    font-size: 14px;
    overflow-wrap: break-word;
}

.status-summary-grid {
    display: grid;
    gap: 9px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.alert-list {
    display: grid;
    gap: 9px;
}

.alert-item {
    align-items: flex-start;
    background: rgba(13, 17, 23, 0.66);
    border: 1px solid rgba(48, 54, 61, 0.84);
    border-radius: 8px;
    display: grid;
    gap: 10px;
    grid-template-columns: auto 1fr;
    min-width: 0;
    padding: 10px 11px;
}

.alert-item:hover {
    border-color: rgba(249, 115, 22, 0.34);
    background: rgba(13, 17, 23, 0.78);
}

.alert-item strong,
.alert-item span {
    display: block;
    overflow-wrap: break-word;
}

.alert-item strong {
    font-size: 13px;
    line-height: 1.25;
    margin-bottom: 3px;
}

.alert-item span:not(.severity-badge) {
    color: var(--muted);
    font-size: 12px;
}

.severity-badge {
    border-radius: 999px;
    display: inline-flex;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.15;
    padding: 4px 8px;
    text-transform: uppercase;
}

.severity-high {
    background: rgba(248, 81, 73, 0.16);
    color: var(--danger);
}

.severity-medium {
    background: rgba(210, 153, 34, 0.18);
    color: var(--warn);
}

.severity-info {
    background: rgba(57, 197, 207, 0.14);
    color: var(--info);
}

.status-icon {
    height: 12px;
    margin-right: 5px;
    width: 12px;
}

.chart-placeholder {
    align-items: end;
    background:
        linear-gradient(180deg, rgba(13, 17, 23, 0.62), rgba(9, 13, 19, 0.72));
    border: 1px solid rgba(48, 54, 61, 0.84);
    border-radius: 8px;
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(6, 1fr);
    height: 170px;
    padding: 16px;
}

.chart-placeholder span {
    background: linear-gradient(180deg, rgba(249, 115, 22, 0.7), rgba(249, 115, 22, 0.18));
    border-radius: 4px 4px 0 0;
    min-height: 18px;
}

.chart-placeholder span:nth-child(1) {
    height: 42%;
}

.chart-placeholder span:nth-child(2) {
    height: 68%;
}

.chart-placeholder span:nth-child(3) {
    height: 36%;
}

.chart-placeholder span:nth-child(4) {
    height: 76%;
}

.chart-placeholder span:nth-child(5) {
    height: 54%;
}

.chart-placeholder span:nth-child(6) {
    height: 84%;
}

nav {
    align-items: center;
    display: flex;
    gap: 16px;
}

nav a {
    color: var(--muted);
}

nav a:hover {
    color: var(--text);
}

.container {
    margin: 0 auto;
    max-width: 1220px;
    padding: 26px 20px;
}

.content-inner.container:has(.servers-shell) {
    max-width: none;
    width: 100%;
}

.page-head {
    align-items: center;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    margin-bottom: 16px;
}

.page-head h1 {
    font-size: 28px;
    line-height: 1.1;
    margin: 0;
}

.panel {
    background: linear-gradient(180deg, rgba(18, 25, 35, 0.98), rgba(13, 19, 28, 0.98));
    border: 1px solid rgba(40, 50, 65, 0.96);
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin-bottom: 12px;
    padding: 16px;
}

.section-card {
    background:
        linear-gradient(180deg, rgba(18, 25, 35, 0.98), rgba(12, 18, 27, 0.98));
    box-shadow: var(--shadow);
}

.hero,
.server-hero {
    background:
        linear-gradient(135deg, rgba(249, 115, 22, 0.18), rgba(57, 197, 207, 0.06)),
        var(--panel);
    border: 1px solid rgba(249, 115, 22, 0.26);
    border-radius: 8px;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    margin-bottom: 12px;
    padding: 16px 18px;
}

.hero h1,
.server-hero h2 {
    font-size: 30px;
    line-height: 1.1;
    margin: 3px 0 6px;
}

.hero p,
.server-hero p {
    color: var(--muted);
    margin: 0;
    max-width: 680px;
}

.hero-kicker {
    color: var(--info);
    display: inline-block;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.hero-actions,
.server-hero-badges {
    align-items: flex-start;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.stat-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    margin-bottom: 12px;
}

.stat-grid > .stat-card,
.stat-card {
    background:
        linear-gradient(160deg, rgba(22, 31, 43, 0.98), rgba(12, 18, 27, 0.98));
    border: 1px solid rgba(48, 54, 61, 0.92);
    border-radius: 8px;
    display: grid;
    gap: 6px;
    min-width: 0;
    padding: 12px 13px;
    position: relative;
}

.stat-card-head,
.panel-card-header {
    align-items: center;
    display: flex;
    gap: 10px;
    justify-content: space-between;
}

.stat-card-head {
    justify-content: flex-start;
}

.stat-grid > .stat-card .stat-label,
.stat-grid > .stat-card .stat-hint,
.stat-label,
.stat-hint {
    color: var(--muted);
    font-size: 12px;
}

.stat-grid > .stat-card .stat-value,
.stat-value {
    display: block;
    font-size: 31px;
    line-height: 1.05;
    font-weight: 800;
    overflow-wrap: break-word;
}

.stat-value.is-long {
    font-size: 18px;
    line-height: 1.2;
}

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

.metric {
    background: linear-gradient(180deg, rgba(18, 25, 35, 0.98), rgba(13, 19, 28, 0.98));
    border: 1px solid rgba(40, 50, 65, 0.96);
    border-radius: 8px;
    padding: 18px;
}

.metric strong {
    display: block;
    font-size: 28px;
}

.metric span,
.muted {
    color: var(--muted);
}

table {
    border-collapse: collapse;
    width: 100%;
}

th,
td {
    border-bottom: 1px solid var(--line);
    padding: 10px 11px;
    text-align: left;
    vertical-align: top;
}

th {
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

tbody tr:hover {
    background: rgba(139, 148, 158, 0.05);
}

form.stack {
    display: grid;
    gap: 12px;
}

label {
    color: var(--muted);
    display: grid;
    gap: 5px;
    font-size: 14px;
}

input,
select,
textarea {
    background: var(--control-bg);
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--text);
    min-height: 40px;
    padding: 7px 10px;
    width: 100%;
}

textarea {
    min-height: 86px;
    resize: vertical;
}

button,
.button {
    background: linear-gradient(180deg, #fb7d22, #e85f0a);
    border: 0;
    border-radius: 6px;
    color: white;
    cursor: pointer;
    display: inline-block;
    font: inherit;
    font-weight: 650;
    padding: 8px 12px;
}

button.secondary,
.button.secondary {
    background: var(--control-bg-hover);
    border: 1px solid rgba(139, 148, 158, 0.18);
    color: var(--text);
}

button.danger {
    background: var(--danger);
}

button:disabled,
select:disabled {
    cursor: not-allowed;
    opacity: 0.58;
}

nav button {
    background: transparent;
    color: var(--muted);
    padding: 0;
}

.actions {
    align-items: center;
    display: flex;
    gap: 10px;
}

.actions form {
    margin: 0;
}

.flash {
    animation: flash-dismiss 5s ease forwards;
    background: rgba(47, 129, 247, 0.16);
    border: 1px solid rgba(47, 129, 247, 0.4);
    border-radius: 8px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.24);
    margin-bottom: 20px;
    margin-left: auto;
    max-width: 520px;
    padding: 12px 14px;
    position: sticky;
    top: 12px;
    z-index: 5;
}

@media (prefers-reduced-motion: reduce) {
    .flash {
        animation-duration: 0.01s;
        animation-delay: 5s;
    }
}

@keyframes flash-dismiss {
    0%,
    72% {
        margin-bottom: 20px;
        max-height: 120px;
        opacity: 1;
        padding-bottom: 12px;
        padding-top: 12px;
    }

    100% {
        border-width: 0;
        margin-bottom: 0;
        max-height: 0;
        opacity: 0;
        overflow: hidden;
        padding-bottom: 0;
        padding-top: 0;
        pointer-events: none;
    }
}

.auth-shell {
    align-items: center;
    display: grid;
    justify-content: center;
    min-height: calc(100vh - 128px);
}

.auth-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
    max-width: 440px;
    padding: 28px;
    width: min(440px, calc(100vw - 40px));
}

.auth-brand {
    margin-bottom: 22px;
}

.auth-brand span {
    color: var(--accent);
    display: block;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 8px;
}

.auth-brand strong {
    display: block;
    font-size: 28px;
    line-height: 1.15;
    margin-bottom: 8px;
}

.auth-brand p,
.auth-note {
    color: var(--muted);
    margin: 0;
}

.auth-note {
    border-top: 1px solid var(--line);
    font-size: 13px;
    margin-top: 18px;
    padding-top: 14px;
}

body.login-page {
    overflow-x: hidden;
    overflow-y: auto;
}

body.login-page .content-wrap {
    margin-left: 0;
}

body.login-page .content-inner {
    padding: 0;
}

body.login-page .app-shell,
body.login-page .sidebar,
body.login-page .topbar {
    display: none;
}

body.login-page {
    background:
        linear-gradient(90deg, rgba(2, 7, 19, 0.22), rgba(2, 7, 19, 0.72)),
        url("/assets/login-world-bg.png"),
        radial-gradient(circle at 16% 72%, rgba(255, 46, 31, 0.16), transparent 18rem),
        radial-gradient(circle at 45% 20%, rgba(0, 116, 255, 0.14), transparent 26rem),
        radial-gradient(circle at 52% 76%, rgba(31, 255, 111, 0.09), transparent 16rem),
        linear-gradient(135deg, #020713 0%, #030914 46%, #02050c 100%);
    background-position: center, left center, center, center, center, center;
    background-repeat: no-repeat;
    background-size: cover, cover, auto, auto, auto, auto;
    min-height: 100vh;
}

.login-shell {
    align-items: stretch;
    display: grid;
    gap: 30px;
    grid-template-columns: minmax(0, 1.18fr) minmax(360px, 0.82fr);
    height: auto;
    min-height: 100vh;
    overflow: visible;
    padding: 24px 40px 20px;
    position: relative;
}

.login-shell::before {
    background:
        linear-gradient(90deg, rgba(35, 122, 255, 0.07) 1px, transparent 1px),
        linear-gradient(rgba(35, 122, 255, 0.06) 1px, transparent 1px);
    background-size: 88px 88px;
    content: "";
    inset: 0;
    opacity: 0.18;
    pointer-events: none;
    position: absolute;
}

.login-hero,
.login-panel-wrap {
    position: relative;
    z-index: 1;
}

.login-hero {
    align-content: space-between;
    display: grid;
    gap: 14px;
    min-width: 0;
    padding: 0;
    position: relative;
}

.login-hero::before {
    background:
        radial-gradient(circle at 46% 44%, rgba(0, 116, 255, 0.14), transparent 0 170px),
        radial-gradient(circle at 34% 60%, rgba(255, 104, 24, 0.12), transparent 0 150px);
    content: "";
    height: 360px;
    left: 18%;
    opacity: 0.24;
    pointer-events: none;
    position: absolute;
    top: 58px;
    width: 80%;
    z-index: 0;
}

.login-brand-block {
    display: grid;
    gap: 6px;
}

.login-brand-block,
.login-hero-intro,
.login-hero-main,
.login-strip {
    position: relative;
    z-index: 1;
}

.login-brand {
    align-items: center;
    display: flex;
    gap: 18px;
}

.login-brand-icon {
    align-items: center;
    background: #ff6818;
    border: 0;
    clip-path: polygon(50% 0, 92% 18%, 86% 70%, 50% 100%, 14% 70%, 8% 18%);
    color: #fff;
    display: inline-flex;
    font-size: 16px;
    font-weight: 900;
    height: 58px;
    justify-content: center;
    line-height: 1;
    position: relative;
    width: 46px;
    z-index: 0;
}

.login-brand-icon::before {
    background: #020814;
    clip-path: polygon(50% 0, 92% 18%, 86% 70%, 50% 100%, 14% 70%, 8% 18%);
    content: "";
    inset: 5px;
    position: absolute;
    z-index: 0;
}

.login-brand-icon span {
    position: relative;
    z-index: 1;
}

.login-brand strong {
    display: block;
    font-size: clamp(30px, 2.8vw, 44px);
    font-weight: 300;
    letter-spacing: 0;
    line-height: 0.92;
}

.login-brand strong span {
    color: #ff6818;
    display: inline;
    font-weight: 900;
}

.login-brand > div > span {
    color: var(--muted);
    display: block;
    font-size: 14px;
    margin-left: 34px;
    margin-top: 4px;
}

.login-hero h1 {
    font-size: clamp(32px, 3.1vw, 42px);
    font-weight: 700;
    line-height: 1.04;
    margin: 0;
    max-width: 15.5ch;
}

.login-hero h1 span {
    color: #ff7a12;
    display: inline;
}

.login-lead {
    color: #c8d1df;
    font-size: 16px;
    line-height: 1.42;
    margin: 0;
    max-width: 42rem;
    white-space: pre-line;
}

.login-hero-intro {
    display: grid;
    gap: 10px;
}

.login-hero-main {
    align-items: stretch;
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(250px, 0.7fr) minmax(360px, 1.3fr);
    min-height: 0;
}

.login-feature-list {
    display: grid;
    gap: 10px;
    grid-template-columns: 1fr;
    align-content: center;
}

.login-feature {
    align-items: flex-start;
    background: transparent;
    border: 0;
    border-radius: 0;
    display: flex;
    gap: 12px;
    min-width: 0;
    padding: 0;
}

.login-feature-icon {
    background: rgba(255, 104, 24, 0.26);
    border: 1px solid #ff8a1f;
    border-radius: 7px;
    box-shadow: inset 0 0 0 1px rgba(255, 138, 31, 0.12), 0 0 14px rgba(255, 104, 24, 0.18);
    color: #ffb067;
    display: grid;
    flex: 0 0 auto;
    height: 28px;
    line-height: 0;
    overflow: hidden;
    padding: 0;
    place-items: center;
    text-align: center;
    width: 28px;
}

.login-feature-icon .status-icon {
    color: currentColor;
    display: block;
    flex: 0 0 auto;
    height: 18px;
    margin: 0;
    place-self: center;
    filter: drop-shadow(0 0 4px rgba(255, 138, 31, 0.45));
    stroke-width: 2.6;
    transform: none;
    width: 18px;
}

.login-feature strong {
    display: block;
    font-size: 13px;
    line-height: 1.3;
    margin-bottom: 2px;
}

.login-feature span {
    color: #b8c1ce;
    display: block;
    font-size: 12px;
    line-height: 1.32;
}

.login-diagram {
    background:
        radial-gradient(circle at 47% 58%, rgba(255, 104, 24, 0.25), transparent 0 96px),
        radial-gradient(circle at 78% 72%, rgba(56, 255, 111, 0.12), transparent 0 140px),
        radial-gradient(circle at 42% 15%, rgba(35, 137, 255, 0.16), transparent 0 190px);
    background-position: center, center, center;
    background-repeat: no-repeat;
    background-size: auto, auto, auto;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    height: clamp(330px, 42vh, 460px);
    min-height: 330px;
    overflow: hidden;
    position: relative;
}

.login-world-map {
    display: none;
    height: 66%;
    left: 0;
    opacity: 0;
    position: absolute;
    top: -8px;
    width: 100%;
}

.login-diagram-grid {
    display: none;
}

.login-strip {
    display: grid;
    gap: 0;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 0;
    overflow: hidden;
}

.login-strip span {
    align-items: center;
    background: rgba(8, 18, 32, 0.68);
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-left-width: 0;
    color: #d7dee8;
    display: grid;
    gap: 0 12px;
    grid-template-columns: 32px minmax(0, 1fr);
    grid-template-rows: 1fr 1fr;
    min-height: 54px;
    padding: 8px 12px;
    text-align: left;
}

.login-strip span:first-child {
    border-left-width: 1px;
    border-radius: 8px 0 0 8px;
}

.login-strip span:last-child {
    border-radius: 0 8px 8px 0;
}

.login-strip svg {
    color: #ffb067;
    display: block;
    grid-row: span 2;
    height: 22px;
    justify-self: center;
    margin: 0;
    stroke-width: 2.4;
    width: 22px;
}

.login-strip strong,
.login-strip small {
    align-self: center;
    line-height: 1.15;
    min-width: 0;
}

.login-card-icon-svg {
    color: #ff6818;
    height: 30px;
    width: 30px;
}

.login-submit-icon {
    color: #fff;
}

.login-strip strong {
    color: #ff8a1f;
    display: block;
    font-size: 13px;
}

.login-strip small {
    color: #c3cbd7;
    display: block;
    font-size: 11px;
    font-weight: 400;
}

.login-panel-wrap {
    align-content: center;
    display: grid;
    gap: 72px;
    justify-items: center;
    min-width: 0;
}

.login-card {
    background: rgba(5, 12, 23, 0.78);
    border: 1px solid rgba(116, 139, 171, 0.42);
    border-radius: 22px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.32);
    display: grid;
    gap: 16px;
    max-width: 440px;
    padding: 34px 38px 30px;
    width: 100%;
}

.login-card-head {
    align-items: center;
    display: flex;
    gap: 18px;
    padding-bottom: 18px;
    position: relative;
}

.login-card-head::after {
    background: rgba(148, 163, 184, 0.18);
    bottom: 0;
    content: "";
    height: 1px;
    left: 0;
    position: absolute;
    right: 0;
}

.login-card-icon {
    align-items: center;
    background: rgba(255, 104, 24, 0.08);
    border: 2px solid #ff6818;
    border-radius: 999px;
    color: #ff6818;
    display: inline-flex;
    flex: 0 0 auto;
    height: 58px;
    justify-content: center;
    width: 58px;
}

.login-card-icon-svg {
    height: 28px;
    width: 28px;
}

.login-card-head strong {
    display: block;
    font-size: 22px;
    line-height: 1.2;
}

.login-card-head p {
    color: #c4ccd7;
    font-size: 15px;
    margin: 8px 0 0;
}

.login-alert {
    align-items: flex-start;
    background: rgba(127, 29, 29, 0.28);
    border: 1px solid rgba(248, 113, 113, 0.32);
    border-radius: 12px;
    display: flex;
    gap: 10px;
    padding: 11px 13px;
}

.login-alert[hidden] {
    display: none;
}

.login-alert-dot {
    background: var(--danger);
    border-radius: 999px;
    flex: 0 0 auto;
    height: 10px;
    margin-top: 4px;
    width: 10px;
}

.login-alert p {
    margin: 0;
}

.login-field {
    display: grid;
    gap: 9px;
}

.login-field > span:first-child {
    color: #fff;
    font-size: 16px;
    font-weight: 700;
}

.login-input-wrap,
.login-password-wrap {
    align-items: center;
    background: rgba(4, 12, 22, 0.9);
    border: 1px solid rgba(116, 139, 171, 0.45);
    border-radius: 8px;
    display: flex;
    min-height: 52px;
    overflow: hidden;
}

.login-input-wrap:focus-within,
.login-password-wrap:focus-within {
    border-color: rgba(255, 104, 24, 0.62);
    box-shadow: 0 0 0 3px rgba(255, 104, 24, 0.14);
}

.login-input-icon {
    color: #b7c1d0;
    flex: 0 0 auto;
    height: 24px;
    margin-left: 18px;
    width: 24px;
}

.login-field input {
    background: transparent;
    border: 0;
    border-radius: 0;
    color: var(--text);
    flex: 1 1 auto;
    font-size: 16px;
    min-height: 50px;
    min-width: 0;
    padding: 0 20px;
}

.login-field input:focus {
    outline: none;
}

.login-password-wrap input {
    padding-left: 20px;
}

.login-password-wrap input:focus {
    box-shadow: none;
}

.login-password-toggle {
    background: transparent;
    border: 0;
    border-radius: 0;
    color: #c5ceda;
    flex: 0 0 auto;
    min-height: 50px;
    padding: 0 18px;
}

.login-toggle-icon {
    height: 26px;
    width: 26px;
}

.login-actions {
    display: grid;
    gap: 12px;
}

.login-submit {
    align-items: center;
    background: linear-gradient(90deg, #ff301d 0%, #ff6818 54%, #ff9719 100%);
    border: 0;
    border-radius: 8px;
    box-shadow: 0 16px 30px rgba(255, 104, 24, 0.24);
    color: #fff;
    display: inline-flex;
    font-size: 18px;
    font-weight: 800;
    gap: 14px;
    justify-content: center;
    min-height: 54px;
}

.login-submit-icon {
    height: 26px;
    width: 26px;
}

.login-submit:hover,
.login-submit:focus-visible {
    box-shadow: 0 18px 34px rgba(255, 106, 0, 0.28);
    outline: none;
}

.login-separator {
    align-items: center;
    color: #c7d1dd;
    display: grid;
    font-size: 15px;
    grid-template-columns: 1fr auto 1fr;
    gap: 28px;
}

.login-separator::before,
.login-separator::after {
    background: rgba(148, 163, 184, 0.16);
    content: "";
    height: 1px;
}

.login-config-button {
    align-items: center;
    background: transparent;
    border: 1px solid rgba(116, 139, 171, 0.55);
    border-radius: 8px;
    color: #fff;
    display: inline-flex;
    font-size: 17px;
    gap: 12px;
    justify-content: center;
    min-height: 52px;
}

.login-config-icon {
    height: 24px;
    width: 24px;
}

.login-card-icon-svg,
.login-input-icon,
.login-toggle-icon,
.login-submit-icon,
.login-config-icon {
    stroke-width: 2.2;
}

.login-footer {
    align-items: center;
    color: var(--muted);
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    justify-content: flex-start;
    max-width: 440px;
    padding: 0 2px;
    width: 100%;
}

.login-footer-brand {
    align-items: center;
    display: grid;
    gap: 0 10px;
    grid-template-columns: 42px auto;
}

.login-footer-icon {
    align-items: center;
    background: #ff6818;
    border: 0;
    clip-path: polygon(50% 0, 92% 18%, 86% 70%, 50% 100%, 14% 70%, 8% 18%);
    color: #fff;
    display: inline-flex;
    font-size: 11px;
    font-weight: 900;
    grid-row: span 2;
    height: 42px;
    justify-content: center;
    position: relative;
    width: 34px;
    z-index: 0;
}

.login-footer-icon::before {
    background: #020814;
    clip-path: polygon(50% 0, 92% 18%, 86% 70%, 50% 100%, 14% 70%, 8% 18%);
    content: "";
    inset: 3px;
    position: absolute;
    z-index: 0;
}

.login-footer-icon span {
    position: relative;
    z-index: 1;
}

.login-footer-brand strong {
    color: #fff;
    font-size: 17px;
}

.login-footer-brand em {
    color: #ff6818;
    font-style: normal;
}

.login-footer-brand small {
    display: block;
}

@media (max-width: 1099px) {
    .login-shell {
        gap: 20px;
        grid-template-columns: 1fr;
        height: auto;
        min-height: 100vh;
        overflow: visible;
        padding: 22px;
    }

    .login-hero {
        padding: 0;
    }

    .login-panel-wrap {
        order: -1;
    }

    .login-hero h1 {
        max-width: 100%;
    }

    .login-hero-main {
        grid-template-columns: 1fr;
    }

    .login-diagram {
        height: 420px;
        min-height: 420px;
    }
}

@media (max-width: 767px) {
    .login-shell {
        gap: 16px;
        padding: 14px;
    }

    .login-feature-list,
    .login-strip {
        grid-template-columns: 1fr;
    }

    .login-diagram {
        height: 320px;
        min-height: 320px;
    }

    .login-hero h1 {
        font-size: 34px;
        line-height: 1.02;
    }

    .login-lead {
        font-size: 15px;
    }

    .login-meta-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .login-card {
        padding: 26px 18px;
    }

    .login-card-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 16px;
    }

    .login-card-head strong {
        font-size: 23px;
    }

    .login-card-head p,
    .login-lead,
    .login-config-button {
        font-size: 16px;
    }

    .login-footer {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-height: 900px) {
    .login-shell {
        gap: 18px;
        min-height: auto;
        padding: 16px 28px 14px;
    }

    .login-hero {
        gap: 10px;
    }

    .login-hero::before {
        height: 280px;
        top: 42px;
    }

    .login-hero h1 {
        font-size: clamp(30px, 2.6vw, 38px);
    }

    .login-lead {
        font-size: 14px;
    }

    .login-hero-main {
        gap: 10px;
    }

    .login-feature-list {
        gap: 8px;
    }

    .login-feature {
        gap: 10px;
    }

    .login-diagram {
        height: 300px;
        min-height: 300px;
    }

    .login-panel-wrap {
        gap: 28px;
    }

    .login-card {
        max-width: 420px;
        padding: 28px 30px 24px;
    }

    .login-footer {
        gap: 12px;
        max-width: 420px;
    }
}

.status {
    border-radius: 999px;
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 9px;
}

.status.active {
    background: rgba(63, 185, 80, 0.18);
    color: var(--ok);
}

.status.pending,
.status.inactive {
    background: rgba(139, 148, 158, 0.18);
    color: var(--muted);
}

.status.error,
.status.expired,
.status.revoked,
.status.suspended,
.status.offline {
    background: rgba(248, 81, 73, 0.16);
    color: var(--danger);
}

.status.online,
.status.degraded,
.status.unknown,
.status.never_seen {
    background: rgba(139, 148, 158, 0.18);
    color: var(--muted);
}

.status-badge {
    border-radius: 999px;
    align-items: center;
    gap: 6px;
    display: inline-flex;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.2;
    padding: 5px 10px;
    white-space: nowrap;
}

.status-active,
.status-online {
    background: rgba(63, 185, 80, 0.18);
    color: var(--ok);
}

.status-pending,
.status-degraded {
    background: rgba(210, 153, 34, 0.18);
    color: var(--warn);
}

.status-error,
.status-suspended,
.status-offline,
.status-inactive,
.status-revoked,
.status-expired {
    background: rgba(248, 81, 73, 0.16);
    color: var(--danger);
}

.status-unknown,
.status-never_seen {
    background: rgba(139, 148, 158, 0.18);
    color: var(--muted);
}

.status-ready,
.status-ok {
    background: rgba(63, 185, 80, 0.18);
    color: var(--ok);
}

.status-warning {
    background: rgba(210, 153, 34, 0.18);
    color: var(--warn);
}

.status-blocked {
    background: rgba(248, 81, 73, 0.16);
    color: var(--danger);
}

.badge {
    border-radius: 999px;
    display: inline-flex;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    padding: 4px 9px;
    white-space: nowrap;
}

.badge-success {
    background: rgba(63, 185, 80, 0.18);
    color: var(--ok);
}

.badge-warning {
    background: rgba(210, 153, 34, 0.18);
    color: var(--warn);
}

.badge-muted {
    background: rgba(139, 148, 158, 0.18);
    color: var(--muted);
}

.helper-text {
    color: var(--muted);
    font-size: 13px;
    margin: 0;
}

.root-monitor-shell {
    gap: 12px;
}

.root-hero-subtitle {
    color: var(--text);
}

.root-updated-at {
    color: rgba(150, 163, 180, 0.82);
    display: block;
    font-size: 12px;
    margin-top: 8px;
}

.root-metric-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.root-metric-grid .metric-card {
    align-items: stretch;
}

.root-metric-grid .metric-card > div {
    align-self: stretch;
    display: flex;
    flex-direction: column;
}

.root-metric-grid .metric-card strong {
    align-items: flex-end;
    display: flex;
    min-height: 34px;
    overflow-wrap: normal;
    white-space: nowrap;
}

.root-metric-grid .metric-card small {
    margin-top: auto;
    white-space: nowrap;
}

.root-metric-grid .card-icon {
    align-items: center;
    border-width: 1px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 10px 24px rgba(0, 0, 0, 0.24);
    display: inline-flex;
    justify-content: center;
}

.root-metric-grid .card-icon-svg {
    height: 20px;
    filter: drop-shadow(0 0 5px currentColor);
    stroke-width: 2.45;
    width: 20px;
}

.root-metric-grid .root-card-icon-ok {
    background: linear-gradient(135deg, rgba(63, 185, 80, 0.30), rgba(63, 185, 80, 0.11));
    border-color: rgba(63, 185, 80, 0.56);
    color: #56d364;
}

.root-metric-grid .root-card-icon-warning {
    background: linear-gradient(135deg, rgba(210, 153, 34, 0.32), rgba(249, 115, 22, 0.13));
    border-color: rgba(210, 153, 34, 0.58);
    color: #f2cc60;
}

.root-metric-grid .root-card-icon-blocked {
    background: linear-gradient(135deg, rgba(248, 81, 73, 0.30), rgba(248, 81, 73, 0.11));
    border-color: rgba(248, 81, 73, 0.58);
    color: #ff7b72;
}

.root-metric-grid .root-card-icon-fast {
    background: linear-gradient(135deg, rgba(57, 197, 207, 0.30), rgba(57, 197, 207, 0.11));
    border-color: rgba(57, 197, 207, 0.58);
    color: #56d4dd;
}

.root-metric-grid .root-card-icon-fast-alt {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.28), rgba(57, 197, 207, 0.11));
    border-color: rgba(249, 115, 22, 0.54);
    color: #ffb067;
}

.root-table-card {
    min-width: 0;
}

.root-table-wrap {
    overflow-x: hidden;
}

.root-servers-table {
    table-layout: fixed;
    width: 100%;
}

.root-servers-table th,
.root-servers-table td {
    padding-bottom: 7px;
    padding-left: 6px;
    padding-right: 6px;
    padding-top: 7px;
    overflow-wrap: normal;
    word-break: normal;
    vertical-align: top;
}

.root-address-cell {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 10.5px;
    white-space: nowrap;
}

.root-col-id {
    text-align: center;
    width: 46px;
}

.root-col-hostname {
    width: 16%;
    white-space: nowrap;
}

.root-col-ipv4 {
    width: 10%;
    white-space: nowrap;
}

.root-col-ipv6 {
    width: 18%;
    white-space: nowrap;
}

.root-col-latency {
    white-space: nowrap;
    width: 9%;
}

.root-col-loss,
.root-col-dns {
    white-space: nowrap;
    width: 8%;
}

.root-col-status {
    width: 10%;
}

.root-col-status .root-status-text,
.root-col-dns .root-status-text {
    white-space: nowrap;
}

.root-id-badge {
    align-items: center;
    border-radius: 999px;
    display: inline-flex;
    font-weight: 800;
    justify-content: center;
    line-height: 1.15;
    white-space: nowrap;
}

.root-id-badge {
    font-size: 12px;
    height: 28px;
    min-width: 28px;
    padding: 0 9px;
}

.root-metric,
.root-status-text {
    background: transparent;
    border: 0;
    display: inline;
    font-size: 11.5px;
    font-weight: 800;
    line-height: 1.2;
    padding: 0;
    white-space: nowrap;
}

.root-metric.metric-ok {
    color: var(--ok);
}

.root-metric.metric-warning {
    color: var(--warn);
}

.root-metric.metric-caution {
    color: var(--accent-2);
}

.root-metric.metric-blocked {
    color: var(--danger);
}

.root-metric.metric-none {
    color: var(--muted);
}

.root-status-text.status-ok {
    color: var(--ok);
}

.root-status-text.status-warning {
    color: var(--warn);
}

.root-status-text.status-blocked {
    color: var(--danger);
}

.root-status-text.status-unknown {
    color: var(--muted);
}

.root-error-text {
    display: block;
    max-width: 260px;
    white-space: normal;
}

@media (max-width: 1180px) {
    .root-table-wrap {
        overflow-x: auto;
    }

    .root-servers-table {
        min-width: 980px;
    }
}

.root-stale-alert {
    border-color: rgba(210, 153, 34, 0.4);
}

.root-empty-state {
    display: grid;
    gap: 10px;
}

.section-title {
    align-items: flex-start;
    display: flex;
    gap: 14px;
    justify-content: space-between;
    margin-bottom: 12px;
}

.section-title h2,
.section-title h3 {
    margin-bottom: 4px;
    margin-top: 0;
}

.section-title h2,
.section-title h3 {
    align-items: center;
    display: flex;
    gap: 8px;
    line-height: 1.15;
}

.agent-summary,
.credentials,
.credentials-meta {
    display: grid;
    gap: 12px;
    margin-top: 16px;
}

.agent-summary {
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.agent-summary strong {
    display: block;
    margin-top: 4px;
}

.credentials code {
    background: #0d1117;
    border: 1px solid var(--line);
    border-radius: 6px;
    display: block;
    overflow-x: auto;
    padding: 10px 12px;
}

.installer-panel {
    background: rgba(13, 17, 23, 0.62);
    border: 1px solid rgba(48, 54, 61, 0.9);
    border-radius: 8px;
    display: grid;
    gap: 12px;
    margin: 16px 0;
    min-width: 0;
    padding: 14px;
}

.compact-title {
    margin-bottom: 0;
}

.installer-grid code {
    font-size: 12px;
    overflow-wrap: break-word;
}

.installer-command {
    margin: 0;
}

.installer-progress {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.agent-inline-form {
    max-width: 640px;
    margin-bottom: 16px;
}

.policy-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    margin-bottom: 16px;
}

.policy-grid-compact {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.policy-field {
    background: #0b1118;
    border: 1px solid var(--line);
    border-radius: 6px;
    min-width: 0;
    padding: 12px;
}

.policy-field span {
    color: var(--muted);
    display: block;
    font-size: 12px;
    margin-bottom: 4px;
}

.policy-field strong {
    display: block;
    overflow-wrap: break-word;
}

.policy-actions {
    align-items: center;
    border-top: 1px solid var(--line);
    display: flex;
    gap: 14px;
    margin-top: 4px;
    padding-top: 16px;
}

.policy-preview {
    border-top: 1px solid var(--line);
    margin-top: 18px;
    padding-top: 18px;
}

.policy-preview-content {
    background: #0d1117;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--text);
    overflow-x: auto;
    padding: 12px;
    white-space: pre;
}

.code-preview {
    background: #0d1117;
    border: 1px solid var(--line);
    border-radius: 6px;
    overflow-x: auto;
    padding: 12px;
}

.notice-box {
    background: rgba(210, 153, 34, 0.12);
    border: 1px solid rgba(210, 153, 34, 0.32);
    border-radius: 8px;
    display: grid;
    gap: 4px;
    margin-bottom: 16px;
    padding: 12px 14px;
}

.notice-box strong {
    color: var(--warn);
}

.notice-box span,
.warning-note {
    color: var(--text);
    font-size: 13px;
    line-height: 1.45;
}

.onboarding-grid,
.onboarding-code-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.onboarding-code-grid {
    margin-top: 14px;
}

.onboarding-card,
.onboarding-code-card {
    background: rgba(13, 17, 23, 0.64);
    border: 1px solid rgba(48, 54, 61, 0.9);
    border-radius: 8px;
    min-width: 0;
    padding: 14px;
}

.checklist {
    display: grid;
    gap: 9px;
}

.checklist-item {
    align-items: flex-start;
    background: rgba(11, 17, 24, 0.78);
    border: 1px solid rgba(48, 54, 61, 0.88);
    border-radius: 8px;
    display: flex;
    gap: 10px;
    min-width: 0;
    padding: 10px 12px;
}

.checklist-item strong,
.checklist-item span {
    display: block;
    overflow-wrap: break-word;
}

.checklist-item strong {
    margin-bottom: 3px;
}

.checklist-item span {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.35;
}

.checklist-icon {
    align-items: center;
    border-radius: 999px;
    display: inline-flex;
    flex: 0 0 24px;
    font-size: 13px;
    font-weight: 800;
    height: 24px;
    justify-content: center;
    line-height: 1;
    width: 24px;
}

.checklist-item.is-ok .checklist-icon {
    background: rgba(63, 185, 80, 0.18);
    color: var(--ok);
}

.checklist-item.is-pending .checklist-icon {
    background: rgba(210, 153, 34, 0.18);
    color: var(--warn);
}

.warning-note {
    background: rgba(248, 81, 73, 0.12);
    border: 1px solid rgba(248, 81, 73, 0.28);
    border-radius: 8px;
    margin: 12px 0 0;
    padding: 10px 12px;
}

.onboarding-code {
    font-size: 12px;
    line-height: 1.45;
    max-height: 420px;
    white-space: pre;
}

.rules-table td {
    vertical-align: middle;
}

.rules-table .actions {
    align-items: center;
    flex-wrap: wrap;
}

.rules-table button {
    padding: 7px 10px;
}

.server-grid,
.server-card-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.server-grid > .server-card,
.server-card {
    background: linear-gradient(180deg, rgba(16, 23, 32, 0.98), rgba(11, 17, 24, 0.98));
    border: 1px solid rgba(48, 54, 61, 0.9);
    border-radius: 8px;
    display: grid;
    gap: 14px;
    min-width: 0;
    padding: 16px;
}

.server-card.is-selected {
    border-color: rgba(249, 115, 22, 0.58);
    box-shadow: 0 0 0 1px rgba(249, 115, 22, 0.18), var(--shadow);
}

.server-card-header {
    align-items: flex-start;
    display: flex;
    gap: 12px;
    justify-content: space-between;
}

.server-card-body {
    display: grid;
    gap: 10px;
}

.server-card-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: auto;
}

.server-card-title {
    min-width: 0;
}

.server-card h3 {
    font-size: 17px;
    margin: 0 0 4px;
}

.server-card p {
    color: var(--muted);
    margin: 0;
    overflow-wrap: break-word;
}

.server-card-body .meta-list,
.meta-list {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
}

.server-card-body .meta-list > div,
.meta-list div {
    background: rgba(13, 17, 23, 0.72);
    border: 1px solid rgba(48, 54, 61, 0.9);
    border-radius: 6px;
    display: grid;
    gap: 4px;
    padding: 10px 12px;
}

.meta-list dt {
    color: var(--muted);
    font-size: 12px;
}

.meta-list dd {
    margin: 0;
}

.card-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: auto;
}

.form-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid .full-span {
    grid-column: 1 / -1;
}

.table-card {
    overflow: hidden;
    padding: 0;
    max-width: 100%;
}

.table-card .section-title {
    margin: 0;
    padding: 16px 16px 0;
}

.table-card table {
    margin-top: 10px;
}

.premium-table-card table {
    table-layout: fixed;
    width: 100%;
    max-width: 100%;
}

.compact-list {
    display: grid;
    gap: 8px;
}

.report-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.report-card {
    background: linear-gradient(180deg, rgba(13, 17, 23, 0.92), rgba(10, 15, 22, 0.96));
    border: 1px solid rgba(48, 54, 61, 0.92);
    border-radius: 8px;
    display: grid;
    gap: 10px;
    padding: 12px;
}

.report-card-head {
    align-items: flex-start;
    display: flex;
    gap: 12px;
    justify-content: space-between;
}

.report-card h3 {
    font-size: 18px;
    line-height: 1.15;
    margin: 2px 0 0;
}

.report-metrics {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
}

.report-metrics div {
    background: rgba(13, 17, 23, 0.72);
    border: 1px solid rgba(48, 54, 61, 0.85);
    border-radius: 8px;
    min-width: 0;
    padding: 9px 10px;
}

.report-metrics span {
    color: var(--muted);
    display: block;
    font-size: 12px;
    margin-bottom: 4px;
}

.report-metrics strong {
    display: block;
    font-size: 14px;
    line-height: 1.35;
    overflow-wrap: break-word;
}

.report-note {
    color: var(--text);
    font-size: 13px;
    margin: 0;
}

.report-footer {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    margin-top: 10px;
}

.report-footer div {
    background: rgba(13, 17, 23, 0.68);
    border: 1px solid rgba(48, 54, 61, 0.82);
    border-radius: 8px;
    padding: 10px 12px;
}

.report-footer strong {
    display: block;
    font-size: 12px;
    margin-top: 4px;
    overflow-wrap: break-word;
}

.pill-list,
.tool-pills,
.dashboard-row-subtitle {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pill {
    align-items: center;
    border-radius: 999px;
    display: inline-flex;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    padding: 4px 9px;
    white-space: nowrap;
}

.dashboard-row-subtitle .pill {
    cursor: help;
}

.audit-cta {
    background: rgba(13, 17, 23, 0.68);
    border: 1px solid rgba(48, 54, 61, 0.86);
    border-radius: 999px;
    color: var(--text);
    align-items: center;
    align-self: flex-start;
    display: inline-flex;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.1;
    margin-top: 2px;
    padding: 6px 10px;
    transition:
        border-color 120ms ease,
        background 120ms ease,
        color 120ms ease,
        transform 120ms ease,
        box-shadow 120ms ease;
}

.audit-cta:hover {
    background: rgba(249, 115, 22, 0.12);
    border-color: rgba(249, 115, 22, 0.28);
    color: var(--accent-2);
    box-shadow: 0 8px 18px rgba(249, 115, 22, 0.08);
    transform: translateY(-1px);
}

.audit-cta .status-icon {
    margin-right: 0;
    height: 11px;
    width: 11px;
    transition: transform 120ms ease;
}

.audit-cta:hover .status-icon {
    transform: translateX(1px);
}

.pill-muted {
    background: rgba(139, 148, 158, 0.18);
    color: var(--muted);
}

.pill-danger {
    background: rgba(248, 81, 73, 0.16);
    color: var(--danger);
}

.dashboard-row-main {
    min-width: 0;
}

.dashboard-row-main strong,
.dashboard-row-main span {
    overflow-wrap: break-word;
}

.danger-zone {
    border-color: rgba(248, 81, 73, 0.34);
}

.servers-shell {
    display: grid;
    gap: 12px;
    min-width: 0;
    max-width: 100%;
}

.servers-hero {
    display: none;
}

.server-layout {
    align-items: start;
    display: grid;
    gap: 20px;
    grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
    min-width: 0;
    max-width: 100%;
    width: 100%;
}

.server-layout.is-detail-open {
    grid-template-columns: minmax(0, 1fr);
}

.server-layout.is-detail-open .server-list-panel {
    display: none;
}

.servers-workspace {
    align-items: start;
    display: grid;
    gap: 20px;
    grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
    width: 100%;
}

.server-list-panel,
.server-detail-panel {
    min-width: 0;
}

.server-list-panel {
    max-height: calc(100vh - 40px);
    overflow: auto;
    position: sticky;
    top: 20px;
}

.server-detail-panel {
    display: grid;
    gap: 12px;
    min-width: 0;
    width: 100%;
}

.server-search {
    align-items: end;
    display: grid;
    gap: 8px;
    grid-template-columns: minmax(0, 1fr) minmax(130px, 170px) auto auto;
    margin-bottom: 12px;
}

.server-list {
    display: grid;
    gap: 8px;
}

.server-list-item {
    align-items: start;
    background: rgba(13, 17, 23, 0.66);
    border: 1px solid rgba(48, 54, 61, 0.86);
    border-radius: 8px;
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(0, 1fr);
    padding: 12px;
}

.server-list-item:hover {
    border-color: rgba(249, 115, 22, 0.34);
    box-shadow: 0 0 0 1px rgba(249, 115, 22, 0.10);
}

.server-list-item.is-selected {
    border-color: rgba(249, 115, 22, 0.58);
    box-shadow: inset 0 0 0 1px rgba(249, 115, 22, 0.14);
}

.server-list-item-main {
    min-width: 0;
}

.server-list-item-main strong,
.server-list-item-main span,
.server-list-item-main small {
    display: block;
    overflow-wrap: break-word;
    word-break: normal;
}

.server-list-item-main strong {
    font-size: 13px;
    line-height: 1.25;
    margin-bottom: 3px;
}

.server-list-item-main span,
.server-list-item-main small {
    color: var(--muted);
    font-size: 11px;
    line-height: 1.35;
}

.server-list-item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.server-list-item-meta .status-badge {
    max-width: 100%;
    overflow: hidden;
}

.server-list-item-meta .status-badge:nth-child(n+3) {
    display: none;
}

.server-list-action {
    align-self: start;
    border: 1px solid rgba(139, 148, 158, 0.22);
    border-radius: 6px;
    color: var(--muted);
    display: inline-flex;
    font-size: 11px;
    font-weight: 700;
    justify-self: start;
    line-height: 1;
    padding: 7px 9px;
}

.server-list-item:hover .server-list-action,
.server-list-item.is-selected .server-list-action {
    border-color: rgba(249, 115, 22, 0.42);
    color: var(--text);
}

.server-detail-toolbar {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: space-between;
    margin-bottom: 10px;
}

.server-header-badges {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.server-primary-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-start;
    margin-top: 10px;
}

.server-primary-actions .button,
.server-actions-toggle {
    min-height: 30px;
    padding: 5px 9px;
}

.server-health-summary {
    color: var(--text);
    font-size: 12px;
    line-height: 1.35;
    margin: 6px 0 0;
}

.server-health-summary--secondary {
    color: var(--muted);
}

.server-actions-menu {
    position: relative;
}

.server-actions-menu > summary {
    list-style: none;
}

.server-actions-menu > summary::-webkit-details-marker {
    display: none;
}

.server-actions-menu[open] > summary {
    border-color: rgba(249, 115, 22, 0.34);
}

.server-actions-menu__panel {
    background: rgba(13, 17, 23, 0.98);
    border: 1px solid rgba(48, 54, 61, 0.96);
    border-radius: 8px;
    box-shadow: 0 18px 28px rgba(1, 4, 9, 0.36);
    display: grid;
    gap: 4px;
    min-width: 240px;
    padding: 8px;
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    z-index: 12;
}

.server-actions-menu__item {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 6px;
    color: var(--text);
    cursor: pointer;
    display: flex;
    gap: 8px;
    padding: 8px 10px;
    text-align: left;
    text-decoration: none;
    width: 100%;
}

.server-actions-menu__item:hover,
.server-actions-menu__item:focus-visible {
    background: rgba(249, 115, 22, 0.12);
    outline: none;
}

.server-title-stack {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.server-title-row {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 0;
}

.server-title-row h2 {
    margin-bottom: 0;
}

.server-back-link {
    min-height: 30px;
    padding: 5px 9px;
}

.server-edit-details,
.server-create-details {
    min-width: 0;
}

.server-edit-details > summary,
.server-create-details > summary {
    align-items: center;
    background: rgba(13, 17, 23, 0.62);
    border: 1px solid rgba(48, 54, 61, 0.82);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    gap: 10px;
    justify-content: space-between;
    list-style: none;
    padding: 12px 14px;
}

.server-edit-details > summary::-webkit-details-marker,
.server-create-details > summary::-webkit-details-marker {
    display: none;
}

.server-edit-details > summary span,
.server-create-details > summary span {
    align-items: center;
    display: inline-flex;
    gap: 8px;
    font-weight: 750;
}

.server-edit-details > summary small,
.server-create-details > summary small {
    color: var(--muted);
}

.server-edit-details[open] > summary,
.server-create-details[open] > summary {
    margin-bottom: 12px;
}

.server-tabs-shell {
    display: grid;
    gap: 10px;
    grid-column: 1 / -1;
    min-width: 0;
    width: 100%;
}

.server-tabs {
    border-bottom: 1px solid rgba(48, 54, 61, 0.9);
    display: flex;
    gap: 6px;
    min-width: 0;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: thin;
}

.server-tab {
    background: rgba(13, 17, 23, 0.72);
    border: 1px solid rgba(48, 54, 61, 0.92);
    border-radius: 8px;
    color: var(--muted);
    flex: 0 0 auto;
    min-height: 38px;
    padding: 8px 12px;
    white-space: nowrap;
}

.server-tab:hover,
.server-tab:focus-visible {
    border-color: rgba(249, 115, 22, 0.45);
    color: var(--text);
    outline: none;
}

.server-tab.is-active {
    background: rgba(249, 115, 22, 0.16);
    border-color: rgba(249, 115, 22, 0.56);
    color: var(--accent-2);
}

.server-tab-panel {
    display: none;
    gap: 14px;
    min-width: 0;
    width: 100%;
}

.server-tab-panels {
    display: grid;
    gap: 14px;
    min-width: 0;
    width: 100%;
}

.server-tab-panel.is-active {
    display: block;
}

.server-tab-panel > .panel,
.server-tab-panel > .server-health-grid,
.server-tab-panel > .server-overview-card {
    margin-bottom: 10px;
    min-width: 0;
    width: 100%;
}

.server-summary-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    margin: 0 0 10px;
    width: 100%;
}

.server-summary-item {
    background: rgba(11, 17, 24, 0.78);
    border: 1px solid rgba(48, 54, 61, 0.84);
    border-radius: 8px;
    min-width: 0;
    padding: 10px 12px;
}

.server-summary-item span {
    color: var(--muted);
    display: block;
    font-size: 12px;
    margin-bottom: 4px;
}

.server-summary-item strong {
    display: block;
    font-size: 14px;
    line-height: 1.35;
    overflow-wrap: break-word;
}

.server-details {
    background: rgba(13, 17, 23, 0.58);
    border: 1px solid rgba(48, 54, 61, 0.86);
    border-radius: 8px;
    display: block;
    margin-bottom: 10px;
    min-width: 0;
    width: 100%;
}

.server-details__summary {
    cursor: pointer;
    font-weight: 800;
    list-style: none;
    padding: 14px 16px;
}

.server-details__summary::-webkit-details-marker {
    display: none;
}

.server-details__summary::before {
    color: var(--accent-2);
    content: "+";
    display: inline-block;
    font-weight: 900;
    margin-right: 8px;
}

.server-details[open] > .server-details__summary {
    border-bottom: 1px solid rgba(48, 54, 61, 0.86);
}

.server-details[open] > .server-details__summary::before {
    content: "-";
}

.server-details__summary:focus-visible {
    outline: 2px solid rgba(249, 115, 22, 0.7);
    outline-offset: 3px;
}

.server-details > :not(summary) {
    margin: 14px;
}

.server-empty-compact {
    background: rgba(11, 17, 24, 0.7);
    border: 1px solid rgba(48, 54, 61, 0.78);
    border-radius: 8px;
    display: grid;
    gap: 5px;
    min-width: 0;
    padding: 12px 14px;
}

.server-empty-compact strong,
.server-empty-compact span {
    overflow-wrap: break-word;
}

.server-empty-compact span {
    color: var(--muted);
    font-size: 13px;
}

.server-overview-card .empty-state {
    align-items: flex-start;
    min-height: 0;
    padding: 14px;
}

.server-card-grid,
.operational-card-grid,
.operations-summary-grid,
.report-grid,
.onboarding-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.server-card--wide,
.server-table-card,
.premium-table-card,
.operations-table-card,
.operational-table-card,
.linked-lists-card,
.rpz-staging-card,
.rpz-apply-card,
.unbound-reload-card {
    grid-column: 1 / -1;
}

.server-health-grid {
    align-items: start;
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    min-width: 0;
    max-width: 100%;
}

.server-summary-card {
    background: rgba(13, 17, 23, 0.66);
    border: 1px solid rgba(48, 54, 61, 0.9);
    border-radius: 8px;
    display: grid;
    gap: 10px;
    min-width: 0;
    padding: 12px;
}

.status-pair-grid {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.status-pair strong,
.status-pair span,
.table-subtext,
.helper-text,
.report-note,
.empty-state span,
.empty-state strong {
    overflow-wrap: break-word;
    word-break: normal;
}

.status-pair code,
.credentials code,
.code-preview,
.policy-preview-content,
.rpz-preview-content {
    overflow-wrap: normal;
    word-break: normal;
}

.premium-table-card,
.table-scroll,
.responsive-table {
    min-width: 0;
    width: 100%;
}

.premium-table-card table,
.table-scroll table {
    min-width: 760px;
    width: 100%;
}

.linked-lists-table,
.rules-table {
    min-width: 860px;
}

.status-badge,
.badge,
button,
.button {
    max-width: 100%;
    white-space: nowrap;
}

.is-advanced-muted {
    opacity: 0.72;
}

.servers-shell *,
.server-layout *,
.server-detail-panel * {
    overflow-wrap: break-word;
    word-break: normal;
}

.servers-shell code,
.servers-shell pre,
.server-detail-panel code,
.server-detail-panel pre {
    overflow-wrap: normal;
    word-break: normal;
}

.status-pair {
    background: rgba(11, 17, 24, 0.78);
    border: 1px solid rgba(48, 54, 61, 0.84);
    border-radius: 8px;
    min-width: 0;
    padding: 9px 10px;
}

.status-pair span {
    color: var(--muted);
    display: block;
    font-size: 11px;
    margin-bottom: 4px;
}

.status-pair strong {
    display: block;
    font-size: 13px;
    overflow-wrap: break-word;
    word-break: normal;
}

.server-detail-stack {
    background: transparent;
    border: 0;
    box-shadow: none;
    display: grid;
    gap: 10px;
    padding: 0;
}

.server-detail-stack > .section-title {
    background: rgba(13, 17, 23, 0.72);
    border: 1px solid rgba(48, 54, 61, 0.86);
    border-radius: 8px;
    padding: 10px 12px;
}

.server-overview-compact {
    display: grid;
    gap: 6px;
    min-height: 0;
    padding: 4px 0 2px;
}

.server-overview-compact strong {
    font-size: 16px;
    line-height: 1.2;
}

.server-overview-compact span,
.server-overview-compact small {
    color: var(--muted);
    display: block;
    font-size: 13px;
    line-height: 1.35;
}

.server-overview-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.server-overview-actions .button {
    min-height: 30px;
    padding: 5px 9px;
}

.unbound-operational-card {
    display: grid;
    gap: 12px;
}

.operational-card-grid,
.operational-split-grid {
    display: grid;
    gap: 12px;
    min-width: 0;
}

.operational-card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.operational-split-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.split-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    min-width: 0;
}

.stacked-form {
    display: grid;
    gap: 10px;
}

.operational-mini-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.operational-table-card {
    background: rgba(13, 17, 23, 0.48);
    border: 1px solid rgba(48, 54, 61, 0.78);
    border-radius: 8px;
    min-width: 0;
    padding: 12px;
}

.operational-table-card table,
.unbound-operational-card table {
    width: 100%;
}

.operational-table-card code,
.listener-chip code,
.operational-details {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

.listener-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 0;
}

.listener-chip {
    border: 1px solid rgba(139, 148, 158, 0.22);
    border-radius: 999px;
    display: inline-flex;
    max-width: 100%;
    padding: 6px 9px;
}

.listener-chip code {
    color: var(--text);
    font-size: 12px;
    overflow-wrap: break-word;
    word-break: normal;
}

.listener-chip.is-local {
    background: rgba(63, 185, 80, 0.10);
    border-color: rgba(63, 185, 80, 0.28);
}

.listener-chip.is-public {
    background: rgba(248, 81, 73, 0.10);
    border-color: rgba(248, 81, 73, 0.34);
}

.operational-empty-state {
    border-color: rgba(210, 153, 34, 0.32);
}

.operational-reasons {
    margin-top: 0;
}

.operational-details-row td {
    background: rgba(8, 12, 18, 0.38);
    border-top: 0;
    padding-top: 0;
}

.operational-details-row details {
    color: var(--muted);
}

.operational-details-row summary {
    cursor: pointer;
    font-size: 12px;
    font-weight: 800;
}

.operational-details {
    margin-top: 10px;
    max-height: 260px;
    overflow: auto;
    white-space: pre-wrap;
}

.section-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.operations-section-actions {
    max-width: 100%;
}

.operations-summary-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-width: 0;
}

.operations-empty-state {
    margin-top: 4px;
}

.empty-state-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.operations-table-card {
    background: rgba(13, 17, 23, 0.48);
    border: 1px solid rgba(48, 54, 61, 0.78);
    border-radius: 8px;
    min-width: 0;
    padding: 12px;
}

.operation-result-cell {
    min-width: 0;
}

.operation-result-summary {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.operation-result-summary strong {
    font-size: 13px;
    overflow-wrap: break-word;
}

.operation-result-details {
    margin-top: 8px;
}

.operation-result-details summary {
    cursor: pointer;
    font-size: 12px;
    font-weight: 800;
}

.operation-detail-grid {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 8px;
    min-width: 0;
}

.operation-pre {
    margin-top: 8px;
    max-height: 260px;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-word;
}

.operation-actions {
    min-width: 0;
}

.operation-type-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 12px;
    min-width: 0;
}

.operation-type-card {
    background: rgba(11, 17, 24, 0.78);
    border: 1px solid rgba(48, 54, 61, 0.84);
    border-radius: 8px;
    cursor: pointer;
    display: grid;
    gap: 0;
    min-width: 0;
    padding: 10px 12px;
}

.operation-type-card input {
    accent-color: var(--accent);
    margin: 0 0 8px;
}

.operation-type-card-body {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.operation-type-card-head {
    align-items: flex-start;
    display: flex;
    gap: 8px;
    justify-content: space-between;
    min-width: 0;
}

.operation-type-card-head strong,
.operation-type-card-body p,
.operation-type-details span {
    overflow-wrap: break-word;
}

.operation-type-card-body p {
    color: var(--muted);
    font-size: 13px;
    margin: 0;
}

.operation-type-details {
    color: var(--muted);
    display: grid;
    gap: 4px;
    font-size: 12px;
}

.operation-confirmation {
    align-items: flex-start;
    background: rgba(11, 17, 24, 0.78);
    border: 1px solid rgba(48, 54, 61, 0.84);
    border-radius: 8px;
    display: flex;
    gap: 10px;
    margin-top: 12px;
    padding: 10px 12px;
}

.operation-confirmation input {
    margin-top: 4px;
}

.dialog-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 12px;
}

.operation-dialog {
    background: rgba(10, 15, 22, 0.98);
    border: 1px solid rgba(249, 115, 22, 0.34);
    border-radius: 8px;
    box-shadow: var(--shadow);
    color: var(--text);
    max-width: min(980px, calc(100vw - 28px));
    width: min(980px, 100%);
    padding: 0;
}

.operation-dialog::backdrop {
    background: rgba(2, 6, 12, 0.72);
}

.operation-dialog-form {
    display: grid;
    gap: 0;
    padding: 14px;
}

.icon-button {
    align-items: center;
    background: transparent;
    border: 1px solid rgba(139, 148, 158, 0.18);
    border-radius: 8px;
    color: var(--muted);
    display: inline-flex;
    justify-content: center;
    min-height: 32px;
    min-width: 32px;
    padding: 0;
}

.icon-button:hover {
    color: var(--text);
}

.operation-dialog .section-title {
    margin-bottom: 0;
}

.compact-form,
.compact-form-grid {
    min-width: 0;
}

.command-block {
    overflow-x: auto;
}

.rpz-staging-card,
.rpz-apply-card,
.unbound-reload-card,
.rpz-preview-stack,
.rpz-preview-panel,
.rpz-files-card {
    min-width: 0;
}

.rpz-summary-grid {
    margin-bottom: 12px;
}

.rpz-config-path {
    background: rgba(11, 17, 24, 0.78);
    border: 1px solid rgba(48, 54, 61, 0.84);
    border-radius: 8px;
    display: grid;
    gap: 5px;
    margin-bottom: 12px;
    min-width: 0;
    padding: 10px 12px;
}

.rpz-config-path strong {
    font-size: 13px;
    overflow-wrap: break-word;
}

.rpz-apply-path-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 12px 0;
    min-width: 0;
}

.rpz-critical-alert {
    border-color: rgba(248, 81, 73, 0.75);
}

.rpz-files-card {
    margin-top: 12px;
}

.rpz-preview-stack {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}

.rpz-preview-panel,
.rpz-file-preview {
    background: rgba(11, 17, 24, 0.62);
    border: 1px solid rgba(48, 54, 61, 0.84);
    border-radius: 8px;
    min-width: 0;
    padding: 10px;
}

.rpz-file-preview summary {
    align-items: center;
    cursor: pointer;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: space-between;
}

.rpz-file-preview summary span:first-child {
    font-weight: 800;
    overflow-wrap: break-word;
}

.rpz-preview-content {
    margin-top: 8px;
    max-height: 420px;
    overflow: auto;
    white-space: pre;
}

.checklist-grid {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.onboarding-compact-grid {
    margin-top: 12px;
}

.risk-note {
    background: rgba(13, 17, 23, 0.66);
    border: 1px solid rgba(48, 54, 61, 0.9);
    border-radius: 8px;
    padding: 11px;
}

.page-metrics {
    margin-bottom: 0;
}

.premium-form-card,
.premium-table-card {
    min-width: 0;
    max-width: 100%;
}

.table-toolbar {
    align-items: end;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.table-toolbar label {
    min-width: 200px;
}

.action-row {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.empty-state {
    background: rgba(13, 17, 23, 0.66);
    border: 1px solid rgba(48, 54, 61, 0.88);
    border-radius: 8px;
    display: grid;
    gap: 4px;
    padding: 12px;
}

.empty-state strong {
    display: block;
    font-size: 14px;
}

.empty-state span {
    color: var(--muted);
    font-size: 13px;
}

.audit-event-badge {
    align-items: center;
    border-radius: 999px;
    display: inline-flex;
    font-size: 11px;
    font-weight: 800;
    gap: 6px;
    line-height: 1.15;
    padding: 4px 8px;
    white-space: nowrap;
}

.audit-danger {
    background: rgba(248, 81, 73, 0.16);
    color: var(--danger);
}

.audit-warning {
    background: rgba(210, 153, 34, 0.18);
    color: var(--warn);
}

.audit-info {
    background: rgba(57, 197, 207, 0.14);
    color: var(--info);
}

.audit-muted {
    background: rgba(139, 148, 158, 0.18);
    color: var(--muted);
}

.audit-event-badge .status-dot {
    flex: 0 0 8px;
    height: 8px;
    width: 8px;
}

.audit-danger .status-dot {
    background: var(--danger);
    box-shadow: 0 0 0 4px rgba(248, 81, 73, 0.10);
}

.audit-warning .status-dot {
    background: var(--warn);
    box-shadow: 0 0 0 4px rgba(210, 153, 34, 0.10);
}

.audit-info .status-dot {
    background: var(--info);
    box-shadow: 0 0 0 4px rgba(57, 197, 207, 0.10);
}

.audit-muted .status-dot {
    background: var(--muted);
    box-shadow: 0 0 0 4px rgba(139, 148, 158, 0.10);
}

.page-grid {
    align-items: start;
    display: grid;
    gap: 12px;
    min-width: 0;
    max-width: 100%;
}

.page-grid > .full-span {
    grid-column: 1 / -1;
    min-width: 0;
    width: 100%;
}

.catalog-grid {
    align-items: start;
    grid-template-columns: minmax(340px, 0.92fr) minmax(0, 1.08fr);
}

.catalog-grid > .panel {
    padding: 12px;
}

.catalog-grid .section-title {
    margin-bottom: 6px;
}

.catalog-grid .table-toolbar {
    margin-bottom: 6px;
}

.catalog-grid .table-scroll {
    overflow-x: hidden;
}

.catalog-grid .responsive-table table {
    min-width: 0;
    table-layout: auto;
}

.catalog-grid .responsive-table th,
.catalog-grid .responsive-table td {
    padding: 7px 8px;
    white-space: normal;
}

.catalog-grid .responsive-table th {
    font-size: 11px;
    overflow-wrap: normal;
    white-space: nowrap;
    word-break: normal;
}

.catalog-grid .responsive-table td {
    font-size: 12px;
    overflow-wrap: break-word;
}

.catalog-grid .responsive-table td[data-label="Nome"],
.catalog-grid .responsive-table td[data-label="Empresa"] {
    white-space: normal;
    overflow-wrap: break-word;
}

.catalog-grid .responsive-table td[data-label="Documento"],
.catalog-grid .responsive-table td[data-label="Email"],
.catalog-grid .responsive-table td[data-label="Início"],
.catalog-grid .responsive-table td[data-label="Expira em"] {
    overflow-wrap: break-word;
}

.catalog-grid .responsive-table .button,
.catalog-grid .responsive-table button {
    padding: 5px 8px;
    font-size: 12px;
}

.catalog-grid .responsive-table .icon-button {
    align-items: center;
    display: inline-flex;
    justify-content: center;
    min-height: 30px;
    min-width: 30px;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.catalog-grid .responsive-table .icon-button .action-icon {
    height: 14px;
    width: 14px;
    fill: currentColor;
    stroke: none;
}

.catalog-grid .responsive-table .edit-button {
    color: var(--accent-2);
}

.catalog-grid .responsive-table .edit-button:hover {
    color: #ffd38f;
}

.catalog-grid .responsive-table button.danger .action-icon {
    color: var(--muted);
}

.catalog-grid .responsive-table .button.secondary,
.catalog-grid .responsive-table button.danger {
    min-width: 0;
}

.catalog-grid .responsive-table td[data-label="Ações"] {
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    overflow: visible;
    flex-wrap: nowrap;
    width: 1%;
    border-bottom: 0;
}

.catalog-grid .responsive-table td[data-label="Ações"] > * {
    flex: 0 0 auto;
}

.company-actions,
.license-actions,
.blocklist-actions {
    flex-wrap: nowrap;
}

.lists-grid {
    grid-template-columns: minmax(300px, 0.55fr) minmax(0, 1.45fr);
}

.lists-grid > .premium-form-card {
    align-self: start;
}

.lists-grid > .premium-table-card {
    min-width: 0;
    width: 100%;
}

.lists-grid .table-scroll {
    overflow-x: hidden;
}

.lists-grid .responsive-table table {
    table-layout: fixed;
    width: 100%;
}

.lists-grid .responsive-table th:nth-child(1) {
    width: 28%;
}

.lists-grid .responsive-table th:nth-child(2) {
    width: 15%;
}

.lists-grid .responsive-table th:nth-child(5) {
    width: 10%;
}

.lists-grid .responsive-table th:nth-child(6) {
    width: 16%;
}

.lists-grid .responsive-table th:nth-child(7) {
    width: 15%;
}

.lists-grid .responsive-table td[data-label="Ações"] {
    width: auto;
    flex-wrap: wrap;
}

.blocklist-detail {
    display: grid;
    gap: 14px;
    min-width: 0;
    padding: 14px;
}

.blocklist-forms {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.blocklist-forms form {
    background: rgba(13, 17, 23, 0.54);
    border: 1px solid rgba(48, 54, 61, 0.86);
    border-radius: 8px;
    padding: 12px;
}

.blocklist-form-title {
    border-bottom: 1px solid rgba(48, 54, 61, 0.86);
    margin-bottom: 2px;
    padding-bottom: 8px;
}

.blocklist-form-title h3 {
    align-items: center;
    display: flex;
    font-size: 14px;
    gap: 8px;
    margin: 0 0 3px;
}

.import-summary {
    background: rgba(13, 17, 23, 0.62);
    border: 1px solid rgba(48, 54, 61, 0.86);
    border-radius: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px;
}

.external-source-card {
    background: rgba(13, 17, 23, 0.54);
    border: 1px solid rgba(48, 54, 61, 0.86);
    border-radius: 8px;
    display: grid;
    gap: 12px;
    padding: 12px;
}

.external-source-card .section-title {
    margin-bottom: 0;
}

.external-source-card h3 {
    align-items: center;
    display: flex;
    font-size: 15px;
    gap: 8px;
    margin: 0 0 3px;
}

.external-source-card form {
    margin: 0;
}

.source-url {
    overflow-wrap: break-word;
}

.import-result {
    align-items: center;
}

.invalid-lines {
    color: var(--muted);
    display: grid;
    flex: 1 1 100%;
    font-size: 12px;
    gap: 4px;
    line-height: 1.35;
    min-width: 0;
}

.blocklist-name-cell,
.domain-name-cell {
    overflow-wrap: break-word;
    word-break: normal;
}

.blocklist-name-cell strong,
.domain-name-cell strong {
    line-height: 1.25;
}

.blocklist-name-cell .table-subtext {
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blocklist-action-button {
    align-items: center;
    display: inline-flex;
    gap: 6px;
    justify-content: center;
    line-height: 1.1;
    min-height: 32px;
    padding: 6px 9px;
    white-space: nowrap;
}

.blocklist-action-button .action-icon {
    flex: 0 0 auto;
    height: 14px;
    width: 14px;
}

.blocklist-detail-placeholder {
    padding: 14px;
}

.domain-table td[data-label="Origem/comentário"] {
    overflow-wrap: break-word;
}

.linked-lists-card {
    display: grid;
    gap: 14px;
}

.blocklist-link-form {
    align-items: end;
}

.linked-lists-table td[data-label="Lista"],
.linked-lists-table td[data-label="Ações"] {
    word-break: normal;
}

.linked-lists-table .blocklist-actions {
    flex-wrap: wrap;
}

.server-create-compact {
    padding: 0;
}

.server-create-details {
    display: grid;
}

.server-create-details summary {
    align-items: center;
    cursor: pointer;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    list-style: none;
    padding: 14px;
}

.server-create-details summary::-webkit-details-marker {
    display: none;
}

.server-create-details summary span {
    align-items: center;
    display: inline-flex;
    font-size: 16px;
    font-weight: 800;
    gap: 8px;
}

.server-create-details summary small {
    color: var(--muted);
    font-size: 12px;
    text-align: right;
}

.server-create-details summary::after {
    color: var(--accent-2);
    content: "+";
    flex: 0 0 auto;
    font-size: 20px;
    font-weight: 800;
    line-height: 1;
}

.server-create-details[open] summary {
    border-bottom: 1px solid rgba(48, 54, 61, 0.86);
}

.server-create-details[open] summary::after {
    content: "-";
}

.server-create-details > form,
.server-create-details > .muted {
    margin: 0;
    padding: 14px;
}

.server-empty-detail {
    display: grid;
    gap: 12px;
}

.linked-list-summary {
    background: rgba(13, 17, 23, 0.54);
    border: 1px solid rgba(48, 54, 61, 0.86);
    border-radius: 8px;
    display: grid;
    gap: 10px;
    padding: 12px;
}

.linked-list-summary > strong {
    font-size: 14px;
}

.blocklist-link-grid {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.blocklist-link-card {
    background: rgba(10, 15, 22, 0.72);
    border: 1px solid rgba(48, 54, 61, 0.86);
    border-radius: 8px;
    display: grid;
    gap: 5px;
    min-width: 0;
    padding: 10px;
}

.blocklist-link-card span:first-child {
    font-weight: 800;
    overflow-wrap: break-word;
}

.blocklist-link-card small {
    color: var(--muted);
    overflow-wrap: break-word;
}

.policy-preview-details {
    display: grid;
    gap: 10px;
}

.policy-preview-details summary {
    cursor: pointer;
    color: var(--accent-2);
    font-weight: 700;
}

.policy-preview-details[open] summary {
    margin-bottom: 10px;
}

.app-topbar {
    align-items: center;
    background: var(--topbar-bg);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(14px);
    display: flex;
    gap: 16px;
    justify-content: space-between;
    min-height: 64px;
    padding: 12px 22px;
    position: sticky;
    top: 0;
    z-index: 20;
}

.app-topbar > div:first-child {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.app-topbar strong {
    display: block;
    font-size: 15px;
    line-height: 1.2;
    overflow-wrap: break-word;
}

.topbar-kicker {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.theme-switcher {
    align-items: center;
    background: var(--subtle-bg);
    border: 1px solid var(--subtle-border);
    border-radius: 999px;
    display: inline-flex;
    flex: 0 0 auto;
    gap: 3px;
    padding: 3px;
}

.theme-switcher button {
    align-items: center;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 999px;
    color: var(--muted);
    display: inline-flex;
    gap: 6px;
    min-height: 32px;
    padding: 6px 10px;
}

.theme-switcher button:hover,
.theme-switcher button:focus-visible {
    background: var(--control-bg-hover);
    color: var(--text);
}

.theme-switcher button.is-active {
    background: var(--elevated);
    border-color: var(--line);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.10);
    color: var(--accent-2);
}

.theme-icon {
    height: 15px;
    width: 15px;
}

:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--accent) 74%, transparent);
    outline-offset: 2px;
}

.pending-agent-card,
.agent-toast,
.mini-metric,
.dashboard-row,
.security-list div,
.status-summary-grid div,
.alert-item,
.hero-tool,
.panel,
.metric,
.stat-card,
.metric-card,
.server-card,
.server-list-item,
.server-summary-card,
.server-summary-item,
.server-details,
.server-empty-compact,
.status-pair,
.server-detail-stack > .section-title,
.operational-table-card,
.operations-table-card,
.operation-type-card,
.operation-confirmation,
.rpz-config-path,
.rpz-preview-panel,
.rpz-file-preview,
.risk-note,
.empty-state,
.blocklist-forms form,
.import-summary,
.external-source-card,
.linked-list-summary,
.blocklist-link-card,
.installer-panel,
.policy-field,
.onboarding-card,
.onboarding-code-card,
.checklist-item,
.report-card,
.report-metrics div,
.report-footer div,
.audit-cta,
.server-actions-menu__panel {
    background: var(--subtle-bg);
    border-color: var(--subtle-border);
}

.panel,
.section-card,
.auth-card,
.table-card,
.premium-form-card,
.premium-table-card {
    background: var(--card-bg);
    border-color: var(--line);
}

.page-hero,
.premium-hero,
.hero,
.server-hero {
    background: var(--hero-bg);
    border-color: color-mix(in srgb, var(--accent) 34%, var(--line));
}

.metric-card,
.stat-card,
.mini-metric {
    background: var(--metric-bg);
}

tbody tr:hover {
    background: color-mix(in srgb, var(--accent) 7%, transparent);
}

th,
td {
    border-bottom-color: var(--line);
}

input:focus,
select:focus,
textarea:focus {
    border-color: color-mix(in srgb, var(--accent) 56%, var(--line));
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
    outline: none;
}

button,
.button {
    box-shadow: 0 8px 18px rgba(249, 115, 22, 0.14);
}

button.secondary,
.button.secondary,
.icon-button,
.server-tab,
.server-list-action,
.listener-chip,
.login-config-button {
    background: var(--control-bg);
    border-color: var(--line);
    color: var(--text);
    box-shadow: none;
}

button.secondary:hover,
.button.secondary:hover,
.icon-button:hover {
    background: var(--control-bg-hover);
    border-color: color-mix(in srgb, var(--accent) 30%, var(--line));
}

.credentials code,
.policy-preview-content,
.code-preview,
.operation-pre,
.rpz-preview-content,
pre,
code {
    background: var(--code-bg);
    border-color: var(--line);
    color: var(--text);
}

.operation-dialog {
    background: var(--panel);
    border-color: color-mix(in srgb, var(--accent) 34%, var(--line));
}

.operation-dialog::backdrop {
    background: rgba(2, 6, 12, 0.62);
}

html[data-theme="light"] .sidebar-link:hover,
html[data-theme="light"] .sidebar-link.is-active {
    background: color-mix(in srgb, var(--accent) 12%, #ffffff);
}

html[data-theme="light"] .nav-icon,
html[data-theme="light"] .brand-icon,
html[data-theme="light"] .metric-icon,
html[data-theme="light"] .hero-icon,
html[data-theme="light"] .card-icon,
html[data-theme="light"] .section-icon {
    background: color-mix(in srgb, var(--accent) 10%, #ffffff);
    border-color: color-mix(in srgb, var(--accent) 24%, var(--line));
}

html[data-theme="light"] .root-metric-grid .card-icon {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75), 0 10px 24px rgba(15, 23, 42, 0.08);
}

html[data-theme="light"] .flash {
    box-shadow: 0 16px 40px rgba(31, 41, 55, 0.10);
}

html[data-theme="light"] .responsive-table tr {
    background: rgba(255, 255, 255, 0.72);
}

html[data-theme="dark"] .theme-switcher button.is-active {
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
}

html[data-theme="dark"] .sidebar-link:hover {
    background: rgba(148, 163, 184, 0.08);
}

html[data-theme="dark"] .sidebar-link.is-active {
    background: linear-gradient(90deg, rgba(249, 115, 22, 0.18), rgba(249, 115, 22, 0.06));
}

@media (max-width: 980px) {
    .dashboard-grid,
    .dashboard-main-grid,
    .dashboard-primary-grid,
    .dashboard-secondary-grid,
    .metric-grid,
    .root-metric-grid,
    .page-metrics,
    .page-grid,
    .server-layout,
    .server-health-grid,
    .server-summary-grid,
    .operational-card-grid,
    .operational-split-grid,
    .split-grid,
    .operations-summary-grid,
    .operation-type-grid,
    .operation-detail-grid,
    .checklist-grid {
        grid-template-columns: 1fr;
    }

    .operation-type-card-head {
        flex-direction: column;
    }
}

@media (max-width: 1100px) {
    .server-layout {
        grid-template-columns: 1fr;
    }

    .servers-workspace {
        grid-template-columns: 1fr;
    }

    .server-list-panel {
        max-height: none;
        overflow: visible;
        position: static;
    }

    .server-list {
        max-height: 42vh;
        overflow-y: auto;
        padding-right: 2px;
    }
}

@media (max-width: 720px) {
    .server-search {
        grid-template-columns: 1fr;
    }

    .server-actions-menu__panel {
        min-width: 0;
        position: static;
        width: 100%;
    }

    .server-tabs {
        gap: 5px;
    }

    .server-tab {
        min-height: 36px;
        padding: 7px 10px;
    }

    .server-primary-actions,
    .server-header-badges {
        justify-content: flex-start;
    }

    .status-pair-grid,
    .server-health-grid,
    .server-card-grid,
    .operational-card-grid,
    .operations-summary-grid,
    .report-grid,
    .onboarding-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .page-grid {
        justify-items: center;
    }

    .page-grid > .panel {
        max-width: 760px;
        width: min(100%, 760px);
    }

    .catalog-grid {
        grid-template-columns: 1fr;
    }

    .catalog-grid > .panel {
        padding: 12px;
    }

    .blocklist-forms {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .app-shell {
        display: block;
    }

    .server-title-row,
    .server-header-badges,
    .server-primary-actions {
        align-items: flex-start;
    }

    .server-title-row {
        flex-direction: column;
    }

    .server-actions-menu__panel {
        min-width: 0;
        position: static;
        width: 100%;
    }

    .section-actions,
    .operations-section-actions,
    .dialog-actions {
        justify-content: flex-start;
    }

    .operation-dialog {
        max-width: calc(100vw - 16px);
    }

    .operation-dialog-form {
        padding: 12px;
    }

    .sidebar {
        min-height: auto;
        position: static;
        width: auto;
    }

    .content-inner {
        padding: 20px 16px 28px;
    }

    .content-wrap {
        margin-left: 0;
    }

    .topbar,
    .app-topbar,
    .page-head,
    nav {
        align-items: flex-start;
        flex-direction: column;
    }

    .app-topbar {
        gap: 10px;
        padding: 12px 16px;
        position: static;
    }

    .theme-switcher {
        flex-wrap: wrap;
        width: 100%;
    }

    .theme-switcher button {
        flex: 1 1 auto;
        justify-content: center;
    }

    .topbar {
        gap: 12px;
        padding: 16px;
    }

    table {
        display: block;
        overflow-x: auto;
    }

    .policy-actions,
    .section-title,
    .hero,
    .server-hero,
    .premium-hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .hero h1,
    .server-hero h2,
    .premium-hero h1 {
        font-size: 28px;
    }

    .server-hero-badges,
    .hero-actions {
        justify-content: flex-start;
    }

    .meta-list div,
    .server-card-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .meta-list dd {
        text-align: left;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .report-card-head,
    .report-footer,
    .dashboard-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .server-search {
        grid-template-columns: 1fr;
    }

    .server-title-row {
        flex-direction: column;
    }

    .server-header-badges,
    .server-primary-actions {
        justify-content: flex-start;
    }

    .server-actions-menu__panel {
        min-width: 0;
        position: static;
        width: 100%;
    }

    .table-toolbar,
    .action-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .table-toolbar label {
        min-width: 0;
        width: 100%;
    }

    .alert-item {
        grid-template-columns: 1fr;
    }

    .dashboard-row-badges {
        justify-content: flex-start;
    }

    .premium-hero,
    .metric-card {
        padding: 16px;
    }

    .server-list-item-meta {
        gap: 6px;
    }

    .page-hero,
    .premium-hero {
        padding: 16px;
    }

    .page-hero h1 {
        font-size: 28px;
    }

    .api-security-card .section-title h2,
    .premium-table-card .section-title h2 {
        white-space: normal;
    }

    .chart-placeholder {
        height: 130px;
    }
}

@media (max-width: 900px) {
    .responsive-table table,
    .responsive-table thead,
    .responsive-table tbody,
    .responsive-table th,
    .responsive-table td,
    .responsive-table tr {
        display: block;
    }

    .responsive-table thead {
        display: none;
    }

    .responsive-table tr {
        background: rgba(255, 255, 255, 0.02);
        border: 1px solid var(--line);
        border-radius: 14px;
        box-sizing: border-box;
        margin-bottom: 12px;
        margin-inline: auto;
        max-width: 760px;
        width: min(100%, 760px);
        padding: 12px;
    }

    .responsive-table td {
        align-items: start;
        border: 0;
        display: grid;
        gap: 10px;
        grid-template-columns: 1fr;
        padding: 7px 0;
        white-space: normal;
        word-break: normal;
        overflow-wrap: break-word;
    }

    .responsive-table td::before {
        color: var(--muted);
        content: attr(data-label);
        font-size: 12px;
        font-weight: 700;
        line-height: 1.35;
        margin-bottom: -2px;
    }

    .responsive-table td[data-label="Ações"] {
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 8px;
        justify-content: flex-start;
    }

    .responsive-table td[data-label="Ações"]::before {
        margin-bottom: 0;
    }

    .responsive-table td[data-label="Ações"] > * {
        display: inline-flex;
    }

    .responsive-table .status-badge {
        max-width: 100%;
    }

    .root-table-wrap.responsive-table table,
    .root-table-wrap.responsive-table thead,
    .root-table-wrap.responsive-table tbody,
    .root-table-wrap.responsive-table th,
    .root-table-wrap.responsive-table td,
    .root-table-wrap.responsive-table tr {
        display: revert;
    }

    .root-table-wrap.responsive-table thead {
        display: table-header-group;
    }

    .root-table-wrap.responsive-table tbody {
        display: table-row-group;
    }

    .root-table-wrap.responsive-table tr {
        display: table-row;
        margin: 0;
        padding: 0;
        width: auto;
    }

    .root-table-wrap.responsive-table th,
    .root-table-wrap.responsive-table td {
        display: table-cell;
        padding: 7px 9px;
    }

    .root-table-wrap.responsive-table td::before {
        content: none;
    }

    .root-col-hostname,
    .root-col-ipv4,
    .root-col-ipv6,
    .root-col-latency,
    .root-col-loss,
    .root-col-dns,
    .root-col-status {
        white-space: nowrap;
    }
}

@media (max-height: 920px) {
    .content-inner {
        padding: 14px 20px 22px;
    }

    .dashboard-grid,
    .dashboard-main-grid,
    .dashboard-primary-grid,
    .dashboard-secondary-grid,
    .dashboard-shell,
    .page-shell,
    .page-grid,
    .server-layout,
    .servers-workspace,
    .report-grid,
    .metric-grid {
        gap: 10px;
    }

    .dashboard-shell > section,
    .page-shell > section,
    .server-layout > section,
    .servers-workspace > section {
        margin-bottom: 0;
    }

    .page-head,
    .section-title,
    .server-detail-toolbar {
        margin-bottom: 10px;
    }

    .page-hero,
    .premium-hero,
    .server-hero {
        min-height: 100px;
        padding: 14px 16px;
    }

    .page-hero h1,
    .premium-hero h1,
    .server-hero h2 {
        font-size: 28px;
        line-height: 1.06;
    }

    .page-hero p,
    .premium-hero p,
    .server-hero p {
        font-size: 13px;
    }

    .metric-card,
    .dashboard-row,
    .mini-metric,
    .report-card,
    .external-source-card,
    .linked-list-summary,
    .server-list-item,
    .server-detail-panel,
    .page-card,
    .card {
        padding-top: 10px;
        padding-bottom: 10px;
    }

    .metric-grid {
        gap: 8px;
    }

    .metric-card {
        gap: 9px;
    }

    .server-list-panel {
        max-height: none;
        overflow: visible;
        position: static;
    }

    .server-list {
        max-height: 38vh;
        overflow-y: auto;
        padding-right: 2px;
    }

    .server-search {
        margin-bottom: 10px;
    }

    .login-shell {
        min-height: auto;
    }

    .login-card {
        max-width: 420px;
    }

    .login-panel-wrap {
        gap: 24px;
    }

    .login-diagram {
        height: 300px;
        min-height: 300px;
    }

    .login-footer {
        gap: 12px;
    }

    .dashboard-panel-wide,
    .dashboard-panel {
        gap: 8px;
    }

    .table-scroll,
    .responsive-table,
    .table-card {
        max-height: none;
    }

    .server-detail-panel,
    .table-card,
    .report-card,
    .external-source-card {
        overflow: visible;
    }

    .dashboard-grid,
    .dashboard-main-grid,
    .dashboard-secondary-grid {
        margin-bottom: 10px;
    }
}
