/**
 * Plusly - Premium Stylesheet
 * "Super Premium" Theme
 */

/* =====================================================
   CSS VARIABLES / DESIGN TOKENS
===================================================== */
:root {
    /* Primary Colors - Deep Midnight Blue (Trust, Luxury, Depth) */
    --color-primary: #0a192f;
    /* Very dark navy */
    --color-primary-light: #172a45;
    /* Lighter navy for hover/cards */
    --color-primary-dark: #020c1b;
    /* Almost black */

    /* Secondary Colors - Champagne Gold (Premium Accents) */
    --color-secondary: #d4af37;
    /* Classic Gold */
    --color-secondary-light: #f3e5ab;
    /* Champagne/Pale Gold */
    --color-secondary-dark: #aa8c2c;
    /* Darker Gold */

    /* Accent Colors - Emerald (Success/Growth) */
    --color-accent: #64ffda;
    /* Bright Teal/Emerald */
    --color-accent-light: #edfffc;
    --color-accent-dark: #235c4d;

    /* Neutral Colors - Modern & Clean */
    --color-white: #ffffff;
    --color-off-white: #f8f9fa;
    /* Main background */
    --color-gray-100: #e6f1ff;
    /* Very light blue-gray */
    --color-gray-200: #ccd6f6;
    /* Light blue-gray */
    --color-gray-300: #a8b2d1;
    /* Muted text */
    --color-gray-400: #8892b0;
    /* Darker muted text */
    --color-gray-500: #495670;
    --color-gray-600: #233554;
    --color-gray-700: #112240;
    --color-gray-800: #0a192f;
    --color-gray-900: #020c1b;

    /* Text Colors */
    --color-text: #1d1d1f;
    /* Almost black for readability on white */
    --color-text-light: #52525b;
    /* Muted gray for secondary text */
    --color-text-white: #e6f1ff;
    /* Text on dark backgrounds */

    /* Status Colors */
    --color-success: #10b981;
    --color-success-bg: #d1fae5;
    --color-warning: #f59e0b;
    --color-warning-bg: #fef3c7;
    --color-error: #ef4444;
    --color-error-bg: #fee2e2;
    --color-info: #3b82f6;
    --color-info-bg: #dbeafe;

    /* Typography */
    --font-heading: 'Plus Jakarta Sans', sans-serif;
    --font-body: 'Inter', sans-serif;

    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 2rem;
    --font-size-4xl: 2.5rem;
    --font-size-5xl: 3.5rem;

    --font-weight-regular: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    --font-weight-extrabold: 800;

    /* Spacing & Layout */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;

    --container-max: 1280px;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Effects */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);

    --sidebar-bg: var(--color-primary);
    /* Default sidebar is Primary (Navy) */

    /* Animations & Transitions - specific props for performance */
    --transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease, transform 0.2s ease;

    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: 1px solid rgba(255, 255, 255, 0.5);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
    --backdrop-blur: blur(12px);
}

[data-theme="dark"] {
    /* Revert to Gold accent but lighter for visibility on dark bg */
    --color-primary: #f0c451;
    --color-primary-light: #172a45;
    /* Keep dark navy for backgrounds */
    --color-primary-dark: #020c1b;

    --color-white: #112240;
    /* Card bg */
    --color-off-white: #0a192f;
    /* Body bg */
    --color-gray-100: #172a45;
    --color-gray-200: #233554;

    --color-text: #e6f1ff;
    --color-text-light: #8892b0;

    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.2);

    /* Override accent to match Gold */
    --color-accent: #f0c451;

    /* Dedicated Sidebar Background for Dark Mode */
    --sidebar-bg: var(--color-off-white);

    /* Invert specific component colors for dark mode context */
    --glass-bg: rgba(10, 25, 47, 0.85);
    --glass-border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .text-muted {
    color: var(--color-text-light) !important;
}

[data-theme="dark"] .text-secondary {
    color: var(--color-accent) !important;
}

[data-theme="dark"] .form-label {
    color: var(--color-text);
}

[data-theme="dark"] .form-input,
[data-theme="dark"] .form-select,
[data-theme="dark"] .form-textarea {
    color: var(--color-text);
    background-color: var(--color-gray-100);
    border-color: var(--color-gray-200);
}

[data-theme="dark"] select option,
[data-theme="dark"] .form-select option {
    background-color: var(--color-white);
    color: var(--color-text);
}

[data-theme="dark"] .form-help {
    color: var(--color-text-light);
}

[data-theme="dark"] .form-checkbox,
[data-theme="dark"] .form-radio {
    color: var(--color-text);
}

/* =====================================================
   RESET & BASE
===================================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-off-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: var(--font-weight-bold);
    color: var(--color-primary);
    line-height: 1.2;
    margin-bottom: var(--space-4);
    letter-spacing: -0.02em;
}

h1 {
    font-size: var(--font-size-4xl);
    font-weight: var(--font-weight-extrabold);
}

h2 {
    font-size: var(--font-size-3xl);
}

h3 {
    font-size: var(--font-size-2xl);
}

h4 {
    font-size: var(--font-size-xl);
}

h5 {
    font-size: var(--font-size-lg);
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--color-secondary);
}

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-6);
}

/* =====================================================
   UTILITIES
===================================================== */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-sm {
    font-size: var(--font-size-sm);
}

