.mobile-frame {
  max-width: 430px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
  background: var(--bg);
}

@media (min-width: 480px) {
  body { background: var(--sidebar); }
  .mobile-frame {
    min-height: 100vh;
    box-shadow: var(--shadow);
  }
}

.auth-hero {
  height: 220px;
  position: relative;
  border-radius: 0 0 32px 32px;
  overflow: hidden;
  background: linear-gradient(160deg, #0b3d20 0%, #0e5e2e 45%, var(--primary) 100%);
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
}
.auth-hero img { width: 100%; height: 100%; object-fit: cover; }
.auth-hero .auth-hero-fallback {
  width: 76px; height: 76px;
  border-radius: 20px;
  background: rgba(255,255,255,.14);
  display: flex; align-items: center; justify-content: center;
}
.auth-hero .auth-hero-fallback .icon { width: 38px; height: 38px; color: #fff; }

.auth-sheet {
  position: relative;
  margin-top: -24px;
  background: var(--card);
  border-radius: 24px 24px 0 0;
  padding: var(--space-5);
  min-height: calc(100vh - 196px);
  min-height: calc(100dvh - 196px);
}

.auth-sheet h1 { font-size: 21px; font-weight: 800; margin-bottom: 4px; }
.auth-sheet .auth-subtitle { color: var(--muted); font-size: 13px; margin-bottom: var(--space-5); }


/* Cada campo + eventual mensagem de erro fica junto num unico bloco, com
   ritmo vertical consistente (sem espaco fantasma quando nao ha erro). */
.form-field { margin-bottom: 12px; }
.form-field:last-of-type { margin-bottom: 0; }

.pill-field {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  background: var(--field-bg);
  border-radius: 14px;
  padding: 0 var(--space-4);
  height: 52px;
}
.pill-field label {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
}
.pill-field input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  outline: none;
  text-align: right;
}
.pill-field input::placeholder { color: var(--muted); font-weight: 400; }

/* Esconde o botao nativo de "mostrar senha" do Edge/Chromium para nao
   duplicar com o icone de olho proprio. */
.pill-field input[type="password"]::-ms-reveal,
.pill-field input[type="password"]::-ms-clear { display: none; }

.pill-field .eye-toggle {
  flex-shrink: 0;
  background: none;
  border: none;
  color: var(--muted);
  display: flex;
  align-items: center;
  padding: 4px;
  margin: 0 -4px 0 0;
}
.pill-field .eye-toggle .icon { width: 19px; height: 19px; }
.pill-field .eye-toggle .icon-eye-off { display: none; }
.pill-field .eye-toggle.is-showing .icon-eye { display: none; }
.pill-field .eye-toggle.is-showing .icon-eye-off { display: block; }

.captcha-row { display: flex; gap: var(--space-2); align-items: stretch; }
.captcha-row .pill-field { flex: 1; min-width: 0; }
.captcha-image-wrap {
  flex-shrink: 0;
  width: 108px;
  height: 52px;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.captcha-image-wrap img { height: 100%; width: 100%; object-fit: contain; display: block; }
.captcha-refresh {
  flex-shrink: 0;
  width: 44px; height: 52px;
  border-radius: 14px;
  background: var(--field-bg);
  border: none;
  color: var(--muted);
  display: flex; align-items: center; justify-content: center;
}
.captcha-refresh .icon { width: 17px; height: 17px; }

.field-error {
  color: var(--danger);
  font-size: 12px;
  margin-top: 6px;
  padding-left: 2px;
  display: none;
}
.field-error:not(:empty) { display: block; }

/* honeypot anti-bot: invisivel para humanos, sem afetar layout nem leitores de tela ativos */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.btn-pill { border-radius: 999px; height: 52px; font-size: 15px; box-shadow: 0 10px 24px -8px rgba(23,207,87,.55); }

.auth-switch { text-align: center; font-size: 13px; color: var(--muted); margin-top: var(--space-4); }
