/* =========================================================
   Typing Speed - Enterprise Auth Design System
   Dedicated Stylesheet for Login, Signup & Auth Modal
   Fixed: Zero-Collision Layout, High-DPI SVGs, Proper Spacing
   ========================================================= */

/* --- Split Layout Container --- */
.auth-split-wrapper {
  min-height: 100vh;
  display: flex;
  background: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-body);
  position: relative;
  overflow: hidden; /* Prevent glow orb scrollbars */
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

/* Ambient Glowing Background Elements */
.auth-ambient-glow {
  position: absolute;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.4;
  z-index: 0;
  transition: opacity var(--transition-normal);
}

[data-theme="dark"] .auth-ambient-glow {
  opacity: 0.22;
}

.auth-ambient-glow-1 {
  top: -80px;
  left: -60px;
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.4) 0%, transparent 70%);
}

.auth-ambient-glow-2 {
  bottom: -80px;
  right: -80px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.35) 0%, transparent 70%);
}

/* --- Left Showcase Panel (Desktop) --- */
.auth-showcase-panel {
  flex: 1.1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 2.5rem 3.25rem;
  position: relative;
  background: radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.08) 0%, transparent 45%),
              radial-gradient(circle at 90% 80%, rgba(168, 85, 247, 0.08) 0%, transparent 45%),
              var(--bg-surface-elevated);
  border-right: 1px solid var(--border-subtle);
  overflow-y: auto;
  z-index: 1;
}

[data-theme="dark"] .auth-showcase-panel {
  background: radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
              radial-gradient(circle at 90% 80%, rgba(168, 85, 247, 0.12) 0%, transparent 50%),
              #0e1424;
}

.auth-showcase-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.auth-showcase-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none !important;
  color: var(--text-main);
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: -0.02em;
}

.auth-showcase-brand-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.35);
  flex-shrink: 0;
}

.auth-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary);
  border: 1px solid rgba(99, 102, 241, 0.2);
}

[data-theme="dark"] .auth-badge-pill {
  background: rgba(99, 102, 241, 0.18);
  color: #a5b4fc;
  border-color: rgba(99, 102, 241, 0.35);
}

/* Showcase Hero Copy */
.auth-showcase-hero {
  margin: 1.75rem 0 1.5rem 0;
  max-width: 520px;
}

.auth-showcase-hero h1 {
  font-family: var(--font-heading);
  font-size: 2.35rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.025em;
  color: var(--text-main);
  margin-bottom: 0.75rem;
}

.auth-showcase-hero h1 .text-gradient {
  background: linear-gradient(135deg, #6366f1 0%, #a855f7 60%, #ec4899 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.auth-showcase-hero p {
  font-size: 0.98rem;
  line-height: 1.55;
  color: var(--text-muted);
}

/* --- Showcase Interactive Typing Card --- */
.auth-typing-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 1.4rem;
  box-shadow: var(--shadow-md), 0 0 0 1px rgba(99, 102, 241, 0.08);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

[data-theme="dark"] .auth-typing-card {
  background: rgba(19, 26, 44, 0.85);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(99, 102, 241, 0.2);
}

.auth-typing-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
}

.auth-typing-card-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.auth-typing-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #06b6d4, #3b82f6);
  color: #fff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}

.auth-typing-user-info strong {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
}

.auth-typing-user-info span {
  font-size: 0.74rem;
  color: var(--text-muted);
}

.auth-live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent-emerald);
  background: rgba(16, 185, 129, 0.12);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
}

.auth-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 8px var(--accent-emerald);
  animation: pulse-dot 1.8s infinite;
}

@keyframes pulse-dot {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

/* Typing Stats Row */
.auth-typing-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.auth-stat-box {
  background: var(--bg-surface-subtle);
  border-radius: var(--radius-md);
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--border-subtle);
}

[data-theme="dark"] .auth-stat-box {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.06);
}

.auth-stat-box-val {
  font-family: var(--font-mono);
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1;
  color: var(--text-main);
}

.auth-stat-box-val.text-primary {
  color: var(--primary);
}

.auth-stat-box-val.text-emerald {
  color: var(--accent-emerald);
}

.auth-stat-box-val.text-amber {
  color: var(--accent-amber);
}

.auth-stat-box-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Snippet Simulator */
.auth-typing-snippet {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  line-height: 1.6;
  padding: 0.85rem 1rem;
  background: var(--bg-main);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  user-select: none;
}

[data-theme="dark"] .auth-typing-snippet {
  background: #090d16;
  border-color: rgba(255, 255, 255, 0.06);
}

