/* ===== Login / Auth pages — sobrescreve o chrome do app.css ===== */

body {
  background: var(--bf-bg-primary);
  min-height: 100vh;
}

.page {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  position: relative;
  overflow: hidden;
}
.bg-pattern {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.55;
  background-image:
    radial-gradient(circle at 12% 18%, rgba(126, 197, 189, 0.18) 0, transparent 28%),
    radial-gradient(circle at 88% 82%, rgba(30, 51, 93, 0.08) 0, transparent 32%);
}
.bg-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.5;
  width: 100%;
  height: 100%;
}

.topbar {
  position: relative;
  z-index: 2;
  padding: 32px 40px 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.topbar .brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.topbar .brand-mark {
  width: 36px; height: 36px; border-radius: 8px;
  background: var(--bf-primary);
  display: grid; place-items: center;
  box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}
.topbar .brand-mark svg { width: 24px; height: 24px; display: block; }
.topbar .brand-text { display: flex; flex-direction: column; line-height: 1; }
.topbar .brand-text .wordmark {
  font-weight: 700;
  font-size: 16px;
  color: var(--bf-primary);
  letter-spacing: -0.01em;
}
.topbar .brand-text .product {
  font-size: 11px;
  color: var(--bf-text-secondary);
  margin-top: 4px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 500;
}
.topbar-right {
  color: var(--bf-text-secondary);
  font-size: 13px;
}
.topbar-right a {
  color: var(--bf-primary);
  text-decoration: none;
  font-weight: 500;
}
.topbar-right a:hover { text-decoration: underline; }

.center {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  padding: 48px 24px;
}
.stack {
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}

.auth-card {
  width: 100%;
  background: white;
  border: 1px solid var(--bf-border-soft);
  border-radius: 16px;
  padding: 40px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 12px 40px -16px rgba(30, 51, 93, 0.10);
}
.auth-card h1 {
  margin: 0 0 8px 0;
  font-size: 26px;
  font-weight: 700;
  color: var(--bf-text-primary);
  letter-spacing: -0.02em;
}
.auth-card .subtitle {
  margin: 0 0 28px 0;
  font-size: 15px;
  color: var(--bf-text-secondary);
  line-height: 1.55;
}

.form-group { margin-bottom: 20px; }
.label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--bf-text-primary);
  margin-bottom: 8px;
  letter-spacing: 0.01em;
}
.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.input-wrap svg.lead {
  position: absolute;
  left: 16px;
  width: 18px; height: 18px;
  color: var(--bf-text-secondary);
  opacity: 0.7;
  pointer-events: none;
}
.auth-card .input {
  width: 100%;
  border: 1px solid rgba(91, 102, 112, 0.30);
  background: white;
  border-radius: 10px;
  padding: 14px 16px 14px 46px;
  font-family: inherit;
  font-size: 15px;
  color: var(--bf-text-primary);
  outline: none;
  transition: all 150ms ease;
}
.auth-card .input.error {
  border-color: #b04545;
  box-shadow: 0 0 0 3px rgba(176, 69, 69, 0.08);
}

.error-msg {
  margin-top: 10px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  color: #6b3a3a;
  line-height: 1.5;
}
.error-msg svg { flex-shrink: 0; width: 16px; height: 16px; margin-top: 2px; color: #b04545; }

.auth-card .btn-primary {
  width: 100%;
  background: var(--bf-primary);
  color: white;
  border: none;
  border-radius: 10px;
  padding: 14px 20px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 150ms ease;
  display: flex; align-items: center; justify-content: center;
  gap: 10px;
}
.auth-card .btn-primary:hover { background: var(--bf-primary-dark); transform: translateY(-1px); }
.auth-card .btn-primary:active { transform: translateY(0); }
.auth-card .btn-primary svg { width: 16px; height: 16px; }
.auth-card .btn-primary:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

.restricted {
  margin-top: 20px;
  text-align: center;
  font-size: 12px;
  color: var(--bf-text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.restricted svg { width: 13px; height: 13px; }

/* ===== Sent state ===== */
.sent { text-align: center; }
.sent .check {
  width: 76px; height: 76px;
  border-radius: 50%;
  background: rgba(126, 197, 189, 0.20);
  display: grid; place-items: center;
  margin: 0 auto 20px auto;
  color: var(--bf-primary);
}
.sent .check svg { width: 38px; height: 38px; }
.sent h2 {
  margin: 0 0 12px 0;
  font-size: 24px;
  font-weight: 700;
  color: var(--bf-text-primary);
  letter-spacing: -0.02em;
}
.sent p {
  margin: 0 0 8px 0;
  font-size: 15px;
  color: var(--bf-text-secondary);
  line-height: 1.6;
}
.sent p strong { color: var(--bf-primary); font-weight: 600; }
.sent .tiny {
  margin-top: 16px;
  font-size: 12px;
  color: var(--bf-text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--bf-bg-subtle);
  border-radius: 999px;
}
.sent .tiny svg { width: 12px; height: 12px; }
.sent .retry {
  display: inline-block;
  margin-top: 28px;
  background: none;
  border: none;
  color: var(--bf-primary);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.sent .retry:hover { color: var(--bf-primary-dark); }

/* ===== Footer ===== */
.auth-footer {
  position: relative;
  z-index: 2;
  padding: 28px 40px 32px 40px;
  text-align: center;
}
.tagline {
  font-size: 14px;
  color: var(--bf-text-secondary);
  font-style: italic;
  letter-spacing: 0.01em;
}
.footer-meta {
  margin-top: 8px;
  font-size: 12px;
  color: var(--bf-text-secondary);
  opacity: 0.75;
}

@media (max-width: 600px) {
  .topbar { padding: 20px 20px 0 20px; }
  .auth-footer { padding: 20px; }
  .auth-card { padding: 28px 22px; }
  .auth-card h1 { font-size: 22px; }
}
