/* ============================================
   Global Styles & Variables - Teal Theme
   ============================================ */
:root {
  --primary-teal: #3d8b8b;
  --primary-teal-dark: #2d7373;
  --primary-teal-light: #4a9e9e;
  --golden-yellow: #f5b83d;
  --golden-yellow-dark: #e8a830;
  --white: #ffffff;
  --light-gray: #e8ecef;
  --bg-gray: #dce3e8;
  --text-dark: #2d3436;
  --text-light: #636e72;
  --text-muted: #b2bec3;
  --footer-bg: #f1f5f9;
  --shadow-light: rgba(0, 0, 0, 0.08);
  --shadow-medium: rgba(0, 0, 0, 0.12);
  --transition-speed: 0.3s;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  font-family: "Poppins", sans-serif;
  background-color: var(--bg-gray);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  position: relative;
}

/* ============================================
   Diagonal Striped Background
   ============================================ */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    transparent 0%,
    transparent 40%,
    rgba(255, 255, 255, 0.4) 40%,
    rgba(255, 255, 255, 0.4) 45%,
    transparent 45%,
    transparent 55%,
    rgba(255, 255, 255, 0.3) 55%,
    rgba(255, 255, 255, 0.3) 60%,
    transparent 60%,
    transparent 70%,
    rgba(255, 255, 255, 0.25) 70%,
    rgba(255, 255, 255, 0.25) 75%,
    transparent 75%,
    transparent 100%
  );
  background-size: 100% 100%;
  pointer-events: none;
  z-index: 0;
}

/* ============================================
   Main Container
   ============================================ */
.main-wrapper {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px 20px;
  position: relative;
  z-index: 1;
}

.forgot-password-container,
.verification-container {
  width: 100%;
  max-width: 900px;
  min-height: 500px;
  display: flex;
  background: var(--white);
  border-radius: 5px;
  overflow: hidden;
  box-shadow: 0 20px 60px var(--shadow-medium);
  position: relative;
}

/* ============================================
   Left Panel (White - Form Section)
   ============================================ */
.left-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 50px 40px;
  background: var(--white);
  position: relative;
}

/* ============================================
   Right Panel (Teal - Info Section)
   ============================================ */
.right-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 50px 40px;
  background: var(--primary-teal);
  color: var(--white);
  border-radius: 0 5px 5px 0;
}

/* ============================================
   Back Button
   ============================================ */
.back-btn {
  position: absolute;
  top: 20px;
  left: 20px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dark);
  text-decoration: none;
  font-size: 1.3rem;
  transition: all var(--transition-speed) ease;
  border-radius: 50%;
  z-index: 10;
}

.back-btn:hover {
  color: var(--primary-teal);
  background: rgba(61, 139, 139, 0.1);
  transform: translateX(-3px);
}

/* Mobile back button on teal background */
.back-btn.on-teal {
  color: var(--white);
}

.back-btn.on-teal:hover {
  background: rgba(255, 255, 255, 0.15);
  color: var(--white);
}

/* ============================================
   Title Section
   ============================================ */
.title-section {
  text-align: center;
  margin-bottom: 35px;
}

