@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;700&display=swap');

:root {
    /* Enhanced Color Palette */
    --navy: #0A1628;
    --navy-light: #1a2942;
    --navy-dark: #050B14;
    --slate: #334155;
    --slate-light: #475569;
    --gold: #D4AF37;
    --gold-dim: #B8972F;
    --gold-bright: #FFD700;
    --blue: #0EA5E9;
    --blue-dark: #0284C7;
    --blue-bright: #38BDF8;
    --cyan: #06B6D4;
    --purple: #A855F7;
    --pink: #EC4899;
    --green: #10B981;
    --gray-50: #F8FAFC;
    --gray-100: #F1F5F9;
    --gray-200: #E2E8F0;
    --gray-700: #334155;
    --gray-800: #1E293B;
    --gray-900: #0F172A;

    /* Layout */
    --sidebar-width: 280px;
    --header-height: 80px;
    --content-max: 1400px;

    /* Enhanced Shadows & Effects */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --glow-gold: 0 0 30px rgba(212, 175, 55, 0.4);
    --glow-blue: 0 0 30px rgba(14, 165, 233, 0.5);
    --glow-cyan: 0 0 30px rgba(6, 182, 212, 0.5);
    --glow-purple: 0 0 30px rgba(168, 85, 247, 0.4);
}

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

body {
    font-family: 'Inter', sans-serif;
    background: var(--navy);
    color: var(--gray-100);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Animated Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 30%, rgba(14, 165, 233, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(168, 85, 247, 0.06) 0%, transparent 40%),
        radial-gradient(circle at 50% 50%, rgba(6, 182, 212, 0.05) 0%, transparent 50%);
    animation: backgroundPulse 15s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes backgroundPulse {

    0%,
    100% {
        opacity: 0.6;
        transform: scale(1);
    }

    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

.mono {
    font-family: 'JetBrains Mono', monospace;
}

/* Layout */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Navigation */
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.95) 0%, rgba(10, 22, 40, 0.98) 100%);
    border-right: 1px solid rgba(59, 130, 246, 0.15);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.3);
    position: fixed;
    height: 100vh;
    display: flex;
    flex-direction: column;
    z-index: 200;
}

.sidebar-header {
    padding: 36px 28px;
    border-bottom: 1px solid rgba(59, 130, 246, 0.2);
    background: rgba(10, 22, 40, 0.5);
}

.sidebar-logo {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--blue) 0%, #60A5FA 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    display: block;
    letter-spacing: 1px;
    text-shadow: 0 2px 12px rgba(59, 130, 246, 0.4);
}

.sidebar-subtitle {
    font-size: 0.7rem;
    color: var(--gray-200);
    margin-top: 8px;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    opacity: 0.8;
}

.sidebar-nav {
    flex: 1;
    padding: 24px 0;
    overflow-y: auto;
}

.nav-section {
    margin-bottom: 32px;
}

.nav-section-title {
    font-size: 0.65rem;
    font-weight: 800;
    color: var(--blue);
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 0 28px 12px;
    opacity: 0.7;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 14px 28px;
    color: var(--gray-200);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    font-weight: 500;
}

.nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--blue), #60A5FA);
    transform: scaleY(0);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.6);
}

.nav-link:hover {
    background: rgba(59, 130, 246, 0.08);
    color: var(--blue);
    padding-left: 32px;
}

.nav-link:hover::before {
    transform: scaleY(1);
}

.nav-link.active {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.15) 0%, transparent 100%);
    color: var(--blue);
    font-weight: 600;
}

.nav-link.active::before {
    transform: scaleY(1);
}

.nav-icon {
    width: 24px;
    margin-right: 14px;
    font-size: 1.2rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* Main Content Area */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    min-height: 100vh;
    background: var(--navy);
}

.content-header {
    height: var(--header-height);
    background: linear-gradient(135deg, rgba(26, 41, 66, 1) 0%, rgba(15, 23, 42, 1) 100%);
    border-bottom: 1px solid rgba(59, 130, 246, 0.2);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 48px;
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: none;
}

