/* ── AUTH PAGES ── */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  position: relative;
}

.auth-canvas {
  position: fixed; inset: 0; z-index: 0;
  pointer-events: none;
}

.auth-box {
  width: 100%; max-width: 420px;
  position: relative; z-index: 1;
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  animation: authBoxEntry 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}

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

.auth-box.page-exit {
  opacity: 0 !important;
  transform: translateY(-16px) scale(0.98) !important;
}

.auth-header {
  margin-bottom: 12px;
  text-align: center;
}

/* TOP BAR BACK BUTTON */
.auth-top-bar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 2px;
}

.auth-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  padding: 3px 10px;
  border-radius: var(--r-full);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  transition: all 0.2s ease;
}
.auth-back-btn:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateX(-2px);
}

/* BRAND LOGO SHOWCASE (CLEAN, BOLD & COMPACT) */
.auth-brand-showcase {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
  padding: 0;
}

.auth-brand-glow {
  display: none !important;
}

.auth-brand-logo {
  height: clamp(86px, 13vw, 110px);
  width: auto;
  max-width: min(380px, 94vw);
  object-fit: contain;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 4px 16px rgba(0, 0, 0, 0.85));
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), filter 0.25s ease;
}

.auth-brand-logo:hover {
  transform: scale(1.02);
  filter: drop-shadow(0 6px 20px rgba(0, 0, 0, 0.95));
}

.auth-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-display);
  font-size: 9px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-muted);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  padding: 3px 10px; border-radius: var(--r-full);
  margin-bottom: 6px;
}
.eyebrow-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: pulse-dot 2.5s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%,100% { opacity: 0.4; transform: scale(1); }
  50%      { opacity: 1;   transform: scale(1.3); }
}

.auth-title {
  font-family: var(--font-display);
  font-size: 24px; font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--white);
  margin-bottom: 3px;
}

.auth-subtitle {
  font-family: var(--font-body);
  font-size: 13px; color: var(--text-muted);
  line-height: 1.45;
}

/* AUTH CARD & LIGHT SWEEP */
.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 34px 32px;
  position: relative; overflow: hidden;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.02);
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.15s ease-out;
  transform-style: preserve-3d;
}
.auth-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.12) 30%, rgba(255,255,255,0.12) 70%, transparent);
}
.auth-card::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    60deg,
    transparent 45%,
    rgba(255, 255, 255, 0.02) 50%,
    transparent 55%
  );
  transform: rotate(25deg);
  animation: lightSweep 9s ease-in-out infinite;
  pointer-events: none;
}

@keyframes lightSweep {
  0%   { transform: translateY(-100%) rotate(25deg); }
  35%  { transform: translateY(100%) rotate(25deg); }
  100% { transform: translateY(100%) rotate(25deg); }
}

.auth-form { display: flex; flex-direction: column; gap: 18px; text-align: left; }

.auth-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
  margin: 4px 0;
}

.auth-footer {
  text-align: center;
  margin-top: 22px;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text-muted);
}
.auth-footer a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--t-fast);
}
.auth-footer a:hover { color: var(--text-primary); }

.auth-error-box {
  background: var(--error-bg);
  border: 1px solid rgba(220,100,100,0.15);
  border-radius: var(--r-sm);
  padding: 12px 16px;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--error);
  display: none;
  margin-bottom: 16px;
}
.auth-error-box.visible { display: block; }

.btn-loading {
  position: relative;
  pointer-events: none;
}
.btn-loading .btn-text { opacity: 0; }
.btn-loading::after {
  content: '';
  position: absolute;
  width: 16px; height: 16px;
  border: 2px solid rgba(0,0,0,0.2);
  border-top-color: var(--bg-base);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  top: 50%; left: 50%;
  transform: translate(-50%,-50%);
}

.password-field { position: relative; }
.password-toggle {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); padding: 4px;
  transition: color var(--t-fast);
}
.password-toggle:hover { color: var(--text-secondary); }

.strength-meter { margin-top: 6px; }
.strength-bar {
  height: 2px; background: var(--bg-elevated);
  border-radius: 2px; overflow: hidden;
}
.strength-fill {
  height: 100%; border-radius: 2px;
  transition: width 0.3s, background 0.3s;
  width: 0%;
}
.strength-label {
  font-family: var(--font-display);
  font-size: 9px; letter-spacing: 0.08em;
  color: var(--text-dim);
  margin-top: 4px;
  text-transform: uppercase;
  transition: color 0.3s;
}

/* Shake animation on error */
@keyframes authShake {
  0%, 100% { transform: translateX(0); }
  15%, 45%, 75% { transform: translateX(-8px); }
  30%, 60%, 90% { transform: translateX(8px); }
}

.auth-card.shake {
  animation: authShake 0.45s cubic-bezier(0.36, 0.07, 0.19, 0.97) both !important;
}

/* Caps Lock Warning Tooltip */
.caps-warning {
  display: none;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.28);
  border-radius: var(--r-sm);
  padding: 5px 10px;
  margin-top: 8px;
  font-family: var(--font-body);
}
.caps-warning.visible {
  display: inline-flex !important;
}

/* SUCCESS ANIMATION */
.btn.btn-success-state {
  background: #10b981 !important;
  color: #ffffff !important;
  border-color: #10b981 !important;
  box-shadow: 0 0 24px rgba(16, 185, 129, 0.45) !important;
  transition: all 0.25s ease !important;
}

@keyframes successCardPulse {
  0% {
    transform: scale(1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  }
  50% {
    transform: scale(1.015);
    border-color: rgba(16, 185, 129, 0.45);
    box-shadow: 0 0 35px rgba(16, 185, 129, 0.2), 0 20px 40px rgba(0, 0, 0, 0.5);
  }
  100% {
    transform: scale(1);
    border-color: rgba(16, 185, 129, 0.35);
    box-shadow: 0 0 30px rgba(16, 185, 129, 0.15), 0 20px 40px rgba(0, 0, 0, 0.4);
  }
}

.auth-card.login-success {
  animation: successCardPulse 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes checkPop {
  0%   { transform: scale(0) rotate(-45deg); opacity: 0; }
  70%  { transform: scale(1.2) rotate(0deg); opacity: 1; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

.check-pop-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  animation: checkPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}