.main-title {
  color: var(--text-dark);
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

.main-title.white {
  color: var(--white);
}

.subtitle {
  color: var(--text-light);
  font-size: 0.85rem;
  font-weight: 400;
  line-height: 1.6;
}

.subtitle.white {
  color: rgba(255, 255, 255, 0.85);
}

/* ============================================
   Illustration Styles
   ============================================ */
.illustration-container {
  margin-bottom: 25px;
}

.dog-illustration {
  width: 100px;
  height: 70px;
  position: relative;
}

.corgi-svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

/* Checkmark Illustration for Verification Page */
.checkmark-illustration {
  display: flex;
  justify-content: center;
  align-items: center;
}

.checkmark-bg {
  width: 70px;
  height: 70px;
  background: var(--golden-yellow);
  border-radius: 5px;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 8px 25px rgba(245, 184, 61, 0.35);
  animation: pulse 2s infinite;
}

.checkmark-icon {
  font-size: 2rem;
  color: var(--white);
  font-weight: bold;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

/* ============================================
   Form Section
   ============================================ */
.form-section {
  width: 100%;
  max-width: 280px;
}

.input-group-custom {
  margin-bottom: 25px;
}

.custom-input {
  width: 100%;
  padding: 14px 0;
  font-size: 0.9rem;
  border: none;
  border-bottom: 1px solid var(--text-muted);
  background: transparent;
  color: var(--text-dark);
  transition: all var(--transition-speed) ease;
}

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

.custom-input:focus {
  outline: none;
  border-bottom-color: var(--primary-teal);
}

/* ============================================
   Buttons
   ============================================ */
.get-otp-btn,
.verify-btn {
  width: auto;
  min-width: 140px;
  padding: 12px 35px;
  font-size: 0.85rem;
  font-weight: 600;
  border: none;
  border-radius: 10px;
  background: var(--primary-teal);
  color: var(--white);
  cursor: pointer;
  transition: all var(--transition-speed) ease;
  box-shadow: 0 4px 15px rgba(61, 139, 139, 0.3);
  text-transform: uppercase;
  letter-spacing: 1px;
  display: block;
  margin: 0 auto;
}

.get-otp-btn:hover,
.verify-btn:hover {
  background: var(--primary-teal-dark);
}

.get-otp-btn:active,
.verify-btn:active {
  box-shadow: 0 4px 15px rgba(61, 139, 139, 0.3);
}

/* Outline button for right panel */
.btn-outline {
  background: transparent;
  border: 2px solid var(--white);
  color: var(--white);
  box-shadow: none;
  border-radius: 10px;
}

.btn-outline:hover {
  background: var(--white);
  color: var(--primary-teal);
}

/* ============================================
   OTP Section
   ============================================ */
.otp-section {
  width: 100%;
  max-width: 280px;
}

.otp-inputs {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 20px;
}

.otp-input {
  width: 50px;
  height: 50px;
  text-align: center;
  font-size: 1.3rem;
  font-weight: 600;
  border: 1px solid var(--text-muted);
  border-radius: 5px;
  background: var(--white);
  color: var(--text-dark);
  transition: all var(--transition-speed) ease;
}

.otp-input::placeholder {
  color: var(--text-muted);
}

.otp-input:focus {
  outline: none;
  border-color: var(--primary-teal);
  box-shadow: 0 0 10px rgba(61, 139, 139, 0.2);
  transform: scale(1.05);
}

.otp-input.filled {
  background: rgba(61, 139, 139, 0.08);
  border-color: var(--primary-teal);
}

/* OTP inputs on teal background (mobile) */
.otp-input.on-teal {
  border: 2px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
}

.otp-input.on-teal:focus {
  border-color: var(--white);
  background: rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}

.otp-input.on-teal.filled {
  background: rgba(255, 255, 255, 0.25);
  border-color: var(--golden-yellow);
}

/* ============================================
   Resend Section
   ============================================ */
.resend-section {
  text-align: center;
  margin-bottom: 25px;
}

.resend-text {
  color: var(--text-light);
  font-size: 0.8rem;
  font-weight: 400;
}

.resend-link {
  color: var(--primary-teal);
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  margin-left: 5px;
  transition: all var(--transition-speed) ease;
}

.resend-link:hover {
  color: var(--primary-teal-dark);
  text-decoration: none;
}

.resend-link.disabled {
  color: var(--text-muted);
  pointer-events: none;
}

/* Resend on teal (mobile) */
.resend-text.on-teal {
  color: rgba(255, 255, 255, 0.7);
}

.resend-link.on-teal {
  color: var(--golden-yellow);
}

/* ============================================
   Lock Illustration (New Password Page)
   ============================================ */
.lock-illustration {
  display: flex;
  justify-content: center;
  align-items: center;
}

.lock-bg {
  width: 70px;
  height: 70px;
  background: var(--primary-teal);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 8px 25px rgba(61, 139, 139, 0.35);
}

.lock-icon {
  font-size: 2rem;
  color: var(--white);
}

/* ============================================
   Timer Illustration (Enter Email Page)
   ============================================ */
.timer-illustration {
  display: flex;
  justify-content: center;
  align-items: center;
}

.timer-circle {
  width: 100px;
  height: 100px;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.timer-svg {
  position: absolute;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.timer-bg-circle {
  fill: none;
  stroke: var(--light-gray);
  stroke-width: 6;
}

.timer-progress-circle {
  fill: none;
  stroke: var(--primary-teal);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-dasharray: 283;
  stroke-dashoffset: 0;
  transition:
    stroke-dashoffset 1s linear,
    stroke 0.3s ease;
}

.timer-progress-circle.warning {
  stroke: var(--golden-yellow);
}

.timer-progress-circle.danger {
  stroke: #e74c3c;
}

.timer-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 1;
}

.timer-count {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary-teal);
  line-height: 1;
}

.timer-count.warning {
  color: var(--golden-yellow);
}

.timer-count.danger {
  color: #e74c3c;
}

.timer-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ============================================
   Password Input Group with Toggle
   ============================================ */
.password-group {
  position: relative;
}

.toggle-password {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 5px;
  cursor: pointer;
  color: var(--text-muted);
  transition: color var(--transition-speed) ease;
}

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

.toggle-password:focus {
  outline: none;
}

/* ============================================
   Password Requirements
   ============================================ */
.password-requirements {
  margin-bottom: 25px;
  text-align: left;
}

.req-title {
  font-size: 0.75rem;
  color: var(--text-light);
  margin-bottom: 8px;
  font-weight: 500;
}

.req-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.req-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-bottom: 5px;
  transition: color var(--transition-speed) ease;
}

.req-item i {
  font-size: 0.6rem;
}

.req-item.valid {
  color: #27ae60;
}

.req-item.valid i::before {
  content: "\F26A"; /* Bootstrap check-circle-fill */
}

/* ============================================
   Timer Expired Message
   ============================================ */
.timer-expired-message {
  margin-top: 20px;
  text-align: center;
}

.expired-text {
  color: #e74c3c;
  font-size: 0.85rem;
  margin: 0;
}

.expired-text i {
  margin-right: 5px;
}

.expired-text a {
  color: var(--primary-teal);
  font-weight: 600;
  text-decoration: none;
  margin-left: 5px;
}

.expired-text a:hover {
  text-decoration: none;
}

/* Disabled state for form */
.custom-input:disabled {
  background: var(--light-gray);
  cursor: not-allowed;
  opacity: 0.7;
}

.get-otp-btn:disabled,
.verify-btn:disabled {
  background: var(--text-muted);
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

/* ============================================
   Right Panel Content
   ============================================ */
.right-panel .illustration-container {
  margin-bottom: 20px;
}

.right-panel .main-title {
  color: var(--white);
  font-size: 1.6rem;
}

.right-panel .subtitle {
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 25px;
}

/* ============================================
   Footer
   ============================================ */
.footer {
  background: var(--footer-bg);
  padding: 5px 0px;
  text-align: center;
  position: relative;
  z-index: 1;
  border-top: 1px solid #e2e8f0;
}

.footer-text {
  color: #64748b;
  font-size: 0.75rem;
  font-weight: 400;
  margin: 0;
}

/* ============================================
   Responsive Styles
   ============================================ */

/* Mobile First - Stack panels vertically */
@media (max-width: 767px) {
  .main-wrapper {
    padding: 0;
    align-items: stretch;
  }

  .forgot-password-container,
  .verification-container {
    flex-direction: column;
    min-height: calc(100vh - 50px);
    border-radius: 0;
    box-shadow: none;
    max-width: 100%;
  }

  /* Mobile: Teal top section */
  .right-panel {
    order: -1;
    border-radius: 0;
    padding: 60px 30px 40px;
    flex: 0 0 auto;
  }

  /* Mobile: White bottom section */
  .left-panel {
    flex: 1;
    padding: 40px 30px;
    border-radius: 5px 5px 0 0;
    margin-top: -25px;
    position: relative;
    z-index: 2;
  }

  .back-btn {
    position: fixed;
    top: 15px;
    left: 15px;
    color: var(--white);
    z-index: 100;
  }

  .back-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--white);
  }

  .right-panel .main-title {
    font-size: 1.4rem;
  }

  .right-panel .subtitle {
    font-size: 0.8rem;
  }

  /* Hide decorative button on mobile */
  .right-panel .btn-outline {
    display: none;
  }
}