.text-xs {
    font-size: var(--font-size-xs);
}

.text-muted {
    color: var(--color-text-light);
}

.text-primary {
    color: var(--color-primary);
}

.text-secondary {
    color: var(--color-secondary);
}

.text-success {
    color: var(--color-success);
}

.text-error {
    color: var(--color-error);
}

.text-warning {
    color: var(--color-warning);
}

.font-bold {
    font-weight: var(--font-weight-bold);
}

.font-medium {
    font-weight: var(--font-weight-medium);
}

.mb-2 {
    margin-bottom: var(--space-2);
}

.mb-4 {
    margin-bottom: var(--space-4);
}

.mb-6 {
    margin-bottom: var(--space-6);
}

.mb-8 {
    margin-bottom: var(--space-8);
}

.mt-2 {
    margin-top: var(--space-2);
}

.mt-4 {
    margin-top: var(--space-4);
}

.mt-8 {
    margin-top: var(--space-8);
}

.d-block {
    display: block;
}

.d-flex {
    display: flex;
}

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

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

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

.gap-2 {
    gap: var(--space-2);
}

.gap-4 {
    gap: var(--space-4);
}

.grid {
    display: grid;
    gap: var(--space-6);
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1024px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    h1 {
        font-size: var(--font-size-3xl);
    }
}

/* =====================================================
   COMPONENTS: BUTTONS
===================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    font-family: var(--font-heading);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    border-radius: var(--radius-full);
    /* Pill shape */
    transition: var(--transition);
    cursor: pointer;
    border: none;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary-light) 0%, var(--color-primary) 100%);
    color: var(--color-white);
    box-shadow: 0 4px 15px rgba(10, 25, 47, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(10, 25, 47, 0.4);
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
}

.btn-secondary {
    background: linear-gradient(135deg, #e8c97a 0%, #aa8c2c 100%);
    color: var(--color-white);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.4);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
}

.btn-outline:hover {
    background: var(--color-primary);
    color: var(--color-white);
}

.btn-ghost {
    background: transparent;
    color: var(--color-primary);
}

.btn-ghost:hover {
    background: rgba(10, 25, 47, 0.05);
}

.btn-sm {
    padding: 0.5rem 1.25rem;
    font-size: 0.8rem;
}

.btn-block {
    width: 100%;
}

/* =====================================================
   COMPONENTS: CARDS
===================================================== */
.card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.card-header {
    padding: var(--space-6);
    border-bottom: 1px solid var(--color-off-white);
    background: var(--color-white);
}

.card-body {
    padding: var(--space-6);
}

.card-footer {
    padding: var(--space-4) var(--space-6);
    background: var(--color-off-white);
    border-top: 1px solid rgba(0, 0, 0, 0.03);
}

/* Glassmorphism Card Variant */
.card-glass {
    background: var(--glass-bg);
    backdrop-filter: var(--backdrop-blur);
    border: var(--glass-border);
    box-shadow: var(--glass-shadow);
}

/* =====================================================
   COMPONENTS: FORMS
===================================================== */
.form-group {
    margin-bottom: var(--space-5);
}

.form-label {
    display: block;
    margin-bottom: var(--space-2);
    font-weight: var(--font-weight-semibold);
    color: var(--color-gray-700);
    font-size: var(--font-size-sm);
}

.form-label.required::after {
    content: "*";
    color: var(--color-error);
    margin-left: 2px;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    font-family: var(--font-body);
    font-size: var(--font-size-base);
    border: 1px solid var(--color-gray-300);
    border-radius: var(--radius-md);
    background: var(--color-white);
    transition: var(--transition);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(10, 25, 47, 0.1);
}

/* =====================================================
   COMPONENTS: ALERTS & BADGES
===================================================== */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert-info {
    background: var(--color-info-bg);
    color: #1e40af;
    border-left: 4px solid var(--color-info);
}

.alert-success {
    background: var(--color-success-bg);
    color: #065f46;
    border-left: 4px solid var(--color-success);
}

.alert-warning {
    background: var(--color-warning-bg);
    color: #92400e;
    border-left: 4px solid var(--color-warning);
}

