/* ── Reset ─────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Variáveis — Tema Escuro (padrão) ─────────────────────────────────────── */
:root {
  --laranja:   #FF6E28;
  --amber:     #FFB900;
  --bg:        #121212;
  --card:      #1C1C1C;
  --card-bd:   #2A2A2A;
  --input-bg:  #252525;
  --input-bd:  #383838;
  --text:      #F5F5F5;
  --muted:     #777777;
  --success:   #4CAF50;
  --error:     #FF4444;
  --info:      #3B9EFF;
  --demo:      #FFB900;
  --radius:    12px;
  --shadow:    0 24px 60px rgba(0,0,0,.55);
  --grid-line: rgba(255,110,40,.04);
  --accent:    #FF6E28;
  --hover:     rgba(255,110,40,.04);
  --border:    #383838;
}

/* ── Variáveis — Tema Claro ───────────────────────────────────────────────── */
body.light {
  --bg:        #F2F2F2;
  --card:      #FFFFFF;
  --card-bd:   #E0E0E0;
  --input-bg:  #F7F7F7;
  --input-bd:  #D4D4D4;
  --text:      #1A1A1A;
  --muted:     #888888;
  --shadow:    0 24px 60px rgba(0,0,0,.10);
  --grid-line: rgba(255,110,40,.06);
}

/* ── Base ──────────────────────────────────────────────────────────────────── */
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

/* ── Grid decorativo no fundo ─────────────────────────────────────────────── */
.bg-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 48px 48px;
  z-index: 0;
}

/* ── Botão de tema ────────────────────────────────────────────────────────── */
.theme-toggle {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 100;
  width: 52px;
  height: 28px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  background: var(--input-bg);
  border: 1.5px solid var(--input-bd);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5px;
  transition: background .3s, border-color .3s;
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.theme-toggle:hover { border-color: var(--laranja); }

.theme-icon-dark,
.theme-icon-light {
  font-size: .85rem;
  line-height: 1;
  transition: opacity .3s, transform .3s;
}

/* Escuro: mostra lua, oculta sol */
body:not(.light) .theme-icon-light  { opacity: .3; }
body:not(.light) .theme-icon-dark   { opacity: 1;  }

/* Claro: mostra sol, oculta lua */
body.light .theme-icon-dark  { opacity: .3; }
body.light .theme-icon-light { opacity: 1;  }

/* ── Card ──────────────────────────────────────────────────────────────────── */
.page { width: 100%; max-width: 440px; position: relative; z-index: 1; }

.card {
  background: var(--card);
  border: 1px solid var(--card-bd);
  border-radius: var(--radius);
  padding: 2.4rem 2.2rem;
  box-shadow: var(--shadow);
  animation: fadeUp .35s ease both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0);    }
}

/* ── Logo ──────────────────────────────────────────────────────────────────── */
.logo {
  display: flex;
  justify-content: center;
  margin-bottom: 1.4rem;
}
.logo img {
  height: 220px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 12px rgba(255,110,40,.2));
}

/* ── Icon header (recuperação etc.) ──────────────────────────────────────── */
.icon-header {
  font-size: 3rem;
  text-align: center;
  margin-bottom: .8rem;
}

/* ── Tipografia ───────────────────────────────────────────────────────────── */
.heading    { font-size: 1.45rem; font-weight: 700; text-align: center; }
.subheading { font-size: .85rem; color: var(--muted); text-align: center; margin: .3rem 0 1.6rem; }

