/* Index.css - Login (desktop first)
   Todas as regras ficam ancoradas em .auth (raiz da página). */
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}
body {
  background: #fff;
  -webkit-tap-highlight-color: transparent;
}

/* ---- Base compartilhada (desktop): painel da marca + formulário ---- */
.auth {
  --brand: #EE4D2D;
  --brand-2: #FF6347;
  --ink: #17191C;
  --ink-2: #5C6673;
  --ink-3: #8C96A3;
  --line: #E4E8EE;
  --field: #F5F6F8;
  --ok: #10B981;
  --err: #EF4444;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--ink);
  background: #fff;
  min-height: 100%;
  display: grid;
  grid-template-columns: minmax(360px, 44%) minmax(0, 1fr);
  -webkit-font-smoothing: antialiased;
}
.auth *, .auth *::before, .auth *::after { box-sizing: border-box; }

/* Painel da marca */
.auth .auth-brand {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 40px;
  padding: 44px 48px;
  color: #fff;
  background: linear-gradient(165deg, #FF6A47 0%, #EE4D2D 48%, #C83B1D 100%);
}
.auth .auth-brand::before {
  content: '';
  position: absolute;
  z-index: -1;
  right: -140px;
  bottom: -180px;
  width: 460px;
  height: 460px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.24), rgba(255,255,255,0) 70%);
}
.auth .auth-brand::after {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.16) 1px, transparent 1.5px);
  background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,.7), transparent 65%);
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.7), transparent 65%);
}
.auth .brand-logo { display: flex; align-items: center; gap: 12px; }
.auth .brand-logo .mark {
  width: 44px; height: 44px; border-radius: 14px;
  background: #fff; color: var(--brand);
  display: grid; place-items: center; font-size: 26px;
  box-shadow: 0 10px 24px -8px rgba(0,0,0,.35);
}
.auth .brand-logo .name { font-size: 22px; font-weight: 800; letter-spacing: -.4px; }
.auth .brand-copy h1 {
  margin: 0 0 12px;
  font-size: clamp(28px, 2.7vw, 38px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -1.1px;
  max-width: 15ch;
  text-wrap: balance;
}
.auth .brand-copy > p { margin: 0 0 30px; font-size: 15px; line-height: 1.55; color: rgba(255,255,255,.86); max-width: 42ch; }
.auth .brand-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.auth .brand-points li { display: flex; gap: 14px; align-items: flex-start; }
.auth .brand-points .pt-icon {
  flex: 0 0 auto; width: 40px; height: 40px; border-radius: 12px;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.26);
  display: grid; place-items: center; font-size: 16px;
}
.auth .brand-points strong { display: block; font-size: 14px; font-weight: 700; margin-bottom: 2px; }
.auth .brand-points span { display: block; font-size: 13px; line-height: 1.5; color: rgba(255,255,255,.8); }
.auth .brand-stores { display: flex; flex-wrap: wrap; gap: 8px; }
.auth .brand-stores span {
  padding: 6px 12px; border-radius: 999px;
  background: rgba(0,0,0,.18); border: 1px solid rgba(255,255,255,.12);
  font-size: 12px; font-weight: 600; letter-spacing: .2px;
}

/* Área do formulário */
/* margin:auto centraliza quando sobra espaço e vira 0 quando falta — align-items:center
   cortaria o topo do formulário em janelas baixas (passo 3 com captcha, por exemplo). */