.alert-error {
    background: var(--color-error-bg);
    color: #991b1b;
    border-left: 4px solid var(--color-error);
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-success {
    background: var(--color-success-bg);
    color: var(--color-success);
}

.badge-warning {
    background: var(--color-warning-bg);
    color: var(--color-warning);
}

.badge-error {
    background: var(--color-error-bg);
    color: var(--color-error);
}

/* =====================================================
   HEADER (Glassmorphism)
===================================================== */
.header {
    background: var(--color-white);
    /* Removed backdrop-filter for better performance */
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: var(--space-4) 0;
}

.nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

button.dashboard-nav-link {
    width: 100%;
    background: transparent;
    border: none;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    font-size: inherit;
    color: inherit;
}

/* Minimal Header for Dashboard */
.header-minimal {
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom: none;
    position: absolute;
}

@media (min-width: 769px) {
    .header-minimal {
        display: none;
    }
}

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

.logo {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--color-primary);
    letter-spacing: -0.03em;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

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

.nav-link:hover,
.nav-link.active {
    color: var(--color-primary);
}

/* =====================================================
   SIDEBAR (Super Premium Dark Mode)
===================================================== */
/* Hide mobile-only elements on desktop */
.mobile-dashboard-header,
.mobile-menu-overlay {
    display: none;
}

.dashboard-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: calc(100vh - 80px);
}

.dashboard-sidebar {
    background: var(--sidebar-bg);
    color: var(--color-gray-300);
    padding: var(--space-8) var(--space-4);
    /* Changed from sticky to relative for performance */
    position: relative;
    min-height: calc(100vh - 80px);
    overflow-y: auto;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

/* Sidebar Logo - Original colors used in both modes for performance */
.sidebar-logo {
    transition: filter 0.3s ease;
}

[data-theme="dark"] .sidebar-logo {
    /* Force White as requested by user */
    filter: brightness(0) invert(1);
}

/* Sidebar Brand Text */
.sidebar-brand-text {
    color: #fff !important;
    /* Always white for visibility on navy sidebar */
    font-family: var(--font-heading);
    letter-spacing: -0.03em;
}

.sidebar-logo-link {
    text-decoration: none;
}

.dashboard-nav {
    list-style: none;
}

.dashboard-nav-item {
    margin-bottom: var(--space-2);
}

.dashboard-nav-link {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding: 0.75rem 1rem;
    color: var(--color-gray-300);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: var(--transition);
    font-weight: 500;
}

.dashboard-nav-link:hover {
    color: var(--color-white);
    background: rgba(255, 255, 255, 0.05);
    transform: translateX(4px);
}

.dashboard-nav-link.active {
    background: linear-gradient(90deg, rgba(212, 175, 55, 0.15) 0%, rgba(10, 25, 47, 0) 100%);
    color: var(--color-secondary);
    border-left: 3px solid var(--color-secondary);
}

.dashboard-nav-link.active i {
    color: var(--color-secondary);
}

/* Premium Card in Sidebar */
.card-premium {
    background: linear-gradient(135deg, #172a45 0%, #112240 100%);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-top: 2rem;
    position: relative;
    overflow: hidden;
}

.card-premium::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.1) 0%, transparent 70%);
    /* Removed infinite animation for performance */
}

/* Referral Intro Card */
.card-referral-intro {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: white;
}

[data-theme="dark"] .card-referral-intro {
    /* Dark Mode: Use Dark Gradient (Navy to Black) so Gold Text pops */
    background: linear-gradient(135deg, #172a45 0%, #020c1b 100%);
    border: 1px solid rgba(240, 196, 81, 0.3);
    /* Subtle Gold Border */
}

/* Referral Steps Icons */
.referral-step-icon {
    width: 64px;
    height: 64px;
    background: var(--color-primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    /* Default (Light Mode): Use Gold (#f0c451) for icon to prevent being "too dark" */
    color: #f0c451;
    font-size: 32px;
}

[data-theme="dark"] .referral-step-icon {
    background: rgba(240, 196, 81, 0.1);
    /* Gold tint background */
    color: #f0c451;
    /* Keep Gold icon */
}

.card-premium h4 {
    color: var(--color-secondary);
    margin-bottom: 0.5rem;
    position: relative;
}

.card-premium p {
    color: var(--color-gray-300);
    font-size: 0.85rem;
    margin-bottom: 1rem;
    position: relative;
}

/* =====================================================
   DASHBOARD MAIN
===================================================== */
.dashboard-main {
    background: var(--color-off-white);
    padding: var(--space-8);
}

.dashboard-content {
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    height: 100%;
    /* For messages layout */
}

@media (max-width: 768px) {
    .dashboard-layout {
        display: block;
        padding-top: 60px;
        /* Space for mobile header */
    }

    .dashboard-sidebar {
        position: fixed;
        top: 0;
        left: -280px;
        /* Hidden off-screen */
        width: 280px;
        height: 100vh;
        z-index: 1001;
        transition: left 0.3s ease;
        padding-top: 70px;
        /* Below mobile header */
    }

    .dashboard-sidebar.is-open {
        left: 0;
    }

    /* Mobile Header */
    .mobile-dashboard-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: 60px;
        background: var(--sidebar-bg);
        padding: 0 var(--space-4);
        z-index: 1000;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .mobile-menu-toggle,
    .mobile-theme-toggle {
        background: transparent;
        border: none;
        color: #fff;
        font-size: 1.5rem;
        cursor: pointer;
        padding: var(--space-2);
    }

    .mobile-menu-toggle i,
    .mobile-theme-toggle i {
        color: #fff;
        display: block;
    }

    .mobile-brand {
        font-size: 1.25rem;
        font-weight: 800;
        color: #fff;
        text-decoration: none;
    }

    /* Mobile Menu Overlay */
    .mobile-menu-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
    }

    .mobile-menu-overlay.is-open {
        display: block;
    }
}

/* =====================================================
   UTILITY CLASSES FOR PHOTO GALLERY
===================================================== */
.photo-item {
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.photo-item:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-md);
}

