.nav-button {
    width: 100%;
    border: 0;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
}

.admin-nav-section {
    margin-top: 22px;
}


/* =========================================================
   ADMIN AUTHORIZATION STATE
========================================================= */

body.admin-modal-open {
    overflow: hidden;
}

body[data-admin-page="true"]:not(.admin-authorized) .main-area {
    visibility: hidden;
}

body[data-admin-page="true"].admin-authorized .main-area {
    visibility: visible;
}


/* =========================================================
   ADMIN MODAL
========================================================= */

.admin-modal[hidden] {
    display: none;
}

.admin-modal {
    position: fixed;
    z-index: 3200;
    inset: 0;

    display: grid;

    place-items: center;

    padding: 24px;
}

.admin-modal-backdrop {
    position: absolute;

    inset: 0;

    background:
        rgba(
            2,
            6,
            23,
            0.72
        );

    backdrop-filter:
        blur(7px);
}

.admin-login-card {
    position: relative;

    z-index: 1;

    width:
        min(
            100%,
            440px
        );

    padding: 34px;

    border:
        1px solid
        rgba(
            226,
            232,
            240,
            0.9
        );

    border-radius: 20px;

    background: #ffffff;

    box-shadow:
        0
        30px
        80px
        rgba(
            2,
            6,
            23,
            0.32
        );
}


/* =========================================================
   CLOSE BUTTON
========================================================= */

.admin-modal-close {
    position: absolute;

    top: 18px;
    right: 18px;

    display:
        inline-flex;

    align-items:
        center;

    justify-content:
        center;

    width: 34px;
    height: 34px;

    padding: 0;

    border:
        1px solid
        #e2e8f0;

    border-radius: 9px;

    background:
        #f8fafc;

    color:
        #64748b;

    cursor:
        pointer;

    transition:
        background 0.18s,
        border-color 0.18s,
        color 0.18s,
        transform 0.18s;
}

.admin-modal-close:hover {
    border-color:
        #cbd5e1;

    background:
        #f1f5f9;

    color:
        #0f172a;

    transform:
        translateY(-1px);
}


/* =========================================================
   LOGIN HEADER
========================================================= */

.admin-login-icon {
    display:
        inline-flex;

    align-items:
        center;

    justify-content:
        center;

    width: 54px;
    height: 54px;

    margin-bottom: 18px;

    border-radius: 15px;

    background:
        linear-gradient(
            135deg,
            #2563eb,
            #0891b2
        );

    color:
        #ffffff;

    box-shadow:
        0
        10px
        24px
        rgba(
            37,
            99,
            235,
            0.24
        );
}

.admin-login-icon
.material-symbols-rounded {
    font-size: 28px;
}

.admin-eyebrow {
    margin:
        0
        0
        6px;

    color:
        #2563eb;

    font-size: 10px;

    font-weight: 800;

    letter-spacing:
        1.2px;

    text-transform:
        uppercase;
}

.admin-login-card h2 {
    margin: 0;

    color:
        #0f172a;

    font-size: 25px;

    line-height: 1.25;
}

.admin-login-copy {
    margin:
        8px
        0
        24px;

    color:
        #64748b;

    font-size: 13px;

    line-height: 1.65;
}


/* =========================================================
   FORM FIELDS
========================================================= */

.admin-field {
    display: block;

    margin-bottom: 17px;

    color:
        #334155;

    font-size: 12px;

    font-weight: 700;
}

.admin-input-wrap {
    display: flex;

    align-items: center;

    gap: 10px;

    margin-top: 7px;

    padding:
        0
        13px;

    border:
        1px solid
        #cbd5e1;

    border-radius: 10px;

    background:
        #ffffff;

    transition:
        border-color 0.2s,
        box-shadow 0.2s,
        background 0.2s;
}

.admin-input-wrap:hover {
    border-color:
        #94a3b8;
}

.admin-input-wrap:focus-within {
    border-color:
        #2563eb;

    background:
        #ffffff;

    box-shadow:
        0
        0
        0
        3px
        rgba(
            37,
            99,
            235,
            0.12
        );
}

.admin-input-wrap
>
.material-symbols-rounded {
    flex:
        0
        0
        auto;

    color:
        #94a3b8;

    font-size: 19px;
}

.admin-input-wrap input {
    min-width: 0;

    flex: 1;

    padding:
        12px
        0;

    border: 0;

    outline: 0;

    background:
        transparent;

    color:
        #0f172a;

    font: inherit;

    font-size: 13px;

    font-weight: 500;
}

.admin-input-wrap input::placeholder {
    color:
        #94a3b8;

    font-weight: 400;
}


/* =========================================================
   PASSWORD TOGGLE
========================================================= */

.admin-password-toggle {
    display:
        inline-flex;

    align-items:
        center;

    justify-content:
        center;

    flex:
        0
        0
        auto;

    padding: 4px;

    border: 0;

    background:
        transparent;

    color:
        #64748b;

    cursor:
        pointer;

    transition:
        color 0.18s;
}

.admin-password-toggle:hover {
    color:
        #1d4ed8;
}

.admin-password-toggle
.material-symbols-rounded {
    font-size: 19px;
}


/* =========================================================
   LOGIN ERROR
========================================================= */

.admin-login-error {
    margin:
        0
        0
        16px;

    padding:
        10px
        12px;

    border:
        1px solid
        #fecaca;

    border-radius: 9px;

    background:
        #fee2e2;

    color:
        #991b1b;

    font-size: 12px;

    font-weight: 600;

    line-height: 1.5;
}


/* =========================================================
   LOGIN BUTTON
========================================================= */

.admin-login-submit {
    width: 100%;

    min-height: 44px;
}


