/* ═══════════════════════════════════════════════════
   TheNearByShop — Seller Onboarding SPA
   Professional Branded Stylesheet
   ═══════════════════════════════════════════════════ */

:root {
  --brand-red: #c23c3c;
  --brand-red-dark: #b71c1c;
  --brand-dark: #1a1a2e;
  --brand-indigo: #4f46e5;
  --brand-green: #10b981;
  --brand-orange: #f59e0b;
  --surface: #ffffff;
  --bg: #f4f6fb;
  --text: #1e293b;
  --muted: #64748b;
  --border: #e2e8f0;
  --radius: 14px;
  --shadow-sm: 0 2px 8px rgba(0,0,0,.04);
  --shadow-md: 0 8px 30px rgba(0,0,0,.07);
  --shadow-lg: 0 16px 48px rgba(0,0,0,.10);
  --transition: .25s cubic-bezier(.4,0,.2,1);
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ─── Brand Logo (matches TheNearByShop.com official logo) ─── */
.brand-logo {
  text-decoration: none;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -.02em;
}
.brand-the    { color: var(--brand-red); }
.brand-nearby { color: var(--brand-red); }
.brand-shop   { color: var(--brand-red); }
.brand-dot    { color: var(--text); font-weight: 700; font-size: .88em; }

/* ─── Topbar ─── */
.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
  position: sticky;
  top: 0;
  z-index: 100;
}
.topbar-tagline {
  font-size: .82rem;
  color: var(--muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .06em;
}

/* ─── Hero Ribbon ─── */
.hero-ribbon {
  background: linear-gradient(135deg, var(--brand-dark) 0%, #16213e 100%);
  padding: 52px 0 48px;
  text-align: center;
}
.hero-title {
  color: #fff;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 800;
  margin-bottom: 8px;
}
.hero-sub {
  color: rgba(255,255,255,.7);
  font-size: 1rem;
  max-width: 520px;
  margin: 0 auto;
}

/* ─── SPA Container ─── */
.spa-container { padding: 32px 0 56px; flex: 1; }

/* ─── Benefits Cards ─── */
.benefit-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
  height: 100%;
  transition: box-shadow var(--transition), transform var(--transition);
}
.benefit-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}
.benefit-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #eef2ff, #fce7f3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  font-size: 1.4rem;
  color: var(--brand-indigo);
}
.benefit-card h6 {
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text);
}
.benefit-card p {
  font-size: .82rem;
  color: var(--muted);
  margin: 0;
}

/* ─── CTA Card ─── */
.cta-card {
  background: var(--surface);
  border: 2px solid var(--brand-red);
  border-radius: var(--radius);
  padding: 32px 24px;
  box-shadow: var(--shadow-md);
}
.cta-card h5 { font-weight: 800; }

/* ─── Buttons ─── */
.btn-brand {
  background: var(--brand-red);
  color: #fff;
  border: none;
  font-weight: 600;
  border-radius: 10px;
  padding: 12px 24px;
  transition: background var(--transition), transform var(--transition);
}
.btn-brand:hover {
  background: var(--brand-red-dark);
  color: #fff;
  transform: translateY(-1px);
}
.btn-outline-brand {
  color: var(--brand-red);
  border: 1.5px solid var(--brand-red);
  background: transparent;
  font-weight: 600;
  border-radius: 10px;
  padding: 10px 20px;
  transition: all var(--transition);
}
.btn-outline-brand:hover {
  background: var(--brand-red);
  color: #fff;
}
.link-brand {
  color: var(--brand-red);
  font-weight: 600;
  text-decoration: none;
}
.link-brand:hover { text-decoration: underline; }

/* ─── Stepper Header ─── */
.stepper-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 28px;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding: 0 8px;
}
.stepper-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 68px;
  flex-shrink: 0;
}
.stepper-item span {
  font-size: .7rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .03em;
  text-align: center;
}
.stepper-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #e2e8f0;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: all var(--transition);
  border: 2.5px solid transparent;
}
.stepper-item.active .stepper-circle {
  background: var(--brand-red);
  color: #fff;
  border-color: var(--brand-red);
  box-shadow: 0 0 0 4px rgba(214,48,49,.15);
}
.stepper-item.done .stepper-circle {
  background: var(--brand-green);
  color: #fff;
  border-color: var(--brand-green);
}
.stepper-item.active span,
.stepper-item.done span {
  color: var(--text);
}
.stepper-line {
  flex: 1;
  height: 3px;
  background: #e2e8f0;
  border-radius: 3px;
  min-width: 24px;
  margin: 0 4px;
  transition: background var(--transition);
  align-self: center;
  margin-bottom: 22px;
}
.stepper-line.done {
  background: var(--brand-green);
}

/* ─── Form Card ─── */
.form-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 36px 32px 28px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
  animation: fadeUp .35s ease;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.step-header { margin-bottom: 24px; }
.step-header h5 {
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--text);
}
.step-header p { margin: 0; }

.form-label {
  font-weight: 600;
  font-size: .85rem;
  color: var(--text);
}
.form-control, .form-select {
  border-radius: 10px;
  border-color: var(--border);
  padding: 10px 14px;
  font-size: .9rem;
}
.form-control:focus, .form-select:focus {
  border-color: var(--brand-red);
  box-shadow: 0 0 0 3px rgba(214,48,49,.1);
}
.input-group-text {
  background: #f8fafc;
  border-color: var(--border);
  color: var(--muted);
  border-radius: 10px 0 0 10px;
}

