/* ============================================================
   💙 Blue Raven — Artistic Design System
   Made with love for a painter's soul 🎨
   ============================================================ */

/* ============================================================
   Shared variables (all themes)
   ============================================================ */
:root {
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 18px;
    --radius-xl: 24px;
    --radius-full: 999px;
    --transition: 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================================
   Theme: Blue Sky (default light)
   ============================================================ */
[data-theme="light"] {
    --primary: #2563EB;
    --primary-light: #60A5FA;
    --primary-dark: #1D4ED8;
    --primary-bg: #DBEAFE;
    --accent: #0284C7;
    --accent-light: #38BDF8;
    --accent-bg: #E0F2FE;
    --deep-blue: #1E40AF;
    --sky: #0EA5E9;
    --sky-bg: #BAE6FD;
    --watercolor-1: #BFDBFE;
    --watercolor-2: #93C5FD;
    --watercolor-3: #DBEAFE;
    --paint-blue: #3B82F6;
    --paint-sky: #0EA5E9;
    --paint-soft: #60A5FA;
    --success: #059669;
    --success-bg: #D1FAE5;
    --warning: #F59E0B;
    --warning-bg: #FEF3C7;
    --danger: #EF4444;
    --danger-bg: #FEE2E2;
    --info: #0284C7;
    --info-bg: #DBEAFE;
    --bg: #E2E8F0;
    --bg-warm: #F5F0E8;
    --surface: #F8FAFC;
    --surface-alt: #EFF3F8;
    --text: #1E293B;
    --text-secondary: #64748B;
    --text-muted: #94A3B8;
    --border: #CBD5E1;
    --border-light: #E2E8F0;
    --shadow-sm: 0 1px 2px rgba(30,64,175,0.06);
    --shadow: 0 1px 3px rgba(30,64,175,0.08), 0 1px 2px rgba(30,64,175,0.04);
    --shadow-md: 0 4px 6px rgba(30,64,175,0.07), 0 2px 4px rgba(30,64,175,0.04);
    --shadow-lg: 0 10px 25px rgba(30,64,175,0.10), 0 4px 8px rgba(30,64,175,0.05);
    --shadow-xl: 0 20px 40px rgba(30,64,175,0.12), 0 10px 15px rgba(30,64,175,0.05);
    --shadow-glow: 0 0 30px rgba(37,99,235,0.12);
    --navbar-bg: rgba(255,255,255,0.92);
    --sidebar-bg: rgba(255,255,255,0.85);
    --card-bg: #FFFFFF;
    --glass-bg: rgba(255,255,255,0.9);
    --gradient-body-1: #BFDBFE;
    --gradient-body-2: #DBEAFE;
    --gradient-body-3: #E2E8F0;
    --gradient-login-1: #93C5FD;
    --gradient-login-2: #60A5FA;
    --gradient-login-3: #BFDBFE;
    --gradient-login-4: #E2E8F0;
    --gradient-login-5: #BFDBFE;
    --gradient-login-6: #93C5FD;
    --gradient-hero-1: rgba(147,197,253,0.7);
    --gradient-hero-2: rgba(96,165,250,0.5);
    --gradient-hero-3: rgba(191,219,254,0.6);
    --gradient-hero-4: #DBEAFE;
    --gradient-hero-5: #BFDBFE;
    --gradient-hero-6: #93C5FD;
}

/* ============================================================
   Theme: Midnight Raven (dark mode) 🖤💙
   ============================================================ */
[data-theme="dark"] {
    --primary: #60A5FA;
    --primary-light: #93C5FD;
    --primary-dark: #3B82F6;
    --primary-bg: #2D3A50;
    --accent: #38BDF8;
    --accent-light: #7DD3FC;
    --accent-bg: #1C2436;
    --deep-blue: #93C5FD;
    --sky: #38BDF8;
    --sky-bg: #2D3A50;
    --watercolor-1: #2D3A50;
    --watercolor-2: #2D4E78;
    --watercolor-3: #28365A;
    --paint-blue: #60A5FA;
    --paint-sky: #38BDF8;
    --paint-soft: #4B82F6;
    --success: #34D399;
    --success-bg: #0A634B;
    --warning: #FBBF24;
    --warning-bg: #924A1A;
    --danger: #F87171;
    --danger-bg: #9A2828;
    --info: #38BDF8;
    --info-bg: #1A2F58;
    --bg: #1C2436;
    --bg-warm: #2D3A50;
    --surface: #2D3A50;
    --surface-alt: #3A4B62;
    --text: #E2E8F0;
    --text-secondary: #94A3B8;
    --text-muted: #7889A0;
    --border: #4A5A72;
    --border-light: #2D3A50;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.25);
    --shadow: 0 1px 3px rgba(0,0,0,0.35), 0 1px 2px rgba(0,0,0,0.25);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.35), 0 2px 4px rgba(0,0,0,0.25);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.4), 0 4px 8px rgba(0,0,0,0.25);
    --shadow-xl: 0 20px 40px rgba(0,0,0,0.5), 0 10px 15px rgba(0,0,0,0.25);
    --shadow-glow: 0 0 30px rgba(96,165,250,0.15);
    --navbar-bg: rgba(28,36,54,0.94);
    --sidebar-bg: rgba(28,36,54,0.90);
    --card-bg: #2D3A50;
    --glass-bg: rgba(45,58,80,0.90);
    --gradient-body-1: #2D3A50;
    --gradient-body-2: #28365A;
    --gradient-body-3: #1C2436;
    --gradient-login-1: #28365A;
    --gradient-login-2: #2D4E78;
    --gradient-login-3: #28365A;
    --gradient-login-4: #1C2436;
    --gradient-login-5: #2D3A50;
    --gradient-login-6: #28365A;
    --gradient-hero-1: rgba(45,78,120,0.55);
    --gradient-hero-2: rgba(40,54,90,0.50);
    --gradient-hero-3: rgba(45,58,80,0.55);
    --gradient-hero-4: #2D3A50;
    --gradient-hero-5: #28365A;
    --gradient-hero-6: #2D4E78;
}

