/* ============================================================
   Ticket Go — login.css
   Split-screen auth page: brand panel + form panel
   ============================================================ */

.auth-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}

/* ============================================================
   LEFT — brand panel
   ============================================================ */
.auth-brand {
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, #6D28D9 0%, #0A0A0F 70%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 64px 56px;
  isolation: isolate;
}
.auth-brand .blob {
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.55;
  pointer-events: none;
}
.auth-brand .blob-1 {
  width: 420px; height: 420px;
  top: -120px; left: -90px;
  background: radial-gradient(circle, var(--purple-light), transparent 70%);
  animation: blobFloat1 16s ease-in-out infinite;
}
.auth-brand .blob-2 {
  width: 360px; height: 360px;
  bottom: -100px; right: -80px;
  background: radial-gradient(circle, var(--pink-concerts), transparent 70%);
  animation: blobFloat2 20s ease-in-out infinite;
}
@keyframes blobFloat1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, 50px) scale(1.12); }
}
@keyframes blobFloat2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-50px, -40px) scale(1.18); }
}

.auth-brand-inner { max-width: 420px; }
.auth-brand .brand-wordmark {
  font-family: 'Righteous', cursive;
  font-size: 4rem;
  line-height: 1;
  color: #fff;
  letter-spacing: 1px;
}
.auth-brand .brand-tagline {
  margin-top: 18px;
  font-size: 1.5rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.25;
}
.auth-trust {
  margin-top: 44px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.auth-trust li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  color: rgba(255,255,255,0.88);
  font-size: 1rem;
  font-weight: 500;
}
.auth-trust .check {
  flex-shrink: 0;
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(52,211,153,0.18);
  border: 1px solid rgba(52,211,153,0.45);
}
.auth-trust .check svg { width: 16px; height: 16px; stroke: var(--green-success); }

/* ============================================================
   RIGHT — form panel
   ============================================================ */
.auth-form-panel {
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px 32px;
}
.auth-card { width: 100%; max-width: 420px; }

.auth-mobile-brand {
  display: none;
  text-align: center;
  margin-bottom: 28px;
}
.auth-mobile-brand .wordmark { font-size: 2.4rem; }
.auth-mobile-brand p { color: var(--text-secondary); font-size: 0.95rem; margin-top: 4px; }

/* Tabs */
.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 5px;
  background: var(--bg-surface);
  border: 1px solid var(--border-low);
  border-radius: 14px;
  margin-bottom: 30px;
}
.auth-tab {
  padding: 11px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.92rem;
  border-radius: 10px;
  transition: background var(--ease), color var(--ease);
}
.auth-tab.active {
  background: linear-gradient(135deg, var(--purple-primary), var(--purple-light));
  color: #fff;
  box-shadow: 0 6px 18px -8px rgba(124,58,237,0.7);
}

.auth-heading { font-size: 1.55rem; margin-bottom: 6px; }
.auth-subheading { color: var(--text-secondary); font-size: 0.95rem; margin-bottom: 26px; }

/* Sub-toggle (magic link / password) */
.auth-subtoggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 5px;
  background: var(--bg-surface);
  border: 1px solid var(--border-low);
  border-radius: 999px;
  margin-bottom: 24px;
}
.subtoggle-opt {
  padding: 10px 8px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.85rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  transition: background var(--ease), color var(--ease);
}
.subtoggle-opt svg { width: 15px; height: 15px; stroke: currentColor; }
.subtoggle-opt.active {
  background: rgba(124,58,237,0.18);
  border: 1px solid rgba(139,92,246,0.4);
  color: var(--text-primary);
}
.subtoggle-opt .rec {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--green-success);
}
/* Magic Link todavía no está disponible: la etiqueta informa, no promociona. */
.subtoggle-opt .rec-soon {
  color: var(--text-muted);
  font-weight: 600;
}

/* Form fields */
.field { margin-bottom: 20px; }
.field label {
  display: block;
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin-bottom: 6px;
  font-weight: 500;
}
.field-input-wrap { position: relative; }
.field input {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border-mid);
  border-radius: 12px;
  padding: 14px 16px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color var(--ease), box-shadow var(--ease);
}
.field input::placeholder { color: var(--text-muted); }
.field input:focus {
  outline: none;
  border-color: var(--purple-light);
  box-shadow: 0 0 0 3px rgba(139,92,246,0.15);
}
.field input.has-error { border-color: #F87171; }
.field input.has-error:focus { box-shadow: 0 0 0 3px rgba(248,113,113,0.18); }

.pw-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 8px;
  display: grid;
  place-items: center;
  color: var(--text-muted);
  transition: color var(--ease);
}
.pw-toggle:hover { color: var(--text-secondary); }
.pw-toggle svg { width: 19px; height: 19px; stroke: currentColor; }
.field input[type="password"], .field input.has-toggle { padding-right: 46px; }

.field-error {
  display: none;
  color: #F87171;
  font-size: 0.78rem;
  margin-top: 6px;
}
.field-error.show { display: block; }

.field-hint { color: var(--text-muted); font-size: 0.82rem; margin-top: 10px; line-height: 1.5; }

.field-row {
  display: flex;
  justify-content: flex-end;
  margin-top: -8px;
  margin-bottom: 20px;
}
.link-muted {
  color: var(--text-secondary);
  font-size: 0.85rem;
  transition: color var(--ease);
}
.link-muted:hover { color: var(--purple-light); }

/* Checkbox */
.field-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 22px;
}
.field-check input {
  width: 18px; height: 18px;
  margin-top: 2px;
  accent-color: var(--purple-primary);
  flex-shrink: 0;
  cursor: pointer;
}
.field-check label { font-size: 0.85rem; color: var(--text-secondary); margin: 0; }
.field-check a { color: var(--purple-light); }
.field-check a:hover { text-decoration: underline; }

.form-foot { text-align: center; margin-top: 20px; color: var(--text-secondary); font-size: 0.9rem; }
.form-foot a { color: var(--purple-light); font-weight: 600; }
.form-foot a:hover { text-decoration: underline; }

/* Spinner */
.spinner {
  width: 18px; height: 18px;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Magic-link success state */
.magic-success {
  text-align: center;
  padding: 16px 0;
}
.magic-success .success-icon {
  width: 64px; height: 64px;
  margin: 0 auto 18px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(52,211,153,0.15);
  border: 1px solid rgba(52,211,153,0.45);
  animation: popIn 0.4s cubic-bezier(0.34,1.56,0.64,1);
}
.magic-success .success-icon svg { width: 30px; height: 30px; stroke: var(--green-success); }
@keyframes popIn { from { transform: scale(0.5); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.magic-success h3 { font-family: 'Poppins', sans-serif; font-weight: 600; font-size: 1.2rem; margin-bottom: 10px; }
.magic-success p { color: var(--text-secondary); font-size: 0.92rem; margin-bottom: 22px; }
.magic-success p strong { color: var(--text-primary); }

/* Pane visibility */
.tab-pane, .auth-mode { display: none; }
.tab-pane.active, .auth-mode.active { display: block; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1024px) {
  .auth-brand { padding: 48px 40px; }
  .auth-brand .brand-wordmark { font-size: 3.2rem; }
  .auth-brand .brand-tagline { font-size: 1.3rem; }
}
@media (max-width: 768px) {
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-brand { display: none; }
  .auth-mobile-brand { display: block; }
  .auth-form-panel { padding: 40px 22px; min-height: 100vh; }
}
@media (max-width: 375px) {
  .auth-form-panel { padding: 32px 16px; }
}
