/* ─── AUTH PAGES (login.html / signup.html) ─── */
/* Extends style.css — import style.css first */

/* ─── FORGOT PASSWORD STATE MACHINE ─── */

/* Step panels */
.fp-panel { display: none; }
.fp-panel.active { display: block; }

/* Back link */
.fp-back {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  margin-bottom: 1.75rem;
  transition: color 0.15s;
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
  font-family: inherit;
}
.fp-back svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}
.fp-back:hover { color: var(--navy); }

/* Success icon ring */
.fp-success-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #E8F9F9 0%, #C6EFEF 100%);
  border: 1.5px solid #B2E5E5;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  animation: successPop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.fp-success-icon svg {
  width: 28px;
  height: 28px;
  stroke: var(--teal-dark);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
@keyframes successPop {
  from { transform: scale(0.6); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}

/* Centered success header */
.fp-success-header {
  text-align: center;
  margin-bottom: 1.75rem;
}
.fp-success-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.4px;
  margin-bottom: 0.5rem;
}
.fp-success-header p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.65;
  max-width: 320px;
  margin: 0 auto;
}
.fp-success-header p strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* Email preview chip */
.fp-email-chip {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.75rem 1rem;
  background: var(--off-white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
}
.fp-email-chip svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--teal-dark);
}
.fp-email-chip span {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Resend note */
.fp-resend-note {
  text-align: center;
  margin-top: 1.25rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.fp-resend-note button {
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  font-size: inherit;
  font-weight: 600;
  color: var(--teal-dark);
  cursor: pointer;
  transition: color 0.15s;
}
.fp-resend-note button:hover { color: var(--navy); }
.fp-resend-note button:disabled {
  color: var(--text-muted);
  cursor: default;
}

/* Countdown badge */
.fp-countdown {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 0.5rem;
}
.fp-countdown-ring {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  border-top-color: var(--teal);
  animation: spin 1s linear infinite;
}

/* Left panel illustration — envelope float */
.fp-illustration {
  margin-top: 2.25rem;
  padding: 2rem 1.75rem;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.fp-illustration-title {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  margin-bottom: 0.25rem;
}

/* Steps list on left panel */
.fp-steps-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}
.fp-step-row {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
}
.fp-step-num {
  width: 22px;
  height: 22px;
  min-width: 22px;
  border-radius: 50%;
  background: rgba(42,181,181,0.18);
  border: 1px solid rgba(42,181,181,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--teal);
  margin-top: 1px;
}
.fp-step-text {
  font-size: 0.83rem;
  color: rgba(255,255,255,0.72);
  line-height: 1.55;
}
.fp-step-text strong {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 0.1rem;
}

/* Alert banner (inline error) */
.fp-alert {
  display: none;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.8rem 1rem;
  border-radius: var(--radius);
  font-size: 0.82rem;
  margin-bottom: 1.25rem;
  line-height: 1.5;
}
.fp-alert.visible { display: flex; }
.fp-alert-error {
  background: #FEF2F2;
  border: 1px solid #FECACA;
  color: #B91C1C;
}
.fp-alert svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 1px;
}

/* Helper text under input */
.form-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
  line-height: 1.5;
}

/* Security badge row */
.fp-security-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.73rem;
  color: var(--text-muted);
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-light);
}
.fp-security-row svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  color: var(--teal-dark);
}

/* Fade-in for panel transitions */
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fp-panel.active {
  animation: fadeSlideUp 0.3s ease both;
}

/* ─── AUTH LAYOUT ─── */
.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: auto 1fr !important;
}

/* ─── LEFT PANEL ─── */
/* Hero-style gradient from profile.css - dark blue gradient with pattern */
.auth-panel-left {
  background:
    radial-gradient(900px 420px at 85% -10%, rgba(42,181,181,0.32), transparent 60%),
    radial-gradient(700px 380px at -10% 110%, rgba(42,78,143,0.55), transparent 60%),
    linear-gradient(118deg, var(--navy-deep) 0%, var(--navy) 58%, #15507A 100%);
  display: flex;
  flex-direction: column;
  padding: 3rem 3.5rem;
  position: relative;
  overflow: hidden;
}

/* Subtle dot grid texture from profile.css hero */
.auth-panel-left::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.45;
  background-image: radial-gradient(rgba(255,255,255,0.07) 1px, transparent 1px);
  background-size: 26px 26px;
}

/* Optional decorative blur elements for depth (matching profile hero style) */
.auth-panel-left::after {
  content: '';
  position: absolute;
  bottom: -120px;
  right: -80px;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(42,181,181,0.15) 0%, transparent 70%);
  pointer-events: none;
}

