* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Helvetica,
        Arial,
        sans-serif;
    background: #f5f7fa;
    color: #20252d;
}

header {
    padding: 32px 24px 20px;
    max-width: 1200px;
    margin: auto;
}

header h1 {
    margin: 0 0 8px;
    font-size: 30px;
}

header p {
    margin: 0;
    color: #6b7280;
}

.container {
    max-width: 1200px;
    margin: auto;
    padding: 0 24px 20px;
}

a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;

    transition:
        color 0.15s ease,
        text-decoration-color 0.15s ease;
}

a:hover {
    color: #1d4ed8;
    text-decoration: underline;
    text-underline-offset: 3px;
}

a:visited {
    color: #4f46e5;
}

a:focus-visible {
    outline: 2px solid #93c5fd;
    outline-offset: 3px;
    border-radius: 3px;
}

.status {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 20px 0;
    color: #596273;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #9ca3af;
}

.status-dot.online {
    background: #22a06b;
    box-shadow: 0 0 8px rgba(34, 160, 107, .35);
}

.status-dot.offline {
    background: #dc4c4c;
}

.cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.card {
    background: #ffffff;
    border: 1px solid #e1e5eb;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .03);
}

.card-label {
    color: #6b7280;
    font-size: 14px;
    margin-bottom: 10px;
}

.card-value {
    font-size: 26px;
    font-weight: 600;
    color: #20252d;
}

.card-subtitle {
    color: #8a93a3;
    font-size: 13px;
    margin-top: 6px;
}

.panel {
    background: #ffffff;
    border: 1px solid #e1e5eb;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .03);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.panel-title {
    font-size: 18px;
    font-weight: 600;
    color: #20252d;
}

.range-buttons {
    display: flex;
    gap: 6px;
}

button {
    border: 1px solid #d6dbe3;
    background: #f8f9fb;
    color: #596273;
    padding: 7px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition:
        background 0.15s ease,
        border-color 0.15s ease,
        color 0.15s ease;
}

button:hover {
    background: #eef1f5;
}

button.active {
    background: #e5e9ef;
    color: #20252d;
    border-color: #cbd1da;
}

button:focus-visible {
    outline: 2px solid #93c5fd;
    outline-offset: 2px;
}

canvas {
    width: 100%;
    height: 320px;
}

.two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #edf0f3;
}

.stat-row:last-child {
    border-bottom: 0;
}

.stat-name {
    color: #6b7280;
}

.stat-value {
    font-weight: 500;
    color: #20252d;
}

footer {
    text-align: center;
    color: #8a93a3;
    font-size: 13px;
    padding: 0 0 10px;
}

footer a {
    color: #6b7280;
    font-weight: 500;
}

footer a:hover {
    color: #2563eb;
}


@media (max-width: 900px) {

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

}

@media (max-width: 600px) {

    header {
        padding: 24px 16px 15px;
    }

    .container {
        padding: 0 16px 30px;
    }

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

    .two-column {
        grid-template-columns: 1fr;
    }

    .panel-header {
        align-items: flex-start;
        flex-direction: column;

        gap: 12px;
    }
}
