:root {
  --blue: #0077e6;
  --blue-dark: #005bb5;
  --blue-soft: #e0f2fe;
  --bg: #f4f7fb;
  --white: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --green: #10b981;
  --wa: #16a34a;
  --danger: #ef4444;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  padding-bottom: 78px; /* Space for fixed bottom nav */
}
.hidden { display: none !important; }
.app-shell { max-width: 980px; margin: 0 auto; padding: 0 16px; }

/* Top Blue App Header */
.top-header {
  position: sticky; top: 0; z-index: 40;
  background: var(--blue);
  color: #fff;
  padding: 12px 0;
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.header-left { display: flex; align-items: center; gap: 12px; }
.brand-logo {
  display: flex; align-items: center; gap: 6px;
  text-decoration: none; color: #fff;
}
.logo-text { display: flex; flex-direction: column; line-height: 1; font-weight: 800; font-size: 15px; }
.logo-mark {
  width: 26px; height: 26px; border-radius: 7px;
  background: #fff; color: var(--blue);
  display: grid; place-items: center; font-size: 13px;
}
.header-divider { width: 1px; height: 28px; background: rgba(255,255,255,0.28); }
.location-picker { display: flex; flex-direction: column; }
.loc-label { font-size: 9.5px; font-weight: 700; letter-spacing: 0.5px; opacity: 0.85; }
.loc-select-wrap { display: flex; align-items: center; gap: 4px; position: relative; }
.loc-select-wrap select {
  appearance: none; background: transparent; border: none; color: #fff;
  font-family: inherit; font-size: 13.5px; font-weight: 700;
  padding-right: 16px; cursor: pointer; outline: none;
}
.loc-select-wrap select option { color: var(--text); background: #fff; }
.loc-select-wrap i { font-size: 10px; pointer-events: none; margin-left: -12px; }

.header-right { display: flex; align-items: center; gap: 8px; }
.icon-btn-ghost {
  background: transparent; border: none; color: #fff;
  font-size: 18px; padding: 6px; cursor: pointer;
}
.btn-header-pill {
  background: rgba(255,255,255,0.18); color: #fff;
  border: 1px solid rgba(255,255,255,0.35); border-radius: 999px;
  padding: 7px 13px; font-size: 12px; font-weight: 700; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
}

/* Blue Hero + Search + Floating 4x3 Quick Grid */
.blue-hero {
  background: linear-gradient(180deg, var(--blue) 0%, #0b84f3 82%, var(--bg) 82%);
  padding: 12px 0 14px;
}
.hero-title { color: #fff; font-size: 27px; font-weight: 800; line-height: 1.2; }
.hero-subtitle { color: rgba(255,255,255,0.92); font-size: 14px; margin-top: 4px; margin-bottom: 16px; }

.pill-search {
  display: flex; align-items: center; gap: 10px;
  background: #fff; border-radius: 999px;
  padding: 6px 8px 6px 16px;
  box-shadow: 0 8px 20px rgba(0, 50, 120, 0.16);
  margin-bottom: 18px;
}
.pill-search i { color: #94a3b8; font-size: 16px; }
.pill-search input {
  flex: 1; border: none; outline: none; background: transparent;
  font-family: inherit; font-size: 14px; color: var(--text); min-width: 0;
}
.pill-search-btn {
  background: var(--blue); color: #fff; border: none; border-radius: 999px;
  padding: 8px 16px; font-weight: 700; font-size: 12.5px; cursor: pointer;
}

/* Floating White Card with 4x3 Category Icons */
.quick-grid-card {
  background: #fff;
  border-radius: 22px;
  padding: 18px 10px 14px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}
.quick-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px 6px;
}
.quick-tile {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  background: transparent; border: none; cursor: pointer; padding: 2px;
}
.quick-tile-icon {
  width: 56px; height: 56px; border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  font-size: 23px; margin-bottom: 7px;
  position: relative;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.12), inset 0 -3px 6px rgba(0,0,0,0.12), inset 0 2px 4px rgba(255,255,255,0.45);
  transition: transform 0.15s ease;
}
.quick-tile:active .quick-tile-icon,
.quick-tile:hover .quick-tile-icon { transform: translateY(-2px) scale(1.04); }
.quick-tile.active .quick-tile-icon { outline: 3px solid var(--blue); outline-offset: 2px; }
.quick-tile-label {
  font-size: 11.5px; font-weight: 700; color: var(--text);
  line-height: 1.25;
}

/* Content Sections */
.content-section { padding: 18px 0; }
.section-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-bottom: 14px;
}
.section-row h2 { font-size: 20px; font-weight: 800; }
.section-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.link-btn {
  background: transparent; border: none; color: var(--blue);
  font-weight: 700; font-size: 13px; cursor: pointer;
}

/* All 27 Categories Drawer */
.cluster-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.cluster-pill {
  padding: 7px 12px; border-radius: 999px; border: 1px solid var(--border);
  background: #fff; font-size: 12px; font-weight: 700; cursor: pointer;
}
.cluster-pill.active { background: var(--blue); color: #fff; border-color: var(--blue); }
.all-cat-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px;
}
.cat-card {
  display: flex; align-items: center; gap: 10px;
  background: #fff; border: 1px solid var(--border); border-radius: 14px;
  padding: 10px; cursor: pointer; text-align: left;
}
.cat-card.active { border-color: var(--blue); background: #eff6ff; }
.cat-icon {
  width: 34px; height: 34px; border-radius: 10px;
  background: #eff6ff; color: var(--blue);
  display: grid; place-items: center; flex-shrink: 0;
}
.cat-name { font-size: 12.5px; font-weight: 700; display: block; }
.cat-count { font-size: 11px; color: var(--muted); }

/* Services Grid */
.services-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px;
}
.service-card {
  background: #fff; border: 1px solid var(--border); border-radius: 16px;
  overflow: hidden; display: flex; flex-direction: column;
  box-shadow: 0 4px 12px rgba(15,23,42,0.04);
}
.service-thumb {
  height: 140px; background: linear-gradient(135deg, #dbeafe, #e0f2fe);
  display: flex; align-items: center; justify-content: center; position: relative;
}
.service-thumb img { width: 100%; height: 100%; object-fit: cover; }
.service-thumb .placeholder-icon { font-size: 40px; color: var(--blue); opacity: 0.78; }
.badge-row { position: absolute; top: 10px; left: 10px; display: flex; gap: 6px; }
.badge {
  padding: 4px 8px; border-radius: 999px; font-size: 10.5px; font-weight: 700; color: #fff;
}
.badge-vip { background: #f59e0b; color: #0f172a; }
.badge-verified { background: var(--green); }
.btn-fav {
  position: absolute; top: 10px; right: 10px;
  width: 32px; height: 32px; border-radius: 50%; border: none;
  background: rgba(255,255,255,0.92); color: #64748b;
  display: grid; place-items: center; cursor: pointer; font-size: 14px;
}
.btn-fav.saved { color: #ef4444; }

.service-body { padding: 14px; flex: 1; display: flex; flex-direction: column; }
.service-cat { font-size: 11px; font-weight: 700; color: var(--blue); margin-bottom: 3px; }
.service-title { font-size: 15px; font-weight: 800; margin-bottom: 4px; line-height: 1.3; }
.service-vendor { font-size: 12.5px; color: var(--muted); margin-bottom: 8px; }
.service-desc {
  font-size: 12.5px; color: #475569; margin-bottom: 10px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.service-meta { margin-top: auto; padding-top: 8px; border-top: 1px solid var(--border); }
.service-price { font-size: 14px; font-weight: 800; }
.service-area { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.service-actions { display: flex; gap: 8px; margin-top: 10px; }
.service-actions .btn { flex: 1; }

/* CTA Banner & Plans */
.cta-banner {
  background: linear-gradient(135deg, #0f172a, #0077e6);
  color: #fff; border-radius: 18px; padding: 20px;
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px; flex-wrap: wrap; margin-bottom: 16px;
}
.cta-tag { font-size: 10.5px; font-weight: 800; color: #7dd3fc; letter-spacing: 0.5px; }
.cta-banner h3 { font-size: 18px; margin: 4px 0; }
.cta-banner p { font-size: 13px; color: #cbd5e1; max-width: 540px; }
.cta-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.plans-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.plan-card {
  background: #fff; border: 1px solid var(--border); border-radius: 16px;
  padding: 18px; position: relative; display: flex; flex-direction: column;
}
.plan-popular { border: 2px solid var(--blue); }
.plan-badge {
  position: absolute; top: -10px; right: 14px; background: var(--blue); color: #fff;
  font-size: 10px; font-weight: 800; padding: 3px 9px; border-radius: 999px;
}
.plan-tier { font-size: 11.5px; font-weight: 800; color: var(--muted); }
.plan-price { font-size: 24px; font-weight: 800; margin: 6px 0 12px; }
.plan-price span { font-size: 12px; color: var(--muted); font-weight: 500; }
.plan-card ul { list-style: none; margin-bottom: 14px; flex: 1; }
.plan-card li { font-size: 12.5px; margin-bottom: 6px; display: flex; gap: 8px; align-items: center; }
.plan-card li i { color: var(--green); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 14px; border-radius: 10px; border: 1px solid transparent;
  font-weight: 700; font-size: 13px; cursor: pointer; text-decoration: none;
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-accent { background: var(--green); color: #fff; }
.btn-wa { background: var(--wa); color: #fff; }
.btn-white { background: #fff; color: var(--blue); }
.btn-outline { background: #fff; color: var(--text); border-color: var(--border); }
.btn-outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,0.45); }
.btn-danger { background: #fee2e2; color: #b91c1c; }
.btn-sm { padding: 7px 11px; font-size: 12px; }
.btn-block { width: 100%; }

/* Dashboard */
.dash-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.dash-header-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.plan-pill {
  display: inline-block; background: #dbeafe; color: var(--blue-dark);
  padding: 3px 10px; border-radius: 999px; font-size: 10.5px; font-weight: 800; margin-bottom: 4px;
}
.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 16px; }
@media (min-width: 640px) { .stats-grid { grid-template-columns: repeat(4, 1fr); } }
.stat-card { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 14px; }
.stat-label { font-size: 12px; color: var(--muted); font-weight: 600; }
.stat-value { font-size: 24px; font-weight: 800; color: var(--blue); margin-top: 2px; }
.white-box { background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 16px; margin-bottom: 16px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form-group { margin-bottom: 10px; }
.form-group label { display: block; font-size: 12px; font-weight: 700; margin-bottom: 4px; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px;
  font-family: inherit; font-size: 13px;
}
.hint-text { font-size: 11px; color: var(--green); display: block; margin-top: 4px; }
.vendor-services-list { display: flex; flex-direction: column; gap: 10px; }
.vendor-svc-row {
  display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap;
  border: 1px solid var(--border); border-radius: 12px; padding: 12px;
}

/* Fixed Bottom Navigation Bar */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 50;
  background: #fff; border-top: 1px solid var(--border);
  display: flex; justify-content: space-around; align-items: center;
  height: 64px; box-shadow: 0 -4px 16px rgba(15,23,42,0.06);
}
.bottom-nav-item {
  flex: 1; background: transparent; border: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; color: var(--muted); font-size: 11px; font-weight: 600; cursor: pointer;
}
.bottom-nav-item i { font-size: 18px; }
.bottom-nav-item.active { color: var(--blue); font-weight: 700; }

/* Modals */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 100; background: rgba(15,23,42,0.65);
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.modal-card {
  background: #fff; width: 100%; max-width: 440px; border-radius: 18px;
  padding: 22px; position: relative; max-height: 90vh; overflow-y: auto;
}
.modal-lg { max-width: 600px; }
.modal-close {
  position: absolute; top: 10px; right: 14px; border: none; background: transparent;
  font-size: 24px; cursor: pointer; color: var(--muted);
}
.auth-tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.auth-tab {
  flex: 1; padding: 9px; border: 1px solid var(--border); background: var(--bg);
  border-radius: 10px; font-weight: 700; font-size: 13px; cursor: pointer;
}
.auth-tab.active { background: var(--blue); color: #fff; border-color: var(--blue); }
.btn-google {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px;
  background: #fff; color: #1e293b; border: 1px solid #cbd5e1; border-radius: 10px;
  padding: 11px 14px; font-family: inherit; font-size: 14px; font-weight: 700; cursor: pointer;
  box-shadow: 0 2px 6px rgba(15,23,42,0.05);
}
.btn-google:hover { background: #f8fafc; border-color: #94a3b8; }
.auth-divider {
  display: flex; align-items: center; gap: 10px; margin: 14px 0; color: var(--muted); font-size: 12px;
}
.auth-divider::before, .auth-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}
.demo-hint { font-size: 12px; color: var(--muted); text-align: center; margin-top: 10px; }

@media (max-width: 600px) {
  .hidden-mobile { display: none !important; }
  .form-grid-2 { grid-template-columns: 1fr; }
}
