/* ==========================================================================
   DiviFácil — base: fonte, cores (laranja suave), reset, botões e campos
   Para trocar a cor do sistema inteiro, edite as variáveis --brand-* abaixo.
   ========================================================================== */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('fonts/inter-latin-var.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* Laranja suave (cor principal) */
  --brand-50:  #FFF6EF;
  --brand-100: #FFEBDC;
  --brand-200: #FFD6B8;
  --brand-300: #FFBE90;
  --brand-400: #FFA467;
  --brand-500: #FF8A47;   /* principal */
  --brand-600: #F26F24;   /* fim do degradê / hover */
  --brand-700: #C2500D;   /* texto e links sobre fundo branco (contraste AA) */
  --grad-brand: linear-gradient(135deg, #FF9A57 0%, #F26B1F 100%);

  /* Neutros */
  --ink-900: #0F172A;
  --ink-800: #1E293B;
  --ink-700: #334155;
  --ink-600: #475569;
  --ink-500: #64748B;
  --ink-400: #94A3B8;
  --ink-300: #CBD5E1;
  --ink-200: #E2E8F0;
  --ink-100: #F1F5F9;
  --ink-50:  #F8FAFC;

  /* Estados */
  --ok: #16A34A;     --ok-bg: #DCFCE7;
  --erro: #DC2626;   --erro-bg: #FEE2E2;
  --aviso: #D97706;  --aviso-bg: #FEF3C7;
  --info: #C2500D;   --info-bg: #FFEBDC;

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .05);
  --shadow: 0 12px 30px -14px rgba(15, 23, 42, .22);
  --shadow-lg: 0 24px 60px -20px rgba(15, 23, 42, .4);

  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink-800);
  background: var(--ink-50);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--brand-700); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, p { overflow-wrap: break-word; }

:focus-visible { outline: 3px solid rgba(255, 138, 71, .55); outline-offset: 2px; border-radius: 6px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* Ícones (sprite /arquivos/img/icones.svg) */
.ico {
  display: inline-block; width: 1.25em; height: 1.25em; flex: none;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  vertical-align: middle;
}

@keyframes girar { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 20px;
  border: 0; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 700; line-height: 1; white-space: nowrap;
  text-decoration: none; cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, background-color .2s ease, filter .2s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { text-decoration: none; }
.btn--primario { color: #fff; background: var(--grad-brand); box-shadow: 0 8px 18px -8px rgba(242, 107, 31, .7); }
.btn--primario:hover { filter: brightness(1.05); transform: translateY(-1px); box-shadow: 0 14px 24px -10px rgba(242, 107, 31, .75); }
.btn--primario:active { transform: translateY(0); filter: brightness(.98); }
.btn--sec { color: var(--ink-700); background: #fff; border: 1px solid var(--ink-200); }
.btn--sec:hover { background: var(--ink-50); border-color: var(--ink-300); }
.btn--perigo { color: #fff; background: #DC2626; box-shadow: 0 8px 18px -8px rgba(220, 38, 38, .6); }
.btn--perigo:hover { filter: brightness(1.06); }
.btn--bloco { width: 100%; }
.btn--lg { min-height: 50px; padding: 0 28px; font-size: 15px; }

.btn[disabled], .btn.is-carregando { cursor: progress; transform: none; }
.btn__spinner { display: none; animation: girar .8s linear infinite; }
.btn.is-carregando .btn__spinner { display: inline-block; }

/* ---------- Campos de formulário ---------- */
.campo { display: block; margin: 0 0 16px; }
.campo__rotulo {
  display: block; margin: 0 0 6px;
  font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-500);
}
.campo__caixa { position: relative; display: flex; align-items: center; }
.campo__icone { position: absolute; left: 13px; width: 17px; height: 17px; color: var(--ink-400); pointer-events: none; }
.campo__input {
  width: 100%; height: 44px; padding: 0 14px 0 40px;
  font-size: 14px; color: var(--ink-800);
  background: var(--ink-100); border: 1px solid var(--ink-200); border-radius: var(--radius-sm);
  transition: border-color .2s, box-shadow .2s, background-color .2s;
}
.campo__input::placeholder { color: var(--ink-400); }
.campo__input:hover { border-color: var(--ink-300); }
.campo__input:focus { outline: none; background: #fff; border-color: var(--brand-500); box-shadow: 0 0 0 4px rgba(255, 138, 71, .18); }
.campo__input[aria-invalid="true"] { border-color: var(--erro); box-shadow: 0 0 0 4px rgba(220, 38, 38, .1); }
.campo__input--olho { padding-right: 46px; }

/* Autopreenchimento do navegador sem o azul padrão */
.campo__input:-webkit-autofill,
.campo__input:-webkit-autofill:hover {
  -webkit-text-fill-color: var(--ink-800);
  -webkit-box-shadow: 0 0 0 1000px var(--brand-50) inset;
  box-shadow: 0 0 0 1000px var(--brand-50) inset;
  border-color: var(--brand-200);
  caret-color: var(--ink-800);
}
.campo__input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px #fff inset, 0 0 0 4px rgba(255, 138, 71, .18);
  box-shadow: 0 0 0 1000px #fff inset, 0 0 0 4px rgba(255, 138, 71, .18);
  border-color: var(--brand-500);
}

/* Botão de mostrar/ocultar senha */
.campo__olho {
  position: absolute; right: 5px; width: 36px; height: 36px;
  display: grid; place-items: center;
  border: 0; border-radius: 8px; background: transparent; color: var(--ink-400); cursor: pointer;
  transition: background-color .15s, color .15s;
}
.campo__olho:hover { color: var(--ink-700); background: var(--ink-200); }
.campo__olho .ico { width: 18px; height: 18px; }
.campo__olho .ico--off { display: none; }
.campo__olho.is-visivel .ico--on { display: none; }
.campo__olho.is-visivel .ico--off { display: inline-block; }

/* Caixa de seleção (Lembrar-me) */
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-600); cursor: pointer; user-select: none; }
.check input {
  -webkit-appearance: none; appearance: none; margin: 0;
  width: 17px; height: 17px; display: grid; place-content: center;
  background: #fff; border: 1.5px solid var(--ink-300); border-radius: 5px; cursor: pointer;
  transition: background-color .15s, border-color .15s, box-shadow .15s;
}
.check input:hover { border-color: var(--brand-400); }
.check input:checked { background: var(--brand-500); border-color: var(--brand-500); }
.check input:checked::after {
  content: ''; width: 9px; height: 5px; margin-top: -2px;
  border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg);
}
.check input:focus-visible { outline: 3px solid rgba(255, 138, 71, .5); outline-offset: 2px; }
.check input[aria-invalid="true"] { border-color: var(--erro); box-shadow: 0 0 0 3px rgba(220, 38, 38, .14); }
