/* ==========================================================================
   SalonPro - Authentication Module Stylesheet (Login & Multi-Step Signup)
   Matching Modern Premium Design System & Full RTL / LTR Support
   ========================================================================== */

/* --------------------------------------------------
   1. Auth Layout Base
   -------------------------------------------------- */
.sp-auth-body {
  min-height: 100vh;
  background-color: var(--sp-light-bg, #F8F9FC);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
  font-family: var(--sp-font-current);
}

/* Subtle decorative ambient background glows */
.sp-auth-body::before {
  content: '';
  position: fixed;
  top: -150px;
  right: -100px;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(246, 59, 4, 0.08) 0%, rgba(246, 59, 4, 0) 70%);
  pointer-events: none;
  z-index: 0;
}

.sp-auth-body::after {
  content: '';
  position: fixed;
  bottom: -200px;
  left: -150px;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(16, 24, 40, 0.05) 0%, rgba(16, 24, 40, 0) 70%);
  pointer-events: none;
  z-index: 0;
}

/* --------------------------------------------------
   RTL / LTR Directional Flipping
   -------------------------------------------------- */
.rtl-flip {
  display: inline-block;
  transition: transform 0.2s ease;
}

html[dir="ltr"] .rtl-flip {
  transform: scaleX(-1);
}

html[dir="rtl"] .rtl-flip {
  transform: scaleX(1);
}

/* --------------------------------------------------
   2. Auth Top Navigation Bar
   -------------------------------------------------- */
.auth-header {
  padding: 1.25rem 0;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--sp-border, #E4E7EC);
  position: sticky;
  top: 0;
  z-index: 100;
}

.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--sp-dark, #101828);
  font-weight: 800;
  font-size: 1.35rem;
  transition: transform var(--sp-transition-fast, 0.18s ease);
}

.auth-brand:hover {
  transform: scale(1.02);
  color: var(--sp-dark, #101828);
}

.auth-brand .brand-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--sp-primary, #F63B04), var(--sp-secondary, #FF5E2E));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.25rem;
  box-shadow: 0 4px 12px rgba(246, 59, 4, 0.25);
}

.auth-header-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--sp-text-secondary, #475467);
  text-decoration: none;
  padding: 0.5rem 0.9rem;
  border-radius: 8px;
  transition: all var(--sp-transition-fast, 0.18s ease);
}

