/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Brand Core */
    --primary: #4f46e5;
    --primary-dark: #4338ca;
    --primary-light: #818cf8;
    --secondary: #0f172a;

    /* Premium Accents */
    --accent-gold: #fbbf24;
    --accent-gold-gradient: linear-gradient(135deg, #fbbf24 0%, #d97706 100%);
    --accent-purple: #a855f7;
    --accent-cyan: #06b6d4;

    /* Backgrounds */
    --bg-body: #f1f5f9;
    --bg-card: rgba(255, 255, 255, 0.85);
    --bg-glass: rgba(255, 255, 255, 0.7);
    --bg-glass-heavy: rgba(255, 255, 255, 0.9);
    --bg-secondary: #f8fafc;
    /* Keep for legacy compat */
    --bg-tertiary: #e2e8f0;

    /* Text */
    --text-main: #0f172a;
    --text-primary: #0f172a;
    /* Legacy alias */
    --text-muted: #64748b;
    --text-light: #94a3b8;
    --text-inverse: #ffffff;
    --text-secondary: #475569;
    /* Keep for legacy compat */

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-premium: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --shadow-glow: 0 0 20px rgba(79, 70, 229, 0.15);
    --shadow-glow-gold: 0 0 20px rgba(251, 191, 36, 0.3);

    /* Spacing & Radius */
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-full: 9999px;

    --spacing-xs: 0.5rem;
    --spacing-sm: 0.75rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 4rem;
    --spacing-3xl: 6rem;

    /* Gradients (Legacy Support) */
    --gradient-primary: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
    --gradient-gold: linear-gradient(135deg, #fbbf24 0%, #d97706 100%);
    --gradient-hero: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;

    /* Z-index */
    --z-tooltip: 1060;
    --z-fixed: 1000;
}

[data-theme="dark"] {
    --bg-body: #0f172a;
    --bg-card: rgba(30, 41, 59, 0.85);
    --bg-glass: rgba(30, 41, 59, 0.7);
    --bg-glass-heavy: rgba(30, 41, 59, 0.9);
    --bg-secondary: #1e293b;
    --text-main: #f8fafc;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border: rgba(255, 255, 255, 0.1);
}

/* Accent Themes */
[data-accent="indigo"] {
    --primary: #4f46e5;
    --primary-light: #e0e7ff;
}

[data-accent="emerald"] {
    --primary: #10b981;
    --primary-light: #d1fae5;
}

[data-accent="rose"] {
    --primary: #f43f5e;
    --primary-light: #ffe4e6;
}

[data-accent="amber"] {
    --primary: #f59e0b;
    --primary-light: #fef3c7;
}

body {
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    background-color: var(--bg-body);
    /* Subtle mesh gradient background */
    background-image:
        radial-gradient(at 0% 0%, rgba(79, 70, 229, 0.1) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(168, 85, 247, 0.1) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(6, 182, 212, 0.1) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--text-main);
    line-height: 1.6;
    margin: 0;
    min-height: 100vh;
}

/* Headings */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.025em;
    margin-bottom: 1rem;
    line-height: 1.2;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.75rem;
}

h4 {
    font-size: 1.5rem;
}

/* Helper Classes */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

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

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

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

.mb-1 {
    margin-bottom: var(--spacing-xs);
}

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

.mb-3 {
    margin-bottom: var(--spacing-lg);
}

.mt-1 {
    margin-top: var(--spacing-xs);
}

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

.mt-3 {
    margin-top: var(--spacing-lg);
}

.flex {
    display: flex;
}

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

.gap-1 {
    gap: 0.5rem;
}

.gap-2 {
    gap: 1rem;
}

/* Bento Grid System */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-auto-rows: minmax(100px, auto);
    gap: var(--spacing-md);
}

.bento-item {
    grid-column: span 12;
}

@media (min-width: 768px) {
    .bento-item-4 {
        grid-column: span 4;
    }

    .bento-item-6 {
        grid-column: span 6;
    }

    .bento-item-8 {
        grid-column: span 8;
    }

    .bento-item-12 {
        grid-column: span 12;
    }
}

@media (min-width: 1024px) {
    .bento-item-lg-3 {
        grid-column: span 3;
    }

    .bento-item-lg-4 {
        grid-column: span 4;
    }

    .bento-item-lg-6 {
        grid-column: span 6;
    }

    .bento-item-lg-8 {
        grid-column: span 8;
    }

    .bento-item-lg-9 {
        grid-column: span 9;
    }
}

.bento-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    text-decoration: none;
    gap: 0.5rem;
    line-height: 1.5;
}

.btn-primary {
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.4);
}

.btn-secondary {
    background: white;
    color: var(--text-main);
    border: 1px solid #e2e8f0;
}

.btn-secondary:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    transform: translateY(-1px);
}

.btn-success {
    background: #10b981;
    color: white;
}

.btn-danger {
    background: #ef4444;
    color: white;
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    border-radius: 0.5rem;
}

/* Premium Card Style - Glassmorphism */
.card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden;
    /* Ensure rounded corners */
}

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

