/* ══════════════════════════════════════════════════════════════════
   LUMORA AUTH DESIGN SYSTEM v2
   Complete redesign — aurora gradients, floating glass, bold accents.
   Shared by login, signup, recover, reset, temp pages.
   ══════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
  --auth-accent: #6366f1;
  --auth-accent2: #ec4899;
  --auth-accent3: #06b6d4;
  --auth-accent-rgb: 99, 102, 241;
  --auth-accent2-rgb: 236, 72, 153;
  --auth-accent3-rgb: 6, 182, 212;
  --auth-bg: #0a0a1a;
  --auth-card-bg: rgba(15, 15, 35, 0.55);
  --auth-text: #f1f5f9;
  --auth-muted: rgba(241, 245, 249, 0.5);
  --auth-border: rgba(255, 255, 255, 0.07);
  --auth-input-bg: rgba(255, 255, 255, 0.04);
  --auth-input-border: rgba(255, 255, 255, 0.08);
  --auth-input-focus: rgba(99, 102, 241, 0.7);
  font-size: 16px;
}

@media (max-width: 480px) {
  :root { font-size: 14px; }
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { height: 100%; overflow-x: hidden; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--auth-bg);
  color: var(--auth-text);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  flex-direction: column;
  padding: 1rem;
  padding-bottom: 4.5rem;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ─── Particle Canvas ────────────────────────────────────────── */
#authParticles {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.4;
}

/* ─── Aurora Background ──────────────────────────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 60% at 10% 90%, rgba(var(--auth-accent2-rgb), 0.12) 0%, transparent 60%),
    radial-gradient(ellipse 70% 70% at 90% 10%, rgba(var(--auth-accent-rgb), 0.1) 0%, transparent 55%),
    radial-gradient(ellipse 50% 80% at 50% 50%, rgba(var(--auth-accent3-rgb), 0.06) 0%, transparent 50%),
    radial-gradient(ellipse 60% 40% at 80% 70%, rgba(var(--auth-accent2-rgb), 0.07) 0%, transparent 60%);
  animation: auroraShift 12s ease-in-out infinite alternate;
}

@keyframes auroraShift {
  0%   { opacity: 0.7; filter: hue-rotate(0deg); }
  33%  { opacity: 1; filter: hue-rotate(10deg); }
  66%  { opacity: 0.8; filter: hue-rotate(-5deg); }
  100% { opacity: 0.9; filter: hue-rotate(5deg); }
}

/* ─── Subtle Noise Texture ───────────────────────────────────── */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}

/* ─── Back Button ───────────────────────────────────────────── */
.auth-back {
  position: fixed;
  top: 1.5rem;
  left: 1.5rem;
  z-index: 100;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  color: rgba(255, 255, 255, 0.4);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  cursor: pointer;
  animation: authFadeUp 0.5s 0.1s both;
}

.auth-back:hover {
  background: rgba(var(--auth-accent-rgb), 0.1);
  border-color: rgba(var(--auth-accent-rgb), 0.25);
  color: #fff;
  transform: translateX(-2px);
}

.auth-back:active {
  transform: scale(0.9);
}

.auth-back svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ─── Main Auth Card ─────────────────────────────────────────── */
.auth-card,
.loginStage {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  min-width: 290px;
  padding: 2.5rem 2rem;
  background: var(--auth-card-bg);
  backdrop-filter: blur(32px) saturate(1.4);
  -webkit-backdrop-filter: blur(32px) saturate(1.4);
  border: 1px solid var(--auth-border);
  border-radius: 28px;
  box-shadow:
    0 32px 64px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.02),
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    inset 0 -1px 0 rgba(0, 0, 0, 0.15);
  animation: authCardIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
  text-align: center;
  overflow: hidden;
}

/* Gradient border glow */
.auth-card::before,
.loginStage::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 28px;
  padding: 1.5px;
  background: linear-gradient(
    160deg,
    rgba(var(--auth-accent-rgb), 0.35),
    rgba(var(--auth-accent3-rgb), 0.15) 30%,
    transparent 50%,
    rgba(var(--auth-accent2-rgb), 0.12) 70%,
    rgba(var(--auth-accent-rgb), 0.2)
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  animation: borderGlow 6s ease-in-out infinite alternate;
}

