/* ==========================================================================
   Modern Auth Experience CSS - Jettfinatech
   ========================================================================== */

:root {
  --auth-bg-gradient: radial-gradient(circle at 10% 20%, rgba(13, 90, 253, 0.06) 0%, rgba(255, 255, 255, 0) 50%),
                      radial-gradient(circle at 90% 80%, rgba(46, 204, 74, 0.05) 0%, rgba(255, 255, 255, 0) 50%);
  --auth-card-bg: #ffffff;
  --auth-card-border: rgba(1, 21, 66, 0.08);
  --auth-card-shadow: 0 20px 48px -12px rgba(13, 90, 253, 0.12), 0 4px 16px rgba(0, 0, 0, 0.03);
  --auth-input-bg: #f8faff;
  --auth-input-border: #e2e8f0;
  --auth-input-focus-border: #0d5afd;
  --auth-input-focus-ring: rgba(13, 90, 253, 0.16);
  --auth-text-title: #011542;
  --auth-text-muted: #64748b;
  --auth-box-border: #e2e8f0;
  --auth-badge-bg: #eef3ff;
  --auth-badge-text: #0d5afd;
}

[data-theme="dark"] {
  --auth-bg-gradient: radial-gradient(circle at 10% 20%, rgba(13, 90, 253, 0.15) 0%, rgba(11, 19, 38, 0) 60%),
                      radial-gradient(circle at 90% 80%, rgba(2, 78, 243, 0.12) 0%, rgba(11, 19, 38, 0) 60%);
  --auth-card-bg: #111a2e;
  --auth-card-border: rgba(255, 255, 255, 0.08);
  --auth-card-shadow: 0 24px 60px -15px rgba(0, 0, 0, 0.6);
  --auth-input-bg: #16223b;
  --auth-input-border: #233454;
  --auth-input-focus-border: #3b82f6;
  --auth-input-focus-ring: rgba(59, 130, 246, 0.25);
  --auth-text-title: #f8fafc;
  --auth-text-muted: #94a3b8;
  --auth-box-border: #233454;
  --auth-badge-bg: rgba(13, 90, 253, 0.2);
  --auth-badge-text: #6797fe;
}

/* Background canvas */
.auth-page-wrapper {
  min-height: 100vh;
  width: 100%;
  background-color: var(--bg);
  background-image: var(--auth-bg-gradient);
  background-repeat: no-repeat;
  background-attachment: fixed;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow-x: hidden;
  padding-bottom: 70px; /* space for demo dock */
}

/* Auth Top Navbar */
.auth-top-bar {
  width: 100%;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 50;
}

.auth-nav-btn {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--auth-card-bg);
  border: 1px solid var(--auth-card-border);
  color: var(--auth-text-title);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: all 0.25s ease;
  cursor: pointer;
  text-decoration: none;
}

.auth-nav-btn:hover {
  background: var(--primary-50);
  color: var(--primary-500);
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(13, 90, 253, 0.12);
}

[data-theme="dark"] .auth-nav-btn:hover {
  background: #1d2d4d;
  color: #6797fe;
}

/* Container & Card */
.auth-container {
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
  padding: 0 1.25rem;
  z-index: 20;
}

.auth-card {
  background: var(--auth-card-bg);
  border: 1px solid var(--auth-card-border);
  border-radius: 24px;
  box-shadow: var(--auth-card-shadow);
  padding: 2.25rem 2rem;
  position: relative;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

@media (max-width: 480px) {
  .auth-card {
    padding: 1.75rem 1.25rem;
    border-radius: 20px;
  }
}

/* Stepper Indicator */
.auth-step-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  background: var(--auth-badge-bg);
  color: var(--auth-badge-text);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}

.auth-step-pill i {
  font-size: 0.875rem;
}

.auth-progress-track {
  width: 100%;
  height: 4px;
  background: var(--auth-input-bg);
  border-radius: 9999px;
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.auth-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #0d5afd, #6797fe);
  border-radius: 9999px;
  transition: width 0.4s ease;
}