.auth-left-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: auto;
  text-decoration: none;
  position: relative;
  z-index: 1;
}
.auth-left-logo img { width: 44px; height: auto; }
.auth-logo-wordmark {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.25px;
}
.auth-logo-wordmark span { color: var(--teal); }
.auth-logo-wordmark small {
  font-weight: 400;
  color: rgba(255,255,255,0.5);
  font-size: 0.9em;
}

.auth-left-content {
  padding: 3rem 0 2rem;
  position: relative;
  z-index: 1;
}
.auth-left-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 1.25rem;
}
.auth-left-eyebrow::before {
  content: '';
  display: block;
  width: 18px;
  height: 2px;
  background: var(--teal);
  border-radius: 2px;
}
.auth-left-content h2 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1.2;
  letter-spacing: -0.5px;
  margin-bottom: 1rem;
}
.auth-left-content h2 em {
  font-style: normal;
  color: var(--teal);
}
.auth-left-content p {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.65);
  line-height: 1.8;
  max-width: 340px;
  margin-bottom: 2.5rem;
}

.auth-testimonial {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-md);
  padding: 1.5rem 1.75rem;
  position: relative;
}
.auth-testimonial::before {
  content: '"';
  position: absolute;
  top: -0.5rem;
  left: 1.4rem;
  font-size: 3rem;
  line-height: 1;
  color: var(--teal);
  font-family: Georgia, serif;
  opacity: 0.8;
}
.auth-testimonial p {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.82);
  line-height: 1.7;
  margin-bottom: 1rem;
  font-style: italic;
}
.auth-testimonial-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.auth-testimonial-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--teal) 0%, var(--navy) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--white);
  flex-shrink: 0;
}
.auth-testimonial-info strong {
  display: block;
  font-size: 0.8rem;
  color: var(--white);
  font-weight: 600;
}
.auth-testimonial-info span {
  font-size: 0.73rem;
  color: rgba(255,255,255,0.5);
}

.auth-stats {
  display: flex;
  gap: 2rem;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  position: relative;
  z-index: 1;
}
.auth-stat-num {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.5px;
}
.auth-stat-label {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.45);
  font-weight: 500;
}

/* ─── RIGHT PANEL ─── */
.auth-panel-right {
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 4rem;
}
.auth-form-wrap {
  width: 100%;
  max-width: 400px;
}

.auth-form-header {
  margin-bottom: 2rem;
}
.auth-form-header h1 {
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.4px;
  margin-bottom: 0.4rem;
}
.auth-form-header p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
}
.auth-form-header a {
  color: var(--teal-dark);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s;
}
.auth-form-header a:hover { border-color: var(--teal-dark); }

/* ─── FORM ELEMENTS ─── */
.form-group {
  margin-bottom: 1.1rem;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
  letter-spacing: 0.01em;
}
.form-label .required {
  color: var(--teal);
  margin-left: 2px;
}
.form-control {
  width: 100%;
  padding: 0.62rem 0.9rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-family: inherit;
  color: var(--text-primary);
  background: var(--white);
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
  -webkit-appearance: none;
}
.form-control::placeholder { color: var(--text-muted); }
.form-control:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(27,61,122,0.08);
}
.form-control.is-error {
  border-color: #E05252;
  box-shadow: 0 0 0 3px rgba(224,82,82,0.08);
}
.form-control.is-valid {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(42,181,181,0.08);
}
.form-error {
  display: none;
  font-size: 0.75rem;
  color: #E05252;
  margin-top: 0.3rem;
  font-weight: 500;
}
.form-error.visible { display: block; }

.input-icon-wrap {
  position: relative;
}
.input-icon-wrap .form-control {
  padding-left: 2.4rem;
}
.input-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  pointer-events: none;
  flex-shrink: 0;
}
.input-toggle-pw {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 0;
  line-height: 1;
  transition: color 0.15s;
}
.input-toggle-pw:hover { color: var(--navy); }
.input-toggle-pw svg { width: 16px; height: 16px; }

select.form-control {
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237A90AA' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  padding-right: 2.25rem;
  cursor: pointer;
}

