/* =====================================================================
   TALENTOS CENTER BOX — base (tokens, tipografia, controles comuns)
   ===================================================================== */

@font-face { font-family: 'Inter'; font-weight: 400; font-display: swap; src: url('../fonts/inter-regular.woff') format('woff'); }
@font-face { font-family: 'Inter'; font-weight: 500; font-display: swap; src: url('../fonts/inter-medium.woff') format('woff'); }
@font-face { font-family: 'Inter'; font-weight: 600; font-display: swap; src: url('../fonts/inter-semibold.woff') format('woff'); }
@font-face { font-family: 'Inter'; font-weight: 700; font-display: swap; src: url('../fonts/inter-bold.woff') format('woff'); }
@font-face { font-family: 'Inter'; font-weight: 800; font-display: swap; src: url('../fonts/inter-extrabold.woff') format('woff'); }

:root {
  /* Identidade */
  --azul: #001689;          /* RGB 0, 22, 137 */
  --azul-900: #000d52;
  --azul-800: #00106b;
  --azul-600: #1a2fa0;
  --azul-100: #e6e9f6;
  --azul-50: #f3f5fb;
  --amarelo: #ffc629;
  --amarelo-600: #e6ac00;
  --amarelo-100: #fff4d1;
  --branco: #ffffff;

  /* Neutros */
  --tinta: #0e1630;          /* texto principal (azul muito escuro) */
  --tinta-2: #4a5270;        /* texto secundário — contraste 7.4:1 */
  --tinta-3: #6b7290;        /* auxiliar — contraste 4.8:1 */
  --linha: #e3e6ef;
  --linha-forte: #c9cedd;
  --fundo-alt: #f6f7fb;

  /* Estados */
  --vermelho: #c62828;
  --vermelho-100: #fdecec;
  --verde: #1b7a3d;          /* apenas para confirmação de sucesso */
  --verde-100: #e7f5ec;
  --laranja: #9a5b00;
  --laranja-100: #fff3df;

  --raio-s: 6px;
  --raio: 10px;
  --raio-l: 16px;
  --sombra-s: 0 1px 2px rgba(14, 22, 48, .06);
  --sombra: 0 1px 2px rgba(14, 22, 48, .05), 0 6px 20px -8px rgba(14, 22, 48, .14);
  --sombra-l: 0 2px 4px rgba(14, 22, 48, .04), 0 24px 48px -20px rgba(0, 22, 137, .28);

  --fonte: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --largura: 1180px;
  --foco: 0 0 0 3px rgba(255, 198, 41, .9), 0 0 0 5px var(--azul);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }
body {
  margin: 0;
  font-family: var(--fonte);
  font-size: 16px;
  line-height: 1.6;
  color: var(--tinta);
  background: var(--branco);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: var(--azul); }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { line-height: 1.15; margin: 0; color: var(--azul); letter-spacing: -0.02em; }
p { margin: 0; }
:focus-visible { outline: none; box-shadow: var(--foco); border-radius: 4px; }
[hidden] { display: none !important; }

.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.pular { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--azul); color: #fff; padding: 10px 16px; border-radius: var(--raio-s); text-decoration: none; font-weight: 600; }
.pular:focus { top: 12px; }

.icon { width: 1.25em; height: 1.25em; flex: none; display: block; }
[data-icon], span:has(> svg.icon) { display: inline-flex; align-items: center; justify-content: center; flex: none; }

