/* ==========================================================================
   MERIDIAN DESIGN SYSTEM — Tokens, reset e tipografia
   Reproduz as secoes 2 e 3 de meridian-design-system.md.
   Nenhuma cor, raio ou sombra deve ser escrita literalmente fora deste arquivo.
   ========================================================================== */

/* ==========================================================================
   1. TOKENS DE DESIGN (VARIAVEIS CSS)
   ========================================================================== */
:root {
  /* Brand Blues
     Escala derivada de --brand-600 (#2222fb), mantendo o matiz em 240deg. Os
     degraus claros perdem saturacao de proposito: sao fundo de badge, chip e
     card, e a 100% ficariam berrantes num sistema que preza sobriedade.
     Todos os pares texto/fundo usados na interface passam em WCAG AAA. */
  --brand-50: #f0f0fe;
  --brand-100: #e2e2fd;
  --brand-200: #bfbffc;
  --brand-300: #9797fc;
  --brand-400: #5f5ffc;
  --brand-500: #4141fb;
  --brand-600: #2222fb; /* Cor Primaria de CTA */
  --brand-700: #0e0edd; /* Hover Primario */
  --brand-800: #0f0fb3;
  --brand-900: #10108e;
  --brand-950: #0b0b5b;

  /* Surface / Neutros */
  --surface-50: #f8f9fb;
  --surface-100: #f1f3f6; /* Background Canvas */
  --surface-200: #e4e7ec; /* Bordas e Divisores */
  --surface-300: #d0d5dd; /* Bordas de Inputs */
  --surface-400: #98a2b3;
  --surface-500: #667085;
  --surface-600: #475467;
  --surface-700: #344054;
  --surface-800: #1d2939; /* Texto Principal */
  --surface-900: #101828;

  /* Semanticas
     Os degraus -100 sao as bordas de badge e alerta. A especificacao usa esses
     valores, porem escritos literalmente dentro de .badge-* (secao 5.3); aqui
     eles viram token para que nenhuma cor precise ser repetida a mao. */
  --success-50: #ecfdf3;
  --success-100: #d1fadf;
  --success-500: #12b76a;
  --success-600: #039855;
  --warning-50: #fffaeb;
  --warning-100: #fef0c7;
  --warning-500: #f79009;
  --warning-600: #dc6803;
  --danger-50: #fef3f2;
  --danger-100: #fee4e2;
  --danger-500: #f04438;
  --danger-600: #d92d20;
  /* Adicao ao design system: a especificacao usa var(--danger-700) no hover de
     .btn-danger (secao 5.1) mas nao define o token. Este e o proximo degrau
     natural da escala vermelha. */
  --danger-700: #b42318;
  --info-50: #eff8ff;
  --info-100: #d1e9ff;
  --info-500: #2e90fa;
  --info-600: #1570ef;

  /* Anel de foco dos campos. A especificacao o escreve literal em .input:focus
     (secao 5.2); como ele se repete em todo campo customizado, vira token. */
  --focus-ring: 0 0 0 3px rgba(65, 65, 251, 0.25);

  /* Tipografia */
  --font-sans: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  --font-mono: "Cascadia Code", "Consolas", "Courier New", monospace;

  /* Sombras & Arredondamentos */
  --radius-sm: 2px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --shadow-xs: 0 1px 2px 0 rgba(16, 24, 40, 0.05);
  --shadow-sm: 0 1px 3px 0 rgba(16, 24, 40, 0.1);
  --shadow-md: 0 4px 8px -2px rgba(16, 24, 40, 0.1);
  --shadow-lg: 0 12px 16px -4px rgba(16, 24, 40, 0.08);
}

/* ==========================================================================
   2. ESTILOS BASE & RESET
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  color: var(--surface-800);
  background-color: var(--surface-100);
  -webkit-font-smoothing: antialiased;
}

:focus-visible {
  outline: 2px solid var(--brand-500);
  outline-offset: 1px;
}

/* ==========================================================================
   3. ESCALA TIPOGRAFICA (tabela da secao 3)
   ========================================================================== */
h1, .meridian-h1 { font-size: 24px; line-height: 32px; font-weight: 600; }
h2, .meridian-h2 { font-size: 20px; line-height: 28px; font-weight: 600; }
h3, .meridian-h3 { font-size: 16px; line-height: 24px; font-weight: 600; }

.font-medium { font-weight: 500; }

.text-small {
  font-size: 12px;
  line-height: 16px;
}

.font-mono {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 16px;
}

/* ==========================================================================
   4. UTILITARIOS MINIMOS
   ========================================================================== */
.text-right { text-align: right; }
.text-muted { color: var(--surface-500); }
.text-brand { color: var(--brand-700); }

[hidden] { display: none !important; }

.meridian-icon {
  flex-shrink: 0;
  vertical-align: middle;
}

/* Conteudo visivel apenas para leitores de tela. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
