:root {
  --bg: #071a3d;
  --bg-soft: #0b2452;
  --bg-light: #12386e;

  --white: #ffffff;
  --primary: #f47a20;
  --primary-dark: #d9630d;

  --secondary: #0c234a;
  --secondary-dark: #06152f;

  --accent: #35a8e0;
  --accent-soft: #69c3ee;

  --text: #122033;
  --text-soft: #5f6f86;
  --text-light: #eaf4ff;

  --border: rgba(255, 255, 255, 0.10);
  --section-bg: #f3f7fc;

  --success: #188038;
  --danger: #d93025;

  --shadow-sm: 0 8px 25px rgba(3, 15, 38, 0.10);
  --shadow-md: 0 15px 40px rgba(3, 15, 38, 0.16);
  --shadow-lg: 0 20px 50px rgba(3, 15, 38, 0.24);

  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --transition: all 0.3s ease;
  --container: 1200px;
}
/* ==========================================
   RECUPERAR SENHA - OVERRIDES DE TEMA
========================================== */

/* header sempre escuro */
.header{
  background: linear-gradient(135deg, #0f172a, #1e293b) !important;
  border-bottom: 1px solid rgba(255,255,255,.08) !important;
}

.nav-container{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
}

/* botão de tema */
.dark-mode-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:44px;
  height:44px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.12) !important;
  background:rgba(255,255,255,.08) !important;
  color:#fff !important;
  cursor:pointer;
  font-size:1.05rem;
  transition:.2s ease;
}

.dark-mode-btn:hover{
  background:#9c4118 !important;
  color:#fff !important;
  transform:translateY(-1px);
}