.snippet-correct {
  color: var(--accent-emerald);
}

.snippet-current {
  color: var(--primary);
  position: relative;
  font-weight: 700;
}

.snippet-caret {
  display: inline-block;
  width: 2px;
  height: 1.15em;
  background: var(--primary);
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: blink-caret 1s infinite;
}

@keyframes blink-caret {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.snippet-pending {
  color: var(--text-subtle);
  opacity: 0.7;
}

/* Trust Badges / Social Proof */
.auth-showcase-footer {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.auth-avatar-stack {
  display: flex;
  align-items: center;
}

.auth-stack-img {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid var(--bg-surface-elevated);
  margin-left: -8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff;
}

.auth-stack-img:first-child {
  margin-left: 0;
}

.auth-social-proof-text {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.auth-social-proof-text strong {
  color: var(--text-main);
  font-weight: 700;
}

/* --- Right Form Panel (Zero-Collision Document Flow) --- */
.auth-form-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  padding: 2rem 1.5rem 3rem 1.5rem;
  position: relative;
  z-index: 2;
  min-height: 100vh;
  overflow-y: auto;
}

/* Natural Header Bar (Home Link + Theme Toggle) */
.auth-floating-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 440px;
  margin: 0 auto 1.5rem auto;
  position: relative;
  z-index: 10;
}

.auth-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--text-muted) !important;
  text-decoration: none !important;
  font-size: 0.86rem;
  font-weight: 600;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  transition: all var(--transition-fast);
}

.auth-back-link:hover {
  color: var(--primary) !important;
  border-color: var(--primary-light);
  transform: translateX(-2px);
}

.auth-theme-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  transition: all var(--transition-fast);
}

.auth-theme-btn:hover {
  border-color: var(--primary-light);
  transform: scale(1.06);
}

/* Form Container Card - Auto Margin for Centering */
.auth-form-container {
  width: 100%;
  max-width: 440px;
  margin: auto 0; /* Centers vertically if space allows, scrolls smoothly if tight */
}

.auth-form-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  padding: 2.25rem 2rem;
  box-shadow: var(--shadow-lg);
  position: relative;
  transition: all var(--transition-normal);
}

[data-theme="dark"] .auth-form-card {
  background: rgba(17, 24, 39, 0.94);
  border-color: rgba(255, 255, 255, 0.09);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.45);
}

/* Active Session Banner */
.auth-session-banner {
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  font-size: 0.82rem;
  color: var(--text-main);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.auth-session-banner a {
  color: var(--primary);
  font-weight: 700;
  text-decoration: underline;
}

/* Mobile Brand Header */
.auth-mobile-brand-header {
  display: none;
  text-align: center;
  margin-bottom: 1.25rem;
}

.auth-mobile-brand-link {
  text-decoration: none !important;
  color: var(--text-main);
  display: inline-block;
}

.auth-mobile-brand-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #6366f1, #a855f7);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: #fff;
  margin-bottom: 0.4rem;
}

/* Form Typography */
.auth-header-title {
  font-family: var(--font-heading);
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0.3rem;
  letter-spacing: -0.02em;
}

.auth-header-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 1.4rem;
}

/* Segmented Control Pill Switcher */
.auth-segmented-switch {
  display: flex;
  background: var(--bg-surface-subtle);
  padding: 0.25rem;
  border-radius: var(--radius-full);
  margin-bottom: 1.4rem;
  border: 1px solid var(--border-subtle);
  position: relative;
}

[data-theme="dark"] .auth-segmented-switch {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.08);
}

.auth-segment-btn {
  flex: 1;
  text-align: center;
  padding: 0.5rem 0.75rem;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-muted) !important;
  border-radius: var(--radius-full);
  border: none;
  background: transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.auth-segment-btn:hover {
  color: var(--text-main) !important;
  text-decoration: none !important;
}

.auth-segment-btn.active {
  background: var(--bg-surface);
  color: var(--primary) !important;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .auth-segment-btn.active {
  background: #1f293d;
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* --- Social Auth Button (Google) --- */
.auth-btn-google {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.72rem 1rem;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-xs);
}

.auth-btn-google svg {
  flex-shrink: 0;
  display: inline-block;
}

.auth-btn-google:hover {
  background: var(--bg-surface-subtle);
  border-color: #cbd5e1;
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .auth-btn-google {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
}

[data-theme="dark"] .auth-btn-google:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Divider with Label */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin: 1.35rem 0;
}

.auth-divider-line {
  flex: 1;
  height: 1px;
  background: var(--border-subtle);
}

.auth-divider-text {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--text-subtle);
}

