:root {
    /* ===== Texto ===== */
    --ink-900: #01043e;
    --ink-700: #1f2440;
    --ink-600: #4a5170;
    --ink-400: #6b7394;
    --ink-300: #8891b3;
    --ink-200: #9aa2c0;
    --ink-100: #c3c9e0;

    /* ===== Superfícies ===== */
    --surface-0: #ffffff;
    --surface-1: #f8f9fc;
    --surface-2: #f4f6fb;
    --surface-3: #f0f4ff;
    --surface-4: #eef1fb;

    /* ===== Bordas ===== */
    --border-hairline: #eef1fb;
    --border-wash: #eef1fb;
    --border-strong: #dde3f0;
    --border-subtle: #f1f3f9;
    --border-dashed: #c3c9e0;

    /* ===== Marca ===== */
    --brand: #1e3a8a;
    --brand-rgb: 30, 58, 138;
    --brand-hover: #14275c;
    --ink-900-rgb: 1, 4, 62;
    --shadow-rgb: 1, 4, 62;

    /* ===== Sombras ===== */
    --shadow-menu: 0 2px 6px rgba(0, 0, 0, 0.08);
    --shadow-dropdown: 0 10px 30px rgba(var(--shadow-rgb), 0.15);
    --shadow-card: 0 2px 10px rgba(var(--shadow-rgb), 0.06);

    /* ===== Status ===== */
    --status-ok-bg: #e6f8ee;
    --status-ok-text: #1e8449;
    --status-ok-border: #b7e4c7;
    --status-off-bg: #f1f2f6;
    --status-off-text: #6b7394;
    --status-danger-bg: #fdecea;
    --status-danger-text: #c0392b;
    --status-danger-border: #f6c8ce;
    --status-danger-solid: #dc3545;
    --status-warn-bg: #fff8e6;
    --status-warn-text: #92620a;
    --status-warn-border: #fcd9a0;
    --status-warn-accent: #f59e0b;
    --status-warn-accent-text: #b45309;

    /* ===== Banner de informação ===== */
    --info-bg: #eaf5fe;
    --info-border: #38bdf8;
    --info-text: #075985;

    /* ===== Caixa de importação NF-e (azul distinto) ===== */
    --accent-blue-bg: #f0f7ff;
    --accent-blue-border: #b8d9f5;
    --accent-blue-text: #1a3a6b;
    --accent-blue-strong: #1a73e8;

    /* ===== Diversos ===== */
    --row-highlight: #fff3cd;
    --token-bg: #f4f4f4;
    --token-text: #333333;
    --csv-border: #b0b8d0;
    --csv-label-text: #444444;
    --csv-hint-text: #6c757d;
    --code-overlay: rgba(0, 0, 0, 0.06);

    /* ===== Login (tons próprios, levemente distintos do restante) ===== */
    --login-border-dashed: #c4cbe6;
    --login-input-border: #dde2f2;
    --status-ok-bg-soft: #eafaf1;
}

/* ===================================================================
   Tema escuro — mesmos nomes de variável, valores invertidos.
   Ativado colocando data-theme="dark" na tag <html> (ver theme-toggle.js).
   =================================================================== */
:root[data-theme="dark"] {
    /* ===== Texto (cinza neutro alto-contraste, estilo editor de código) ===== */
    --ink-900: #f3f3f3;
    --ink-700: #dcdcdc;
    --ink-600: #b0b0b8;
    --ink-400: #9a9aa2;
    --ink-300: #9a9aa2;
    --ink-200: #7a7a84;
    --ink-100: #45454e;

    /* ===== Superfícies (carvão neutro, sem tingir de azul-marinho) ===== */
    --surface-0: #2b2b2e;
    --surface-1: #313136;
    --surface-2: #1e1e1e;
    --surface-3: #333c54;
    --surface-4: #38383d;

    /* ===== Bordas ===== */
    --border-hairline: #414146;
    --border-wash: #3a3a3f;
    --border-strong: #4d4d55;
    --border-subtle: #35353a;
    --border-dashed: #525259;

    /* ===== Marca (azul limpo, sem tom arroxeado) ===== */
    --brand: #4c8dff;
    --brand-rgb: 76, 141, 255;
    --brand-hover: #3a72d4;
    --ink-900-rgb: 243, 243, 243;
    --shadow-rgb: 0, 0, 0;

    /* ===== Sombras (discretas) ===== */
    --shadow-menu: 0 2px 6px rgba(0, 0, 0, 0.3);
    --shadow-dropdown: 0 10px 30px rgba(0, 0, 0, 0.4);
    --shadow-card: 0 2px 10px rgba(0, 0, 0, 0.25);

    /* ===== Status ===== */
    --status-ok-bg: #16332a;
    --status-ok-text: #6fd396;
    --status-ok-border: #205a41;
    --status-ok-bg-soft: #16332a;
    --status-off-bg: #2c2c31;
    --status-off-text: #b0b0b8;
    --status-danger-bg: #3a2027;
    --status-danger-text: #f2828a;
    --status-danger-border: #5a303a;
    --status-danger-solid: #f2828a;
    --status-warn-bg: #362a17;
    --status-warn-text: #f2c063;
    --status-warn-border: #5a4623;
    --status-warn-accent: #f2c063;
    --status-warn-accent-text: #f2c063;

    /* ===== Banner de informação ===== */
    --info-bg: #17303f;
    --info-border: #4fc3f7;
    --info-text: #8ed6fb;

    /* ===== Caixa de importação NF-e ===== */
    --accent-blue-bg: #182940;
    --accent-blue-border: #2c4d70;
    --accent-blue-text: #8fb8e8;
    --accent-blue-strong: #6fa4dd;

    /* ===== Diversos ===== */
    --row-highlight: #453718;
    --token-bg: #313136;
    --token-text: #dcdcdc;
    --csv-border: #4a4a52;
    --csv-label-text: #d4d4d8;
    --csv-hint-text: #9a9aa2;
    --code-overlay: rgba(255, 255, 255, 0.08);

    /* ===== Login ===== */
    --login-border-dashed: #4a4a52;
    --login-input-border: #45454c;
}
