:root {
    --bg-color: #ffffff;
    --card-bg: #fdfdfc;
    /* Warmer tint */
    --text-primary: #42552b;
    /* Deep Green */
    --text-secondary: #6d7a5b;
    /* Muted Green/Grey */
    --accent: #fa591e;
    /* Bright Orange */
    --accent-hover: #8c1a0a;
    /* Deep Red */
    --brand-lime: #a0b240;
    /* Lime */
    --border: #e2e8f0;
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navbar */
.navbar {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1.2rem 0;
    border-bottom: none;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.04);
}

.navbar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.5px;
    text-transform: uppercase;
    flex: 1;
    /* Pushes center nav */
}

.center-nav {
    flex: 2;
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.right-nav {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.nav-link {
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.95rem;
    position: relative;
}

.nav-link:hover {
    color: var(--accent);
}

.nav-link.active {
    color: var(--accent);
    font-weight: 700;
}

/* Buttons */
.btn {
    padding: 0.6rem 1.4rem;
    border-radius: 50px;
    /* More modern rounded pill shape */
    font-weight: 600;
    cursor: pointer;
    border: none;
    display: inline-block;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 4px 10px rgba(250, 89, 30, 0.3);
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(140, 26, 10, 0.4);
}

.btn-outline {
    border: 1px solid var(--border);
    color: var(--text-primary);
    background: white;
}

.btn-outline:hover {
    border-color: var(--text-primary);
    background: var(--card-bg);
}

/* Hero Section */
/* Hero Section */
.hero {
    padding: 6rem 0;
    text-align: center;
    background: linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%);
    margin-bottom: 3rem;
    position: relative;
    overflow: hidden;
}

.hero-bubbles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.bubble-wrapper {
    position: absolute;
    pointer-events: auto;
    animation-name: floatBubble;
    animation-iteration-count: infinite;
    animation-timing-function: ease-in-out;
    z-index: 1;
    /* Default z-index */
    transition: z-index 0s;
}

.bubble-wrapper:hover {
    z-index: 50;
    /* Bring to front on hover */
    animation-play-state: paused;
}

.chat-bubble {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(2px);
    padding: 0.8rem 1.2rem;
    border-radius: 20px;
    border-bottom-left-radius: 4px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    font-size: 0.85rem;
    color: var(--text-secondary);
    max-width: 200px;
    line-height: 1.4;
    cursor: default;
    user-select: none;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    opacity: 0.5;
    transform: scale(var(--initial-scale));
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.bubble-wrapper:hover .chat-bubble {
    transform: scale(1.1);
    /* Absolute scale on hover for readability */
    opacity: 1;
    background: white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    color: var(--accent);
    border-color: var(--accent);
}

@keyframes floatBubble {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-30px);
    }
}

.relative-content {
    position: relative;
    z-index: 10;
    pointer-events: none;
}

.relative-content h1,
.relative-content p {
    text-shadow: 0 20px 40px rgba(255, 255, 255, 1);
}

.relative-content * {
    pointer-events: auto;
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    line-height: 1.1;
    letter-spacing: -1px;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto 2.5rem;
}

/* Grid System */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
    margin-bottom: 5rem;
}

.card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
    border-color: var(--accent);
}

.card h3 {
    margin-bottom: 0.8rem;
    color: var(--text-primary);
    font-size: 1.3rem;
}

.icon-box {
    width: 48px;
    height: 48px;
    background: #f0f9ff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
}

/* Forms */
.auth-container {
    max-width: 420px;
    margin: 5rem auto;
    padding: 2.5rem;
    background: #fff;
    border-radius: 20px;
    border: 1px solid var(--border);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 0.9rem 1rem;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.2s;
}

.form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.1);
}

/* Footer */
.footer {
    border-top: 1px solid var(--border);
    padding: 3rem 0;
    color: var(--text-secondary);
    margin-top: 5rem;
    background: #f8fafc;
}

.social-links {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    font-size: 1.4rem;
    color: var(--text-primary);
}

/* Utilities */
.text-center {
    text-align: center;
}

.mb-4 {
    margin-bottom: 2rem;
}

.section-title {
    margin-bottom: 3.5rem;
    text-align: center;
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

@media (max-width: 768px) {
    .navbar-content {
        flex-direction: column;
        gap: 1rem;
    }

    .center-nav {
        flex-direction: column;
        gap: 0.5rem;
        align-items: center;
    }

    .hero h1 {
        font-size: 2.8rem;
    }

    .nav-links {
        gap: 1rem;
    }
}

/* Utilities & Alerts */
.alert-error {
    background: rgba(140, 26, 10, 0.1);
    color: var(--accent-hover);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border: 1px solid rgba(140, 26, 10, 0.2);
}

.alert-success {
    background: rgba(160, 178, 64, 0.15);
    /* Brand Lime Tint */
    color: #4f5b1d;
    /* Darker Lime/Olive */
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-weight: 500;
    border: 1px solid rgba(160, 178, 64, 0.3);
}

.brand-box {
    background: rgba(66, 85, 43, 0.05);
    /* Text Primary Tint */
    border: 1px solid rgba(66, 85, 43, 0.2);
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 2rem;
    color: var(--text-primary);
}

/* Dropdown Styles */
.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    min-width: 250px;
    /* Slightly wider for long names */
    padding: 0.5rem 0;
    z-index: 1000;
    border: 1px solid var(--border);
}