/* Extra Small Devices (phones, 320px and up) */
@media (max-width: 374px) {
  .left-panel,
  .right-panel {
    padding: 30px 20px;
  }

  .left-panel {
    padding-top: 35px;
  }

  .main-title {
    font-size: 1.3rem;
  }

  .subtitle {
    font-size: 0.75rem;
  }

  .form-section,
  .otp-section {
    max-width: 100%;
  }

  .custom-input {
    padding: 12px 0;
    font-size: 0.85rem;
  }

  .otp-inputs {
    gap: 8px;
  }

  .otp-input {
    width: 45px;
    height: 45px;
    font-size: 1.1rem;
  }

  .get-otp-btn,
  .verify-btn {
    padding: 10px 30px;
    font-size: 0.8rem;
    min-width: 120px;
  }

  .checkmark-bg {
    width: 55px;
    height: 55px;
  }

  .checkmark-icon {
    font-size: 1.6rem;
  }
}

/* Small Devices (landscape phones, 375px to 575px) */
@media (min-width: 375px) and (max-width: 575px) {
  .left-panel {
    padding: 40px 25px;
  }

  .right-panel {
    padding: 50px 25px 35px;
  }
}

/* Tablets (576px to 767px) */
@media (min-width: 576px) and (max-width: 767px) {
  .left-panel {
    padding: 50px 40px;
  }

  .right-panel {
    padding: 60px 40px 45px;
  }

  .main-title {
    font-size: 1.5rem;
  }

  .form-section,
  .otp-section {
    max-width: 320px;
  }
}