/* --- Form Fields & Inputs --- */
.auth-form-group {
  margin-bottom: 1.15rem;
  text-align: left;
}

.auth-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.4rem;
}

.auth-label {
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--text-main);
  display: block;
}

.auth-forgot-link {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary) !important;
  text-decoration: none !important;
  transition: color var(--transition-fast);
}

.auth-forgot-link:hover {
  color: var(--primary-hover) !important;
  text-decoration: underline !important;
}

.auth-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

/* Modern Vector Icon inside Input */
.auth-input-icon {
  position: absolute;
  left: 0.95rem;
  color: var(--text-subtle);
  pointer-events: none;
  transition: color var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.auth-input-icon svg {
  display: inline-block;
  width: 18px;
  height: 18px;
  stroke: currentColor;
  transition: stroke var(--transition-fast);
}

.auth-input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.75rem; /* Room for icon */
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 0.92rem;
  font-family: inherit;
  outline: none;
  transition: all var(--transition-fast);
}

/* Crucial: inputs with eye toggle have extra right padding so password never collides with eye button */
.auth-input.has-pwd-toggle,
.auth-input-wrapper:has(.auth-pwd-toggle) .auth-input {
  padding-right: 2.85rem;
}

.auth-input:focus {
  background: var(--bg-surface);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.18);
}

.auth-input-wrapper:focus-within .auth-input-icon {
  color: var(--primary);
}

.auth-input-wrapper:focus-within .auth-input-icon svg {
  stroke: var(--primary);
}

[data-theme="dark"] .auth-input {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .auth-input:focus {
  background: rgba(255, 255, 255, 0.07);
  border-color: #818cf8;
  box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.25);
}

/* Chrome/Edge Autofill Fix */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text-main);
  -webkit-box-shadow: 0 0 0px 1000px var(--bg-surface-subtle) inset;
  transition: background-color 5000s ease-in-out 0s;
}

[data-theme="dark"] input:-webkit-autofill,
[data-theme="dark"] input:-webkit-autofill:hover, 
[data-theme="dark"] input:-webkit-autofill:focus {
  -webkit-text-fill-color: #f8fafc;
  -webkit-box-shadow: 0 0 0px 1000px #1e293b inset;
}

/* Password Toggle Eye Button */
.auth-pwd-toggle {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--text-subtle);
  cursor: pointer;
  padding: 0.35rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition-fast), background-color var(--transition-fast);
  z-index: 2;
}

.auth-pwd-toggle svg {
  display: inline-block;
  width: 18px;
  height: 18px;
}

.auth-pwd-toggle:hover {
  color: var(--text-main);
  background: rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .auth-pwd-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* Helper text */
.auth-helper-text {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
  line-height: 1.4;
}

/* --- Password Strength Meter (Sleek, No Layout Shifts) --- */
.auth-pwd-meter-container {
  margin-top: 0.65rem;
  padding: 0.75rem 0.85rem;
  background: var(--bg-surface-subtle);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  transition: all var(--transition-normal);
}

[data-theme="dark"] .auth-pwd-meter-container {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.06);
}

.auth-meter-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.4rem;
}

.auth-meter-title {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-muted);
}

.auth-meter-rating {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-subtle);
  transition: color var(--transition-fast);
}

.auth-meter-track {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.35rem;
  height: 4px;
  margin-bottom: 0.6rem;
}

.auth-meter-bar {
  height: 100%;
  border-radius: var(--radius-full);
  background: rgba(148, 163, 184, 0.25);
  transition: background-color 0.25s ease;
}

/* Criteria Checklist */
.auth-meter-checklist {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem 0.5rem;
  margin-top: 0.4rem;
}

.auth-check-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  color: var(--text-subtle);
  transition: color var(--transition-fast);
}

.auth-check-item.valid {
  color: var(--accent-emerald);
  font-weight: 600;
}

/* Check Icon - Empty circle when invalid, Solid green circle with white checkmark when valid! */
.check-icon {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid var(--border-card);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.62rem;
  flex-shrink: 0;
  transition: all var(--transition-fast);
  color: transparent; /* Hidden when invalid */
}

.auth-check-item.valid .check-icon {
  background: var(--accent-emerald);
  color: #ffffff; /* Crisp white checkmark */
  border-color: var(--accent-emerald);
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.35);
}

