/* ============================================================
   CreDrive — base.css
   Reset, tipografia base, fontes self-hosted, containers e utilitários.
   Depende de tokens.css (carregado antes).
   ============================================================ */

/* ---------- Fontes self-hosted (sem CDN, sem dependência externa) ---------- */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/inter-latin.65850a373e25.woff2") format("woff2");
}

/* Material Symbols — a biblioteca de ícones do projeto. JAMAIS emoji como ícone. */
@font-face {
  font-family: "Material Symbols Outlined";
  font-style: normal;
  font-weight: 100 700;
  font-display: block;
  src: url("../fonts/material-symbols-outlined.cb529e421438.woff2") format("woff2");
}

.material-symbols-outlined {
  font-family: "Material Symbols Outlined";
  font-weight: normal;
  font-style: normal;
  font-size: 20px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: "liga";
  -webkit-font-smoothing: antialiased;
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
  user-select: none;
  flex: none;
}
.material-symbols-outlined.is-filled { font-variation-settings: "FILL" 1; }
.material-symbols-outlined.icon-24 { font-size: 24px; }
.material-symbols-outlined.icon-32 { font-size: 32px; }

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--cd-bg-canvas);
  color: var(--cd-text-primary);
  font-family: var(--cd-font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6, p, figure { margin: 0; }
h1, h2, h3, h4 { font-weight: var(--cd-font-weight-bold); line-height: 1.25; }
h1 { font-size: 28px; }
h2 { font-size: 22px; }
h3 { font-size: 18px; }

ul, ol { margin: 0; padding: 0; list-style: none; }
img, svg { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }

/* Foco visível em tudo que é operável por teclado (acessibilidade). */
:focus-visible {
  outline: none;
  box-shadow: var(--cd-focus-ring);
  border-radius: var(--cd-radius-input);
}

/* ---------- Layout ---------- */
.cd-container {
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: var(--cd-space-6);
}
.cd-stack > * + * { margin-top: var(--cd-space-4); }
.cd-row {
  display: flex;
  align-items: center;
  gap: var(--cd-space-4);
  flex-wrap: wrap;
}

/* ---------- Tipografia utilitária ---------- */
.cd-text-secondary { color: var(--cd-text-secondary); }
.cd-text-small { font-size: 14px; }
.cd-title { font-size: 24px; font-weight: var(--cd-font-weight-bold); }
.cd-subtitle { color: var(--cd-text-secondary); font-size: 15px; }

/* ---------- Skip link (acessibilidade) ---------- */
.cd-skip-link {
  position: absolute;
  left: -9999px;
  top: var(--cd-space-2);
  background: var(--cd-bg-surface);
  color: var(--cd-text-primary);
  padding: var(--cd-space-3) var(--cd-space-4);
  border-radius: var(--cd-radius-button);
  border: 1px solid var(--cd-border-muted);
  z-index: 100;
}
.cd-skip-link:focus {
  left: var(--cd-space-4);
}

/* ---------- Utilitário: bloqueio de ação ----------
   Estado desabilitado ESTILIZADO. Não confiar só no atributo `disabled` quando a UI
   depende do clique (armadilha herdada do legado — ver docs/analysis/crm-de-referencia.md). */
.cd-is-disabled {
  opacity: .5;
  pointer-events: none;
  cursor: not-allowed;
}
