/* ===== PulseScreen auth pages (login / register / forgot) ===== */

.auth-body {
  min-height: 100vh;
  overflow-y: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  background:
    radial-gradient(ellipse 1200px 600px at 50% -20%, rgba(34,211,163,0.10), transparent 70%),
    radial-gradient(ellipse 800px 600px at 100% 100%, rgba(110,168,255,0.08), transparent 60%),
    #05060a;
}

#bg-grid {
  position: fixed; inset: 0;
  pointer-events: none; z-index: 0;
  background-image:
    linear-gradient(rgba(120,140,200,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120,140,200,0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
  opacity: 0.7;
}

.auth-shell {
  position: relative; z-index: 2;
  width: 100%; max-width: 460px;
  display: flex; flex-direction: column;
  gap: 28px;
}

/* ---- Brand ---- */
.auth-brand {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none;
  color: inherit;
  justify-content: center;
  animation: fade-in 420ms ease-out;
}
.auth-logo-mark {
  width: 42px; height: 42px;
  border-radius: 11px;
  background:
    radial-gradient(circle at 30% 30%, rgba(34,211,163,0.1), transparent 70%),
    radial-gradient(circle at 70% 70%, rgba(110,168,255,0.07), transparent 70%),
    linear-gradient(180deg, #0c1324, #05060a);
  border: 1px solid rgba(34,211,163,0.45);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 26px rgba(34,211,163,0.3), inset 0 0 12px rgba(34,211,163,0.18);
  position: relative;
  overflow: hidden;
  animation: auth-logo-breath 3.6s ease-in-out infinite;
}
@keyframes auth-logo-breath {
  0%, 100% { box-shadow: 0 0 22px rgba(34,211,163,0.24), inset 0 0 10px rgba(34,211,163,0.14); }
  50%      { box-shadow: 0 0 34px rgba(34,211,163,0.44), inset 0 0 14px rgba(34,211,163,0.22); }
}
.auth-logo-mark svg { position: relative; z-index: 2; }
.auth-logo-dot {
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--up);
  box-shadow: 0 0 12px var(--up-glow);
  animation: pulse-live 1.6s ease-in-out infinite;
}
.auth-brand-name {
  font-size: 18px; font-weight: 800;
  letter-spacing: 0.3em;
  color: var(--text);
}
.auth-brand-accent { color: var(--up); }
.auth-brand-sub {
  font-size: 9px; letter-spacing: 0.3em;
  color: var(--text-mute);
  margin-top: 3px;
}

/* ---- Card ---- */
.auth-card {
  background: linear-gradient(180deg, rgba(20,26,40,0.92), rgba(12,16,26,0.94));
  backdrop-filter: blur(16px);
  border: 1px solid rgba(110,168,255,0.16);
  border-radius: 14px;
  padding: 32px 32px 28px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.55);
  position: relative;
  overflow: hidden;
  animation: card-enter 380ms cubic-bezier(0.2, 0.9, 0.3, 1);
}
.auth-card::before {
  content: "";
  position: absolute; top: 0; left: 24px; right: 24px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(34,211,163,0.5), transparent);
}
.auth-close {
  position: absolute;
  top: 12px; right: 12px;
  width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 600;
  line-height: 1;
  color: var(--text-dim);
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(120,140,200,0.14);
  border-radius: 50%;
  text-decoration: none;
  cursor: pointer;
  transition: all 180ms ease;
  z-index: 5;
}
.auth-close:hover {
  color: var(--down);
  background: rgba(255,77,109,0.12);
  border-color: rgba(255,77,109,0.4);
  transform: rotate(90deg);
}

/* ---- Stepper ---- */
.auth-stepper {
  display: flex; justify-content: space-between; gap: 8px;
  margin-bottom: 20px;
  padding-bottom: 18px;
  border-bottom: 1px dashed rgba(120,140,200,0.12);
}
.auth-stepper .step {
  display: flex; align-items: center; gap: 6px;
  font-size: 9.5px; letter-spacing: 0.18em; font-weight: 700;
  color: var(--text-mute);
  transition: color 220ms ease;
}
.auth-stepper .step span {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--panel-edge);
  font-family: var(--ff-mono); font-size: 10px;
  transition: all 240ms ease;
}
.auth-stepper .step.active {
  color: var(--up);
}
.auth-stepper .step.active span {
  background: var(--up-soft);
  border-color: rgba(34,211,163,0.4);
  color: var(--up);
  box-shadow: 0 0 10px rgba(34,211,163,0.2);
}
.auth-stepper .step.done span {
  background: var(--up);
  color: #05060a;
  border-color: var(--up);
}