/* Medium Devices (tablets, 768px and up) - Side by side layout */
@media (min-width: 768px) {
  .forgot-password-container,
  .verification-container {
    flex-direction: row;
    min-height: 480px;
  }

  .left-panel,
  .right-panel {
    flex: 1;
  }

  .right-panel {
    order: 0;
    border-radius: 0 5px 5px 0;
  }

  .left-panel {
    margin-top: 0;
    border-radius: 5px 0 0 5px;
  }
}

/* Medium to Large (768px to 991px) */
@media (min-width: 768px) and (max-width: 991px) {
  .main-wrapper {
    padding: 30px 20px;
  }

  .forgot-password-container,
  .verification-container {
    max-width: 720px;
  }

  .left-panel,
  .right-panel {
    padding: 40px 30px;
  }

  .main-title {
    font-size: 1.5rem;
  }

  .otp-input {
    width: 48px;
    height: 48px;
  }
}

/* Large Devices (desktops, 992px and up) */
@media (min-width: 992px) {
  .main-wrapper {
    padding: 50px 40px;
  }

  .forgot-password-container,
  .verification-container {
    max-width: 850px;
    min-height: 500px;
  }

  .left-panel,
  .right-panel {
    padding: 60px 50px;
  }

  .main-title {
    font-size: 1.75rem;
  }

  .dog-illustration {
    width: 110px;
    height: 75px;
  }

  .form-section,
  .otp-section {
    max-width: 300px;
  }

  .otp-inputs {
    gap: 15px;
  }

  .otp-input {
    width: 55px;
    height: 55px;
    font-size: 1.4rem;
  }

  .checkmark-bg {
    width: 80px;
    height: 80px;
  }

  .checkmark-icon {
    font-size: 2.4rem;
  }
}

/* Extra Large Devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
  .forgot-password-container,
  .verification-container {
    max-width: 920px;
    min-height: 520px;
  }

  .left-panel,
  .right-panel {
    padding: 70px 60px;
  }

  .main-title {
    font-size: 1.9rem;
  }

  .right-panel .main-title {
    font-size: 1.75rem;
  }
}

/* Ultra Wide Screens (1400px and up) */
@media (min-width: 1400px) {
  .main-wrapper {
    padding: 60px;
  }

  .forgot-password-container,
  .verification-container {
    max-width: 950px;
  }
}

/* Landscape Mode Adjustments for Mobile */
@media (max-height: 500px) and (orientation: landscape) {
  .main-wrapper {
    padding: 10px;
    align-items: center;
  }

  .forgot-password-container,
  .verification-container {
    flex-direction: row;
    min-height: auto;
    max-width: 100%;
    border-radius: 5px;
  }

  .left-panel,
  .right-panel {
    padding: 25px 30px;
  }

  .left-panel {
    margin-top: 0;
    border-radius: 5px 0 0 5px;
  }

  .right-panel {
    order: 0;
    border-radius: 0 5px 5px 0;
  }

  .back-btn {
    position: absolute;
    top: 10px;
    left: 10px;
    color: var(--text-dark);
  }

  .illustration-container {
    margin-bottom: 15px;
  }

  .title-section {
    margin-bottom: 20px;
  }

  .main-title {
    font-size: 1.3rem;
  }

  .subtitle {
    font-size: 0.75rem;
  }

  .footer {
    padding: 10px;
  }
}

/* High DPI / Retina Display Adjustments */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .custom-input,
  .otp-input {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
}

/* Reduced Motion Preference */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Print Styles */
@media print {
  body::before {
    display: none;
  }

  .back-btn,
  .footer {
    display: none;
  }

  .forgot-password-container,
  .verification-container {
    box-shadow: none;
  }
}

/* ============================================================
   BROWSER DARK MODE NEUTRALIZER – Forgot Password / Email Change
   ============================================================ */
