:root {
  --marrom:  #3D1A0E;
  --marrom2: #5C2A18;
  --rosa:    #C9897A;
  --rosa2:   #E2C5B9;
  --creme:   #FDF8F5;
  --lilas:   #F5EDE8;
  --texto:   #2A1208;
  --muted:   #9A7A6E;
  --verde:   #16A34A;
  --vermelho:#DC2626;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body { font-family: 'DM Sans', sans-serif; background: var(--creme); color: var(--texto); overflow-x: hidden; }

.auth-bg { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
.auth-bg-blob { position: absolute; border-radius: 50%; filter: blur(80px); }
.b1 { width: 500px; height: 500px; top: -100px; right: -100px; background: radial-gradient(circle, rgba(201,137,122,0.15), transparent 70%); }
.b2 { width: 400px; height: 400px; bottom: -80px; left: -80px; background: radial-gradient(circle, rgba(61,26,14,0.1), transparent 70%); }

.auth-page { display: flex; min-height: 100vh; position: relative; z-index: 1; }

/* LADO ESQUERDO */
.auth-left { width: 420px; flex-shrink: 0; background: linear-gradient(160deg, #3D1A0E 0%, #6B3020 100%); padding: 2.5rem 3rem; display: flex; flex-direction: column; position: relative; overflow: hidden; }
.auth-left::before { content: ''; position: absolute; top: -100px; right: -100px; width: 300px; height: 300px; border-radius: 50%; background: rgba(201,137,122,0.15); }
.auth-left::after { content: ''; position: absolute; bottom: -80px; left: -80px; width: 250px; height: 250px; border-radius: 50%; background: rgba(201,137,122,0.1); }
.auth-logo { display: flex; align-items: center; text-decoration: none; position: relative; z-index: 1; }
.auth-logo-img { height: 80px; width: auto; object-fit: contain; }
.auth-left-content { flex: 1; display: flex; flex-direction: column; justify-content: center; position: relative; z-index: 1; }
.auth-quote { margin-bottom: 48px; }
.auth-quote p { font-family: 'Cormorant Garamond', serif; font-size: 26px; font-style: italic; font-weight: 300; color: rgba(255,255,255,0.9); line-height: 1.5; }
.auth-features { display: flex; flex-direction: column; gap: 16px; }
.auth-feat { display: flex; align-items: center; gap: 12px; font-size: 14px; color: rgba(255,255,255,0.7); }
.feat-icon { font-size: 20px; }
.auth-left-footer { font-size: 12px; color: rgba(255,255,255,0.3); position: relative; z-index: 1; }

/* LADO DIREITO */
.auth-right { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 3rem 2rem; }

.auth-card { width: 100%; max-width: 480px; background: white; border-radius: 24px; padding: 36px 40px; box-shadow: 0 4px 40px rgba(61,26,14,0.1); border: 1px solid rgba(201,137,122,0.15); }

/* STEPS */
.steps-indicator { display: flex; align-items: center; justify-content: center; margin-bottom: 28px; }
.step-dot { width: 10px; height: 10px; border-radius: 50%; background: rgba(61,26,14,0.15); transition: all 0.3s; }
.step-dot.active { background: var(--rosa); transform: scale(1.3); }
.step-dot.done { background: var(--verde); }
.step-line { width: 40px; height: 2px; background: rgba(61,26,14,0.1); transition: background 0.3s; }
.step-line.active { background: var(--rosa); }

/* HEADER */
.auth-header { margin-bottom: 24px; }
.auth-header h1 { font-family: 'Cormorant Garamond', serif; font-size: 30px; font-weight: 400; color: var(--marrom); margin-bottom: 6px; }
.auth-header p { font-size: 14px; color: var(--muted); }

/* TIPO SELECTOR */
.tipo-selector { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 20px; }
.tipo-btn { padding: 14px 12px; border-radius: 14px; border: 2px solid rgba(61,26,14,0.1); background: var(--creme); cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 4px; transition: all 0.25s; font-family: 'DM Sans', sans-serif; }
.tipo-btn:hover { border-color: rgba(201,137,122,0.5); background: #FFF5F0; }
.tipo-btn.active { border-color: var(--rosa); background: #FFF5F0; box-shadow: 0 0 0 3px rgba(201,137,122,0.15); }
.tipo-icon { font-size: 22px; }
.tipo-label { font-size: 13px; font-weight: 500; color: var(--marrom); }
.tipo-desc { font-size: 11px; color: var(--muted); }

/* FIELDS */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 11px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.label-opt { font-size: 10px; font-weight: 400; text-transform: none; letter-spacing: 0; }
.field input { width: 100%; padding: 11px 14px; font-family: 'DM Sans', sans-serif; font-size: 14px; background: var(--creme); border: 1.5px solid rgba(61,26,14,0.12); border-radius: 12px; color: var(--texto); outline: none; transition: border-color 0.2s, box-shadow 0.2s; }
.field input:focus { border-color: var(--rosa); box-shadow: 0 0 0 3px rgba(201,137,122,0.15); background: white; }
.field input.input-ok { border-color: var(--verde); }
.field input.input-erro { border-color: var(--vermelho); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.input-wrap { position: relative; }
.input-wrap input { padding-right: 44px; }
.toggle-senha { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; color: var(--muted); padding: 4px; display: flex; transition: color 0.2s; }
.toggle-senha:hover { color: var(--marrom); }
.toggle-senha svg { width: 16px; height: 16px; }

/* FORÇA SENHA */
.forca-wrap { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.forca-barras { display: flex; gap: 4px; }
.forca-barra { width: 36px; height: 3px; border-radius: 2px; background: rgba(61,26,14,0.1); transition: background 0.3s; }
.forca-txt { font-size: 11px; color: var(--muted); }

/* MATCH HINT */
.match-hint { font-size: 12px; margin-top: 5px; height: 16px; }
.match-hint.ok { color: var(--verde); }
.match-hint.erro { color: var(--vermelho); }

/* BOTÕES */
.btn-auth-primary { width: 100%; padding: 14px; border-radius: 12px; border: none; font-family: 'DM Sans', sans-serif; font-size: 15px; font-weight: 500; background: linear-gradient(135deg, #C9897A, #A0604F); color: white; cursor: pointer; box-shadow: 0 4px 20px rgba(201,137,122,0.35); transition: all 0.3s; display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 16px; }
.btn-auth-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(201,137,122,0.45); }
.btn-auth-primary:disabled { opacity: 0.7; cursor: not-allowed; transform: none; }
.btn-auth-secondary { width: 100%; padding: 13px; border-radius: 12px; font-family: 'DM Sans', sans-serif; font-size: 14px; font-weight: 500; background: transparent; color: var(--marrom); border: 1.5px solid rgba(61,26,14,0.2); text-decoration: none; display: block; text-align: center; transition: all 0.2s; }
.btn-auth-secondary:hover { background: var(--lilas); border-color: var(--marrom); }

.btn-spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.4); border-top-color: white; display: none; animation: spin 0.7s linear infinite; }
.btn-spinner.visible { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }

.alert { display: none; padding: 10px 14px; border-radius: 10px; font-size: 13px; margin-bottom: 14px; }
.alert.erro    { display: block; background: #FDF0F0; color: #922B21; border: 1px solid #F5C6C6; }
.alert.sucesso { display: block; background: #F0FDF4; color: #15803D; border: 1px solid #BBF7D0; }

.auth-terms { font-size: 12px; color: var(--muted); text-align: center; margin-bottom: 16px; line-height: 1.5; }
.auth-terms a { color: var(--rosa); text-decoration: none; }

.auth-divider { display: flex; align-items: center; gap: 12px; margin: 4px 0 16px; color: var(--muted); font-size: 12px; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: rgba(61,26,14,0.08); }

/* ETAPA 2 — VERIFICAÇÃO */
.verify-icon { font-size: 48px; margin-bottom: 12px; display: block; }
.codigo-wrap { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 28px 0; }
.codigo-input { width: 48px; height: 56px; border-radius: 12px; border: 2px solid rgba(61,26,14,0.15); background: var(--creme); font-family: 'DM Sans', sans-serif; font-size: 24px; font-weight: 500; text-align: center; color: var(--marrom); outline: none; transition: all 0.2s; }
.codigo-input:focus { border-color: var(--rosa); box-shadow: 0 0 0 3px rgba(201,137,122,0.15); background: white; }
.codigo-input.preenchido { border-color: var(--rosa); background: #FFF5F0; }
.codigo-input.erro { border-color: var(--vermelho); background: #FFF0F0; animation: shake 0.4s ease; }
.codigo-sep { font-size: 20px; color: var(--muted); margin: 0 4px; }
@keyframes shake { 0%,100%{transform:translateX(0)} 25%{transform:translateX(-4px)} 75%{transform:translateX(4px)} }

.reenvio-wrap { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 4px 0 16px; flex-wrap: wrap; }
.reenvio-txt { font-size: 13px; color: var(--muted); }
.btn-reenviar { background: none; border: none; font-family: 'DM Sans', sans-serif; font-size: 13px; color: var(--rosa); cursor: pointer; font-weight: 500; text-decoration: underline; }
.btn-reenviar:disabled { color: var(--muted); text-decoration: none; cursor: not-allowed; }
.reenvio-timer { font-size: 12px; color: var(--muted); }
.btn-voltar { background: none; border: none; font-family: 'DM Sans', sans-serif; font-size: 13px; color: var(--muted); cursor: pointer; display: block; margin: 0 auto; padding: 4px; transition: color 0.2s; }
.btn-voltar:hover { color: var(--marrom); }

/* ETAPA 3 — SUCESSO */
.success-card { text-align: center; }
.success-anim { font-size: 56px; display: block; margin-bottom: 16px; animation: popIn 0.5s ease both; }
@keyframes popIn { from{transform:scale(0.5);opacity:0} to{transform:scale(1);opacity:1} }
.success-card h2 { font-family: 'Cormorant Garamond', serif; font-size: 32px; font-weight: 400; color: var(--marrom); margin-bottom: 10px; }
.success-desc { font-size: 14px; color: var(--muted); line-height: 1.7; margin-bottom: 16px; }
.success-nome { font-size: 15px; font-weight: 500; color: var(--marrom); background: var(--lilas); border-radius: 10px; padding: 10px 16px; margin-bottom: 24px; }
.success-redirect { font-size: 12px; color: var(--muted); margin-top: 12px; }

.auth-back { margin-top: 20px; text-align: center; }
.auth-back a { font-size: 13px; color: var(--muted); text-decoration: none; transition: color 0.2s; }
.auth-back a:hover { color: var(--marrom); }

@media (max-width: 768px) {
  .auth-left { display: none; }
  .auth-right { padding: 2rem 1.25rem; justify-content: center; }
  .auth-card { padding: 28px 20px; }
  .form-row { grid-template-columns: 1fr; }
  .codigo-input { width: 42px; height: 50px; font-size: 20px; }
}