.photo-item.is-primary {
    border: 3px solid var(--color-secondary);
}

.primary-badge {
    background: var(--color-secondary);
    color: var(--color-primary-dark);
    font-weight: bold;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
}

/* =====================================================
   ANIMATIONS
===================================================== */
@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* =====================================================
   MOBILE MENU
===================================================== */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--color-primary);
    cursor: pointer;
}

@media (max-width: 768px) {

    .header .nav {
        position: static;
    }

    .nav-links,
    .nav-actions {
        display: none;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .nav.open .nav-links {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--color-white);
        box-shadow: var(--shadow-lg);
        padding: var(--space-6);
        padding-bottom: var(--space-2);
        gap: var(--space-3);
        border: 1px solid var(--color-gray-200);
        border-bottom: none;
        border-radius: 0 0 0 0;
        z-index: 1001;
    }

    .nav.open .nav-links li {
        list-style: none;
    }

    .nav.open .nav-links .nav-link {
        display: block;
        padding: var(--space-3) var(--space-4);
        border-radius: var(--radius-md);
        font-size: var(--font-size-base);
    }

    .nav.open .nav-links .nav-link:hover {
        background: var(--color-gray-100);
    }

    .nav.open .nav-actions {
        display: flex;
        flex-direction: row;
        position: absolute;
        top: calc(100% + 198px);
        left: 0;
        right: 0;
        background: var(--color-white);
        padding: var(--space-4) var(--space-6);
        gap: var(--space-3);
        border: 1px solid var(--color-gray-200);
        border-top: 1px solid var(--color-gray-200);
        box-shadow: var(--shadow-lg);
        z-index: 1001;
        justify-content: center;
    }

    /* Stack both nav-links and nav-actions in a single dropdown container */
    .nav.open {
        position: static;
    }

    .header .header-inner {
        position: relative;
    }

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

    .hero {
        padding-top: 100px;
        padding-bottom: 60px;
    }
}

/* =====================================================
   UTILITIES
===================================================== */
.text-white {
    color: var(--color-white) !important;
}

.text-2xl {
    font-size: 1.5rem !important;
}

.font-bold {
    font-weight: 700 !important;
}

.h-full {
    height: 100%;
}

.flex {
    display: flex;
}

.flex-column {
    flex-direction: column;
}

.overflow-hidden {
    overflow: hidden;
}

/* =====================================================
   LANDING PAGE
===================================================== */
.feature-card {
    background: var(--color-white);
    padding: var(--space-6);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-gray-200);
    transition: var(--transition);
    height: 100%;
}

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-gold);
}

.feature-icon {
    font-size: 2.5rem;
    color: var(--color-primary);
    margin-bottom: var(--space-4);
    display: inline-block;
}

.feature-icon.text-secondary {
    color: var(--color-gold);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.05em;
    color: var(--color-primary);
}

/* =====================================================
   HERO SECTION
===================================================== */
.hero {
    padding-top: 160px;
    padding-bottom: 80px;
    text-align: center;
    background: radial-gradient(circle at top right, rgba(212, 175, 55, 0.1), transparent 40%),
        radial-gradient(circle at top left, rgba(10, 25, 47, 0.05), transparent 40%);
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: var(--space-4);
    letter-spacing: -0.03em;
    color: var(--color-primary);
    line-height: 1.1;
}

.hero-text {
    font-size: 1.25rem;
    color: var(--color-text-light);
    margin-bottom: var(--space-8);
    line-height: 1.6;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--color-gold);
    font-weight: 600;
    margin-bottom: var(--space-4);
}

/* =====================================================
   DASHBOARD HOME REVAMP
===================================================== */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--space-8);
}

@media (max-width: 900px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

/* Stat Cards */
.stat-card {
    background: var(--color-white);
    padding: var(--space-5);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-gray-200);
    display: flex;
    align-items: center;
    gap: var(--space-4);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--color-primary-light);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.bg-primary-light {
    background: rgba(10, 25, 47, 0.1);
}

.bg-gold-light {
    background: rgba(212, 175, 55, 0.1);
}

.bg-success-light {
    background: rgba(16, 185, 129, 0.1);
}

.text-gold {
    color: var(--color-secondary);
}

.text-success {
    color: #10b981;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1.2;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--color-text-light);
}

/* Match Cards Horizontal */
.match-card-horizontal {
    display: flex;
    align-items: center;
    background: var(--color-white);
    padding: var(--space-4);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-gray-200);
    margin-bottom: var(--space-4);
    transition: var(--transition);
    text-decoration: none;
    color: inherit;
}