@keyframes borderGlow {
  0%   { opacity: 0.6; }
  50%  { opacity: 1; }
  100% { opacity: 0.7; }
}

/* Inner shine */
.auth-card::after,
.loginStage::after {
  content: '';
  position: absolute;
  top: 0;
  left: -50%;
  width: 200%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08) 50%, transparent);
  pointer-events: none;
}

@keyframes authCardIn {
  from {
    opacity: 0;
    transform: translateY(28px) scale(0.96);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0px);
  }
}

/* ─── Card Title ─────────────────────────────────────────────── */
.auth-card h2,
.loginStage h2 {
  font-size: clamp(1.15rem, 3.5vw, 1.45rem);
  font-weight: 700;
  color: #fff;
  margin-bottom: 1.75rem;
  letter-spacing: -0.025em;
  animation: authFadeUp 0.5s 0.2s both;
}

.auth-card h2 .accent {
  background: linear-gradient(135deg, var(--auth-accent), var(--auth-accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-card h2 .emoji,
.loginStage h2 .emoji {
  font-style: normal;
  -webkit-text-fill-color: initial;
}

/* ─── Step transition wrapper ───────────────────────────────── */
.auth-step {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.auth-step:not(.hidden) {
  opacity: 1;
  transform: translateY(0);
}

.auth-step.hidden {
  display: none !important;
}

/* ─── Inputs ─────────────────────────────────────────────────── */
.inputWrap {
  display: flex;
  align-items: center;
  width: 100%;
  margin-bottom: 1.15rem;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="date"],
input[type="tel"],
#verifyStage input,
select {
  width: 100%;
  padding: 0.85rem 1rem;
  background: var(--auth-input-bg);
  color: #e2e8f0;
  border: 1px solid var(--auth-input-border);
  border-radius: 12px;
  font-size: clamp(0.875rem, 1vw + 0.4rem, 0.95rem);
  font-family: inherit;
  outline: none;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  -webkit-appearance: none;
}

input::placeholder {
  color: rgba(255, 255, 255, 0.2);
  transition: color 0.2s ease;
}

input:focus,
select:focus {
  border-color: var(--auth-input-focus);
  box-shadow:
    0 0 0 3px rgba(var(--auth-accent-rgb), 0.1),
    0 4px 16px rgba(var(--auth-accent-rgb), 0.08);
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-1px);
}

input:focus::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

/* OTP / verification code inputs */
input[type="text"]#verifyCode,
input[type="text"]#resetCode,
input[type="text"]#disableCode,
input[type="text"]#recoveryCode {
  text-align: left;
  font-size: inherit;
  letter-spacing: normal;
  font-weight: 400;
  font-family: inherit;
  text-transform: none;
  padding-left: 1rem;
}

input[type="text"]#verifyCode::placeholder,
input[type="text"]#resetCode::placeholder,
input[type="text"]#disableCode::placeholder,
input[type="text"]#recoveryCode::placeholder {
  font-family: inherit;
  font-size: inherit;
  letter-spacing: normal;
  text-transform: none;
  font-weight: 400;
}

/* Verify stage sub-text and resend link */
.verify-sub {
  font-size: clamp(0.85rem, 2vw, 0.95rem);
  color: var(--auth-muted);
  margin-bottom: 1.25rem;
  line-height: 1.5;
}

.verify-resend {
  margin-top: 1.25rem;
  text-align: center;
}

.verify-resend a {
  color: rgba(var(--auth-accent-rgb), 0.75);
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
}

.verify-resend a:hover {
  color: rgba(var(--auth-accent-rgb), 1);
  text-decoration: underline;
}

.errorMsg {
  font-size: clamp(0.85rem, 2vw, 0.95rem);
  color: var(--auth-muted);
  margin-bottom: 1.25rem;
  line-height: 1.5;
  text-align: center;
}

select {
  appearance: none;
  background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 4 5"><path fill="%2394a3b8" d="M2 0L0 2h4z"/></svg>');
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 10px;
  padding-right: 2.5rem;
  cursor: pointer;
}

select option {
  background: var(--auth-bg);
  color: #e2e8f0;
}

/* ─── Password Box ───────────────────────────────────────────── */
.passwordBox {
  position: relative;
  width: 100%;
  flex: 1;
}

.passwordBox input {
  width: 100%;
  padding-right: 2.75rem;
}

.toggleShow {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: rgba(255, 255, 255, 0.25);
  font-size: 1rem;
  transition: all 0.25s ease;
  user-select: none;
}

.toggleShow:hover {
  color: rgba(var(--auth-accent-rgb), 0.8);
  transform: translateY(-50%) scale(1.1);
}

/* ─── Primary Button ─────────────────────────────────────────── */
.btnAction {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  background: linear-gradient(135deg, var(--auth-accent), var(--auth-accent2));
  color: #fff;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  font-weight: 600;
  font-size: clamp(0.875rem, 1vw + 0.3rem, 0.95rem);
  font-family: inherit;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  width: 100%;
  max-width: 200px;
  margin: 0 auto;
  display: block;
  box-shadow:
    0 4px 20px rgba(var(--auth-accent-rgb), 0.3),
    0 1px 3px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  overflow: hidden;
  letter-spacing: 0.01em;
}

.btnAction::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 25%, rgba(255, 255, 255, 0.15) 50%, transparent 75%);
  transform: translateX(-100%);
  transition: transform 0.5s ease;
}

