/* =============================================
   auth.css — Login & OTP styles
   ============================================= */

.auth-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-screen);
}

.auth-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
}

/* ---- Left Panel ---- */
.auth-left {
  background: linear-gradient(145deg, #fff0f3 0%, #ffe0e6 50%, #ffd6e0 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px;
  position: relative;
  overflow: hidden;
}

.auth-left::before {
  content: '';
  position: absolute;
  top: -80px; right: -80px;
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(233,64,87,0.15), transparent 70%);
  border-radius: 50%;
}

.auth-brand { text-align: center; z-index: 1; }

.brand-logo {
  width: 100px;
  height: 100px;
  margin: 0 auto 16px;
}
.brand-logo .logo-img {
  width: 100%; height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 4px 16px rgba(233,64,87,0.3));
  animation: floatLogo 3s ease-in-out infinite;
}

@keyframes floatLogo {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.brand-name {
  font-family: var(--font-display);
  font-size: 42px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -1px;
}

.brand-tagline {
  font-size: 16px;
  color: var(--text-secondary);
  margin-top: 8px;
  font-style: italic;
}

/* Floating Cards */
.auth-illustration {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.floating-card {
  position: absolute;
  background: #fff;
  border-radius: 12px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  box-shadow: var(--shadow-md);
  animation: floatCard 4s ease-in-out infinite;
}

.fc1 { top: 18%; left: 8%; animation-delay: 0s; }
.fc2 { bottom: 28%; right: 5%; animation-delay: 1.5s; }
.fc3 { bottom: 18%; left: 10%; animation-delay: 0.8s; }

@keyframes floatCard {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-10px) rotate(1deg); }
}

/* ---- Right Panel ---- */
.auth-right {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
  background: var(--bg-card);
}

.auth-panel {
  width: 100%;
  max-width: 380px;
  display: none;
  animation: fadeInUp 0.4s ease;
}
.auth-panel.active { display: block; }

.panel-title {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.panel-sub {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 32px;
}

/* Phone Input */
.input-group.phone-group {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--bg-screen);
  border: 1.5px solid var(--divider);
  border-radius: var(--border-radius-sm);
  overflow: hidden;
  margin-bottom: 20px;
  transition: border-color var(--transition);
}
.input-group.phone-group:focus-within { border-color: var(--primary); }

.phone-prefix {
  padding: 14px 16px;
  font-weight: 700;
  font-size: 15px;
  color: var(--text-primary);
  background: transparent;
  white-space: nowrap;
}

.divider-v {
  width: 1px;
  height: 28px;
  background: var(--divider);
}

.input-group.phone-group input {
  flex: 1;
  padding: 14px 16px;
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--text-primary);
}
.input-group.phone-group input::placeholder { color: var(--text-muted); }

/* OTP Row */
.otp-row {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 28px;
}

.otp-box {
  width: 50px;
  height: 56px;
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  background: var(--bg-screen);
  border: 1.5px solid var(--divider);
  border-radius: 10px;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  caret-color: var(--primary);
}
.otp-box:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(233,64,87,0.15);
}

.auth-legal {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 16px;
  line-height: 1.6;
}
.auth-legal a { color: var(--primary); }