.match-card-horizontal:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow-sm);
    border-color: var(--color-gold);
}

.match-avatar {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-right: var(--space-4);
    flex-shrink: 0;
}

.match-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.match-info {
    flex-grow: 1;
}

.match-action {
    opacity: 0;
    transition: var(--transition);
}

.match-card-horizontal:hover .match-action {
    opacity: 1;
    transform: translateX(4px);
}

/* Action Cards */
.quick-actions-grid {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.action-card {
    display: flex;
    align-items: center;
    background: var(--color-white);
    padding: var(--space-4);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-gray-200);
    text-decoration: none;
    color: var(--color-text);
    font-weight: 600;
    transition: var(--transition);
}

.action-card:hover {
    background: var(--color-gray-50);
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.action-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    background: var(--color-gray-100);
    color: var(--color-text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: var(--space-3);
    font-size: 1.25rem;
    transition: var(--transition);
}

.action-card:hover .action-icon {
    background: var(--color-primary);
    color: var(--color-white);
}

/* =====================================================
   CONNECTIONS & AVATARS
===================================================== */
.connection-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

.connection-avatar-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--color-gray-200);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
}

/* =====================================================
   MATCHES PAGE
===================================================== */
.match-card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--color-gray-200);
    display: flex;
    flex-direction: column;
}

.match-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-gold);
}

.match-photo-wrapper {
    position: relative;
    height: 240px;
    overflow: hidden;
}

.match-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.match-card:hover .match-photo {
    transform: scale(1.05);
}

.match-compatibility {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(10, 25, 47, 0.9);
    color: var(--color-secondary);
    padding: 6px 12px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 700;
    /* Removed backdrop-filter for performance */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.match-info {
    padding: var(--space-5);
    flex-grow: 1;
}

.match-info h3 {
    font-size: 1.1rem;
    color: var(--color-primary);
    margin-bottom: 0.25rem;
}

.match-info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.match-info-label {
    color: var(--color-text-light);
    display: flex;
    align-items: center;
    gap: 6px;
}

.match-info-value {
    font-weight: 600;
    color: var(--color-primary);
}

.match-actions {
    padding: var(--space-5);
    padding-top: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

/* =====================================================
   MESSAGES PAGE
===================================================== */
.messages-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    background: var(--color-white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-gray-200);
    overflow: hidden;
    height: calc(100vh - 180px);
    /* Fill remaining height */
    box-shadow: var(--shadow-md);
}

.messages-sidebar {
    border-right: 1px solid var(--color-gray-200);
    background: var(--color-off-white);
    display: flex;
    flex-direction: column;
}

.messages-list {
    overflow-y: auto;
    flex-grow: 1;
}

.conversation-item {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-4);
    cursor: pointer;
    transition: var(--transition);
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
    text-decoration: none;
    color: inherit;
}

.conversation-item:hover {
    background: rgba(255, 255, 255, 0.5);
}

.conversation-item.active {
    background: var(--color-white);
    border-left: 4px solid var(--color-primary);
}

.conversation-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: var(--shadow-xs);
}

.conversation-info {
    flex-grow: 1;
    min-width: 0;
    /* Text truncation fix */
}

.conversation-name {
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 2px;
    display: flex;
    justify-content: space-between;
}

