/*
  PBDoc Design System - Tokens e Estilos Base
  (divisao de pbdoc.css - Fase 34, Plano 05)
*/

:root {
  /* --- Header Heights --- */
  --header-top-height: 60px;
  --header-context-height: 32px;
  --sidebar-width: 310px;
  --sidebar-collapsed-width: 0px;

  /* --- Cores Primárias (PBDoc) --- */
  --pbdoc-header-bg: #0f2a47;
  --pbdoc-primary-lighter: #5992ed;
  --pbdoc-primary-light: #2670e8;
  --pbdoc-primary-default: #1351b4;
  --pbdoc-primary-dark: #0c326f;
  --pbdoc-primary-darker: #071d41;

  /* Azul exclusivo do cabeçalho das tabelas (distinto dos azuis de marca) */
  --pbdoc-table-header-bg: #0d3c61;
  /* Fundo de destaque para itens de navegação ativos */
  --pbdoc-highlight-bg: #e3f2fd;

  /* Botão secundário (padrão de TODOS os botões de ação, mesmo os "primários") */
  --pbdoc-secondary-btn-bg: #e9ecef;
  --pbdoc-secondary-btn-text: #495057;

  /* --- Cores de Superfície --- */
  --surface-0: #ffffff;
  --surface-50: #fafafa;
  --surface-100: #f5f5f5;
  --surface-200: #eeeeee;
  --surface-300: #e0e0e0;
  --surface-400: #bdbdbd;
  --surface-500: #9e9e9e;
  --surface-600: #757575;
  --surface-700: #616161;
  --surface-800: #424242;
  --surface-900: #212121;

  /* --- Badges de status (semânticos) --- */
  --badge-success-bg: #dcfce7;    --badge-success-text: #166534;
  --badge-danger-bg: #fee2e2;     --badge-danger-text: #991b1b;
  --badge-warning-bg: #fef9c3;    --badge-warning-text: #854d0e;
  --badge-info-bg: #dbeafe;       --badge-info-text: #1d4ed8;
  --badge-neutral-bg: #f3f4f6;    --badge-neutral-text: #374151;
  --badge-category-bg: #e0e7ff;   --badge-category-text: #3730a3;

  /* --- Superfícies de página --- */
  --page-bg: var(--surface-0);
  --page-section-bg: var(--surface-100);
  --page-min-height: calc(100vh - 120px);

  /* --- Dimensões padronizadas --- */
  --btn-action-min-width: 130px;
  --btn-action-min-width-sm: 100px;
  --spinner-size-lg: 3rem;
  --header-offset: 66px;
  --dropdown-z: 1050;

  /* --- Bloco de código/erro (estilo monokai) --- */
  --code-block-bg: #272822;
  --code-block-text: #f8f8f2;

  /* --- Feedback e Outros --- */
  --blue-200: #a0d2fa;
  --red-500: #ff4032;
  --text-color: #495057;
  --text-color-secondary: #6c757d;
  
  /* --- Tipografia e Bordas --- */
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --border-radius: 3px;
  --focus-ring: 0 0 0 0.2rem var(--pbdoc-primary-lighter);
}

/* --- Scrollbar Customizada --- */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--pbdoc-primary-darker);
}
::-webkit-scrollbar-thumb {
  background: var(--pbdoc-primary-light);
  border-radius: 0;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--red-500);
}

/* --- Estilos Base --- */
html {
  height: 100%;
}

body {
  font-family: var(--font-family);
  margin: 0;
  padding-top: var(--header-offset);
  background-color: var(--page-bg);
  color: var(--text-color);
  overflow-x: hidden; /* Prevents stray horizontal scrolls */
  min-height: 100vh;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

/* --- Utilitários --- */
.required:after {
  content: ' *';
  color: var(--red-500);
}

.money {
  font-family: var(--font-family);
  font-size: 1rem;
  color: #495057;
  background: #ffffff;
  padding: 0.5rem;
  border: 1px solid var(--surface-300);
  border-radius: var(--border-radius);
  transition: all 0.2s;
}
.money:enabled:hover {
  border-color: var(--pbdoc-primary-light);
}
.money:enabled:focus {
  outline: none;
  box-shadow: var(--focus-ring);
  border-color: var(--pbdoc-primary-light);
}