/* ============================================================
   Theme: Lavender Haze (cute pastel) 💜🌸
   ============================================================ */
[data-theme="lavender"] {
    --primary: #7C3AED;
    --primary-light: #A78BFA;
    --primary-dark: #6D28D9;
    --primary-bg: #EDE9FE;
    --accent: #C026D3;
    --accent-light: #E879F9;
    --accent-bg: #FAE8FF;
    --deep-blue: #6B21A8;
    --sky: #A855F7;
    --sky-bg: #E9D5FF;
    --watercolor-1: #DDD6FE;
    --watercolor-2: #C4B5FD;
    --watercolor-3: #EDE9FE;
    --paint-blue: #8B5CF6;
    --paint-sky: #A78BFA;
    --paint-soft: #A78BFA;
    --success: #059669;
    --success-bg: #D1FAE5;
    --warning: #F59E0B;
    --warning-bg: #FEF3C7;
    --danger: #EF4444;
    --danger-bg: #FEE2E2;
    --info: #8B5CF6;
    --info-bg: #EDE9FE;
    --bg: #E8E5F0;
    --bg-warm: #F5F0F8;
    --surface: #F8F6FC;
    --surface-alt: #F0ECF8;
    --text: #2D1B69;
    --text-secondary: #7C6F9E;
    --text-muted: #A89CC4;
    --border: #D4CCE8;
    --border-light: #E8E2F4;
    --shadow-sm: 0 1px 2px rgba(109,40,217,0.06);
    --shadow: 0 1px 3px rgba(109,40,217,0.08), 0 1px 2px rgba(109,40,217,0.04);
    --shadow-md: 0 4px 6px rgba(109,40,217,0.07), 0 2px 4px rgba(109,40,217,0.04);
    --shadow-lg: 0 10px 25px rgba(109,40,217,0.10), 0 4px 8px rgba(109,40,217,0.05);
    --shadow-xl: 0 20px 40px rgba(109,40,217,0.12), 0 10px 15px rgba(109,40,217,0.05);
    --shadow-glow: 0 0 30px rgba(139,92,246,0.12);
    --navbar-bg: rgba(248,246,252,0.94);
    --sidebar-bg: rgba(248,246,252,0.88);
    --card-bg: #FFFFFF;
    --glass-bg: rgba(248,246,252,0.9);
    --gradient-body-1: #DDD6FE;
    --gradient-body-2: #EDE9FE;
    --gradient-body-3: #E8E5F0;
    --gradient-login-1: #C4B5FD;
    --gradient-login-2: #A78BFA;
    --gradient-login-3: #DDD6FE;
    --gradient-login-4: #E8E5F0;
    --gradient-login-5: #DDD6FE;
    --gradient-login-6: #C4B5FD;
    --gradient-hero-1: rgba(196,181,253,0.7);
    --gradient-hero-2: rgba(167,139,250,0.5);
    --gradient-hero-3: rgba(221,214,254,0.6);
    --gradient-hero-4: #DDD6FE;
    --gradient-hero-5: #C4B5FD;
    --gradient-hero-6: #A78BFA;
}

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

html { font-size: 16px; -webkit-font-smoothing: antialiased; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    /* Watercolor blue background effect — uses theme vars */
    background:
        radial-gradient(ellipse 80% 60% at 20% 20%, var(--gradient-body-1) 0%, transparent 50%),
        radial-gradient(ellipse 60% 80% at 80% 60%, var(--gradient-body-2) 0%, transparent 50%),
        radial-gradient(ellipse 50% 50% at 50% 80%, var(--watercolor-2) 0%, transparent 40%),
        radial-gradient(ellipse 40% 70% at 10% 90%, var(--paint-soft) 0%, transparent 35%),
        linear-gradient(180deg, var(--gradient-body-3) 0%, var(--gradient-body-2) 50%, var(--gradient-body-1) 100%);
    background-attachment: fixed;
}

/* Subtle paint-splatter texture overlay */
body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(circle 3px at 15% 25%, rgba(59,130,246,0.12) 0%, transparent 100%),
        radial-gradient(circle 2px at 85% 15%, rgba(56,189,248,0.10) 0%, transparent 100%),
        radial-gradient(circle 4px at 70% 75%, rgba(37,99,235,0.08) 0%, transparent 100%),
        radial-gradient(circle 2px at 30% 80%, rgba(147,197,253,0.15) 0%, transparent 100%),
        radial-gradient(circle 3px at 60% 40%, rgba(2,132,199,0.06) 0%, transparent 100%),
        radial-gradient(circle 1px at 10% 55%, rgba(59,130,246,0.18) 0%, transparent 100%),
        radial-gradient(circle 2px at 90% 70%, rgba(56,189,248,0.10) 0%, transparent 100%),
        radial-gradient(circle 4px at 45% 10%, rgba(37,99,235,0.06) 0%, transparent 100%);
}

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

img { max-width: 100%; height: auto; border-radius: var(--radius); }

