:root {
    --bg: #0b1020;
    --surface: #121a2b;
    --surface-hover: #19243a;
    --border: #26344b;
    --primary: #38bdf8;
    --text: #f1f5f9;
    --muted: #94a3b8;
    --danger: #f87171;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
    min-height: 100vh;
}

a {
    color: var(--primary);
    text-decoration: none;
}

.brand {
    color: white;
    font-size: 25px;
    font-weight: 800;
    letter-spacing: 2px;
}

.brand span {
    color: var(--primary);
}

/* Authentication pages */

.auth-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 35px 20px;
}

.auth-page > .brand {
    margin-bottom: 30px;
}

.auth-card {
    width: 100%;
    max-width: 440px;
    padding: 38px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 15px;
    box-shadow: 0 20px 60px #0004;
}

.auth-heading {
    margin-bottom: 30px;
}

.eyebrow {
    color: var(--primary);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 2px;
}

.auth-heading h1 {
    font-size: 27px;
    margin: 12px 0 8px;
}

.auth-heading p {
    color: var(--muted);
    font-size: 14px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 9px;
    font-size: 13px;
    font-weight: 600;
}

.form-group input {
    width: 100%;
    padding: 14px;
    background: #080e1b;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: white;
    font-size: 14px;
    outline: none;
}

.form-group input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px #38bdf820;
}

.form-group input::placeholder {
    color: #64748b;
}

.auth-button {
    width: 100%;
    display: block;
    padding: 14px;
    margin-top: 10px;
    border: none;
    border-radius: 8px;
    background: var(--primary);
    color: #07111e;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    text-align: center;
}

.auth-button:hover {
    background: #7dd3fc;
}

.auth-footer {
    text-align: center;
    margin-top: 25px;
    font-size: 13px;
    color: var(--muted);
}

.auth-footer a {
    font-weight: bold;
    margin-left: 4px;
}

.alert {
    padding: 13px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 13px;
}

.alert-error {
    background: #7f1d1d30;
    border: 1px solid #ef444460;
    color: #fca5a5;
}

.copyright {
    color: var(--muted);
    font-size: 12px;
    margin-top: 30px;
}

/* Dashboard */

.dashboard {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 250px;
    flex-shrink: 0;
    background: var(--surface);
    border-right: 1px solid var(--border);
    padding: 30px 20px;
}

.sidebar .brand {
    display: block;
    margin-bottom: 55px;
}

.sidebar-label {
    color: #64748b;
    font-size: 10px;
    font-weight: bold;
    letter-spacing: 1.5px;
    margin: 25px 10px 12px;
}

.sidebar-link {
    display: block;
    width: 100%;
    padding: 13px;
    margin-bottom: 6px;
    border-radius: 8px;
    color: var(--muted);
    font-size: 14px;
    text-align: left;
    background: transparent;
    border: none;
    cursor: pointer;
}

.sidebar-link span {
    margin-right: 10px;
}

.sidebar-link:hover,
.sidebar-link.active {
    background: var(--surface-hover);
    color: var(--primary);
}

.logout-link {
    font-family: inherit;
}

.dashboard-main {
    flex: 1;
    padding: 45px;
    min-width: 0;
}

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

.dashboard-header h1 {
    font-size: 27px;
    margin: 10px 0;
}

.dashboard-header p,
.dashboard-section p {
    color: var(--muted);
    font-size: 14px;
}

.user-avatar {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--primary);
    color: #07111e;
    font-size: 20px;
    font-weight: bold;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    padding: 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
}

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

.stat-card strong {
    display: block;
    font-size: 30px;
    margin: 12px 0 5px;
}

.stat-card p {
    color: var(--muted);
    font-size: 12px;
    overflow-wrap: anywhere;
}

.status-active {
    color: #4ade80;
    font-size: 21px !important;
}

.welcome-panel {
    padding: 35px;
    background: linear-gradient(120deg, #142c47, #12203a);
    border: 1px solid #28435f;
    border-radius: 14px;
    margin-bottom: 30px;
}

.welcome-panel h2 {
    font-size: 27px;
    margin: 15px 0;
}

.welcome-panel p {
    color: #cbd5e1;
    margin-bottom: 25px;
    max-width: 550px;
    font-size: 14px;
    line-height: 1.8;
}

.welcome-panel .auth-button {
    width: auto;
    display: inline-block;
    padding: 13px 24px;
}

.dashboard-section {
    padding: 25px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.dashboard-section h2 {
    margin-bottom: 12px;
    font-size: 19px;
}

@media (max-width: 850px) {
    .sidebar {
        width: 200px;
    }

    .dashboard-main {
        padding: 25px;
    }

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

@media (max-width: 600px) {
    .dashboard {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        padding: 15px;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }

    .sidebar .brand {
        margin-bottom: 15px;
    }

    .sidebar-label {
        margin-top: 15px;
    }

    .dashboard-main {
        padding: 22px 16px;
    }

    .dashboard-header h1 {
        font-size: 21px;
    }

    .auth-card {
        padding: 25px 20px;
    }

    .welcome-panel {
        padding: 25px 20px;
    }

    .welcome-panel h2 {
        font-size: 22px;
    }
}
