:root {
    --background: #f8fafc;
    --surface: #ffffff;
    --border: #e5e7eb;

    --text: #111827;
    --muted: #6b7280;

    --green: #16a34a;
    --green-light: #dcfce7;

    --red: #dc2626;
    --red-light: #fee2e2;

    --yellow: #ca8a04;
    --yellow-light: #fef9c3;

    --blue: #2563eb;
    --blue-light: #dbeafe;
}


* {
    box-sizing: border-box;
}


body {
    margin: 0;

    background: var(--background);
    color: var(--text);

    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}


.container {
    width: min(100% - 40px, 900px);
    margin: 0 auto;
    padding: 40px 0;
}


/* Header */

.header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    margin-bottom: 32px;
}


.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}


.brand-icon {
    width: 42px;
    height: 42px;

    display: grid;
    place-items: center;

    border-radius: 12px;

    background: #111827;
    color: white;

    font-weight: 700;
}


.brand h1 {
    margin: 0;

    font-size: 18px;
}


.brand span {
    color: var(--muted);
    font-size: 13px;
}


.admin-link {
    color: var(--muted);

    font-size: 14px;
    text-decoration: none;
}


.admin-link:hover {
    color: var(--text);
}


/* Global status */

.global-status {
    display: flex;
    align-items: center;
    gap: 18px;

    padding: 24px;

    margin-bottom: 40px;

    background: var(--surface);

    border: 1px solid var(--border);
    border-radius: 16px;
}


.status-icon {
    width: 48px;
    height: 48px;

    display: grid;
    place-items: center;

    flex-shrink: 0;

    border-radius: 50%;

    background: var(--green-light);
    color: var(--green);

    font-size: 22px;
    font-weight: 700;
}


.global-status h2 {
    margin: 0 0 5px;

    font-size: 18px;
}


.global-status p {
    margin: 0;

    color: var(--muted);

    font-size: 14px;
}


/* Sections */

.section {
    margin-bottom: 40px;
}


.section-header {
    margin-bottom: 14px;
}


.section-header h2 {
    margin: 0 0 4px;

    font-size: 18px;
}


.section-header p {
    margin: 0;

    color: var(--muted);

    font-size: 14px;
}


/* Service */

.service {
    padding: 20px;

    margin-bottom: 12px;

    background: var(--surface);

    border: 1px solid var(--border);
    border-radius: 14px;
}


.service-info {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    margin-bottom: 18px;
}


.service-name {
    display: flex;
    align-items: center;
    gap: 12px;
}


.service-name > div {
    display: flex;
    flex-direction: column;
    gap: 3px;
}


.service-name strong {
    font-size: 15px;
}


.service-name span:not(.service-dot) {
    color: var(--muted);

    font-size: 12px;
}


.service-dot {
    width: 9px;
    height: 9px;

    border-radius: 50%;
}


.service-dot.online {
    background: var(--green);
}


.service-dot.offline {
    background: var(--red);
}


.online-text {
    color: var(--green);
}


.offline-text {
    color: var(--red);
}


.service-state {
    font-size: 13px;
    font-weight: 600;
}


/* Uptime */

.uptime-bars {
    display: flex;
    align-items: center;

    gap: 2px;

    height: 34px;
}


.uptime-bar {
    position: relative;

    flex: 1;

    min-width: 2px;
    height: 28px;

    border-radius: 3px;

    background: var(--green);

    cursor: pointer;

    transition:
        transform 0.12s ease,
        opacity 0.12s ease;
}


.uptime-bar:hover {
    transform: translateY(-3px);
    opacity: 0.8;
}


.uptime-bar.offline {
    background: var(--red);
}


.uptime-bar.degraded {
    background: var(--yellow);
}


.uptime-bar.maintenance {
    background: var(--blue);
}


.uptime-bar.no-data {
    background: #d1d5db;
}


/* Tooltip */

.uptime-tooltip {
    position: fixed;

    z-index: 1000;

    width: 220px;

    padding: 12px 14px;

    background: #111827;
    color: white;

    border-radius: 9px;

    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.18);

    pointer-events: none;

    opacity: 0;

    transform: translateY(5px);

    transition:
        opacity 0.12s ease,
        transform 0.12s ease;
}


.uptime-tooltip.visible {
    opacity: 1;
    transform: translateY(0);
}


.tooltip-title {
    display: flex;
    align-items: center;
    gap: 7px;

    margin-bottom: 7px;

    font-size: 13px;
    font-weight: 600;
}


.tooltip-content {
    color: #d1d5db;

    font-size: 12px;
    line-height: 1.6;
}


/* Footer uptime */

.uptime-footer {
    display: flex;
    justify-content: space-between;

    margin-top: 7px;

    color: var(--muted);

    font-size: 11px;
}


.uptime-footer strong {
    color: var(--text);
}


/* Empty state */

.empty-state {
    display: flex;
    align-items: center;
    flex-direction: column;

    padding: 40px 20px;

    background: var(--surface);

    border: 1px solid var(--border);
    border-radius: 14px;

    text-align: center;
}


.empty-icon {
    width: 38px;
    height: 38px;

    display: grid;
    place-items: center;

    margin-bottom: 12px;

    border-radius: 50%;

    background: var(--green-light);
    color: var(--green);

    font-weight: 700;
}


.empty-state strong {
    margin-bottom: 5px;

    font-size: 14px;
}


.empty-state span {
    color: var(--muted);

    font-size: 13px;
}


/* Footer */

.footer {
    display: flex;
    justify-content: space-between;

    padding-top: 10px;

    color: var(--muted);

    font-size: 12px;
}


/* Mobile */

@media (max-width: 600px) {

    .container {
        width: min(100% - 24px, 900px);
        padding: 24px 0;
    }


    .header {
        margin-bottom: 24px;
    }


    .global-status {
        padding: 18px;
    }


    .service {
        padding: 16px;
    }


    .service-info {
        align-items: flex-start;
        flex-direction: column;

        gap: 10px;
    }


    .uptime-bar {
        height: 24px;
    }

}