/* ============================================================
   Typography
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    color: var(--text);
}

h1 {
    font-size: 2rem;
    position: relative;
}

/* Brush-stroke underline for main headings */
h2 {
    font-size: 1.5rem;
    position: relative;
}

h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }

/* ============================================================
   Navigation — softer, cuter
   ============================================================ */
.navbar {
    background: var(--navbar-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(37,99,235,0.08);
    padding: 0 1.5rem;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 8px rgba(37,99,235,0.04);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.3px;
}

.nav-brand .brand-logo {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    transition: transform var(--transition), box-shadow var(--transition);
    filter: drop-shadow(0 2px 8px rgba(37,99,235,0.25));
}

.nav-brand:hover .brand-logo {
    transform: scale(1.08);
    filter: drop-shadow(0 4px 16px rgba(37,99,235,0.4));
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    list-style: none;
}

.nav-links a {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 0.9rem;
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.88rem;
    transition: all var(--transition);
}

.nav-links a:hover {
    background: var(--primary-bg);
    color: var(--primary);
    transform: translateY(-1px);
}

.nav-links a.active {
    background: linear-gradient(135deg, var(--primary-bg), var(--sky-bg));
    color: var(--primary);
    font-weight: 600;
    box-shadow: 0 1px 4px rgba(37,99,235,0.1);
}

.nav-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-light), var(--accent-light));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 0.85rem;
    box-shadow: 0 2px 8px rgba(37,99,235,0.15);
}

.nav-avatar-img {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-light);
    box-shadow: 0 2px 8px rgba(37,99,235,0.15);
}

.badge {
    background: var(--danger);
    color: white;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.15rem 0.45rem;
    border-radius: var(--radius-full);
    min-width: 18px;
    text-align: center;
    line-height: 1;
    box-shadow: 0 1px 4px rgba(239,68,68,0.25);
}

/* Mobile nav */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text);
    padding: 0.25rem;
    border-radius: var(--radius);
    transition: background var(--transition);
}
.nav-toggle:hover { background: var(--primary-bg); }

/* ============================================================
   Layout
   ============================================================ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    position: relative;
    z-index: 1;
}

.container-sm { max-width: 800px; margin: 0 auto; padding: 2rem 1.5rem; position: relative; z-index: 1; }
.container-xs { max-width: 480px; margin: 0 auto; padding: 2rem 1.5rem; position: relative; z-index: 1; }

/* Two-column layout */
.layout-with-sidebar {
    display: flex;
    max-width: 1200px;
    margin: 0 auto;
    min-height: calc(100vh - 64px);
    position: relative;
    z-index: 1;
}

.sidebar {
    width: 260px;
    min-width: 260px;
    background: var(--sidebar-bg);
    backdrop-filter: blur(8px);
    border-right: 1px solid rgba(37,99,235,0.06);
    padding: 1.5rem 1rem;
    position: sticky;
    top: 64px;
    height: calc(100vh - 64px);
    overflow-y: auto;
}

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

.sidebar-title {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    padding: 0 0.5rem;
    font-weight: 700;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.55rem 0.75rem;
    border-radius: var(--radius);
    color: var(--text-secondary);
    font-size: 0.88rem;
    font-weight: 500;
    transition: all var(--transition);
    cursor: pointer;
}

.sidebar-link:hover {
    background: var(--primary-bg);
    color: var(--primary);
    transform: translateX(3px);
}

.sidebar-link.active {
    background: linear-gradient(135deg, var(--primary-bg), var(--sky-bg));
    color: var(--primary);
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}

.sidebar-link .icon { font-size: 1.1rem; }

.main-content { flex: 1; padding: 2rem; min-width: 0; position: relative; z-index: 1; }

/* ============================================================
   Cards — softer, pillowy, artistic
   ============================================================ */
.card {
    background: var(--surface);
    border: 1px solid rgba(37,99,235,0.06);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

/* Subtle top-edge paint stroke on cards */
.card::before {
    content: '';
    position: absolute;
    top: 0; left: 15%; right: 15%;
    height: 3px;
    border-radius: 0 0 3px 3px;
    background: linear-gradient(90deg, transparent, var(--paint-soft), var(--primary-light), var(--paint-soft), transparent);
    opacity: 0;
    transition: opacity var(--transition);
}

.card:hover::before { opacity: 1; }
.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

/* ============================================================
   Buttons — cuter, rounder, glow effects
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.6rem 1.3rem;
    border: none;
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    line-height: 1.4;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.btn:active { transform: scale(0.96); }

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 2px 12px rgba(37,99,235,0.2);
}
.btn-primary:hover {
    background: linear-gradient(135deg, #3B82F6, #1E40AF);
    color: white;
    box-shadow: 0 4px 20px rgba(37,99,235,0.35);
    transform: translateY(-1px);
}

.btn-accent {
    background: linear-gradient(135deg, var(--accent), #0369A1);
    color: white;
    box-shadow: 0 2px 12px rgba(2,132,199,0.2);
}
.btn-accent:hover {
    background: linear-gradient(135deg, #0284C7, #075985);
    color: white;
    box-shadow: 0 4px 20px rgba(2,132,199,0.35);
    transform: translateY(-1px);
}

.btn-success {
    background: linear-gradient(135deg, var(--success), #047857);
    color: white;
    box-shadow: 0 2px 12px rgba(5,150,105,0.2);
}
.btn-success:hover {
    box-shadow: 0 4px 20px rgba(5,150,105,0.35);
    transform: translateY(-1px);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger), #DC2626);
    color: white;
    box-shadow: 0 2px 12px rgba(239,68,68,0.2);
}
.btn-danger:hover {
    box-shadow: 0 4px 20px rgba(239,68,68,0.35);
    transform: translateY(-1px);
    color: white;
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning), #D97706);
    color: white;
    box-shadow: 0 2px 12px rgba(245,158,11,0.2);
}
.btn-warning:hover {
    box-shadow: 0 4px 20px rgba(245,158,11,0.35);
    transform: translateY(-1px);
    color: white;
}

.btn-outline {
    background: transparent;
    color: var(--text-secondary);
    border: 1.5px solid var(--border);
}
.btn-outline:hover {
    background: var(--primary-bg);
    color: var(--primary);
    border-color: var(--primary-light);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}
.btn-ghost:hover { background: var(--primary-bg); color: var(--text); }

.btn-sm { padding: 0.4rem 0.9rem; font-size: 0.82rem; }
.btn-lg { padding: 0.8rem 1.8rem; font-size: 1rem; }

.btn-icon {
    width: 38px; height: 38px; padding: 0;
    border-radius: 50%;
    font-size: 1.1rem;
}

.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ============================================================
   Forms
   ============================================================ */
.form-group { margin-bottom: 1.25rem; }

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.4rem;
}

