/* Kenya CBK Economic Dashboard - Modern Styling */

/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;700&family=Inter:wght@300;400;500;600&display=swap');

/* CSS Variables */
:root {
    /* Modern Palette */
    --cbk-primary: #00F2EA;      /* Cyan */
    --cbk-secondary: #FF0055;    /* Neon Pink */
    --cbk-tertiary: #FFE600;     /* Electric Yellow */
    --cbk-quaternary: #7000FF;   /* Deep Violet */
    --cbk-success: #00F2EA;
    --cbk-danger: #FF0055;
    
    /* Backgrounds */
    --bg-dark: #05050A;          /* Almost black */
    --bg-card: rgba(18, 18, 28, 0.6);
    --bg-card-hover: rgba(25, 25, 40, 0.8);
    
    /* Text */
    --text-primary: #FFFFFF;
    --text-secondary: #A0A0B0;
    --text-muted: #606070;
    
    /* Effects */
    --glass-border: 1px solid rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
    --neon-shadow: 0 0 10px rgba(0, 242, 234, 0.3);
}

/* Global Styles */
body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(112, 0, 255, 0.05) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(0, 242, 234, 0.05) 0%, transparent 20%);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.kpi-value, .stat-value {
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: -0.03em;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--cbk-primary);
}

/* Card Styling - Glassmorphism */
.card {
    background: var(--bg-card) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: var(--glass-border) !important;
    border-radius: 16px !important;
    box-shadow: var(--glass-shadow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
    background: var(--bg-card-hover) !important;
    transform: translateY(-2px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.15) !important;
}

/* KPI Cards */
.kpi-card-icon {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem auto;
    transition: all 0.3s ease;
}

.card:hover .kpi-card-icon {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

/* Tabs */
.nav-tabs {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 2rem;
}

.nav-tabs .nav-link {
    font-family: 'Space Grotesk', sans-serif;
    color: var(--text-secondary);
    border: none;
    background: transparent;
    padding: 1rem 1.5rem;
    font-size: 0.95rem;
    position: relative;
    transition: all 0.3s ease;
    opacity: 0.7;
}

.nav-tabs .nav-link:hover {
    color: var(--text-primary);
    opacity: 1;
}

.nav-tabs .nav-link.active {
    background: transparent !important;
    color: var(--cbk-primary) !important;
    font-weight: 600;
    opacity: 1;
    border: none;
}

.nav-tabs .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--cbk-primary);
    box-shadow: var(--neon-shadow);
}

/* Charts */
.dash-graph {
    border-radius: 12px;
    overflow: hidden;
}

.js-plotly-plot .plotly .modebar {
    right: 10px !important;
    top: 0px !important;
}

/* Header */
.header-title {
    font-size: 2.5rem;
    background: linear-gradient(to right, #fff, #a0a0b0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) backwards;
}

/* Stagger animations for cards */
.row > div:nth-child(1) .card { animation-delay: 0.1s; }
.row > div:nth-child(2) .card { animation-delay: 0.2s; }
.row > div:nth-child(3) .card { animation-delay: 0.3s; }
.row > div:nth-child(4) .card { animation-delay: 0.4s; }

/* Responsive Adjustments */
@media (max-width: 768px) {
    .header-title {
        font-size: 1.75rem;
    }
    
    .kpi-value {
        font-size: 1.5rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .nav-tabs .nav-link {
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
    }
}

/* Loading Spinner */
._dash-loading {
    border-top-color: var(--cbk-primary) !important;
}

/* Utility Classes */
.text-gradient-primary {
    background: linear-gradient(135deg, var(--cbk-primary), var(--cbk-quaternary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.border-neon {
    border: 1px solid var(--cbk-primary);
    box-shadow: 0 0 15px rgba(0, 242, 234, 0.2);
}

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

/* Hover effects for table rows if any */
tr:hover td {
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.05);
}
