/* Custom Authentication Styles */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap");

:root {
  --primary-color: #4f46e5;
  --primary-hover: #4338ca;
  --bg-gradient: linear-gradient(135deg, #f3f4f6 0%, #e0e7ff 50%, #f5f3ff 100%);
  --white: #ffffff;
  --text-dark: #1e293b;
  --text-light: #64748b;
  --border-color: #cbd5e1;
  --border-focus: #4f46e5;
  --bg-input: #f8fafc;
  --danger: #ef4444;
  --shadow: 0 15px 35px rgba(0, 0, 0, 0.05), 0 5px 15px rgba(0, 0, 0, 0.02);
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Inter", sans-serif;
}

body {
  background: var(--bg-gradient);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 24px;
  color: var(--text-dark);
}

.auth-container {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.auth-card {
  position: relative;
  background: var(--white);
  width: 100%;
  max-width: 440px;
  border-radius: 20px;
  padding: 40px 35px;
  box-shadow: var(--shadow);
  border-top: 5px solid var(--primary-color);
  animation: cardFadeIn 0.5s ease-out;
}

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

.logo-container {
  text-align: center;
  margin-bottom: 24px;
}

.logo-container img {
  max-width: 280px;
  max-height: 80px;
  object-fit: contain;
}

.auth-title {
  text-align: center;
  font-size: 28px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.auth-subtitle {
  text-align: center;
  font-size: 13.5px;
  color: var(--text-light);
  line-height: 1.5;
  margin-bottom: 28px;
}

.auth-subtitle.promo {
  font-size: 16px;
  font-weight: 600;
  color: var(--primary-color);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-wrapper .input-icon {
  position: absolute;
  left: 16px;
  font-size: 20px;
  color: #94a3b8;
  pointer-events: none;
  transition: var(--transition);
}

.input-wrapper input {
  width: 100%;
  padding: 14px 16px 14px 48px;
  font-size: 14px;
  color: var(--text-dark);
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  outline: none;
  transition: var(--transition);
}

.input-wrapper input::placeholder {
  color: #94a3b8;
}

.input-wrapper input:focus {
  border-color: var(--border-focus);
  background-color: var(--white);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

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

.input-wrapper.password-wrapper input {
  padding-right: 48px;
}

.input-wrapper .toggle-password {
  position: absolute;
  right: 16px;
  font-size: 20px;
  color: #94a3b8;
  cursor: pointer;
  transition: var(--transition);
}

.input-wrapper .toggle-password:hover {
  color: var(--primary-color);
}

.forgot-link-container {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}

.forgot-link {
  font-size: 13px;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
}

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

.auth-btn {
  width: 100%;
  padding: 14px;
  background: var(--primary-color);
  color: var(--white);
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
  margin-top: 28px;
}

.auth-btn i {
  font-size: 18px;
  transition: transform 0.2s ease;
}

.auth-btn:hover {
  background: var(--primary-hover);
  box-shadow: 0 8px 20px rgba(79, 70, 229, 0.25);
}

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

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

.auth-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 13px;
  color: var(--text-light);
}

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

.auth-footer a:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

/* Validation Style */
.error-msg {
  color: var(--danger);
  font-size: 12px;
  margin-top: 6px;
  display: none;
  font-weight: 500;
}

.input-wrapper.error-state input {
  border-color: var(--danger);
  background-color: #fef2f2;
}

.input-wrapper.error-state input:focus {
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.15);
}

.input-wrapper.error-state .input-icon {
  color: var(--danger);
}

/* Toast Message Style */
.toast-msg {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background-color: #1e293b;
  color: #ffffff;
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  display: none;
  animation: slideUp 0.3s ease-out;
  z-index: 1000;
}

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

.auth-wrapper {
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  position: relative;
}

/* Back Button Styles */
.back-btn {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--white);
  border: 1px solid var(--border-color);
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--text-light);
  text-decoration: none;
  transition: var(--transition);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  z-index: 100;
}

.back-btn i {
  font-size: 20px;
  color: var(--text-light);
  transition: transform 0.2s ease;
}

.back-btn:hover {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
}

.back-btn:hover i {
  color: var(--white);
  transform: translateX(-2px);
}

@media (max-width: 480px) {
  body {
    padding: 16px;
  }
  .auth-card {
    padding: 30px 24px;
    border-radius: 18px;
  }
  .auth-title {
    font-size: 22px;
    margin-bottom: 8px;
  }
  .auth-subtitle {
    font-size: 13px;
    margin-bottom: 24px;
  }
  .logo-container {
    margin-bottom: 20px;
  }
  .form-group {
    margin-bottom: 18px;
  }
  .input-wrapper input {
    padding: 12px 14px 12px 44px;
    font-size: 13.5px;
    border-radius: 12px;
  }
  .input-wrapper .input-icon {
    left: 14px;
    font-size: 19px;
  }
  .input-wrapper .toggle-password {
    right: 14px;
    font-size: 19px;
  }
  .auth-btn {
    padding: 12px;
    font-size: 14.5px;
    margin-top: 24px;
    border-radius: 12px;
  }
  .auth-footer {
    margin-top: 20px;
    font-size: 13px;
  }
  .back-btn {
    position: fixed;
    top: 16px;
    left: 16px;
    width: 36px;
    height: 36px;
  }
  .back-btn i {
    font-size: 18px;
  }
  .auth-wrapper {
    gap: 0;
  }
}

/* ==========================================================================
   Dual Auth Tabs & WhatsApp OTP Styles (Screenshot Match)
   ========================================================================== */
.auth-tabs {
  display: flex;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 5px;
  gap: 6px;
  margin-bottom: 24px;
}

.auth-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 16px;
  border-radius: 10px;
  font-size: 14.5px;
  font-weight: 600;
  color: #64748b;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  user-select: none;
}