.form-input, .form-textarea, .form-select {
    width: 100%;
    padding: 0.7rem 1rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-family: inherit;
    color: var(--text);
    background: var(--surface);
    transition: all var(--transition);
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 4px rgba(59,130,246,0.1), 0 0 20px rgba(59,130,246,0.05);
}

.form-input::placeholder { color: var(--text-muted); }

.form-textarea { min-height: 140px; resize: vertical; line-height: 1.6; }

.form-hint { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.3rem; }

.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
}

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

/* ============================================================
   Flash Messages
   ============================================================ */
.flash-container { max-width: 1200px; margin: 0 auto; padding: 1rem 1.5rem 0; position: relative; z-index: 10; }

.alert {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.9rem 1.2rem;
    border-radius: var(--radius);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    animation: slideDown 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow);
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-12px); }
    to { opacity: 1; transform: translateY(0); }
}

.alert-success { background: var(--success-bg); color: #065F46; border: 1px solid #A7F3D0; }
.alert-error { background: var(--danger-bg); color: #991B1B; border: 1px solid #FECACA; }
.alert-warning { background: var(--warning-bg); color: #92400E; border: 1px solid #FDE68A; }
.alert-info { background: var(--info-bg); color: #075985; border: 1px solid #BAE6FD; }

/* ============================================================
   Login Page — dreamy blue
   ============================================================ */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(ellipse 70% 50% at 30% 30%, var(--gradient-login-1) 0%, transparent 50%),
        radial-gradient(ellipse 60% 60% at 70% 70%, var(--gradient-login-2) 0%, transparent 50%),
        radial-gradient(ellipse 50% 40% at 50% 50%, var(--gradient-login-3) 0%, transparent 40%),
        linear-gradient(135deg, var(--gradient-login-4) 0%, var(--gradient-login-5) 40%, var(--gradient-login-6) 100%);
    padding: 1.5rem;
    position: relative;
}

/* Floating paint dots behind login card */
.login-page::before {
    content: '';
    position: absolute;
    pointer-events: none;
    width: 100%; height: 100%;
    background:
        radial-gradient(circle 6px at 20% 30%, rgba(59,130,246,0.15) 0%, transparent 100%),
        radial-gradient(circle 4px at 75% 25%, rgba(56,189,248,0.12) 0%, transparent 100%),
        radial-gradient(circle 8px at 65% 80%, rgba(37,99,235,0.08) 0%, transparent 100%),
        radial-gradient(circle 5px at 30% 70%, rgba(147,197,253,0.18) 0%, transparent 100%),
        radial-gradient(circle 3px at 85% 60%, rgba(2,132,199,0.12) 0%, transparent 100%);
}

.login-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl), var(--shadow-glow);
    padding: 3rem 2.5rem;
    width: 100%;
    max-width: 420px;
    animation: fadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(37,99,235,0.08);
    position: relative;
    z-index: 1;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

.login-logo { text-align: center; margin-bottom: 2rem; }

.login-logo .logo-raven {
    width: 200px;
    height: 200px;
    margin-bottom: 0.75rem;
    filter: drop-shadow(0 6px 25px rgba(30,64,175,0.3));
    transition: transform var(--transition);
}
.login-logo .logo-raven:hover {
    transform: scale(1.05);
}

@keyframes gentlePulse {
    0%, 100% { box-shadow: 0 6px 25px rgba(37,99,235,0.3); }
    50% { box-shadow: 0 8px 35px rgba(37,99,235,0.45); }
}

.login-logo h1 { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.3px; }
.login-logo p { color: var(--text-secondary); font-size: 0.9rem; margin-top: 0.25rem; }

.login-card .form-input {
    padding: 0.8rem 1rem;
    font-size: 0.95rem;
    border-radius: var(--radius);
}

.login-card .btn {
    width: 100%;
    padding: 0.85rem;
    font-size: 1rem;
    margin-top: 0.5rem;
}

.login-footer {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* ============================================================
   Signup Page — same dreamy base
   ============================================================ */
.signup-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(ellipse 70% 50% at 30% 30%, var(--gradient-login-1) 0%, transparent 50%),
        radial-gradient(ellipse 60% 60% at 70% 70%, var(--gradient-login-2) 0%, transparent 50%),
        linear-gradient(135deg, var(--gradient-login-4) 0%, var(--gradient-login-5) 40%, var(--gradient-login-6) 100%);
    padding: 1.5rem;
    position: relative;
}

.signup-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    padding: 2.5rem;
    width: 100%;
    max-width: 500px;
    animation: fadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(37,99,235,0.08);
    position: relative;
    z-index: 1;
}

/* ============================================================
   Landing Page — artistic, painterly
   ============================================================ */
.landing-hero {
    text-align: center;
    padding: 5rem 1.5rem 3.5rem;
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(ellipse 70% 50% at 30% 20%, var(--gradient-hero-1) 0%, transparent 50%),
        radial-gradient(ellipse 60% 50% at 70% 70%, var(--gradient-hero-2) 0%, transparent 50%),
        radial-gradient(ellipse 50% 40% at 50% 50%, var(--gradient-hero-3) 0%, transparent 40%),
        linear-gradient(180deg, var(--gradient-hero-4) 0%, var(--gradient-hero-5) 50%, var(--gradient-hero-6) 100%);
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}

/* Paint splatter accents in hero */
.landing-hero::before {
    content: '';
    position: absolute;
    pointer-events: none;
    top: -30px; right: -20px;
    width: 180px; height: 180px;
    background: radial-gradient(circle, rgba(59,130,246,0.08) 0%, transparent 60%);
    border-radius: 50%;
}

.landing-hero::after {
    content: '';
    position: absolute;
    pointer-events: none;
    bottom: -40px; left: -30px;
    width: 200px; height: 200px;
    background: radial-gradient(circle, rgba(56,189,248,0.06) 0%, transparent 60%);
    border-radius: 50%;
}

.landing-hero h1 {
    font-size: 2.6rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
    background: linear-gradient(135deg, var(--deep-blue), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.landing-hero .hero-emoji {
    font-size: 4.5rem;
    display: block;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
    animation: float 4s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.landing-hero p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 2rem;
    line-height: 1.7;
    position: relative;
    z-index: 1;
}

.landing-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1.25rem;
    padding: 3rem 1.5rem;
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.landing-feature {
    text-align: center;
    padding: 2rem 1.5rem;
    background: var(--glass-bg);
    backdrop-filter: blur(8px);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(37,99,235,0.05);
    transition: all var(--transition);
    position: relative;
}

.landing-feature:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
    border-color: rgba(37,99,235,0.12);
}

.landing-feature .feature-icon {
    font-size: 2.8rem;
    margin-bottom: 0.75rem;
    display: block;
    transition: transform var(--transition);
}

.landing-feature:hover .feature-icon {
    transform: scale(1.15) rotate(-5deg);
}

.landing-feature h3 { font-size: 1.05rem; margin-bottom: 0.5rem; color: var(--deep-blue); }
.landing-feature p { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.6; }

/* ============================================================
   Support / Category Cards
   ============================================================ */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.category-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.35rem;
    background: var(--glass-bg);
    border: 1.5px solid rgba(37,99,235,0.06);
    border-radius: var(--radius-lg);
    transition: all var(--transition);
    cursor: pointer;
    text-decoration: none;
    color: var(--text);
    position: relative;
    overflow: hidden;
}

.category-card::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 0;
    background: linear-gradient(0deg, rgba(37,99,235,0.04) 0%, transparent 100%);
    transition: height var(--transition);
}

