/* =========================
   AUTH PAGES (login, exchange, etc.)
   Alineada al brand system principal.
   ========================= */

.auth-body {
  min-height: 100vh;
  background: var(--bg);
  display: flex;
  flex-direction: column;
}

.auth-nav {
  border-bottom: 1px solid transparent;
  background: rgba(250, 250, 248, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.auth-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.auth-nav-back {
  font-size: var(--t-caption);
  color: var(--ink-soft);
  transition: color 0.15s ease;
}
.auth-nav-back:hover {
  color: var(--ink);
}

.auth-main {
  flex: 1;
  display: grid;
  place-items: center;
  padding: var(--s-8) var(--s-5);
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--s-7);
  box-shadow:
    0 1px 0 rgba(0, 0, 0, 0.02),
    0 20px 40px -20px rgba(26, 26, 26, 0.12),
    0 40px 80px -30px rgba(26, 26, 26, 0.06);
}

.auth-card-head {
  margin-bottom: var(--s-6);
}
.auth-eyebrow {
  display: inline-block;
  font-size: var(--t-micro);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: var(--s-3);
}
.auth-title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: var(--s-3);
}
.auth-sub {
  font-size: 15px;
  color: var(--ink-soft);
  line-height: 1.5;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}
.auth-hidden {
  display: none !important;
}

.auth-label {
  font-size: var(--t-caption);
  font-weight: 600;
  color: var(--ink);
}

.auth-input {
  width: 100%;
  font-family: inherit;
  font-size: 16px;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px var(--s-4);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  outline: none;
}
.auth-input::placeholder {
  color: var(--ink-muted);
}
.auth-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 110, 86, 0.15);
}
.auth-input:disabled {
  background: var(--bg-soft);
  color: var(--ink-muted);
  cursor: not-allowed;
}

.auth-input-otp {
  letter-spacing: 0.5em;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 22px;
  text-align: center;
  padding: 16px var(--s-4);
}

.auth-help {
  font-size: 13px;
  color: var(--ink-muted);
  line-height: 1.45;
  margin-bottom: var(--s-3);
}

.auth-context {
  font-size: 15px;
  color: var(--ink-soft);
  margin-bottom: var(--s-4);
}
.auth-context-email {
  color: var(--ink);
  font-weight: 600;
  word-break: break-all;
}

.auth-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  background: var(--ink);
  color: var(--bg);
  border: none;
  border-radius: 100px;
  padding: 14px var(--s-5);
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
  position: relative;
  min-height: 48px;
}
.auth-btn:hover:not(:disabled) {
  background: var(--accent);
  transform: translateY(-1px);
}
.auth-btn:disabled {
  background: var(--ink-muted);
  cursor: not-allowed;
  transform: none;
}
.auth-btn .arrow {
  transition: transform 0.2s ease;
}
.auth-btn:hover:not(:disabled) .arrow {
  transform: translateX(3px);
}
.auth-btn-spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(250, 250, 248, 0.35);
  border-top-color: var(--bg);
  border-radius: 50%;
  animation: auth-spin 0.8s linear infinite;
}
.auth-btn.is-loading .auth-btn-spinner {
  display: inline-block;
}
.auth-btn.is-loading .auth-btn-label,
.auth-btn.is-loading .arrow {
  opacity: 0.6;
}
@keyframes auth-spin {
  to {
    transform: rotate(360deg);
  }
}

.auth-link {
  background: none;
  border: none;
  color: var(--ink-soft);
  font-family: inherit;
  font-size: var(--t-caption);
  cursor: pointer;
  padding: var(--s-2) 0;
  text-align: center;
  transition: color 0.15s ease;
  margin-top: var(--s-2);
}
.auth-link:hover {
  color: var(--accent);
}

.auth-feedback {
  min-height: 20px;
  margin-top: var(--s-4);
  font-size: var(--t-caption);
  line-height: 1.5;
  color: var(--ink-soft);
  border-radius: var(--radius-sm);
  padding: 0;
  transition: padding 0.15s ease, background 0.15s ease;
}
.auth-feedback.is-error {
  color: var(--warm-deep);
  background: var(--warm-soft);
  padding: var(--s-3) var(--s-4);
  border-left: 3px solid var(--warm);
}
.auth-feedback.is-info {
  color: var(--accent);
  background: var(--accent-surface);
  padding: var(--s-3) var(--s-4);
  border-left: 3px solid var(--accent);
}

.auth-card-foot {
  margin-top: var(--s-6);
  padding-top: var(--s-5);
  border-top: 1px solid var(--line);
  text-align: center;
}
.auth-card-foot p {
  font-size: 12px;
  color: var(--ink-muted);
  line-height: 1.5;
}
.auth-card-foot a {
  color: var(--ink-soft);
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 2px;
}
.auth-card-foot a:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

@media (max-width: 520px) {
  .auth-card {
    padding: var(--s-5);
    border-radius: var(--radius);
  }
  .auth-title {
    font-size: 24px;
  }
}
