@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

/* ─── Premium Centered Auth Master Design ─────────────────────────────────── */
body[data-page="login"],
body[data-page="register"],
body[data-page="forgot-password"],
body[data-page="reset-password"],
body[data-page="admin-login"] {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #fdfbf9;
  color: #1e293b;
}

/* ─── Dedicated Distraction-Free Auth Header ──────────────────────────────── */
.auth-site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid rgba(226, 232, 240, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  height: 74px;
}

.auth-nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 74px;
  width: min(92%, 1200px);
  margin: 0 auto;
}

.auth-brand-logo img {
  height: 38px;
  width: auto;
  max-width: 170px;
  object-fit: contain;
  display: block;
}

.auth-header-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.auth-header-prompt {
  font-size: 0.9rem;
  color: #64748b;
  font-weight: 550;
}

.btn-auth-header {
  height: 40px;
  padding: 0 1.25rem;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-sizing: border-box;
}

.btn-auth-header-primary {
  background: linear-gradient(135deg, #ff6b35 0%, #ea580c 100%);
  color: #ffffff !important;
  border: none;
  box-shadow: 0 3px 10px rgba(234, 88, 12, 0.25);
}

.btn-auth-header-primary:hover {
  background: linear-gradient(135deg, #ff7a47 0%, #d94e09 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(234, 88, 12, 0.35);
}

.btn-auth-header-outline {
  border: 1.5px solid #fed7aa;
  background: #fff7ed;
  color: #ea580c !important;
}

.btn-auth-header-outline:hover {
  background: #ffedd5;
  border-color: #fdba74;
}

.btn-auth-header-ghost {
  color: #64748b !important;
  background: transparent;
  padding: 0 0.85rem;
}

.btn-auth-header-ghost:hover {
  background: #f1f5f9;
  color: #0f172a !important;
}

@media (max-width: 600px) {
  .auth-header-prompt {
    display: none;
  }
}

.auth-wrapper {
  min-height: calc(100vh - 78px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
  background:
    radial-gradient(circle at 10% 15%, rgba(255, 107, 53, 0.08) 0%, transparent 45%),
    radial-gradient(circle at 90% 85%, rgba(251, 191, 36, 0.08) 0%, transparent 45%),
    radial-gradient(circle at 50% 50%, rgba(255, 237, 213, 0.3) 0%, transparent 70%),
    #faf8f5;
  position: relative;
  overflow: hidden;
}

/* Ambient glow blobs */
.auth-wrapper::before {
  content: '';
  position: absolute;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 350px;
  background: radial-gradient(ellipse, rgba(255, 107, 53, 0.15), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.auth-container {
  width: min(100%, 1020px);
  display: grid;
  grid-template-columns: 1fr 1.08fr;
  background: #ffffff;
  border-radius: 28px;
  border: 1px solid rgba(226, 232, 240, 0.85);
  box-shadow:
    0 25px 60px -15px rgba(31, 41, 55, 0.1),
    0 10px 25px -10px rgba(255, 107, 53, 0.06),
    0 0 0 1px rgba(255, 255, 255, 0.8) inset;
  overflow: hidden;
  position: relative;
  z-index: 1;
  animation: authFadeUp 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes authFadeUp {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.985);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Single column for smaller auth forms or forgot-password */
.auth-container.auth-single {
  max-width: 480px;
  grid-template-columns: 1fr;
}

/* ─── Left Visual Showcase (Brand Side) ────────────────────────────────────── */
.auth-showcase {
  background: linear-gradient(145deg, #111827 0%, #1f2937 40%, #c2410c 100%);
  padding: 3.5rem 3rem;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.auth-showcase::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.03' fill-rule='evenodd'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.8;
  pointer-events: none;
}

.auth-showcase-header {
  position: relative;
  z-index: 2;
}

.auth-showcase-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #ffedd5;
  margin-bottom: 1.5rem;
}

.auth-showcase h2 {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.03em;
  color: #ffffff;
  margin-bottom: 1rem;
}

.auth-showcase p {
  color: #cbd5e1;
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 2rem;
}

.auth-showcase-features {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  margin: 1.5rem 0;
  position: relative;
  z-index: 2;
}

.auth-feature-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.92rem;
  color: #f1f5f9;
  font-weight: 600;
}

.auth-feature-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(255, 107, 53, 0.25);
  border: 1px solid rgba(255, 107, 53, 0.4);
  display: grid;
  place-items: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.auth-showcase-quote {
  position: relative;
  z-index: 2;
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  padding: 1.25rem 1.4rem;
  margin-top: 2rem;
}

.auth-showcase-quote p {
  font-size: 0.88rem;
  font-style: italic;
  color: #f8fafc;
  margin: 0 0 0.6rem 0;
  line-height: 1.5;
}

.auth-showcase-quote-author {
  display: flex;
  align-items: center;
  gap: 10px;
}

.auth-quote-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff6b35, #fbbf24);
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  font-weight: 700;
}

.auth-quote-info strong {
  display: block;
  font-size: 0.82rem;
  color: #ffffff;
}

.auth-quote-info span {
  font-size: 0.74rem;
  color: #94a3b8;
}

/* ─── Right Form Panel ─────────────────────────────────────────────────────── */
.auth-form-panel {
  padding: 3.5rem 3.2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: #ffffff;
}

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

.auth-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #ea580c;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 0.75rem;
}

.auth-title {
  font-size: 1.95rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.035em;
  margin: 0 0 0.4rem 0;
}

.auth-subtitle {
  color: #64748b;
  font-size: 0.92rem;
  margin: 0;
  line-height: 1.5;
}

/* ─── Social Login Buttons ─────────────────────────────────────────────────── */
.auth-social-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
  margin-bottom: 1.5rem;
}

.btn-social {
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  color: #1e293b;
  font-size: 0.88rem;
  font-weight: 650;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-social:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.btn-social svg {
  width: 18px;
  height: 18px;
}

/* ─── Divider ──────────────────────────────────────────────────────────────── */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.2rem 0 1.6rem;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e2e8f0;
}

.auth-divider span {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
}

/* ─── Input Fields ─────────────────────────────────────────────────────────── */
.auth-field {
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.auth-field label {
  font-size: 0.88rem;
  font-weight: 700;
  color: #334155;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.auth-input-container {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.auth-input-container .field-icon {
  position: absolute;
  left: 16px;
  font-size: 1.05rem;
  color: #94a3b8;
  pointer-events: none;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.auth-input-container input {
  width: 100%;
  height: 50px;
  padding: 0 48px 0 48px !important;
  border-radius: 14px;
  border: 1.5px solid #e2e8f0;
  background: #f8fafc;
  color: #0f172a;
  font-size: 0.94rem;
  font-weight: 500;
  font-family: inherit;
  box-sizing: border-box;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-input-container input::placeholder {
  color: #94a3b8;
  font-weight: 400;
}

.auth-input-container input:focus {
  outline: none;
  background: #ffffff;
  border-color: #ff6b35;
  box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.14);
}

.auth-input-container:focus-within .field-icon {
  color: #ff6b35;
}

/* Embedded Password Visibility Toggle Button */
.auth-pwd-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  padding: 8px 10px;
  cursor: pointer;
  border-radius: 10px;
  color: #64748b;
  font-size: 1.15rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: background 0.15s ease, color 0.15s ease, transform 0.1s ease;
  z-index: 3;
}

.auth-pwd-toggle:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.auth-pwd-toggle:active {
  transform: translateY(-50%) scale(0.95);
}

/* ─── Options (Remember me & Forgot Password) ──────────────────────────────── */
.auth-extra-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0.4rem 0 1.5rem;
  font-size: 0.88rem;
}

.auth-remember-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #475569;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
}

.auth-remember-wrap input[type="checkbox"] {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 1.5px solid #cbd5e1;
  accent-color: #ff6b35;
  cursor: pointer;
}

.auth-forgot-link {
  color: #ea580c;
  font-weight: 700;
  text-decoration: none;
  transition: color 0.15s ease, text-decoration 0.15s ease;
}

.auth-forgot-link:hover {
  color: #c2410c;
  text-decoration: underline;
}

/* ─── Form 2-Column Grid Row ───────────────────────────────────────────────── */
.auth-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 640px) {
  .auth-row-2 {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

/* ─── Password Strength Meter & Match Indicator ────────────────────────────── */
.pwd-strength-wrap {
  margin-top: -0.4rem;
  margin-bottom: 1rem;
}

.pwd-strength-bar {
  height: 4px;
  width: 100%;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 0.4rem;
  display: flex;
}

.pwd-strength-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.3s ease;
}

.pwd-strength-fill.weak {
  width: 33%;
  background: #ef4444;
}

.pwd-strength-fill.medium {
  width: 66%;
  background: #f59e0b;
}

.pwd-strength-fill.strong {
  width: 100%;
  background: #10b981;
}

.pwd-strength-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.76rem;
  color: #64748b;
}

