/* ===================================================================
   ToritX Course - Authentication System (Login & Registration)
   Glassmorphic, Ultra-Fast, Animated, Mobile-First Native App Experience
   =================================================================== */

.auth-page-body {
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  background: radial-gradient(circle at 10% 15%, rgba(99, 102, 241, 0.08) 0%, transparent 45%),
              radial-gradient(circle at 90% 85%, rgba(168, 85, 247, 0.08) 0%, transparent 50%),
              radial-gradient(circle at 50% 50%, rgba(6, 182, 212, 0.04) 0%, transparent 60%),
              var(--bg-main, #f8fafc);
  background-attachment: fixed;
  color: var(--text-primary, #0f172a);
  font-family: var(--font-bn, system-ui, -apple-system, sans-serif);
}

[data-theme="dark"] .auth-page-body {
  background: radial-gradient(circle at 10% 15%, rgba(99, 102, 241, 0.16) 0%, transparent 45%),
              radial-gradient(circle at 90% 85%, rgba(168, 85, 247, 0.12) 0%, transparent 50%),
              radial-gradient(circle at 50% 50%, rgba(6, 182, 212, 0.06) 0%, transparent 60%),
              var(--bg-main, #0b0f19);
}

/* ===================================================================
   Dynamic Floating Ambient Glow Orbs
   =================================================================== */
.auth-ambient-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(85px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.65;
  transition: opacity 0.5s ease;
}

.auth-ambient-glow.glow-1 {
  width: 320px;
  height: 320px;
  top: -60px;
  left: -60px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.5) 0%, rgba(99, 102, 241, 0) 70%);
  animation: authOrbDrift1 14s ease-in-out infinite alternate;
}

.auth-ambient-glow.glow-2 {
  width: 380px;
  height: 380px;
  bottom: 20px;
  right: -80px;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.42) 0%, rgba(168, 85, 247, 0) 70%);
  animation: authOrbDrift2 18s ease-in-out infinite alternate;
}

.auth-ambient-glow.glow-3 {
  width: 260px;
  height: 260px;
  top: 45%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(6, 182, 212, 0.28) 0%, rgba(6, 182, 212, 0) 70%);
  animation: authOrbDrift3 12s ease-in-out infinite alternate;
}

@keyframes authOrbDrift1 {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(45px, 35px) scale(1.15); }
  100% { transform: translate(-25px, 55px) scale(0.95); }
}

@keyframes authOrbDrift2 {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-55px, -45px) scale(1.12); }
  100% { transform: translate(35px, -25px) scale(0.92); }
}

@keyframes authOrbDrift3 {
  0% { transform: translate(-50%, -50%) scale(1); opacity: 0.22; }
  50% { transform: translate(-45%, -55%) scale(1.22); opacity: 0.38; }
  100% { transform: translate(-55%, -45%) scale(0.92); opacity: 0.18; }
}

[data-theme="dark"] .auth-ambient-glow.glow-1 {
  background: radial-gradient(circle, rgba(99, 102, 241, 0.4) 0%, transparent 70%);
}
[data-theme="dark"] .auth-ambient-glow.glow-2 {
  background: radial-gradient(circle, rgba(168, 85, 247, 0.35) 0%, transparent 70%);
}

/* ===================================================================
   Auth Top Navigation Bar
   =================================================================== */
.auth-top-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 62px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border-subtle, rgba(226, 232, 240, 0.8));
  display: flex;
  align-items: center;
  transition: all 0.3s ease;
}