.conversation-preview {
    font-size: 0.85rem;
    color: var(--color-text-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.conversation-item.active .conversation-preview {
    color: var(--color-primary);
    font-weight: 500;
}

.messages-main {
    display: flex;
    flex-direction: column;
    background: #fff;
    position: relative;
}

.messages-header {
    padding: var(--space-4);
    border-bottom: 1px solid var(--color-gray-200);
    background: rgba(255, 255, 255, 0.9);
    /* Removed backdrop-filter for performance */
    z-index: 10;
}

.messages-body {
    flex-grow: 1;
    overflow-y: auto;
    padding: var(--space-6);
    background: #f8f9fa;
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.message {
    display: flex;
    flex-direction: column;
    max-width: 70%;
}

.message.sent {
    align-self: flex-end;
    align-items: flex-end;
}

.message.received {
    align-self: flex-start;
    align-items: flex-start;
}

.message-bubble {
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 0.95rem;
    line-height: 1.5;
    position: relative;
    word-wrap: break-word;
}

.message.sent .message-bubble {
    background: var(--color-primary);
    color: white;
    border-bottom-right-radius: 4px;
    box-shadow: 0 2px 5px rgba(10, 25, 47, 0.2);
}

.message.received .message-bubble {
    background: white;
    color: var(--color-primary);
    border-bottom-left-radius: 4px;
    border: 1px solid var(--color-gray-200);
    box-shadow: var(--shadow-sm);
}

.message-time {
    font-size: 0.7rem;
    color: var(--color-text-light);
    margin-top: 4px;
    padding: 0 4px;
}

.messages-footer {
    padding: var(--space-4);
    background: white;
    border-top: 1px solid var(--color-gray-200);
    display: flex;
    gap: var(--space-3);
    align-items: center;
}

@media (max-width: 768px) {
    .messages-layout {
        grid-template-columns: 1fr;
        height: auto;
    }

    /* Mobile messages layout: show conversation list by default */
    .messages-sidebar {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 60px;
        /* Below mobile header */
        left: 0;
        right: 0;
        bottom: 0;
        height: calc(100vh - 60px);
        z-index: 50;
        background: var(--color-white);
    }

    /* Hide sidebar when viewing a conversation */
    .messages-container.has-active-chat .messages-sidebar {
        display: none;
    }

    /* Show main chat only when a conversation is active */
    .messages-main {
        display: none;
    }

    .messages-container.has-active-chat .messages-main {
        display: flex;
        flex-direction: column;
        height: calc(100vh - 120px);
    }

    /* Mobile back button to return to conversation list */
    .mobile-back-btn {
        display: flex !important;
        /* Force show on mobile */
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        background: var(--color-gray-100);
        margin-right: var(--space-3);
        color: var(--color-text);
        transition: background 0.2s;
    }

    .mobile-back-btn:hover {
        background: var(--color-gray-200);
    }
}

/* =====================================================
   COMPONENTS: MODAL
===================================================== */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: var(--space-4);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-backdrop.open {
    display: flex;
    opacity: 1;
}

.modal {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal-backdrop.open .modal {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-4) var(--space-6);
    border-bottom: 1px solid var(--color-gray-200);
}

.modal-header h3 {
    margin: 0;
    font-size: var(--font-size-lg);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--color-text-light);
    transition: color 0.2s;
}

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

.modal-body {
    padding: var(--space-6);
}

.modal-footer {
    padding: var(--space-4) var(--space-6);
    background: var(--color-gray-100);
    border-top: 1px solid var(--color-gray-200);
    display: flex;
    justify-content: flex-end;
    gap: var(--space-3);
    border-bottom-left-radius: var(--radius-lg);
    border-bottom-right-radius: var(--radius-lg);
}

/* Dark mode overrides for modal */
[data-theme="dark"] .modal {
    background: var(--color-off-white);
    border: 1px solid var(--glass-border);
}

[data-theme="dark"] .modal-header {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .modal-footer {
    background: rgba(0, 0, 0, 0.2);
    border-top-color: rgba(255, 255, 255, 0.1);
}

/* =====================================================
   SECTION & CONTAINER UTILITIES
===================================================== */
.section {
    padding: var(--space-16) 0;
}

.container-narrow {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 var(--space-6);
}

.bg-light {
    background: var(--color-gray-100);
}

.btn-lg {
    padding: 0.875rem 2rem;
    font-size: var(--font-size-base);
}

.text-lg {
    font-size: var(--font-size-lg);
}

.mt-6 {
    margin-top: var(--space-6);
}

.mb-0 {
    margin-bottom: 0 !important;
}

.gap-6 {
    gap: var(--space-6);
}

.gap-8 {
    gap: var(--space-8);
}

/* =====================================================
   FOOTER
===================================================== */
.footer {
    background: var(--color-primary);
    color: var(--color-gray-300);
    padding: var(--space-12) 0 var(--space-6);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--space-8);
    margin-bottom: var(--space-8);
}

.footer-brand {
    flex-shrink: 0;
}

.footer .logo {
    color: var(--color-white);
    font-size: 1.5rem;
    margin-bottom: var(--space-2);
    display: inline-block;
}

.footer-tagline {
    color: var(--color-gray-300);
    font-size: var(--font-size-sm);
    margin-top: var(--space-2);
}

.footer-links {
    display: flex;
    gap: var(--space-12);
}

.footer-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links ul li {
    margin-bottom: var(--space-3);
}

.footer-links a {
    color: var(--color-gray-300);
    font-size: var(--font-size-sm);
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--color-secondary);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: var(--space-6);
    text-align: center;
}

.footer-bottom p {
    color: var(--color-gray-400);
    font-size: var(--font-size-xs);
    margin: 0;
}

@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .footer-links {
        flex-direction: column;
        gap: var(--space-6);
        align-items: center;
    }
}

/* =====================================================
   FAQ ACCORDION
===================================================== */
.faq-section {
    margin-bottom: var(--space-8);
}

.faq-section h3 {
    font-size: var(--font-size-xl);
    color: var(--color-primary);
    margin-bottom: var(--space-4);
    padding-bottom: var(--space-2);
    border-bottom: 2px solid var(--color-secondary);
    display: inline-block;
}

.faq-item {
    background: var(--color-white);
    border: 1px solid var(--color-gray-200);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-3);
    overflow: hidden;
    transition: var(--transition);
}

.faq-item:hover {
    border-color: var(--color-secondary);
    box-shadow: var(--shadow-sm);
}

.faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-4) var(--space-5);
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: var(--font-heading);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-semibold);
    color: var(--color-text);
    text-align: left;
    line-height: 1.4;
    transition: var(--transition);
}

.faq-question:hover {
    color: var(--color-primary);
}

