:root {
  --hb-primary: #1684f8;
  --hb-primary-hover: #0875e7;
  --hb-primary-rgb: 22, 132, 248;
  --hb-success: #2fb344;
  --hb-warning: #f59f00;
  --hb-warning-bg: rgba(245, 159, 0, .13);
  --hb-warning-bg-soft: rgba(245, 159, 0, .08);
  --hb-warning-border: rgba(245, 159, 0, .42);
  --hb-danger: #d63939;
  --hb-info: #4299e1;

  /* Tema claro suave: layout.css e components.css compartilham estas
     superfícies. O fundo mais cinza separa os painéis sem branco puro. */
  --hb-topbar-bg: #f3f5f7;
  --hb-quick-bg: #edf0f3;
  --hb-sidebar-bg: #f3f5f7;
  --hb-workspace-bg: #e5e9ee;
  --hb-surface: #f5f6f8;
  --hb-surface-muted: #e9edf1;
  --hb-text: #25364a;
  --hb-muted: #526173;
  --hb-border: #cdd5df;
  --hb-border-strong: #a6b2c1;
  --hb-hover: #dce3eb;

  --hb-sidebar-width: 248px;
  --hb-sidebar-compact-width: 68px;
  --hb-topbar-height: 64px;
  --hb-quick-height: 40px;
  --hb-radius: 10px;
  --hb-radius-sm: 7px;
  --hb-shadow: 0 1px 2px rgba(24, 36, 51, .04);
  --hb-shadow-menu: 0 10px 30px rgba(24, 36, 51, .12);
  --hb-transition: 180ms ease;
}

/* A mesma ponte usada no modo escuro mantém os componentes Tabler
   alinhados à paleta central, sem alterações nos arquivos vendor. */
html:not([data-bs-theme="dark"]) {
  --tblr-body-bg: var(--hb-workspace-bg);
  --tblr-body-color: var(--hb-text);
  --tblr-bg-surface: var(--hb-surface);
  --tblr-bg-surface-secondary: var(--hb-surface-muted);
  --tblr-bg-surface-tertiary: var(--hb-hover);
  --tblr-border-color: var(--hb-border);
}

html[data-bs-theme="dark"] {
  /* Fonte central do tema noturno. Layout, cartões e formulários consomem
     estes tokens; não repetir a paleta em CSS específico de módulos. */
  --hb-topbar-bg: #171b21;
  --hb-quick-bg: #14181e;
  --hb-sidebar-bg: #171b21;
  --hb-workspace-bg: #101216;
  --hb-surface: #1e242c;
  --hb-surface-muted: #191e25;
  --hb-text: #f3f6fa;
  --hb-muted: #b0bac7;
  --hb-border: #323c49;
  --hb-border-strong: #596779;
  --hb-hover: #2a3543;
  --hb-input-focus-bg: #232e3c;
  --hb-shadow: 0 2px 8px rgba(0,0,0,.14);
  --hb-shadow-menu: 0 16px 40px rgba(0,0,0,.42);

  /* Ponte com Tabler: componentes vendor seguem as mesmas superfícies,
     sem alterar seus arquivos nem os tokens do modo claro. */
  --tblr-body-bg: var(--hb-workspace-bg);
  --tblr-body-color: var(--hb-text);
  --tblr-bg-surface: var(--hb-surface);
  --tblr-bg-surface-secondary: var(--hb-surface-muted);
  --tblr-bg-surface-tertiary: var(--hb-hover);
  --tblr-border-color: var(--hb-border);
}

:root {
  --hb-bg: var(--hb-workspace-bg);
  --hb-surface-hover: var(--hb-hover);
  --hb-radius-lg: 12px;
  --hb-shadow-sm: var(--hb-shadow);
}
