/* ==========================================================================
   Design tokens — sistema de temas (claro/oscuro + acento)
   Basado en prototipo.txt
   ========================================================================== */

/* ===== Modo claro (default) ===== */
:root {
    /* Texto */
    --ink:        #0b0d12;
    --ink-2:      #4b5565;
    --ink-3:      #8a93a4;
    --ink-4:      #b4bdcc;

    /* Superficies */
    --surface:    #ffffff;
    --surface-2:  #fafbfc;

    /* Líneas y estados */
    --line:       #e6e8ec;
    --hover:      #f3f4f7;
    --active:     #eef2f7;

    /* Marca (indigo por defecto) */
    --brand:      #635bff;
    --brand-2:    #5851ea;
    --brand-soft: rgba(99,91,255,0.08);
    --brand-glow: rgba(99,91,255,0.25);

    /* Semánticos */
    --success:    #059669;
    --success-bg: #ecfdf5;
    --warning:    #d97706;
    --warning-bg: #fef3c7;
    --danger:     #dc2626;
    --danger-bg:  #fef2f2;
    --info:       #2563eb;
    --info-bg:    #eff6ff;

    /* Sombras */
    --shadow-sm:  0 1px 2px rgba(15,23,42,0.04);
    --shadow-md:  0 4px 12px rgba(15,23,42,0.08);
    --shadow-lg:  0 12px 32px rgba(15,23,42,0.12);

    /* Radios */
    --radius-sm:  4px;
    --radius:     8px;
    --radius-lg:  10px;
    --radius-xl:  14px;
}

/* ===== Modo oscuro ===== */
[data-theme="dark"] {
    --ink:        #e6e8ef;
    --ink-2:      #b4bdcc;
    --ink-3:      #8a93a4;
    --ink-4:      #6b7280;

    --surface:    #14182a;
    --surface-2:  #0f1320;

    --line:       #232842;
    --hover:      #1c2236;
    --active:     #232a45;

    --success-bg: rgba(5,150,105,0.15);
    --warning-bg: rgba(217,119,6,0.15);
    --danger-bg:  rgba(220,38,38,0.15);
    --info-bg:    rgba(37,99,235,0.15);
}

/* Refinamientos de badges en oscuro: aclarar ligeramente los textos saturados */
[data-theme="dark"] .badge.active,
[data-theme="dark"] .badge.received    { color: #34d399; }
[data-theme="dark"] .badge.confirmed   { color: #60a5fa; }
[data-theme="dark"] .badge.partial     { color: #fbbf24; }
[data-theme="dark"] .badge.cancelled   { color: #f87171; }

/* ===== Overrides de acento ===== */
/* indigo es el default y ya está en :root — no necesita override */

[data-accent="blue"] {
    --brand:      #2563eb;
    --brand-2:    #1d4ed8;
    --brand-soft: rgba(37,99,235,0.08);
    --brand-glow: rgba(37,99,235,0.25);
}

[data-accent="emerald"] {
    --brand:      #059669;
    --brand-2:    #047857;
    --brand-soft: rgba(5,150,105,0.08);
    --brand-glow: rgba(5,150,105,0.25);
}

[data-accent="orange"] {
    --brand:      #ea580c;
    --brand-2:    #c2410c;
    --brand-soft: rgba(234,88,12,0.08);
    --brand-glow: rgba(234,88,12,0.25);
}

[data-accent="rose"] {
    --brand:      #e11d48;
    --brand-2:    #be123c;
    --brand-soft: rgba(225,29,72,0.08);
    --brand-glow: rgba(225,29,72,0.25);
}

[data-accent="slate"] {
    --brand:      #334155;
    --brand-2:    #1e293b;
    --brand-soft: rgba(51,65,85,0.08);
    --brand-glow: rgba(51,65,85,0.25);
}
