/* Reset + tipografia base, compartilhado por todas as trilhas do protótipo.
   Segue o BSystem: Inter com as variantes cv11/ss01/ss03 no html, corpo em
   text-sm (14/20) e a escala text-* do DS. */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

html {
  /* Variantes da Inter validadas no Hub (D19): "a" de um andar, algarismos
     abertos, aspas e vírgulas arredondadas. */
  font-feature-settings: "cv11", "ss01", "ss03";
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--font-size-sm);
  line-height: var(--line-height-sm);
  color: var(--foreground);
  /* O fundo do body é a sidebar (variante inset): o conteúdo vive num frame
     branco por cima dele (ver layout.css). */
  background: var(--sidebar);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

button {
  font-family: inherit;
  line-height: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

img,
svg {
  display: block;
}

/* ===== Utilitários mínimos (equivalentes ao subconjunto Tailwind usado pelas
   trilhas React) — evita reintroduzir um framework de utilitário inteiro só
   para reproduzir flex/gap/spacing pontuais. ===== */
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1 1 0%; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.min-w-0 { min-width: 0; }
.w-full { width: 100%; }
.w-fit { width: fit-content; }
.shrink-0 { flex-shrink: 0; }
.grow { flex-grow: 1; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.block { display: block; }

.gap-0-5 { gap: 2px; }
.gap-1 { gap: 4px; }
.gap-1-5 { gap: 6px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-5 { gap: 20px; }
.gap-6 { gap: 24px; }
.gap-8 { gap: 32px; }
.gap-10 { gap: 40px; }

.grid { display: grid; }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.gap-x-6 { column-gap: 24px; }
.gap-y-3 { row-gap: 12px; }
.gap-y-1 { row-gap: 4px; }
.col-span-2 { grid-column: span 2 / span 2; }

.p-0 { padding: 0; }
.px-2 { padding-left: 8px; padding-right: 8px; }
.px-3 { padding-left: 12px; padding-right: 12px; }
.px-4 { padding-left: 16px; padding-right: 16px; }
.px-6 { padding-left: 24px; padding-right: 24px; }
.py-2 { padding-top: 8px; padding-bottom: 8px; }
.py-3 { padding-top: 12px; padding-bottom: 12px; }
.py-6 { padding-top: 24px; padding-bottom: 24px; }
.p-6 { padding: 24px; }

.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mt-auto { margin-top: auto; }
.ml-auto { margin-left: auto; }

.rounded-md { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-full { border-radius: var(--radius-full); }

/* Escala de corpo do DS: use text-13 (13/18) para corpo denso (listas,
   tabelas, descrições), nunca um tamanho solto. */
.text-xs { font-size: var(--font-size-xs); line-height: var(--line-height-xs); }
.text-13 { font-size: var(--font-size-13); line-height: var(--line-height-13); }
.text-sm { font-size: var(--font-size-sm); line-height: var(--line-height-sm); }
.text-base { font-size: var(--font-size-base); line-height: var(--line-height-base); }
.text-lg { font-size: var(--font-size-lg); line-height: var(--line-height-lg); }
.text-xl { font-size: var(--font-size-xl); line-height: var(--line-height-xl); }
.text-2xl { font-size: var(--font-size-2xl); line-height: var(--line-height-2xl); }
.font-medium { font-weight: var(--font-weight-medium); }
.font-semibold { font-weight: var(--font-weight-semibold); }
.uppercase { text-transform: uppercase; }
.tracking-wide { letter-spacing: 0.04em; }
.italic { font-style: italic; }
.whitespace-nowrap { white-space: nowrap; }

/* Estilos com nome do DS (Cockpit: tudo em Inter). A cor fica com text-*. */
.display {
  font-family: var(--font-family-display);
  font-size: var(--font-size-display);
  font-weight: var(--font-weight-display);
  line-height: var(--line-height-display);
  letter-spacing: var(--letter-spacing-display);
}
.title-lg {
  font-family: var(--font-family-title-lg);
  font-size: var(--font-size-title-lg);
  font-weight: var(--font-weight-title-lg);
  line-height: var(--line-height-title-lg);
  letter-spacing: var(--letter-spacing-title-lg);
}
.title {
  font-family: var(--font-family-title);
  font-size: var(--font-size-title);
  font-weight: var(--font-weight-title);
  line-height: var(--line-height-title);
  letter-spacing: var(--letter-spacing-title);
}
.eyebrow {
  font-family: var(--font-family-eyebrow);
  font-size: var(--font-size-eyebrow);
  font-weight: var(--font-weight-eyebrow);
  line-height: var(--line-height-eyebrow);
  letter-spacing: var(--letter-spacing-eyebrow);
  text-transform: uppercase;
}
.kpi {
  font-family: var(--font-sans);
  font-size: var(--font-size-kpi);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-kpi);
  font-variant-numeric: tabular-nums;
}
.mono-data {
  font-family: var(--font-mono);
  font-size: var(--font-size-mono-data);
  font-weight: var(--font-weight-regular);
  line-height: var(--line-height-mono-data);
}

.cursor-pointer { cursor: pointer; }
.max-w-xl { max-width: 640px; }
.max-w-2xl { max-width: 720px; }
.max-w-3xl { max-width: 800px; }
.max-w-md { max-width: 448px; }
.max-w-7xl { max-width: 1280px; }
.hidden { display: none !important; }

/* Larguras fixas pontuais (escala Tailwind: 1 unidade = 4px) — use antes de
   escrever style="width:Npx" num input/select avulso. Precisa de um valor que
   não existe aqui? Adicione seguindo a mesma escala, não crie outro padrão.
   !important pelo mesmo motivo de .hidden: .field-input/.field-select já
   definem width:100% com a mesma especificidade, carregado depois (components.css) —
   sem isso, a largura fixa seria ignorada nesses campos. */
.w-52 { width: 208px !important; }
.w-64 { width: 256px !important; }
.w-72 { width: 288px !important; }

.text-muted { color: var(--muted-foreground); }
.text-foreground { color: var(--foreground); }
.text-center { text-align: center; }
.text-right { text-align: right; }
.tabular-nums { font-variant-numeric: tabular-nums; }
.font-mono { font-family: var(--font-mono); }

.size-3 { width: 12px; height: 12px; }
.size-3-5 { width: 14px; height: 14px; }
.size-4 { width: 16px; height: 16px; }
.size-5 { width: 20px; height: 20px; }
.size-6 { width: 24px; height: 24px; }
.size-8 { width: 32px; height: 32px; }
.size-12 { width: 48px; height: 48px; }

/* Anel de foco do DS (D15): 3px em --ring, com 2px de folga. */
.focus-ring:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

/* Barras de rolagem do DS: thin-scrollbar (sidebar) e frame-scrollbar (frame
   do conteúdo). Seguem currentColor, então valem no escuro e no claro. */
.thin-scrollbar::-webkit-scrollbar { width: 6px; height: 6px; }
.thin-scrollbar::-webkit-scrollbar-track { background: transparent; }
.thin-scrollbar::-webkit-scrollbar-thumb {
  border-radius: 9999px;
  background-color: color-mix(in oklab, currentColor 25%, transparent);
}
.thin-scrollbar::-webkit-scrollbar-thumb:hover {
  background-color: color-mix(in oklab, currentColor 45%, transparent);
}
.frame-scrollbar { scrollbar-gutter: stable; }
.frame-scrollbar::-webkit-scrollbar { width: 14px; height: 14px; }
.frame-scrollbar::-webkit-scrollbar-track { background: transparent; }
.frame-scrollbar::-webkit-scrollbar-thumb {
  border: 4px solid transparent;
  border-radius: 9999px;
  background-clip: padding-box;
  background-color: color-mix(in oklab, currentColor 18%, transparent);
}
.frame-scrollbar::-webkit-scrollbar-thumb:hover {
  background-color: color-mix(in oklab, currentColor 30%, transparent);
}
@supports (scrollbar-width: thin) and (not selector(::-webkit-scrollbar)) {
  .thin-scrollbar { scrollbar-width: thin; scrollbar-color: color-mix(in oklab, currentColor 25%, transparent) transparent; }
  .frame-scrollbar { scrollbar-width: thin; scrollbar-color: color-mix(in oklab, currentColor 22%, transparent) transparent; }
}

/* Texto presente no DOM só para leitores de tela (ex.: anunciar um estado de
   carregamento cujo feedback visual é puramente um skeleton). Padrão comum de
   acessibilidade, não específico de nenhuma trilha. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