/* ─── Map ─── */
.map-container {
  height: 280px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

/* ─── Category Tree ─── */
.category-tree-box {
  max-height: 360px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  background: #fafbfc;
}
.category-node { padding: 4px 0; }
.category-children {
  margin-left: 1.5rem;
  border-left: 2px dashed var(--border);
  padding-left: 12px;
}
.category-tree-box .form-check-input:checked {
  background-color: var(--brand-red);
  border-color: var(--brand-red);
}

/* ─── Upload Cards ─── */
.upload-card {
  background: #fafbfc;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 20px 16px;
  text-align: center;
  transition: border-color var(--transition), background var(--transition);
}
.upload-card:hover {
  border-color: var(--brand-red);
  background: #fff5f5;
}
.upload-card.optional {
  border-style: dotted;
  opacity: .85;
}
.upload-icon {
  font-size: 1.6rem;
  color: var(--brand-indigo);
  margin-bottom: 8px;
}

/* ─── Review Summary ─── */
.review-summary {
  background: #f8fafc;
  border-radius: var(--radius);
  padding: 20px;
  border: 1px solid var(--border);
}
.review-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #f1f5f9;
  font-size: .88rem;
}
.review-row:last-child { border: none; }
.review-label { color: var(--muted); font-weight: 500; }
.review-value { font-weight: 600; color: var(--text); text-align: right; max-width: 60%; word-break: break-word; }
.review-section-title {
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--brand-red);
  font-weight: 700;
  margin: 16px 0 6px;
  padding-bottom: 4px;
  border-bottom: 2px solid var(--brand-red);
  display: inline-block;
}
.review-section-title:first-child { margin-top: 0; }

/* ─── Step Navigation ─── */
.step-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

/* ─── Success Card ─── */
.success-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 48px 32px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  animation: fadeUp .4s ease;
}
.success-check {
  font-size: 4rem;
  color: var(--brand-green);
  margin-bottom: 16px;
}
.ref-badge {
  display: inline-block;
  background: #ecfdf5;
  color: #065f46;
  padding: 8px 20px;
  border-radius: 8px;
  font-size: .9rem;
  margin-top: 12px;
}

/* ─── Footer ─── */
.site-footer {
  background: var(--brand-dark);
  color: rgba(255,255,255,.6);
  padding: 28px 0;
  font-size: .82rem;
  margin-top: auto;
}
.site-footer .brand-logo { font-size: 1.1rem; }
.site-footer .brand-the    { color: var(--brand-red); }
.site-footer .brand-nearby  { color: var(--brand-red); }
.site-footer .brand-shop    { color: var(--brand-red); }
.site-footer .brand-dot     { color: rgba(255,255,255,.9); opacity:.8; }

/* ─── Responsive ─── */
@media (max-width: 768px) {
  .hero-ribbon { padding: 36px 0 32px; }
  .form-card { padding: 24px 18px 20px; }
  .stepper-header { gap: 0; justify-content: flex-start; }
  .stepper-item { min-width: 56px; }
  .stepper-circle { width: 36px; height: 36px; font-size: .95rem; }
  .stepper-item span { font-size: .6rem; }
  .step-nav { flex-direction: column; gap: 12px; }
  .step-nav .btn { width: 100%; }
}

/* ─── Service Setup (Shop Hours + Employees) ─── */
.service-setup-section {
  margin-bottom: 28px;
}
.service-setup-section:last-child {
  margin-bottom: 0;
}
.service-setup-title {
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}
.shop-hours-list {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  background: #fafbfc;
}
.shop-hours-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 0;
  border-bottom: 1px solid #f1f5f9;
  flex-wrap: wrap;
}
.shop-hours-row:last-child { border-bottom: none; }
.shop-hours-check {
  min-width: 130px;
  margin-bottom: 0;
}
.shop-hours-sep {
  font-size: .8rem;
  color: var(--muted);
}
.shop-hours-row input[type="time"] {
  max-width: 130px;
}
.employee-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.employee-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  background: #fafbfc;
}
.employee-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.employee-card-title {
  font-weight: 700;
  font-size: .85rem;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: .03em;
}
.availability-slot-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.availability-slot-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.availability-slot-row select,
.availability-slot-row input[type="time"] {
  max-width: 150px;
}

/* ─── Phone OTP Verification ─── */
.otp-section {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
  margin-top: 4px;
}
.otp-section.verified {
  background: #ecfdf5;
  border-color: var(--brand-green);
}
.otp-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.otp-row .form-control {
  max-width: 160px;
  letter-spacing: .35em;
  text-align: center;
  font-weight: 700;
  font-size: 1.1rem;
}
.otp-timer {
  font-size: .78rem;
  color: var(--muted);
  margin-top: 6px;
}
.otp-timer .resend-link {
  color: var(--brand-red);
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
}
.otp-timer .resend-link.disabled {
  opacity: .4;
  pointer-events: none;
  text-decoration: none;
}
.phone-verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--brand-green);
  font-weight: 600;
  font-size: .85rem;
}
.phone-verified-badge i { font-size: 1.05rem; }

@media (max-width: 480px) {
  .spa-container { padding: 20px 0 36px; }
  .benefit-card { padding: 20px 14px; }
  .cta-card { padding: 24px 18px; }
  .upload-card { padding: 14px 10px; }
  .otp-row { flex-direction: column; }
  .otp-row .form-control { max-width: 100%; }
}
