@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Space+Grotesk:wght@400;500;600;700;800&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Paleta extraída diretamente do site ─────────────────────────── */
:root {
  --bg:          hsl(220, 30%,  8%);
  --bg-deep:     hsl(220, 30%,  6%);
  --surface:     hsl(220, 30%, 12%);
  --surface2:    hsl(220, 30%, 16%);
  --surface3:    hsl(220, 25%, 18%);
  --border:      hsl(220, 25%, 20%);

  --text:        hsl(180, 100%, 95%);
  --text-muted:  hsl(215,  20%, 60%);
  --text-dim:    hsl(215,  15%, 40%);

  /* Teal/Ciano — cor primária real do site */
  --teal:        hsl(170, 100%, 45%);
  --teal-dark:   hsl(170, 100%, 35%);
  --cyan:        hsl(190, 100%, 50%);
  --teal-glow:   hsla(170, 100%, 45%, 0.12);
  --teal-glow2:  hsla(170, 100%, 45%, 0.06);

  --grad-accent: linear-gradient(135deg, hsl(170,100%,45%), hsl(190,100%,50%));
  --grad-hero:   linear-gradient(135deg, hsl(220,30%,6%) 0%, hsl(220,35%,12%) 50%, hsl(210,40%,8%) 100%);

  --error:   hsl(0,   84%, 60%);
  --success: hsl(160, 84%, 39%);
}

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Wrapper / Fundo ─────────────────────────────────────────────── */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  position: relative;
  overflow: hidden;
  background: var(--grad-hero);
}

/* Glow radial do site */
.auth-wrapper::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 15%, hsla(170,100%,45%,.06) 0%, transparent 50%),
    radial-gradient(circle at 80% 85%, hsla(190,100%,50%,.04) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* Grade de pontos tech */
.auth-wrapper::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: radial-gradient(hsla(170,100%,45%,.1) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
  z-index: 0;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 50%, black 10%, transparent 75%);
}

/* ── Card ────────────────────────────────────────────────────────── */
.auth-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 44px 40px;
  box-shadow:
    0 0 0 1px hsla(170,100%,45%,.06),
    0 32px 64px hsla(0,0%,0%,.55),
    0 0 80px hsla(170,100%,45%,.04);
  animation: cardIn .45s cubic-bezier(.16,1,.3,1) both;
}

/* Linha teal no topo do card */
.auth-card::before {
  content: '';
  position: absolute;
  top: 0; left: 15%; right: 15%;
  height: 1px;
  background: var(--grad-accent);
  border-radius: 9999px;
  opacity: .5;
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(20px) scale(.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── Logo ────────────────────────────────────────────────────────── */
.auth-logo {
  text-align: center;
  margin-bottom: 36px;
}

.auth-logo .brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -.3px;
}

.brand-icon {
  width: 36px; height: 36px;
  background: var(--grad-accent);
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px;
  box-shadow: 0 0 18px hsla(170,100%,45%,.3);
  flex-shrink: 0;
}
.brand-logo-auth{width:40px;height:40px;object-fit:contain;display:block;filter:drop-shadow(0 0 18px hsla(190,100%,50%,.18));flex-shrink:0}

.auth-logo .subtitle {
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 7px;
}

/* ── Ícone central da tela ───────────────────────────────────────── */
.screen-icon {
  text-align: center;
  margin-bottom: 16px;
}
.screen-icon .icon-wrap {
  display: inline-flex;
  width: 66px; height: 66px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--surface2), var(--surface3));
  border: 1px solid var(--border);
  align-items: center; justify-content: center;
  font-size: 28px;
  box-shadow: 0 0 28px var(--teal-glow);
}

/* ── Títulos ─────────────────────────────────────────────────────── */
.auth-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -.4px;
  margin-bottom: 6px;
}

.auth-desc {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 28px;
  line-height: 1.65;
}

/* ── Inputs ──────────────────────────────────────────────────────── */
.form-group { margin-bottom: 20px; }

.form-group label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.form-group input {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 13px 16px;
  font-size: 15px;
  color: var(--text);
  font-family: inherit;
  transition: border-color .2s, box-shadow .2s, background .2s;
  outline: none;
}

.form-group input:hover { border-color: hsl(220,25%,28%); }
.form-group input:focus {
  border-color: var(--teal);
  background: hsl(220,30%,14%);
  box-shadow: 0 0 0 3px var(--teal-glow), 0 0 20px var(--teal-glow2);
}
.form-group input::placeholder { color: var(--text-dim); }

/* ── Password toggle ─────────────────────────────────────────────── */
.input-wrap { position: relative; }
.input-wrap input { padding-right: 48px; }
.toggle-pw {
  position: absolute; right: 14px; top: 50%;
  transform: translateY(-50%);
  background: none; border: none; cursor: pointer;
  color: var(--text-dim); display: flex; align-items: center;
  transition: color .2s; padding: 4px;
}
.toggle-pw:hover { color: var(--teal); }

