:root {
  color-scheme: light;

  --surface-base: #f3f7fb;
  --surface-raised: #ffffff;
  --surface-overlay: #ffffff;
  --surface-sunken: #e8eef4;

  --border-subtle: #d8e1ea;
  --border-default: #b8c7d5;
  --border-strong: #8ca0b4;

  --text-primary: #163042;
  --text-secondary: #465a6b;
  /* WCAG AA: ratio 4.93 sobre #f3f7fb (light mode body) — alterado de #6c7f90 (4.05, falhava AA) na auditoria 2026-04. */
  --text-muted: #5c6f80;
  --text-disabled: #97a7b5;
  --text-inverse: #f8fbff;

  /* Legacy variable name kept for Syntax components; in light mode it maps to the B2B blue primary. */
  --accent-gold: #1f5e7c;
  --accent-gold-hover: #15495f;
  --accent-gold-soft: rgba(31, 94, 124, 0.12);
  --accent-gold-glow: rgba(31, 94, 124, 0.24);

  --accent-moss: #2e7d5a;
  --accent-moss-soft: rgba(46, 125, 90, 0.14);

  --accent-deep-blue: #1f5e7c;
  --accent-deep-blue-soft: rgba(31, 94, 124, 0.12);

  --state-success: #2e7d5a;
  --state-success-soft: rgba(46, 125, 90, 0.14);
  --state-warning: #9d6b1f;
  --state-warning-soft: rgba(157, 107, 31, 0.12);
  --state-danger: #b84f43;
  --state-danger-soft: rgba(184, 79, 67, 0.14);
  --state-info: #1f5e7c;
  --state-info-soft: rgba(31, 94, 124, 0.14);

  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 10px 24px rgba(15, 23, 42, 0.10), 0 0 0 1px rgba(22, 48, 66, 0.04);
  --shadow-lg: 0 22px 48px rgba(15, 23, 42, 0.16), 0 0 0 1px rgba(22, 48, 66, 0.05);
  --shadow-glow-gold: 0 0 0 1px rgba(31, 94, 124, 0.18), 0 0 24px rgba(31, 94, 124, 0.12);

  --font-sans: "Aptos", "Segoe UI", "Trebuchet MS", system-ui, sans-serif;
  --font-mono: "Cascadia Code", "Consolas", "SFMono-Regular", ui-monospace, monospace;

  --ease-snappy: cubic-bezier(0.16, 1, 0.3, 1);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --duration-fast: 150ms;
  --duration-base: 220ms;
  --duration-slow: 300ms;

  --cliente-scrollbar-track: rgba(15, 23, 42, 0.04);
  --cliente-scrollbar-thumb: rgba(47, 111, 78, 0.32);
  --cliente-scrollbar-thumb-hover: rgba(47, 111, 78, 0.55);
}

:root[data-theme='dark'] {
  color-scheme: dark;

  --surface-base: #0d1217;
  --surface-raised: #121b24;
  --surface-overlay: #17222d;
  --surface-sunken: #091017;

  --border-subtle: #213140;
  --border-default: #32475a;
  --border-strong: #48627a;

  --text-primary: #f3f7fb;
  --text-secondary: #c0cfda;
  --text-muted: #8ea2b3;
  --text-disabled: #5f7283;
  --text-inverse: #08121a;

  --accent-gold: #d4a857;
  --accent-gold-hover: #e0b870;
  --accent-gold-soft: rgba(212, 168, 87, 0.12);
  --accent-gold-glow: rgba(212, 168, 87, 0.28);

  --accent-moss: #6a9c7e;
  --accent-moss-soft: rgba(106, 156, 126, 0.14);

  --accent-deep-blue: #72aeca;
  --accent-deep-blue-soft: rgba(114, 174, 202, 0.12);

  --state-success: #6a9c7e;
  --state-success-soft: rgba(106, 156, 126, 0.14);
  --state-warning: #c79a47;
  --state-warning-soft: rgba(199, 154, 71, 0.12);
  --state-danger: #d36b5f;
  --state-danger-soft: rgba(211, 107, 95, 0.14);
  --state-info: #72aeca;
  --state-info-soft: rgba(114, 174, 202, 0.14);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.34);
  --shadow-md: 0 12px 28px rgba(0, 0, 0, 0.36), 0 0 0 1px rgba(255, 255, 255, 0.04);
  --shadow-lg: 0 24px 56px rgba(0, 0, 0, 0.46), 0 0 0 1px rgba(255, 255, 255, 0.05);
  --shadow-glow-gold: 0 0 0 1px rgba(212, 168, 87, 0.24), 0 0 24px rgba(212, 168, 87, 0.15);

  --cliente-scrollbar-track: rgba(255, 255, 255, 0.04);
  --cliente-scrollbar-thumb: rgba(255, 255, 255, 0.18);
  --cliente-scrollbar-thumb-hover: rgba(255, 255, 255, 0.34);
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes pulse-gold {
  0%, 100% { box-shadow: 0 0 0 0 rgba(31, 94, 124, 0); }
  50% { box-shadow: 0 0 0 4px rgba(31, 94, 124, 0.18); }
}

:root[data-theme='dark'] {
  --pulse-gold-color: rgba(212, 168, 87, 0.18);
}

:root:not([data-theme='dark']) {
  --pulse-gold-color: rgba(31, 94, 124, 0.18);
}

@keyframes breathe {
  0%, 100% { opacity: 0.85; }
  50% { opacity: 1; }
}

@keyframes border-shimmer {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

@keyframes slow-pulse {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 0.9; transform: scale(1.02); }
}

.tnum {
  font-variant-numeric: tabular-nums;
}

.mono {
  font-family: var(--font-mono);
}