/* ── Alertas / flash ──────────────────────────────────────────────────────── */
.alert {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  padding: .75rem 1rem;
  border-radius: 8px;
  font-size: .85rem;
  margin-bottom: 1.2rem;
  border-left: 3px solid;
  animation: fadeUp .25s ease both;
}
.alert-icon { font-size: .9rem; flex-shrink: 0; margin-top: .05rem; }
.alert-error,
.alert-danger  { background: rgba(255,68,68,.18);  border-color: var(--error);   color: #ff6b6b; border-left-width: 4px; }
.alert-success { background: rgba(76,175,80,.15);  border-color: var(--success); color: #6fcf6f; border-left-width: 4px; }
.alert-demo    { background: rgba(255,185,0,.12);  border-color: var(--amber);   color: #ffe080; }
.alert-info    { background: rgba(59,158,255,.12); border-color: var(--info);    color: #9fcfff; }
body.light .alert-error,
body.light .alert-danger  { color: #c0392b; background: rgba(255,68,68,.1); }
body.light .alert-success { color: #27ae60; background: rgba(76,175,80,.1); }

/* ── Formulário ───────────────────────────────────────────────────────────── */
.form { display: flex; flex-direction: column; gap: 0; }

.field {
  display: flex;
  flex-direction: column;
  margin-bottom: 1rem;
}

.field label {
  font-size: .72rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: .06em;
  margin-bottom: .4rem;
}

.field input {
  width: 100%;
  background: var(--input-bg);
  border: 1px solid var(--input-bd);
  border-radius: 8px;
  color: var(--text);
  font-family: inherit;
  font-size: .95rem;
  padding: .75rem 1rem;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  -webkit-appearance: none;
}
.field input::placeholder { color: var(--muted); }
.field input:focus,
.field input:focus-visible {
  border-color: var(--laranja);
  box-shadow: 0 0 0 3px rgba(255,110,40,.15);
}

/* ── Input com ícone de olho ──────────────────────────────────────────────── */
.input-wrapper { position: relative; }
.input-wrapper input { padding-right: 2.8rem; }
.toggle-pw {
  position: absolute;
  right: .75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  color: var(--muted);
  display: flex;
  align-items: center;
}
.toggle-pw:hover { color: var(--text); }
.eye-icon { width: 18px; height: 18px; fill: currentColor; }

/* ── Link "esqueci senha" alinhado à direita ─────────────────────────────── */
.row-right {
  display: flex;
  justify-content: flex-end;
  margin: -.3rem 0 .8rem;
}

/* ── Links ─────────────────────────────────────────────────────────────────── */
.link { color: var(--laranja); text-decoration: none; font-weight: 600; }
.link:hover { color: var(--amber); text-decoration: underline; }
.link-muted { font-size: .82rem; color: var(--muted); text-decoration: none; }
.link-muted:hover { color: var(--laranja); }

/* ── Botões ────────────────────────────────────────────────────────────────── */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  width: 100%;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  font-size: .95rem;
  font-weight: 600;
  padding: .85rem 1.5rem;
  transition: background .2s, transform .1s, box-shadow .2s;
  text-decoration: none;
}
.btn:active { transform: scale(.98); }

.btn-primary {
  background: var(--laranja);
  color: #fff;
}
.btn-primary:hover {
  background: #ff8040;
  box-shadow: 0 6px 20px rgba(255,110,40,.35);
}

.btn-outline {
  background: transparent;
  color: var(--laranja);
  border: 1px solid var(--laranja);
}
.btn-outline:hover {
  background: rgba(255,110,40,.08);
}

.btn-google {
  background: #fff;
  color: #3C4043;
  border: 1px solid #dadce0;
  font-weight: 500;
}
.btn-google:hover { background: #f8f8f8; box-shadow: 0 2px 8px rgba(0,0,0,.2); }
.google-icon { width: 20px; height: 20px; flex-shrink: 0; }

/* ── Separador ─────────────────────────────────────────────────────────────── */
.separator {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin: 1rem 0;
  color: var(--muted);
  font-size: .82rem;
}
.separator::before,
.separator::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--input-bd);
}

/* ── Rodapé de formulário ─────────────────────────────────────────────────── */
.footer-text {
  text-align: center;
  font-size: .85rem;
  color: var(--muted);
  margin-top: 1.2rem;
}

/* ── Barra de força da senha ──────────────────────────────────────────────── */
.strength-bar {
  height: 4px;
  background: var(--input-bd);
  border-radius: 2px;
  margin-top: .5rem;
  overflow: hidden;
}
.strength-fill {
  height: 100%;
  width: 0%;
  border-radius: 2px;
  transition: width .3s ease, background .3s ease;
}
.strength-label {
  font-size: .75rem;
  margin-top: .3rem;
  font-weight: 500;
  min-height: 1.1em;
  color: var(--muted);
}

/* ── Lista de requisitos ──────────────────────────────────────────────────── */
.req-list {
  list-style: none;
  margin-top: .6rem;
  display: flex;
  flex-direction: column;
  gap: .2rem;
}
.req-list li {
  font-size: .78rem;
  color: var(--muted);
  padding-left: 1.2rem;
  position: relative;
  transition: color .2s;
}
.req-list li::before {
  content: '○';
  position: absolute;
  left: 0;
  color: var(--muted);
  transition: color .2s;
}
.req-list li.ok { color: var(--success); }
.req-list li.ok::before { content: '✓'; color: var(--success); }

/* Versão estática (nova_senha info box) */
.req-box {
  background: var(--input-bg);
  border: 1px solid var(--input-bd);
  border-radius: 8px;
  padding: .85rem 1rem;
  margin-bottom: 1.2rem;
}
.req-title { font-size: .78rem; color: var(--muted); font-weight: 600; margin-bottom: .4rem; }
.req-list--static li { color: var(--muted); }
.req-list--static li::before { content: '✦'; font-size: .6rem; top: .1rem; }

/* ── Dashboard ─────────────────────────────────────────────────────────────── */
.dashboard-center { text-align: center; }
.dash-emoji  { font-size: 4rem; margin-bottom: .8rem; }
.dash-nome   { font-size: 1.1rem; margin: .8rem 0 .3rem; color: var(--text); }
.dash-info   { display: flex; justify-content: center; margin-top: 1.5rem; }
.dash-badge  {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: rgba(76,175,80,.12);
  border: 1px solid rgba(76,175,80,.3);
  color: var(--success);
  font-size: .82rem;
  padding: .4rem .9rem;
  border-radius: 999px;
}
.dash-badge-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--success);
  animation: pulse 1.5s infinite;
}
@keyframes pulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50%      { opacity: .4; transform: scale(.7); }
}

/* ── Responsivo ────────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
  body { padding: 1rem; }
  .card { padding: 1.8rem 1.4rem; }
  .logo-pomar, .logo-hub { font-size: 1.4rem; }
}

/* ── Modal ─────────────────────────────────────────────────────────────────── */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.5);
  backdrop-filter: blur(3px);
}
.modal.active,
.modal.open {
  display: flex;
  justify-content: center;
  align-items: center;
}