/* Header typography */
.auth-header {
  text-align: center;
  margin-bottom: 1.75rem;
}

.auth-title {
  color: var(--auth-text-title);
  font-size: 1.625rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin-bottom: 0.5rem;
}

.auth-subtitle {
  color: var(--auth-text-muted);
  font-size: 0.925rem;
  line-height: 1.5;
  margin-bottom: 0;
}

/* Icon Badges */
.auth-icon-badge {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(13, 90, 253, 0.12) 0%, rgba(13, 90, 253, 0.03) 100%);
  border: 1px solid rgba(13, 90, 253, 0.2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-500);
  font-size: 1.75rem;
  margin-bottom: 1rem;
  box-shadow: 0 8px 20px -6px rgba(13, 90, 253, 0.25);
  transition: transform 0.3s ease;
}

.auth-icon-badge:hover {
  transform: scale(1.05) rotate(3deg);
}

[data-theme="dark"] .auth-icon-badge {
  background: linear-gradient(135deg, rgba(13, 90, 253, 0.25) 0%, rgba(13, 90, 253, 0.05) 100%);
  color: #6797fe;
  border-color: rgba(103, 151, 254, 0.3);
}

/* Inputs & Form Groups */
.auth-form-group {
  margin-bottom: 1.25rem;
  position: relative;
}

.auth-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--auth-text-title);
  margin-bottom: 0.45rem;
  letter-spacing: 0.01em;
}

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

.auth-input-icon {
  position: absolute;
  left: 1rem;
  color: var(--auth-text-muted);
  font-size: 1.25rem;
  pointer-events: none;
  transition: color 0.25s ease;
  z-index: 3;
}

.auth-input {
  width: 100%;
  height: 50px;
  background: var(--auth-input-bg);
  border: 1.5px solid var(--auth-input-border);
  border-radius: 14px;
  padding: 0.625rem 1rem 0.625rem 2.85rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--auth-text-title);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
}

.auth-input:focus {
  background: var(--auth-card-bg);
  border-color: var(--auth-input-focus-border);
  box-shadow: 0 0 0 4px var(--auth-input-focus-ring);
}

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

[data-theme="dark"] .auth-input:focus ~ .auth-input-icon {
  color: #6797fe;
}

.auth-input::placeholder {
  color: var(--auth-text-muted);
  opacity: 0.7;
}

/* Password Toggle */
.auth-password-toggle {
  position: absolute;
  right: 0.75rem;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--auth-text-muted);
  cursor: pointer;
  font-size: 1.25rem;
  transition: all 0.2s ease;
  z-index: 4;
}

.auth-password-toggle:hover {
  background: var(--auth-badge-bg);
  color: var(--primary-500);
}

/* OTP 4-Digit Box Container */
.otp-digit-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin: 1.75rem 0 1.25rem 0;
}

@media (max-width: 360px) {
  .otp-digit-group {
    gap: 0.5rem;
  }
}

.otp-digit-input {
  width: 60px;
  height: 64px;
  max-width: 68px;
  text-align: center;
  font-size: 1.75rem;
  font-weight: 800;
  font-family: inherit;
  color: var(--auth-text-title);
  background: var(--auth-input-bg);
  border: 2px solid var(--auth-input-border);
  border-radius: 16px;
  outline: none;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  caret-color: var(--primary-500);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.otp-digit-input:focus {
  background: var(--auth-card-bg);
  border-color: var(--primary-500);
  box-shadow: 0 0 0 4px var(--auth-input-focus-ring), 0 4px 12px rgba(13, 90, 253, 0.12);
  transform: translateY(-2px);
}

.otp-digit-input.filled {
  border-color: var(--primary-500);
  background: var(--auth-card-bg);
}

/* Password Strength Meter */
.password-meter-wrap {
  margin-top: 0.65rem;
  padding: 0.65rem 0.85rem;
  background: var(--auth-input-bg);
  border-radius: 12px;
  border: 1px solid var(--auth-input-border);
}

.password-meter-bars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 0.5rem;
}

