:root {
    --bg-color: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --card-border: rgba(255, 255, 255, 0.1);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --accent: #3b82f6;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #06b6d4;
    --sidebar-bg: rgba(15, 23, 42, 0.95);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(59, 130, 246, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 85% 30%, rgba(16, 185, 129, 0.15) 0%, transparent 50%);
    background-attachment: fixed;
}

.dashboard-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--card-border);
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    backdrop-filter: blur(10px);
    z-index: 100;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 2.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}
.logo::before {
    content: '';
    display: inline-block;
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, var(--accent), var(--success));
    border-radius: 6px;
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex-grow: 1;
}

.nav-link {
    text-decoration: none;
    color: var(--text-muted);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-link:hover, .nav-link.active {
    background-color: rgba(59, 130, 246, 0.1);
    color: var(--accent);
}

.report-meta {
    margin-top: auto;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
}
.report-meta p {
    margin-bottom: 0.5rem;
}

/* Main Content */
.main-content {
    flex-grow: 1;
    margin-left: 260px;
    padding: 2rem 3rem;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
}

h1 {
    font-size: 1.8rem;
    font-weight: 600;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    background: var(--card-bg);
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid var(--card-border);
}

.status-indicator {
    width: 8px;
    height: 8px;
    background-color: var(--success);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--success);
    animation: pulse 2s infinite;
}

.section {
    margin-bottom: 4rem;
}

.section-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Utilities */
.mb-4 { margin-bottom: 2rem; }
.mt-4 { margin-top: 2rem; }
.mt-3 { margin-top: 1.5rem; }
.text-success { color: var(--success) !important; font-weight: 600; }
.text-warning { color: var(--warning) !important; }
.text-danger { color: var(--danger) !important; }
.font-weight-bold { font-weight: 700; }

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.badge-success { background: rgba(16, 185, 129, 0.15); color: var(--success); border: 1px solid rgba(16, 185, 129, 0.3); }
.badge-warning { background: rgba(245, 158, 11, 0.15); color: var(--warning); border: 1px solid rgba(245, 158, 11, 0.3); }
.badge-danger { background: rgba(239, 68, 68, 0.15); color: var(--danger); border: 1px solid rgba(239, 68, 68, 0.3); }
.badge-info { background: rgba(6, 182, 212, 0.15); color: var(--info); border: 1px solid rgba(6, 182, 212, 0.3); }

/* Glassmorphism */
.glass {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.chart-container-large {
    width: 100%;
    height: auto;
    padding: 2rem;
}

/* Grids */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

.two-col-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.cards-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.action-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

/* KPI Cards */
.kpi-title {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.kpi-value {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.kpi-trend {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.trend-down span { color: var(--warning); font-weight: 600; }
.trend-down-good span { color: var(--success); font-weight: 600; }

/* Tables */
.table-responsive {
    width: 100%;
    overflow-x: auto;
}

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

.data-table th, .data-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--card-border);
}

.data-table th {
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
}

.detailed-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.total-row td {
    background: rgba(59, 130, 246, 0.1);
    border-top: 2px solid var(--accent);
    border-bottom: none;
}

.blur-table {
    opacity: 0.5;
    filter: blur(1px);
    pointer-events: none;
}

.note {
    font-size: 0.85rem;
    color: var(--text-muted);
    padding: 1rem;
    background: rgba(245, 158, 11, 0.05);
    border-radius: 8px;
    border-left: 3px solid var(--warning);
}

/* Cause List */
.cause-list {
    list-style: none;
    margin-top: 1.5rem;
}
.cause-list li {
    margin-bottom: 1.5rem;
}
.cause-list p {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Bonus Cards */
.info-card h3 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.info-card ul {
    list-style: none;
}

.info-card li {
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    padding-left: 1.5rem;
    position: relative;
}
.info-card li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent);
}

.success-border { border-top: 4px solid var(--success); }
.warning-border { border-top: 4px solid var(--warning); }

/* Alerts & Actions */
.alert-box {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1.5rem;
    border-radius: 12px;
}
.alert-icon {
    font-size: 1.5rem;
}
.warning-box {
    border-left: 4px solid var(--warning);
    background: rgba(245, 158, 11, 0.05);
}
.info-box {
    border-left: 4px solid var(--info);
    background: rgba(6, 182, 212, 0.05);
}
.alert-content h4 {
    margin-bottom: 0.5rem;
    font-size: 1rem;
}
.alert-content p {
    font-size: 0.9rem;
    color: var(--text-muted);
}
.info-box h4 { color: var(--info); }
.warning-box h4 { color: var(--warning); }

.action-item {
    display: flex;
    gap: 1rem;
}
.action-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--accent);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
}
.action-text h4 {
    margin-bottom: 0.25rem;
}
.action-text p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Animations */
@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.animate-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; }

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

/* Responsive */
@media (max-width: 1024px) {
    .two-col-grid { grid-template-columns: 1fr; }
    .cards-grid-3 { grid-template-columns: 1fr 1fr; }
    .action-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); }
    .main-content { margin-left: 0; padding: 1.5rem; }
    .cards-grid-3 { grid-template-columns: 1fr; }
}
