:root {
    /* Minimalist Light Palette */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --text-primary: #1a1a1a;
    --text-secondary: #6c757d;
    --accent: #3b82f6; /* Modern Blue */
    --accent-soft: rgba(59, 130, 246, 0.1);
    --border: #e9ecef;
    --glass: rgba(255, 255, 255, 0.8);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body.dark {
    /* Sleek Dark Mode Palette */
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent: #60a5fa;
    --accent-soft: rgba(96, 165, 250, 0.1);
    --border: #334155;
    --glass: rgba(15, 23, 42, 0.8);
    --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: var(--transition);
    min-height: 100vh;
}

/* Glassmorphism Navigation */
nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--accent);
}

.theme-toggle-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0.5rem;
    border-radius: 50%;
    transition: var(--transition);
}

.theme-toggle-btn:hover {
    background: var(--accent-soft);
}

/* Hamburger Styles */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 101;
}

.menu-toggle span {
    width: 30px;
    height: 3px;
    background: var(--text-primary);
    border-radius: 10px;
    transition: var(--transition);
    position: relative;
    transform-origin: 1px;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg);
}

.logo img {
    height: 64px;
    width: auto;
    transition: var(--transition);
}

.logo img:hover {
    transform: scale(1.05);
}

body.dark .logo img {
    content: url('../img/logo_dark.png');
    opacity: 0.95;
}

/* Hero Section */
.hero {
    padding: 8rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    letter-spacing: -0.025em;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 2rem;
}

/* Components */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
}

.btn-primary {
    background-color: var(--accent);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px var(--accent-soft);
}

/* Containers */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

footer {
    padding: 4rem 2rem;
    text-align: center;
    border-top: 1px solid var(--border);
    color: var(--text-secondary);
    margin-top: 4rem;
}

/* Responsive Design */
@media (max-width: 992px) {
    .hero h1 {
        font-size: 3.5rem;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        right: -100%;
        top: 0;
        height: 100vh;
        width: 100%;
        max-width: 300px;
        background: var(--bg-primary);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2.5rem;
        transition: var(--transition);
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
        z-index: 100;
        padding: 2rem;
        border-left: 1px solid var(--border);
    }

    .nav-links.active {
        right: 0;
    }

    .logo img {
        height: 55px;
    }

    .hero h1 {
        font-size: 2.8rem;
    }
    
    .hero {
        padding: 6rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .logo img {
        height: 48px;
    }
    
    .container {
        padding: 1.5rem;
    }
}

/* Flash Messages */
.flash-messages {
    margin-top: 1rem;
}

.flash {
    padding: 1rem 1.5rem;
    background: var(--accent-soft);
    border-left: 4px solid var(--accent);
    color: var(--text-primary);
    border-radius: 8px;
    margin-bottom: 1rem;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { transform: translateX(-10px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* --- DROPDOWNS --- */
.nav-item {
    position: relative;
    display: inline-block;
}

.dropdown-label {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.dropdown-label::after {
    content: '▾';
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.nav-item:hover .dropdown-label::after {
    transform: rotate(180deg);
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-secondary);
    min-width: 180px;
    box-shadow: var(--shadow-lg);
    border-radius: 12px;
    border: 1px solid var(--border);
    z-index: 1000;
    overflow: hidden;
    padding: 0.5rem 0;
    margin-top: 0.5rem;
}

/* Invisible bridge to maintain hover state across the gap */
.dropdown-content::before {
    content: '';
    position: absolute;
    top: -1rem;
    left: -20px;
    right: -20px;
    height: 1.5rem;
    z-index: -1;
}

.dropdown-content a {
    color: var(--text-secondary) !important;
    padding: 0.75rem 1.5rem !important;
    text-decoration: none;
    display: block;
    font-size: 0.9rem;
    transition: var(--transition);
}

.dropdown-content a:hover {
    background: var(--bg-primary);
    color: var(--accent) !important;
    padding-left: 1.75rem !important;
}

.nav-item:hover .dropdown-content {
    display: block;
}

/* Mobile Nav Adjustments */
@media (max-width: 768px) {
    .nav-links {
        padding-top: 6rem !important;
        justify-content: flex-start !important;
        overflow-y: auto;
    }
    .nav-item {
        width: 100%;
        text-align: left;
    }
    .dropdown-content {
        position: static;
        transform: none;
        box-shadow: none;
        border: none;
        display: block;
        padding-left: 1.5rem;
        background: transparent;
        margin-top: 0;
    }
    .dropdown-label {
        font-weight: 800;
        color: var(--accent) !important;
        pointer-events: none;
    }
    .dropdown-label::after {
        display: none;
    }
}

/* --- DASHBOARD ARCHITECTURE (Solid Left Sidebar) --- */
.dashboard-wrapper {
    display: flex;
    min-height: 100vh;
    background: var(--bg-primary);
}

.dashboard-sidebar {
    width: 280px;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    padding: 2.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    z-index: 1000;
}

.dashboard-main {
    flex: 1;
    margin-left: 280px;
    padding: 3rem;
    min-width: 0;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.nav-item-dash {
    padding: 0.75rem 1.25rem;
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: var(--transition);
}

.nav-item-dash:hover {
    background: var(--bg-primary);
    color: var(--accent);
}

.nav-item-dash.active {
    background: var(--accent);
    color: white !important;
}

.dashboard-section {
    display: none;
    animation: fadeIn 0.4s ease-out;
}

.dashboard-section.active {
    display: block;
}

.content-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
}

/* Mobile Dashboard Adaptation */
@media (max-width: 1024px) {
    .dashboard-sidebar {
        width: 100%;
        height: auto;
        position: fixed;
        bottom: 0;
        left: 0;
        top: auto;
        border-right: none;
        border-top: 1px solid var(--border);
        padding: 0.75rem;
        flex-direction: row;
        justify-content: space-around;
        background: var(--glass);
        backdrop-filter: blur(10px);
    }

    .sidebar-header, .sidebar-footer { display: none; }
    
    .sidebar-nav {
        flex-direction: row;
        width: 100%;
        justify-content: space-around;
    }

    .nav-item-dash {
        flex-direction: column;
        padding: 0.5rem;
        font-size: 0.65rem;
        gap: 0.25rem;
    }

    .nav-item-dash .icon { font-size: 1.2rem; }

    .dashboard-main {
        margin-left: 0;
        padding: 2rem 1.5rem 100px 1.5rem;
    }
}