.faq-question::after {
    content: '\002B';
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--color-secondary);
    margin-left: var(--space-4);
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.faq-item.open .faq-question::after {
    content: '\2212';
    transform: rotate(180deg);
}

.faq-item.open .faq-question {
    color: var(--color-primary);
    border-bottom: 1px solid var(--color-gray-200);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, padding 0.35s ease;
}

.faq-item.open .faq-answer {
    max-height: 500px;
}

.faq-answer-inner {
    padding: var(--space-4) var(--space-5);
    color: var(--color-text-light);
    line-height: 1.7;
    font-size: var(--font-size-sm);
}

.faq-answer-inner p {
    margin: 0;
}

/* =====================================================
   PRICING CARDS
===================================================== */
.pricing-card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-gray-200);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
}

.pricing-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.pricing-card.featured {
    border-color: var(--color-secondary);
    box-shadow: 0 8px 30px rgba(212, 175, 55, 0.15);
}

.pricing-header {
    padding: var(--space-5) var(--space-6);
    background: var(--color-primary);
    color: var(--color-white);
}

.pricing-header h3 {
    color: inherit;
    margin: 0;
    font-size: var(--font-size-xl);
}

.pricing-body {
    padding: var(--space-6);
    flex-grow: 1;
}

.price {
    font-family: var(--font-heading);
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-bold);
    color: var(--color-primary);
    margin-bottom: var(--space-1);
}

.price .currency {
    font-size: var(--font-size-lg);
    vertical-align: super;
    font-weight: var(--font-weight-semibold);
}

.price-description {
    font-size: var(--font-size-sm);
    color: var(--color-text-light);
    margin-bottom: var(--space-4);
}

.pricing-features {
    list-style: none;
    padding: 0;
    margin: 0 0 var(--space-4);
}

.pricing-features li {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) 0;
    font-size: var(--font-size-sm);
    color: var(--color-text);
}

.pricing-features .check {
    color: var(--color-success);
    font-weight: var(--font-weight-bold);
    flex-shrink: 0;
}

.pricing-total {
    padding: var(--space-5) var(--space-6);
    background: var(--color-gray-100);
    border-top: 1px solid var(--color-gray-200);
}

.pricing-total h4 {
    font-size: var(--font-size-sm);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-light);
}

.pricing-total .price {
    font-size: var(--font-size-xl);
}

/* =====================================================
   CONTACT FORM FIX
===================================================== */
/* Override .card-premium when used as a form container (not sidebar) */
.section .card-premium {
    background: var(--color-white);
    border: 1px solid var(--color-gray-200);
    color: var(--color-text);
}

.section .card-premium::before {
    display: none;
}

.section .card-premium .form-label {
    color: var(--color-gray-700);
}

.section .card-premium .form-input,
.section .card-premium .form-select,
.section .card-premium .form-textarea {
    background: var(--color-off-white);
    color: var(--color-text);
    border-color: var(--color-gray-300);
}

/* =====================================================
   FORM CHECKBOX
===================================================== */
.form-checkbox {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    cursor: pointer;
    font-size: var(--font-size-sm);
}

.form-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--color-primary);
    cursor: pointer;
}

/* =====================================================
   SUCCESS-LIGHT BG
===================================================== */
.color-success-light {
    background: var(--color-success-bg);
}

/* =====================================================
   DARK MODE OVERRIDES FOR NEW STYLES
===================================================== */
[data-theme="dark"] .footer {
    background: #020c1b;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .footer .logo {
    color: var(--color-accent);
}

[data-theme="dark"] .footer-links a {
    color: var(--color-gray-300);
}

[data-theme="dark"] .footer-links a:hover {
    color: var(--color-accent);
}

[data-theme="dark"] .faq-item {
    background: var(--color-white);
    border-color: var(--color-gray-200);
}

[data-theme="dark"] .faq-question {
    color: var(--color-text);
}

[data-theme="dark"] .faq-item.open .faq-question {
    border-bottom-color: var(--color-gray-200);
}

[data-theme="dark"] .faq-answer-inner {
    color: var(--color-text-light);
}

[data-theme="dark"] .pricing-card {
    background: var(--color-white);
    border-color: var(--color-gray-200);
}

[data-theme="dark"] .pricing-header {
    background: var(--color-primary-light);
}

[data-theme="dark"] .pricing-total {
    background: var(--color-gray-100);
    border-top-color: var(--color-gray-200);
}

[data-theme="dark"] .section .card-premium {
    background: var(--color-white);
    border-color: var(--color-gray-200);
}

[data-theme="dark"] .section .card-premium .form-label {
    color: var(--color-text);
}

[data-theme="dark"] .section .card-premium .form-input,
[data-theme="dark"] .section .card-premium .form-select,
[data-theme="dark"] .section .card-premium .form-textarea {
    background: var(--color-gray-100);
    color: var(--color-text);
    border-color: var(--color-gray-200);
}

/* Dark mode mobile menu */
[data-theme="dark"] .nav.open .nav-links,
[data-theme="dark"] .nav.open .nav-actions {
    background: var(--color-off-white);
    border-color: var(--color-gray-200);
}

