:root {
    /* Color Palette - Premium Dark Theme */
    --bg-dark: #0f172a;
    --bg-darker: #020617;
    --primary: #3b82f6;
    --primary-glow: rgba(59, 130, 246, 0.4);
    --secondary: #8b5cf6;
    --secondary-glow: rgba(139, 92, 246, 0.4);
    --accent: #10b981;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    
    /* Glassmorphism settings */
    --glass-bg: rgba(30, 41, 59, 0.6);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    
    /* Trends */
    --trend-up: #10b981;
    --trend-down: #ef4444;
    --trend-neutral: #eab308;
    
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-darker);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Dynamic Background Blobs */
.background-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    z-index: -1;
}

.blob {
    position: absolute;
    filter: blur(90px);
    opacity: 0.5;
    animation: float 20s infinite ease-in-out alternate;
    border-radius: 50%;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
    animation-delay: 0s;
}

.blob-2 {
    bottom: -10%;
    right: -10%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, var(--secondary-glow) 0%, transparent 70%);
    animation-delay: -5s;
}

.blob-3 {
    top: 40%;
    left: 40%;
    width: 40vw;
    height: 40vw;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.15) 0%, transparent 70%);
    animation-delay: -10s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(5%, 5%) scale(1.1); }
    100% { transform: translate(-5%, -5%) scale(0.9); }
}

/* Glassmorphism utility */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: var(--glass-shadow);
}

.app-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    min-height: 100vh;
}

/* Header */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 32px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.6rem;
    font-weight: 700;
}

.logo i {
    color: var(--primary);
    font-size: 2rem;
    filter: drop-shadow(0 0 8px var(--primary-glow));
}

.logo span {
    color: var(--primary);
    font-weight: 300;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.nav-btn:hover {
    background: var(--primary);
    transform: scale(1.1);
    box-shadow: 0 0 20px var(--primary-glow);
    border-color: transparent;
}

.current-month {
    font-size: 1.6rem;
    font-weight: 600;
    min-width: 220px;
    text-align: center;
    letter-spacing: 0.5px;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
}

.avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 15px var(--secondary-glow);
}

/* Dashboard Content Layout */
.dashboard-content {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 24px;
    flex: 1;
}

/* Sidebar */
.month-sidebar {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    height: calc(100vh - 120px);
    position: sticky;
    top: 96px;
}

.month-sidebar h3 {
    font-size: 1.1rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.month-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
    padding-right: 8px;
}

/* Custom Scrollbar */
.month-list::-webkit-scrollbar,
.table-responsive::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
.month-list::-webkit-scrollbar-track,
.table-responsive::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.02);
    border-radius: 4px;
}
.month-list::-webkit-scrollbar-thumb,
.table-responsive::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.15);
    border-radius: 4px;
}
.month-list::-webkit-scrollbar-thumb:hover,
.table-responsive::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.3);
}

.month-item {
    padding: 14px 18px;
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition-smooth);
    border: 1px solid transparent;
    font-weight: 500;
    color: var(--text-muted);
    display: flex;
    align-items: center;
}

.month-item::before {
    content: '';
    width: 8px;
    height: 8px;
    background-color: transparent;
    border-radius: 50%;
    margin-right: 12px;
    transition: var(--transition-smooth);
}

.month-item:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateX(5px);
    color: var(--text-main);
}

.month-item.active {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.15), transparent);
    border-left: 4px solid var(--primary);
    color: var(--text-main);
    font-weight: 600;
}

.month-item.active::before {
    background-color: var(--primary);
    box-shadow: 0 0 10px var(--primary);
}

/* Main Stats */
.main-stats {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
}

.card {
    padding: 24px;
    display: flex;
    align-items: flex-start;
    gap: 18px;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 100%);
    opacity: 0;
    transition: var(--transition-smooth);
    pointer-events: none;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px 0 rgba(0, 0, 0, 0.4);
    border-color: rgba(255,255,255,0.15);
}

.card:hover::after {
    opacity: 1;
}

.card-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    box-shadow: inset 0 0 20px rgba(59, 130, 246, 0.05);
}

.card:nth-child(2) .card-icon { background: rgba(16, 185, 129, 0.1); color: var(--accent); box-shadow: inset 0 0 20px rgba(16, 185, 129, 0.05);}
.card:nth-child(3) .card-icon { background: rgba(139, 92, 246, 0.1); color: var(--secondary); box-shadow: inset 0 0 20px rgba(139, 92, 246, 0.05);}
.card:nth-child(4) .card-icon { background: rgba(245, 158, 11, 0.1); color: #f59e0b; box-shadow: inset 0 0 20px rgba(245, 158, 11, 0.05);}

.card-info {
    flex: 1;
}

.card-info p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 8px;
    font-weight: 500;
}

.card-info h3 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.trend {
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 20px;
    background: rgba(255,255,255,0.05);
}

.trend.up { color: var(--trend-up); background: rgba(16, 185, 129, 0.1); }
.trend.down { color: var(--trend-down); background: rgba(239, 68, 68, 0.1); }
.trend.neutral { color: var(--trend-neutral); background: rgba(234, 179, 8, 0.1); }

/* Charts Area */
.charts-area {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

.chart-card {
    padding: 24px;
    display: flex;
    flex-direction: column;
}

.chart-header {
    margin-bottom: 24px;
}

.chart-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.chart-header h3::before {
    content: '';
    width: 12px;
    height: 12px;
    background: var(--primary);
    border-radius: 4px;
    display: inline-block;
}

.chart-container {
    flex: 1;
    position: relative;
    min-height: 280px;
}

/* Detailed Data Table */
.table-card {
    padding: 24px;
}

.card-header {
    margin-bottom: 24px;
}

.card-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
}

.table-responsive {
    overflow-x: auto;
}

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

th, td {
    padding: 18px;
    text-align: left;
    border-bottom: 1px solid var(--glass-border);
}

th {
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

tbody tr {
    transition: var(--transition-smooth);
}

tbody tr:hover {
    background: rgba(255, 255, 255, 0.04);
}

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

.highlight-badge {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-block;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }
.delay-6 { animation-delay: 0.6s; }
.delay-7 { animation-delay: 0.7s; }

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

/* Responsive Design */
@media (max-width: 1200px) {
    .charts-area {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 992px) {
    .dashboard-content {
        grid-template-columns: 1fr;
    }
    
    .month-sidebar {
        height: auto;
        position: static;
        padding: 16px;
    }
    
    .month-list {
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 8px;
    }
    
    .month-item {
        white-space: nowrap;
        border-radius: 20px;
        padding: 10px 16px;
    }
    
    .month-item::before {
        display: none;
    }
    
    .month-item.active {
        border-left: none;
        background: var(--primary);
        color: white;
    }
    
    .app-header {
        flex-direction: column;
        gap: 20px;
    }
    
    .user-name {
        display: none;
    }
}

@media (max-width: 600px) {
    .summary-cards {
        grid-template-columns: 1fr;
    }
    
    .current-month {
        min-width: 150px;
        font-size: 1.3rem;
    }
    
    .nav-btn {
        width: 36px;
        height: 36px;
    }
}
