/* === BASE: Variables, Reset, Typography === */
:root {
    /* Primary */
    --accent: #0057FF;
    --accent-hover: #0045CC;
    --accent-light: rgba(0, 87, 255, 0.08);
    --accent-glow: rgba(0, 87, 255, 0.15);

    /* Backgrounds */
    --bg: #F5F6FA;
    --bg-secondary: #FFFFFF;
    --bg-card: #FFFFFF;
    --bg-hover: #F0F1F5;
    --bg-input: #FFFFFF;

    /* Text */
    --text: #191919;
    --text-secondary: #707070;
    --text-muted: #A4A4A4;

    /* Borders */
    --border: #E8E8E8;
    --border-hover: #D0D0D0;

    /* Status colors */
    --green: #22C55E;
    --green-bg: rgba(34, 197, 94, 0.1);
    --yellow: #F59E0B;
    --yellow-bg: rgba(245, 158, 11, 0.1);
    --red: #EF4444;
    --red-bg: rgba(239, 68, 68, 0.1);
    --blue: #3B82F6;
    --blue-bg: rgba(59, 130, 246, 0.1);

    /* Shape */
    --radius: 8px;
    --radius-sm: 6px;
    --radius-xs: 4px;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 4px 20px rgba(0, 0, 0, 0.08);
    --transition: 0.2s ease;

    /* Layout */
    --sidebar-width: 240px;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

html {
    font-size: 15px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1 {
    font-size: 1.65rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text);
}

h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text);
}

h3 {
    font-size: 1.05rem;
    font-weight: 600;
}

h4 {
    font-size: 0.95rem;
    font-weight: 500;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    color: var(--accent-hover);
}

.text-muted {
    color: var(--text-secondary);
}

.hidden {
    display: none !important;
}

::selection {
    background: var(--accent);
    color: white;
}

::-webkit-scrollbar {
    width: 6px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

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

/* Loading spinner */
.loading-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 4rem;
}

.loading-spinner::after {
    content: '';
    width: 36px;
    height: 36px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

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

.error-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}