/* ─── PASSWORD STRENGTH ─── */
.pw-strength {
  margin-top: 0.5rem;
}
.pw-strength-bars {
  display: flex;
  gap: 3px;
  margin-bottom: 0.3rem;
}
.pw-bar {
  height: 3px;
  flex: 1;
  border-radius: 2px;
  background: var(--border);
  transition: background 0.25s;
}
.pw-bar.active-weak { background: #E05252; }
.pw-bar.active-fair { background: #F0A030; }
.pw-bar.active-good { background: var(--teal); }
.pw-bar.active-strong { background: var(--navy); }
.pw-strength-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ─── DIVIDER ─── */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem 0;
}
.auth-divider-line {
  flex: 1;
  height: 1px;
  background: var(--border);
}
.auth-divider-text {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
}

/* ─── SUBMIT BUTTON ─── */
.auth-submit {
  width: 100%;
  padding: 0.78rem 1.5rem;
  background: var(--navy);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.18s, box-shadow 0.18s, transform 0.1s;
  letter-spacing: 0.01em;
  margin-top: 0.5rem;
  position: relative;
  overflow: hidden;
}
.auth-submit:hover {
  background: var(--navy-deep);
  box-shadow: 0 4px 14px rgba(15,37,80,0.22);
}
.auth-submit:active { transform: translateY(1px); }
.auth-submit.loading { pointer-events: none; opacity: 0.75; }
.auth-submit .btn-text { transition: opacity 0.2s; }
.auth-submit .btn-spinner {
  display: none;
  position: absolute;
  inset: 0;
  align-items: center;
  justify-content: center;
}
.auth-submit.loading .btn-text { opacity: 0; }
.auth-submit.loading .btn-spinner { display: flex; }
.spinner-ring {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── TERMS / CHECKBOX ─── */
.form-check {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin: 1rem 0;
}
.form-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  min-width: 16px;
  accent-color: var(--navy);
  margin-top: 2px;
  cursor: pointer;
}
.form-check-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.55;
}
.form-check-label a {
  color: var(--teal-dark);
  font-weight: 500;
}

.auth-footer-note {
  margin-top: 1.75rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
}
.auth-footer-note a {
  color: var(--teal-dark);
  font-weight: 600;
}

/* ─── STEP INDICATOR (signup only) ─── */
.step-indicator {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 2rem;
}
.step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  flex: 1;
  position: relative;
}
.step-item:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 13px;
  left: 50%;
  width: 100%;
  height: 2px;
  background: var(--border);
  z-index: 0;
  transition: background 0.3s;
}
.step-item.completed:not(:last-child)::after { background: var(--teal); }
.step-circle {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  transition: all 0.25s;
  position: relative;
  z-index: 1;
}
.step-item.active .step-circle {
  border-color: var(--navy);
  background: var(--navy);
  color: var(--white);
}
.step-item.completed .step-circle {
  border-color: var(--teal);
  background: var(--teal);
  color: var(--white);
}
.step-label {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: center;
}
.step-item.active .step-label { color: var(--navy); }
.step-item.completed .step-label { color: var(--teal-dark); }

/* ─── STEP PANELS ─── */
.step-panel { display: none; }
.step-panel.active { display: block; }

/* ─── RESPONSIVE (COMPLETE REWORK) ─── */

/* Tablet breakpoint - left panel collapses to compact top bar */
@media (max-width: 900px) {
  .auth-page {
    grid-template-columns: 1fr !important;
    grid-template-rows: auto 1fr;
  }

  /* Left panel becomes a compact top header with centered logo only */
  .auth-panel-left {
    display: flex;
    flex-direction: column;
    padding: 1rem 1.5rem;
    position: relative;
    min-height: auto;
  }

  /* Hide all left panel content except the logo */
  .auth-left-content,
  .auth-testimonial,
  .auth-stats,
  .fp-illustration {
    display: none;
  }

  /* Make logo centered and remove margin-bottom auto */
  .auth-left-logo {
    margin-bottom: 0;
    justify-content: center;
    width: 100%;
  }

  /* Optional: adjust logo sizing for mobile header */
  .auth-left-logo img {
    width: 36px;
  }

  .auth-logo-wordmark {
    font-size: 1rem;
  }

  /* Right panel takes full width below */
  .auth-panel-right {
    padding: 2rem 1.5rem;
    min-height: auto;
    align-items: flex-start;
  }

  .auth-form-wrap {
    max-width: 440px;
    margin: 0 auto;
  }
}