[data-theme="dark"] .auth-top-nav {
  background: rgba(11, 15, 25, 0.8);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.auth-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.auth-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 650;
  color: var(--text-secondary, #64748b);
  padding: 0.42rem 0.9rem;
  border-radius: 999px;
  background: var(--bg-card, #ffffff);
  border: 1px solid var(--border-subtle, rgba(226, 232, 240, 0.8));
  text-decoration: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-back-link:hover {
  color: #4f46e5;
  border-color: rgba(99, 102, 241, 0.35);
  transform: translateX(-3px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.12);
}

.auth-nav-right {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

/* ===================================================================
   Main Layout & Card Container
   =================================================================== */
.auth-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1.25rem;
  position: relative;
  z-index: 1;
}

.auth-card-container {
  position: relative;
  width: 100%;
  max-width: 980px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(24px) saturate(190%);
  -webkit-backdrop-filter: blur(24px) saturate(190%);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 26px;
  box-shadow: 0 25px 60px -15px rgba(99, 102, 241, 0.16),
              0 0 0 1px rgba(255, 255, 255, 0.7) inset,
              0 2px 4px rgba(0, 0, 0, 0.03);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr;
  animation: authCardEnter 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;
}

[data-theme="dark"] .auth-card-container {
  background: rgba(17, 24, 39, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 30px 75px -15px rgba(0, 0, 0, 0.75),
              0 0 0 1px rgba(255, 255, 255, 0.07) inset;
}

@keyframes authCardEnter {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (min-width: 860px) {
  .auth-card-container {
    grid-template-columns: 1fr 1.15fr;
  }
}

/* ===================================================================
   Auth Left Showcase Panel (Desktop)
   =================================================================== */
.auth-showcase-panel {
  display: none;
  background: linear-gradient(145deg, rgba(99, 102, 241, 0.12) 0%, rgba(168, 85, 247, 0.08) 100%);
  border-right: 1px solid var(--border-subtle, rgba(226, 232, 240, 0.8));
  padding: 3rem 2.5rem;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

[data-theme="dark"] .auth-showcase-panel {
  background: linear-gradient(145deg, rgba(99, 102, 241, 0.2) 0%, rgba(168, 85, 247, 0.14) 100%);
  border-right-color: rgba(255, 255, 255, 0.08);
}

@media (min-width: 860px) {
  .auth-showcase-panel {
    display: flex;
  }
}

.auth-showcase-panel::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.35) 0%, transparent 70%);
  pointer-events: none;
}

.showcase-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.showcase-brand .brand-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: var(--accent-gradient, linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.25rem;
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.35);
}

.showcase-brand .brand-text {
  font-family: var(--font-en, sans-serif);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-primary);
}

.showcase-content h2 {
  font-size: 1.85rem;
  font-weight: 800;
  line-height: 1.35;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.showcase-content p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.65;
  margin-bottom: 2rem;
}

.showcase-perks {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
  padding: 0;
  margin: 0;
}

.showcase-perks li {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 0.92rem;
  color: var(--text-secondary);
  font-weight: 550;
}

.showcase-perks .perk-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.14);
  color: #10b981;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 800;
  flex-shrink: 0;
}

.showcase-footer {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-subtle, rgba(226, 232, 240, 0.8));
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-muted, #94a3b8);
  font-weight: 600;
}

/* ===================================================================
   Auth Right Interactive Form Panel
   =================================================================== */
.auth-form-panel {
  padding: 2.5rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}

@media (min-width: 600px) {
  .auth-form-panel {
    padding: 3rem 2.75rem;
  }
}

/* Native Mobile Security Badge */
.auth-mobile-header-badge {
  display: none;
  align-items: center;
  gap: 0.55rem;
  padding: 0.38rem 0.9rem;
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.24);
  border-radius: 999px;
  margin-bottom: 1.25rem;
  width: fit-content;
  backdrop-filter: blur(8px);
  animation: badgeSlideDown 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

[data-theme="dark"] .auth-mobile-header-badge {
  background: rgba(99, 102, 241, 0.16);
  border-color: rgba(99, 102, 241, 0.35);
}

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

.badge-pulsing-icon {
  position: relative;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6366f1;
}

.badge-pulse-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.4);
  transform: translate(-50%, -50%);
  animation: pulseRadar 2.2s infinite;
  pointer-events: none;
}

@keyframes pulseRadar {
  0% { transform: translate(-50%, -50%) scale(0.8); opacity: 0.85; }
  100% { transform: translate(-50%, -50%) scale(2.4); opacity: 0; }
}

.badge-text {
  font-size: 0.78rem;
  font-weight: 750;
  color: #4f46e5;
  letter-spacing: 0.02em;
}

[data-theme="dark"] .badge-text {
  color: #a5b4fc;
}

.badge-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 6px #10b981;
}

/* ===================================================================
   iOS / Modern Tactile Segmented Switcher (Login / Register)
   =================================================================== */
.auth-tabs-switcher {
  position: relative;
  display: flex;
  background: rgba(241, 245, 249, 0.85);
  padding: 5px;
  border-radius: 15px;
  margin-bottom: 1.75rem;
  border: 1px solid rgba(226, 232, 240, 0.85);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.03);
}

