:root {
    color-scheme: light;
}

body.monitor-public {
    background: #f4f7fb;
    color: #172033;
}

body.monitor-public::before,
body.monitor-public::after {
    display: none;
}

body.monitor-public .shell {
    max-width: 1280px;
    padding: 24px;
}

body.monitor-public .hero,
body.monitor-public .dashboard {
    gap: 16px;
}

body.monitor-public .hero-main,
body.monitor-public .radar,
body.monitor-public .stat,
body.monitor-public .panel {
    background: #ffffff;
    border: 1px solid #d9e2ee;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(21, 32, 54, .06);
}

body.monitor-public .hero-main {
    min-height: 152px;
    padding: 26px 28px;
}

body.monitor-public .hero-main::before,
body.monitor-public .hero-main::after,
body.monitor-public .radar::before {
    display: none;
}

body.monitor-public .eyebrow,
body.monitor-public .radar-title,
body.monitor-public .panel-meta,
body.monitor-public .stat-label,
body.monitor-public .subtle {
    color: #667085;
}

body.monitor-public h1,
body.monitor-public .panel-title,
body.monitor-public .interface-name,
body.monitor-public .stat-value,
body.monitor-public .health {
    color: #172033;
}

body.monitor-public h1 {
    font-size: clamp(38px, 3.9vw, 54px);
    letter-spacing: 0;
}

body.monitor-public .eyebrow {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 12px;
    border: 1px solid #d9e2ee;
    background: #f8fafc;
    color: #536274;
}

body.monitor-public .last-refresh {
    display: inline-flex;
    align-items: center;
    justify-self: start;
    width: fit-content;
    max-width: 100%;
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid #d9e2ee;
    border-radius: 8px;
    background: #f8fafc;
    color: #536274;
}

body.monitor-public .pulse {
    background: #0f8a5f;
    box-shadow: 0 0 0 4px rgba(15, 138, 95, .12);
}

body.monitor-public .radar {
    min-height: 168px;
    align-items: center;
}

body.monitor-public .ring,
body.monitor-public .ring::before,
body.monitor-public .ring::after {
    background: #f7fafc;
    border-color: #d9e2ee;
    box-shadow: none;
}

body.monitor-public .radar-core,
body.monitor-public .radar-node {
    background: #1769e0;
    box-shadow: 0 0 0 4px rgba(23, 105, 224, .12);
}

body.monitor-public .radar-code {
    color: #1769e0;
}

body.monitor-public .radar-bars span {
    background: #d9e2ee;
}

body.monitor-public .radar-bars span.active {
    background: #0f8a5f;
}

body.monitor-public .stats {
    gap: 12px;
}

body.monitor-public .stat {
    border-left: 4px solid #d9e2ee;
    min-height: 104px;
    padding: 18px 18px 16px;
}

body.monitor-public .stat::before,
body.monitor-public .stat::after {
    display: none;
}

body.monitor-public .stat:has(.stat-value.online) {
    border-left-color: #0f8a5f;
}

body.monitor-public .stat:has(.stat-value.offline) {
    border-left-color: #c7384a;
    background: #fffafb;
}

body.monitor-public .stat:has(.stat-value.disabled),
body.monitor-public .stat:has(.stat-value.unknown) {
    border-left-color: #7a8494;
}

body.monitor-public .stat-value.online,
body.monitor-public .status-text.online {
    color: #0f8a5f;
}

body.monitor-public .stat-value.offline,
body.monitor-public .status-text.offline {
    color: #c7384a;
}

body.monitor-public .stat-value.unknown,
body.monitor-public .stat-value.disabled,
body.monitor-public .status-text.unknown,
body.monitor-public .status-text.disabled {
    color: #7a8494;
}

body.monitor-public .panel-head,
body.monitor-public th,
body.monitor-public td,
body.monitor-public .incident-row {
    border-color: #e5ebf3;
}

body.monitor-public th {
    background: #f8fafc;
    color: #667085;
}

