:root {
    --bg: #f3f6f8;
    --surface: #fff;
    --ink: #203544;
    --muted: #5d6f7c;
    --line: #dce5eb;
    --blue: #076fa9;
    --blue-soft: #edf6fc;
    --green: #167348;
    --green-soft: #eaf7ef;
    --red: #ad3845;
    --red-soft: #fdecef;
    --header: #243a4a;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 15px;
    line-height: 1.55;
    color: var(--ink);
    background: var(--bg);
}

a {
    color: var(--blue);
}

.site-header {
    background: var(--header);
    color: #fff;
}

.header-inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 14px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.brand {
    display: flex;
    align-items: center;
    gap: 23px;
    min-width: 0;
}

.brand img {
    width: 166px;
    height: 50px;
    object-fit: contain;
}

.header-label {
    padding-left: 23px;
    border-left: 1px solid #587080;
    color: #d0e0eb;
    font-size: 13px;
}

.last-updated {
    margin: 0;
    color: #d0e0eb;
    font-size: 13px;
}

.page {
    max-width: 1120px;
    margin: 0 auto;
    padding: 32px;
    display: grid;
    gap: 28px;
}

.panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 28px 32px;
    box-shadow: 0 1px 2px rgba(32, 53, 68, 0.04);
}

.panel-head h1 {
    margin: 0 0 6px;
    font-size: 22px;
    font-weight: 650;
    letter-spacing: -0.3px;
}

.panel-head p {
    margin: 0 0 22px;
    color: var(--muted);
    font-size: 14px;
}

.service-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.service-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 18px 20px;
    background: var(--surface);
}

.service-card-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.status-light {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.status-light.is-up {
    background: #2ecc71;
    box-shadow: 0 0 0 4px var(--green-soft);
}

.status-light.is-down {
    background: #e74c3c;
    box-shadow: 0 0 0 4px var(--red-soft);
}

.status-light.is-unknown {
    background: #c9c9c9;
}

.service-card h2 {
    margin: 0;
    font-size: 17px;
    font-weight: 600;
}

.service-status-text {
    margin: 0 0 12px;
    font-size: 14px;
    font-weight: 600;
}

.service-status-text.is-up {
    color: var(--green);
}

.service-status-text.is-down {
    color: var(--red);
}

.check-list {
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 12px;
    color: var(--muted);
}

.check-list li {
    padding: 6px 0;
    border-top: 1px solid var(--line);
    word-break: break-word;
}

.check-list li:first-child {
    border-top: none;
    padding-top: 0;
}

.check-ok {
    color: var(--green);
}

.check-bad {
    color: var(--red);
}

.delivery-chart {
    display: grid;
    gap: 14px;
}

.delivery-row {
    display: grid;
    grid-template-columns: minmax(120px, 180px) 1fr minmax(90px, 120px);
    gap: 14px;
    align-items: center;
}

.delivery-label {
    font-weight: 600;
    font-size: 14px;
}

.delivery-bar-track {
    height: 22px;
    background: var(--blue-soft);
    border-radius: 999px;
    overflow: hidden;
    border: 1px solid var(--line);
}

.delivery-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #076fa9, #0a8fd4);
    border-radius: 999px;
    min-width: 2px;
    transition: width 0.4s ease;
}

.delivery-meta {
    text-align: right;
    font-size: 13px;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

.delivery-meta strong {
    display: block;
    color: var(--ink);
    font-size: 14px;
}

.empty-state {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.site-footer {
    max-width: 1120px;
    margin: 0 auto 40px;
    padding: 0 32px;
    color: var(--muted);
    font-size: 13px;
}

.error-banner {
    margin: 0 32px 0;
    max-width: 1056px;
    margin-left: auto;
    margin-right: auto;
    background: var(--red-soft);
    color: var(--red);
    border: 1px solid #f0b8bf;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 14px;
}

@media (max-width: 720px) {
    .header-inner,
    .page,
    .site-footer {
        padding-left: 20px;
        padding-right: 20px;
    }

    .delivery-row {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .delivery-meta {
        text-align: left;
    }

    .header-label {
        display: none;
    }
}