.auth-tab i {
  font-size: 18px;
  transition: color 0.2s ease;
}

.auth-tab:hover {
  color: #1e293b;
}

.auth-tab.active {
  background: #ffffff;
  color: #1e293b;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
}

.auth-tab.active i.bxl-whatsapp {
  color: #25d366;
}

.auth-tab.active i.bx-lock-alt {
  color: #3b79b8;
}

/* Tab Panels */
.auth-pane {
  display: none;
  animation: fadeInPane 0.25s ease-out forwards;
}

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

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

/* Phone Input with Country Code Container */
.phone-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  background: #ffffff;
  border: 1.5px solid #dce4ec;
  border-radius: 14px;
  transition: var(--transition);
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.phone-input-wrapper:focus-within {
  border-color: #3b79b8;
  box-shadow: 0 0 0 4px rgba(59, 121, 184, 0.12);
  background: #ffffff;
}

.country-prefix {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 13px 14px 13px 16px;
  background: #f8fafc;
  border-right: 1px solid #e2e8f0;
  user-select: none;
}

.country-prefix .flag-icon {
  font-size: 18px;
  line-height: 1;
}

.country-prefix .caret-icon {
  font-size: 13px;
  color: #64748b;
}

.country-prefix .country-code {
  font-size: 14.5px;
  font-weight: 600;
  color: #1e293b;
  margin-left: 2px;
}

.phone-input-wrapper input {
  flex: 1;
  width: 100%;
  border: none;
  background: transparent;
  padding: 14px 16px;
  font-size: 15px;
  color: #1e293b;
  outline: none;
  letter-spacing: 0.3px;
}

.phone-input-wrapper input::placeholder {
  color: #94a3b8;
  font-weight: 400;
}

/* Auth Buttons matching Screenshot */
.auth-btn-blue {
  background: #3b79b8;
  color: #ffffff;
  border: none;
  border-radius: 14px;
  padding: 14px 20px;
  font-size: 15.5px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  transition: all 0.25s ease;
  margin-top: 24px;
  width: 100%;
  box-shadow: 0 4px 14px rgba(59, 121, 184, 0.28);
}

.auth-btn-blue:hover {
  background: #2e68a3;
  box-shadow: 0 6px 20px rgba(59, 121, 184, 0.38);
  transform: translateY(-1px);
}

.auth-btn-blue:active {
  transform: translateY(1px);
}

.auth-btn-blue i {
  font-size: 19px;
  transition: transform 0.2s ease;
}