.auth .auth-main { display: flex; justify-content: center; padding: 48px 40px; }
.auth .auth-panel { width: 100%; max-width: 400px; margin: auto; animation: authRise .5s ease both; }
@keyframes authRise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.auth .form-group { margin-bottom: 18px; }
.auth .form-label { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 600; color: var(--ink); }
.auth .input-wrapper { position: relative; transition: transform .2s; }
.auth .input-icon {
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  font-size: 16px; color: var(--ink-3); pointer-events: none; transition: color .2s;
}
.auth .form-control {
  width: 100%; height: 50px; padding: 0 16px 0 46px;
  border: 1.5px solid var(--line); border-radius: 12px;
  background: var(--field); color: var(--ink);
  font: inherit; font-size: 15px;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.auth .form-control::placeholder { color: var(--ink-3); }
.auth .form-control:focus { outline: none; border-color: var(--brand); background: #fff; box-shadow: 0 0 0 4px rgba(238,77,45,.12); }
.auth .form-control:focus ~ .input-icon { color: var(--brand); }
.auth .toggle-password {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; border: 0; border-radius: 10px;
  background: transparent; color: var(--ink-3); cursor: pointer;
  display: grid; place-items: center; font-size: 16px; transition: background .2s, color .2s;
}
.auth .toggle-password:hover { background: #fff; color: var(--ink-2); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.auth .toggle-password:active { transform: translateY(-50%) scale(.92); }

.auth .loading {
  display: inline-block; width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,.45); border-top-color: #fff; border-radius: 50%;
  animation: authSpin .7s linear infinite;
}
@keyframes authSpin { to { transform: rotate(360deg); } }

.auth .auth-foot { margin-top: 44px; display: flex; justify-content: center; gap: 18px; font-size: 12px; color: var(--ink-3); }
.auth .auth-foot a { color: inherit; text-decoration: none; }
.auth .auth-foot a:hover { color: var(--ink-2); text-decoration: underline; }

/* ---- Desktop-first: adapta em larguras menores ---- */
@media (max-width: 1180px) {
  .auth { grid-template-columns: minmax(320px, 40%) minmax(0, 1fr); }
  .auth .auth-brand { padding: 36px 32px; }
  .auth .brand-copy h1 { font-size: 28px; }
}
@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .auth .auth-brand { position: relative; height: auto; padding: 24px 28px; gap: 18px; border-radius: 0 0 24px 24px; }
  .auth .brand-copy h1 { font-size: 22px; margin-bottom: 0; }
  .auth .brand-copy > p, .auth .brand-points, .auth .brand-stores { display: none; }
  .auth .auth-main { padding: 32px 24px; }
  .auth .auth-panel { margin: 0 auto; }
}
@media (max-width: 480px) {
  .auth .auth-brand { padding: 20px; }
  .auth .auth-main { padding: 24px 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .auth .auth-panel { animation: none; }
  .auth .step { transition: none; }
}


/* ---- Login ---- */
.auth .login-header { margin-bottom: 28px; }
.auth .login-header h2 { margin: 0 0 6px; font-size: 28px; font-weight: 800; letter-spacing: -.7px; }
.auth .login-header p { margin: 0; color: var(--ink-2); font-size: 15px; }

.auth .remember-forgot { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 22px; font-size: 13px; }
.auth .remember-me { display: flex; align-items: center; gap: 8px; color: var(--ink-2); }
.auth .remember-me input { width: 18px; height: 18px; margin: 0; accent-color: var(--brand); cursor: pointer; }
.auth .remember-me label { cursor: pointer; }
.auth .forgot-link { color: var(--brand); font-weight: 600; text-decoration: none; }
.auth .forgot-link:hover { text-decoration: underline; }

.auth .btn-login {
  width: 100%; height: 52px; border: 0; border-radius: 12px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff; font: inherit; font-size: 15px; font-weight: 700; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  box-shadow: 0 10px 24px -10px rgba(238,77,45,.65);
  transition: transform .15s, box-shadow .2s;
}
.auth .btn-login:hover { transform: translateY(-1px); box-shadow: 0 14px 28px -10px rgba(238,77,45,.7); }
.auth .btn-login:active { transform: scale(.98); }
.auth .btn-login:disabled { opacity: .65; cursor: not-allowed; transform: none; }
.auth .btn-login.success { background: linear-gradient(135deg, #10B981, #059669); box-shadow: 0 10px 24px -10px rgba(16,185,129,.6); }

.auth .signup-link {
  margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center; gap: 6px;
  font-size: 14px; color: var(--ink-2);
}
.auth .btn-signup { color: var(--brand); font-weight: 700; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; transition: gap .15s; }
.auth .btn-signup:hover { gap: 10px; text-decoration: underline; }