.category-card:hover::after { height: 100%; }

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

.category-card .cat-icon {
    font-size: 1.8rem;
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, var(--primary-bg), var(--sky-bg));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform var(--transition);
}

.category-card:hover .cat-icon { transform: scale(1.1) rotate(-8deg); }

.category-card .cat-info h4 { font-size: 0.95rem; margin-bottom: 0.25rem; }
.category-card .cat-info p { font-size: 0.82rem; color: var(--text-secondary); line-height: 1.4; }

/* Question list */
.question-list { display: flex; flex-direction: column; gap: 0.75rem; }

.question-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.1rem 1.25rem;
    background: var(--surface);
    border: 1px solid rgba(37,99,235,0.05);
    border-radius: var(--radius);
    transition: all var(--transition);
    color: var(--text);
}

.question-item:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-md);
    color: var(--text);
}

.question-item .q-stats {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    min-width: 50px;
    text-align: center;
}

.question-item .q-stats strong { font-size: 1rem; color: var(--text); }

.question-item .q-content h4 { font-size: 0.95rem; margin-bottom: 0.2rem; }
.question-item .q-meta { font-size: 0.78rem; color: var(--text-muted); }

.answered-badge {
    display: inline-block;
    background: var(--success-bg);
    color: #065F46;
    padding: 0.15rem 0.6rem;
    border-radius: var(--radius-full);
    font-size: 0.72rem;
    font-weight: 600;
}

.private-badge {
    display: inline-block;
    background: var(--warning-bg);
    color: #92400E;
    padding: 0.15rem 0.6rem;
    border-radius: var(--radius-full);
    font-size: 0.72rem;
    font-weight: 600;
}

/* ============================================================
   Article Content — beautiful typography
   ============================================================ */
.article-content {
    line-height: 1.9;
    font-size: 1.02rem;
}

.article-content h2 {
    margin: 2.5rem 0 0.75rem;
    padding-bottom: 0.6rem;
    border-bottom: 2px solid var(--primary-bg);
}

.article-content h3 { margin: 1.75rem 0 0.5rem; color: var(--deep-blue); }

.article-content h4 { margin: 1.25rem 0 0.5rem; }

.article-content p { margin-bottom: 1.1rem; }

.article-content ul, .article-content ol { margin: 0.75rem 0; padding-left: 1.75rem; }
.article-content li { margin-bottom: 0.45rem; }

