/*
 * WLinks — tokens del sistema de diseño (FUENTE ÚNICA).
 *
 * Los usan: el tema (style.css), el flujo /go/ (flow.css), el panel de usuario
 * (dashboard.css), el formulario de acortar (shortener.css) y la administración (admin-ui.css).
 *
 * El tema solo sobrescribe los 4 colores de marca y las fuentes desde el Personalizador
 * (--brand-accent, --brand-highlight, --c-ink-light, --c-paper-light, --font-*).
 * Modo oscuro: clase .dark-mode en <html> (la pone el tema).
 */
:root {
    /* Marca (editables en Apariencia → Personalizar) */
    --brand-accent: #4338ca;
    --brand-highlight: #0d9488;
    --c-ink-light: #0b1c30;
    --c-paper-light: #f8f9ff;
    --font-heading: "Plus Jakarta Sans", system-ui, sans-serif;
    --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
    --font-mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", Consolas, monospace;
    --font-size: 16px;

    /* Superficies y texto */
    --c-bg: var(--c-paper-light);
    --c-surface: #ffffff;
    --c-soft: #eff4ff;
    --c-soft-2: #e5eeff;
    --c-ink: var(--c-ink-light);
    --c-muted: #464554;
    --c-subtle: #64748b;
    --c-line: #e2e8f0;
    --c-line-strong: #cbd5e1;

    /* Acción (índigo) */
    --c-accent: var(--brand-accent);
    --c-accent-hover: color-mix(in srgb, var(--brand-accent) 82%, #000);
    --c-accent-soft: #e3dfff;
    --c-accent-ink: #ffffff;
    --c-accent-text: var(--brand-accent);

    /* Positivo / dinero (verde azulado) y tráfico (cian) */
    --c-pos: var(--brand-highlight);
    --c-pos-soft: #86f2e4;
    --c-pos-ink: #006f66;
    --c-cyan: #06b6d4;
    --c-mark: #e3dfff;

    /* Estados */
    --c-ok-bg: #ecfdf5;  --c-ok-ink: #047857;  --c-ok-line: #a7f3d0;
    --c-warn-bg: #fffbeb; --c-warn-ink: #b45309; --c-warn-line: #fde68a;
    --c-err-bg: #fef2f2;  --c-err-ink: #b91c1c;  --c-err-line: #fecaca;

    /* Forma y profundidad */
    --r-sm: 8px;
    --r-md: 12px;
    --r-lg: 16px;
    --r-xl: 24px;
    --shadow-1: 0 1px 2px 0 rgba(15, 23, 42, .04);
    --shadow-2: 0 4px 12px -2px rgba(15, 23, 42, .06), 0 2px 4px -1px rgba(15, 23, 42, .03);
    --shadow-3: 0 20px 25px -5px rgba(15, 23, 42, .08), 0 8px 10px -6px rgba(15, 23, 42, .04);
    --glass: rgba(255, 255, 255, .82);
    color-scheme: light;

    /* Alias heredados (versiones anteriores del tema) */
    --text-primary: var(--c-ink);
    --text-secondary: var(--c-muted);
    --bg-surface: var(--c-surface);
    --bg-dark: var(--c-bg);
}

html.dark-mode {
    --c-bg: #0a1222;
    --c-surface: #111a2e;
    --c-soft: #15203a;
    --c-soft-2: #1b2846;
    --c-ink: #e7ecff;
    --c-muted: #a6b0c8;
    --c-subtle: #8a95ad;
    --c-line: #23304b;
    --c-line-strong: #31405f;
    --c-accent: color-mix(in srgb, var(--brand-accent) 58%, #ffffff);
    --c-accent-hover: color-mix(in srgb, var(--brand-accent) 45%, #ffffff);
    --c-accent-soft: color-mix(in srgb, var(--brand-accent) 26%, #0a1222);
    --c-accent-ink: #0a0f24;
    --c-accent-text: color-mix(in srgb, var(--brand-accent) 50%, #ffffff);
    --c-pos: #4fd8c8;
    --c-pos-soft: color-mix(in srgb, var(--brand-highlight) 28%, #0a1222);
    --c-pos-ink: #7ff0e2;
    --c-cyan: #4cd7f6;
    --c-mark: color-mix(in srgb, var(--brand-accent) 40%, transparent);
    --c-ok-bg: rgba(16, 185, 129, .14);  --c-ok-ink: #6ee7b7;  --c-ok-line: rgba(16, 185, 129, .35);
    --c-warn-bg: rgba(245, 158, 11, .14); --c-warn-ink: #fcd34d; --c-warn-line: rgba(245, 158, 11, .35);
    --c-err-bg: rgba(239, 68, 68, .14);   --c-err-ink: #fda4af;  --c-err-line: rgba(239, 68, 68, .35);
    --glass: rgba(10, 18, 34, .82);
    --shadow-1: 0 1px 2px rgba(0, 0, 0, .35);
    --shadow-2: 0 6px 16px -4px rgba(0, 0, 0, .5);
    --shadow-3: 0 20px 30px -8px rgba(0, 0, 0, .6);
    color-scheme: dark;
}
