:root {
    --primary-color: #6366f1;
    /* Vibrant Indigo */
    --primary-hover: #4f46e5;
    --secondary-color: #ec4899;
    /* Pink for accents */
    --bg-color: #f8fafc;
    /* Very light cool gray */
    --sidebar-bg: rgba(255, 255, 255, 0.85);
    /* Proper transparency for glassmorphism */
    --card-bg: rgba(255, 255, 255, 0.9);
    --text-color: #1e293b;
    /* Dark slate */
    --text-muted: #64748b;
    --border-color: rgba(226, 232, 240, 0.8);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --glass-blur: blur(12px);
    --radius-lg: 16px;
    --radius-md: 12px;
}

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

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-color);
    background-image:
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(236, 72, 153, 0.15) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--text-color);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Notification Toast */
.notification {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-weight: 500;
    z-index: 10000;
    box-shadow: var(--shadow-lg);
    animation: slideDown 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    backdrop-filter: var(--glass-blur);
    display: flex;
    align-items: center;
    gap: 8px;
}

.notification.hidden {
    display: none;
}

.notification.green {
    background-color: rgba(16, 185, 129, 0.9);
    color: white;
}

.notification.red {
    background-color: rgba(239, 68, 68, 0.9);
    color: white;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Cookie Consent Banner */
.cookie-banner {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 600px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: var(--glass-blur);
    padding: 16px 24px;
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.4);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    animation: slideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.cookie-banner.hidden {
    display: none;
}

.cookie-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 16px;
}

.cookie-content p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-color);
    line-height: 1.4;
}

.cookie-content button {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.cookie-content button:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translate(-50%, 20px);
    }

    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

/* Layout */
#app {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* Sidebar */
#sidebar {
    width: 260px;
    background: var(--sidebar-bg);
    backdrop-filter: var(--glass-blur);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 24px;
    transition: transform 0.3s ease;
}

#sidebar.hidden {
    display: none !important;
}

.brand {
    font-size: 1.75rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 40px;
    letter-spacing: -0.02em;
}

#sidebar ul {
    list-style: none;
    flex: 1;
}

#sidebar li a {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    text-decoration: none;
    color: var(--text-muted);
    border-radius: var(--radius-md);
    margin-bottom: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
}

#sidebar li a:hover,
#sidebar li a.active {
    background-color: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
}

#logout-btn {
    background: transparent;
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #ef4444;
    cursor: pointer;
    text-align: center;
    padding: 10px 16px;
    border-radius: var(--radius-md);
    font-weight: 600;
    transition: all 0.2s ease;
}

#logout-btn:hover {
    background-color: #fef2f2;
    border-color: #ef4444;
}

/* Main Content */
#main-content {
    flex: 1;
    padding: 40px;
    overflow-y: auto;
    position: relative;
}

/* Modals */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal.hidden {
    display: none !important;
}

.modal-content {
    background: white;
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 480px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
}

.modal h2 {
    font-size: 1.5rem;
    margin-bottom: 24px;
    color: var(--text-color);
}

.close {
    color: #94a3b8;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    top: 20px;
    right: 20px;
    line-height: 1;
    transition: color 0.2s;
}

.close:hover {
    color: var(--text-color);
}

/* Forms */
input,
textarea,
select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: all 0.2s;
    background: #f8fafc;
    font-family: inherit;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary-color);
    background: white;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

/* Global utility for hiding content */
.hidden {
    display: none !important;
}

/* Mobile Menu Toggle Button */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    position: fixed;
    top: 20px;
    left: 20px;
}

.menu-toggle span {
    width: 30px;
    height: 3px;
    background: var(--text-color);
    border-radius: 10px;
    transition: all 0.3s linear;
    position: relative;
    transform-origin: 1px;
}

.menu-toggle.active span:first-child {
    transform: rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg);
}

#forgot-password-container.hidden {
    display: none;
}

/* Sidebar Overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

/* Sidebar Header (for mobile close button) */
.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.close-sidebar {
    display: none;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--text-color);
    padding: 0;
    line-height: 1;
}

/* Mobile Layout Base */
@media (max-width: 768px) {
    #sidebar {
        position: fixed;
        left: -280px;
        top: 0;
        bottom: 0;
        z-index: 1002;
        background: white;
        transition: left 0.3s ease;
    }

    #sidebar.open {
        left: 0;
    }

    .menu-toggle {
        display: flex !important;
    }

    #main-content {
        padding: 20px 16px;
        padding-top: 70px;
    }

    .cookie-banner {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .cookie-content {
        flex-direction: column;
        text-align: center;
    }

    .cookie-content button {
        width: 100%;
    }

    .close-sidebar {
        display: block;
    }
}