/* assets/css/tokens.css */

/* ── Base typography ──────────────────────────────────────────
   One UI family across the whole app (Plus Jakarta Sans), matching
   the panel design system. Form controls are included because
   <button>/<input>/<select>/<textarea> do NOT inherit font-family
   from the UA stylesheet and would otherwise fall back to the
   browser default (Arial). Loaded by every shell, so it is set
   once here rather than repeated per stylesheet.               */
html {
    --font-ui: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    --font-mono: ui-monospace, 'Cascadia Code', Consolas, monospace;
}
body {
    font-family: var(--font-ui);
    -webkit-font-smoothing: antialiased;
}
button, input, select, textarea, optgroup, fieldset, legend {
    font: inherit;
    font-family: inherit;
}

:root, [data-theme="light"] {
    /* White & Signal Orange — industrial accent in both themes */
    --bg-color: #ffffff;
    --bg-surface: #f4f5f7;
    --bg-surface-glass: rgba(255, 255, 255, 0.9);
    
    /* Text Colors */
    --text-main: #1a1d20;
    --text-muted: #5e6670;
    --text-on-primary: #1a1d20; /* Near-black text on orange (7.3:1) */
    
    /* Signal Orange — industrial accent (Rule 4) */
    --color-primary: #FF6A00;
    --color-primary-hover: #E85F00;
    
    --color-secondary: #1a1d20;
    --color-secondary-hover: #33383d;
    
    --border-color: #e2e8f0;
    
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 8px 16px rgba(0, 0, 0, 0.08);
    --shadow-glass: 0 10px 40px rgba(0, 0, 0, 0.06);
    
    --glow-primary: rgba(255, 106, 0, 0.5);
    --color-success: #059669; /* semantic positive delta / live status */
    --color-ink: #1a1d20;         /* neutral dark surface (ticker, buttons, avatars) */
    --status-available: #059669;
    --status-funding: #2563eb;
    --status-sold: #dc2626;

    /* Aliases: light.css / dark.css / style.css reference these legacy names.
       Without them those rules resolve to nothing. Keep in sync with the above. */
    --bg: var(--bg-color);
    --bg-soft: #f6f7f9;            /* page background behind cards */
    --surface: var(--bg-surface);
    --nav-bg: var(--bg-color);
    --text: var(--text-main);
    --border: var(--border-color);
    --color-primary-dark: var(--color-primary-hover);
    --color-primary-soft: #FFE8D9; /* soft orange for table heads / chips */
}

[data-theme="dark"] {
    /* Dark Steel base — Rule 4 (replaces pure black) */
    --bg-color: #0E1013;
    --bg-surface: #14171C;
    --bg-surface-glass: rgba(14, 17, 19, 0.88);
    
    --text-main: #f8f9fa;
    --text-muted: #9ba4b5;
    --text-on-primary: #000000;
    
    /* Signal Orange */
    --color-primary: #FF6A00;
    --color-primary-hover: #FF7D1F; /* brighter on dark for hover lift */
    
    --color-secondary: #ffffff;
    --color-secondary-hover: #f0f0f0;
    
    --border-color: #23262C;
    
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 8px 16px rgba(0, 0, 0, 0.5);
    --shadow-glass: 0 10px 40px rgba(0, 0, 0, 0.6);
    
    --glow-primary: rgba(255, 106, 0, 0.35);
    --color-success: #34d399;
    --color-ink: #0E1013;
    --status-available: #34d399;
    --status-funding: #60a5fa;
    --status-sold: #f87171;

    /* Legacy aliases (dark) */
    --bg-soft: #0E1013;
    --color-primary-soft: rgba(255, 106, 0, 0.16);
}