.page-title {
    font-size: 1.85rem;
    font-weight: 800;
    background: linear-gradient(135deg, #fff 0%, var(--blue) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.5px;
}

.content-body {
    padding: 48px;
    max-width: var(--content-max);
}

/* Enhanced Glass Cards */
.glass-card {
    background: linear-gradient(135deg, rgba(26, 41, 66, 0.6) 0%, rgba(15, 23, 42, 0.4) 100%);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 20px;
    padding: 32px;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 0 0 1px rgba(14, 165, 233, 0.1);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

/* Animated gradient border */
.glass-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg,
            var(--blue),
            var(--cyan),
            var(--purple),
            var(--pink),
            var(--blue));
    background-size: 300% 300%;
    border-radius: 20px;
    z-index: -1;
    opacity: 0;
    animation: gradientRotate 6s ease infinite;
    transition: opacity 0.5s;
}

@keyframes gradientRotate {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

/* Shimmer effect */
.glass-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.1),
            transparent);
    transition: left 0.7s ease-in-out;
}

.glass-card:hover::after {
    left: 100%;
}

.glass-card:hover::before {
    opacity: 0.6;
}

.glass-card:hover {
    transform: translateY(-6px) scale(1.01);
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 40px rgba(14, 165, 233, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border-color: rgba(14, 165, 233, 0.4);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(59, 130, 246, 0.2);
}

.card-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--blue);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    text-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.card-badge {
    font-size: 0.65rem;
    padding: 6px 12px;
    background: rgba(14, 165, 233, 0.15);
    color: var(--blue);
    border-radius: 6px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    border: 1px solid rgba(14, 165, 233, 0.3);
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.2);
}

/* Grid Layouts */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
}

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

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

/* Stat Counters */
.stat-box {
    text-align: center;
    padding: 28px 24px;
    background: linear-gradient(135deg, rgba(26, 41, 66, 1) 0%, rgba(15, 23, 42, 1) 100%);
    border-radius: 12px;
    border: 1px solid rgba(59, 130, 246, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.stat-box::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--blue), transparent);
    transform: scaleX(0);
    transition: transform 0.4s;
}

.stat-box:hover {
    transform: translateY(-2px);
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.3),
        0 0 20px rgba(59, 130, 246, 0.2);
}

.stat-box:hover::after {
    transform: scaleX(1);
}

.stat-value {
    font-size: 2.75rem;
    font-weight: 800;
    color: #ffffff;
    font-family: 'JetBrains Mono', monospace;
    line-height: 1;
    margin-bottom: 12px;
}

.stat-label {
    font-size: 0.7rem;
    color: var(--gray-200);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 700;
    opacity: 0.9;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: var(--accent);
    color: var(--navy);
}

.btn-primary:hover {
    background: var(--accent-light);
    box-shadow: var(--glow-accent);
}

.btn-secondary {
    background: transparent;
    color: var(--gray-200);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--accent);
    color: var(--accent);
}

/* Loading States */
.loading {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray-200);
    font-size: 0.9rem;
}

.loading::before {
    content: '';
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border-top-color: var(--accent);
    animation: spin 0.8s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Chart Containers */
.chart-container {
    position: relative;
    height: 300px;
    margin: 24px 0;
}

.chart-container canvas {
    max-height: 300px;
}

/* Data Visualization Enhancements */
.chart-wrapper {
    background: rgba(15, 23, 42, 0.4);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid rgba(59, 130, 246, 0.15);
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.chart-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--blue);
    text-transform: uppercase;
    letter-spacing: 1.2px;
}

.chart-legend {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--gray-200);
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 3px;
}

/* Animated Counter */
.counter {
    display: inline-block;
    font-variant-numeric: tabular-nums;
}

/* Pulse Animation */
@keyframes pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

.pulse {
    animation: pulse 2s ease-in-out infinite;
}

/* Glow Animation */
@keyframes glow {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(14, 165, 233, 0.3);
    }

    50% {
        box-shadow: 0 0 40px rgba(14, 165, 233, 0.6);
    }
}

.glow {
    animation: glow 2s ease-in-out infinite;
}

/* Fade In Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

.fade-in {
    animation: fadeIn 0.6s ease-out forwards;
}

/* Slide In Animation */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

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

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

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

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

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .main-content {
        margin-left: 0;
    }

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