.auth-header-btn:hover {
  background-color: #fff;
  color: var(--sp-primary, #F63B04);
  box-shadow: var(--sp-shadow-xs, 0 1px 2px rgba(16, 24, 40, 0.05));
}

/* --------------------------------------------------
   3. Auth Main Wrapper & Cards
   -------------------------------------------------- */
.auth-main-container {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 2.5rem 0 3.5rem;
  position: relative;
  z-index: 1;
}

.auth-card {
  background: #ffffff;
  border: 1px solid var(--sp-border, #E4E7EC);
  border-radius: 20px;
  box-shadow: 0 16px 40px rgba(16, 24, 40, 0.08);
  overflow: hidden;
  position: relative;
}

.auth-card-inner {
  padding: 2.75rem 2.5rem;
}

@media (max-width: 576px) {
  .auth-card-inner {
    padding: 2rem 1.25rem;
  }
}

/* --------------------------------------------------
   4. Split Showcase Panel (Login Desktop)
   -------------------------------------------------- */
.auth-showcase-panel {
  background: linear-gradient(145deg, #101828 0%, #162038 60%, #1D2939 100%);
  color: #ffffff;
  padding: 3rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.auth-showcase-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: radial-gradient(rgba(246, 59, 4, 0.18) 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: 0.6;
  pointer-events: none;
}

.auth-showcase-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(246, 59, 4, 0.2);
  border: 1px solid rgba(246, 59, 4, 0.4);
  color: #FFA085;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.4rem 0.9rem;
  border-radius: 9999px;
  margin-bottom: 1.5rem;
}

.auth-showcase-title {
  font-size: 1.85rem;
  font-weight: 800;
  line-height: 1.35;
  margin-bottom: 1rem;
  color: #ffffff;
}

.auth-showcase-desc {
  font-size: 0.95rem;
  color: #98A2B3;
  line-height: 1.6;
  margin-bottom: 2rem;
}

.showcase-feature-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
  font-size: 0.92rem;
  color: #EAECF0;
}

.showcase-feature-item i {
  color: #22A06B;
  font-size: 1.15rem;
}

.showcase-stat-box {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 1.25rem;
  margin-top: 1.5rem;
}

.showcase-stat-num {
  font-size: 1.5rem;
  font-weight: 800;
  color: #ffffff;
}

.showcase-stat-text {
  font-size: 0.82rem;
  color: #98A2B3;
}

/* --------------------------------------------------
   5. Form Inputs & Floating Styling
   -------------------------------------------------- */
.form-header {
  margin-bottom: 2rem;
}

.form-header-title {
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--sp-dark, #101828);
  margin-bottom: 0.45rem;
}

.form-header-subtitle {
  font-size: 0.92rem;
  color: var(--sp-text-secondary, #475467);
  margin-bottom: 0;
}

.auth-form-group {
  margin-bottom: 1.25rem;
}

.auth-form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--sp-text-main, #172033);
  margin-bottom: 0.45rem;
}

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

.auth-input-group .input-icon {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: #98A2B3;
  font-size: 1.1rem;
  pointer-events: none;
  z-index: 5;
  transition: color 0.15s ease;
}

/* Explicit RTL Input Alignment */
html[dir="rtl"] .auth-input-group .input-icon {
  right: 1rem;
  left: auto;
}
html[dir="rtl"] .auth-input-group .auth-input {
  padding-right: 2.75rem;
  padding-left: 2.75rem;
  text-align: right;
}

/* Explicit LTR Input Alignment */
html[dir="ltr"] .auth-input-group .input-icon {
  left: 1rem;
  right: auto;
}
html[dir="ltr"] .auth-input-group .auth-input {
  padding-left: 2.75rem;
  padding-right: 2.75rem;
  text-align: left;
}

.auth-input {
  width: 100%;
  height: 48px;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--sp-text-main, #172033);
  background-color: #ffffff;
  border: 1.5px solid var(--sp-border, #E4E7EC);
  border-radius: 10px;
  transition: all var(--sp-transition-fast, 0.18s ease);
}

.auth-input:focus {
  outline: none;
  border-color: var(--sp-primary, #F63B04);
  box-shadow: 0 0 0 3.5px rgba(246, 59, 4, 0.12);
}

.auth-input::placeholder {
  color: #98A2B3;
  font-size: 0.9rem;
}

/* Password Visibility Toggle Button */
.btn-toggle-password {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: #98A2B3;
  padding: 0.5rem;
  cursor: pointer;
  z-index: 6;
  font-size: 1.15rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: color 0.15s ease;
}

.btn-toggle-password:hover {
  color: var(--sp-primary, #F63B04);
}

html[dir="rtl"] .btn-toggle-password {
  left: 0.65rem;
  right: auto;
}
html[dir="ltr"] .btn-toggle-password {
  right: 0.65rem;
  left: auto;
}

/* Password Strength & Requirements Box */
.password-requirements-box {
  background-color: #F8F9FC;
  border: 1px solid #EAECF0;
  border-radius: 12px;
  padding: 1rem 1.15rem;
  margin-top: 0.75rem;
}

.password-requirement-item {
  font-size: 0.8rem;
  color: var(--sp-text-muted, #5A6578);
  display: flex;
  align-items: center;
  gap: 0.45rem;
  transition: all 0.15s ease;
  margin-bottom: 0.35rem;
}

.password-requirement-item:last-child {
  margin-bottom: 0;
}

.password-requirement-item.valid {
  color: #22A06B;
  font-weight: 600;
}

.password-requirement-item.valid i {
  color: #22A06B;
}

.password-example-badge {
  background-color: rgba(246, 59, 4, 0.08);
  color: var(--sp-primary, #F63B04);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: 'Courier New', Courier, monospace;
  direction: ltr;
}

.password-match-indicator {
  font-size: 0.8rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.35rem;
}

/* Helper Text */
.form-helper-text {
  font-size: 0.8rem;
  color: var(--sp-text-muted, #5A6578);
  margin-top: 0.35rem;
}

/* Custom Checkbox */
.auth-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.88rem;
  color: var(--sp-text-secondary, #475467);
  cursor: pointer;
  user-select: none;
}

.auth-checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--sp-primary, #F63B04);
  border-radius: 4px;
  cursor: pointer;
}

/* Auth Primary Button */
.btn-sp-auth-submit {
  width: 100%;
  height: 50px;
  background: linear-gradient(135deg, var(--sp-primary, #F63B04), var(--sp-secondary, #FF5E2E));
  color: #ffffff;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(246, 59, 4, 0.3);
  transition: all var(--sp-transition-fast, 0.18s ease);
}

.btn-sp-auth-submit:hover {
  background: linear-gradient(135deg, var(--sp-primary-hover, #D73000), var(--sp-secondary-hover, #E74B1B));
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(246, 59, 4, 0.4);
}

.btn-sp-auth-outline {
  height: 48px;
  padding: 0 1.5rem;
  background-color: transparent;
  color: var(--sp-dark, #101828);
  border: 1.5px solid var(--sp-border, #E4E7EC);
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: all var(--sp-transition-fast, 0.18s ease);
}

.btn-sp-auth-outline:hover {
  border-color: var(--sp-primary, #F63B04);
  color: var(--sp-primary, #F63B04);
  background-color: rgba(246, 59, 4, 0.04);
}

/* --------------------------------------------------
   6. Multi-Step Wizard Progress Bar
   -------------------------------------------------- */
.wizard-progress-wrapper {
  margin-bottom: 2.5rem;
  position: relative;
}

.wizard-steps {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  list-style: none;
  padding: 0;
  margin: 0;
}

.wizard-steps::before {
  content: '';
  position: absolute;
  top: 24px;
  left: 40px;
  right: 40px;
  height: 3px;
  background-color: #E4E7EC;
  z-index: 1;
}

.wizard-progress-bar-fill {
  position: absolute;
  top: 24px;
  height: 3px;
  background: linear-gradient(90deg, var(--sp-primary, #F63B04), var(--sp-secondary, #FF5E2E));
  z-index: 2;
  transition: width 0.35s ease, right 0.35s ease, left 0.35s ease;
}

html[dir="rtl"] .wizard-progress-bar-fill {
  right: 40px;
  left: auto;
}
html[dir="ltr"] .wizard-progress-bar-fill {
  left: 40px;
  right: auto;
}

.wizard-step-item {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  background: transparent;
  border: none;
  padding: 0;
  text-align: center;
  width: 33.333%;
}

.wizard-step-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: #ffffff;
  border: 2px solid #E4E7EC;
  color: #98A2B3;
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.5rem;
  transition: all 0.25s ease;
  box-shadow: 0 2px 6px rgba(16, 24, 40, 0.04);
}

.wizard-step-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #98A2B3;
  transition: color 0.25s ease;
  white-space: nowrap;
}

.wizard-step-item.active .wizard-step-circle {
  background-color: var(--sp-primary, #F63B04);
  border-color: var(--sp-primary, #F63B04);
  color: #ffffff;
  box-shadow: 0 0 0 4px rgba(246, 59, 4, 0.18);
}

.wizard-step-item.active .wizard-step-label {
  color: var(--sp-primary, #F63B04);
  font-weight: 700;
}

.wizard-step-item.completed .wizard-step-circle {
  background-color: #22A06B;
  border-color: #22A06B;
  color: #ffffff;
}

.wizard-step-item.completed .wizard-step-label {
  color: var(--sp-dark, #101828);
}

@media (max-width: 576px) {
  .wizard-steps::before {
    left: 24px;
    right: 24px;
    top: 18px;
  }
  .wizard-progress-bar-fill {
    top: 18px;
  }
  html[dir="rtl"] .wizard-progress-bar-fill {
    right: 24px;
    left: auto;
  }
  html[dir="ltr"] .wizard-progress-bar-fill {
    left: 24px;
    right: auto;
  }
  .wizard-step-circle {
    width: 36px;
    height: 36px;
    font-size: 0.85rem;
  }
  .wizard-step-label {
    font-size: 0.72rem;
  }
}

/* --------------------------------------------------
   7. Step 2: Package Selection Cards
   -------------------------------------------------- */
.package-billing-switch-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
  background: #F2F4F7;
  padding: 0.5rem 1.25rem;
  border-radius: 9999px;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

.package-billing-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--sp-text-secondary, #475467);
  cursor: pointer;
  transition: color 0.15s ease;
}

.package-billing-label.active {
  color: var(--sp-primary, #F63B04);
  font-weight: 700;
}

.plan-select-card {
  border: 2px solid #EAECF0;
  border-radius: 16px;
  background: #ffffff;
  padding: 1.5rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  position: relative;
  transition: all 0.25s ease;
  user-select: none;
}

.plan-select-card:hover {
  border-color: #D0D5DD;
  box-shadow: 0 8px 24px rgba(16, 24, 40, 0.06);
  transform: translateY(-2px);
}

.plan-select-card.selected {
  border-color: var(--sp-primary, #F63B04);
  background-color: #FFFDFD;
  box-shadow: 0 0 0 3px rgba(246, 59, 4, 0.12), 0 12px 28px rgba(246, 59, 4, 0.08);
}

.plan-select-radio-check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #D0D5DD;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.plan-select-card.selected .plan-select-radio-check {
  border-color: var(--sp-primary, #F63B04);
  background-color: var(--sp-primary, #F63B04);
  color: #fff;
}

.plan-select-card.selected .plan-select-radio-check::after {
  content: '✓';
  font-size: 13px;
  font-weight: 900;
  color: #fff;
}

.plan-badge-popular {
  position: absolute;
  top: -12px;
  background: linear-gradient(135deg, var(--sp-primary, #F63B04), var(--sp-secondary, #FF5E2E));
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  box-shadow: 0 2px 8px rgba(246, 59, 4, 0.3);
}

html[dir="rtl"] .plan-badge-popular {
  right: 1.25rem;
  left: auto;
}
html[dir="ltr"] .plan-badge-popular {
  left: 1.25rem;
  right: auto;
}

.plan-card-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--sp-dark, #101828);
  margin-bottom: 0.35rem;
}

.plan-card-desc {
  font-size: 0.8rem;
  color: var(--sp-text-secondary, #475467);
  margin-bottom: 1rem;
  min-height: 2.2rem;
}

.plan-card-price-box {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #F2F4F7;
}

.plan-card-currency {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--sp-dark, #101828);
}

.plan-card-price {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--sp-primary, #F63B04);
  line-height: 1;
}

.plan-card-period {
  font-size: 0.8rem;
  color: var(--sp-text-muted, #5A6578);
}

.plan-features-mini {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.plan-features-mini li {
  font-size: 0.82rem;
  color: var(--sp-text-main, #172033);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.plan-features-mini li i {
  color: #22A06B;
  font-size: 0.95rem;
  flex-shrink: 0;
}

/* --------------------------------------------------
   8. Step 3: Payment Gateway Options
   -------------------------------------------------- */
.payment-option-card {
  border: 2px solid #EAECF0;
  border-radius: 14px;
  background: #ffffff;
  padding: 1.25rem;
  margin-bottom: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.payment-option-card:hover {
  border-color: #D0D5DD;
}

.payment-option-card.selected {
  border-color: var(--sp-primary, #F63B04);
  background-color: #FFFDFD;
  box-shadow: 0 0 0 3px rgba(246, 59, 4, 0.1);
}

.payment-option-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.payment-option-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background-color: var(--sp-primary-light, rgba(246, 59, 4, 0.08));
  color: var(--sp-primary, #F63B04);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
}

.payment-card-inputs-box {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px dashed #E4E7EC;
}

.payment-cash-instructions-box {
  margin-top: 1.25rem;
  padding: 1rem;
  border-radius: 10px;
  background-color: #F8F9FC;
  border: 1px solid #EAECF0;
}

/* Order Summary Box */
.auth-order-summary {
  background: #F8F9FC;
  border: 1px solid #EAECF0;
  border-radius: 14px;
  padding: 1.5rem;
  height: 100%;
}

.summary-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  font-size: 0.88rem;
  color: var(--sp-text-secondary, #475467);
}

.summary-item.total {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #E4E7EC;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--sp-dark, #101828);
}

.summary-free-trial-banner {
  background: rgba(34, 160, 107, 0.12);
  border: 1px solid rgba(34, 160, 107, 0.25);
  border-radius: 8px;
  padding: 0.65rem 0.85rem;
  color: #197B51;
  font-size: 0.8rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

/* --------------------------------------------------
   9. Auth Footer
   -------------------------------------------------- */
.auth-footer {
  padding: 1.5rem 0;
  text-align: center;
  font-size: 0.85rem;
  color: var(--sp-text-muted, #5A6578);
  border-top: 1px solid #E4E7EC;
  background: #ffffff;
  position: relative;
  z-index: 10;
}

.auth-footer a {
  color: var(--sp-text-secondary, #475467);
  text-decoration: none;
  transition: color 0.15s ease;
}

.auth-footer a:hover {
  color: var(--sp-primary, #F63B04);
}
