/**
 * Light / dark semantic tokens — use var(--text-primary), var(--bg-surface), etc.
 */
:root {
    --primary: #047857;
    --primary-dark: #065f46;
    --primary-light: #ecfdf5;
    --accent: #0ea5e9;
    --secondary: #10b981;
    --danger: #dc2626;
    --warning: #d97706;

    --bg-page: #f1f5f9;
    --bg-surface: #ffffff;
    --bg-surface-2: #f8fafc;
    --bg-input: #ffffff;
    --bg-sidebar: #1e293b;

    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-muted: #64748b;
    --text-on-primary: #ffffff;
    --text-on-sidebar: rgba(255, 255, 255, 0.88);
    --text-link: #047857;

    --border: #e2e8f0;
    --border-strong: #cbd5e1;
    --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.05);
    --shadow: 0 4px 12px rgb(15 23 42 / 0.08);
    --shadow-md: 0 8px 24px rgb(15 23 42 / 0.12);
    --radius: 14px;
    --radius-sm: 10px;

    /* Legacy aliases used in style.css */
    --dark: var(--text-primary);
    --light: var(--bg-page);
    --gray: var(--text-muted);
    --sidebar-bg: var(--bg-sidebar);
    --si-orange: var(--warning);
    --si-blue: var(--accent);
    --si-red: var(--text-primary);
}

html.dark-mode,
body.dark-mode {
    --primary: #34d399;
    --primary-dark: #10b981;
    --primary-light: #134e4a;
    --accent: #38bdf8;

    --bg-page: #0f172a;
    --bg-surface: #1e293b;
    --bg-surface-2: #334155;
    --bg-input: #334155;
    --bg-sidebar: #020617;

    --text-primary: #f1f5f9;
    --text-secondary: #e2e8f0;
    --text-muted: #94a3b8;
    --text-on-primary: #0f172a;
    --text-link: #6ee7b7;

    --border: #475569;
    --border-strong: #64748b;
    --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.3);
    --shadow: 0 4px 12px rgb(0 0 0 / 0.35);
    --shadow-md: 0 8px 24px rgb(0 0 0 / 0.45);

    --dark: var(--text-primary);
    --light: var(--bg-page);
    --gray: var(--text-muted);
    --sidebar-bg: var(--bg-sidebar);
}