/* ----------------------------- Botões ----------------------------- */
.btn {
  --bg: var(--azul); --fg: #fff; --bd: var(--azul);
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  min-height: 48px; padding: 0 1.4em;
  border: 1.5px solid var(--bd); border-radius: var(--raio);
  background: var(--bg); color: var(--fg);
  font-weight: 600; font-size: 1rem; letter-spacing: -0.005em;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .18s, border-color .18s, color .18s, transform .18s, box-shadow .18s;
}
.btn:hover { --bg: var(--azul-800); --bd: var(--azul-800); }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn[aria-disabled='true'] { opacity: .55; cursor: not-allowed; transform: none; }
.btn--amarelo { --bg: var(--amarelo); --fg: var(--azul-900); --bd: var(--amarelo); }
.btn--amarelo:hover { --bg: #ffd04f; --bd: #ffd04f; }
.btn--contorno { --bg: transparent; --fg: var(--azul); --bd: var(--linha-forte); }
.btn--contorno:hover { --bg: var(--azul-50); --bd: var(--azul); }
.btn--claro { --bg: #fff; --fg: var(--azul); --bd: #fff; }
.btn--fantasma { --bg: transparent; --fg: var(--tinta-2); --bd: transparent; }
.btn--fantasma:hover { --bg: var(--azul-50); --fg: var(--azul); --bd: transparent; }
.btn--perigo { --bg: var(--vermelho); --bd: var(--vermelho); }
.btn--perigo:hover { --bg: #a51f1f; --bd: #a51f1f; }
.btn--p { min-height: 36px; padding: 0 .9em; font-size: .875rem; border-radius: var(--raio-s); }
.btn--bloco { width: 100%; }
.btn .spinner { display: none; }
.btn.carregando .spinner { display: inline-block; }
.btn.carregando .btn__icone { display: none; }

.spinner { width: 1.1em; height: 1.1em; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: girar .7s linear infinite; }
@keyframes girar { to { transform: rotate(360deg); } }

/* ----------------------------- Campos ----------------------------- */
.campo-grupo { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.campo-rotulo { font-weight: 600; font-size: .9375rem; color: var(--tinta); }
.campo-rotulo .obrig { color: var(--vermelho); margin-left: 2px; }
.campo-ajuda { font-size: .8125rem; color: var(--tinta-3); }
.campo {
  width: 100%; min-height: 50px; padding: 12px 14px;
  border: 1.5px solid var(--linha-forte); border-radius: var(--raio);
  background: #fff; color: var(--tinta); font-size: 1rem;
  transition: border-color .15s, box-shadow .15s;
  -webkit-appearance: none; appearance: none;
}
.campo::placeholder { color: #9aa0b6; }
.campo:hover { border-color: #aab1c6; }
.campo:focus { outline: none; border-color: var(--azul); box-shadow: 0 0 0 3px rgba(0, 22, 137, .14); }
textarea.campo { min-height: 120px; resize: vertical; line-height: 1.5; }
select.campo { padding-right: 40px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23001689' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 18px; cursor: pointer; }
.campo-grupo.invalido .campo, .campo-grupo.invalido .combo__input, .campo-grupo.invalido .upload { border-color: var(--vermelho); }
.campo-erro { display: none; align-items: flex-start; gap: 6px; font-size: .8125rem; color: var(--vermelho); font-weight: 500; }
.campo-grupo.invalido .campo-erro { display: flex; }
.campo-erro .icon { width: 1.05em; height: 1.05em; margin-top: 2px; }

/* --------------------------- Combobox ----------------------------- */
.combo { position: relative; }
.combo__input { padding-right: 46px; text-overflow: ellipsis; }
.combo__toggle { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; display: grid; place-items: center; border: 0; background: transparent; color: var(--azul); cursor: pointer; border-radius: var(--raio-s); }
.combo.aberto .combo__toggle .icon { transform: rotate(180deg); }
.combo__toggle .icon { transition: transform .18s; }
.combo__lista { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 6px); max-height: 300px; overflow-y: auto; margin: 0; padding: 6px; list-style: none; background: #fff; border: 1px solid var(--linha); border-radius: var(--raio); box-shadow: var(--sombra-l); overscroll-behavior: contain; }
.combo__grupo { padding: 10px 10px 4px; font-size: .6875rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--tinta-3); }
.combo__opcao { display: flex; flex-direction: column; gap: 1px; padding: 9px 10px; border-radius: var(--raio-s); cursor: pointer; }
.combo__opcao.ativo { background: var(--azul-50); }
.combo__opcao.selecionado .combo__rotulo { color: var(--azul); font-weight: 600; }
.combo__rotulo { font-size: .9375rem; }
.combo__detalhe { font-size: .8125rem; color: var(--tinta-3); }
.combo__vazio { padding: 12px 10px; color: var(--tinta-3); font-size: .9rem; }

/* ----------------------------- Avisos ----------------------------- */
.aviso { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--raio); font-size: .9375rem; line-height: 1.5; }
.aviso .icon { margin-top: 2px; }
.aviso--erro { background: var(--vermelho-100); color: #8e1c1c; }
.aviso--sucesso { background: var(--verde-100); color: #13552b; }
.aviso--info { background: var(--azul-50); color: var(--azul-800); }

.toasts { position: fixed; z-index: 200; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; max-width: min(420px, calc(100vw - 32px)); }
.toast { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; border-radius: var(--raio); background: var(--tinta); color: #fff; box-shadow: var(--sombra-l); font-size: .9rem; animation: entrar .2s ease-out; }
.toast--sucesso .icon { color: #7ee2a1; }
.toast--erro { background: #7a1616; }
.toast.saindo { opacity: 0; transform: translateY(6px); transition: .25s; }
@keyframes entrar { from { opacity: 0; transform: translateY(8px); } }

.faixa-demo { position: sticky; top: 0; z-index: 90; height: 29px; line-height: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: repeating-linear-gradient(-45deg, #ffc629 0 14px, #ffd25a 14px 28px); color: var(--azul-900); text-align: center; font-size: .75rem; font-weight: 700; padding: 6px 12px; letter-spacing: .02em; }

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