/* Estaciona aê — páginas de autenticação (confirmar email, reset de senha) */
:root {
  --brand: #2347FF;
  --brand-dark: #1B39D6;
  --brand-soft: #EEF2FF;
  --accent: #FFC233;
  --bg: #EEF1F6;
  --card: #FFFFFF;
  --border: #E6E9F2;
  --fg-1: #0B0E1A;
  --fg-2: #3A4256;
  --fg-3: #6B7384;
  --fg-4: #8A92A6;
  --success: #16A34A;
  --warn: #E0A911;
  --danger: #E5484D;
  --r-md: 12px;
  --r-lg: 20px;
  --r-pill: 999px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: 'Space Grotesk', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(160deg, #2347FF 0%, #1730A8 100%) no-repeat fixed;
  color: var(--fg-1);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

.shell {
  max-width: 480px;
  margin: 40px auto;
  padding: 0 16px;
}

.brandmark {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #fff;
  margin-bottom: 24px;
}

.brandmark img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}

.brandmark .mark-fallback {
  width: 36px; height: 36px; border-radius: 8px;
  background: var(--brand);
  display: inline-flex; align-items: center; justify-content: center;
  color: white; font-weight: 800;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 32px 28px;
  box-shadow: 0 1px 2px rgba(11,14,26,0.04);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  display: block;
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--accent);
}

.state { display: none; }
.state.active { display: block; }

.eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
}

.eyebrow::before {
  content: "";
  display: inline-block;
  width: 16px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
  margin-right: 10px;
}

h1 {
  margin: 0 0 14px;
  font-size: 26px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--fg-1);
}

.lead {
  margin: 0 0 24px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--fg-2);
}

.lead .mail {
  font-weight: 600;
  color: var(--fg-1);
}

.status {
  text-align: center;
  padding: 20px 4px;
}

.status .badge {
  width: 76px;
  height: 76px;
  margin: 0 auto 16px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.badge-spin {
  background: var(--brand-soft);
  position: relative;
}

/* Anel girando ao redor */
.badge-spin .ring {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 3px solid transparent;
  border-top-color: var(--brand);
  border-right-color: var(--brand);
  animation: spin 1s linear infinite;
}

/* Conteúdo central estático (logo ou letra) */
.badge-spin .spin-mark {
  width: 36px;
  height: 36px;
  z-index: 1;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Spinner pequeno pra botão */
.btn .btn-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: white;
  animation: spin 0.8s linear infinite;
  margin-right: 8px;
  vertical-align: -2px;
}

.badge-success {
  background: #ECFDF5;
}

.badge-success::after {
  content: "";
  width: 36px;
  height: 36px;
  background: var(--success);
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='currentColor' d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/></svg>") center/contain no-repeat;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='currentColor' d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/></svg>") center/contain no-repeat;
  background-color: var(--success);
}

.badge-warn {
  background: #FFF7E0;
  color: var(--warn);
  font-size: 36px;
  font-weight: 800;
  line-height: 1;
}

.field { margin-bottom: 18px; }

.field label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-3);
  margin-bottom: 8px;
}

.inputwrap {
  position: relative;
}

.inputwrap input {
  width: 100%;
  padding: 14px 60px 14px 14px;
  font-size: 15px;
  font-family: inherit;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--card);
  color: var(--fg-1);
  outline: none;
  transition: border .15s, box-shadow .15s;
}

.inputwrap input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(35,71,255,0.10);
}

.toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: 0;
  color: var(--brand);
  font-weight: 600;
  font-size: 13px;
  padding: 6px 10px;
  cursor: pointer;
  font-family: inherit;
}

.strength {
  display: flex;
  gap: 4px;
  margin-top: 8px;
}
.strength i {
  flex: 1;
  height: 4px;
  background: #E1E5EC;
  border-radius: 2px;
  transition: background .2s;
}
.strength.lvl-1 i:nth-child(-n+1) { background: var(--danger); }
.strength.lvl-2 i:nth-child(-n+2) { background: #F59E0B; }
.strength.lvl-3 i:nth-child(-n+3) { background: #FBBF24; }
.strength.lvl-4 i { background: var(--success); }

.strength-label {
  font-size: 12px;
  color: var(--fg-3);
  margin-top: 6px;
}
.strength-label b { color: var(--fg-2); font-weight: 700; }

.reqs {
  list-style: none;
  margin: 0 0 22px;
  padding: 14px 16px;
  background: #F7F8FA;
  border-radius: var(--r-md);
  font-size: 13px;
  color: var(--fg-3);
}
.reqs li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 0;
}
.reqs li .tick {
  display: inline-block;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: #E1E5EC;
  position: relative;
  flex-shrink: 0;
}
.reqs li.ok { color: var(--fg-2); }
.reqs li.ok .tick { background: var(--success); }
.reqs li.ok .tick::after {
  content: "";
  position: absolute;
  inset: 2px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'><path d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/></svg>") center/contain no-repeat;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 14px 22px;
  border: 0;
  border-radius: var(--r-md);
  font-size: 16px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: opacity .15s, transform .05s;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn:active:not(:disabled) {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--brand);
  color: white;
  box-shadow: 0 6px 18px rgba(35,71,255,0.25);
}

.btn-ghost {
  background: transparent;
  color: var(--brand);
  margin-top: 8px;
  box-shadow: none;
}

/* Botão de escolha equivalente (ex.: operador vs conveniado no login).
   Contorno azul + fundo claro pra que as duas opções tenham o mesmo peso
   visual — nenhuma parece "a principal". */
.btn-outline {
  background: #fff;
  color: var(--brand);
  border: 1.5px solid var(--brand);
  box-shadow: none;
}

.btn-outline + .btn-outline {
  margin-top: 10px;
}

.btn-outline:hover:not(:disabled) {
  background: var(--brand-soft);
}

.error-msg {
  margin-top: 14px;
  padding: 10px 12px;
  background: #FEF2F2;
  color: var(--danger);
  border-radius: 8px;
  font-size: 13px;
  display: none;
}
.error-msg.show { display: block; }

.foot {
  text-align: center;
  font-size: 12px;
  color: rgba(255,255,255,0.8);
  margin-top: 22px;
  line-height: 1.6;
}
.foot a { color: #fff; font-weight: 600; }
.foot .sep { margin: 0 8px; }
