/* Login de cliente (email + código OTP): tarjeta glass sobre fondo de marca. */
body.auth-glass {
  background:
    radial-gradient(60% 50% at 12% 8%, rgba(239,174,65,0.20), transparent 70%),
    radial-gradient(55% 55% at 92% 96%, rgba(126,201,140,0.16), transparent 70%),
    radial-gradient(40% 40% at 80% 12%, rgba(27,59,50,0.9), transparent 75%),
    #0B1613;
  background-attachment: fixed;
  padding-block: 0;
}
body.auth-glass .wrap {
  max-width: 440px !important;
  min-height: 100vh;
  display: flex; flex-direction: column; justify-content: center;
  padding-block: 32px !important;
}
body.auth-glass header { justify-content: center !important; }
body.auth-glass .brand-mark { font-size: 22px; }

.glass {
  position: relative;
  padding: 36px 28px 28px;
  border-radius: 28px;
  border: 1px solid rgba(255,255,255,0.12);
  background: linear-gradient(150deg, rgba(255,255,255,0.10), rgba(255,255,255,0.03) 55%, rgba(255,255,255,0.05));
  -webkit-backdrop-filter: blur(26px) saturate(150%);
  backdrop-filter: blur(26px) saturate(150%);
  box-shadow: 0 1px 0 rgba(255,255,255,0.10) inset, 0 30px 60px -24px rgba(0,0,0,0.7);
  text-align: center;
  transition: background .5s, border-color .5s;
}
.glass::before {
  content: ""; position: absolute; top: 12px; left: 50%; width: 36px; height: 3px;
  margin-left: -18px; border-radius: 3px; background: rgba(255,255,255,0.18);
}
.glass h1 { margin: 6px 0 8px; font-size: 21px; font-weight: 700; letter-spacing: -0.01em; }
.glass .lead { margin: 0 auto 26px; max-width: 30ch; font-size: 13px; line-height: 1.5; color: var(--ink-soft); overflow-wrap: anywhere; }
.glass .lead b { color: var(--ink); font-weight: 600; }
.glass .sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

.glass .glass-field { text-align: left; margin-bottom: 18px; }
.glass .glass-field label { display: block; margin-bottom: 8px; font-size: 12.5px; font-weight: 600; color: var(--ink-soft); }
.glass .glass-field input {
  width: 100%; padding: 14px 16px; font: inherit; font-size: 15px; color: var(--ink);
  background: rgba(0,0,0,0.28); border: 1px solid rgba(255,255,255,0.10); border-radius: 14px;
  transition: border-color .15s, box-shadow .15s;
}
.glass .glass-field input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 4px rgba(239,174,65,0.18); }
.glass .field-error { margin: 8px 0 0; font-size: 12.5px; color: var(--red-fg); text-align: left; }

/* casillas del código */
.otp-boxes { display: flex; justify-content: center; gap: 8px; margin: 0 0 20px; }
.otp-box {
  flex: 1 1 0; min-width: 0; max-width: 52px; height: 58px; padding: 0;
  font: inherit; font-size: 24px; font-weight: 600; font-variant-numeric: tabular-nums; text-align: center;
  color: var(--ink); caret-color: var(--gold);
  background: rgba(0,0,0,0.28); border: 1px solid rgba(255,255,255,0.10); border-radius: 14px;
  transition: border-color .15s, box-shadow .15s, background .15s, transform .15s;
}
.otp-box.is-filled { background: rgba(255,255,255,0.07); border-color: rgba(255,255,255,0.22); }
.otp-box:focus {
  outline: none; border-color: var(--gold); background: rgba(239,174,65,0.08);
  box-shadow: 0 0 0 4px rgba(239,174,65,0.18); transform: translateY(-1px);
}
.otp-boxes.is-error .otp-box { border-color: var(--red-fg); box-shadow: 0 0 0 3px rgba(224,128,102,0.16); animation: otp-shake .38s; }
@keyframes otp-shake { 20% { transform: translateX(-5px); } 40% { transform: translateX(5px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(3px); } }
.glass .otp-error { margin: -8px 0 18px; min-height: 18px; font-size: 12.5px; color: var(--red-fg); }

.otp-check { display: none; width: 58px; height: 58px; margin: 0 auto 8px; place-items: center; border-radius: 16px;
  background: rgba(126,201,140,0.16); border: 1px solid rgba(126,201,140,0.5); color: var(--green-fg);
  box-shadow: 0 0 28px rgba(126,201,140,0.25); }
.otp-check svg { width: 26px; height: 26px; }
.otp-check path { stroke-dasharray: 24; stroke-dashoffset: 24; }
.glass.is-verifying { background: linear-gradient(150deg, rgba(126,201,140,0.16), rgba(126,201,140,0.04) 60%, rgba(255,255,255,0.04)); border-color: rgba(126,201,140,0.28); }
.glass.is-verifying .otp-boxes, .glass.is-verifying .otp-error,
.glass.is-verifying .otp-submit, .glass.is-verifying .otp-resend, .glass.is-verifying .otp-other { display: none; }
.glass.is-verifying .otp-check { display: grid; animation: otp-pop .35s cubic-bezier(.2,.9,.3,1.3); }
.glass.is-verifying .otp-check path { animation: otp-draw .4s .15s ease forwards; }
@keyframes otp-pop { from { transform: scale(.6); opacity: 0; } }
@keyframes otp-draw { to { stroke-dashoffset: 0; } }

.glass .btn { width: 100%; justify-content: center; padding-block: 14px; }
.otp-resend { margin: 20px 0 0; font-size: 12.5px; color: var(--ink-soft); }
.otp-resend button {
  all: unset; cursor: pointer; margin-left: 4px; font-weight: 700; color: var(--ink);
  text-decoration: underline; text-underline-offset: 3px;
}
.otp-resend button:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
.otp-other { margin: 10px 0 0; font-size: 12.5px; }
.otp-other a { color: var(--ink-soft); }

@media (max-width: 400px) {
  .glass { padding-inline: 18px; }
  .otp-boxes { gap: 6px; }
  .otp-box { height: 52px; font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  .otp-boxes.is-error .otp-box, .glass.is-verifying .otp-check, .glass.is-verifying .otp-check path { animation: none; stroke-dashoffset: 0; }
}
