/* ServiPH — tokens */
:root {
  --ink: #1c2b33;
  --bay: #0b4f6c;
  --bay-deep: #083a50;
  --sun: #ffc845;
  --mist: #eaf3f7;
  --leaf: #2e8b57;
  --line: #d5e3ea;
  --muted: #5d717c;
  --bs-body-font-family: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --bs-body-color: var(--ink);
  --bs-primary: #0b4f6c;
  --bs-primary-rgb: 11, 79, 108;
  --bs-link-color: #0b4f6c;
  --bs-link-color-rgb: 11, 79, 108;
  --bs-border-radius: .6rem;
}
body { background: #fff; font-size: 1rem; line-height: 1.55; -webkit-tap-highlight-color: transparent; }
h1, h2, h3, h4, .display-font { font-family: "Bricolage Grotesque", "Figtree", sans-serif; letter-spacing: -.02em; }
h1 { font-weight: 800; } h2, h3 { font-weight: 700; }
a { text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* Buttons */
.btn-primary { --bs-btn-bg: var(--bay); --bs-btn-border-color: var(--bay); --bs-btn-hover-bg: var(--bay-deep); --bs-btn-hover-border-color: var(--bay-deep); --bs-btn-active-bg: var(--bay-deep); }
.btn-sun { background: var(--sun); color: var(--ink); font-weight: 700; border: 0; }
.btn-sun:hover, .btn-sun:focus { background: #f5b923; color: var(--ink); }
.btn { font-weight: 600; }

/* Top bar */
.site-nav { background: var(--bay); }
.site-nav .navbar-brand { font-family: "Bricolage Grotesque", sans-serif; font-weight: 800; font-size: 1.5rem; color: #fff; }
.site-nav .navbar-brand span { color: var(--sun); }
.site-nav .nav-link { color: rgba(255,255,255,.88); font-weight: 600; }
.site-nav .nav-link:hover { color: #fff; }
.nav-search { max-width: 460px; }
.nav-search .form-control { border: 0; border-radius: 999px 0 0 999px; }
.nav-search .btn { border-radius: 0 999px 999px 0; }

/* Hero: the search box is the main event */
.hero { background: var(--bay); color: #fff; padding: 3.5rem 0 5.5rem; position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; right: -120px; top: -80px; width: 420px; height: 420px; border-radius: 50%; border: 60px solid rgba(255,200,69,.14); }
.hero h1 { font-size: clamp(2.1rem, 5.5vw, 3.6rem); line-height: 1.05; max-width: 14ch; }
.hero p.lead { color: rgba(255,255,255,.85); max-width: 46ch; }
.hero-search { background: #fff; border-radius: 1rem; padding: .5rem; box-shadow: 0 18px 40px rgba(4,30,42,.35); max-width: 720px; position: relative; z-index: 1; }
.hero-search .form-control, .hero-search .form-select { border: 0; font-size: 1.1rem; padding: .9rem 1rem; }
.hero-search .form-control:focus, .hero-search .form-select:focus { box-shadow: none; }
.hero-search .btn { padding: .9rem 1.6rem; font-size: 1.05rem; }
.hero-chips a { color: #fff; border: 1px solid rgba(255,255,255,.35); border-radius: 999px; padding: .25rem .8rem; text-decoration: none; font-size: .9rem; }
.hero-chips a:hover { background: rgba(255,255,255,.12); }

/* Category rail overlaps the hero edge */
.cat-rail { margin-top: -3rem; position: relative; z-index: 2; }
.cat-tile { display: flex; flex-direction: column; align-items: center; gap: .35rem; background: #fff; border: 1px solid var(--line); border-radius: .9rem; padding: 1rem .5rem; text-decoration: none; color: var(--ink); font-weight: 600; height: 100%; }
.cat-tile i { font-size: 1.6rem; color: var(--bay); }
.cat-tile small { color: var(--muted); font-weight: 400; }
.cat-tile:hover { border-color: var(--bay); }

/* Service cards: price is the loudest thing after the photo */
.svc-card { border: 1px solid var(--line); border-radius: .9rem; overflow: hidden; height: 100%; display: flex; flex-direction: column; background: #fff; }
.svc-card .ph { aspect-ratio: 4/3; background: var(--mist) center/cover no-repeat; }
.svc-card .body { padding: .85rem 1rem 1rem; display: flex; flex-direction: column; gap: .2rem; flex: 1; }
.svc-card .biz { font-size: .85rem; color: var(--muted); }
.svc-card .name { font-weight: 700; color: var(--ink); text-decoration: none; line-height: 1.25; }
.svc-card .price { font-family: "Bricolage Grotesque", sans-serif; font-weight: 800; font-size: 1.35rem; color: var(--bay); margin-top: auto; }
.stars { color: #e3a008; font-size: .9rem; white-space: nowrap; }
.stars .count { color: var(--muted); }

.section { padding: 3rem 0; }
.section-mist { background: var(--mist); }
.promo-strip { background: var(--sun); border-radius: 1rem; padding: 1.25rem 1.5rem; }
.promo-strip .code { font-family: "Bricolage Grotesque", sans-serif; font-weight: 800; font-size: 1.4rem; border: 2px dashed var(--ink); padding: .1rem .7rem; border-radius: .4rem; }

/* Business page */
.biz-head { background: var(--mist); padding: 2rem 0; border-bottom: 1px solid var(--line); }
.biz-logo { width: 88px; height: 88px; border-radius: 1rem; object-fit: cover; background: #fff; border: 1px solid var(--line); }

/* Forms */
.form-control, .form-select { border-color: var(--line); padding: .65rem .85rem; }
.form-label { font-weight: 600; font-size: .95rem; }
.auth-card { max-width: 520px; margin: 2.5rem auto; }
.auth-card.wide { max-width: 820px; }
.card { border-color: var(--line); }

/* Dashboard shell */
.dash { display: flex; min-height: 100vh; }
.dash-side { width: 250px; background: var(--ink); color: #c9d6dc; flex-shrink: 0; }
.dash-side .brand { font-family: "Bricolage Grotesque", sans-serif; font-weight: 800; font-size: 1.4rem; color: #fff; padding: 1.1rem 1.25rem; display: block; text-decoration: none; }
.dash-side .brand span { color: var(--sun); }
.dash-side .nav-link { color: #c9d6dc; padding: .55rem 1.25rem; display: flex; gap: .7rem; align-items: center; border-left: 3px solid transparent; }
.dash-side .nav-link:hover { color: #fff; background: rgba(255,255,255,.05); }
.dash-side .nav-link.active { color: #fff; border-left-color: var(--sun); background: rgba(255,255,255,.08); }
.dash-side .group { font-size: .78rem; color: #8aa0aa; padding: 1rem 1.25rem .3rem; }
.dash-main { flex: 1; min-width: 0; background: #f6f9fb; }
.dash-top { background: #fff; border-bottom: 1px solid var(--line); padding: .7rem 1.25rem; display: flex; align-items: center; gap: 1rem; position: sticky; top: 0; z-index: 10; }
.dash-body { padding: 1.5rem 1.25rem 3rem; }
@media (max-width: 991.98px) { .dash-side { display: none; } }

.kpi { background: #fff; border: 1px solid var(--line); border-radius: .9rem; padding: 1rem 1.15rem; height: 100%; }
.kpi .v { font-family: "Bricolage Grotesque", sans-serif; font-weight: 800; font-size: 1.7rem; line-height: 1.1; }
.kpi .l { color: var(--muted); font-size: .9rem; }
.action-row { display: flex; justify-content: space-between; align-items: center; padding: .8rem 1rem; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.action-row:last-child { border-bottom: 0; }
.action-row:hover { background: var(--mist); }
.action-row .n { font-weight: 800; font-size: 1.15rem; }
.action-row.zero { color: var(--muted); }
.table > :not(caption) > * > * { padding: .7rem .75rem; }
.table thead th { font-size: .82rem; color: var(--muted); font-weight: 600; background: #fff; }
.health-dot { width: .7rem; height: .7rem; border-radius: 50%; display: inline-block; }
.health-ok { background: var(--leaf); } .health-warn { background: #e3a008; } .health-critical { background: #c0392b; }
.health-banner { border-radius: .9rem; padding: 1rem 1.25rem; border: 1px solid var(--line); background: #fff; }
.health-banner.warn { border-color: #e3a008; background: #fff8e5; }
.health-banner.critical { border-color: #c0392b; background: #fdecea; }

/* Referral dashboard */
.ref-hero { background: var(--bay); color: #fff; border-radius: 1rem; padding: 1.5rem; }
.ref-link { background: rgba(255,255,255,.12); border-radius: .6rem; padding: .6rem .8rem; font-family: ui-monospace, monospace; word-break: break-all; }
.ref-balance { font-family: "Bricolage Grotesque", sans-serif; font-size: 2.6rem; font-weight: 800; color: var(--sun); line-height: 1; }
.steps { counter-reset: s; list-style: none; padding: 0; }
.steps li { counter-increment: s; position: relative; padding-left: 2.6rem; margin-bottom: 1rem; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 1.9rem; height: 1.9rem; border-radius: 50%; background: var(--sun); font-weight: 800; display: grid; place-items: center; }

/* Star input */
.star-input { display: inline-flex; flex-direction: row-reverse; gap: .2rem; }
.star-input input { display: none; }
.star-input label { font-size: 1.8rem; color: #c9d6dc; cursor: pointer; }
.star-input input:checked ~ label, .star-input label:hover, .star-input label:hover ~ label { color: #e3a008; }

/* Mobile app feel */
.mobile-tabbar { display: none; }
@media (max-width: 767.98px) {
  .mobile-tabbar { display: flex; position: fixed; bottom: 0; left: 0; right: 0; background: #fff; border-top: 1px solid var(--line); z-index: 1030; padding-bottom: env(safe-area-inset-bottom); }
  .mobile-tabbar a { flex: 1; text-align: center; padding: .45rem 0; color: var(--muted); text-decoration: none; font-size: .72rem; }
  .mobile-tabbar a i { display: block; font-size: 1.3rem; }
  .mobile-tabbar a.active { color: var(--bay); font-weight: 700; }
  body.has-tabbar { padding-bottom: 64px; }
  .hero { padding: 2rem 0 4.5rem; }
}
footer.site-foot { background: var(--ink); color: #b9c8cf; padding: 2.5rem 0 1.5rem; }
footer.site-foot a { color: #e3edf1; text-decoration: none; }
footer.site-foot a:hover { text-decoration: underline; }
