/* ============================================================
   Auth pages v3 — Premium · Poppins + DM Sans
   Login · Recuperar · Registo
   ============================================================ */
*{box-sizing:border-box;margin:0;padding:0}
html,body{height:100%;font-family:'DM Sans',-apple-system,sans-serif;-webkit-font-smoothing:antialiased}
h1,h2,h3{font-family:'Poppins','DM Sans',sans-serif;letter-spacing:-.03em}

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

/* ── PAINEL ESQUERDO ──────────────────────────────────────── */
.auth-brand{
  position:relative;overflow:hidden;
  background:#010B1A;
  display:flex;flex-direction:column;justify-content:center;align-items:center;
  padding:56px 52px;
}
/* Aurora */
.auth-brand::before{
  content:'';position:absolute;
  top:-30%;left:50%;transform:translateX(-50%);
  width:130%;height:80%;
  background:
    radial-gradient(ellipse 65% 55% at 50% 35%,rgba(79,70,229,.28),transparent),
    radial-gradient(ellipse 45% 38% at 10% 65%,rgba(37,99,235,.2),transparent),
    radial-gradient(ellipse 38% 32% at 85% 40%,rgba(139,92,246,.15),transparent);
  filter:blur(52px);pointer-events:none;
}
/* Grid */
.auth-brand::after{
  content:'';position:absolute;inset:0;
  background-image:
    linear-gradient(rgba(255,255,255,.028) 1px,transparent 1px),
    linear-gradient(90deg,rgba(255,255,255,.028) 1px,transparent 1px);
  background-size:64px 64px;
  -webkit-mask-image:radial-gradient(ellipse 90% 85% at 50% 50%,black 25%,transparent 72%);
  mask-image:radial-gradient(ellipse 90% 85% at 50% 50%,black 25%,transparent 72%);
  pointer-events:none;
}
.auth-brand-inner{position:relative;z-index:1;max-width:380px}