.modal-content {
  background-color: var(--card); /* Usando sua variável de tema */
  padding: 20px;
  border: 1px solid var(--card-bd); /* Usando sua variável de tema */
  width: 80%; /* Largura do conteúdo do modal */
  max-width: 600px; /* Largura máxima */
  border-radius: var(--radius); /* Usando sua variável de tema */
  position: relative;
  box-shadow: var(--shadow); /* Usando sua variável de tema */
}

.close-button {
  color: var(--muted); /* Usando sua variável de tema */
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.close-button:hover,
.close-button:focus {
  color: var(--text); /* Usando sua variável de tema */
  text-decoration: none;
  cursor: pointer;
}

/* Opcional: Impede o scroll do body quando o modal está aberto */
body.modal-open {
  overflow: hidden;
}

/* ── Acessibilidade — foco visível por teclado ────────────────────────────── */
:focus { outline: none; }

:focus-visible {
  outline: 2px solid var(--laranja);
  outline-offset: 2px;
  border-radius: 4px;
}

button:focus-visible,
a:focus-visible,
select:focus-visible,
textarea:focus-visible,
input:focus-visible {
  outline: 2px solid var(--laranja);
  outline-offset: 2px;
  box-shadow: 0 0 0 3px rgba(255,110,40,.20);
}

/* Reduz movimento para usuários que preferem */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}