/* =========================================================
   DEMONSTRATION NOTE
========================================================= */

.admin-demo-note {
    display: flex;

    align-items:
        flex-start;

    gap: 7px;

    margin:
        18px
        0
        0;

    color:
        #94a3b8;

    font-size: 10px;

    line-height: 1.5;
}

.admin-demo-note
.material-symbols-rounded {
    flex:
        0
        0
        auto;

    margin-top: 1px;

    font-size: 15px;
}


/* =========================================================
   ADMIN PAGE HEADER
========================================================= */

.admin-header-actions {
    display: flex;

    align-items: center;

    gap: 10px;
}


/* =========================================================
   ADMIN COMMAND GRID
========================================================= */

.admin-command-grid {
    display: grid;

    grid-template-columns:
        repeat(
            3,
            minmax(
                0,
                1fr
            )
        );

    gap: 14px;
}

.admin-command-card {
    display: flex;

    align-items: center;

    gap: 13px;

    min-width: 0;

    padding: 16px;

    border:
        1px solid
        #e2e8f0;

    border-radius: 12px;

    background:
        #fbfdff;

    color:
        #0f172a;

    text-decoration:
        none;

    transition:
        border-color 0.2s,
        transform 0.2s,
        box-shadow 0.2s,
        background 0.2s;
}

.admin-command-card:hover {
    transform:
        translateY(-2px);

    border-color:
        #93c5fd;

    background:
        #ffffff;

    box-shadow:
        0
        8px
        20px
        rgba(
            15,
            23,
            42,
            0.07
        );
}

.admin-command-card
strong {
    display: block;

    margin:
        1px
        0
        4px;

    color:
        #0f172a;

    font-size: 13px;

    line-height: 1.4;
}

.admin-command-card
>
.metric-icon {
    display:
        inline-flex;

    flex:
        0
        0
        36px;

    align-items:
        center;

    justify-content:
        center;

    line-height: 1;
}

.admin-command-card
>
span:not(.metric-icon) {
    display: block;

    min-width: 0;
}

.admin-command-card
>
span:not(.metric-icon)
>
span {
    display: block;

    color:
        #64748b;

    font-size: 11px;

    line-height: 1.5;
}


/* =========================================================
   ADMIN SERVICE LIST
========================================================= */

.admin-service-list {
    display: grid;

    gap: 10px;
}

.admin-service-row {
    display: flex;

    align-items: center;

    justify-content:
        space-between;

    gap: 14px;

    padding:
        12px
        14px;

    border:
        1px solid
        #eef2f7;

    border-radius: 10px;

    background:
        #fbfdff;
}

.admin-service-name {
    display: flex;

    align-items: center;

    gap: 10px;

    min-width: 0;

    color:
        #334155;

    font-size: 12px;

    font-weight: 700;
}

.admin-service-name
.material-symbols-rounded {
    flex:
        0
        0
        auto;

    color:
        #64748b;

    font-size: 18px;
}


/* =========================================================
   STATUS BADGE
========================================================= */

.admin-status-badge {
    display:
        inline-flex;

    align-items:
        center;

    gap: 6px;

    flex:
        0
        0
        auto;

    padding:
        5px
        9px;

    border-radius:
        999px;

    background:
        #dcfce7;

    color:
        #047857;

    font-size: 10px;

    font-weight: 800;

    line-height: 1.2;
}

.admin-status-badge::before {
    width: 6px;
    height: 6px;

    border-radius:
        50%;

    background:
        #22c55e;

    content: "";
}


/* =========================================================
   DATASET DETAIL LIST
========================================================= */

.admin-detail-list {
    display: grid;

    gap: 0;

    margin: 0;
}

.admin-detail-row {
    display: grid;

    grid-template-columns:
        150px
        minmax(
            0,
            1fr
        );

    gap: 16px;

    padding:
        13px
        0;

    border-bottom:
        1px solid
        #eef2f7;
}

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

.admin-detail-row dt {
    color:
        #64748b;

    font-size: 11px;

    font-weight: 600;
}

.admin-detail-row dd {
    margin: 0;

    overflow-wrap:
        anywhere;

    color:
        #0f172a;

    font-size: 12px;

    font-weight: 700;
}


/* =========================================================
   RESPONSIVE
========================================================= */

@media (
    max-width: 1100px
) {

    .admin-command-grid {
        grid-template-columns:
            repeat(
                2,
                minmax(
                    0,
                    1fr
                )
            );
    }

}


@media (
    max-width: 800px
) {

    .admin-header-actions {
        width: 100%;
    }

    .admin-header-actions
    .btn {
        flex: 1;
    }

}


@media (
    max-width: 650px
) {

    .admin-modal {
        padding: 16px;
    }

    .admin-login-card {
        padding:
            28px
            22px;
    }

    .admin-login-card h2 {
        padding-right: 30px;

        font-size: 22px;
    }

    .admin-header-actions {
        flex-direction:
            column;

        width: 100%;
    }

    .admin-header-actions
    .btn {
        width: 100%;
    }

    .admin-command-grid {
        grid-template-columns:
            1fr;
    }

    .admin-service-row {
        align-items:
            flex-start;
    }

    .admin-detail-row {
        grid-template-columns:
            1fr;

        gap: 4px;
    }

}


@media (
    max-width: 420px
) {

    .admin-login-card {
        padding:
            26px
            18px
            22px;
    }

    .admin-login-icon {
        width: 48px;
        height: 48px;

        border-radius: 13px;
    }

    .admin-login-icon
    .material-symbols-rounded {
        font-size: 25px;
    }

    .admin-login-copy {
        font-size: 12px;
    }

    .admin-command-card {
        align-items:
            flex-start;
    }

}