/* =========================================================
   SMART PARKING – Auth Pages (Login & Register)
   ========================================================= */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body.sp-auth-body {
  font-family: 'Inter', sans-serif;
  background: #f4f6f9;
  color: #1a1a2e;
  font-size: 14px;
  min-height: 100vh;
}

/* ── Layout ──────────────────────────────────────────────── */
.sp-auth-layout {
  display: flex;
  min-height: 100vh;
}

/* ── Left Panel ──────────────────────────────────────────── */
.sp-auth-left {
  width: 480px;
  flex-shrink: 0;
  background: linear-gradient(145deg, #0f1b4c 0%, #1a56db 60%, #2563eb 100%);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-start;
  padding: 48px 44px;
}

.sp-auth-left-inner {
  position: relative;
  z-index: 2;
  width: 100%;
}

/* Decorative circles */
.sp-deco-circle {
  position: absolute;
  border-radius: 50%;
  opacity: 0.12;
  background: #fff;
  z-index: 1;
}
.sp-deco-1 {
  width: 380px;
  height: 380px;
  bottom: -120px;
  right: -100px;
}
.sp-deco-2 {
  width: 200px;
  height: 200px;
  top: -60px;
  left: -60px;
}

/* Logo */
.sp-auth-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sp-auth-logo-icon {
  width: 42px;
  height: 42px;
  background: rgba(255,255,255,0.18);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.25);
}

.sp-auth-logo-icon.sm {
  width: 34px;
  height: 34px;
  background: #1a56db;
  font-size: 1.1rem;
  border: none;
}

.sp-auth-logo-img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  border-radius: 10px;
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.25);
}

.sp-auth-logo-img.sm {
  width: 34px;
  height: 34px;
  background: #fff;
  border: 1px solid #e5e7eb;
}

.sp-auth-logo-text {
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.5px;
}

.sp-auth-headline {
  font-size: 1.8rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.25;
  margin-bottom: 12px;
}

.sp-auth-sub {
  color: rgba(255,255,255,0.75);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* Feature pills */
.sp-feature-pill {
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(255,255,255,0.9);
  font-size: 0.88rem;
  font-weight: 500;
}

.sp-feature-icon {
  width: 34px;
  height: 34px;
  background: rgba(255,255,255,0.15);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: #fff;
  flex-shrink: 0;
}

/* Stats row */
.sp-auth-stats {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 20px;
  background: rgba(255,255,255,0.1);
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.15);
}

.sp-auth-stat {
  flex: 1;
  text-align: center;
}

.sp-auth-stat-num {
  font-size: 1.3rem;
  font-weight: 800;
  color: #fff;
}

.sp-auth-stat-lbl {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.65);
  margin-top: 2px;
}

.sp-auth-stat-divider {
  width: 1px;
  height: 40px;
  background: rgba(255,255,255,0.2);
}

/* ── Right Panel ─────────────────────────────────────────── */
.sp-auth-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  overflow-y: auto;
  position: relative;
  background:
    linear-gradient(110deg, rgba(248, 250, 252, .96) 0%, rgb(248 250 252 / 0%) 42%, rgba(219, 234, 254, .72) 100%), url(https://images.unsplash.com/photo-1506521781263-d8422e82f27a?auto=format&fit=crop&w=1920&q=85) center / cover no-repeat;
}

.sp-auth-right::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 18%, rgba(37,99,235,.16), transparent 34%),
    radial-gradient(circle at 90% 82%, rgba(15,23,42,.18), transparent 36%);
  pointer-events: none;
}

.sp-auth-card {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 16px;
  padding: 36px 36px;
  border: 1px solid #e8eaed;
  box-shadow: 0 4px 24px rgba(0,0,0,.07);
  position: relative;
  z-index: 1;
}

.sp-auth-card-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 18px;
}

.sp-auth-card-logo-img,
.sp-auth-card-logo-icon {
  width: 74px;
  height: 74px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .08);
}

