/* ============================================================
   Frame — acceso
   Un solo formulario por pantalla, centrado y simple.
   ============================================================ */

body.auth-page {
  height: auto;
  min-height: 100vh;
  overflow: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 36px 20px;
  background:
    radial-gradient(760px 460px at 50% -12%, rgba(214, 246, 92, 0.065), transparent 62%),
    radial-gradient(820px 480px at 100% 100%, rgba(111, 154, 255, 0.035), transparent 60%),
    var(--bg);
}

.auth-shell {
  width: 100%;
  max-width: 386px;
}

.auth-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 27px;
}

.auth-brand-mark {
  width: 58px;
  height: 58px;
  border-radius: 17px;
  margin-bottom: 14px;
}
.auth-brand-mark svg { width: 58px; height: 58px; }

.auth-brand-name {
  font-size: 23px;
  font-weight: 600;
  letter-spacing: -0.035em;
  color: var(--text);
}

.auth-brand-tagline {
  margin-top: 3px;
  font-size: 10.5px;
  color: var(--text-3);
}

.auth-card {
  padding: 24px;
  border-radius: 18px;
  border: 1px solid #282831;
  background: var(--panel);
  box-shadow:
    0 30px 80px -40px rgba(0, 0, 0, 0.9),
    inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.auth-card h1 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--text);
}

.auth-sub {
  margin-top: 4px;
  margin-bottom: 20px;
  font-size: 12px;
  line-height: 1.55;
  color: var(--text-3);
}
.auth-sub strong {
  color: var(--text-2);
  font-weight: 550;
  overflow-wrap: anywhere;
}

.auth-field { margin-top: 13px; }
.auth-field:first-of-type { margin-top: 0; }

.auth-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 5px;
}

.auth-label {
  display: block;
  margin-bottom: 5px;
  font-size: 10.5px;
  font-weight: 550;
  color: var(--text-2);
}
.auth-label-row .auth-label { margin-bottom: 0; }

.auth-input {
  width: 100%;
  height: 39px;
  padding: 0 11px;
  border-radius: 9px;
  border: 1px solid #2a2a33;
  background: #0c0c10;
  color: var(--text);
  font-size: 12.5px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.auth-input::placeholder { color: var(--text-4); }
.auth-input:hover { border-color: #34343f; }
.auth-input:focus {
  border-color: rgba(214, 246, 92, 0.46);
  background: #0e0e12;
  box-shadow: 0 0 0 3px rgba(214, 246, 92, 0.07);
}

.auth-input.code {
  height: 51px;
  font-family: var(--mono);
  font-size: 22px;
  letter-spacing: 0.32em;
  text-align: center;
  padding-left: calc(11px + 0.32em);
}

.auth-submit {
  width: 100%;
  height: 41px;
  margin-top: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: -0.005em;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    0 12px 30px -16px rgba(214, 246, 92, 0.55);
  transition: background 0.15s, opacity 0.15s, transform 0.15s;
}
.auth-submit:hover:not(:disabled) { background: var(--accent-bright); transform: translateY(-1px); }
.auth-submit:active:not(:disabled) { transform: none; }
.auth-submit:disabled { opacity: 0.6; cursor: wait; }

.auth-link {
  color: var(--accent);
  font-size: 10.5px;
  font-weight: 500;
  white-space: nowrap;
}
.auth-link:hover { text-decoration: underline; text-underline-offset: 2px; }

.auth-error {
  margin: 14px 0 0;
  padding: 9px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 123, 110, 0.28);
  background: rgba(255, 123, 110, 0.08);
  color: #ff9a90;
  font-size: 11px;
  line-height: 1.5;
}

.auth-dev {
  margin: 13px 0;
  padding: 10px 11px;
  border-radius: 9px;
  border: 1px solid var(--accent-line);
  background: var(--accent-soft);
  color: var(--text-3);
  font-size: 10.5px;
  line-height: 1.55;
}
.auth-dev-label {
  display: block;
  margin-bottom: 3px;
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent);
}
.auth-dev strong {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: 0.14em;
}

.auth-help {
  margin-top: 5px;
  font-size: 9.5px;
  line-height: 1.45;
  color: var(--text-4);
}

.auth-resend-note {
  margin: 10px 0 0;
  font-size: 10px;
  color: var(--ok);
}

.auth-resend {
  margin-top: 14px;
  text-align: center;
  font-size: 10px;
  line-height: 1.8;
  color: var(--text-4);
}
.auth-resend button {
  color: var(--text-2);
  font-size: 10px;
  font-weight: 500;
}
.auth-resend button:hover { color: var(--accent); }

.auth-back {
  display: block;
  margin: 16px auto 0;
  color: var(--text-3);
  font-size: 10px;
}
.auth-back:hover { color: var(--text); text-decoration: underline; text-underline-offset: 2px; }

.auth-note {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
  text-align: center;
  font-size: 9.5px;
  line-height: 1.5;
  color: var(--text-4);
}

.auth-success { text-align: center; padding: 34px 24px; }
.auth-success-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 15px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(143, 227, 176, 0.3);
  background: rgba(143, 227, 176, 0.12);
  color: var(--ok);
}
.auth-success .auth-sub { margin-bottom: 0; }

.auth-footer {
  margin-top: 18px;
  text-align: center;
  font-size: 9px;
  letter-spacing: 0.02em;
  color: var(--text-4);
}

.auth-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(12, 14, 4, 0.3);
  border-top-color: var(--accent-ink);
  border-radius: 50%;
  animation: auth-spin 0.7s linear infinite;
}
@keyframes auth-spin { to { transform: rotate(360deg); } }

@media (max-width: 460px) {
  body.auth-page { align-items: flex-start; padding: 26px 16px; }
  .auth-brand { margin: 10px 0 22px; }
  .auth-brand-mark { width: 52px; height: 52px; }
  .auth-brand-mark svg { width: 52px; height: 52px; }
  .auth-card { padding: 21px; }
  .auth-brand-name { font-size: 21px; }
}
