/* ==========================================================================
   VÉRTICE FINANCEIRO • DESIGN SYSTEM & TOKENS OFICIAIS (5 TEMAS WCAG AA)
   Todos os pares texto/superfície calibrados com razão de contraste >= 4.5:1
   ========================================================================== */

:root {
  --font-display: 'Outfit', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 220ms cubic-bezier(0.4, 0, 0.2, 1);

  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-pill: 9999px;
}

/* ==========================================================================
   TEMA 1: Azul Corporativo — Opção C (Safira & Névoa Nórdica) [Padrão ERP]
   Zero áreas brancas: contraste elegante entre azul escuro e azul claro
   ========================================================================== */
:root, html[data-theme="corporate-blue"] {
  --color-primary: #1E344D;
  --color-primary-hover: #15263A;
  --color-primary-btn-bg: #1E344D;
  --color-primary-btn-text: #FFFFFF;
  --color-primary-subtle: #BDCEE0;
  --color-accent: #7DD3FC;

  --topbar-bg: #1E344D;
  --topbar-text: #F1F5F9;
  --topbar-muted: #CBD9E8;
  --topbar-control-bg: #26405E;
  --topbar-border: #38587C;
  --topbar-logo-bg: #DCE6F1;
  --topbar-logo-text: #1E344D;

  --tabs-bar-bg: #26405E;
  --tabs-bar-text: #DCE6F2;
  --ribbon-strip-bg: #C7D8E8;

  --statusbar-bg: #26405E;
  --statusbar-text: #F1F5F9;

  --bg-page: #B8C9DC;
  --bg-surface: #DCE6F1;
  --bg-surface-elevated: #CFDCEB;
  --bg-ribbon: #C7D8E8;
  --bg-card-header: #C2D3E5;

  --text-primary: #10243A;
  --text-secondary: #243D59;
  --text-muted: #36516E;
  --text-inverse: #FFFFFF;

  --border-subtle: #98B0C8;
  --border-strong: #6E8AA8;
  --border-focus: #1E344D;

  --table-header-bg: #1E344D;
  --table-header-text: #F8FAFC;
  --table-row-bg: #DCE6F1;
  --table-row-zebra: #CDDCEB;
  --table-row-hover: #BDCEE0;
  --table-row-selected-bg: #26537D;
  --table-row-selected-text: #FFFFFF;
  --table-border: #A3B9CF;

  --selected-pos-text: #A7F3D0;
  --selected-neg-text: #FECACA;

  --badge-success-bg: #C6F6D5;
  --badge-success-text: #065F46;
  --badge-warning-bg: #FEF3C7;
  --badge-warning-text: #92400E;
  --badge-danger-bg: #FEE2E2;
  --badge-danger-text: #991B1B;
  --badge-info-bg: #C4DCFA;
  --badge-info-text: #102A43;
  --badge-neutral-bg: #C2D3E5;
  --badge-neutral-text: #10243A;

  --tooltip-bg: #0F1D2E;
  --tooltip-text: #F8FAFC;
  --tooltip-border: #5E83A8;

  --shadow-sm: 0 1px 3px rgba(16, 36, 58, 0.10);
  --shadow-md: 0 6px 16px rgba(16, 36, 58, 0.14);
  --shadow-lg: 0 14px 32px rgba(16, 36, 58, 0.18);
}

/* ==========================================================================
   TEMA 2: Escuro Moderno (modern-dark)
   ========================================================================== */
html[data-theme="modern-dark"] {
  --color-primary: #38BDF8;
  --color-primary-hover: #7DD3FC;
  --color-primary-btn-bg: #0369A1;
  --color-primary-btn-text: #FFFFFF;
  --color-primary-subtle: #1D3B5E;
  --color-accent: #38BDF8;

  --topbar-bg: #0F172A;
  --topbar-text: #F1F5F9;
  --topbar-muted: #9FB1C6;
  --topbar-control-bg: #18253A;
  --topbar-border: #243650;
  --topbar-logo-bg: #0369A1;
  --topbar-logo-text: #FFFFFF;

  --tabs-bar-bg: #132033;
  --tabs-bar-text: #CBD5E1;
  --ribbon-strip-bg: #111B2B;

  --statusbar-bg: #0F172A;
  --statusbar-text: #CBD5E1;

  --bg-page: #0A101B;
  --bg-surface: #111B2B;
  --bg-surface-elevated: #18253A;
  --bg-ribbon: #132033;
  --bg-card-header: #1A2B45;

  --text-primary: #F1F5F9;
  --text-secondary: #CBD5E1;
  --text-muted: #9FB1C6;
  --text-inverse: #0A101B;

  --border-subtle: #243650;
  --border-strong: #374F73;
  --border-focus: #38BDF8;

  --table-header-bg: #1B2D47;
  --table-header-text: #F8FAFC;
  --table-row-bg: #111B2B;
  --table-row-zebra: #162236;
  --table-row-hover: #1E304B;
  --table-row-selected-bg: #1D3B5E;
  --table-row-selected-text: #FFFFFF;
  --table-border: #243650;

  --selected-pos-text: #A7F3D0;
  --selected-neg-text: #FECACA;

  --badge-success-bg: #064E3B;
  --badge-success-text: #A7F3D0;
  --badge-warning-bg: #78350F;
  --badge-warning-text: #FDE68A;
  --badge-danger-bg: #7F1D1D;
  --badge-danger-text: #FECACA;
  --badge-info-bg: #1E3A5F;
  --badge-info-text: #BAE6FD;
  --badge-neutral-bg: #243650;
  --badge-neutral-text: #E2E8F0;

  --tooltip-bg: #020617;
  --tooltip-text: #F8FAFC;
  --tooltip-border: #38BDF8;

  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.45);
  --shadow-md: 0 8px 20px rgba(0, 0, 0, 0.55);
  --shadow-lg: 0 18px 40px rgba(0, 0, 0, 0.65);
}

