/* =============================================================
   auth.css — Fresh Dhara Unified Auth Bottom Sheet System
   Mobile-first, Bengali+English bilingual, rural India optimized
   ============================================================= */

/* --- Design Tokens --- */
:root {
  --auth-primary:          #2E7D32;
  --auth-primary-light:    #4CAF50;
  --auth-primary-surface:  #E8F5E9;
  --auth-primary-gradient: linear-gradient(135deg, #43A047 0%, #2E7D32 100%);
  --auth-accent:           #FF6D00;
  --auth-surface:          #FFFFFF;
  --auth-bg:               #F5F7F3;
  --auth-text:             #1B2E1B;
  --auth-text-secondary:   #5F6B5F;
  --auth-text-muted:       #9CA89C;
  --auth-error:            #D32F2F;
  --auth-error-surface:    #FFEBEE;
  --auth-success:          #2E7D32;
  --auth-success-surface:  #E8F5E9;
  --auth-border:           #E0E7DC;
  --auth-overlay:          rgba(15, 23, 15, 0.55);
  --auth-shadow-sheet:     0 -8px 40px rgba(0, 0, 0, 0.18);
  --auth-shadow-btn:       0 8px 24px rgba(46, 125, 50, 0.32);
  --auth-shadow-btn-hover: 0 14px 32px rgba(46, 125, 50, 0.44);
  --auth-font:             'Poppins', 'Noto Sans Bengali', -apple-system, sans-serif;
  --auth-ease-bounce:      cubic-bezier(0.34, 1.56, 0.64, 1);
  --auth-ease-smooth:      cubic-bezier(0.4, 0, 0.2, 1);
  --auth-radius-sheet:     24px;
  --auth-radius-btn:       14px;
  --auth-radius-input:     14px;
}

/* ============================================================
   1. OVERLAY / BACKDROP
   ============================================================ */
.auth-overlay {
  position: fixed;
  inset: 0;
  background: var(--auth-overlay);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 9998;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--auth-ease-smooth) 280ms;
}

.auth-overlay.active {
  opacity: 1;
  pointer-events: all;
}

/* ============================================================
   2. BOTTOM SHEET CONTAINER
   ============================================================ */
.auth-sheet {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) translateY(100%);
  width: 100%;
  max-width: 480px;
  max-height: 92vh;
  background: var(--auth-surface);
  border-radius: var(--auth-radius-sheet) var(--auth-radius-sheet) 0 0;
  box-shadow: var(--auth-shadow-sheet);
  z-index: 9999;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  transition: transform 400ms var(--auth-ease-smooth), opacity 400ms var(--auth-ease-smooth), visibility 400ms;
  font-family: var(--auth-font);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  /* Scrollbar styling */
  scrollbar-width: thin;
  scrollbar-color: var(--auth-border) transparent;
}

.auth-sheet::-webkit-scrollbar { width: 4px; }
.auth-sheet::-webkit-scrollbar-track { background: transparent; }
.auth-sheet::-webkit-scrollbar-thumb { background: var(--auth-border); border-radius: 2px; }

.auth-sheet.active {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Drag Handle */
.auth-sheet__handle {
  width: 44px;
  height: 5px;
  background: var(--auth-border);
  border-radius: 3px;
  margin: 14px auto 0;
  cursor: grab;
  flex-shrink: 0;
}

/* Language Toggle */
.auth-lang-toggle {
  position: absolute;
  top: 16px;
  right: 16px;
  background: var(--auth-bg);
  border: 1px solid var(--auth-border);
  color: var(--auth-text-secondary);
  border-radius: 20px;
  padding: 6px 12px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 200ms;
  font-family: var(--auth-font);
  z-index: 10;
}

.auth-lang-toggle:hover {
  background: var(--auth-border);
  color: var(--auth-text);
}

[data-theme="dark"] .auth-lang-toggle {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.8);
}

[data-theme="dark"] .auth-lang-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

