/* ============================================
   BASE STYLES — Reset, Layout, Global
   ============================================ */

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

/* ---- Reset ---- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-family);
    font-size: var(--fs-body);
    font-weight: var(--fw-regular);
    line-height: var(--lh-normal);
    color: var(--text-primary);
    background-color: var(--bg-primary);
    min-height: 100vh;
    transition: background-color var(--transition-slow), color var(--transition-slow);
}

/* ---- Subtle Background Pattern ---- */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(52, 211, 153, 0.06), transparent),
        radial-gradient(ellipse 60% 40% at 80% 100%, rgba(96, 165, 250, 0.04), transparent);
    pointer-events: none;
    z-index: 0;
}

[data-theme="light"] body::before {
    background:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(52, 211, 153, 0.03), transparent),
        radial-gradient(ellipse 60% 40% at 80% 100%, rgba(96, 165, 250, 0.02), transparent);
}

/* ---- Dashboard Shell ---- */
.dashboard {
    position: relative;
    z-index: var(--z-base);
    max-width: 1440px;
    margin: 0 auto;
    padding: var(--space-8) var(--space-8) var(--space-16);
}

/* ---- Header ---- */
.dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-10);
    flex-wrap: wrap;
    gap: var(--space-4);
}

.header-left {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.logo {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-md);
    background: var(--gradient-emerald);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: var(--fw-bold);
    color: #0f1117;
    flex-shrink: 0;
}

.header-title h1 {
    font-size: var(--fs-h1);
    font-weight: var(--fw-bold);
    letter-spacing: -0.02em;
    line-height: var(--lh-tight);
}

.header-title p {
    font-size: var(--fs-caption);
    color: var(--text-secondary);
    margin-top: var(--space-1);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: var(--fw-medium);
}

.header-right {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

/* ---- KPI Grid ---- */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: var(--space-5);
    margin-bottom: var(--space-8);
}

/* ---- Charts Grid ---- */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-5);
    margin-bottom: var(--space-8);
}

.charts-grid .chart-card.full-width {
    grid-column: 1 / -1;
}

/* ---- Bottom Grid ---- */
.bottom-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-5);
}

/* ---- Section Labels ---- */
.section-label {
    font-size: var(--fs-micro);
    font-weight: var(--fw-semibold);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: var(--space-4);
    padding-left: var(--space-1);
}

/* ---- Utility ---- */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

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

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}