.btnAction:hover::before {
  transform: translateX(100%);
}

.btnAction:hover {
  filter: brightness(1.12);
  box-shadow:
    0 8px 32px rgba(var(--auth-accent-rgb), 0.4),
    0 2px 8px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.btnAction:active {
  transform: translateY(0) scale(0.97);
  filter: brightness(0.95);
}

.btnAction:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: 0 2px 8px rgba(var(--auth-accent-rgb), 0.15) !important;
  filter: none !important;
}

/* ─── Forgot password link ──────────────────────────────────── */
.forgot-link {
  display: block;
  text-align: center;
  color: rgba(var(--auth-accent-rgb), 0.65);
  font-size: 0.85rem;
  text-decoration: none;
  margin-bottom: 1rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.forgot-link:hover {
  color: rgba(var(--auth-accent-rgb), 1);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ─── Flash Popup ────────────────────────────────────────────── */
.flash {
  position: fixed;
  top: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.7rem 1.5rem;
  border-radius: 16px;
  font-size: 0.85rem;
  font-weight: 500;
  z-index: 1000;
  background: rgba(15, 15, 35, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.03);
  white-space: nowrap;
  animation: flashIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes flashIn {
  from { opacity: 0; transform: translateX(-50%) translateY(-12px) scale(0.95); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}

.flash.hidden { display: none; }

.flash.success {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.3);
  color: #6ee7b7;
  box-shadow: 0 12px 40px rgba(16, 185, 129, 0.1), 0 0 0 1px rgba(16, 185, 129, 0.08);
}

.flash.error {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.25);
  color: #fca5a5;
  box-shadow: 0 12px 40px rgba(239, 68, 68, 0.08), 0 0 0 1px rgba(239, 68, 68, 0.06);
}

/* ─── Offline status bar ─────────────────────────────────────── */
.net-status {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(220, 38, 38, 0.85);
  backdrop-filter: blur(12px);
  color: #fff;
  text-align: center;
  padding: 0.5rem;
  font-size: 0.8rem;
  font-weight: 500;
  z-index: 9999;
  letter-spacing: 0.02em;
}

.net-status.hidden { display: none; }

/* ─── Auth Tagline (bottom) ─────────────────────────────────── */
.auth-tagline {
  position: fixed;
  bottom: 1rem;
  left: 0;
  right: 0;
  margin: 0 auto;
  width: calc(100% - 2rem);
  max-width: 420px;
  z-index: 100;
  padding: 0.85rem 1.25rem;
  background: rgba(15, 15, 35, 0.45);
  backdrop-filter: blur(20px) saturate(1.3);
  -webkit-backdrop-filter: blur(20px) saturate(1.3);
  border: 1px solid rgba(var(--auth-accent-rgb), 0.08);
  border-radius: 16px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0.6rem;
  text-align: center;
  animation: authFadeUp 0.6s 0.5s both;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.auth-tagline-icon {
  font-size: 0.9rem;
  flex-shrink: 0;
  line-height: 1.55;
  opacity: 0.6;
}

.auth-tagline-text {
  font-size: 0.8rem;
  color: var(--auth-muted);
  line-height: 1.6;
}

.auth-tagline-text a {
  color: rgba(var(--auth-accent-rgb), 0.75);
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

.auth-tagline-text a:hover {
  color: rgba(var(--auth-accent-rgb), 1);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ─── Verify Popup ───────────────────────────────────────────── */
.popupMessage {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  padding: 2rem;
  background: var(--auth-card-bg);
  backdrop-filter: blur(32px) saturate(1.4);
  -webkit-backdrop-filter: blur(32px) saturate(1.4);
  border-radius: 28px;
  border: 1px solid var(--auth-border);
  box-shadow:
    0 32px 64px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.02);
  text-align: center;
  animation: authCardIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.popupMessage.hidden { display: none !important; }

.popupMessage p {
  color: var(--auth-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ─── Loader Overlay ─────────────────────────────────────────── */
.lumora-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--auth-bg);
  flex-direction: column;
}

.lumora-loader.hidden { display: none; }

.loader-ring {
  text-align: center;
  position: relative;
  animation: authFadeIn 1.5s ease forwards;
}

.logo {
  font-size: 4rem;
  animation: authPulse 2.5s infinite ease-in-out;
  filter: drop-shadow(0 0 20px rgba(var(--auth-accent-rgb), 0.4));
}

.loader-text {
  color: rgba(var(--auth-accent-rgb), 0.7);
  font-size: 1rem;
  margin-top: 1.25rem;
  font-family: inherit;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.glow {
  position: absolute;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--auth-accent-rgb), 0.2) 10%, transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 60px rgba(var(--auth-accent-rgb), 0.2);
  animation: authRotateGlow 10s linear infinite;
}

@keyframes authPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.12); opacity: 0.8; }
}

@keyframes authFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes authRotateGlow {
  0%   { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ─── Small spinner ─────────────────────────────────────────── */
.loader {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 3px solid rgba(var(--auth-accent-rgb), 0.12);
  border-top-color: var(--auth-accent);
  animation: authSpin 0.7s linear infinite;
  margin: 0 auto 1rem;
}

@keyframes authSpin { to { transform: rotate(360deg); } }

.loadingMsg {
  color: var(--auth-muted);
  font-size: 0.85rem;
  text-align: center;
}

.errorMsg {
  color: #fca5a5;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

/* ─── Welcome Modal (signup) ─────────────────────────────────── */
.welcomeModal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(5, 5, 15, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.welcomeModal.hidden { display: none; }

.welcomeBox {
  background: rgba(15, 15, 35, 0.9);
  backdrop-filter: blur(32px) saturate(1.4);
  color: #e2e8f0;
  border-radius: 28px;
  border: 1px solid rgba(var(--auth-accent-rgb), 0.12);
  padding: 2.5rem 2rem;
  text-align: center;
  width: 90%;
  max-width: 400px;
  box-shadow:
    0 32px 80px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(255, 255, 255, 0.02),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  animation: authCardIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
  position: relative;
}

.welcomeBox::before {
  content: '';
  position: absolute;
  top: 0;
  left: -50%;
  width: 200%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(var(--auth-accent-rgb), 0.2), transparent);
  pointer-events: none;
}

.welcomeBox h2 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  color: #fff;
  background: linear-gradient(135deg, #fff, var(--auth-accent), var(--auth-accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
}

.welcomeBox p {
  font-size: 0.9rem;
  color: var(--auth-muted);
  line-height: 1.75;
  margin-bottom: 1.5rem;
}

.btnStart {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, var(--auth-accent), var(--auth-accent2));
  color: #fff;
  border: none;
  border-radius: 14px;
  padding: 0.85rem 2rem;
  font-size: 0.95rem;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  box-shadow:
    0 4px 20px rgba(var(--auth-accent-rgb), 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
}

.btnStart::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 25%, rgba(255, 255, 255, 0.15) 50%, transparent 75%);
  transform: translateX(-100%);
  transition: transform 0.5s ease;
}

.btnStart:hover::before {
  transform: translateX(100%);
}

.btnStart:hover {
  filter: brightness(1.12);
  transform: translateY(-2px);
  box-shadow:
    0 8px 32px rgba(var(--auth-accent-rgb), 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btnStart:active {
  transform: translateY(0) scale(0.97);
}

/* ─── Verify Stage ───────────────────────────────────────────── */
#verifyStage {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.5rem 0;
}

#verifyStage h2 {
  font-size: 1.3rem;
  color: #fff;
  margin-bottom: 0.6rem;
  text-align: center;
}

#verifyStage p {
  font-size: 0.9rem;
  color: var(--auth-muted);
  margin-bottom: 1.5rem;
  text-align: center;
  max-width: 300px;
  line-height: 1.6;
}

#verifyStage button.btnAction {
  margin-top: 0.75rem;
}