.nav-item.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-item {
    display: block;
    padding: 0.7rem 1.5rem;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.95rem;
    transition: background 0.2s, color 0.2s;
}

.dropdown-item:hover {
    background: #f8fafc;
    color: var(--accent);
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

/* Mobile Navigation */
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.8rem;
    color: var(--text-primary);
    cursor: pointer;
}

@media (max-width: 992px) {
    .mobile-toggle {
        display: block;
    }

    .navbar-content {
        flex-wrap: wrap;
    }

    .center-nav,
    .right-nav {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        margin-top: 1.5rem;
    }

    .navbar-content.mobile-active .center-nav,
    .navbar-content.mobile-active .right-nav {
        display: flex;
    }

    .navbar-content.mobile-active .center-nav {
        order: 2;
        border-top: 1px solid var(--border);
        padding-top: 1.5rem;
    }

    .navbar-content.mobile-active .right-nav {
        order: 3;
        margin-top: 1rem;
    }

    /* Mobile Dropdown */
    .dropdown-menu {
        position: static;
        box-shadow: none;
        border: 1px solid var(--border);
        background: #f8fafc;
        display: none;
        width: 100%;
        text-align: center;
    }

    .dropdown.show .dropdown-menu {
        display: block;
    }

    /* FORCE HIDE DESKTOP NAV ON MOBILE */
    .navbar {
        display: none !important;
    }
}

/* FORCE HIDE MOBILE NAV ON DESKTOP */
@media (min-width: 992px) {
    .mobile-header {
        display: none !important;
    }
}

/* --- Advanced Mobile Nav & Sidebar --- */

.mobile-header {
    background: white;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1020;
}

.mobile-toggle {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-primary);
    padding: 0.5rem;
    cursor: pointer;
}

.mobile-icon {
    font-size: 1.3rem;
    color: var(--text-secondary);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.mobile-icon:hover {
    background: var(--bg-color);
    color: var(--accent);
}

.mobile-login-btn {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--accent);
    padding: 0.5rem 1rem;
    border: 1px solid var(--accent);
    border-radius: 50px;
}

/* Sidebar */
.mobile-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 280px;
    background: white;
    box-shadow: 5px 0 25px rgba(0, 0, 0, 0.1);
    z-index: 1050;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.mobile-sidebar.active {
    transform: translateX(0);
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close-sidebar {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--text-secondary);
    cursor: pointer;
}

.sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.sidebar-section {
    margin-bottom: 2rem;
}

.sidebar-title {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--text-secondary);
    letter-spacing: 1px;
    margin-bottom: 1rem;
    font-weight: 700;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: var(--text-primary);
    font-weight: 600;
    padding: 0.8rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.sidebar-link i {
    color: var(--accent);
    font-size: 1.1rem;
    width: 20px;
}

.sidebar-sublink {
    display: block;
    padding: 0.6rem 0 0.6rem 2.2rem;
    color: #64748b;
    font-size: 0.95rem;
}

.sidebar-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1040;
    display: none;
    opacity: 0;
    transition: opacity 0.3s;
}

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

/* User Action Popover Styles Reuse */
.icon-btn {
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 0.5rem;
    display: flex;
    align-items: center;
}

.badge-dot {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
}

.notif-dropdown,
.user-dropdown {
    position: absolute;
    right: 0;
    top: 100%;
    width: 300px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.user-header {
    padding: 1rem;
    background: #f8fafc;
    border-bottom: 1px solid var(--border);
}

.user-dropdown a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1rem;
    color: var(--text-primary);
}

.user-dropdown a:hover {
    background: #f1f5f9;
}

.btn-user-dropdown {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: white;
    border: 1px solid var(--border);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    transition: all 0.2s;
}

.btn-user-dropdown:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* --- Precise Notification Styles --- */
.notif-dropdown,
.user-dropdown {
    top: calc(100% + 12px);
    /* Offset for breathing room */
    border: 1px solid rgba(0, 0, 0, 0.08);
    /* Softer border */
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
    /* Softer shadow */
    border-radius: 16px;
    /* rounder */
    padding: 0;
    overflow: hidden;
    display: none;
    flex-direction: column;
}

.notif-header {
    background: #ffffff;
    padding: 1rem 1.2rem;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notif-header h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.notif-header button {
    background: none;
    border: none;
    color: var(--accent);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
}

.notif-list {
    max-height: 350px;
    overflow-y: auto;
}

.notif-item {
    padding: 1rem 1.2rem;
    border-bottom: 1px solid #f8fafc;
    background: #fff;
    cursor: pointer;
    transition: background 0.2s;
}

.notif-item:hover {
    background: #fdfdfc;
}

.notif-item:last-child {
    border-bottom: none;
}

.notif-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.3rem;
}

.notif-title {
    font-size: 0.95rem;
    color: var(--text-primary);
    font-weight: 600;
}

.notif-time {
    font-size: 0.75rem;
    color: #94a3b8;
    white-space: nowrap;
    margin-left: 0.5rem;
}

.notif-msg {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Toast Modern */
#toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    /* Let clicks pass through if empty area */
}

.toast-alert {
    pointer-events: auto;
    background: white;
    border-left: 4px solid var(--accent);
    padding: 1rem 1.2rem;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    min-width: 320px;
    max-width: 400px;
    animation: slideInRight 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.toast-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-primary);
    margin-bottom: 0.2rem;
}

.toast-msg {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}