.pwd-strength-label {
  font-weight: 700;
  transition: color 0.2s ease;
}

.pwd-strength-label.weak { color: #ef4444; }
.pwd-strength-label.medium { color: #d97706; }
.pwd-strength-label.strong { color: #059669; }

.pwd-match-badge {
  font-size: 0.76rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  opacity: 0;
  transform: translateY(2px);
  transition: all 0.2s ease;
}

.pwd-match-badge.visible {
  opacity: 1;
  transform: translateY(0);
}

.pwd-match-badge.match { color: #059669; }
.pwd-match-badge.mismatch { color: #ef4444; }

/* ─── Terms & Conditions Checkbox ─────────────────────────────────────────── */
.auth-terms-wrap {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0.6rem 0 1.3rem;
  font-size: 0.84rem;
  color: #475569;
  line-height: 1.45;
  cursor: pointer;
  user-select: none;
}

.auth-terms-wrap input[type="checkbox"] {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 1.5px solid #cbd5e1;
  accent-color: #ff6b35;
  cursor: pointer;
  margin-top: 2px;
  flex-shrink: 0;
}

.auth-terms-wrap a {
  color: #ea580c;
  font-weight: 650;
  text-decoration: underline;
}

.auth-terms-wrap a:hover {
  color: #c2410c;
}

/* ─── Email Verification Card View ────────────────────────────────────────── */
.auth-verify-card {
  text-align: center;
  padding: 0.8rem 0;
  animation: authFadeUp 0.35s ease;
}

.auth-verify-icon-wrap {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: #fff7ed;
  border: 2px solid #fed7aa;
  color: #ea580c;
  font-size: 2.2rem;
  display: grid;
  place-items: center;
  margin: 0 auto 1.3rem;
  position: relative;
}

.auth-verify-icon-wrap::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px dashed rgba(234, 88, 12, 0.4);
  animation: rotateDashed 20s linear infinite;
}

@keyframes rotateDashed {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.auth-verify-email-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  padding: 6px 14px;
  border-radius: 999px;
  font-weight: 700;
  color: #0f172a;
  font-size: 0.9rem;
  margin: 0.6rem 0 1.2rem;
  word-break: break-all;
}

.auth-verify-steps {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 1.1rem 1.2rem;
  margin: 1.2rem 0 1.6rem;
  text-align: left;
  font-size: 0.86rem;
  color: #475569;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.auth-verify-step-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.4;
}

.auth-verify-step-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #ffedd5;
  color: #c2410c;
  font-size: 0.75rem;
  font-weight: 800;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.auth-verify-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

.auth-verify-actions .btn-auth-primary {
  width: auto;
  min-width: 170px;
  padding: 0 1.5rem;
  text-decoration: none;
}

.btn-auth-secondary {
  height: 52px;
  padding: 0 1.4rem;
  border-radius: 14px;
  border: 1.5px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.btn-auth-secondary:hover:not(:disabled) {
  background: #f8fafc;
  border-color: #94a3b8;
  color: #0f172a;
}

.btn-auth-secondary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}


/* ─── 3-Step Verification & OTP Styles ─────────────────────────────────────── */
.auth-step-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 1.8rem;
}

.auth-step-pill {
  width: 32px;
  height: 6px;
  border-radius: 999px;
  background: #e2e8f0;
  transition: all 0.3s ease;
}

.auth-step-pill.active {
  width: 48px;
  background: linear-gradient(135deg, #ff6b35, #ea580c);
}

.auth-step-pill.completed {
  background: #16a34a;
}

.otp-box-group {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 1.2rem 0 1.5rem;
}

.otp-box-input {
  width: 46px;
  height: 54px;
  text-align: center;
  font-size: 1.45rem;
  font-weight: 800;
  border-radius: 12px;
  border: 1.5px solid #e2e8f0;
  background: #f8fafc;
  color: #0f172a;
  box-sizing: border-box;
  transition: all 0.2s ease;
}

.otp-box-input:focus {
  outline: none;
  background: #ffffff;
  border-color: #ff6b35;
  box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.14);
}

/* ─── Submit Action Button ─────────────────────────────────────────────────── */
.btn-auth-primary {
  width: 100%;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, #ff6b35 0%, #ea580c 100%);
  color: #ffffff;
  font-weight: 800;
  font-size: 1.02rem;
  letter-spacing: -0.01em;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 10px 25px -4px rgba(234, 88, 12, 0.4);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.btn-auth-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #ff7a47 0%, #d94e09 100%);
  transform: translateY(-2px);
  box-shadow: 0 14px 30px -4px rgba(234, 88, 12, 0.5);
}

.btn-auth-primary:active:not(:disabled) {
  transform: translateY(0);
}

.btn-auth-primary:disabled {
  opacity: 0.75;
  cursor: not-allowed;
}

/* ─── Notice & Alerts ──────────────────────────────────────────────────────── */
.auth-notice-box {
  padding: 1rem 1.2rem;
  border-radius: 14px;
  margin-bottom: 1.4rem;
  font-size: 0.9rem;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  line-height: 1.5;
  animation: noticeSlide 0.3s ease;
}

@keyframes noticeSlide {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-notice-box.error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.auth-notice-box.success {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
}

/* ─── Bottom Alternate Navigation Links ────────────────────────────────────── */
.auth-footer-nav {
  margin-top: 1.8rem;
  padding-top: 1.4rem;
  border-top: 1px solid #f1f5f9;
  text-align: center;
  font-size: 0.9rem;
  color: #64748b;
}

.auth-footer-nav a {
  color: #ea580c;
  font-weight: 750;
  text-decoration: none;
  margin-left: 4px;
}

.auth-footer-nav a:hover {
  text-decoration: underline;
}

.auth-partner-banner {
  margin-top: 1.2rem;
  padding: 12px 16px;
  background: #f8fafc;
  border-radius: 12px;
  font-size: 0.84rem;
  color: #475569;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px dashed #cbd5e1;
}

.auth-partner-banner a {
  color: #0f172a;
  font-weight: 750;
  text-decoration: underline;
}

/* ─── Responsive Breakdown ─────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .auth-container {
    grid-template-columns: 1fr;
    max-width: 500px;
  }

  .auth-showcase {
    display: none;
  }

  .auth-form-panel {
    padding: 2.5rem 2rem;
  }
}