.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.9rem;
    border-radius: var(--radius);
    overflow: hidden;
}

.article-content th {
    background: var(--primary-bg);
    padding: 0.8rem 1rem;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid var(--primary-light);
}

.article-content td { padding: 0.7rem 1rem; border-bottom: 1px solid var(--border-light); }
.article-content tr:hover td { background: var(--surface-alt); }

.info-card, .warning-card, .tip-card {
    padding: 1.35rem 1.5rem;
    border-radius: var(--radius);
    margin: 1.5rem 0;
    border-left: 4px solid;
    position: relative;
}

.info-card { background: var(--info-bg); border-color: var(--info); }
.warning-card { background: var(--warning-bg); border-color: var(--warning); }
.tip-card { background: var(--success-bg); border-color: var(--success); }

.pros-cons-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 1rem 0; }

.pros-cons-grid .pros, .pros-cons-grid .cons {
    padding: 1.1rem 1.25rem;
    border-radius: var(--radius);
}

.pros-cons-grid .pros { background: var(--success-bg); }
.pros-cons-grid .cons { background: var(--danger-bg); }

.rec-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; margin: 1rem 0; }

.rec-card {
    padding: 1.35rem;
    background: var(--surface-alt);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.article-meta .category-tag {
    display: inline-block;
    background: var(--primary-bg);
    color: var(--primary);
    padding: 0.2rem 0.7rem;
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-weight: 600;
}

/* ============================================================
   Questions & Comments
   ============================================================ */
.comment-thread { margin-top: 2rem; }

.comment {
    display: flex;
    gap: 0.85rem;
    padding: 1.1rem 0;
    border-bottom: 1px solid var(--border-light);
    transition: background var(--transition);
}

.comment:last-child { border-bottom: none; }

.comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-light), var(--accent-light));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(37,99,235,0.12);
}

.comment-body { flex: 1; min-width: 0; }

.comment-body .comment-author {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.2rem;
}

.comment-body .comment-text { font-size: 0.9rem; line-height: 1.6; color: var(--text); }
.comment-body .comment-time { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.25rem; }

/* ============================================================
   Messages
   ============================================================ */
.messages-layout {
    display: flex;
    height: calc(100vh - 64px - 4rem);
    max-width: 1000px;
    margin: 0 auto;
    background: var(--surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid rgba(37,99,235,0.06);
}

.conversation-list { width: 320px; border-right: 1px solid var(--border); overflow-y: auto; }

.conversation-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.9rem 1rem;
    border-bottom: 1px solid var(--border-light);
    transition: background var(--transition);
    color: var(--text);
    cursor: pointer;
}

.conversation-item:hover { background: var(--primary-bg); color: var(--text); }
.conversation-item.unread { background: linear-gradient(90deg, var(--primary-bg), transparent); }

.conversation-item .conv-avatar {
    width: 42px; height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-light), var(--accent-light));
    display: flex; align-items: center; justify-content: center;
    color: white; font-weight: 700; font-size: 0.9rem; flex-shrink: 0;
}

.conversation-item .conv-info { flex: 1; min-width: 0; }
.conversation-item .conv-name { font-weight: 600; font-size: 0.9rem; }
.conversation-item .conv-preview {
    font-size: 0.8rem; color: var(--text-muted);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.conversation-item .conv-time { font-size: 0.7rem; color: var(--text-muted); }

.message-area { flex: 1; display: flex; flex-direction: column; min-width: 0; }

.message-header {
    padding: 0.9rem 1.25rem;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    background: linear-gradient(180deg, var(--primary-bg), transparent);
}

.message-list {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.message-bubble {
    max-width: 75%;
    padding: 0.7rem 1.1rem;
    border-radius: var(--radius-lg);
    font-size: 0.9rem;
    line-height: 1.5;
    word-wrap: break-word;
    box-shadow: var(--shadow-sm);
}

.message-bubble.sent {
    align-self: flex-end;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border-bottom-right-radius: var(--radius-sm);
}

.message-bubble.received {
    align-self: flex-start;
    background: var(--surface-alt);
    color: var(--text);
    border-bottom-left-radius: var(--radius-sm);
}

.message-bubble .msg-time { font-size: 0.65rem; opacity: 0.7; margin-top: 0.2rem; }

.message-input-area {
    padding: 0.9rem 1.25rem;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 0.5rem;
    background: var(--surface);
}

.message-input-area input {
    flex: 1;
    padding: 0.65rem 1rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-family: inherit;
}

.message-input-area input:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 4px rgba(59,130,246,0.08);
}

/* ============================================================
   Admin Dashboard
   ============================================================ */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1rem; margin-bottom: 2rem; }

.stat-card {
    background: var(--surface);
    border: 1px solid rgba(37,99,235,0.06);
    border-radius: var(--radius-lg);
    padding: 1.35rem 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
}

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

.stat-card .stat-value {
    font-size: 2.2rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-card .stat-label { font-size: 0.85rem; color: var(--text-muted); margin-top: 0.2rem; }
.stat-card.warn .stat-value { -webkit-text-fill-color: var(--warning); color: var(--warning); }
.stat-card.success .stat-value { -webkit-text-fill-color: var(--success); color: var(--success); }

/* Tables */
.table-container {
    overflow-x: auto;
    background: var(--surface);
    border: 1px solid rgba(37,99,235,0.06);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

table.data-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }

table.data-table th {
    background: linear-gradient(180deg, var(--primary-bg), transparent);
    padding: 0.8rem 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    border-bottom: 2px solid var(--primary-bg);
}

table.data-table td { padding: 0.75rem 1rem; border-bottom: 1px solid var(--border-light); vertical-align: middle; }
table.data-table tr:hover td { background: var(--primary-bg); }

.status-dot {
    display: inline-block;
    width: 9px; height: 9px;
    border-radius: 50%;
    margin-right: 0.35rem;
    box-shadow: 0 0 6px rgba(0,0,0,0.15);
}

.status-dot.approved { background: var(--success); }
.status-dot.pending { background: var(--warning); animation: pulse-dot 1.5s ease-in-out infinite; }
.status-dot.expired { background: var(--danger); }

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* ============================================================
   Utility
   ============================================================ */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 0.85rem; }