[data-theme="dark"] .auth-tabs-switcher {
  background: rgba(15, 23, 42, 0.65);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.25);
}

.auth-tab-btn {
  flex: 1;
  text-align: center;
  padding: 0.65rem 1rem;
  border-radius: 11px;
  font-size: 0.92rem;
  font-weight: 650;
  color: var(--text-secondary, #64748b);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.auth-tab-btn:hover {
  color: var(--text-primary);
}

.auth-tab-btn:active {
  transform: scale(0.96);
}

.auth-tab-btn.active {
  background: #ffffff;
  color: #4f46e5;
  font-weight: 750;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.16), 0 1px 2px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(99, 102, 241, 0.12);
}

[data-theme="dark"] .auth-tab-btn.active {
  background: #1e293b;
  color: #818cf8;
  border-color: rgba(129, 140, 248, 0.25);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.auth-tab-btn.active svg {
  animation: tabIconPop 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes tabIconPop {
  0% { transform: scale(0.8); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

/* ===================================================================
   Header & Typography
   =================================================================== */
.auth-header-wrap {
  margin-bottom: 1.75rem;
}

.auth-header-wrap h1 {
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.gradient-text {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #ec4899 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

[data-theme="dark"] .gradient-text {
  background: linear-gradient(135deg, #818cf8 0%, #c084fc 50%, #f472b6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-header-wrap p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ===================================================================
   Form Groups & Interactive Inputs
   =================================================================== */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.form-label {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.01em;
}

.input-icon-wrap {
  position: relative;
  display: flex;
  align-items: center;
  transition: transform 0.2s ease;
}

.input-leading-icon {
  position: absolute;
  left: 15px;
  color: #94a3b8;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 2;
}

.auth-input {
  width: 100%;
  background: rgba(248, 250, 252, 0.85);
  border: 1.5px solid rgba(226, 232, 240, 0.9);
  border-radius: 14px;
  padding: 0.78rem 1rem 0.78rem 2.85rem;
  font-size: 0.94rem;
  font-family: inherit;
  color: var(--text-primary);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

[data-theme="dark"] .auth-input {
  background: rgba(15, 23, 42, 0.65);
  border-color: rgba(255, 255, 255, 0.1);
  color: #f1f5f9;
}

.auth-input:focus {
  background: #ffffff;
  border-color: #6366f1;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15), 0 8px 20px -4px rgba(99, 102, 241, 0.15);
  outline: none;
}

[data-theme="dark"] .auth-input:focus {
  background: rgba(30, 41, 59, 0.9);
  border-color: #818cf8;
  box-shadow: 0 0 0 4px rgba(129, 140, 248, 0.2), 0 8px 25px -4px rgba(0, 0, 0, 0.5);
}

/* Icon reacts on focus */
.input-icon-wrap:focus-within .input-leading-icon {
  color: #4f46e5;
  transform: scale(1.12);
}

[data-theme="dark"] .input-icon-wrap:focus-within .input-leading-icon {
  color: #818cf8;
}

.auth-input.has-trailing {
  padding-right: 2.85rem;
}

.password-toggle-btn {
  position: absolute;
  right: 11px;
  color: #94a3b8;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 2;
  -webkit-tap-highlight-color: transparent;
}

.password-toggle-btn:hover {
  color: #4f46e5;
  background: rgba(99, 102, 241, 0.08);
}

.password-toggle-btn:active {
  transform: scale(0.9);
}

/* ===================================================================
   Custom Animated Checkbox & Forgot Password
   =================================================================== */
.form-options-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.86rem;
  margin-top: -0.15rem;
}

.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--text-secondary);
  font-weight: 550;
  cursor: pointer;
  user-select: none;
}

.checkbox-label input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 6px;
  border: 1.8px solid #cbd5e1;
  background: transparent;
  cursor: pointer;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
}

[data-theme="dark"] .checkbox-label input[type="checkbox"] {
  border-color: rgba(255, 255, 255, 0.2);
}

.checkbox-label input[type="checkbox"]:checked {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  border-color: #4f46e5;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.35);
}

.checkbox-label input[type="checkbox"]:checked::after {
  content: '';
  width: 5px;
  height: 9px;
  border: solid #ffffff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) translate(-1px, -1px);
  animation: checkPop 0.2s ease forwards;
}

@keyframes checkPop {
  from { transform: rotate(45deg) scale(0); }
  to { transform: rotate(45deg) scale(1); }
}

.forgot-password-link {
  color: #4f46e5;
  font-weight: 650;
  font-size: 0.86rem;
  text-decoration: none;
  position: relative;
  transition: color 0.2s ease;
}

[data-theme="dark"] .forgot-password-link {
  color: #a5b4fc;
}

.forgot-password-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: currentColor;
  transition: width 0.25s ease;
}

.forgot-password-link:hover::after {
  width: 100%;
}

/* ===================================================================
   Supercharged Animated Submit Button
   =================================================================== */
.btn-auth-submit {
  position: relative;
  overflow: hidden;
  width: 100%;
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 50%, #7c3aed 100%);
  background-size: 200% 200%;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 750;
  padding: 0.88rem 1.6rem;
  border-radius: 14px;
  box-shadow: 0 8px 24px -4px rgba(79, 70, 229, 0.45), 0 2px 4px rgba(0, 0, 0, 0.05);
  border: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 0.4rem;
  -webkit-tap-highlight-color: transparent;
}

.btn-auth-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px -4px rgba(79, 70, 229, 0.55);
}

.btn-auth-submit:active {
  transform: scale(0.97);
}

/* Shimmer Sweep Animation */
.btn-auth-submit::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -75%;
  width: 50%;
  height: 200%;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.35) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: rotate(30deg);
  animation: btnShimmerSweep 4.5s infinite;
  pointer-events: none;
}

@keyframes btnShimmerSweep {
  0% { transform: translateX(-150%) rotate(30deg); }
  22% { transform: translateX(350%) rotate(30deg); }
  100% { transform: translateX(350%) rotate(30deg); }
}

.btn-auth-submit svg {
  transition: transform 0.25s ease;
}

.btn-auth-submit:hover svg {
  transform: translateX(4px);
}

/* ===================================================================
   Social Divider & Social Buttons
   =================================================================== */
.social-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem 0 1.25rem;
  color: var(--text-muted, #94a3b8);
  font-size: 0.82rem;
  font-weight: 600;
}

.social-divider::before,
.social-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-subtle, rgba(226, 232, 240, 0.8));
}