[data-theme="dark"] .nav.open .nav-links .nav-link:hover {
    background: var(--color-gray-100);
}

/* Badge secondary */
.badge-secondary {
    background: rgba(212, 175, 55, 0.15);
    color: var(--color-secondary);
}

/* Spinner */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: rotate 0.6s linear infinite;
    vertical-align: middle;
    margin-right: var(--space-2);
}

/* Hidden utility */
.hidden {
    display: none !important;
}

/* =====================================================
   ANTI-SCREENSHOT PROTECTION
===================================================== */

/* Privacy banner at top of chat */
.privacy-banner {
    background: linear-gradient(135deg, var(--color-primary) 0%, #1a365d 100%);
    color: rgba(255, 255, 255, 0.9);
    padding: 8px 16px;
    font-size: var(--font-size-xs);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.privacy-banner i {
    font-size: 14px;
    color: var(--color-secondary);
}

/* No-select utility for message bubbles */
.no-select {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

/* Invisible watermark on each message */
.watermark {
    position: absolute;
    bottom: 1px;
    right: 1px;
    font-size: 6px;
    opacity: 0.03;
    color: inherit;
    pointer-events: none;
    user-select: none;
    letter-spacing: -0.5px;
}

/* Screenshot warning overlay */
.screenshot-warning-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: var(--space-4);
}

.screenshot-warning-overlay.active {
    display: flex;
}

.warning-modal {
    background: var(--color-white);
    padding: var(--space-8) var(--space-10);
    border-radius: var(--radius-lg);
    text-align: center;
    max-width: 460px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.warning-icon {
    font-size: 56px;
    margin-bottom: var(--space-4);
    line-height: 1;
}

.warning-modal h2 {
    color: var(--color-error);
    font-size: var(--font-size-xl);
    margin-bottom: var(--space-4);
}

.warning-modal p {
    margin-bottom: var(--space-3);
    color: var(--color-text);
    font-size: var(--font-size-sm);
    line-height: 1.6;
}

.warning-modal .btn {
    margin-top: var(--space-4);
    min-width: 160px;
}

/* Dark mode overrides */
[data-theme="dark"] .privacy-banner {
    background: linear-gradient(135deg, #020c1b 0%, #0a192f 100%);
}

[data-theme="dark"] .warning-modal {
    background: var(--color-off-white);
    border: 1px solid var(--color-gray-200);
}

[data-theme="dark"] .warning-modal h2 {
    color: #ff6b6b;
}

[data-theme="dark"] .warning-modal p {
    color: var(--color-text);
}

/* =====================================================
   MOBILE NAVIGATION TOGGLE VISIBILITY & CONTRAST FIX
===================================================== */
.header .mobile-menu-toggle {
    display: none;
    background: transparent;
    border: none;
    font-size: 1.75rem;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: var(--radius-md);
    color: var(--color-primary) !important;
}

.header .mobile-menu-toggle i {
    color: var(--color-primary) !important;
}

[data-theme="dark"] .header .mobile-menu-toggle,
[data-theme="dark"] .header .mobile-menu-toggle i {
    color: var(--color-secondary) !important;
}

@media (max-width: 768px) {
    .header .mobile-menu-toggle {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
    }
}

/* =====================================================
   MOBILE BOTTOM NAVIGATION BAR (NATIVE APP FEEL)
===================================================== */
.mobile-bottom-bar {
    display: none;
}

@media (max-width: 768px) {
    .mobile-bottom-bar {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 65px;
        background: #ffffff;
        border-top: 1px solid rgba(0, 0, 0, 0.08);
        box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
        z-index: 1050;
        justify-content: space-around;
        align-items: center;
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }

    [data-theme="dark"] .mobile-bottom-bar {
        background: #0a192f;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
    }

    .mobile-bottom-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        color: #8892b0;
        text-decoration: none;
        font-size: 0.72rem;
        font-weight: 600;
        flex: 1;
        height: 100%;
        gap: 3px;
        transition: color 0.2s ease, transform 0.2s ease;
    }

    .mobile-bottom-item i {
        font-size: 1.4rem;
    }

    .mobile-bottom-item.active {
        color: var(--color-secondary);
    }

    .mobile-bottom-item.active i {
        color: var(--color-secondary);
        transform: scale(1.15);
    }

    /* Padding to prevent mobile bottom bar overlapping main content */
    .dashboard-layout,
    .dashboard-main {
        padding-bottom: 80px !important;
    }

    /* App Touch Optimization & Smooth Feel */
    button, input, select, textarea, .btn {
        touch-action: manipulation;
    }

    .btn {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .card {
        border-radius: var(--radius-lg);
    }

    /* Admin Mobile Responsiveness & Fluid Adaptations */
    .table-responsive,
    div:has(> table) {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin-bottom: 1rem;
    }

    .dashboard-main {
        padding: 1rem !important;
    }

    .flex-between {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr !important;
    }
}