/* =========================================================
   BASE — Reset, tokens, typography
   ========================================================= */

/* ---------- THEME TOKENS ---------- */
:root {
    --bg:            #f7f8fa;
    --surface:       #ffffff;
    --surface-2:     #f3f4f6;
    --surface-3:     #eef0f3;
    --border:        #e5e7eb;
    --border-strong: #d1d5db;
    --text:          #111827;
    --text-muted:    #6b7280;
    --text-soft:     #9ca3af;
    --primary:       #ea580c;
    --primary-hover: #c2410c;
    --primary-soft:  #fff1e8;
    --primary-border:#fed7aa;
    --danger:        #dc2626;
    --danger-hover:  #b91c1c;
    --danger-soft:   #fee2e2;
    --success:       #059669;
    --success-soft:  #d1fae5;
    --warning:       #d97706;
    --warning-soft:  #fef3c7;
    --info:          #2563eb;
    --info-soft:     #dbeafe;
    --sidebar-bg:    #ffffff;
    --shadow-sm:     0 1px 2px rgba(16,24,40,.06);
    --shadow-md:     0 4px 12px rgba(16,24,40,.08);
    --shadow-lg:     0 12px 32px rgba(16,24,40,.10);
    --radius-sm:     8px;
    --radius-md:     12px;
    --radius-lg:     16px;
    --radius-pill:   999px;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI',
            Roboto, Oxygen, Ubuntu, sans-serif;
}

[data-theme="dark"] {
    --bg:            #0a0b0f;
    --surface:       #14161c;
    --surface-2:     #1a1d24;
    --surface-3:     #22252e;
    --border:        #262932;
    --border-strong: #353944;
    --text:          #e5e7eb;
    --text-muted:    #9aa1ae;
    --text-soft:     #6b7280;
    --primary-soft:  rgba(234,88,12,.14);
    --primary-border:rgba(234,88,12,.35);
    --danger-soft:   rgba(220,38,38,.15);
    --success-soft:  rgba(5,150,105,.15);
    --warning-soft:  rgba(217,119,6,.15);
    --info-soft:     rgba(37,99,235,.15);
    --sidebar-bg:    #0f1116;
    --shadow-sm:     0 1px 2px rgba(0,0,0,.35);
    --shadow-md:     0 4px 14px rgba(0,0,0,.4);
    --shadow-lg:     0 12px 40px rgba(0,0,0,.5);
}

/* ---------- RESET ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html, body { height: 100%; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background .2s ease, color .2s ease;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }
img { display: block; max-width: 100%; }
svg { display: block; flex-shrink: 0; }

/* ---------- UTILITY ---------- */
.hidden { display: none !important; }
.text-muted { color: var(--text-muted); }
.text-right { text-align: right; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.w-100 { width: 100%; }

/* ---------- SCROLLBAR ---------- */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 4px; }
::-webkit-scrollbar-track { background: transparent; }