:root {
    --brand-primary: #4f46e5;
    --brand-primary-dark: #4338ca;
    --brand-bg: #f5f6fa;
    --sidebar-bg: #1e1b2e;
    --sidebar-text: #c9c6dc;
    --sidebar-active: #4f46e5;
}

body {
    background-color: var(--brand-bg);
    font-family: 'Segoe UI', Roboto, -apple-system, sans-serif;
}

/* ---- Auth pages ---- */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #4f46e5 0%, #1e1b2e 100%);
}

.auth-card {
    width: 100%;
    max-width: 420px;
    border: none;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}

.auth-card .brand-title {
    font-weight: 700;
    color: var(--brand-primary);
}

.btn-brand {
    background-color: var(--brand-primary);
    border-color: var(--brand-primary);
    color: #fff;
}

.btn-brand:hover {
    background-color: var(--brand-primary-dark);
    border-color: var(--brand-primary-dark);
    color: #fff;
}

/* ---- App shell ---- */
.app-shell {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    flex-shrink: 0;
    padding: 1.5rem 1rem;
}

.sidebar .brand {
    color: #fff;
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: 2rem;
    display: block;
    text-decoration: none;
}

.sidebar .nav-link {
    color: var(--sidebar-text);
    border-radius: 8px;
    padding: 0.6rem 0.9rem;
    margin-bottom: 0.25rem;
    font-size: 0.95rem;
}

.sidebar .nav-link:hover {
    background: rgba(255,255,255,0.08);
    color: #fff;
}

.sidebar .nav-link.active {
    background: var(--sidebar-active);
    color: #fff;
}

.sidebar .nav-link i {
    width: 20px;
    text-align: center;
    margin-right: 8px;
}

.main-content {
    flex-grow: 1;
    padding: 2rem;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.stat-card {
    border: none;
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #fff;
}

.badge-role-admin {
    background-color: #4f46e5;
}

.badge-role-user {
    background-color: #6b7280;
}

.badge-status-active {
    background-color: #16a34a;
}

.badge-status-inactive {
    background-color: #dc2626;
}

@media (max-width: 768px) {
    .app-shell {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
    }
}