[data-theme="dark"] .social-divider::before,
[data-theme="dark"] .social-divider::after {
  background: rgba(255, 255, 255, 0.08);
}

.social-buttons-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.social-auth-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  background: rgba(248, 250, 252, 0.85);
  border: 1.5px solid rgba(226, 232, 240, 0.9);
  border-radius: 12px;
  padding: 0.72rem 1rem;
  font-size: 0.88rem;
  font-weight: 650;
  color: var(--text-primary);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-tap-highlight-color: transparent;
}

[data-theme="dark"] .social-auth-btn {
  background: rgba(15, 23, 42, 0.65);
  border-color: rgba(255, 255, 255, 0.1);
  color: #f1f5f9;
}

.social-auth-btn:hover {
  background: #ffffff;
  border-color: rgba(99, 102, 241, 0.35);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}

[data-theme="dark"] .social-auth-btn:hover {
  background: rgba(30, 41, 59, 0.9);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.social-auth-btn:active {
  transform: scale(0.96);
}

/* ===================================================================
   Auth Bottom Footer Text
   =================================================================== */
.auth-bottom-switch {
  margin-top: 1.5rem;
  text-align: center;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.auth-bottom-switch a {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: #4f46e5;
  font-weight: 750;
  margin-left: 0.35rem;
  text-decoration: none;
  transition: all 0.2s ease;
}

[data-theme="dark"] .auth-bottom-switch a {
  color: #a5b4fc;
}

.auth-bottom-switch a:hover {
  transform: translateX(3px);
  color: #6366f1;
}

/* ===================================================================
   Modal Overlays & Toast Preservations
   =================================================================== */
.confirm-modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.confirm-modal-box {
  background: var(--bg-card, #ffffff);
  border: 1px solid var(--border-subtle, rgba(226, 232, 240, 0.8));
  border-radius: 20px;
  max-width: 420px;
  width: 100%;
  padding: 2rem 1.75rem;
  text-align: center;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
  animation: modalScaleIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalScaleIn {
  from { opacity: 0; transform: scale(0.94) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.confirm-modal-icon-wrap {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: rgba(99, 102, 241, 0.12);
  color: #6366f1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  margin: 0 auto 1.25rem;
}

.confirm-modal-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.confirm-modal-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 1.75rem;
}

.confirm-modal-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

.btn-confirm-cancel {
  flex: 1;
  padding: 0.72rem 1.25rem;
  border-radius: 12px;
  background: var(--bg-hover, rgba(0, 0, 0, 0.05));
  border: 1px solid var(--border-subtle, rgba(0, 0, 0, 0.1));
  color: var(--text-primary);
  font-weight: 650;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-confirm-accept {
  flex: 1;
  padding: 0.72rem 1.25rem;
  border-radius: 12px;
  background: var(--accent-gradient, linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%));
  border: none;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.35);
  transition: all 0.2s ease;
}

.toast-msg {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(30px);
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: #ffffff;
  padding: 0.75rem 1.25rem;
  border-radius: 16px;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.12);
  z-index: 999999;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  max-width: 90vw;
}

.toast-msg.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.toast-icon-wrap {
  font-size: 1.15rem;
  flex-shrink: 0;
}

.toast-text {
  font-size: 0.88rem;
  font-weight: 650;
}

.toast-progress-bar {
  position: absolute;
  bottom: 0;
  left: 12px;
  right: 12px;
  height: 2.5px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  overflow: hidden;
}

.toast-progress-fill {
  height: 100%;
  width: 100%;
  background: #6366f1;
}

.toast-success .toast-progress-fill { background: #10b981; }
.toast-warning .toast-progress-fill { background: #f59e0b; }
.toast-danger .toast-progress-fill { background: #ef4444; }

/* ===================================================================
   Mobile Optimization (< 768px)
   Authentic High-End Native App Feel
   =================================================================== */
@media (min-width: 769px) {
  .bottom-nav {
    display: none !important;
  }
  .auth-back-link {
    display: inline-flex !important;
  }
}

@media (max-width: 768px) {
  /* Hide top "হোমে ফিরুন" button on phone view */
  .auth-back-link {
    display: none !important;
  }

  /* Top header clean layout: Logo on left, Ping + Theme on right */
  .auth-nav-inner {
    justify-content: space-between !important;
    padding: 0 0.5rem;
  }

  .auth-top-nav .brand-logo {
    display: flex !important;
    align-items: center;
    gap: 0.55rem;
  }

  /* Page padding for bottom navigation bar */
  .auth-page-body {
    padding-bottom: calc(var(--bottom-nav-height, 58px) + 20px) !important;
    background-attachment: scroll !important;
    -webkit-overflow-scrolling: touch;
  }
  html {
    scroll-behavior: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  .auth-wrapper {
    padding: 0.85rem 0.65rem calc(var(--bottom-nav-height, 58px) + 1.25rem) !important;
  }

  /* Show Mobile Header Badge */
  .auth-mobile-header-badge {
    display: inline-flex;
  }

  /* Bottom Navigation */
  .bottom-nav {
    display: flex !important;
  }

  .auth-card-container {
    border-radius: 22px;
    box-shadow: 0 15px 45px -10px rgba(99, 102, 241, 0.18),
                0 0 0 1px rgba(255, 255, 255, 0.6) inset;
    margin: 0 auto;
    width: 100%;
  }

  .auth-form-panel {
    padding: 1.5rem 1.15rem;
  }

  .auth-header-wrap h1 {
    font-size: 1.48rem;
  }

  .auth-header-wrap p {
    font-size: 0.82rem;
  }

  .auth-tabs-switcher {
    padding: 4px;
    border-radius: 13px;
    margin-bottom: 1.35rem;
  }

  .auth-tab-btn {
    padding: 0.58rem 0.75rem;
    font-size: 0.88rem;
    border-radius: 10px;
  }

  .auth-input {
    padding: 0.72rem 0.95rem 0.72rem 2.65rem;
    font-size: 0.92rem;
    border-radius: 12px;
  }

  .btn-auth-submit {
    padding: 0.82rem 1.4rem;
    font-size: 0.96rem;
    border-radius: 12px;
  }

  .social-buttons-grid {
    gap: 0.65rem;
  }

  .social-auth-btn {
    padding: 0.65rem 0.75rem;
    font-size: 0.84rem;
    border-radius: 11px;
  }
}
