:root {
    color-scheme: dark;
    font-family:
        Inter,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    color: #edf2ff;
    background:
        radial-gradient(
            circle at 85% 0%,
            #30205a 0,
            transparent 35%
        ),
        linear-gradient(
            135deg,
            #071525,
            #0b1424 55%,
            #17132a
        );
}

.shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.topbar {
    height: 84px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: .06em;
}

.brand-sub {
    color: #8190aa;
    font-size: 12px;
}

.userbox {
    display: flex;
    gap: 18px;
    align-items: center;
}

h1, h2, p {
    margin-top: 0;
}

a {
    color: inherit;
    text-decoration: none;
}

.auth-card,
.form-card,
.panel,
.card,
.empty {
    background: rgba(20, 31, 49, .9);
    border: 1px solid rgba(157, 174, 209, .18);
    box-shadow: 0 20px 60px rgba(0, 0, 0, .18);
    border-radius: 18px;
}

.auth-card {
    width: min(440px, 100%);
    margin: 8vh auto;
    padding: 34px;
}

.form-card {
    max-width: 640px;
    padding: 32px;
    margin-top: 40px;
}

label {
    display: block;
    color: #b7c1d5;
    margin: 18px 0 7px;
    font-size: 14px;
}

input {
    width: 100%;
    border: 1px solid #334158;
    border-radius: 11px;
    padding: 13px 14px;
    background: #0c1626;
    color: white;
    outline: none;
    font-size: 15px;
}

input:focus {
    border-color: #7d84ff;
}

button,
.button {
    font: inherit;
}

.primary {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 12px 18px;
    margin-top: 22px;
    border: 0;
    border-radius: 11px;
    background:
        linear-gradient(
            135deg,
            #7277e8,
            #6268cc
        );
    color: white;
    cursor: pointer;
    font-weight: 700;
}

.primary:disabled {
    opacity: .45;
    cursor: default;
}

.linkbutton {
    padding: 0;
    background: none;
    border: 0;
    color: #abb6ca;
    cursor: pointer;
}

.muted {
    color: #8f9bb1;
}

.error {
    margin: 16px 0;
    padding: 12px 14px;
    border: 1px solid #7b3e53;
    border-radius: 10px;
    background: rgba(125, 42, 70, .15);
}

.bottom-link {
    margin: 22px 0 0;
    color: #8997ad;
}

.bottom-link a,
.back {
    color: #9da4ff;
}

.page-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin: 36px 0 24px;
}

.page-title .primary {
    margin: 0;
}

.grid {
    display: grid;
    grid-template-columns:
        repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.card {
    padding: 22px;
    transition:
        transform .15s ease,
        border-color .15s ease;
}

.card:hover {
    transform: translateY(-2px);
    border-color: rgba(126, 132, 255, .65);
}

.card-title {
    font-size: 18px;
    font-weight: 750;
    margin-bottom: 8px;
}

.stats {
    display: flex;
    gap: 26px;
    margin-top: 24px;
}

.stats div {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.stats strong {
    font-size: 17px;
}

.stats span {
    color: #748199;
    font-size: 11px;
}

.empty {
    padding: 40px;
    text-align: center;
    color: #9aa6ba;
}

.empty.small {
    padding: 26px;
    box-shadow: none;
}

.panel {
    padding: 24px;
}

.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.panel-head .primary {
    margin: 0;
}

.hub-row {
    margin-top: 14px;
    padding: 16px;
    border-radius: 12px;
    background: #101b2c;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.status.online {
    color: #79daa5;
}

.status.offline {
    color: #e79090;
}

.status.unknown {
    color: #d8c481;
}

@media (max-width: 650px) {
    .shell {
        width: min(100% - 20px, 1180px);
    }

    .page-title,
    .panel-head {
        align-items: stretch;
        flex-direction: column;
    }

    .page-title .primary,
    .panel-head .primary {
        width: 100%;
    }

    .stats {
        gap: 18px;
    }
}


.eyebrow {
    margin-bottom: 7px;
    color: #888fff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .14em;
}

.secondary {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 11px 17px;
    border: 1px solid #3b4960;
    border-radius: 11px;
    background: #152033;
    color: #dbe3f3;
    cursor: pointer;
    font-weight: 650;
}

.admin-stats {
    display: grid;
    grid-template-columns:
        repeat(6, minmax(120px, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.admin-stat {
    padding: 18px;
    border: 1px solid rgba(157,174,209,.16);
    border-radius: 14px;
    background: rgba(20,31,49,.88);
}

.admin-stat strong {
    display: block;
    margin-bottom: 5px;
    font-size: 25px;
}

.admin-stat span {
    color: #8290a8;
    font-size: 12px;
}

.admin-panel {
    margin-bottom: 50px;
}

.hub-table-wrap {
    overflow-x: auto;
    margin-top: 20px;
}

.hub-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 850px;
}

.hub-table th {
    padding: 11px 12px;
    border-bottom: 1px solid #2b374c;
    color: #7f8ca5;
    text-align: left;
    font-size: 11px;
    font-weight: 650;
}

.hub-table td {
    padding: 16px 12px;
    border-bottom: 1px solid rgba(50,64,86,.7);
    vertical-align: middle;
}

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

.table-sub {
    margin-top: 4px;
    color: #718098;
    font-size: 11px;
}

.status-pill {
    display: inline-flex;
    padding: 6px 9px;
    border-radius: 999px;
    background: rgba(255,255,255,.04);
    font-size: 12px;
}

.status-pill.online {
    color: #79daa5;
    background: rgba(67,174,114,.10);
}

.status-pill.offline {
    color: #e79090;
    background: rgba(190,75,75,.10);
}

.status-pill.unknown {
    color: #d8c481;
    background: rgba(198,169,78,.10);
}

@media (max-width: 900px) {
    .admin-stats {
        grid-template-columns:
            repeat(2, minmax(120px, 1fr));
    }
}

select {
    width: 100%;
    border: 1px solid #334158;
    border-radius: 11px;
    padding: 13px 14px;
    background: #0c1626;
    color: white;
    outline: none;
    font-size: 15px;
}

select:focus {
    border-color: #7d84ff;
}
