/* ============================================================
   Recuperar senha ("esqueci minha senha") — visual dedicado, mesmo
   padrão de css/login.css (card centralizado, sem o painel de mercado
   que só o login usa). Não compartilhado com css/auth.css (que
   continua servindo create-password.php, ainda não redesenhada).
   Tema escuro é o default; html[data-theme="light"] no fim do
   arquivo sobrescreve — ver js/theme.js pro mecanismo de 3 estados.
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #eef3f9;
  background: #0a1420;
  -webkit-font-smoothing: antialiased;
}

:focus-visible {
  outline: 2px solid #6fa8e6;
  outline-offset: 2px;
  border-radius: 4px;
}

.page {
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  background: radial-gradient(120% 90% at 50% -12%, #17324b, #0a1420 60%);
}

.card-shell { width: 100%; max-width: 400px; }

.brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 22px;
}
.brand-row-left { display: flex; align-items: center; gap: 10px; }
.brand-row img { width: 26px; height: 26px; object-fit: contain; }
.brand-row-left span {
  font-family: ui-serif, Georgia, "Iowan Old Style", "Palatino Linotype", "Times New Roman", serif;
  font-size: 14.5px;
  font-weight: 600;
  color: #cfe0f0;
}

.card {
  background: #101f30;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #eef3f9;
  border-radius: 20px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5), 0 2px 8px rgba(0, 0, 0, 0.3);
  padding: clamp(26px, 4vw, 36px);
  animation: card-in 0.5s cubic-bezier(.16,.8,.3,1) both;
}
@media (prefers-reduced-motion: reduce) { .card { animation: none; } }
@keyframes card-in { from { opacity: 0; transform: translateY(10px); } }

.card h2 {
  font-family: ui-serif, Georgia, "Iowan Old Style", "Palatino Linotype", "Times New Roman", serif;
  font-weight: 500;
  font-size: 23px;
  margin: 0 0 6px;
}
.card p.sub {
  margin: 0 0 22px;
  font-size: 14px;
  color: #93a9c2;
  line-height: 1.5;
}

.field { margin-bottom: 4px; }
.field label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #93a9c2;
  margin: 0 0 6px;
}

.card input.input {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  font-size: 15.5px;
  font-family: inherit;
  color: #eef3f9;
  background: #0c1a28;
  border: 1.5px solid rgba(255, 255, 255, 0.10);
  border-radius: 10px;
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}
.card input.input::placeholder { color: #5c7590; }
.card input.input:hover { border-color: rgba(255, 255, 255, 0.18); }
.card input.input:focus {
  border-color: #4a90d9;
  box-shadow: 0 0 0 4px rgba(74, 144, 217, 0.16);
}

.btn {
  margin-top: 18px;
  width: 100%;
  height: 48px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #6fa8e6, #4a90d9);
  color: #08131f;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  text-decoration: none;
  transition: transform 0.12s ease, filter 0.16s ease;
  box-shadow: 0 10px 24px -8px rgba(74, 144, 217, 0.6);
}
.btn:hover { filter: brightness(1.06); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn.secondary {
  margin-top: 10px;
  background: transparent;
  color: #cfe0f0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: none;
}
.btn.secondary:hover { border-color: #4a90d9; filter: none; }

.foot {
  margin-top: 20px;
  text-align: center;
  font-size: 12px;
  color: #5c7590;
}

.flash {
  margin: 0 0 18px;
  padding: 11px 13px;
  border-radius: 10px;
  font-size: 13.5px;
  line-height: 1.4;
  text-align: center;
}
.flash.Info { background: rgba(74, 144, 217, 0.12); border: 1px solid rgba(74, 144, 217, 0.3); color: #cfe0f0; }
.flash.Erro { background: rgba(248, 113, 113, 0.12); border: 1px solid rgba(248, 113, 113, 0.3); color: #ffd9d9; }

.success-state { text-align: center; padding: 4px 0 2px; }
.success-icon {
  width: 50px; height: 50px; border-radius: 50%; margin: 0 auto 16px;
  background: rgba(74, 222, 128, 0.14); display: flex; align-items: center; justify-content: center;
}
.success-icon svg { width: 22px; height: 22px; stroke: #4ade80; stroke-width: 2.4; fill: none; stroke-linecap: round; stroke-linejoin: round; }

#splash {
  position: fixed; inset: 0;
  background: rgba(10, 20, 32, 0.85);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999;
  backdrop-filter: blur(2px);
  transition: opacity .25s ease, visibility .25s ease;
}
#splash.hide { opacity: 0; visibility: hidden; pointer-events: none; }
.splash-card {
  background: #101f30; color: #eef3f9;
  padding: 20px 24px; border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  text-align: center; width: min(300px, 86vw);
}
.splash-card img { display: block; margin: 0 auto 10px; height: auto; width: 64px; }
.splash-card p { margin: 0; font-size: 13px; color: #93a9c2; }
.splash-card .spinner {
  margin: 12px auto 0; width: 26px; height: 26px; border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.12);
  border-top-color: #4a90d9;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.whats-fab {
  position: fixed; right: 18px; bottom: 18px; z-index: 9990;
  width: 56px; height: 56px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: #fff;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
  transition: transform .08s ease, filter .18s ease;
}
.whats-fab:hover { filter: brightness(1.05); transform: translateY(-1px); }
.whats-icon { width: 28px; height: 28px; display: block; }

@media (max-width: 480px) {
  .whats-fab { width: 52px; height: 52px; right: 14px; bottom: 14px; }
  .whats-icon { width: 26px; height: 26px; }
}

/* ── Tema claro ─────────────────────────────────────────────────────── */
html[data-theme="light"] body { background: #f2f5fb; color: #16324a; }
html[data-theme="light"] :focus-visible { outline-color: #24507a; }
html[data-theme="light"] .page {
  background: radial-gradient(120% 90% at 50% -12%, #e3ebf6, #f2f5fb 60%);
}
html[data-theme="light"] .brand-row-left span { color: #24405c; }
html[data-theme="light"] .card {
  background: #ffffff;
  border-color: rgba(10, 20, 32, 0.08);
  color: #16324a;
  box-shadow: 0 24px 70px rgba(16, 40, 64, 0.12), 0 2px 8px rgba(16, 40, 64, 0.06);
}
html[data-theme="light"] .card p.sub { color: #5c7590; }
html[data-theme="light"] .field label { color: #5c7590; }
html[data-theme="light"] .card input.input {
  color: #16324a;
  background: #eef2f8;
  border-color: rgba(10, 20, 32, 0.12);
}
html[data-theme="light"] .card input.input::placeholder { color: #8ba0b3; }
html[data-theme="light"] .card input.input:hover { border-color: rgba(10, 20, 32, 0.22); }
html[data-theme="light"] .card input.input:focus {
  border-color: #1a3a5c;
  box-shadow: 0 0 0 4px rgba(26, 58, 92, 0.14);
}
html[data-theme="light"] .btn {
  background: linear-gradient(135deg, #24507a, #1a3a5c);
  color: #f2f5fb;
  box-shadow: 0 10px 24px -8px rgba(26, 58, 92, 0.35);
}
html[data-theme="light"] .btn.secondary {
  color: #1a3a5c;
  border-color: rgba(10, 20, 32, 0.16);
}
html[data-theme="light"] .btn.secondary:hover { border-color: #1a3a5c; }
html[data-theme="light"] .foot { color: #8ba0b3; }
html[data-theme="light"] .flash.Info { background: rgba(26, 58, 92, 0.08); border-color: rgba(26, 58, 92, 0.22); color: #1a3a5c; }
html[data-theme="light"] .flash.Erro { background: rgba(220, 38, 38, 0.08); border-color: rgba(220, 38, 38, 0.25); color: #7f1d1d; }
html[data-theme="light"] .success-icon { background: rgba(22, 163, 74, 0.12); }
html[data-theme="light"] .success-icon svg { stroke: #16a34a; }
html[data-theme="light"] #splash { background: rgba(242, 245, 251, 0.92); }
html[data-theme="light"] .splash-card {
  background: #ffffff; color: #16324a;
  border-color: rgba(10, 20, 32, 0.08);
  box-shadow: 0 20px 50px rgba(16, 40, 64, 0.14);
}
html[data-theme="light"] .splash-card p { color: #5c7590; }
html[data-theme="light"] .splash-card .spinner {
  border-color: rgba(10, 20, 32, 0.12);
  border-top-color: #1a3a5c;
}
