* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #eef4fb;
    color: #132238;
}

.page {
    width: min(1200px, 94%);
    margin: 0 auto;
    padding: 22px 0;
}

.topbar {
    background: linear-gradient(135deg, #0d47a1, #00a0df);
    color: white;
    border-radius: 18px;
    padding: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
}

.topbar h1 {
    margin: 0 0 6px;
    font-size: 30px;
}

.topbar p {
    margin: 0;
    opacity: 0.9;
}

.badge {
    padding: 10px 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.35);
    font-weight: bold;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.badge::before {
    content: '';
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: currentColor;
    flex-shrink: 0;
}

.badge.status-ok::before {
    background-color: #2ecc71;
    box-shadow: 0 0 8px #2ecc71;
    animation: badgePulse 2s infinite;
}

.badge.status-error::before {
    background-color: #ff4d4d;
    box-shadow: 0 0 6px #ff4d4d;
}

@keyframes badgePulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.7); }
    70% { transform: scale(1.05); box-shadow: 0 0 0 8px rgba(46, 204, 113, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(46, 204, 113, 0); }
}

.grid {
    display: grid;
    gap: 16px;
    margin-top: 16px;
}

.cards {
    grid-template-columns: repeat(4, 1fr);
}

.two {
    grid-template-columns: 1fr 1.2fr;
}

.card,
.panel {
    background: white;
    border-radius: 18px;
    padding: 20px;
    box-shadow: 0 8px 24px rgba(15, 54, 90, 0.10);
}

.card .label {
    color: #617083;
    font-size: 14px;
    margin-bottom: 10px;
}

.card .value {
    font-size: 38px;
    font-weight: bold;
    margin-bottom: 8px;
    color: #0d47a1;
}

.card .value.small {
    font-size: 25px;
}

.card .sub {
    color: #69788a;
    font-size: 13px;
}

.status-ok {
    color: #16874a !important;
}

.status-bad {
    color: #d35400 !important;
}

.status-error {
    color: #c62828 !important;
}

.panel {
    margin-top: 16px;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: end;
    margin-bottom: 14px;
}

.panel-header h2 {
    margin: 0;
    font-size: 20px;
    color: #153b66;
}

.panel-header p {
    margin: 0;
    color: #6d7a88;
    font-size: 13px;
}

.info-table,
.event-table {
    width: 100%;
    border-collapse: collapse;
}

.info-table th,
.info-table td,
.event-table th,
.event-table td {
    padding: 10px;
    border-bottom: 1px solid #e5edf5;
    text-align: left;
    font-size: 14px;
}

.info-table th {
    width: 42%;
    color: #536579;
}

.event-table th {
    background: #f1f7fd;
    color: #153b66;
}

.table-wrap {
    overflow-x: auto;
}

footer {
    margin: 22px 0 8px;
    text-align: center;
    color: #6d7a88;
    font-size: 13px;
}

@media (max-width: 900px) {

    .cards,
    .two {
        grid-template-columns: 1fr;
    }

    .topbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
}