:root {
  --bg: #090b0f;
  --bg-soft: #10141b;
  --panel: rgba(255, 255, 255, .075);
  --line: rgba(255, 255, 255, .14);
  --text: #f6f8fb;
  --muted: #a9b1bd;
  --brand-hue: 177;
  --brand-l: 82%;
  --brand-c: 0.133;
  --teal: oklch(var(--brand-l) var(--brand-c) var(--brand-hue));
  --blue: #7aa5ff;
  --coral: #ff8b70;
  --ink: #07100d;
  --selection-bg: rgba(72, 224, 194, .3);
  --selection-text: #07100d;
}
html.light-theme,
body.light-theme {
  --bg: #f4f7fb;
  --bg-soft: #ffffff;
  --panel: rgba(8, 20, 30, .055);
  --line: rgba(8, 20, 30, .14);
  --text: #111827;
  --muted: #51606f;
  --blue: #2d65d8;
  --coral: #c94a35;
  --ink: #07100d;
  --selection-bg: #111827;
  --selection-text: #ffffff;
}
* { box-sizing: border-box; }
::selection,
body.light-theme ::selection,
html.light-theme body ::selection,
input::selection,
textarea::selection,
select::selection,
a::selection,
button::selection {
  background: var(--selection-bg) !important;
  color: var(--selection-text) !important;
  -webkit-text-fill-color: var(--selection-text) !important;
  text-shadow: none !important;
}
::-moz-selection,
body.light-theme ::-moz-selection,
html.light-theme body ::-moz-selection,
input::-moz-selection,
textarea::-moz-selection,
select::-moz-selection,
a::-moz-selection,
button::-moz-selection {
  background: var(--selection-bg) !important;
  color: var(--selection-text) !important;
  text-shadow: none !important;
}
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Manrope, system-ui, -apple-system, "Segoe UI", sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
body.light-theme,
html.light-theme body {
  background:
    radial-gradient(circle at top left, rgba(72, 224, 194, .16), transparent 32%),
    linear-gradient(180deg, #ffffff 0%, var(--bg) 100%);
  color: var(--text);
}
.auth-page { width: 100%; max-width: 420px; }
.auth-card {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 36px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, .42);
}
body.light-theme .auth-card,
html.light-theme body .auth-card {
  box-shadow: 0 28px 70px rgba(17, 24, 39, .12);
}
.auth-card h1 {
  font-family: "Space Grotesk", sans-serif;
  font-size: 24px;
  margin: 0 0 6px;
}
.subtitulo { color: var(--muted); font-size: 14px; margin: 0 0 24px; }
.campo { margin-bottom: 16px; }
.campo label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 6px; }
.campo input,
.campo textarea,
.campo select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .06);
  color: var(--text);
  font: inherit;
  font-size: 14.5px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.campo textarea { resize: vertical; min-height: 90px; }
.campo select { cursor: pointer; }
body.light-theme .campo input,
body.light-theme .campo textarea,
body.light-theme .campo select,
html.light-theme body .campo input,
html.light-theme body .campo textarea,
html.light-theme body .campo select {
  background: #ffffff;
  color: #111827;
}
.campo input::placeholder,
.campo textarea::placeholder { color: var(--muted); }
.campo input:focus,
.campo textarea:focus,
.campo select:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(72, 224, 194, .14); }

/* Input de arquivo — o botão nativo ("Escolher arquivo") não dá pra restylizar por dentro sem
   esconder o texto do nome do arquivo escolhido, então só ajusta o entorno (borda tracejada,
   padding) pra não ficar um controle solto sem nenhum tratamento visual no meio do form escuro. */
.campo input[type="file"] {
  padding: 10px 12px;
  border-style: dashed;
  font-size: 13px;
  color: var(--muted);
}
body.light-theme .campo input[type="file"],
html.light-theme body .campo input[type="file"] {
  color: #51606f;
}
.btn {
  width: 100%;
  padding: 14px;
  border: 0;
  border-radius: 999px;
  background: var(--teal);
  color: var(--ink);
  font-weight: 800;
  font-size: 15px;
  cursor: pointer;
  margin-top: 6px;
  transition: opacity .15s ease, transform .1s ease, box-shadow .15s ease;
}
.btn:hover { opacity: .92; box-shadow: 0 8px 22px rgba(72, 224, 194, .25); }
.btn:active { transform: scale(.98); }
.auth-links { margin-top: 20px; text-align: center; font-size: 13px; color: var(--muted); }
.auth-links a { color: var(--teal); font-weight: 700; }
.alerta { padding: 12px 14px; border-radius: 8px; font-size: 13.5px; margin-bottom: 18px; line-height: 1.5; }
.alerta-erro { background: rgba(255, 110, 90, .12); border: 1px solid rgba(255, 110, 90, .4); color: #ff9a8a; }
.alerta-sucesso { background: rgba(72, 224, 194, .1); border: 1px solid rgba(72, 224, 194, .35); color: var(--teal); }
.alerta-info { background: rgba(122, 165, 255, .1); border: 1px solid rgba(122, 165, 255, .35); color: var(--blue); word-break: break-all; }

/* Campo de telefone com bandeira (intl-tel-input) — a lib vem só com tema claro por padrão,
   sem isso a lista de países fica branca/deslocada em cima do app escuro (achado real reportado
   pelo Victor 2026-08-20, print da tela de login/cadastro). */
.iti { width: 100%; display: block; }
.iti input.iti__tel-input {
  width: 100%;
  padding: 12px 14px 12px 88px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .06);
  color: var(--text);
  font: inherit;
  font-size: 14.5px;
}
body.light-theme .iti input.iti__tel-input,
html.light-theme body .iti input.iti__tel-input {
  background: #ffffff;
  color: #111827;
}
.iti input.iti__tel-input { transition: border-color .15s ease, box-shadow .15s ease; }
.iti input.iti__tel-input:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(72, 224, 194, .14); }
.iti__selected-flag {
  background: rgba(255, 255, 255, .04);
  border-radius: 8px 0 0 8px;
}
.iti__selected-flag:hover, .iti__selected-flag:focus { background: rgba(255, 255, 255, .08); }
.iti__selected-dial-code { color: var(--text); }
.iti__arrow { border-top-color: var(--muted); }
.iti__arrow--up { border-bottom-color: var(--muted); }
.iti__country-list {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .5);
  max-height: 220px;
  z-index: 50;
}
body.light-theme .iti__selected-flag,
html.light-theme body .iti__selected-flag {
  background: rgba(8, 20, 30, .04);
}
body.light-theme .iti__selected-flag:hover,
body.light-theme .iti__selected-flag:focus,
html.light-theme body .iti__selected-flag:hover,
html.light-theme body .iti__selected-flag:focus {
  background: rgba(8, 20, 30, .08);
}
body.light-theme .iti__country-list,
html.light-theme body .iti__country-list {
  background: #ffffff;
  box-shadow: 0 16px 40px rgba(17, 24, 39, .16);
}
.iti__country { color: var(--text); padding: 9px 12px; }
.iti__country.iti__highlight { background: rgba(72, 224, 194, .14); }
.iti__divider { border-bottom: 1px solid var(--line); }
.iti__dial-code { color: var(--muted); }
.iti__country-list::-webkit-scrollbar { width: 8px; }
.iti__country-list::-webkit-scrollbar-thumb { background: var(--line); border-radius: 8px; }
