:root {
  --auth-bg: #0a0f24;
  --auth-card: #111a3d;
  --auth-border: #2a355f;
  --auth-text: #e8ecff;
  --auth-muted: #9aa7d6;
  --auth-accent: #00e0b8;
  --auth-accent-2: #7aa8ff;
  --auth-danger: #ff6b6b;
}

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

body.auth-body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: radial-gradient(1200px 600px at 20% 0%, #15204a 0%, var(--auth-bg) 55%);
  color: #e8ecff;
  color: var(--auth-text, #e8ecff);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.auth-shell {
  width: 100%;
  max-width: min(900px, 100%);
  background: var(--auth-card);
  border: 1px solid var(--auth-border);
  border-radius: 16px;
  padding: 1.35rem 1.4rem 1.5rem;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

.auth-shell h1 {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
  font-weight: 700;
  color: #e8ecff;
  color: var(--auth-text, #e8ecff);
  -webkit-text-fill-color: currentColor;
}

.auth-lead {
  margin: 0 0 1rem;
  font-size: 0.88rem;
  color: #9aa7d6;
  color: var(--auth-muted, #9aa7d6);
  line-height: 1.45;
}

.auth-tabs {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.auth-tab {
  flex: 1;
  border: 1px solid var(--auth-border);
  background: transparent;
  color: #9aa7d6;
  color: var(--auth-muted, #9aa7d6);
  padding: 0.45rem 0.5rem;
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.88rem;
  -webkit-text-fill-color: currentColor;
}

.auth-tab--active {
  border-color: var(--auth-accent);
  color: #7aa8ff;
  color: var(--auth-accent-2, #7aa8ff);
  background: rgba(0, 224, 184, 0.08);
  -webkit-text-fill-color: currentColor;
}

.auth-panel[hidden] {
  display: none !important;
}

.auth-recovery[hidden] {
  display: none !important;
}

.auth-recovery {
  margin-top: 0.25rem;
  margin-bottom: 1rem;
  padding: 0.85rem 0.75rem;
  border: 1px dashed var(--auth-border);
  border-radius: 12px;
  background: rgba(122, 168, 255, 0.04);
}

.auth-recovery__title {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #7aa8ff;
  color: var(--auth-accent-2, #7aa8ff);
  -webkit-text-fill-color: currentColor;
}

.auth-recovery__lead {
  margin: 0 0 0.65rem;
  font-size: 0.82rem;
  color: #9aa7d6;
  color: var(--auth-muted, #9aa7d6);
  line-height: 1.4;
  -webkit-text-fill-color: currentColor;
}

.auth-recovery__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.5rem;
}

.auth-submit--secondary {
  flex: 1 1 160px;
  background: transparent;
  border: 1px solid var(--auth-border);
  color: #c5cef0;
  color: var(--auth-muted, #c5cef0);
  font-size: 0.82rem;
  -webkit-text-fill-color: currentColor;
}

.auth-submit--secondary:hover {
  border-color: var(--auth-accent);
  color: var(--auth-text);
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  margin-bottom: 0.75rem;
}

.auth-field label {
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #9aa7d6;
  color: var(--auth-muted, #9aa7d6);
  -webkit-text-fill-color: currentColor;
}

.auth-field input[type="text"],
.auth-field input[type="password"] {
  border: 1px solid var(--auth-border);
  border-radius: 10px;
  padding: 0.55rem 0.65rem;
  background: #0f1735;
  color: var(--auth-text);
  font-size: 0.95rem;
}

/* Contraseña: ojo para mostrar/ocultar (WCAG: botón nativo, aria-pressed, foco visible) */
.auth-password-wrap {
  position: relative;
  width: 100%;
  display: block;
}

.auth-password-wrap .auth-password-input {
  width: 100%;
  padding-right: 2.85rem;
  box-sizing: border-box;
}

.auth-password-toggle {
  position: absolute;
  right: 0.2rem;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  margin: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #c5cee8;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.auth-password-toggle:hover {
  color: #dfe6ff;
}

.auth-password-toggle:focus {
  outline: none;
}

.auth-password-toggle:focus-visible {
  outline: 2px solid rgba(0, 224, 184, 0.55);
  outline-offset: 2px;
}

.auth-password-toggle__glyph {
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.auth-password-toggle__glyph--when-revealed {
  display: none;
}

.auth-password-toggle--revealed .auth-password-toggle__glyph--when-masked {
  display: none;
}

.auth-password-toggle--revealed .auth-password-toggle__glyph--when-revealed {
  display: flex;
}

.auth-field input:focus {
  outline: 2px solid rgba(0, 224, 184, 0.45);
  outline-offset: 1px;
}

@keyframes auth-tier-title-glow {
  0%,
  100% {
    color: #3af0c8;
    text-shadow:
      0 0 14px rgba(0, 224, 184, 0.65),
      0 0 32px rgba(122, 168, 255, 0.35);
  }
  50% {
    color: #8ab8ff;
    text-shadow:
      0 0 18px rgba(122, 168, 255, 0.55),
      0 0 26px rgba(0, 224, 184, 0.28);
  }
}

.auth-membership-details {
  margin: 0 0 0.35rem;
}

.auth-membership-details--terms {
  margin-top: 0.85rem;
}

.auth-membership-details__summary {
  display: block;
  cursor: pointer;
  list-style: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  border-radius: 8px;
  outline-offset: 2px;
}

.auth-membership-details__summary:focus-visible {
  outline: 2px solid rgba(0, 224, 184, 0.55);
}

.auth-membership-details__summary::-webkit-details-marker {
  display: none;
}

.auth-membership-details__summary::marker {
  content: "";
}

.auth-membership-details__titles-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 0.5rem;
  row-gap: 0.45rem;
  width: 100%;
  min-width: 0;
}

.auth-membership-details__hint {
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: none;
  color: rgba(197, 206, 240, 0.92);
  margin-left: 0.15rem;
}

/* Flecha hacia el título (misma idea que contact-form__consent-arrow en Chuchuloo wholesale). */
.auth-membership-details__carry-arrow {
  display: inline-block;
  flex-shrink: 0;
  align-self: center;
  margin-left: 0.35rem;
  margin-right: 0.45rem;
  color: rgba(154, 167, 214, 0.9);
  font-size: calc(1.05rem * 1.3 * 1.2);
  font-weight: 600;
  line-height: 1;
  --auth-carry-arrow-y: calc(-0.1em + 2px);
  animation: auth-membership-carry-arrow-oscillate 3s ease-in-out infinite;
}

@keyframes auth-membership-carry-arrow-oscillate {
  0%,
  100% {
    transform: translateY(var(--auth-carry-arrow-y, 0)) translateX(0);
  }
  50% {
    transform: translateY(var(--auth-carry-arrow-y, 0)) translateX(calc(-1 * min(72px, 18vw) / 6));
  }
}

.auth-membership-details__sign {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  flex-shrink: 0;
  margin-left: 0.08rem;
  margin-right: 0.35rem;
  border-radius: 6px;
  border: 1px solid var(--auth-border);
  color: var(--auth-accent);
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1;
  background: rgba(0, 224, 184, 0.08);
}

.auth-membership-details__sign::before {
  content: "+";
}

.auth-membership-details[open] .auth-membership-details__sign::before {
  content: "−";
}

.auth-membership-details__summary .auth-membership-heading {
  display: inline;
  margin-bottom: 0;
  flex: 0 1 auto;
  min-width: 0;
  text-align: left;
  font-size: 1.56rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  font-weight: 700;
  color: #3af0c8;
  text-shadow:
    0 0 14px rgba(0, 224, 184, 0.65),
    0 0 32px rgba(122, 168, 255, 0.35);
  animation: auth-tier-title-glow 2.1s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .auth-membership-details__summary .auth-membership-heading {
    animation: none;
    color: #5ee8cc;
    text-shadow:
      0 0 16px rgba(0, 224, 184, 0.45),
      0 0 24px rgba(122, 168, 255, 0.3);
  }

  .auth-membership-details__carry-arrow {
    animation: none;
    transform: translateY(var(--auth-carry-arrow-y, 0));
  }
}

.auth-membership-heading {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--auth-muted);
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.auth-membership-details .auth-membership-points {
  margin-top: 0.45rem;
}

.auth-membership-points {
  margin: 0 0 0.75rem;
  padding-left: 1.2rem;
  font-size: calc(0.8rem * 1.3);
  line-height: 1.55;
  color: var(--auth-text);
}

.auth-membership-points li {
  margin-bottom: 0.48rem;
}

.auth-membership-points li:last-child {
  margin-bottom: 0;
}

.auth-membership-points li::marker {
  color: var(--auth-accent);
}

.auth-membership-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.auth-membership-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
}

.auth-membership-table thead th {
  padding: 0.35rem 0.4rem 0.5rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--auth-muted);
  text-align: center;
  border-bottom: 1px solid var(--auth-border);
}

.auth-membership-table thead th:first-child {
  text-align: left;
  white-space: normal;
  max-width: 12.5rem;
  line-height: 1.35;
  font-size: calc(0.68rem * 1.15);
}

.auth-membership-table tbody td {
  padding: 0.45rem 0.4rem;
  vertical-align: middle;
  color: var(--auth-text);
  border-bottom: 1px solid rgba(42, 53, 95, 0.65);
  text-align: center;
}

.auth-membership-table tbody td:first-child {
  text-align: left;
  min-width: 13.5rem;
  vertical-align: middle;
}

.auth-membership-na {
  color: var(--auth-muted);
}

.auth-membership-table tbody tr:last-child td {
  border-bottom: none;
}

.auth-membership-name {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.45rem;
  cursor: pointer;
  margin: 0;
  font-weight: 700;
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
}

.auth-membership-name__row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.45rem;
}

.auth-membership-name input[type="radio"] {
  margin: 0;
  accent-color: var(--auth-accent);
  flex-shrink: 0;
}

.auth-membership-name > .auth-tier-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 17rem;
  max-width: 100%;
  min-height: 2.15em;
  text-align: center;
  text-wrap: balance;
  padding: 0.35rem 0.55rem;
}

.auth-membership-plan-name {
  color: var(--auth-muted);
  font-size: 1.3em;
  line-height: 1.2;
}

.auth-membership-row--selected {
  background: rgba(0, 224, 184, 0.07);
}

.auth-membership-row--selected .auth-membership-plan-name {
  color: var(--auth-accent);
}

.auth-tier-badge {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 6px;
  line-height: 1.35;
}

.auth-tier-badge--basic {
  color: var(--auth-muted);
  background: rgba(154, 167, 214, 0.1);
  border: 1px solid rgba(154, 167, 214, 0.38);
}

.auth-tier-badge--advanced {
  color: #c5cef0;
  background: rgba(122, 168, 255, 0.1);
  border: 1px solid rgba(122, 168, 255, 0.32);
}

.auth-tier-badge--pro {
  color: var(--auth-accent);
  background: rgba(0, 224, 184, 0.14);
  border: 1px solid rgba(0, 224, 184, 0.45);
}

.auth-tier-badge--full {
  color: var(--auth-accent-2);
  background: rgba(122, 168, 255, 0.12);
  border: 1px solid rgba(122, 168, 255, 0.35);
}

.auth-membership-row--highlight-pro {
  outline: 1px solid rgba(0, 224, 184, 0.32);
  outline-offset: -1px;
}

.auth-membership-row--highlight-full {
  outline: 1px solid rgba(122, 168, 255, 0.28);
  outline-offset: -1px;
}

.auth-membership-row--selected.auth-membership-row--highlight-pro {
  background: rgba(0, 224, 184, 0.09);
}

.auth-membership-row--selected.auth-membership-row--highlight-full {
  background: rgba(122, 168, 255, 0.08);
}

.auth-membership-row--selected.auth-membership-row--highlight-full .auth-membership-plan-name {
  color: var(--auth-accent-2);
}

.auth-membership-row--selected td:not(:first-child) {
  color: var(--auth-text);
}

.auth-submit {
  width: 100%;
  margin-top: 0.35rem;
  border: none;
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  background: linear-gradient(120deg, var(--auth-accent), #2bb8a2);
  color: #041018;
  -webkit-text-fill-color: #041018;
}

.auth-submit:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.auth-msg {
  min-height: 1.25em;
  margin: 0.5rem 0 0;
  font-size: 0.85rem;
  color: var(--auth-danger);
}

.auth-msg--ok {
  color: var(--auth-accent);
}

.auth-password-match-msg {
  min-height: 1.2em;
  margin: 0.35rem 0 0;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--auth-danger);
}

.auth-password-match-msg--ok {
  color: var(--auth-accent);
}

.auth-foot {
  margin-top: 1rem;
  font-size: 0.8rem;
  color: var(--auth-muted);
  line-height: 1.45;
}

.auth-foot-register {
  margin-top: 1rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--auth-border);
}

.auth-foot-register__legal {
  margin: 0 0 0.65rem;
  font-size: calc(0.8rem * 1.3 * 0.7);
  line-height: 1.55;
  color: var(--auth-muted);
}

.auth-consent {
  display: block;
  cursor: pointer;
  margin: 0;
  font-weight: 400;
}

.auth-consent__check-row {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.65rem;
  margin: 0;
  vertical-align: middle;
}

.auth-consent__affirm {
  font-size: 0.88rem;
  line-height: 1.4;
  color: var(--auth-muted);
  max-width: 36rem;
}

.auth-consent input[type="checkbox"] {
  display: inline-block;
  flex-shrink: 0;
  width: 1.2rem;
  height: 1.2rem;
  min-width: 1.2rem;
  min-height: 1.2rem;
  margin: 0;
  accent-color: var(--auth-accent);
  cursor: pointer;
}

.auth-consent__arrow {
  display: inline-block;
  flex-shrink: 0;
  align-self: center;
  color: rgba(154, 167, 214, 0.9);
  font-size: calc(1.05rem * 1.3 * 1.2);
  font-weight: 600;
  line-height: 1;
  --auth-consent-arrow-y: calc(-0.1em + 2px);
  animation: auth-consent-arrow-oscillate 3s ease-in-out infinite;
}

@keyframes auth-consent-arrow-oscillate {
  0%,
  100% {
    transform: translateY(var(--auth-consent-arrow-y, 0)) translateX(0);
  }
  50% {
    transform: translateY(var(--auth-consent-arrow-y, 0)) translateX(calc(-1 * min(72px, 18vw) / 6));
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-consent__arrow {
    animation: none;
    transform: translateY(var(--auth-consent-arrow-y, 0));
  }
}

.auth-consent__error {
  margin: 0.45rem 0 0;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--auth-danger);
}

.auth-foot-register .auth-submit--register {
  margin-top: 0.85rem;
}

.auth-foot a {
  color: var(--auth-accent-2);
}

.auth-lang {
  display: flex;
  gap: 0.35rem;
  justify-content: flex-end;
  margin-bottom: 0.65rem;
}

.auth-lang button {
  border: 1px solid var(--auth-border);
  background: #0f1735;
  color: var(--auth-muted);
  border-radius: 8px;
  padding: 0.25rem 0.45rem;
  font-size: 0.75rem;
  cursor: pointer;
}

.auth-lang button[data-active="true"] {
  border-color: var(--auth-accent);
  color: var(--auth-accent-2);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