/* Language Visibility Rules */
.auth-sheet[data-lang="bn"] .lang-en { display: none !important; }
.auth-sheet[data-lang="en"] .lang-bn { display: none !important; }
.auth-toast[data-lang="bn"] .lang-en { display: none !important; }
.auth-toast[data-lang="en"] .lang-bn { display: none !important; }

/* ============================================================
   3. PROGRESS DOTS
   ============================================================ */
.auth-progress {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 14px 0 0;
}

.auth-progress__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--auth-border);
  transition: all 300ms var(--auth-ease-smooth);
}

.auth-progress__dot.active {
  background: var(--auth-primary);
  width: 22px;
  border-radius: 4px;
}

.auth-progress__dot.done {
  background: var(--auth-primary-light);
}

/* ============================================================
   4. AUTH STEP SECTIONS
   ============================================================ */
.auth-step {
  display: none;
  padding: 20px 28px 36px;
  animation: authFadeIn 300ms var(--auth-ease-smooth) forwards;
}

.auth-step.active {
  display: block;
}

/* ============================================================
   5. AUTH HEADER (Icon + Title + Subtitle)
   ============================================================ */
.auth-header {
  text-align: center;
  margin-bottom: 28px;
}

.auth-header__icon {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  color: var(--auth-text-primary);
  background: transparent;
}

.auth-header__title {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--auth-text);
  margin: 0 0 8px;
  letter-spacing: -0.3px;
  line-height: 1.3;
}

.auth-header__title-en {
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--auth-text-secondary);
  display: block;
  margin-top: 2px;
}

.auth-header__subtitle {
  font-size: 0.95rem;
  color: var(--auth-text-secondary);
  line-height: 1.6;
  margin: 0;
}

.auth-header__subtitle-en {
  font-size: 0.82rem;
  color: var(--auth-text-muted);
  display: block;
  margin-top: 3px;
}

/* ============================================================
   6. PHONE INPUT GROUP
   ============================================================ */
.auth-phone-group {
  display: flex;
  align-items: center;
  margin-bottom: 24px;
  border: 1px solid var(--auth-border);
  border-radius: 12px;
  overflow: hidden;
  transition: all 250ms var(--auth-ease-smooth);
  background: var(--auth-surface);
  height: 56px;
}

.auth-phone-group:focus-within {
  border-color: var(--auth-primary);
  box-shadow: 0 0 0 4px rgba(46, 125, 50, 0.12);
}

.auth-phone-group.error {
  border-color: var(--auth-error);
  box-shadow: 0 0 0 4px rgba(211, 47, 47, 0.1);
}

.auth-phone-prefix {
  display: flex;
  align-items: center;
  padding: 0 16px;
  background: transparent;
  font-weight: 800;
  color: var(--auth-text);
  white-space: nowrap;
  flex-shrink: 0;
  gap: 6px;
  user-select: none;
  height: 100%;
}

.auth-phone-prefix-country {
  font-size: 0.75rem;
  opacity: 0.8;
  letter-spacing: 0.5px;
}

.auth-phone-prefix-code {
  font-size: 0.95rem;
}

.auth-phone-divider {
  width: 1px;
  height: 24px;
  background: var(--auth-border);
  opacity: 0.8;
}

.auth-phone-input {
  flex: 1;
  border: none;
  outline: none;
  padding: 0 16px;
  font-size: 1.05rem;
  font-weight: 500;
  font-family: var(--auth-font);
  color: var(--auth-text);
  background: transparent;
  height: 100%;
  letter-spacing: 0.5px;
  -webkit-appearance: none;
}

.auth-phone-input::placeholder {
  font-weight: 400;
  letter-spacing: 0;
  color: var(--auth-text-muted);
}

/* ============================================================
   7. OTP INPUT GROUP (6 separate boxes)
   ============================================================ */
.auth-otp-group {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 20px;
}