/* Small tablet / large phone adjustments */
@media (max-width: 640px) {
  .auth-panel-left {
    padding: 0.75rem 1rem;
  }

  .auth-left-logo {
    gap: 8px;
  }

  .auth-left-logo img {
    width: 32px;
  }

  .auth-logo-wordmark {
    font-size: 0.9rem;
  }

  .auth-panel-right {
    padding: 1.75rem 1.25rem;
  }

  .auth-form-header h1 {
    font-size: 1.4rem;
  }

  .auth-form-header p {
    font-size: 0.8rem;
  }

  /* Improve touch targets */
  .form-control,
  .auth-submit,
  .btn,
  .input-toggle-pw {
    font-size: 16px; /* Prevents zoom on iOS */
  }

  /* Stack form rows on smaller screens */
  .form-row {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  /* Adjust step indicator for mobile */
  .step-indicator {
    margin-bottom: 1.5rem;
  }

  .step-label {
    font-size: 0.55rem;
    white-space: nowrap;
  }

  .step-circle {
    width: 22px;
    height: 22px;
    font-size: 0.6rem;
  }

  .step-item:not(:last-child)::after {
    top: 11px;
  }
}

/* Mobile devices */
@media (max-width: 480px) {
  .auth-panel-left {
    padding: 0.6rem 1rem;
  }

  .auth-left-logo img {
    width: 28px;
  }

  .auth-logo-wordmark {
    font-size: 0.85rem;
  }

  .auth-logo-wordmark small {
    display: none; /* Hide "beta" or small text on very small screens */
  }

  .auth-panel-right {
    padding: 1.5rem 1rem;
  }

  .auth-form-wrap {
    max-width: 100%;
  }

  .auth-form-header {
    margin-bottom: 1.5rem;
  }

  .auth-form-header h1 {
    font-size: 1.3rem;
  }

  /* Form spacing */
  .form-group {
    margin-bottom: 0.9rem;
  }

  /* Password strength bars - still readable */
  .pw-strength-bars {
    gap: 2px;
  }

  /* Forgot password panel adjustments */
  .fp-success-header h1 {
    font-size: 1.25rem;
  }

  .fp-success-header p {
    font-size: 0.8rem;
  }

  .fp-email-chip {
    padding: 0.6rem 0.85rem;
  }

  .fp-email-chip span {
    font-size: 0.8rem;
    white-space: normal;
    word-break: break-all;
  }

  /* Divider text */
  .auth-divider {
    gap: 0.75rem;
    margin: 1.25rem 0;
  }

  .auth-divider-text {
    font-size: 0.7rem;
  }

  /* Footer note */
  .auth-footer-note {
    margin-top: 1.5rem;
    font-size: 0.72rem;
  }

  /* Checkbox label */
  .form-check-label {
    font-size: 0.75rem;
  }

  /* Submit button */
  .auth-submit {
    padding: 0.7rem 1.25rem;
    font-size: 0.85rem;
  }

  /* Alert banner */
  .fp-alert {
    padding: 0.65rem 0.85rem;
    font-size: 0.75rem;
  }
}

/* Very small phones */
@media (max-width: 380px) {
  .auth-panel-left {
    padding: 0.5rem 0.75rem;
  }

  .auth-left-logo img {
    width: 24px;
  }

  .auth-logo-wordmark {
    font-size: 0.8rem;
  }

  .auth-panel-right {
    padding: 1.25rem 0.875rem;
  }

  .auth-form-header h1 {
    font-size: 1.2rem;
  }

  .step-label {
    font-size: 0.5rem;
  }

  .step-circle {
    width: 20px;
    height: 20px;
    font-size: 0.55rem;
  }

  .step-item:not(:last-child)::after {
    top: 10px;
  }

  .fp-back {
    margin-bottom: 1.25rem;
    font-size: 0.75rem;
  }

  .fp-success-icon {
    width: 56px;
    height: 56px;
    margin-bottom: 1.25rem;
  }

  .fp-success-icon svg {
    width: 24px;
    height: 24px;
  }
}

/* Landscape orientation adjustments for auth forms */
@media (max-width: 700px) and (orientation: landscape) {
  .auth-panel-left {
    padding: 0.5rem 1rem;
  }

  .auth-panel-right {
    padding: 1rem;
  }

  .auth-form-wrap {
    max-width: 500px;
  }

  .auth-form-header {
    margin-bottom: 1rem;
  }

  .form-group {
    margin-bottom: 0.75rem;
  }
}

/* Touch-friendly improvements for all interactive elements */
@media (max-width: 640px) {
  .fp-back,
  .input-toggle-pw,
  .fp-resend-note button,
  .form-check input[type="checkbox"] {
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .fp-back {
    min-height: auto;
  }

  .input-toggle-pw {
    right: 0.5rem;
  }

  /* Improve select dropdown on mobile */
  select.form-control {
    background-position: right 0.85rem center;
    font-size: 16px;
  }
}

/* Smooth transitions for panel changes */
.step-panel,
.fp-panel {
  transition: opacity 0.2s ease;
}

.auth-hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Ensure proper spacing for error messages on mobile */
@media (max-width: 480px) {
  .form-error {
    font-size: 0.7rem;
  }

  .form-hint {
    font-size: 0.7rem;
  }

  .fp-security-row {
    font-size: 0.68rem;
    flex-wrap: wrap;
  }
}