.text-xs { font-size: 0.75rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.w-full { width: 100%; }

.empty-state { text-align: center; padding: 3rem 1.5rem; color: var(--text-muted); }

.empty-state .empty-icon {
    font-size: 3.5rem;
    display: block;
    margin-bottom: 1rem;
    animation: float 3s ease-in-out infinite;
}

.empty-state h3 { color: var(--text-secondary); margin-bottom: 0.5rem; }

/* ============================================================
   Footer
   ============================================================ */
.footer {
    text-align: center;
    padding: 2rem 1.5rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    border-top: 1px solid rgba(37,99,235,0.06);
    margin-top: 3rem;
    background: linear-gradient(0deg, var(--primary-bg) 0%, transparent 100%);
}

/* ============================================================
   Search
   ============================================================ */
.search-box { display: flex; gap: 0.5rem; margin-bottom: 2rem; }

.search-box input {
    flex: 1;
    padding: 0.8rem 1.2rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 0.95rem;
    font-family: inherit;
    transition: all var(--transition);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 4px rgba(59,130,246,0.08), 0 0 20px rgba(59,130,246,0.04);
}

.search-box button { padding: 0.8rem 1.5rem; border-radius: var(--radius-full); }

/* ============================================================
   Tabs
   ============================================================ */
.tabs { display: flex; gap: 0; border-bottom: 2px solid var(--border); margin-bottom: 1.5rem; }

.tab {
    padding: 0.65rem 1.25rem;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all var(--transition);
    text-decoration: none;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.tab:hover { color: var(--text); background: var(--primary-bg); }
.tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    font-weight: 600;
}

/* ============================================================
   Song Request Form — special styling
   ============================================================ */
.song-request-card {
    background: linear-gradient(135deg, var(--glass-bg), var(--primary-bg));
    backdrop-filter: blur(12px);
    border: 2px solid var(--primary-light);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

/* ============================================================
   About Page
   ============================================================ */
.about-hero { text-align: center; padding: 4rem 1.5rem 2rem; position: relative; z-index: 1; }
.about-content { max-width: 800px; margin: 0 auto; padding: 0 1.5rem 3rem; line-height: 1.9; position: relative; z-index: 1; }

/* ============================================================
   Misc
   ============================================================ */
.image-upload-preview { margin-top: 0.5rem; }
.image-upload-preview img { max-height: 200px; border-radius: var(--radius); border: 1px solid var(--border); }

/* ============================================================
   Theme Switcher
   ============================================================ */
.theme-switcher {
    position: relative;
}

.theme-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1.5px solid var(--border);
    border-radius: 50%;
    background: var(--surface);
    cursor: pointer;
    font-size: 1rem;
    transition: all var(--transition);
}

.theme-btn:hover {
    background: var(--primary-bg);
    border-color: var(--primary-light);
    transform: rotate(15deg);
    box-shadow: var(--shadow-md);
}

.theme-dropdown {
    display: none;
    position: absolute;
    top: 44px;
    right: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 0.4rem;
    z-index: 200;
    min-width: 160px;
}

.theme-dropdown.open {
    display: block;
    animation: fadeIn 0.2s ease;
}

.theme-dropdown button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.55rem 0.85rem;
    border: none;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text);
    font-size: 0.85rem;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
}

.theme-dropdown button:hover {
    background: var(--primary-bg);
    color: var(--primary);
}

.theme-dropdown button.active {
    background: var(--primary-bg);
    color: var(--primary);
    font-weight: 600;
}

/* ============================================================
   Responsive — Mobile First Enhancements
   ============================================================ */