/* ==========================================================================
   TEMA 3: Claro Suave (soft-light) — Único tema com áreas em branco puro
   ========================================================================== */
html[data-theme="soft-light"] {
  --color-primary: #1D4ED8;
  --color-primary-hover: #1E40AF;
  --color-primary-btn-bg: #1D4ED8;
  --color-primary-btn-text: #FFFFFF;
  --color-primary-subtle: #DBEAFE;
  --color-accent: #0F766E;

  --topbar-bg: #FFFFFF;
  --topbar-text: #1E293B;
  --topbar-muted: #475569;
  --topbar-control-bg: #F1F5F9;
  --topbar-border: #CBD5E1;
  --topbar-logo-bg: #1D4ED8;
  --topbar-logo-text: #FFFFFF;

  --tabs-bar-bg: #F8FAFC;
  --tabs-bar-text: #334155;
  --ribbon-strip-bg: #FFFFFF;

  --statusbar-bg: #FFFFFF;
  --statusbar-text: #334155;

  --bg-page: #F5F7FA;
  --bg-surface: #FFFFFF;
  --bg-surface-elevated: #F1F5F9;
  --bg-ribbon: #F8FAFC;
  --bg-card-header: #EDF2F7;

  --text-primary: #1E293B;
  --text-secondary: #334155;
  --text-muted: #475569;
  --text-inverse: #FFFFFF;

  --border-subtle: #CBD5E1;
  --border-strong: #94A3B8;
  --border-focus: #1D4ED8;

  --table-header-bg: #1E293B;
  --table-header-text: #FFFFFF;
  --table-row-bg: #FFFFFF;
  --table-row-zebra: #F8FAFC;
  --table-row-hover: #EFF6FF;
  --table-row-selected-bg: #DBEAFE;
  --table-row-selected-text: #1E3A8A;
  --table-border: #CBD5E1;

  --selected-pos-text: #065F46;
  --selected-neg-text: #991B1B;

  --badge-success-bg: #D1FAE5;
  --badge-success-text: #065F46;
  --badge-warning-bg: #FEF3C7;
  --badge-warning-text: #92400E;
  --badge-danger-bg: #FEE2E2;
  --badge-danger-text: #991B1B;
  --badge-info-bg: #DBEAFE;
  --badge-info-text: #1E40AF;
  --badge-neutral-bg: #E2E8F0;
  --badge-neutral-text: #1E293B;

  --tooltip-bg: #1E293B;
  --tooltip-text: #FFFFFF;
  --tooltip-border: #475569;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 6px 16px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 14px 32px rgba(0, 0, 0, 0.12);
}

/* ==========================================================================
   TEMA 4: Cinza Chumbo (lead-gray)
   ========================================================================== */
html[data-theme="lead-gray"] {
  --color-primary: #E2E8F0;
  --color-primary-hover: #FFFFFF;
  --color-primary-btn-bg: #0369A1;
  --color-primary-btn-text: #FFFFFF;
  --color-primary-subtle: #364152;
  --color-accent: #38BDF8;

  --topbar-bg: #1B1E24;
  --topbar-text: #F3F4F6;
  --topbar-muted: #B2BAC6;
  --topbar-control-bg: #282C34;
  --topbar-border: #363B46;
  --topbar-logo-bg: #0369A1;
  --topbar-logo-text: #FFFFFF;

  --tabs-bar-bg: #23272F;
  --tabs-bar-text: #D1D5DB;
  --ribbon-strip-bg: #20232A;

  --statusbar-bg: #1B1E24;
  --statusbar-text: #D1D5DB;

  --bg-page: #16181D;
  --bg-surface: #20232A;
  --bg-surface-elevated: #282C34;
  --bg-ribbon: #23272F;
  --bg-card-header: #2E333D;

  --text-primary: #F3F4F6;
  --text-secondary: #D1D5DB;
  --text-muted: #B2BAC6;
  --text-inverse: #16181D;

  --border-subtle: #363B46;
  --border-strong: #4B5261;
  --border-focus: #38BDF8;

  --table-header-bg: #2E333D;
  --table-header-text: #F9FAFB;
  --table-row-bg: #20232A;
  --table-row-zebra: #262A32;
  --table-row-hover: #313742;
  --table-row-selected-bg: #364152;
  --table-row-selected-text: #FFFFFF;
  --table-border: #363B46;

  --selected-pos-text: #A7F3D0;
  --selected-neg-text: #FECACA;

  --badge-success-bg: #064E3B;
  --badge-success-text: #A7F3D0;
  --badge-warning-bg: #78350F;
  --badge-warning-text: #FDE68A;
  --badge-danger-bg: #7F1D1D;
  --badge-danger-text: #FECACA;
  --badge-info-bg: #1E3A5F;
  --badge-info-text: #BAE6FD;
  --badge-neutral-bg: #363B46;
  --badge-neutral-text: #F3F4F6;

  --tooltip-bg: #0B0D11;
  --tooltip-text: #F9FAFB;
  --tooltip-border: #60A5FA;

  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 20px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 18px 36px rgba(0, 0, 0, 0.6);
}
