/* =========================================
   GLOBAL & SHARED STYLES
   ========================================= */

/* Base Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Fixes the white flash on page load/tab switch */
html {
    background-color: #1a1120; 
}

body {
    background-color: #f7eedf; /* Fallback color for login */
    background-image: url('../../assets/images/background.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.dashboard-body {
    display: flex;
    justify-content: flex-start;
    align-items: stretch;
    height: 100vh;
    margin: 0;
    overflow: hidden;
    background-color: #1a1120; /* Fixes the white flash */
    background-image: url('../../assets/images/background.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: #ffffff;
}

/* --- SIDEBAR --- */
.sidebar {
    width: 280px;
    background-color: #000000;
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 10;
}

/* Brand/Logo Area - Merged & Fixed Alignment */
.sidebar-brand {
    display: flex;
    align-items: center; /* Locks the icon and text to the exact same middle line */
    gap: 12px;
    padding: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.sidebar-logo, .brand-icon {
    width: 32px; 
    height: auto;
    display: block; /* Removes invisible bottom spacing on images */
    filter: brightness(0) invert(1); 
}

/* Remove default heading margins that cause misalignment */
.sidebar-brand h2 {
    margin: 0;
    padding: 0;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
    color: #ffffff;
    letter-spacing: 0.5px;
}

.sidebar-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding-top: 1.5rem;
    gap: 0.5rem;
}

/* Navigation Links - Merged & Fixed */
.nav-item {
    display: flex;
    align-items: center;
    gap: 16px; /* Replaces margin-right to keep spacing perfect */
    padding: 1rem 2rem;
    color: #ffffff;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

/* Constrain all navigation icons from squishing/expanding */
.nav-item svg, .nav-icon, .sidebar-footer svg {
    width: 22px;
    height: 22px;
    flex-shrink: 0; 
}

.nav-item:hover:not(.active) {
    background-color: rgba(255, 255, 255, 0.1);
}

.nav-item.active {
    background-color: #ffffff;
    color: #000000;
    border-radius: 0 8px 8px 0;
    margin-right: 1.5rem; 
    font-weight: 600;
}

.sidebar-footer {
    padding-bottom: 2rem;
}

.logout-btn {
    font-weight: 600;
}

/* --- MAIN CONTENT & HEADERS --- */
.main-content {
    flex: 1;
    padding: 4rem 5rem;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.greeting {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #ffffff;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

/* SPA Navigation Class */
.hidden-view {
    display: none !important;
}

/* Universal Hidden Class for Modals and Popups */
.hidden {
    display: none !important;
}