/* hero sempre escuro */
.recover-hero{
  background:
    radial-gradient(circle at top right, rgba(59,130,246,.15), transparent 25%),
    linear-gradient(135deg, #020617 0%, #0f172a 50%, #1e293b 100%) !important;
  color:#fff !important;
}

.recover-hero h1,
.recover-hero .recover-badge,
.recover-hero h3,
.recover-hero strong{
  color:#fff !important;
}

.recover-hero p,
.highlight-card p{
  color:rgba(255,255,255,.86) !important;
}

.highlight-card{
  background:rgba(255,255,255,.06) !important;
  border:1px solid rgba(255,255,255,.10) !important;
}

/* claro: card branco e textos escuros */
html:not([data-theme="dark"]) .recover-container{
  background:#ffffff !important;
  color:#122033 !important;
  border:1px solid rgba(12, 35, 74, 0.06) !important;
}

html:not([data-theme="dark"]) .recover-container .card-header h2{
  color:#0c234a !important;
}

html:not([data-theme="dark"]) .recover-container .card-header p{
  color:#5f6f86 !important;
}

html:not([data-theme="dark"]) .recover-container .form-group label{
  color:#0c234a !important;
}

html:not([data-theme="dark"]) .recover-container .form-group input{
  background:#ffffff !important;
  color:#122033 !important;
  border:1px solid #d6dce5 !important;
  -webkit-text-fill-color:#122033 !important;
}

html:not([data-theme="dark"]) .recover-container .form-group input::placeholder{
  color:#8b97a8 !important;
  -webkit-text-fill-color:#8b97a8 !important;
}

html:not([data-theme="dark"]) .back-to-login a{
  color:#0c234a !important;
}

html:not([data-theme="dark"]) .back-to-login a:hover{
  color:#f47a20 !important;
}

html:not([data-theme="dark"]) .message-box.success{
  color:#188038 !important;
}

html:not([data-theme="dark"]) .message-box.error{
  color:#d93025 !important;
}

/* escuro: card dark */
html[data-theme="dark"] body{
  background: var(--body-gradient) !important;
  color: var(--text) !important;
}

html[data-theme="dark"] .header{
  background: linear-gradient(135deg, #020617, #0b1220) !important;
  border-bottom: 1px solid rgba(255,255,255,.06) !important;
}

html[data-theme="dark"] .main-content,
html[data-theme="dark"] .recover-section,
html[data-theme="dark"] .recover-layout{
  background: transparent !important;
}

html[data-theme="dark"] .recover-container{
  background: linear-gradient(180deg, #172033 0%, #1b2638 100%) !important;
  border:1px solid rgba(148,163,184,.16) !important;
  color:#edf2ff !important;
  box-shadow: 0 14px 34px rgba(0,0,0,.28) !important;
}

html[data-theme="dark"] .recover-container .card-header h2{
  color:#ffffff !important;
}

html[data-theme="dark"] .recover-container .card-header p{
  color:#a7b3ca !important;
}

html[data-theme="dark"] .recover-container .form-group label{
  color:#edf2ff !important;
}

html[data-theme="dark"] .recover-container .form-group input{
  background:#0f172a !important;
  color:#edf2ff !important;
  border:1px solid rgba(148,163,184,.16) !important;
  -webkit-text-fill-color:#edf2ff !important;
}

html[data-theme="dark"] .recover-container .form-group input::placeholder{
  color:#8ea0bd !important;
  -webkit-text-fill-color:#8ea0bd !important;
}

html[data-theme="dark"] .btn-submit{
  background: linear-gradient(135deg, #1e293b, #334155) !important;
  color:#fff !important;
}

html[data-theme="dark"] .btn-submit:hover{
  background: linear-gradient(135deg, #f59e0b, #ffb020) !important;
  color:#111827 !important;
}

/* No escuro o texto era clareado para ler sobre o card escuro. Agora o fundo é BRANCO,
   então a cor tem de VOLTAR a ser a escura — senão fica verde-claro sobre branco, ilegível.
   Vale para os dois estados. */
html[data-theme="dark"] .message-box:not(:empty){
  background:#ffffff !important;
  border:1px solid #e2e8f0 !important;
  box-shadow: 0 2px 8px rgba(0,0,0,.25) !important;
}
html[data-theme="dark"] .message-box.error:not(:empty){
  border-left:4px solid #d93025 !important;
  color:#b3261e !important;
}
html[data-theme="dark"] .message-box.success:not(:empty){
  border-left:4px solid #188038 !important;
  color:#146c2e !important;
}

html[data-theme="dark"] .message-box.success{
  color:#4ade80 !important;
}

html[data-theme="dark"] .message-box.error{
  color:#f87171 !important;
}

html[data-theme="dark"] .back-to-login a{
  color:#a7b3ca !important;
}

html[data-theme="dark"] .back-to-login a:hover{
  color:#ffb020 !important;
}

html[data-theme="dark"] .footer{
  background: linear-gradient(135deg, #0f172a, #1e293b) !important;
  color:#fff !important;
}
/* RESET */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background:
    radial-gradient(circle at top right, rgba(53, 168, 224, 0.08), transparent 18%),
    linear-gradient(to bottom, #eef4fb, #f7fafe);
  color: var(--text);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden; overflow-x: clip;
}

img {
  max-width: 100%;
  display: block;
}

a {
  text-decoration: none;
}

button,
input {
  font: inherit;
}

/* UTILITÁRIOS */
.container {
  width: min(100% - 32px, var(--container));
  margin: 0 auto;
}

/* HEADER */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(46, 59, 78, 0.96);
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.nav-container {
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-img {
  height: 82px;
  width: auto;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.logo:hover .logo-img {
  transform: scale(1.03);
}

/* MAIN */
.main-content {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 48px 0;
}

.recover-section {
  width: 100%;
}

.recover-layout {
  display: grid;
  grid-template-columns: 1fr 430px;
  gap: 36px;
  align-items: center;
}

/* HERO LATERAL */
.recover-hero {
  background:
    radial-gradient(circle at top right, rgba(53, 168, 224, 0.14), transparent 25%),
    linear-gradient(135deg, #08214a 0%, #0c234a 45%, #12386e 100%);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 42px;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.recover-hero::before {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  top: -80px;
  right: -80px;
  filter: blur(6px);
}

.recover-hero > * {
  position: relative;
  z-index: 1;
}

.recover-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 700;
  margin-bottom: 20px;
}

.recover-hero h1 {
  font-size: clamp(2rem, 4vw, 3.1rem);
  line-height: 1.12;
  margin-bottom: 18px;
  font-weight: 800;
}

.recover-hero p {
  color: rgba(255, 255, 255, 0.86);
  font-size: 1.05rem;
  margin-bottom: 28px;
}

.recover-highlights {
  display: grid;
  gap: 16px;
}

.highlight-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: var(--radius-md);
  padding: 18px;
  backdrop-filter: blur(8px);
}

.highlight-card h3 {
  font-size: 1.08rem;
  margin-bottom: 8px;
}

.highlight-card p {
  font-size: 0.95rem;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
}

/* CARD */
.recover-container {
  width: 100%;
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(12, 35, 74, 0.06);
}

.card-header {
  text-align: center;
  margin-bottom: 28px;
}

.card-header h2 {
  font-size: 2rem;
  color: var(--secondary);
  margin-bottom: 10px;
}

.card-header p {
  color: var(--text-soft);
  font-size: 0.98rem;
}

/* FORM */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--secondary);
}

.form-group input {
  width: 100%;
  min-height: 52px;
  padding: 14px 16px;
  border: 1px solid #d6dce5;
  border-radius: 14px;
  background: #fff;
  color: var(--text);
  transition: var(--transition);
}

.form-group input:focus {
  outline: none;
  border-color: rgba(53, 168, 224, 0.5);
  box-shadow: 0 0 0 4px rgba(53, 168, 224, 0.12);
}

.form-group input::placeholder {
  color: #8b97a8;
}

/* BOTÃO */
.btn-submit {
  width: 100%;
  min-height: 52px;
  padding: 12px 16px;
  background: linear-gradient(135deg, var(--secondary), var(--bg-light));
  border: none;
  border-radius: 14px;
  color: white;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 12px 24px rgba(12, 35, 74, 0.14);
}

.btn-submit:hover {
  background: linear-gradient(135deg, var(--primary), #ff8c2a);
  transform: translateY(-2px);
}

.btn-submit:disabled {
  opacity: 0.72;
  cursor: not-allowed;
  transform: none;
}

/* MENSAGEM */
.message-box {
  margin-top: 16px;
  text-align: center;
  font-size: 0.95rem;
  min-height: 24px;
}

/* Fundo branco na caixa de mensagem: antes era só texto solto sobre o card, e no tema
   escuro o vermelho do erro sumia contra o fundo. Agora a mensagem é uma caixa de verdade.

   :not(:empty) é essencial — a div existe SEMPRE no HTML (o script só escreve o texto
   dentro), então sem esta guarda uma caixa branca vazia apareceria no formulário mesmo
   sem nenhuma mensagem. */
.message-box:not(:empty) {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 11px 14px;
  box-shadow: 0 2px 8px rgba(3, 15, 38, .06);
  line-height: 1.45;
}
/* A cor da borda esquerda carrega o significado (erro/sucesso) sem escurecer o fundo. */
.message-box.error:not(:empty)   { border-left: 4px solid #d93025; }
.message-box.success:not(:empty) { border-left: 4px solid #188038; }

.message-box.success {
  color: var(--success);
  font-weight: 600;
}

.message-box.error {
  color: var(--danger);
  font-weight: 600;
}

/* LINK VOLTAR */
.back-to-login {
  margin-top: 18px;
  text-align: center;
}

.back-to-login a {
  color: var(--secondary);
  font-size: 15px;
  font-weight: 600;
  transition: var(--transition);
}

.back-to-login a:hover {
  color: var(--primary);
  text-decoration: underline;
}

/* FOOTER */
.footer {
  background-color: var(--secondary-dark);
  color: #fff;
  text-align: center;
  padding: 20px 0;
  font-size: 14px;
  margin-top: auto;
}

.footer p {
  margin: 0;
}

/* RESPONSIVIDADE */
@media (max-width: 1080px) {
  .recover-layout {
    grid-template-columns: 1fr;
  }

  .recover-hero {
    text-align: center;
  }

  .recover-container {
    max-width: 540px;
    margin: 0 auto;
  }
}

@media (max-width: 768px) {
  .main-content {
    padding: 28px 0;
  }

  .recover-hero,
  .recover-container {
    padding: 24px;
  }

  .recover-hero h1 {
    font-size: 2rem;
  }

  .card-header h2 {
    font-size: 1.7rem;
  }

  .logo-img {
    height: 72px;
  }
}

@media (max-width: 560px) {
  .container {
    width: min(100% - 20px, var(--container));
  }

  .header {
    position: static;
  }

  .nav-container {
    min-height: 82px;
  }

  .logo-img {
    height: 62px;
  }

  .recover-hero,
  .recover-container {
    padding: 20px;
    border-radius: 20px;
  }

  .recover-hero h1 {
    font-size: 1.75rem;
  }

  .recover-hero p,
  .highlight-card p,
  .card-header p {
    font-size: 0.95rem;
  }

  .form-group input,
  .btn-submit {
    min-height: 50px;
    font-size: 15px;
  }

  .footer {
    font-size: 13px;
  }
}

/* Nesta tela não mostramos o botão de chat de dúvidas */
#ai-chat-fab { display: none !important; }

/* Modal de confirmação (por cima de tudo) */
.recover-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}
.recover-modal-box {
  background: #fff;
  border-radius: 18px;
  padding: 28px 26px;
  max-width: 420px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.28);
}
.recover-modal-icon { font-size: 42px; margin-bottom: 8px; }
.recover-modal-box h3 { margin: 0 0 10px; color: #0f172a; font-size: 1.3rem; }
.recover-modal-box p { margin: 0 0 18px; color: #475569; font-size: 0.95rem; line-height: 1.5; }