/* BIP — base e tokens
   Montserrat é servida localmente para funcionar offline.
   Baixe os .woff2 em fonts.google.com e coloque em /assets/fonts/montserrat/ */

@font-face {
  font-family: 'Montserrat';
  src: url('/assets/fonts/montserrat/montserrat-400.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Montserrat';
  src: url('/assets/fonts/montserrat/montserrat-500.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'Montserrat';
  src: url('/assets/fonts/montserrat/montserrat-600.woff2') format('woff2');
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: 'Montserrat';
  src: url('/assets/fonts/montserrat/montserrat-700.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}

:root {
  --bg:          #E6E6E6;
  --texto:       #1A1A1A;
  --principal:   #1B1D2E;
  --accent:      #F2570A;

  --superficie:  #FFFFFF;
  --texto-fraco: #5A5C68;
  --borda:       #C9C9CF;
  --borda-forte: #A5A6AE;
  --erro:        #B3261E;
  --erro-fundo:  #FBE9E7;
  --sucesso:     #1E7A4C;

  --raio:        10px;
  --raio-g:      16px;
  --sombra:      0 1px 2px rgba(27, 29, 46, .06), 0 8px 24px rgba(27, 29, 46, .07);

  --fonte:       'Montserrat', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

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

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

body {
  margin: 0;
  font-family: var(--fonte);
  font-size: 16px;
  line-height: 1.55;
  color: var(--texto);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { margin: 0; font-weight: 600; line-height: 1.2; }
p { margin: 0; }

a { color: var(--principal); }

button, input, select, textarea { font: inherit; color: inherit; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---- Formulários ---- */
.campo { margin-bottom: 18px; }

.campo label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--texto);
}

/* Vale para qualquer campo, inclusive os escritos sem o atributo type.
   Caixas de seleção e botões de rádio ficam de fora. */
.campo input:not([type="checkbox"]):not([type="radio"]),
.campo select,
.campo textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--borda);
  border-radius: var(--raio);
  background: var(--superficie);
  font: inherit;
  color: inherit;
  transition: border-color .15s, box-shadow .15s;
}

.campo textarea { resize: vertical; min-height: 88px; line-height: 1.5; }

.campo input:not([type="checkbox"]):not([type="radio"]):hover,
.campo select:hover,
.campo textarea:hover { border-color: var(--borda-forte); }

.campo input:not([type="checkbox"]):not([type="radio"]):focus,
.campo select:focus,
.campo textarea:focus {
  outline: none;
  border-color: var(--principal);
  box-shadow: 0 0 0 3px rgba(27, 29, 46, .10);
}

.campo input::placeholder,
.campo textarea::placeholder { color: #9A9BA4; }

/* Campos de data e hora: alinhar a altura com os demais */
.campo input[type="date"],
.campo input[type="time"] { min-height: 48px; }

/* Numéricos não precisam da largura toda, mas seguem o mesmo desenho */
.campo input[type="number"] { max-width: 180px; }

/* Seleção de arquivo */
.campo input[type="file"] {
  padding: 10px 12px;
  background: #FAFAFB;
  border-style: dashed;
  cursor: pointer;
  font-size: 14px;
}

.campo input[type="file"]::file-selector-button {
  margin-right: 12px;
  padding: 8px 14px;
  border: 0;
  border-radius: 8px;
  background: var(--principal);
  color: #fff;
  font: inherit;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
}

.campo input[type="file"]::file-selector-button:hover { background: #2A2D45; }

/* Caixas de seleção com o tamanho e a cor da marca */
.campo input[type="checkbox"] {
  width: 17px;
  height: 17px;
  accent-color: var(--accent);
  cursor: pointer;
}

/* ---- Botão ---- */
.botao {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 14px 20px;
  border: 0;
  border-radius: var(--raio);
  background: var(--accent);
  color: #FFFFFF;
  font-weight: 600;
  letter-spacing: .01em;
  cursor: pointer;
  transition: background .15s, transform .06s;
}

.botao:hover  { background: #D94D06; }
.botao:active { transform: translateY(1px); }

.botao--secundario {
  background: transparent;
  color: var(--principal);
  border: 1px solid var(--borda-forte);
}
.botao--secundario:hover { background: rgba(27, 29, 46, .05); }

/* ---- Alerta ---- */
.alerta {
  padding: 12px 14px;
  margin-bottom: 20px;
  border-left: 3px solid var(--erro);
  background: var(--erro-fundo);
  color: var(--erro);
  font-size: 14px;
}

.alerta--sucesso {
  border-left-color: var(--sucesso);
  background: #E7F4EC;
  color: var(--sucesso);
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