/* Tablet & below */
@media (max-width: 768px) {
    /* Layout */
    .layout-with-sidebar { flex-direction: column; }
    .sidebar {
        width: 100%; min-width: 100%; height: auto; position: static;
        border-right: none; border-bottom: 1px solid var(--border);
        padding: 0.5rem 0.75rem;
        display: flex; flex-wrap: wrap; gap: 0.25rem;
        overflow-x: auto; -webkit-overflow-scrolling: touch;
    }
    .sidebar-section { margin-bottom: 0; display: flex; gap: 0.25rem; align-items: center; }
    .sidebar-title { display: none; }
    .sidebar-link { display: inline-flex; white-space: nowrap; font-size: 0.8rem; padding: 0.4rem 0.65rem; }
    .main-content { padding: 1rem; }

    /* Nav */
    .navbar { padding: 0 0.75rem; height: 56px; }
    .nav-brand { font-size: 1.1rem; }
    .nav-brand .brand-icon { width: 32px; height: 32px; font-size: 0.85rem; }
    .nav-links { display: none; }
    .nav-links.open {
        display: flex; flex-direction: column;
        position: fixed; top: 56px; left: 0; right: 0; bottom: 0;
        background: var(--glass-bg); backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        padding: 0.75rem; z-index: 999;
        box-shadow: var(--shadow-xl); overflow-y: auto;
    }
    .nav-links.open a, .nav-links.open .theme-btn {
        padding: 0.75rem 1rem; font-size: 1rem;
        border-radius: var(--radius); width: 100%;
        justify-content: flex-start;
    }
    .nav-toggle { display: flex; align-items: center; justify-content: center;
        width: 40px; height: 40px; font-size: 1.3rem;
    }

    /* Hero */
    .landing-hero { padding: 2.5rem 1rem 2rem; border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
    .landing-hero h1 { font-size: 1.6rem; }
    .landing-hero p { font-size: 0.95rem; }

    /* Cards & grids */
    .landing-features { grid-template-columns: 1fr 1fr; gap: 0.75rem; padding: 2rem 0.75rem; }
    .landing-feature { padding: 1.25rem 1rem; }
    .landing-feature .feature-icon { font-size: 2rem; }
    .landing-feature h3 { font-size: 0.95rem; }
    .landing-feature p { font-size: 0.8rem; }

    .category-grid { grid-template-columns: 1fr; gap: 0.6rem; }
    .stat-grid { grid-template-columns: 1fr 1fr; gap: 0.6rem; }

    .pros-cons-grid { grid-template-columns: 1fr; }
    .rec-grid { grid-template-columns: 1fr; }

    /* Forms */
    .login-card, .signup-card {
        padding: 1.75rem 1.25rem; margin: 0.5rem;
        border-radius: var(--radius-lg);
    }
    .login-logo .logo-circle { width: 56px; height: 56px; font-size: 1.3rem; }
    .login-logo h1 { font-size: 1.3rem; }
    .login-page, .signup-page { padding: 0.75rem; align-items: flex-start; padding-top: 2rem; }

    .form-input, .form-textarea, .form-select { font-size: 16px; }

    /* Tables — horizontal scroll */
    .table-container { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    table.data-table { font-size: 0.82rem; }
    table.data-table th, table.data-table td { padding: 0.55rem 0.7rem; white-space: nowrap; }
    table.data-table th { font-size: 0.7rem; }

    /* Messages */
    .messages-layout { flex-direction: column; height: auto; border-radius: var(--radius); }
    .conversation-list { width: 100%; max-height: 220px; }
    .message-area { min-height: 380px; }
    .message-bubble { max-width: 88%; }
    .message-input-area { padding: 0.6rem 0.75rem; }
    .message-input-area input { font-size: 16px; }

    /* Questions */
    .question-item { flex-direction: column; gap: 0.5rem; padding: 0.75rem 1rem; }
    .question-item .q-stats { flex-direction: row; gap: 0.75rem; }
    .comment { gap: 0.5rem; }
    .comment-avatar { width: 32px; height: 32px; font-size: 0.75rem; }

    /* Article */
    .article-content { font-size: 0.95rem; }
    .article-content h2 { font-size: 1.3rem; }
    .article-content table { font-size: 0.8rem; }

    /* Admin */
    .admin-sidebar-links { display: flex; flex-wrap: wrap; }
    .flex-responsive { flex-direction: column; }

    /* Cards */
    .card { padding: 1.25rem; }

    /* Buttons — full width on mobile where sensible */
    .btn-lg { padding: 0.7rem 1.2rem; font-size: 0.95rem; }

    /* Footer */
    .footer { padding: 1.5rem 1rem; font-size: 0.8rem; }

    /* Containers */
    .container, .container-sm, .container-xs { padding: 1rem 0.75rem; }

    /* Tabs — scrollable */
    .tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .tab { white-space: nowrap; font-size: 0.82rem; padding: 0.5rem 0.85rem; }

    /* Search */
    .search-box { flex-direction: column; }
    .search-box button { width: 100%; }

    /* Flash */
    .flash-container { padding: 0.5rem 0.75rem 0; }
    .alert { font-size: 0.85rem; padding: 0.7rem 0.9rem; }

    /* Password gate */
    .requested-gate { margin: 1.5rem 0.5rem; }

    /* Theme dropdown on mobile */
    .theme-dropdown { position: fixed; top: auto; bottom: 80px; right: 10px; }

    /* Song request form on mobile */
    .container form .card { margin: 0 -0.5rem; }
}

/* Small phones */
@media (max-width: 480px) {
    .landing-features { grid-template-columns: 1fr; }
    .stat-grid { grid-template-columns: 1fr 1fr; gap: 0.4rem; }
    .stat-card { padding: 0.85rem 1rem; }
    .stat-card .stat-value { font-size: 1.5rem; }
    .stat-card .stat-label { font-size: 0.7rem; }

    .landing-hero h1 { font-size: 1.4rem; }
    .landing-hero p { font-size: 0.88rem; }
    .landing-hero { padding: 2rem 0.75rem 1.5rem; }

    .nav-brand { font-size: 1rem; }
    .category-card { padding: 1rem; }
    .category-card .cat-icon { width: 40px; height: 40px; font-size: 1.3rem; }

    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.2rem; }
    h3 { font-size: 1.05rem; }

    .btn { padding: 0.5rem 0.9rem; font-size: 0.85rem; }
    .btn-lg { padding: 0.65rem 1.1rem; font-size: 0.9rem; }

    .login-card, .signup-card { padding: 1.5rem 1rem; border-radius: var(--radius); }

    table.data-table { font-size: 0.75rem; }
    table.data-table th, table.data-table td { padding: 0.45rem 0.55rem; }

    .message-bubble { max-width: 92%; font-size: 0.85rem; }
    .message-list { padding: 0.75rem; }
    .article-content { font-size: 0.9rem; }
}