.auth-otp-box {
  width: 46px;
  height: 56px;
  border: 2.5px solid var(--auth-border);
  border-radius: 12px;
  text-align: center;
  font-size: 1.4rem;
  font-weight: 700;
  font-family: var(--auth-font);
  color: var(--auth-text);
  background: var(--auth-surface);
  outline: none;
  transition: border-color 200ms, box-shadow 200ms, background 200ms;
  -webkit-appearance: none;
  caret-color: var(--auth-primary);
  /* Prevent iOS zoom - keep at 16px minimum */
  font-size: max(1.4rem, 16px);
}

.auth-otp-box:focus {
  border-color: var(--auth-primary);
  box-shadow: 0 0 0 4px rgba(46, 125, 50, 0.12);
}

.auth-otp-box.filled {
  border-color: var(--auth-primary);
  background: var(--auth-primary-surface);
  animation: authDigitPop 200ms var(--auth-ease-bounce);
}

.auth-otp-box.error {
  border-color: var(--auth-error);
  background: var(--auth-error-surface);
  animation: authShake 350ms ease;
}

/* Responsive OTP boxes for tiny screens */
@media (max-width: 360px) {
  .auth-otp-box {
    width: 38px;
    height: 50px;
  }
  .auth-otp-group {
    gap: 7px;
  }
}

/* ============================================================
   8. PRIMARY CTA BUTTON
   ============================================================ */
.auth-btn-primary {
  width: 100%;
  height: 54px;
  background: #438E3E; /* Matte green from reference */
  color: #FFFFFF;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 700;
  font-family: var(--auth-font);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: none;
  transition: all 200ms var(--auth-ease-smooth);
  position: relative;
  overflow: hidden;
  margin-bottom: 16px;
  -webkit-tap-highlight-color: transparent;
  letter-spacing: 0.3px;
}

.auth-btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  transition: background 200ms;
}

.auth-btn-primary:hover:not(:disabled) {
  background: #3B7C36;
  transform: translateY(-1px);
}

.auth-btn-primary:active:not(:disabled) {
  transform: scale(0.98) translateY(0);
  background: #346D30;
}

.auth-btn-primary:active::after {
  background: rgba(0, 0, 0, 0.05);
}

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

.auth-btn-primary.loading {
  pointer-events: none;
  opacity: 0.85;
}

.auth-btn-primary .auth-btn-text {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  gap: 8px;
  line-height: 1;
}

.auth-btn-primary .auth-btn-text-bn {
  font-size: 1.05rem;
  font-weight: 700;
}

.auth-btn-primary .auth-btn-text-en {
  font-size: 0.85rem;
  font-weight: 500;
  opacity: 0.9;
}

/* ============================================================
   9. GOOGLE BUTTON
   ============================================================ */
.auth-btn-google {
  width: 100%;
  height: 52px;
  background: var(--auth-surface);
  border: 2px solid var(--auth-border);
  border-radius: var(--auth-radius-btn);
  font-size: 0.95rem;
  font-weight: 600;
  font-family: var(--auth-font);
  color: var(--auth-text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  transition: background 200ms, border-color 200ms, transform 200ms, box-shadow 200ms;
  -webkit-tap-highlight-color: transparent;
  margin-bottom: 8px;
}

.auth-btn-google:hover {
  background: #FAFAFA;
  border-color: #C8D0C4;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}

.auth-btn-google:active {
  transform: scale(0.98);
  background: #F5F5F5;
}

.auth-btn-google img {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.auth-btn-google .auth-btn-text {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  gap: 6px;
}

.auth-btn-google .auth-btn-text-bn {
  font-size: 0.95rem;
  font-weight: 600;
}

.auth-btn-google .auth-btn-text-en {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--auth-text-muted);
}

/* ============================================================
   10. DIVIDER
   ============================================================ */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 18px 0;
  color: var(--auth-text-muted);
  font-size: 0.85rem;
  font-weight: 500;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--auth-border);
}

/* ============================================================
   11. NAME INPUT
   ============================================================ */
.auth-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--auth-text-secondary);
  margin-bottom: 8px;
}

