/* Index.css - Login (mobile 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 (mobile-first): faixa 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: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}
.auth *, .auth *::before, .auth *::after { box-sizing: border-box; }

/* Faixa da marca */
.auth .auth-brand {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  color: #fff;
  padding: calc(22px + env(safe-area-inset-top, 0px)) 22px 30px;
  border-radius: 0 0 28px 28px;
  background: linear-gradient(160deg, #FF6A47 0%, #EE4D2D 55%, #D13F1F 100%);
}
.auth .auth-brand::before {
  content: '';
  position: absolute;
  z-index: -1;
  right: -90px;
  top: -110px;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.26), 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: 20px 20px;
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,.7), transparent 80%);
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.7), transparent 80%);
}
.auth .brand-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.auth .brand-logo { display: flex; align-items: center; gap: 10px; }
.auth .brand-logo .mark {
  width: 38px; height: 38px; border-radius: 12px;
  background: #fff; color: var(--brand);
  display: grid; place-items: center; font-size: 22px;
  box-shadow: 0 8px 20px -8px rgba(0,0,0,.35);
}
.auth .brand-logo .name { font-size: 19px; font-weight: 800; letter-spacing: -.3px; }
.auth .brand-link {
  color: #fff; font-size: 13px; font-weight: 600; text-decoration: none;
  padding: 7px 13px; border-radius: 999px;
  background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.28);
}

/* Área do formulário */
.auth .auth-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 26px 20px calc(24px + env(safe-area-inset-bottom, 0px));
}
.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: 17px; color: var(--ink-3); pointer-events: none; transition: color .2s;
}
.auth .form-control {
  width: 100%; height: 52px; padding: 0 16px 0 48px;
  border: 1.5px solid var(--line); border-radius: 14px;
  background: var(--field); color: var(--ink);
  font: inherit; font-size: 16px; /* 16px evita o zoom automático do iOS */
  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: 6px; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px; border: 0; border-radius: 10px;
  background: transparent; color: var(--ink-3); cursor: pointer;
  display: grid; place-items: center; font-size: 17px;
}
.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: auto; padding-top: 28px; display: flex; justify-content: center; gap: 18px; font-size: 12px; color: var(--ink-3); }
.auth .auth-foot a { color: inherit; text-decoration: none; }

/* ---- Mobile-first: cresce em celulares grandes e tablets ---- */
@media (min-width: 600px) {
  .auth .auth-brand { padding: calc(32px + env(safe-area-inset-top, 0px)) 32px 36px; border-radius: 0 0 36px 36px; }
  .auth .brand-top, .auth .brand-logo { max-width: 520px; margin-left: auto; margin-right: auto; }
  .auth .auth-brand .login-header, .auth .auth-brand .step-header, .auth .auth-brand .progress-container { max-width: 520px; margin-left: auto; margin-right: auto; }
  .auth .auth-main { max-width: 520px; margin: 0 auto; padding: 34px 24px calc(32px + env(safe-area-inset-bottom, 0px)); }
}
@media (min-width: 900px) {
  .auth { background: #F5F6F8; }
  .auth .auth-brand { border-radius: 0; }
  .auth .auth-main {
    background: #fff; border-radius: 20px; margin-top: -24px; position: relative;
    padding: 32px 32px 28px; box-shadow: 0 20px 50px -24px rgba(23,25,28,.25);
    flex: 0 0 auto;
  }
  .auth .auth-foot { margin-top: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .auth .step { transition: none; }
}


/* ---- Login ---- */
.auth .brand-logo { margin-bottom: 26px; }
.auth .login-header h2 { margin: 0 0 6px; font-size: 26px; font-weight: 800; letter-spacing: -.6px; }
.auth .login-header p { margin: 0; font-size: 14px; color: rgba(255,255,255,.86); }

.auth .remember-forgot { display: flex; align-items: center; justify-content: space-between; margin: 2px 0 22px; font-size: 14px; }
.auth .remember-me { display: flex; align-items: center; gap: 8px; color: var(--ink-2); }
.auth .remember-me input { width: 20px; height: 20px; margin: 0; accent-color: var(--brand); }
.auth .forgot-link { color: var(--brand); font-weight: 600; text-decoration: none; padding: 6px 0; }

.auth .btn-login {
  width: 100%; height: 54px; border: 0; border-radius: 14px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff; font: inherit; font-size: 16px; 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;
}
.auth .btn-login:active { transform: scale(.98); }
.auth .btn-login:disabled { opacity: .65; cursor: not-allowed; }
.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: 24px; padding-top: 20px; border-top: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap;
  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; padding: 6px 0; }