.sp-auth-card-logo-img {
  object-fit: contain;
  padding: 8px;
}

.sp-auth-card-logo-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1a56db;
  font-size: 2rem;
}

.sp-auth-title {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 6px;
  text-align: center;
}

.sp-auth-desc {
  color: #888;
  font-size: 0.88rem;
  margin-bottom: 24px;
  text-align: center;
}

/* ── Role tabs ───────────────────────────────────────────── */
.sp-role-tabs {
  display: flex;
  background: #f4f6f9;
  border-radius: 10px;
  padding: 4px;
  gap: 4px;
}

.sp-role-tab {
  flex: 1;
  border: none;
  background: transparent;
  border-radius: 7px;
  padding: 8px 4px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #888;
  cursor: pointer;
  transition: background .2s, color .2s, box-shadow .2s;
  font-family: 'Inter', sans-serif;
  white-space: nowrap;
}

.sp-role-tab.active {
  background: #fff;
  color: #1a56db;
  box-shadow: 0 1px 4px rgba(0,0,0,.1);
}

/* ── Input styles ─────────────────────────────────────────── */
.sp-input-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #666;
  margin-bottom: 6px;
}

.sp-input-group {
  display: flex;
  align-items: center;
  border: 1.5px solid #e0e3e8;
  border-radius: 9px;
  background: #fff;
  overflow: hidden;
  transition: border-color .2s, box-shadow .2s;
}

.sp-input-group:focus-within {
  border-color: #1a56db;
  box-shadow: 0 0 0 3px rgba(26,86,219,.1);
}

.sp-input-icon {
  padding: 0 12px;
  color: #aaa;
  font-size: 1rem;
  flex-shrink: 0;
  line-height: 1;
}

.sp-input {
  flex: 1;
  border: none;
  outline: none;
  padding: 11px 12px 11px 0;
  font-size: 0.9rem;
  font-family: 'Inter', sans-serif;
  color: #1a1a2e;
  background: transparent;
  min-width: 0;
}

