.status-shell {
    min-height: calc(100vh - 2.2rem);
    padding: 1.25rem;
    background: #eef4f8;
    color: #172033;
}

.status-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin: 0 auto 1rem;
    max-width: 1180px;
}

.status-kicker {
    margin-bottom: 0.15rem;
    color: #496178;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.status-header h2 {
    margin: 0;
    color: #13243a;
    font-size: 1.75rem;
    font-weight: 800;
}

.status-subtitle {
    margin-top: 0.25rem;
    color: #5b6d7e;
    font-size: 0.9rem;
}

.status-refresh {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-height: 2.25rem;
    padding: 0.45rem 0.85rem;
    border: 1px solid #8fb5d0;
    border-radius: 6px;
    background: #ffffff;
    color: #075d93;
    font-size: 0.88rem;
    font-weight: 700;
}

.status-refresh:hover:not(:disabled) {
    background: #e3f1fa;
}

.status-refresh:disabled {
    cursor: wait;
    opacity: 0.68;
}

.status-summary-grid,
.service-grid {
    display: grid;
    gap: 0.9rem;
    max-width: 1180px;
    margin: 0 auto;
}

.status-summary-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 1rem;
}

.status-summary-card,
.service-panel,
.metric-card {
    background: #ffffff;
    border: 1px solid #c8dae7;
    border-radius: 8px;
    box-shadow: 0 12px 32px rgba(36, 64, 89, 0.08);
}

.status-summary-card {
    padding: 0.85rem 1rem;
}

.status-summary-label,
.metric-label {
    color: #637587;
    font-size: 0.73rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.status-summary-value {
    margin-top: 0.25rem;
    color: #15263b;
    font-size: 1.35rem;
    font-weight: 800;
}

.status-loading {
    display: flex;
    justify-content: center;
    max-width: 1180px;
    margin: 1.5rem auto;
}

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

.service-panel {
    overflow: hidden;
}

.service-panel.service-healthy {
    border-top: 4px solid #248053;
}

.service-panel.service-attention {
    border-top: 4px solid #b02a37;
}

.service-panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1rem;
    border-bottom: 1px solid #d7e4ed;
    background: #f8fbfd;
}

.service-title-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.service-panel h3 {
    margin: 0;
    color: #142840;
    font-size: 1.1rem;
    font-weight: 800;
}

.service-panel a,
.endpoint-main a {
    color: #096da7;
    overflow-wrap: anywhere;
    text-decoration: none;
}

.service-panel a:hover,
.endpoint-main a:hover {
    text-decoration: underline;
}

.status-dot {
    width: 0.7rem;
    height: 0.7rem;
    border-radius: 50%;
    flex: 0 0 auto;
}

.health-pill,
.endpoint-code,
.component-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 1.45rem;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}

.state-healthy {
    background: #dff3e8;
    color: #17633d;
}

.status-dot.state-healthy {
    background: #248053;
}

.state-degraded {
    background: #fff2cc;
    color: #806000;
}

.status-dot.state-degraded {
    background: #d99a00;
}

.state-unhealthy {
    background: #f8d7da;
    color: #9a1c29;
}

.status-dot.state-unhealthy {
    background: #b02a37;
}

.state-unknown {
    background: #e8edf2;
    color: #546374;
}

.status-dot.state-unknown {
    background: #7b8794;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    padding: 1rem;
}

.metric-card {
    min-height: 6.1rem;
    padding: 0.85rem;
    box-shadow: none;
}

.metric-value {
    margin-top: 0.4rem;
    color: #142840;
    font-size: 1.08rem;
    font-weight: 800;
    line-height: 1.2;
    overflow-wrap: normal;
}

.metric-sub {
    margin-top: 0.25rem;
    color: #5d6f80;
    font-size: 0.82rem;
}

.endpoint-list {
    padding: 0 1rem 1rem;
}

.endpoint-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.75rem;
    align-items: center;
    padding: 0.75rem 0;
    border-top: 1px solid #d7e4ed;
}

.endpoint-name {
    color: #1e2f46;
    font-weight: 800;
}

.endpoint-meta {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
}

.endpoint-latency {
    min-width: 4.4rem;
    color: #526679;
    font-variant-numeric: tabular-nums;
    text-align: right;
}

.component-table-wrap {
    margin: 0 1rem 1rem;
    overflow-x: auto;
    border: 1px solid #d7e4ed;
    border-radius: 8px;
}

.component-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.86rem;
}

.component-table th,
.component-table td {
    padding: 0.65rem 0.75rem;
    border-bottom: 1px solid #d7e4ed;
    text-align: left;
    vertical-align: middle;
}

.component-table th {
    background: #f1f6fa;
    color: #526679;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.component-table tr:last-child td {
    border-bottom: 0;
}

.error-list {
    margin: 0 1rem 1rem;
    padding: 0.75rem 0.85rem;
    border: 1px solid #efb7bf;
    border-radius: 8px;
    background: #fff1f2;
    color: #8d1c28;
    font-size: 0.86rem;
}

@media (max-width: 920px) {
    .status-summary-grid,
    .service-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .status-shell {
        padding: 0.8rem;
    }

    .status-header,
    .service-panel-header,
    .endpoint-row {
        grid-template-columns: 1fr;
        flex-direction: column;
    }

    .status-refresh {
        width: 100%;
        justify-content: center;
    }

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

    .endpoint-meta {
        justify-content: flex-start;
    }

    .endpoint-latency {
        text-align: left;
    }
}