.card-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    background: rgba(255, 255, 255, 0.4);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h4 {
    margin: 0;
    font-size: 1.25rem;
}

.card-body {
    padding: 1.5rem;
}

.card-glass {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.8);
}

/* Navbar */
.navbar {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
}

.navbar-content {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand-text {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent-purple) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.navbar-menu {
    display: flex;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.navbar-link {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.navbar-link:hover {
    color: var(--primary);
}

/* Hero Section - The Premium Fix */
.hero {
    /* Rich, deep gradient background */
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
    border-radius: var(--radius-xl);
    padding: 4rem 3rem;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-premium);
    margin-bottom: 3rem;
    color: white;
    text-align: center;
}

/* Abstract shapes for depth */
.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -20%;
    width: 80%;
    height: 200%;
    background: radial-gradient(circle, rgba(79, 70, 229, 0.4) 0%, transparent 60%);
    filter: blur(60px);
    z-index: 0;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -50%;
    right: -20%;
    width: 80%;
    height: 200%;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.4) 0%, transparent 60%);
    filter: blur(60px);
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 10;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    /* Gradient text for extra pop */
    background: linear-gradient(to right, #ffffff 0%, #e0e7ff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* This fixes the visibility issue */
.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9) !important;
    /* Force high contrast */
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* Stats Cards */
.grid {
    display: grid;
    gap: 1.5rem;
}

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

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

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

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

@media (max-width: 768px) {

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

    .hero-title {
        font-size: 2.5rem;
    }

    .navbar-menu {
        display: none;
        /* Handled by mobile menu */
    }
}

.stat-card-premium {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    text-align: center;
    border: 1px solid rgba(0, 0, 0, 0.05);
    /* Subtle border */
    box-shadow: var(--shadow-lg);
    transition: transform 0.2s;
    position: relative;
    overflow: hidden;
}

.stat-card-premium::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent-purple));
}

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

.stat-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    display: inline-block;
    padding: 12px;
    background: #f1f5f9;
    border-radius: 50%;
}

.stat-value-large {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.2;
}

.stat-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

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

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.95rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Tables */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

th {
    text-align: left;
    padding: 1rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid #f1f5f9;
}

td {
    padding: 1rem;
    border-bottom: 1px solid #f1f5f9;
    color: var(--text-main);
}

tr:last-child td {
    border-bottom: none;
}

/* Badges */
.badge {
    padding: 0.35rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 700;
}

.badge-success {
    background: #dcfce7;
    color: #166534;
}

.badge-primary {
    background: #e0e7ff;
    color: #3730a3;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

/* Achievement Badges */
.achievement-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #fff beb;
    border-radius: 2rem;
    border: 1px solid var(--accent-gold);
    color: #92400e;
    font-weight: 600;
    font-size: 0.85rem;
    background: #fffbeb;
}

.achievement-points {
    background: var(--accent-gold);
    color: white;
    padding: 0.1rem 0.4rem;
    border-radius: 1rem;
    font-size: 0.75rem;
}

/* Charts */
.chart-container {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.chart-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.chart-wrapper {
    position: relative;
    height: 300px;
    width: 100%;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    border-left: 4px solid transparent;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
    border-left-color: #166534;
}

.alert-danger {
    background: #fee2e2;
    color: #991b1b;
    border-left-color: #991b1b;
}

/* Animations */
.fade-in {
    animation: fadeIn 0.5s ease-out;
}

.scale-in {
    animation: scaleIn 0.4s ease-out;
}

.slide-in {
    animation: slideInLeft 0.5s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

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

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

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

/* Avatar */
.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid white;
    box-shadow: var(--shadow-sm);
}

/* =========================================
   Responsive Enhancements & Mobile Menu
   ========================================= */

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

@media (max-width: 768px) {

    /* Layout Adjustments */
    .grid-4,
    .grid-3,
    .grid-2 {
        grid-template-columns: 1fr;
    }

    .hero {
        padding: 3rem 1.5rem;
        border-radius: 1rem;
        margin-bottom: 2rem;
    }

    .hero-title {
        font-size: 2rem;
        line-height: 1.2;
    }

    .hero-subtitle {
        font-size: 1rem;
        flex-direction: column;
        gap: 0.5rem;
    }

    .navbar-menu {
        display: none;
    }

    /* Hide desktop menu */

    .container {
        padding: 0 1rem;
    }

    .card-header {
        padding: 1rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .stat-value-large {
        font-size: 2.5rem;
    }

    /* Ensure forms are touch-friendly */
    .form-control,
    .btn {
        min-height: 40px;
    }
}

/* Mobile Menu Button */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    position: relative;
    z-index: 1002;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
}

.mobile-menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-main);
    transition: all 0.3s ease;
    border-radius: 2px;
}

/* Level Up Animation */
.level-up-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.level-up-card {
    background: white;
    padding: 3rem;
    border-radius: var(--radius-2xl);
    text-align: center;
    max-width: 400px;
    position: relative;
    box-shadow: 0 0 50px var(--primary);
}