/* ── Código de 6 dígitos ─────────────────────────────────────────── */
.code-inputs {
  display: flex; gap: 10px;
  justify-content: center;
  margin: 24px 0;
}

.code-inputs input {
  width: 52px; height: 60px;
  text-align: center;
  font-size: 22px; font-weight: 700;
  font-family: 'Space Grotesk', monospace;
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
  -moz-appearance: textfield;
}
.code-inputs input::-webkit-outer-spin-button,
.code-inputs input::-webkit-inner-spin-button { -webkit-appearance: none; }
.code-inputs input:focus {
  border-color: var(--teal);
  background: hsl(220,30%,14%);
  box-shadow: 0 0 0 3px var(--teal-glow);
}
.code-inputs input.filled {
  border-color: var(--teal);
  color: var(--teal);
  background: hsla(170,100%,45%,.04);
}

/* ── Botões ──────────────────────────────────────────────────────── */
.btn {
  width: 100%; padding: 14px;
  border: none; border-radius: 12px;
  cursor: pointer; font-size: 15px;
  font-weight: 700; font-family: 'Space Grotesk', sans-serif;
  letter-spacing: .2px;
  transition: all .2s;
  position: relative; overflow: hidden;
}
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none !important; }

.btn-primary {
  background: var(--grad-accent);
  color: hsl(220, 30%, 6%);
  box-shadow: 0 4px 20px hsla(170,100%,45%,.28);
}
.btn-primary:hover:not(:disabled) {
  filter: brightness(1.1);
  box-shadow: 0 6px 30px hsla(170,100%,45%,.45);
  transform: translateY(-1px);
}
.btn-primary::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.15), transparent);
  transform: translateX(-100%);
  transition: transform .5s;
}
.btn-primary:hover:not(:disabled)::after { transform: translateX(100%); }

.btn-ghost {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.btn-ghost:hover:not(:disabled) {
  background: var(--surface3);
  border-color: hsl(220,25%,30%);
  color: var(--text);
}

/* ── Alertas ─────────────────────────────────────────────────────── */
.alert {
  border-radius: 12px; padding: 12px 16px;
  font-size: 14px; margin-bottom: 20px;
  display: none; align-items: flex-start;
  gap: 9px; line-height: 1.5;
}
.alert.show {
  display: flex;
  animation: alertIn .3s ease both;
}
@keyframes alertIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.alert-error   { background: hsla(0,84%,60%,.08);    border: 1px solid hsla(0,84%,60%,.22);    color: hsl(0,90%,78%);    }
.alert-success { background: hsla(160,84%,39%,.08);  border: 1px solid hsla(160,84%,39%,.22);  color: hsl(160,80%,68%);  }
.alert-info    { background: hsla(170,100%,45%,.06); border: 1px solid hsla(170,100%,45%,.2);  color: var(--teal);       }

/* ── Links ───────────────────────────────────────────────────────── */
.auth-link { color: var(--teal); text-decoration: none; font-weight: 500; transition: opacity .2s; }
.auth-link:hover { opacity: .75; }

.auth-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 14px;
  color: var(--text-muted);
}

/* ── Regras de senha ─────────────────────────────────────────────── */
.pw-rules { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.pw-rule {
  font-size: 11px; padding: 3px 10px;
  border-radius: 99px;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text-dim);
  transition: all .25s; font-weight: 500;
}
.pw-rule.ok {
  background: hsla(160,84%,39%,.1);
  border-color: hsla(160,84%,39%,.3);
  color: hsl(160,80%,68%);
}

/* ── Timer de reenvio ────────────────────────────────────────────── */
.resend-wrap { text-align: center; margin-top: 20px; font-size: 14px; color: var(--text-muted); }
.resend-btn  { background: none; border: none; color: var(--teal); font-size: 14px; font-weight: 600; cursor: pointer; padding: 0; transition: opacity .2s; }
.resend-btn:hover:not(:disabled) { opacity: .75; }
.resend-btn:disabled { color: var(--text-dim); cursor: not-allowed; }
.timer { color: var(--text-dim); font-variant-numeric: tabular-nums; }

/* ── Spinner ─────────────────────────────────────────────────────── */
.spinner {
  display: inline-block; width: 15px; height: 15px;
  border: 2px solid rgba(0,0,0,.2);
  border-top-color: hsl(220,30%,8%);
  border-radius: 50%;
  animation: spin .6s linear infinite;
  vertical-align: middle; margin-right: 7px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Chip de info ────────────────────────────────────────────────── */
.info-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 99px; padding: 5px 14px;
  font-size: 13px; color: var(--text-muted);
}
.info-chip .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 6px var(--teal);
  flex-shrink: 0;
}

@media (max-width: 480px) {
  .auth-card { padding: 36px 22px; }
  .code-inputs input { width: 44px; height: 52px; font-size: 20px; gap: 8px; }
}
