/* ==========================================================================
   VANCEC FINANCE — auth.css
   Páginas de cadastro, login e recuperação de senha.
   ========================================================================== */

.auth-page {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  min-height: 100vh;
}

/* ----------------------------- Painel da marca -------------------------- */
.auth-aside {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 44px;
  border-right: 1px solid var(--border);
  background: radial-gradient(circle at 20% 10%, rgba(201, 162, 74, 0.3), transparent 55%),
    radial-gradient(circle at 90% 90%, rgba(184, 115, 51, 0.2), transparent 55%),
    var(--bg-soft);
}
.auth-aside .logo img { height: 42px; }

.auth-aside::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(148, 163, 184, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.05) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(circle at 30% 30%, #000, transparent 75%);
  pointer-events: none;
}

.auth-aside-content {
  position: relative;
  z-index: 1;
  max-width: 420px;
  margin-block: auto;
}
.auth-aside h2 {
  font-size: clamp(26px, 3vw, 38px);
  letter-spacing: -0.03em;
}
.auth-aside h2 .gradient {
  background: linear-gradient(100deg, #F8ECCB, #C9A24A 78%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.auth-aside p {
  margin-top: 16px;
  color: var(--text-muted);
  font-size: 15px;
}

.auth-points {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  margin-top: 32px;
}
.auth-points li {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  font-size: 14px;
  color: var(--text-muted);
}
.auth-points svg {
  width: 18px;
  height: 18px;
  flex: none;
  margin-top: 1px;
  color: var(--income);
}

.auth-aside-foot {
  position: relative;
  z-index: 1;
  font-size: 12.5px;
  color: var(--text-dim);
}

/* --------------------------------- Formulário --------------------------- */
.auth-main {
  display: flex;
  flex-direction: column;
  padding: 40px 24px;
}
.auth-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: auto;
}
.auth-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
}
.auth-back:hover { color: var(--text); }
.auth-back svg { width: 15px; height: 15px; }

.auth-card {
  width: 100%;
  max-width: 400px;
  margin: auto;
  padding-block: 32px;
}
.auth-card h1 {
  font-size: 26px;
  letter-spacing: -0.03em;
}
.auth-card > p {
  margin-top: 8px;
  font-size: 14px;
  color: var(--text-muted);
}

.auth-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  margin-top: 26px;
}

.auth-form .field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.password-wrap { position: relative; }
.password-wrap .input { padding-right: 44px; }
.password-toggle {
  position: absolute;
  top: 50%;
  right: 4px;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
}
.password-toggle:hover { color: var(--text); background: rgba(148, 163, 184, 0.1); }
.password-toggle svg { width: 17px; height: 17px; }

.auth-row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
}

.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
}
.checkbox input {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-block: 4px;
  font-size: 12px;
  color: var(--text-dim);
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.auth-foot {
  margin-top: 24px;
  font-size: 13.5px;
  color: var(--text-muted);
  text-align: center;
}
.auth-foot a { font-weight: 600; }

.password-strength {
  display: grid;
  gap: 6px;
  margin-top: 2px;
}
.password-strength-bars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}
.password-strength-bars i {
  height: 4px;
  border-radius: var(--radius-pill);
  background: var(--surface-3);
  transition: background var(--transition);
}
.password-strength-bars[data-score="1"] i:nth-child(1) { background: var(--expense); }
.password-strength-bars[data-score="2"] i:nth-child(-n + 2) { background: var(--warning); }
.password-strength-bars[data-score="3"] i:nth-child(-n + 3) { background: #38BDF8; }
.password-strength-bars[data-score="4"] i { background: var(--income); }
.password-strength small { color: var(--text-dim); font-size: 11.5px; }

/* --------------------------- Estado "enviado" --------------------------- */
.auth-success {
  display: grid;
  justify-items: center;
  gap: 14px;
  text-align: center;
  padding-block: 8px;
}
.auth-success .success-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--income-soft);
  color: var(--income);
}
.auth-success .success-icon svg { width: 26px; height: 26px; }
.auth-success h1 { font-size: 22px; }
.auth-success p { font-size: 14px; color: var(--text-muted); max-width: 340px; }
.auth-success .email-chip {
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 600;
  word-break: break-all;
}

/* ------------------------------ Responsivo ------------------------------ */
@media (max-width: 900px) {
  .auth-page { grid-template-columns: 1fr; }
  .auth-aside { display: none; }
  .auth-main { padding: 24px 20px 40px; }
  .auth-card { padding-block: 20px; }
}