.back-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  margin-bottom: 24px;
  padding: 0;
  font-family: var(--font-body);
  transition: color var(--transition);
}
.back-btn:hover { color: var(--primary); }

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .auth-container {
    display: flex;
    flex-direction: column;
    gap: 0;
    min-height: 100vh;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    background: linear-gradient(180deg, #ffe6ef 0%, #fff 35%, #fff 100%);
  }

  .auth-left {
    display: flex;
    padding: 28px 18px 22px;
    min-height: 240px;
    border-radius: 0 0 18px 18px;
    box-shadow: none;
    align-items: center;
    justify-content: center;
    text-align: center;
  }

  .floating-card { display: none; }

  .brand-logo {
    width: 80px;
    height: 80px;
    margin-bottom: 10px;
  }

  .brand-name {
    font-size: 30px;
  }

  .brand-tagline {
    font-size: 14px;
    margin-top: 4px;
  }

  .auth-right {
    padding: 20px 18px 28px;
    width: 100%;
    background: #fff;
    border-radius: 18px 18px 0 0;
    box-shadow: none;
  }

  .auth-panel {
    max-width: 100%;
  }

  .panel-title {
    font-size: 24px;
    margin-bottom: 8px;
    text-align: center;
  }

  .panel-sub {
    font-size: 14px;
    text-align: center;
  }

  .input-group {
    margin-bottom: 18px;
  }

  .phone-prefix {
    font-size: 14px;
  }

  #phoneInput {
    font-size: 16px;
  }

  .otp-row {
    gap: 10px;
    margin-bottom: 22px;
  }

  .otp-box {
    width: 48px;
    height: 52px;
    font-size: 18px;
  }

  .btn-primary {
    font-size: 15px;
    padding: 13px 18px;
  }

  .auth-legal {
    font-size: 11px;
  }

  .back-btn {
    font-size: 13px;
    margin-bottom: 18px;
  }
}

@media (max-width: 480px) {
  .auth-container {
    padding: 0;
  }

  .auth-left {
    padding: 22px 14px 18px;
    min-height: 200px;
    border-radius: 0 0 18px 18px;
  }

  .auth-right {
    padding: 18px 14px 26px;
    min-height: auto;
    border-radius: 18px 18px 0 0;
  }

  .auth-panel {
    padding: 0;
  }

  .panel-title {
    font-size: 20px;
    margin-bottom: 6px;
    line-height: 1.3;
  }

  .panel-sub {
    font-size: 13px;
    margin-bottom: 18px;
  }

  .input-group {
    margin-bottom: 16px;
  }

  .phone-group {
    height: 46px;
  }

  .phone-prefix {
    font-size: 13px;
  }

  #phoneInput {
    font-size: 15px;
    padding: 10px 12px;
  }

  .divider-v {
    height: 22px;
  }

  .otp-row {
    gap: 8px;
    margin-bottom: 18px;
  }

  .otp-box {
    width: 44px;
    height: 48px;
    font-size: 17px;
    border-radius: 9px;
  }

  .btn-primary {
    width: 100%;
    padding: 12px;
    font-size: 13px;
    border-radius: 12px;
    margin-bottom: 14px;
  }

  .btn-text {
    font-size: 13px;
  }

  .btn-loader {
    font-size: 12px;
  }

  .auth-legal {
    font-size: 10px;
    margin-top: 10px;
    line-height: 1.4;
  }

  .back-btn {
    font-size: 12px;
    margin-bottom: 14px;
    padding: 8px 0;
  }

  .auth-left::before {
    width: 200px;
    height: 200px;
    top: -50px;
    right: -50px;
  }

  .brand-logo {
    width: 68px;
    height: 68px;
    margin: 0 auto 10px;
  }

  .brand-name {
    font-size: 26px;
  }

  .brand-tagline {
    font-size: 12px;
  }
}

@media (max-width: 360px) {
  .auth-right {
    padding: 16px 12px;
  }

  .panel-title {
    font-size: 18px;
  }

  .panel-sub {
    font-size: 12px;
  }

  .otp-box {
    width: 36px;
    height: 40px;
    font-size: 14px;
  }

  .btn-primary {
    padding: 10px 10px;
    font-size: 12px;
  }

  #phoneInput {
    font-size: 14px;
  }
}

/* Landscape mode adjustments */
@media (max-height: 600px) and (max-width: 768px) {
  .auth-right {
    padding: 20px 16px;
    min-height: auto;
  }

  .panel-title {
    font-size: 20px;
    margin-bottom: 4px;
  }

  .panel-sub {
    font-size: 12px;
    margin-bottom: 12px;
  }

  .input-group {
    margin-bottom: 12px;
  }

  .otp-row {
    gap: 4px;
    margin-bottom: 12px;
  }

  .otp-box {
    width: 35px;
    height: 40px;
    font-size: 14px;
  }

  .btn-primary {
    padding: 8px 10px;
    font-size: 12px;
    margin-bottom: 8px;
  }

  .auth-legal {
    font-size: 9px;
  }
}
