:root {
  --bg: #f7f8fb;
  --surface: #ffffff;
  --border: #e7eaf0;
  --text: #0f172a;
  --muted: #64748b;
  --primary: #4f46e5;
  --primary-dark: #4338ca;
  --primary-soft: #eef2ff;
  --success: #16a34a;
  --danger: #dc2626;
  --warning: #f59e0b;
  --radius: 14px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .04);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, .06);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, .08);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 { font-weight: 700; letter-spacing: -0.02em; color: var(--text); }
h1 { font-size: 2.5rem; line-height: 1.15; }
h2 { font-size: 1.875rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.0625rem; }

a { color: var(--primary); text-decoration: none; transition: color .15s; }
a:hover { color: var(--primary-dark); }

/* ---------- Navbar ---------- */
.navbar {
  background: var(--surface) !important;
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 0;
  box-shadow: var(--shadow-sm);
}
.navbar-brand {
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.03em;
  color: var(--text) !important;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.navbar-brand::before {
  content: '';
  display: inline-block;
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, var(--primary), #8b5cf6);
  border-radius: 8px;
}
.navbar .btn { border-radius: 8px; font-weight: 500; font-size: 0.875rem; padding: 0.4rem 0.9rem; }
.navbar .btn-light { background: var(--text); color: #fff; border: none; }
.navbar .btn-light:hover { background: #1e293b; color: #fff; }
.navbar .btn-outline-light { color: var(--text) !important; border-color: var(--border); }
.navbar .btn-outline-light:hover { background: var(--bg); color: var(--text) !important; border-color: var(--border); }

/* Vendor nav — dark variant */
.navbar.bg-dark { background: var(--text) !important; border-bottom: none; }
.navbar.bg-dark .navbar-brand { color: #fff !important; }
.navbar.bg-dark .btn-outline-light { color: rgba(255,255,255,.85) !important; border-color: rgba(255,255,255,.15); }
.navbar.bg-dark .btn-outline-light:hover { background: rgba(255,255,255,.1); color: #fff !important; border-color: rgba(255,255,255,.3); }
.navbar.bg-dark .btn-primary { background: var(--primary); border-color: var(--primary); }
.navbar.bg-dark .btn-outline-warning { color: #fbbf24 !important; border-color: rgba(251,191,36,.3); }
.navbar.bg-dark .btn-outline-warning:hover { background: rgba(251,191,36,.1); border-color: #fbbf24; }

/* ---------- Container ---------- */
.container { max-width: 1200px; }
.container-fluid { padding-left: 1.5rem; padding-right: 1.5rem; }

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s, transform .2s;
}
.card:hover { box-shadow: var(--shadow-md); }
.card.p-3 { padding: 1.25rem !important; }
.card.p-4 { padding: 1.75rem !important; }

/* KPI cards */
.kpi-value { font-size: 2rem; font-weight: 700; color: var(--text); line-height: 1.1; }
.kpi-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.25rem;
}

/* ---------- Buttons ---------- */
.btn {
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.9375rem;
  padding: 0.5rem 1rem;
  transition: all .15s;
  border-width: 1px;
}
.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
}
.btn-primary:hover, .btn-primary:focus {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(79, 70, 229, .25);
}
.btn-lg { padding: 0.75rem 1.5rem; font-size: 1rem; border-radius: 10px; }
.btn-sm { padding: 0.35rem 0.75rem; font-size: 0.8125rem; }
.btn-outline-primary { color: var(--primary); border-color: var(--border); }
.btn-outline-primary:hover { background: var(--primary-soft); color: var(--primary); border-color: var(--primary); }
.btn-outline-secondary { color: var(--text); border-color: var(--border); }
.btn-outline-secondary:hover { background: var(--bg); color: var(--text); border-color: var(--border); }
.btn-outline-danger { color: var(--danger); border-color: var(--border); }
.btn-outline-danger:hover { background: #fef2f2; color: var(--danger); border-color: var(--danger); }

/* ---------- Forms ---------- */
.form-control, .form-select {
  border-radius: 8px;
  border: 1px solid var(--border);
  padding: 0.6rem 0.85rem;
  font-size: 0.9375rem;
  transition: border-color .15s, box-shadow .15s;
  background: var(--surface);
}
.form-control:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
  outline: none;
}
.form-label { font-weight: 500; font-size: 0.875rem; color: var(--text); margin-bottom: 0.375rem; }
.form-check-input:checked { background-color: var(--primary); border-color: var(--primary); }

/* ---------- Tables ---------- */
.table { --bs-table-bg: transparent; }
.table thead th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  font-weight: 600;
  border-bottom: 1px solid var(--border) !important;
  padding: 0.75rem 1rem;
}
.table tbody td {
  padding: 0.875rem 1rem;
  border-color: var(--border) !important;
  vertical-align: middle;
}
.table tbody tr:last-child td { border-bottom: 0 !important; }
.table.bg-white { border-radius: var(--radius); overflow: hidden; }

/* ---------- Badges ---------- */
.badge {
  font-weight: 500;
  font-size: 0.75rem;
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  letter-spacing: 0.01em;
}
.badge.bg-primary { background: var(--primary-soft) !important; color: var(--primary); }
.badge.bg-success { background: #dcfce7 !important; color: var(--success); }
.badge.bg-danger { background: #fee2e2 !important; color: var(--danger); }
.badge.bg-secondary { background: #f1f5f9 !important; color: var(--muted); }
.badge.bg-warning { background: #fef3c7 !important; color: #b45309; }

/* ---------- Alerts ---------- */
.alert {
  border-radius: 10px;
  border: 1px solid;
  font-size: 0.9rem;
  padding: 0.75rem 1rem;
}
.alert-danger { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.alert-success { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
.alert-info { background: var(--primary-soft); border-color: #c7d2fe; color: var(--primary-dark); }

/* ---------- Hero ---------- */
.hero {
  padding: 5rem 0 4rem;
  text-align: center;
  background: linear-gradient(180deg, #ffffff 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
}
.hero h1 {
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
  max-width: 720px;
  margin: 0 auto 1rem;
}
.hero p.lead {
  font-size: 1.125rem;
  color: var(--muted);
  max-width: 620px;
  margin: 0 auto 2rem;
  line-height: 1.6;
}
.hero .btn { margin: 0 0.35rem 0.5rem; }

/* ---------- Login box ---------- */
.login-box {
  max-width: 420px;
  margin: 4vh auto;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 2.5rem !important;
  border: 1px solid var(--border);
}
.login-box h4 { font-size: 1.5rem; margin-bottom: 1.5rem; letter-spacing: -0.02em; }
.login-box .small { color: var(--muted); }

/* ---------- Progress ---------- */
.progress {
  background: #f1f5f9;
  border-radius: 999px;
  overflow: hidden;
}
.progress-bar {
  background: linear-gradient(90deg, var(--primary), #8b5cf6);
  transition: width .3s;
}

/* ---------- Lists ---------- */
.list-group-item {
  border-color: var(--border);
  padding: 0.75rem 0;
  background: transparent;
}
.list-group-item:first-child { padding-top: 0; }
.list-group-item:last-child { padding-bottom: 0; }

/* ---------- Utility ---------- */
.text-muted { color: var(--muted) !important; }
.fs-4 { font-size: 1.75rem !important; font-weight: 700; }
.divider { height: 1px; background: var(--border); margin: 1.5rem 0; }

/* ---------- Directory cards ---------- */
.dir-card {
  display: block;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  text-decoration: none;
  transition: all .2s;
  height: 100%;
}
.dir-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  color: var(--text);
}
.dir-card .name { font-weight: 600; font-size: 1.0625rem; margin-bottom: 0.35rem; }
.dir-card .meta { font-size: 0.875rem; color: var(--muted); }

/* ---------- Mobile ---------- */
@media (max-width: 768px) {
  .hero { padding: 3rem 0 2.5rem; }
  .hero h1 { font-size: 2rem; }
  .hero p.lead { font-size: 1rem; }
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.25rem; }
  .kpi-value { font-size: 1.5rem; }
  .login-box { padding: 1.75rem !important; margin: 2vh auto; }
  .card.p-4 { padding: 1.25rem !important; }
}

.feature-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 1.2rem;
  background: #0f172a;
  color: #fff;
  border-radius: 10px;
  text-decoration: none;
  transition: transform .15s, box-shadow .15s;
}
.store-btn:hover {
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(15,23,42,.2);
}
.timeline { position: relative; padding-left: 1.5rem; }
.timeline::before {
  content: '';
  position: absolute;
  left: 6px; top: 6px; bottom: 6px;
  width: 2px;
  background: #e7eaf0;
}
.timeline-item { position: relative; padding-bottom: 1.25rem; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot {
  position: absolute;
  left: -1.5rem;
  top: 6px;
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 0 0 2px currentColor;
}

/* ==========================================================
   DIRECTORY — visual hierarchy: featured / verified / normal
   ========================================================== */
.dir-hero {
  padding: 3rem 0 2rem;
  background: linear-gradient(180deg, #ffffff 0%, #f7f8fb 100%);
  border-bottom: 1px solid #e7eaf0;
}
.dir-hero h1 {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
}
.dir-hero p {
  color: #64748b;
  font-size: 1.0625rem;
  margin-bottom: 1.5rem;
  max-width: 520px;
}
.dir-search {
  max-width: 640px;
  position: relative;
}
.dir-search input {
  width: 100%;
  padding: 0.9rem 1rem 0.9rem 3rem;
  border: 1px solid #e7eaf0;
  border-radius: 12px;
  font-size: 1rem;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15,23,42,.04);
  transition: box-shadow .15s, border-color .15s;
}
.dir-search input:focus {
  outline: none;
  border-color: #4f46e5;
  box-shadow: 0 0 0 4px #eef2ff;
}
.dir-search svg {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
}

.dir-chips {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 1.25rem;
}
.dir-chip {
  padding: 0.45rem 1rem;
  border-radius: 999px;
  border: 1px solid #e7eaf0;
  background: #fff;
  color: #334155;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: all .15s;
  cursor: pointer;
}
.dir-chip:hover { border-color: #4f46e5; color: #4f46e5; }
.dir-chip.active { background: #4f46e5; color: #fff; border-color: #4f46e5; }

.dir-section {
  padding: 2.5rem 0;
}
.dir-section h2 {
  font-size: 1.375rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.dir-section h2 .star { color: #f59e0b; }

/* Featured card — larger, image-dominant */
.dir-featured {
  display: block;
  background: #fff;
  border: 1px solid #e7eaf0;
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: all .2s;
  height: 100%;
  position: relative;
}
.dir-featured:hover {
  border-color: #4f46e5;
  box-shadow: 0 12px 32px rgba(79,70,229,.12);
  transform: translateY(-2px);
}
.dir-featured .cover {
  height: 220px;
  background-size: cover;
  background-position: center;
  position: relative;
}
.dir-featured .cover::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,.35) 100%);
}
.dir-featured .badge-featured {
  position: absolute;
  top: 1rem; left: 1rem;
  background: #f59e0b;
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 0.35rem 0.7rem;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  z-index: 2;
}
.dir-featured .logo {
  position: absolute;
  bottom: -28px;
  left: 1.25rem;
  width: 64px; height: 64px;
  border-radius: 14px;
  background: #fff;
  border: 3px solid #fff;
  box-shadow: 0 4px 12px rgba(15,23,42,.1);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; font-weight: 700; color: #4f46e5;
  background-size: cover; background-position: center;
  z-index: 2;
}
.dir-featured .body {
  padding: 2.25rem 1.25rem 1.25rem;
}
.dir-featured .name {
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.35rem;
  display: flex; align-items: center; gap: 0.5rem;
}
.dir-featured .name .verified { color: #4f46e5; }
.dir-featured .meta {
  color: #64748b;
  font-size: 0.9375rem;
  margin-bottom: 0.75rem;
}
.dir-featured .description {
  color: #334155;
  font-size: 0.9375rem;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.dir-featured .stats {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.875rem;
  color: #64748b;
  margin-bottom: 1rem;
}
.dir-featured .stats .rating { color: #0f172a; font-weight: 600; }
.dir-featured .stats .rating .star { color: #f59e0b; margin-right: 0.15rem; }
.dir-featured .stats .open { color: #16a34a; font-weight: 500; }
.dir-featured .stats .closed { color: #dc2626; font-weight: 500; }

/* Normal card — compact */
.dir-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #e7eaf0;
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: all .2s;
  height: 100%;
}
.dir-card:hover {
  border-color: #4f46e5;
  box-shadow: 0 8px 24px rgba(15,23,42,.08);
  transform: translateY(-2px);
}
.dir-card .cover {
  height: 140px;
  background-size: cover;
  background-position: center;
  background-color: #f1f5f9;
}
.dir-card .body {
  padding: 1rem 1.25rem 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.dir-card .name {
  font-size: 1.0625rem;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 0.25rem;
  display: flex; align-items: center; gap: 0.4rem;
}
.dir-card .name .verified { color: #4f46e5; font-size: 0.875rem; }
.dir-card .meta {
  color: #64748b;
  font-size: 0.8125rem;
  margin-bottom: 0.75rem;
}
.dir-card .chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-bottom: 0.75rem;
}
.dir-card .chip {
  font-size: 0.6875rem;
  padding: 0.2rem 0.5rem;
  background: #f1f5f9;
  color: #475569;
  border-radius: 4px;
}
.dir-card .stats {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.8125rem;
  color: #64748b;
  margin-top: auto;
}
.dir-card .stats .rating { color: #0f172a; font-weight: 600; }
.dir-card .stats .rating .star { color: #f59e0b; }
.dir-card .stats .open { color: #16a34a; }

.dir-empty {
  text-align: center;
  padding: 4rem 1rem;
  color: #64748b;
}
.dir-empty svg { color: #cbd5e1; margin-bottom: 1rem; }

@media (max-width: 768px) {
  .dir-hero { padding: 2rem 0 1.5rem; }
  .dir-hero h1 { font-size: 1.75rem; }
  .dir-featured .cover { height: 180px; }
  .dir-card .cover { height: 120px; }
}

/* ==========================================================
   BUSINESS PROFILE PAGE
   ========================================================== */
.biz-cover {
  height: 340px;
  background-size: cover;
  background-position: center;
  background-color: #e2e8f0;
  position: relative;
}
.biz-header {
  margin-top: -80px;
  position: relative;
  z-index: 2;
  padding: 0 1rem;
}
.biz-card {
  background: #fff;
  border-radius: 16px;
  border: 1px solid #e7eaf0;
  box-shadow: 0 8px 24px rgba(15,23,42,.06);
  padding: 2rem;
}
.biz-logo {
  width: 96px; height: 96px;
  border-radius: 18px;
  border: 4px solid #fff;
  box-shadow: 0 4px 12px rgba(15,23,42,.1);
  margin-top: -48px;
  background: #eef2ff;
  display: flex; align-items: center; justify-content: center;
  font-size: 2.25rem; font-weight: 700; color: #4f46e5;
  background-size: cover; background-position: center;
  flex-shrink: 0;
}
.biz-name {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a;
  margin-bottom: 0.25rem;
  display: flex; align-items: center; gap: 0.5rem;
  flex-wrap: wrap;
}
.biz-name .verified {
  background: #eef2ff;
  color: #4f46e5;
  font-size: 0.75rem;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  font-weight: 600;
  display: inline-flex; align-items: center; gap: 0.25rem;
}
.biz-meta {
  color: #64748b;
  font-size: 0.9375rem;
}
.biz-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 1.25rem;
}
.biz-actions .btn {
  padding: 0.55rem 1rem;
  font-size: 0.9375rem;
}
.biz-section {
  padding: 2rem 0;
  border-bottom: 1px solid #e7eaf0;
}
.biz-section:last-child { border-bottom: 0; }
.biz-section h3 {
  font-size: 0.8125rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
}
.svc-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: #f7f8fb;
  border-radius: 10px;
  margin-bottom: 0.5rem;
  transition: background .15s;
}
.svc-row:hover { background: #eef2ff; }
.svc-row .name { font-weight: 600; color: #0f172a; }
.svc-row .meta { font-size: 0.8125rem; color: #64748b; }
.hours-row {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px dashed #e7eaf0;
  font-size: 0.9375rem;
}
.hours-row:last-child { border-bottom: 0; }
.hours-row .day { color: #64748b; }
.hours-row .time { color: #0f172a; font-weight: 500; }
.hours-row.today { color: #4f46e5; font-weight: 600; }
.hours-row.today .day { color: #4f46e5; }
.map-embed {
  height: 220px;
  border-radius: 12px;
  overflow: hidden;
  background: #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  font-size: 0.875rem;
  border: 1px solid #e7eaf0;
}
.reminder-box {
  background: linear-gradient(135deg, #eef2ff, #f5f3ff);
  border-radius: 16px;
  padding: 2rem;
  border: 1px solid #c7d2fe;
}
.reminder-box h4 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.5rem;
}
.reminder-box p {
  color: #475569;
  margin-bottom: 1.25rem;
  font-size: 0.9375rem;
}