#verifyEmail:disabled {
  background: rgba(255, 255, 255, 0.02);
  color: rgba(255, 255, 255, 0.2);
  cursor: not-allowed;
}

/* ─── Resend code ────────────────────────────────────────────── */
#resendCodeBtn {
  color: rgba(var(--auth-accent-rgb), 0.7);
  font-size: 0.85rem;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
}

#resendCodeBtn:hover {
  color: rgba(var(--auth-accent-rgb), 1);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ─── Animations ────────────────────────────────────────────── */
@keyframes authFadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ─── h2.create (signup heading) ─────────────────────────────── */
h2.create {
  font-size: 1.2rem;
  color: #fff;
  margin-bottom: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* ─── Utility ────────────────────────────────────────────────── */
.hidden { display: none !important; }

/* ─── Responsive ────────────────────────────────────────────── */
@media (max-width: 480px) {
  html, body { height: auto; min-height: 100vh; overflow-x: hidden; }
  body {
    padding: 0.75rem;
    padding-top: 3.5rem;
    padding-bottom: 1.5rem;
  }

  .auth-back {
    top: 1rem;
    left: 1rem;
    width: 40px;
    height: 40px;
    border-radius: 12px;
  }

  .auth-card,
  .loginStage {
    padding: 2rem 1.5rem;
    border-radius: 22px;
    min-height: 260px;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .welcomeBox {
    padding: 1.75rem 1.25rem;
    border-radius: 22px;
  }

  .welcomeBox h2 {
    font-size: 1.25rem;
  }

  .auth-tagline {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    margin: 0;
    width: 100%;
    max-width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 16px 16px 0 0;
    text-align: center;
    justify-content: center;
    z-index: 100;
  }

  .flash {
    font-size: 0.8rem;
    padding: 0.6rem 1.25rem;
    border-radius: 14px;
  }
}

@media (max-width: 360px) {
  .auth-card,
  .loginStage {
    padding: 1.5rem 1rem;
    border-radius: 18px;
    min-width: auto;
  }

  .auth-card h2,
  .loginStage h2 {
    font-size: 1.1rem;
  }

  .btnAction {
    padding: 0.8rem 1.25rem;
    max-width: 160px;
  }
}

/* ─── Scrollbar ─────────────────────────────────────────────── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(var(--auth-accent-rgb), 0.15);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(var(--auth-accent-rgb), 0.35);
}
::selection {
  background: rgba(var(--auth-accent-rgb), 0.3);
  color: white;
}

/* ─── Device Limit Step ─────────────────────────────────────── */
.device-limit-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  transition: background 0.2s ease;
}
.device-limit-item:hover {
  background: rgba(255,255,255,0.07);
}
.device-limit-info {
  flex: 1;
  min-width: 0;
}
.device-limit-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: #e2e8f0;
  margin-bottom: 0.15rem;
}
.device-limit-meta {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.45);
}
.device-limit-logout {
  flex-shrink: 0;
  padding: 0.3rem 0.6rem;
  background: rgba(239,68,68,0.15);
  border: 1px solid rgba(239,68,68,0.3);
  border-radius: 6px;
  color: #ef4444;
  font-size: 0.7rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}
.device-limit-logout:hover:not(:disabled) {
  background: rgba(239,68,68,0.25);
}
.device-limit-logout:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