/* ---- Card head ---- */
.auth-card-head { margin-bottom: 20px; text-align: center; }
.auth-card-title {
  font-size: 20px; font-weight: 700; color: var(--text);
  letter-spacing: -0.01em;
}
.auth-card-sub {
  font-size: 12px; color: var(--text-dim);
  margin-top: 4px; line-height: 1.5;
}
.auth-card-sub b { color: var(--text); }

/* ---- Form ---- */
.auth-form {
  display: flex; flex-direction: column; gap: 16px;
  animation: fade-in 320ms ease-out;
}
.auth-field { display: flex; flex-direction: column; gap: 6px; }
.auth-label {
  font-size: 9.5px; letter-spacing: 0.22em; font-weight: 700;
  color: var(--text-mute);
  display: flex; justify-content: space-between; align-items: baseline;
}
.auth-hint {
  font-size: 9px; letter-spacing: 0.08em;
  color: var(--text-mute); font-weight: 400; text-transform: none;
}
.auth-hint code {
  background: rgba(34,211,163,0.12); padding: 1px 6px; border-radius: 3px;
  color: var(--up); font-weight: 700;
}

.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="tel"],
.auth-form input[type="password"] {
  padding: 13px 14px;
  border-radius: 8px;
  background: rgba(10, 14, 24, 0.85);
  border: 1px solid rgba(110,168,255,0.12);
  color: var(--text);
  font-family: var(--ff-ui);
  font-size: 14px;
  outline: none;
  transition: all 180ms cubic-bezier(0.2, 0.9, 0.3, 1);
  width: 100%;
}
.auth-form input:hover { border-color: rgba(110,168,255,0.28); }
.auth-form input:focus {
  border-color: rgba(34, 211, 163, 0.55);
  box-shadow: 0 0 0 3px rgba(34,211,163,0.12);
  background: rgba(10,14,24,0.95);
}

/* ---- Password w/ eye toggle ---- */
.auth-password { position: relative; }
.auth-eye {
  position: absolute; right: 6px; top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-mute);
  width: 32px; height: 32px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: color 140ms;
}
.auth-eye:hover { color: var(--text); }

/* ---- Password strength ---- */
.auth-strength {
  display: flex; align-items: center; gap: 8px;
  margin-top: 4px;
  font-size: 10px; letter-spacing: 0.14em;
}
.auth-strength-bar {
  flex: 1; height: 4px;
  background: rgba(255,255,255,0.05);
  border-radius: 2px;
  overflow: hidden;
}
.auth-strength-bar span {
  display: block; height: 100%;
  width: 0%;
  background: var(--down);
  transition: all 280ms ease;
}
.auth-strength-bar span.strength-1 { width: 25%; background: var(--down); }
.auth-strength-bar span.strength-2 { width: 50%; background: var(--neutral); }
.auth-strength-bar span.strength-3 { width: 75%; background: #8dd76e; }
.auth-strength-bar span.strength-4 { width: 100%; background: var(--up); }
.auth-strength-label { color: var(--text-mute); min-width: 60px; text-align: right; }

/* ---- OTP digit grid ---- */
.otp-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  max-width: 360px;
  margin: 8px auto 4px;
}
.otp-digit {
  width: 100% !important;
  aspect-ratio: 1 / 1.1;
  text-align: center;
  font-family: var(--ff-mono) !important;
  font-size: 22px !important;
  font-weight: 700 !important;
  letter-spacing: 0 !important;
  padding: 0 !important;
  background: rgba(10,14,24,0.85);
  border: 1px solid rgba(110,168,255,0.18);
  border-radius: 9px;
  color: var(--text);
  transition: all 200ms ease;
}
.otp-digit:focus {
  border-color: var(--up);
  box-shadow: 0 0 0 3px rgba(34,211,163,0.18);
  transform: translateY(-1px);
}
.otp-digit.filled {
  background: rgba(34,211,163,0.06);
  border-color: rgba(34,211,163,0.35);
}