.auth-name-input {
  width: 100%;
  height: 56px;
  border: 2px solid var(--auth-border);
  border-radius: var(--auth-radius-input);
  padding: 0 18px;
  font-size: 1.05rem;  /* >= 16px prevents iOS zoom */
  font-weight: 500;
  font-family: var(--auth-font);
  color: var(--auth-text);
  background: var(--auth-surface);
  outline: none;
  box-sizing: border-box;
  transition: border-color 220ms, box-shadow 220ms;
  margin-bottom: 20px;
  -webkit-appearance: none;
}

.auth-name-input:focus {
  border-color: var(--auth-primary);
  box-shadow: 0 0 0 4px rgba(46, 125, 50, 0.12);
}

.auth-name-input::placeholder {
  color: var(--auth-text-muted);
  font-weight: 400;
}

/* ============================================================
   12. PHONE DISPLAY (OTP step — shows phone + change link)
   ============================================================ */
.auth-phone-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 24px;
  font-size: 0.95rem;
}

.auth-phone-display__number {
  font-weight: 700;
  color: var(--auth-primary);
  letter-spacing: 0.5px;
}

.auth-phone-display__sent {
  color: var(--auth-text-secondary);
  font-size: 0.88rem;
}

.auth-phone-display__change {
  background: none;
  border: none;
  color: var(--auth-primary);
  font-size: 0.85rem;
  font-weight: 600;
  font-family: var(--auth-font);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 200ms;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.auth-phone-display__change:hover {
  background: var(--auth-primary-surface);
}

/* ============================================================
   13. RESEND / TIMER
   ============================================================ */
.auth-resend {
  text-align: center;
  margin-top: 4px;
  margin-bottom: 8px;
  font-size: 0.88rem;
  color: var(--auth-text-secondary);
  line-height: 1.7;
}

.auth-resend__timer {
  color: var(--auth-text-muted);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  font-size: 1rem;
}

.auth-resend__link {
  background: none;
  border: none;
  color: var(--auth-primary);
  font-size: 0.9rem;
  font-weight: 700;
  font-family: var(--auth-font);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  padding: 0;
  transition: opacity 200ms;
}

.auth-resend__link:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.auth-resend__label {
  display: block;
  font-size: 0.82rem;
  color: var(--auth-text-muted);
  margin-bottom: 4px;
}

/* ============================================================
   14. TRUST BADGE
   ============================================================ */
.auth-trust {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 12px 0 4px;
  font-size: 0.8rem;
  color: var(--auth-text-muted);
  text-align: center;
}

.auth-trust__icon {
  font-size: 0.95rem;
  flex-shrink: 0;
}

.auth-trust__text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.4;
}

.auth-trust__text-en {
  font-size: 0.74rem;
  color: var(--auth-text-muted);
}

/* ============================================================
   15. TERMS LINE
   ============================================================ */
.auth-terms {
  font-size: 0.76rem;
  color: var(--auth-text-muted);
  text-align: center;
  margin: 12px 0 0;
  line-height: 1.5;
}

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

.auth-terms a:hover {
  text-decoration: underline;
}

/* ============================================================
   16. SUCCESS STEP — Animated Checkmark
   ============================================================ */
.auth-success-check {
  width: 90px;
  height: 90px;
  margin: 20px auto 24px;
  border-radius: 50%;
  background: var(--auth-primary-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  animation: authSuccessPop 500ms var(--auth-ease-bounce) forwards;
}

.auth-success-name {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--auth-primary);
  text-align: center;
  margin: 0 0 6px;
}

.auth-success-msg {
  font-size: 0.95rem;
  color: var(--auth-text-secondary);
  text-align: center;
  margin: 0;
}

.auth-success-msg-en {
  font-size: 0.8rem;
  color: var(--auth-text-muted);
  display: block;
  margin-top: 4px;
}

/* ============================================================
   17. LOADING SPINNER
   ============================================================ */