/* --- Submit & Action Buttons --- */
.auth-submit-btn {
  width: 100%;
  padding: 0.75rem 1.25rem;
  background: linear-gradient(135deg, var(--primary) 0%, #4f46e5 100%);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
  transition: all var(--transition-fast);
}

.auth-submit-btn:hover {
  background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.45);
  transform: translateY(-1px);
}

.auth-submit-btn:active {
  transform: translateY(0);
}

.auth-submit-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.auth-submit-btn.btn-emerald {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

.auth-submit-btn.btn-emerald:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45);
}

/* Demo Session Pill Button */
.auth-btn-demo {
  width: 100%;
  padding: 0.62rem 1rem;
  background: rgba(99, 102, 241, 0.08);
  border: 1px dashed rgba(99, 102, 241, 0.4);
  color: var(--primary);
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  margin-top: 0.75rem;
  transition: all var(--transition-fast);
}

.auth-btn-demo:hover {
  background: rgba(99, 102, 241, 0.16);
  border-color: var(--primary);
  color: var(--primary-hover);
  transform: translateY(-1px);
}

[data-theme="dark"] .auth-btn-demo {
  background: rgba(99, 102, 241, 0.12);
  border-color: rgba(99, 102, 241, 0.45);
  color: #a5b4fc;
}

[data-theme="dark"] .auth-btn-demo:hover {
  background: rgba(99, 102, 241, 0.22);
  border-color: #818cf8;
  color: #c7d2fe;
}

/* OTP Passwordless Link */
.auth-otp-link-box {
  text-align: center;
  margin-top: 0.85rem;
}

.auth-otp-link {
  font-size: 0.82rem;
  color: var(--accent-cyan);
  font-weight: 600;
  text-decoration: none;
  transition: color var(--transition-fast);
}

.auth-otp-link:hover {
  text-decoration: underline;
}

/* OTP Input Specifics - Perfectly Centered */
.auth-otp-box {
  text-align: center;
  padding: 0.75rem 0;
}

.auth-otp-code-input {
  text-align: center;
  font-size: 1.85rem;
  letter-spacing: 0.4em;
  text-indent: 0.4em; /* Compensates for last character letter spacing */
  font-family: var(--font-mono);
  font-weight: 800;
  padding: 0.85rem 1rem !important;
}

/* Footer / Privacy notice */
.auth-form-footer-note {
  margin-top: 1.4rem;
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-subtle);
  line-height: 1.5;
}

.auth-form-footer-note a {
  color: var(--text-muted);
  text-decoration: underline;
}

.auth-form-footer-note a:hover {
  color: var(--primary);
}

.auth-security-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 0.85rem;
  font-size: 0.72rem;
  color: var(--text-subtle);
}

/* --- Auth Modal Overhaul (Class `.auth-modal-card`) --- */
.modal-card.auth-modal-card {
  max-width: 480px;
  padding: 2.25rem 2rem;
  border-radius: var(--radius-xl);
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.35);
  position: relative;
}

[data-theme="dark"] .modal-card.auth-modal-card {
  background: #111827;
  border-color: rgba(255, 255, 255, 0.12);
}

.auth-modal-header {
  text-align: center;
  margin-bottom: 1.25rem;
}

.auth-modal-badge {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 0.75rem;
  box-shadow: 0 8px 18px rgba(99, 102, 241, 0.35);
}

/* Full Page Link in Modal */
.auth-modal-fullpage-link {
  text-align: center;
  margin-top: 1rem;
  font-size: 0.8rem;
  color: var(--text-subtle);
}

.auth-modal-fullpage-link a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}

.auth-modal-fullpage-link a:hover {
  text-decoration: underline;
}

/* --- Responsive Media Queries --- */
@media (max-width: 980px) {
  .auth-split-wrapper {
    flex-direction: column;
  }

  .auth-showcase-panel {
    display: none; /* Focus 100% on high-conversion form on mobile */
  }

  .auth-form-panel {
    padding: 2rem 1.25rem 3rem 1.25rem;
    min-height: 100vh;
  }

  .auth-floating-bar {
    max-width: 440px;
    margin-bottom: 1.25rem;
  }

  .auth-mobile-brand-header {
    display: block;
  }

  .auth-form-container {
    max-width: 440px;
    margin: 0 auto;
  }

  .auth-form-card {
    padding: 1.85rem 1.4rem;
  }
}

@media (min-width: 981px) and (max-width: 1200px) {
  .auth-showcase-panel {
    padding: 2rem;
  }
  
  .auth-showcase-hero h1 {
    font-size: 2rem;
  }
}
