
:root {
    --navy: #071b36;
    --navy-light: #102b50;
    --blue: #1769aa;
    --cyan: #19c5d8;
    --yellow: #f5c542;
    --green: #20b779;
    --red: #e34d59;
    --white: #ffffff;
    --background: #f2f6fb;
    --text: #26364b;
    --muted: #7d8da3;
    --border: #e2e9f2;
    --shadow: 0 8px 25px rgba(7, 27, 54, .07);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--text);
    background: var(--background);
}

button, input {
    font: inherit;
}

button {
    cursor: pointer;
}

/* LOGIN */

.login-page {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px;
    background: linear-gradient(135deg, #06172e, #103967);
}

.login-card {
    width: 100%;
    max-width: 410px;
    padding: 38px;
    border-radius: 18px;
    background: var(--white);
    box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
    text-align: center;
}

.brand-mark {
    width: 58px;
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
    border-radius: 16px;
    color: var(--white);
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    font-size: 23px;
    font-weight: 800;
}

.login-card h1 {
    margin: 8px 0;
    color: var(--navy);
    letter-spacing: 2px;
}

.login-card > p {
    margin: 0 0 28px;
    color: var(--muted);
}

.login-card form {
    text-align: left;
}

.login-card label {
    display: block;
    margin: 16px 0 7px;
    font-size: 13px;
    font-weight: 700;
}

.login-card input {
    width: 100%;
    padding: 13px;
    border: 1px solid var(--border);
    border-radius: 9px;
    outline: none;
}

.login-card input:focus {
    border-color: var(--cyan);
    box-shadow: 0 0 0 3px rgba(25, 197, 216, .12);
}

.login-card form button {
    width: 100%;
    margin-top: 24px;
    padding: 14px;
    border: 0;
    border-radius: 9px;
    color: var(--white);
    background: var(--blue);
    font-weight: 700;
}

.login-card form button:hover {
    background: var(--navy-light);
}

#loginMessage {
    min-height: 18px;
    color: var(--red);
    font-size: 13px;
}

.login-card > small {
    display: block;
    margin-top: 22px;
    color: var(--muted);
}

/* LAYOUT */

.admin-app {
    min-height: 100vh;
}

.admin-app[hidden],
.login-page[hidden] {
    display: none !important;
}

.sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 10;
    display: flex;
    flex-direction: column;
    width: 260px;
    padding: 22px 15px;
    overflow-y: auto;
    color: var(--white);
    background: var(--navy);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 10px 24px;
    border-bottom: 1px solid rgba(255,255,255,.12);
}

.sidebar-brand .brand-mark {
    flex-shrink: 0;
    width: 45px;
    height: 45px;
    margin: 0;
    border-radius: 12px;
}

.sidebar-brand strong,
.sidebar-brand small {
    display: block;
}

.sidebar-brand strong {
    font-size: 15px;
    letter-spacing: 1px;
}

.sidebar-brand small {
    margin-top: 5px;
    color: var(--cyan);
    font-size: 10px;
    letter-spacing: 2px;
}

.admin-profile {
    display: flex;
    align-items: center;
    gap: 11px;
    margin: 20px 5px;
    padding: 13px 10px;
    border-radius: 10px;
    background: rgba(255,255,255,.07);
}

.profile-avatar {
    width: 37px;
    height: 37px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: var(--navy);
    background: var(--yellow);
    font-weight: 800;
}

.admin-profile strong,
.admin-profile small {
    display: block;
}

.admin-profile strong {
    font-size: 12px;
}

.admin-profile small {
    margin-top: 5px;
    color: #a8bfd8;
    font-size: 11px;
}

.nav-heading {
    margin: 18px 10px 8px;
    color: #829bb9;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.4px;
}

.nav-item {
    width: 100%;
    margin: 2px 0;
    padding: 11px 12px;
    border: 0;
    border-radius: 8px;
    color: #d4e1f0;
    background: transparent;
    text-align: left;
    font-size: 12px;
}

.nav-item:hover {
    color: var(--white);
    background: rgba(255,255,255,.09);
}

.nav-item.active {
    color: var(--white);
    background: var(--blue);
    font-weight: 700;
}

.logout-button {
    margin-top: auto;
    padding: 12px;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 8px;
    color: #ffb7bd;
    background: transparent;
    font-weight: 700;
}

.logout-button:hover {
    background: rgba(227,77,89,.15);
}

/* MAIN CONTENT */

.main-content {
    min-height: 100vh;
    margin-left: 260px;
    padding: 0 28px 20px;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 100px;
    border-bottom: 1px solid var(--border);
}

.topbar h2 {
    margin: 0;
    color: var(--navy);
    font-size: 23px;
}

.topbar p {
    margin: 7px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.topbar-status {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 12px;
}

.status-indicator {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--yellow);
}

.page-content {
    padding: 25px 0;
}

.welcome-panel {
    padding: 25px;
    border-radius: 13px;
    color: var(--white);
    background: linear-gradient(110deg, #103967, #1769aa);
    box-shadow: var(--shadow);
}

.welcome-panel h2 {
    margin: 0 0 10px;
    font-size: 21px;
}

.welcome-panel p {
    max-width: 750px;
    margin: 0;
    color: #d9eafa;
    font-size: 13px;
    line-height: 1.7;
}

/* DASHBOARD */

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 17px;
    margin: 22px 0;
}

.stat-card {
    padding: 21px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--white);
    box-shadow: var(--shadow);
}

.stat-card span,
.stat-card strong,
.stat-card small {
    display: block;
}

.stat-card span {
    color: var(--muted);
    font-size: 12px;
}

.stat-card strong {
    margin: 13px 0 8px;
    color: var(--navy);
    font-size: 28px;
}

.stat-card small {
    color: var(--muted);
    font-size: 10px;
}

.content-panel {
    padding: 23px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--white);
    box-shadow: var(--shadow);
}

.content-panel h3 {
    margin: 0 0 12px;
    color: var(--navy);
}

.content-panel p {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.7;
}

.main-footer {
    padding: 18px 0;
    border-top: 1px solid var(--border);
    color: var(--muted);
    text-align: center;
    font-size: 11px;
}

/* RESPONSIVE */

@media (max-width: 1100px) {
    .dashboard-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .sidebar {
        position: relative;
        width: 100%;
        max-height: none;
    }

    .sidebar nav {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 3px;
    }

    .nav-heading {
        grid-column: 1 / -1;
    }

    .logout-button {
        margin-top: 18px;
    }

    .main-content {
        margin-left: 0;
        padding: 0 16px 20px;
    }

    .topbar {
        align-items: flex-start;
        flex-direction: column;
        justify-content: center;
        padding: 20px 0;
    }

    .dashboard-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .stat-card {
        padding: 15px;
    }

    .stat-card strong {
        font-size: 23px;
    }
}

@media (max-width: 420px) {
    .login-card {
        padding: 25px 20px;
    }

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

    .sidebar nav {
        grid-template-columns: 1fr;
    }
}

