:root {
    --primary: #1e3a8a;
    --secondary: #0f172a;
    --accent: #f59e0b;
    --success: #16a34a;
    --danger: #dc2626;
    --bg: #f8fafc;
    --card: #ffffff;
    --text: #0f172a;
}

/* =========================
   BASE STYLES
========================= */

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: "Segoe UI", system-ui, sans-serif;
}

/* Cards */
.card {
    border: none;
    border-radius: 14px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.06);
}

/* Buttons */
.btn-primary {
    background: var(--primary);
    border: none;
}

.btn-primary:hover {
    background: #162f6b;
}

/* =========================
   SIDEBAR
========================= */

.sidebar {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100vh;
    background: var(--secondary);
    color: white;
    padding: 15px;
    overflow-y: auto;
    transition: left 0.3s ease;
    z-index: 1050;
}

/* ACTIVE (mobile open) */
.sidebar.active {
    left: 0;
}

/* HEADER */
.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-weight: 600;
}

/* LINKS */
.sidebar a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    margin-bottom: 6px;
    border-radius: 10px;
    color: #cbd5e1;
    text-decoration: none;
    font-size: 14px;
    transition: 0.2s ease;
}

.sidebar a:hover {
    background: rgba(255,255,255,0.08);
    color: #fff;
}

/* Google Icons */
.material-icons {
    font-size: 20px;
}

/* =========================
   OVERLAY (MOBILE)
========================= */

#sidebarOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    z-index: 1040;
    display: none;
}

/* =========================
   MAIN CONTENT
========================= */

.main-content {
    padding: 15px;
    margin-left: 0;
    transition: margin-left 0.3s ease;
}

/* DESKTOP FIX */
@media (min-width: 768px) {
    .sidebar {
        left: 0;
        width: 240px;
    }

    .main-content {
        margin-left: 240px; /* THIS FIXES OVERLAP */
    }


    /* hide overlay on desktop */
    #sidebarOverlay {
        display: none !important;
    }

    /* hide close button */
    .sidebar-header button {
        display: none;
    }
}

/* =========================
   ACTIVE OVERLAY BEHAVIOR
========================= */

.sidebar.active + #sidebarOverlay {
    display: block;
}