.auth-spinner {
  display: inline-block;
  width: 22px;
  height: 22px;
  border: 3px solid rgba(255,255,255,0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: authSpin 0.7s linear infinite;
  flex-shrink: 0;
}

.auth-spinner--green {
  border-color: rgba(46,125,50,0.25);
  border-top-color: var(--auth-primary);
}

.auth-spinner--lg {
  width: 40px;
  height: 40px;
  border-width: 4px;
}

/* ============================================================
   18. TOAST NOTIFICATION
   ============================================================ */
.auth-toast {
  position: fixed;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  min-width: 280px;
  max-width: 360px;
  width: calc(100% - 32px);
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.14);
  z-index: 10000;
  padding: 14px 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-family: var(--auth-font);
  border-left: 5px solid var(--auth-border);
  transition: top 380ms var(--auth-ease-bounce);
  pointer-events: none;
}

.auth-toast.active {
  top: 20px;
  pointer-events: all;
}

.auth-toast.success {
  border-left-color: var(--auth-primary);
  background: var(--auth-success-surface);
}

.auth-toast.error {
  border-left-color: var(--auth-error);
  background: var(--auth-error-surface);
}

.auth-toast.info {
  border-left-color: #1565C0;
  background: #E3F2FD;
}

.auth-toast__icon {
  font-size: 1.4rem;
  flex-shrink: 0;
  line-height: 1;
  margin-top: 2px;
}

.auth-toast__body {
  flex: 1;
  min-width: 0;
}

.auth-toast__msg {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--auth-text);
  line-height: 1.4;
}

.auth-toast__msg-en {
  font-size: 0.78rem;
  color: var(--auth-text-secondary);
  margin-top: 2px;
  line-height: 1.4;
}

.auth-toast__close {
  background: none;
  border: none;
  font-size: 1.1rem;
  color: var(--auth-text-muted);
  cursor: pointer;
  padding: 2px 4px;
  flex-shrink: 0;
  line-height: 1;
  transition: color 200ms;
}

.auth-toast__close:hover {
  color: var(--auth-text);
}

/* Progress bar at bottom of toast */
.auth-toast__progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: currentColor;
  opacity: 0.25;
  border-radius: 0 0 0 14px;
  animation: authToastProgress 4s linear forwards;
}

/* ============================================================
   19. SHIMMER / SKELETON
   ============================================================ */
.auth-skeleton {
  background: linear-gradient(90deg,
    #F0F4EE 25%,
    #E4EAE2 50%,
    #F0F4EE 75%
  );
  background-size: 200% 100%;
  animation: authShimmer 1.4s ease-in-out infinite;
  border-radius: 8px;
}

/* ============================================================
   20. SIGN IN PROMPT BUTTON (inside pages)
   ============================================================ */
.auth-prompt-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--auth-primary-gradient);
  color: #fff;
  border: none;
  border-radius: 50px;
  padding: 12px 24px;
  font-size: 0.95rem;
  font-weight: 700;
  font-family: var(--auth-font);
  cursor: pointer;
  box-shadow: var(--auth-shadow-btn);
  transition: transform 220ms var(--auth-ease-smooth), box-shadow 220ms;
  -webkit-tap-highlight-color: transparent;
}

.auth-prompt-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--auth-shadow-btn-hover);
}

/* ============================================================
   21. KEYFRAME ANIMATIONS
   ============================================================ */
@keyframes authSlideUp {
  from { transform: translateX(-50%) translateY(100%); }
  to   { transform: translateX(-50%) translateY(0);    }
}

@keyframes authSlideDown {
  from { transform: translateX(-50%) translateY(0);    }
  to   { transform: translateX(-50%) translateY(100%); }
}

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

@keyframes authPulse {
  0%, 100% { transform: scale(1);    box-shadow: 0 0 0 0 rgba(46,125,50,0.3); }
  50%       { transform: scale(1.04); box-shadow: 0 0 0 12px rgba(46,125,50,0); }
}

@keyframes authRipple {
  0%   { transform: scale(1);    opacity: 0.6; }
  100% { transform: scale(1.35); opacity: 0;   }
}

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

@keyframes authShimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@keyframes authDigitPop {
  0%   { transform: scale(1);    }
  50%  { transform: scale(1.18); }
  100% { transform: scale(1);    }
}