/* ---- Submit button ---- */
.auth-submit {
  margin-top: 4px;
  padding: 14px 18px;
  border-radius: 9px;
  background: linear-gradient(180deg, rgba(34,211,163,0.2), rgba(34,211,163,0.12));
  border: 1px solid rgba(34,211,163,0.4);
  color: var(--up);
  font-family: var(--ff-ui);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.26em;
  cursor: pointer;
  transition: all 200ms cubic-bezier(0.2, 0.9, 0.3, 1);
  position: relative;
  overflow: hidden;
  text-transform: uppercase;
}
.auth-submit:hover {
  background: linear-gradient(180deg, rgba(34,211,163,0.3), rgba(34,211,163,0.18));
  box-shadow: 0 0 30px rgba(34,211,163,0.28);
  transform: translateY(-1px);
}
.auth-submit:active { transform: translateY(0); }
.auth-submit:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }
.auth-submit.loading .submit-text { opacity: 0; }
.auth-submit.loading .submit-loader {
  opacity: 1;
}
.submit-loader {
  position: absolute;
  top: 50%; left: 50%;
  width: 18px; height: 18px;
  margin: -9px 0 0 -9px;
  border: 2px solid rgba(34,211,163,0.3);
  border-top-color: var(--up);
  border-radius: 50%;
  opacity: 0;
  animation: spin 700ms linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Row between ---- */
.auth-row-between {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 11px;
  color: var(--text-dim);
  margin: -4px 0 0;
}
.auth-checkbox {
  display: flex; align-items: center; gap: 6px;
  cursor: pointer; user-select: none;
}
.auth-checkbox input {
  width: 14px; height: 14px;
  accent-color: var(--up);
}
.auth-link {
  color: var(--accent);
  text-decoration: none;
  font-size: 11px;
  letter-spacing: 0.06em;
  transition: color 160ms;
  background: none; border: none; padding: 0; cursor: pointer;
  font-family: var(--ff-ui);
}
.auth-link:hover { color: var(--up); }
.auth-countdown { font-size: 11px; color: var(--text-mute); }

/* ---- Error / success toasts ---- */
.auth-error {
  padding: 10px 14px;
  border-radius: 7px;
  background: rgba(255,77,109,0.08);
  border: 1px solid rgba(255,77,109,0.28);
  color: var(--down);
  font-size: 12px;
  letter-spacing: 0.02em;
  animation: shake 420ms cubic-bezier(0.36, 0.07, 0.19, 0.97);
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-4px); }
  20%, 40%, 60%, 80% { transform: translateX(4px); }
}
.auth-success {
  padding: 10px 14px;
  border-radius: 7px;
  background: rgba(34,211,163,0.08);
  border: 1px solid rgba(34,211,163,0.28);
  color: var(--up);
  font-size: 12px;
}

/* ---- Divider + alt button ---- */
.auth-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 28px 0 16px;
  color: var(--text-mute);
  font-size: 10px;
  letter-spacing: 0.24em;
}
.auth-divider::before, .auth-divider::after {
  content: "";
  flex: 1; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(120,140,200,0.15), transparent);
}
.auth-alt-btn {
  display: block;
  text-align: center;
  padding: 12px 18px;
  border-radius: 9px;
  background: rgba(110,168,255,0.06);
  border: 1px solid rgba(110,168,255,0.24);
  color: var(--accent);
  text-decoration: none;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.24em;
  transition: all 180ms ease;
}
.auth-alt-btn:hover {
  background: rgba(110,168,255,0.15);
  box-shadow: 0 0 22px rgba(110,168,255,0.22);
  transform: translateY(-1px);
}

/* ---- Footer ---- */
.auth-footer {
  text-align: center;
  font-size: 9px;
  letter-spacing: 0.22em;
  color: var(--text-mute);
  line-height: 1.8;
}
.auth-footer-sub { font-size: 8.5px; opacity: 0.75; }
.auth-footer-sub b {
  color: var(--up);
  letter-spacing: 0.24em;
  padding: 2px 7px;
  border-radius: 3px;
  background: rgba(34,211,163,0.08);
  border: 1px solid rgba(34,211,163,0.18);
  font-size: 9px;
  margin-left: 4px;
}

/* ---- Step transitions ---- */
.auth-step { animation: card-enter 360ms cubic-bezier(0.2, 0.9, 0.3, 1); }

@media (max-width: 540px) {
  .auth-card { padding: 24px 20px 20px; }
  .auth-card-title { font-size: 18px; }
  .otp-digit { font-size: 18px !important; }
  .auth-stepper .step b { display: none; }
}