body.monitor-public td {
    background: #fff;
}

body.monitor-public tbody tr:hover {
    background: #f8fbff;
}

body.monitor-public .status-row td {
    background: #fff;
    box-shadow: none !important;
    font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", Arial, sans-serif;
}

body.monitor-public .status-cell {
    min-width: 0;
    gap: 9px;
}

body.monitor-public .status-text {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 9px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
}

body.monitor-public .status-text.online {
    background: #eefaf5;
}

body.monitor-public .status-text.offline {
    background: #fff2f4;
}

body.monitor-public .status-text.unknown,
body.monitor-public .status-text.disabled {
    background: #f1f4f8;
}

body.monitor-public .status-row.offline td {
    background: #fffafb;
}

body.monitor-public .status-row.online td {
    background: #fbfffd;
}

body.monitor-public .status-row.disabled td,
body.monitor-public .status-row.unknown td {
    background: #fcfdff;
}

body.monitor-public .status-row.offline td:first-child {
    box-shadow: inset 4px 0 0 #c7384a !important;
}

body.monitor-public .status-row.online td:first-child {
    box-shadow: inset 4px 0 0 #0f8a5f !important;
}

body.monitor-public .status-row.disabled td:first-child,
body.monitor-public .status-row.unknown td:first-child {
    box-shadow: inset 4px 0 0 #7a8494 !important;
}

body.monitor-public .status-row:hover td {
    background: #f8fbff;
}

body.monitor-public .table-scroll {
    border-radius: 0 0 8px 8px;
}

body.monitor-public .interface-name {
    letter-spacing: 0;
}

body.monitor-public td:nth-child(3),
body.monitor-public td:nth-child(4),
body.monitor-public .stat-value {
    font-family: Consolas, "SFMono-Regular", "Courier New", monospace;
}

body.monitor-public .dot.online {
    background: #0f8a5f;
    box-shadow: 0 0 0 4px rgba(15, 138, 95, .12);
}

body.monitor-public .dot.offline {
    background: #c7384a;
    box-shadow: 0 0 0 4px rgba(199, 56, 74, .12);
}

body.monitor-public .dot.unknown,
body.monitor-public .dot.disabled {
    background: #7a8494;
    box-shadow: 0 0 0 4px rgba(122, 132, 148, .12);
}

body.monitor-public .stat-value.offline {
    background: transparent;
}

body.monitor-public .incident-row > .offline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    background: #fff2f4;
    color: #c7384a;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

body.monitor-public .message {
    color: #667085;
}

body.monitor-public .incident-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    background: #fff;
    padding: 16px 18px;
}

body.monitor-public .incident-row:hover {
    background: #fffafb;
}

body.monitor-public .incident-copy {
    min-width: 0;
}

body.monitor-public .incident-copy .interface-name {
    margin-bottom: 6px;
}

body.monitor-public .incident-copy .subtle {
    margin-top: 0;
    white-space: nowrap;
}

body.monitor-public.has-alert .hero-main,
body.monitor-public.has-alert .panel {
    border-color: #d9e2ee;
}

body.admin-console {
    background: #f4f7fb;
}

body.admin-console .sidebar {
    background: #102a4c;
}

body.admin-console .topbar,
body.admin-console .panel,
body.admin-console .stat-card,
body.admin-console .modal {
    border-radius: 8px;
}

@media (max-width: 680px) {
    body.monitor-public .shell {
        padding: 14px;
    }

    body.monitor-public .hero-main {
        min-height: auto;
        padding: 22px;
    }

    body.monitor-public .radar {
        display: none;
    }

    body.monitor-public .stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.monitor-public .dashboard {
        grid-template-columns: 1fr;
    }

    body.monitor-public .table-scroll {
        overflow-x: auto;
    }

    body.monitor-public .incident-row {
        align-items: flex-start;
    }

    body.monitor-public .incident-copy .subtle {
        white-space: normal;
    }
}