.auth-btn-blue:hover i {
  transform: translateX(4px);
}

/* WhatsApp OTP Verification View */
.otp-card-view {
  display: none;
  animation: fadeInPane 0.3s ease-out;
}

.otp-info-banner {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 20px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.otp-info-banner i {
  color: #059669;
  font-size: 22px;
  margin-top: 1px;
}

.otp-info-banner .otp-info-text {
  font-size: 13px;
  color: #065f46;
  line-height: 1.4;
}

.otp-info-banner .otp-info-text strong {
  color: #047857;
  font-weight: 600;
}

.otp-boxes-wrapper {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 18px 0 10px 0;
}

.otp-digit-input {
  width: 52px;
  height: 56px;
  text-align: center;
  font-size: 24px;
  font-weight: 700;
  color: #1e293b;
  border: 2px solid #cbd5e1;
  border-radius: 12px;
  background: #f8fafc;
  outline: none;
  transition: var(--transition);
}

.otp-digit-input:focus {
  border-color: #3b79b8;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(59, 121, 184, 0.15);
}

.otp-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  font-size: 13px;
}

.otp-action-link {
  color: #3b79b8;
  background: none;
  border: none;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  transition: color 0.2s ease;
}

.otp-action-link:hover {
  color: #1e40af;
  text-decoration: underline;
}

.otp-action-link:disabled {
  color: #94a3b8;
  cursor: not-allowed;
  text-decoration: none;
}

/* Compact Responsive Tab Icon adjustments */
@media (max-width: 380px) {
  .auth-tab span {
    display: none;
  }
  .auth-tab {
    padding: 10px 12px;
  }
  .auth-tab i {
    font-size: 20px;
  }
}

/* ==========================================================================
   Signup OTP Verification View (Dedicated Separate OTP Box)
   ========================================================================== */
.signup-step-container {
  width: 100%;
  animation: fadeInPane 0.3s ease-out forwards;
}

.email-icon-circle,
.wa-icon-circle {
  width: 68px;
  height: 68px;
  background: #ecfdf5;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
  color: #25d366;
  font-size: 38px;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.18);
  border: 2px solid rgba(37, 211, 102, 0.15);
}

.otp-live-badge {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 12px;
  padding: 10px 14px;
  margin: 16px 0 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.08);
}

.otp-live-badge-left {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #166534;
  font-weight: 500;
}

.otp-live-badge-left strong {
  font-size: 16px;
  letter-spacing: 2px;
  color: #15803d;
  background: #dcfce7;
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid #86efac;
}

.btn-copy-live-otp {
  background: #ffffff;
  border: 1px solid #86efac;
  color: #15803d;
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
  user-select: none;
}

.btn-copy-live-otp:hover {
  background: #15803d;
  color: #ffffff;
  border-color: #15803d;
}

.signup-otp-boxes {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 20px 0 14px;
}

.signup-otp-box {
  width: 56px;
  height: 60px;
  border: 2px solid #cbd5e1;
  border-radius: 14px;
  background: #f8fafc;
  text-align: center;
  font-size: 26px;
  font-weight: 700;
  color: #1e293b;
  outline: none;
  transition: all 0.2s ease;
}

.signup-otp-box:focus {
  border-color: #4f46e5;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.15);
  transform: translateY(-2px);
}

.signup-otp-box.filled {
  border-color: #4f46e5;
  background: #ffffff;
}

.signup-otp-box.error-box {
  border-color: #ef4444;
  background: #fef2f2;
  animation: shakeBox 0.35s ease-in-out;
}

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

.otp-resend-row {
  text-align: center;
  font-size: 14px;
  color: #64748b;
  margin-top: 10px;
  margin-bottom: 24px;
}

.otp-resend-row a {
  color: #4f46e5;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
  transition: color 0.2s ease;
}

.otp-resend-row a:hover {
  color: #4338ca;
}

@media (max-width: 420px) {
  .signup-otp-box {
    width: 48px;
    height: 52px;
    font-size: 22px;
    border-radius: 12px;
  }
  .signup-otp-boxes {
    gap: 8px;
  }
}