.sp-input::placeholder { color: #c0c4cc; }

.sp-select {
  padding-left: 0;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23888' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

.sp-input-toggle {
  background: none;
  border: none;
  padding: 0 12px;
  color: #aaa;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  transition: color .2s;
  flex-shrink: 0;
}
.sp-input-toggle:hover { color: #1a56db; }

.sp-input-invalid { border-color: #ef4444 !important; }
.sp-input-group:has(.sp-input-invalid) { border-color: #ef4444; box-shadow: 0 0 0 3px rgba(239,68,68,.1); }

.sp-input-error {
  font-size: 0.75rem;
  color: #ef4444;
  margin-top: 5px;
  display: none;
}

/* ── Password strength ───────────────────────────────────── */
.sp-strength {
  height: 4px;
  background: #f1f3f6;
  border-radius: 4px;
  overflow: hidden;
}

.sp-strength-bar {
  height: 100%;
  border-radius: 4px;
  transition: width .3s ease, background .3s;
  width: 0;
}

.sp-strength-bar.sp-strength-weak   { background: #ef4444; }
.sp-strength-bar.sp-strength-fair   { background: #f97316; }
.sp-strength-bar.sp-strength-good   { background: #eab308; }
.sp-strength-bar.sp-strength-strong { background: #22c55e; }

.sp-strength-label {
  font-size: 0.72rem;
  margin-top: 4px;
  font-weight: 600;
}
.sp-strength-label.sp-strength-weak   { color: #ef4444; }
.sp-strength-label.sp-strength-fair   { color: #f97316; }
.sp-strength-label.sp-strength-good   { color: #eab308; }
.sp-strength-label.sp-strength-strong { color: #22c55e; }

/* ── Buttons ─────────────────────────────────────────────── */
.sp-btn-primary {
  background: #1a56db;
  color: #fff;
  border: none;
  border-radius: 9px;
  padding: 12px 20px;
  font-size: 0.88rem;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  letter-spacing: 0.3px;
  transition: background .2s, transform .1s, box-shadow .2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.sp-btn-primary:hover {
  background: #1546b5;
  box-shadow: 0 4px 14px rgba(26,86,219,.35);
}
.sp-btn-primary:active  { transform: scale(.98); }
.sp-btn-primary:disabled {
  background: #93b4f0;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.sp-btn-outline {
  background: transparent;
  color: #555;
  border: 1.5px solid #e0e3e8;
  border-radius: 9px;
  padding: 12px 20px;
  font-size: 0.88rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: border-color .2s, color .2s, background .2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.sp-btn-outline:hover {
  border-color: #1a56db;
  color: #1a56db;
  background: #f0f4ff;
}

/* ── Alert ───────────────────────────────────────────────── */
.sp-alert {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
}

.sp-alert-error {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

/* ── Divider ─────────────────────────────────────────────── */
.sp-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: #ccc;
  font-size: 0.8rem;
}
.sp-divider::before,
.sp-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e8eaed;
}

/* ── Link ────────────────────────────────────────────────── */
.sp-link {
  color: #1a56db;
  text-decoration: none;
  font-weight: 600;
}
.sp-link:hover { text-decoration: underline; color: #1546b5; }

/* ── Demo hint ───────────────────────────────────────────── */
.sp-demo-hint {
  background: #f8f9ff;
  border: 1px dashed #c5d3f5;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.8rem;
  color: #5577bb;
  text-align: center;
}

/* ── Footer ──────────────────────────────────────────────── */
.sp-auth-footer {
  font-size: 0.75rem;
  color: #bbb;
  margin-top: 20px;
  text-align: center;
}

/* ── Progress bar ────────────────────────────────────────── */
.sp-progress {
  height: 6px;
  background: #f1f3f6;
  border-radius: 6px;
  overflow: hidden;
}

.sp-progress-bar {
  height: 100%;
  background: #1a56db;
  border-radius: 6px;
  transition: width .4s ease;
}

.sp-progress-success { background: #22c55e; }

/* ── Step sidebar indicators ─────────────────────────────── */
.sp-steps {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.sp-step {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  opacity: 0.45;
  transition: opacity .3s;
}

.sp-step.active { opacity: 1; }

.sp-step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  border: 2px solid rgba(255,255,255,0.35);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background .3s, border-color .3s;
}

.sp-step.active .sp-step-num {
  background: rgba(255,255,255,0.25);
  border-color: rgba(255,255,255,0.8);
}

.sp-step-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
}

.sp-step-desc {
  font-size: 0.76rem;
  color: rgba(255,255,255,0.65);
  margin-top: 2px;
}

.sp-step-line {
  width: 2px;
  height: 24px;
  background: rgba(255,255,255,0.2);
  margin-left: 13px;
  margin: 6px 0 6px 13px;
}

/* ── Confirm card (Step 3) ───────────────────────────────── */
.sp-confirm-card {
  background: #f8f9fc;
  border: 1px solid #e8eaed;
  border-radius: 10px;
  overflow: hidden;
}

.sp-confirm-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px solid #f1f3f6;
}

.sp-confirm-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.sp-confirm-value {
  font-size: 0.88rem;
  color: #1a1a2e;
  font-weight: 500;
  text-align: right;
  max-width: 60%;
  word-break: break-all;
}

/* ── Success box ─────────────────────────────────────────── */
.sp-success-box {
  text-align: center;
  padding: 20px 0 8px;
}

.sp-success-icon {
  width: 60px;
  height: 60px;
  background: #dcfce7;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: #16a34a;
  margin: 0 auto;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 991px) {
  .sp-auth-right  { padding: 24px 16px; }
  .sp-auth-card   { padding: 28px 20px; max-width: 100%; }
}

@media (max-width: 480px) {
  .sp-role-tab { font-size: 0.72rem; padding: 7px 2px; }
}