@keyframes authShake {
  0%, 100% { transform: translateX(0);   }
  20%       { transform: translateX(-6px); }
  40%       { transform: translateX(6px);  }
  60%       { transform: translateX(-4px); }
  80%       { transform: translateX(4px);  }
}

@keyframes authSuccessPop {
  0%   { transform: scale(0.5); opacity: 0; }
  70%  { transform: scale(1.15); }
  100% { transform: scale(1);    opacity: 1; }
}

@keyframes authToastProgress {
  from { width: 100%; }
  to   { width: 0%; }
}

/* ============================================================
   22. RESPONSIVE
   ============================================================ */
@media (min-width: 480px) {
  .auth-step {
    padding: 24px 36px 40px;
  }
  .auth-otp-box {
    width: 52px;
    height: 60px;
  }
  .auth-otp-group {
    gap: 12px;
  }
}

@media (min-width: 768px) {
  .auth-sheet {
    bottom: 40px;
    border-radius: var(--auth-radius-sheet);
    max-height: 85vh;
  }
}

/* ============================================================
   23. PREFERS REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .auth-sheet,
  .auth-overlay,
  .auth-btn-primary,
  .auth-btn-google,
  .auth-toast {
    transition: none !important;
    animation: none !important;
  }
  .auth-header__icon {
    animation: none;
  }
  .auth-header__icon::after {
    animation: none;
  }
}

/* ============================================================
   24. DARK MODE SUPPORT
   ============================================================ */
[data-theme="dark"] {
  --auth-surface: #181C18;
}

[data-theme="dark"] .auth-sheet {
  background: var(--auth-surface);
  color: #E8F5E9;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .auth-phone-group {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .auth-phone-group:focus-within {
  border-color: var(--auth-primary-light);
  box-shadow: 0 0 0 4px rgba(76, 175, 80, 0.15), 0 4px 16px rgba(0, 0, 0, 0.3);
  background: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .auth-phone-prefix {
  background: transparent;
  color: #FFFFFF;
}

[data-theme="dark"] .auth-phone-prefix-country {
  opacity: 0.6;
}

[data-theme="dark"] .auth-phone-divider {
  background: rgba(255, 255, 255, 0.15);
}

[data-theme="dark"] .auth-phone-input {
  color: #FFFFFF;
}

[data-theme="dark"] .auth-otp-box {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
}

[data-theme="dark"] .auth-otp-box:focus {
  border-color: var(--auth-primary-light);
  box-shadow: 0 0 0 4px rgba(76, 175, 80, 0.15);
}

[data-theme="dark"] .auth-otp-box.filled {
  background: rgba(76, 175, 80, 0.1);
  border-color: var(--auth-primary-light);
}

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

[data-theme="dark"] .auth-btn-google {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
  color: #E8F5E9;
  backdrop-filter: blur(8px);
}

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

[data-theme="dark"] .auth-btn-google .auth-btn-text-en {
  color: rgba(255, 255, 255, 0.6);
}

[data-theme="dark"] .auth-toast {
  background: #242A24;
  color: #E8F5E9;
  border-left-color: var(--auth-primary-light);
}

[data-theme="dark"] .auth-header__title {
  color: #FFFFFF;
}

[data-theme="dark"] .auth-header__title-en {
  color: rgba(255, 255, 255, 0.7);
}

[data-theme="dark"] .auth-header__subtitle {
  color: rgba(255, 255, 255, 0.8);
}

[data-theme="dark"] .auth-header__subtitle-en {
  color: rgba(255, 255, 255, 0.5);
}

[data-theme="dark"] .auth-header__icon {
  background: #181C18;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .auth-divider {
  color: rgba(255, 255, 255, 0.4);
}

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

[data-theme="dark"] .auth-trust__text,
[data-theme="dark"] .auth-trust__text-en,
[data-theme="dark"] .auth-terms {
  color: rgba(255, 255, 255, 0.5);
}