[data-theme="dark"] .level-up-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
}

.level-up-title {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--accent-purple));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
}

.level-up-number {
    font-size: 5rem;
    font-weight: 900;
    color: var(--primary);
    margin-bottom: 1.5rem;
    line-height: 1;
}

.level-up-sparkle {
    font-size: 3rem;
    position: absolute;
    top: -20px;
    right: -20px;
    animation: bounce 2s infinite;
}

.sparkle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: gold;
    border-radius: 50%;
    animation: float 3s infinite;
}

@keyframes bounce {

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

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

@keyframes float {
    0% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }

    100% {
        transform: translateY(-100px) scale(0);
        opacity: 0;
    }
}

/* XP Toast */
.xp-toast {
    position: fixed;
    top: 100px;
    right: 20px;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: white;
    padding: 12px 24px;
    border-radius: var(--radius-full);
    box-shadow: 0 10px 25px rgba(245, 158, 11, 0.4);
    font-weight: 700;
    z-index: 10002;
    display: flex;
    align-items: center;
    gap: 8px;
}

.xp-amount {
    font-size: 1.1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Badge Carousel */
.badge-carousel-container {
    position: relative;
    width: 100%;
}

.badge-carousel {
    display: flex;
    gap: var(--spacing-lg);
    overflow-x: auto;
    padding: var(--spacing-md) 0;
    scrollbar-width: none;
    cursor: grab;
}

.badge-carousel::-webkit-scrollbar {
    display: none;
}

.badge-carousel.active {
    cursor: grabbing;
}

.badge-item {
    flex: 0 0 160px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: var(--spacing-lg);
    text-align: center;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.badge-item:hover {
    transform: translateY(-10px) rotate(3deg);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.badge-icon {
    font-size: 3rem;
    margin-bottom: var(--spacing-md);
    filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.1));
}

/* Floating Bottom Navigation */
.floating-nav {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 10px 20px;
    border-radius: var(--radius-full);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    display: none;
    align-items: center;
    gap: 25px;
    z-index: var(--z-fixed);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

@media (max-width: 768px) {
    .floating-nav {
        display: flex;
    }
}

.floating-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.floating-nav-item i {
    font-size: 1.25rem;
    font-style: normal;
}

.floating-nav-item.active {
    color: var(--primary);
}

/* Heatmap Style */
.heatmap {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.heatmap-day {
    width: 12px;
    height: 12px;
    background: var(--bg-secondary);
    border-radius: 2px;
}

.heatmap-day.level-1 {
    background: #e0e7ff;
}

.heatmap-day.level-2 {
    background: #818cf8;
}

.heatmap-day.level-3 {
    background: #4f46e5;
}

.heatmap-day.level-4 {
    background: #3730a3;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
}

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

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
}

/* Mobile Menu Drawer */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 320px;
    height: 100vh;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1001;
    transition: right 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 5rem 2rem 2rem;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    overflow-y: auto;
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu a {
    display: flex;
    align-items: center;
    padding: 1rem;
    color: var(--text-main);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    border-radius: 0.75rem;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.mobile-menu a:hover,
.mobile-menu a.active {
    background: var(--bg-body);
    color: var(--primary);
    border-color: rgba(0, 0, 0, 0.05);
    transform: translateX(5px);
}

/* Mobile Overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.mobile-menu-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* =========================================
   UI/UX Enhancements: Empty States & Skeletons
   ========================================= */

/* Empty States */
.empty-state {
    text-align: center;
    padding: var(--spacing-2xl) var(--spacing-xl);
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 2px dashed #cbd5e1;
    color: var(--text-muted);
}

.empty-state-icon {
    font-size: 3rem;
    color: #94a3b8;
    margin-bottom: var(--spacing-md);
    opacity: 0.7;
}

.empty-state-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: var(--spacing-sm);
}

.empty-state-text {
    font-size: 0.95rem;
    max-width: 400px;
    margin: 0 auto var(--spacing-lg) auto;
}

/* Skeleton Loaders */
.skeleton {
    background: #e2e8f0;
    border-radius: var(--radius-sm);
    overflow: hidden;
    position: relative;
    border: none;
}

.skeleton::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    transform: translateX(-100%);
    background-image: linear-gradient(90deg,
            rgba(255, 255, 255, 0) 0,
            rgba(255, 255, 255, 0.4) 20%,
            rgba(255, 255, 255, 0.6) 60%,
            rgba(255, 255, 255, 0) 100%);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    100% {
        transform: translateX(100%);
    }
}

.skeleton-text {
    height: 1rem;
    margin-bottom: 0.5rem;
    border-radius: 4px;
}

.skeleton-title {
    height: 1.5rem;
    width: 60%;
    margin-bottom: 1rem;
    border-radius: 4px;
}

.skeleton-chart {
    height: 250px;
    width: 100%;
    border-radius: var(--radius-md);
}

.skeleton-card {
    height: 100%;
    min-height: 150px;
}