.auth-mark{
  width:62px;height:62px;border-radius:18px;
  margin-bottom:32px;flex-shrink:0;
  box-shadow:0 16px 44px rgba(37,99,235,.38),0 0 0 1px rgba(255,255,255,.08);
}
.auth-mark img,.auth-logo-icon,.reg-logo-icon{display:block;width:100%;height:100%;border-radius:inherit}
.auth-headline{
  font-size:clamp(28px,3.5vw,38px);font-weight:800;color:#fff;
  line-height:1.08;letter-spacing:-.04em;margin-bottom:14px;
}
.auth-headline em{
  background:linear-gradient(135deg,#60A5FA 0%,#A78BFA 100%);
  -webkit-background-clip:text;-webkit-text-fill-color:transparent;
  background-clip:text;font-style:normal;
}
.auth-desc{font-size:15px;color:#7B92B0;line-height:1.68;margin-bottom:36px}
.auth-features{display:flex;flex-direction:column;gap:14px}
.auth-feature{display:flex;align-items:center;gap:14px;color:#8CA6C4;font-size:14px;font-weight:500}
.auth-feature-icon{
  width:40px;height:40px;border-radius:11px;
  background:rgba(37,99,235,.14);border:1px solid rgba(37,99,235,.24);
  display:flex;align-items:center;justify-content:center;flex-shrink:0;color:#60A5FA;
}

/* ── PAINEL DIREITO — FORMULÁRIO ─────────────────────────── */
.auth-form-side{
  display:flex;align-items:center;justify-content:center;
  padding:52px;background:#F8FAFC;overflow-y:auto;
}
.auth-box{width:100%;max-width:400px}

/* Logo no painel do form */
.auth-logo{
  display:inline-flex;align-items:center;gap:10px;
  font-family:'Poppins',sans-serif;font-size:19px;font-weight:800;
  letter-spacing:-.05em;color:#0F172A;margin-bottom:30px;text-decoration:none;
}
.auth-logo-icon{
  width:38px;height:38px;border-radius:11px;
  box-shadow:0 4px 14px rgba(37,99,235,.3);flex-shrink:0;
}

.auth-step-title{font-size:24px;font-weight:800;letter-spacing:-.04em;color:#0F172A;margin-bottom:8px}
.auth-sub{font-size:14px;color:#64748B;margin-bottom:28px;line-height:1.65}
.auth-step-desc{font-size:14px;color:#64748B;line-height:1.65;margin-bottom:24px}

/* ── CAMPOS ──────────────────────────────────────────────── */
.field{margin-bottom:18px}
.field label{
  display:block;font-size:11px;font-weight:800;text-transform:uppercase;
  letter-spacing:.06em;color:#475569;margin-bottom:7px;
}
.field-label-row{
  display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:7px;
}
.field-label-row label{margin-bottom:0}
.field-label-row a{
  font-size:12px;font-weight:700;color:#2563EB;text-decoration:none;
  text-transform:none;letter-spacing:0;
}
.field-label-row a:hover{color:#1D4ED8}
.hp{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden;opacity:0}
.field-input-wrap{position:relative}
.field-input-wrap input,
.field input:not(.field-input-wrap input){
  width:100%;padding:13px 16px;
  border-radius:12px;border:1.5px solid #E2E8F0;
  background:#fff;color:#0F172A;
  font-family:'DM Sans',sans-serif;font-size:14px;outline:none;
  transition:border-color .2s ease,box-shadow .2s ease;
  box-shadow:0 1px 3px rgba(15,23,42,.04);
}
.field-input-wrap input{padding-right:46px}
.field-input-wrap input:focus,
.field input:not(.field-input-wrap input):focus{
  border-color:#2563EB;
  box-shadow:0 0 0 4px rgba(37,99,235,.12),0 1px 3px rgba(15,23,42,.04);
}
.field input::placeholder{color:#94A3B8}
.pw-toggle{
  position:absolute;right:6px;top:50%;transform:translateY(-50%);
  border:0;background:transparent;color:#94A3B8;cursor:pointer;
  padding:13px 10px;border-radius:8px;display:flex;align-items:center;justify-content:center;
  min-width:44px;min-height:44px;
  transition:color .15s,background .15s;
}
.pw-toggle:hover{color:#2563EB;background:#EFF6FF}

/* ── BOTÕES ──────────────────────────────────────────────── */
.btn-auth{
  width:100%;padding:14px;
  background:linear-gradient(140deg,#2563EB,#1D4ED8);
  color:#fff;border:none;border-radius:12px;
  font-family:'DM Sans',sans-serif;font-size:15px;font-weight:700;
  cursor:pointer;
  transition:transform .2s ease,box-shadow .2s ease,opacity .2s;
  margin-top:6px;
  box-shadow:0 8px 24px rgba(37,99,235,.32),0 2px 8px rgba(37,99,235,.14);
  text-align:center;text-decoration:none;display:inline-block;line-height:1.2;
  position:relative;overflow:hidden;
}
.btn-auth::after{
  content:'';position:absolute;inset:0;
  background:linear-gradient(140deg,rgba(255,255,255,.12),transparent);
  pointer-events:none;
}
.btn-auth:hover:not(:disabled){transform:translateY(-2px);box-shadow:0 14px 36px rgba(37,99,235,.38),0 4px 12px rgba(37,99,235,.18)}
.btn-auth:active:not(:disabled){transform:translateY(0)}
.btn-auth:disabled{opacity:.68;cursor:not-allowed;transform:none}
.btn-auth.is-loading{pointer-events:none}

.btn-ghost-auth{
  width:100%;padding:13px;background:#fff;color:#334155;
  border:1.5px solid #E2E8F0;border-radius:12px;
  font-family:'DM Sans',sans-serif;font-size:14px;font-weight:700;
  cursor:pointer;transition:all .2s ease;margin-top:10px;
  box-shadow:0 1px 3px rgba(15,23,42,.04);
}
.btn-ghost-auth:hover:not(:disabled){border-color:#BFDBFE;color:#1D4ED8;background:#F8FAFC}
.btn-ghost-auth:disabled{opacity:.68;cursor:not-allowed}

/* ── ALERTAS ─────────────────────────────────────────────── */
.error-msg{
  background:#FEF2F2;color:#DC2626;border:1px solid #FECACA;
  border-radius:12px;padding:13px 15px;font-size:13px;font-weight:600;
  margin-bottom:18px;display:flex;align-items:flex-start;gap:10px;
}
.error-msg svg{flex-shrink:0;margin-top:1px}
.info-msg{
  background:#EFF6FF;color:#1D4ED8;border:1px solid #BFDBFE;
  border-radius:12px;padding:12px 14px;font-size:13px;font-weight:600;
  margin-bottom:18px;
}

/* ── ESTADOS (sent / done / expired) ────────────────────── */
.auth-state{text-align:center}
.auth-state-icon{
  width:78px;height:78px;border-radius:50%;
  display:flex;align-items:center;justify-content:center;
  margin:0 auto 22px;
}
.auth-state-icon.is-success{background:linear-gradient(135deg,#DCFCE7,#BBF7D0);color:#059669}
.auth-state-icon.is-warn{background:linear-gradient(135deg,#FEF3C7,#FDE68A);color:#D97706}
.auth-state-icon.is-mail{background:linear-gradient(135deg,#EFF6FF,#DBEAFE);color:#2563EB}
.auth-state .auth-step-title,.auth-state .auth-step-desc{text-align:center}
.auth-state-note{font-size:13px;color:#94A3B8;margin-bottom:22px;line-height:1.55}

/* ── PASSWORD STRENGTH ───────────────────────────────────── */
.strength-wrap{margin-top:8px}
.strength-bar{height:4px;border-radius:99px;background:#E2E8F0;overflow:hidden}
.strength-fill{height:100%;border-radius:99px;transition:width .3s ease,background .3s ease;width:0}
.strength-label{font-size:11px;font-weight:700;margin-top:6px;color:#94A3B8;letter-spacing:.02em}
.strength-label.is-weak{color:#DC2626}
.strength-label.is-fair{color:#D97706}
.strength-label.is-good{color:#059669}
.strength-label.is-strong{color:#047857}
.match-hint{font-size:12px;font-weight:600;margin-top:6px;color:#94A3B8}
.match-hint.is-ok{color:#059669}
.match-hint.is-bad{color:#DC2626}

/* ── RODAPÉ DO FORM ──────────────────────────────────────── */
.auth-footer{margin-top:26px;text-align:center;font-size:13px;color:#64748B}
.auth-footer a{color:#2563EB;text-decoration:none;font-weight:700;transition:color .18s}
.auth-footer a:hover{color:#1D4ED8}
.auth-divider{display:flex;align-items:center;gap:12px;margin:18px 0}
.auth-divider::before,.auth-divider::after{content:'';flex:1;height:1px;background:#E2E8F0}
.auth-divider span{font-size:11px;color:#94A3B8;text-transform:uppercase;letter-spacing:.08em;font-weight:700}
.auth-countdown{font-size:13px;color:#64748B;margin-top:14px}

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media(max-width:900px){
  .auth-split{grid-template-columns:1fr}
  .auth-brand{display:none}
  .auth-form-side{
    padding:48px 24px max(32px, calc(32px + env(safe-area-inset-bottom, 0px)));
    min-height:100dvh;align-items:flex-start;
  }
  .field input,
  .field-input-wrap input{font-size:16px}
}
@media(max-width:380px){
  .auth-form-side{padding-left:16px;padding-right:16px}
}
@media(prefers-reduced-motion:reduce){
  .btn-auth,.pw-toggle,.strength-fill{transition:none}
}