.meter-bar {
  height: 5px;
  border-radius: 9999px;
  background: var(--auth-input-border);
  transition: background-color 0.3s ease;
}

.password-meter-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.775rem;
}

.password-meter-label {
  font-weight: 700;
  color: var(--auth-text-muted);
  transition: color 0.3s ease;
}

/* Checklist */
.requirement-list {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.requirement-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--auth-text-muted);
  transition: all 0.25s ease;
}

.requirement-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--auth-input-border);
  color: var(--auth-card-bg);
  font-size: 0.7rem;
  transition: all 0.25s ease;
}

.requirement-item.valid {
  color: #10b981;
}

.requirement-item.valid .requirement-icon {
  background: #10b981;
  color: #ffffff;
}

/* Password match feedback */
.password-match-status {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.8rem;
  margin-top: 0.45rem;
  font-weight: 600;
  transition: all 0.25s ease;
}

/* Buttons */
.auth-submit-btn {
  width: 100%;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, #0d5afd 0%, #0244d4 100%);
  border: none;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 8px 24px -4px rgba(13, 90, 253, 0.45);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  letter-spacing: 0.01em;
}

.auth-submit-btn:hover {
  background: linear-gradient(135deg, #1d65fd 0%, #034be8 100%);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -4px rgba(13, 90, 253, 0.55);
  color: #ffffff;
}

.auth-submit-btn:active {
  transform: translateY(0);
}

.auth-submit-btn i {
  font-size: 1.25rem;
  transition: transform 0.25s ease;
}

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

/* Secondary Button */
.auth-secondary-btn {
  width: 100%;
  height: 48px;
  border-radius: 14px;
  background: transparent;
  border: 1.5px solid var(--auth-input-border);
  color: var(--auth-text-title);
  font-size: 0.95rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.auth-secondary-btn:hover {
  background: var(--auth-input-bg);
  border-color: var(--auth-text-muted);
  color: var(--auth-text-title);
}

/* Social Buttons */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem 0;
  color: var(--auth-text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--auth-input-border);
}

.social-auth-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.social-auth-btn {
  height: 46px;
  border-radius: 12px;
  background: var(--auth-input-bg);
  border: 1px solid var(--auth-input-border);
  color: var(--auth-text-title);
  font-size: 0.875rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.social-auth-btn:hover {
  background: var(--auth-card-bg);
  border-color: var(--primary-500);
  color: var(--primary-500);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.social-auth-btn i {
  font-size: 1.15rem;
}

/* Footer Link */
.auth-card-footer {
  text-align: center;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--auth-input-border);
  color: var(--auth-text-muted);
  font-size: 0.875rem;
}

.auth-card-footer a {
  color: var(--primary-500);
  font-weight: 700;
  text-decoration: none;
  transition: color 0.2s ease;
}

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

[data-theme="dark"] .auth-card-footer a {
  color: #6797fe;
}

/* Floating Flow Navigator Pill */
.demo-flow-dock {
  position: fixed;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  background: rgba(1, 21, 66, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 9999px;
  padding: 0.4rem 0.6rem;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  max-width: 95vw;
  overflow-x: auto;
}

.demo-flow-label {
  color: #94a3b8;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0 0.5rem;
  white-space: nowrap;
}

.demo-flow-tab {
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #cbd5e1;
  text-decoration: none;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.2s ease;
}

.demo-flow-tab:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.demo-flow-tab.active {
  background: #0d5afd;
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 2px 10px rgba(13, 90, 253, 0.5);
}

.demo-flow-tab .step-num {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
}

.demo-flow-tab.active .step-num {
  background: #ffffff;
  color: #0d5afd;
  font-weight: 800;
}

/* Toast alert notification */
.auth-toast-feedback {
  position: fixed;
  top: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: #011542;
  color: #ffffff;
  padding: 0.75rem 1.25rem;
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
  font-size: 0.875rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  z-index: 1200;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-toast-feedback.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

[data-theme="dark"] .auth-toast-feedback {
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
