:root {
  --bg: #faf8f5;
  --ink: #1c1a17;
  --muted: #7c756c;
  --line: #e7e1d8;
  --card: #ffffff;
  /* Theme vars — set by JS per niche */
  --accent: #c8623a;
  --accent-soft: #f6e7df;
  --accent-ink: #8a4326;
  --accent-grad: linear-gradient(135deg, #c8623a, #e0a06f);
  --good: #2f9e6f;
  --shadow: 0 4px 20px rgba(40, 30, 20, 0.08);
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: "Segoe UI", system-ui, -apple-system, sans-serif; -webkit-font-smoothing: antialiased; }
.hidden { display: none !important; }

.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  padding: 14px 22px;
  /* keep the bar below the phone's status bar / notch when installed as a web app */
  padding-top: calc(14px + env(safe-area-inset-top, 0px));
  padding-left: calc(22px + env(safe-area-inset-left, 0px));
  padding-right: calc(22px + env(safe-area-inset-right, 0px));
  border-bottom: 1px solid var(--line); background: var(--card);
  position: sticky; top: 0; z-index: 5;
}
.brand { font-weight: 800; font-size: 1.25rem; letter-spacing: -0.5px; cursor: pointer; user-select: none; }
.brand:hover { opacity: 0.85; }
.mark { color: var(--accent); margin-right: 4px; }
.view-toggle { display: flex; gap: 4px; background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 4px; }
.vt { border: none; background: transparent; padding: 7px 13px; border-radius: 999px; cursor: pointer; font-size: 0.83rem; color: var(--muted); font-weight: 600; }
.vt.active { background: var(--ink); color: #fff; }

.view { max-width: 760px; margin: 0 auto; padding: 26px 20px calc(70px + env(safe-area-inset-bottom, 0px)); }
.section-title { font-size: 1.05rem; margin: 26px 0 14px; }
.hint { color: var(--muted); font-size: 0.85rem; margin: -8px 0 14px; }

/* Profile */
.profile { display: flex; align-items: center; gap: 18px; }
.avatar { width: 78px; height: 78px; border-radius: 50%; background: var(--accent-grad); color: #fff; font-weight: 700; font-size: 1.5rem; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.profile-info h1 { margin: 0; font-size: 1.5rem; letter-spacing: -0.5px; }
.verified { color: var(--accent); font-size: 1rem; }
.tagline { margin: 4px 0; color: var(--muted); }
.profile-meta { display: flex; gap: 8px; font-size: 0.85rem; color: var(--muted); }
.dot { opacity: 0.5; }

.trust-strip { display: flex; flex-wrap: wrap; gap: 8px 18px; background: var(--accent-soft); border-radius: 12px; padding: 12px 16px; margin: 22px 0; font-size: 0.82rem; color: var(--accent-ink); font-weight: 600; }

/* Portfolio grid */
.portfolio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.piece { background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; cursor: pointer; transition: transform .12s, box-shadow .12s; }
.piece:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.piece .thumb { aspect-ratio: 1; display: flex; align-items: flex-end; padding: 10px; color: #fff; }
.piece .thumb .tag { background: rgba(0,0,0,.35); backdrop-filter: blur(4px); padding: 3px 9px; border-radius: 999px; font-size: .72rem; font-weight: 600; }
.piece .body { padding: 11px 12px 13px; }
.piece .body .title { font-weight: 600; font-size: .9rem; }
.piece .body .price { color: var(--muted); font-size: .82rem; margin-top: 3px; }

/* Aftercare banner (client view) */
.ac-banner { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--good); border-radius: 12px; padding: 14px 16px; margin: 18px 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ac-banner .t { font-weight: 600; }
.ac-banner .s { color: var(--muted); font-size: .83rem; margin-top: 2px; }

/* Modal */
.modal { position: fixed; inset: 0; background: rgba(28,26,23,.55); display: flex; align-items: center; justify-content: center; padding: 18px; z-index: 20; }
.modal-box { background: var(--card); border-radius: 18px; width: 100%; max-width: 440px; max-height: 92vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.m-header { display: flex; align-items: flex-end; padding: 16px; color: #fff; min-height: 120px; }
.m-header .x { margin-left: auto; align-self: flex-start; background: rgba(0,0,0,.3); border: none; color: #fff; width: 30px; height: 30px; border-radius: 50%; cursor: pointer; font-size: 1rem; }
.m-header .htitle { font-weight: 700; font-size: 1.15rem; }
.m-body { padding: 18px; }
.m-body h3 { margin: 0 0 4px; font-size: 1rem; }
.m-body .sub { color: var(--muted); font-size: .85rem; margin: 0 0 16px; }

.slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.slot { border: 1px solid var(--line); background: var(--bg); border-radius: 10px; padding: 10px 4px; text-align: center; cursor: pointer; font-size: .85rem; }
.slot.sel { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); font-weight: 700; }
.slot small { display: block; color: var(--muted); font-size: .7rem; }

label { display: block; font-size: .8rem; color: var(--muted); margin: 14px 0 5px; }
input { width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; font-size: .95rem; font-family: inherit; background: #fff; }
input:focus { outline: 2px solid var(--accent); border-color: transparent; }

.breakdown { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin: 8px 0 4px; }
.brow { display: flex; justify-content: space-between; padding: 5px 0; font-size: .9rem; }
.brow.total { border-top: 1px dashed var(--line); margin-top: 6px; padding-top: 10px; font-weight: 700; }
.brow .muted { color: var(--muted); }
.credit-note { color: var(--good); font-size: .8rem; margin-top: 8px; display: flex; gap: 6px; }

.btn { width: 100%; border: none; border-radius: 12px; padding: 13px; font-size: .96rem; font-weight: 700; cursor: pointer; margin-top: 14px; }
.btn.primary { background: var(--accent); color: #fff; }
.btn.primary:hover { filter: brightness(1.05); }
.btn.dark { background: var(--ink); color: #fff; }
.btn.ghost { background: transparent; border: 1px solid var(--line); color: var(--ink); }
.btn:disabled { opacity: .4; cursor: not-allowed; }

/* Aftercare modal timeline */
.timeline { margin: 6px 0; }
.tstep { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.tstep:last-child { border-bottom: none; }
.tstep .num { width: 26px; height: 26px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .8rem; flex-shrink: 0; }
.tstep .tt { font-weight: 600; font-size: .9rem; }
.tstep .td { color: var(--muted); font-size: .84rem; margin-top: 2px; }

.success { text-align: center; padding: 30px 24px; }
.success .check { width: 64px; height: 64px; border-radius: 50%; background: var(--good); color: #fff; font-size: 2rem; display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; }
.success h3 { margin: 0 0 6px; font-size: 1.25rem; }
.success p { color: var(--muted); margin: 4px 0; }

/* Dashboard */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 8px; }
.stat-card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px; text-align: center; }
.stat-value { font-size: 1.5rem; font-weight: 800; }
.stat-label { color: var(--muted); font-size: .72rem; margin-top: 4px; }
.stat-card.good .stat-value { color: var(--good); }
.stat-card.accent .stat-value { color: var(--accent); }

.booking-list { display: flex; flex-direction: column; gap: 10px; }
.booking-row { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.booking-row .who { font-weight: 600; }
.booking-row .when { color: var(--muted); font-size: .83rem; margin-top: 2px; }
.booking-row .money { text-align: right; font-size: .85rem; }
.booking-row .money .paid { color: var(--good); font-weight: 700; }
.booking-row .money .due { color: var(--muted); }
.b-badge { font-size: .7rem; padding: 3px 9px; border-radius: 999px; font-weight: 700; }
.b-badge.reserved { background: var(--accent-soft); color: var(--accent-ink); }
.b-badge.completed { background: rgba(47,158,111,.15); color: var(--good); }
.b-badge.requested { background: rgba(199,154,46,.18); color: #8a6a12; }
.b-badge.quoted { background: var(--accent-soft); color: var(--accent-ink); }
.b-badge.pending { background: rgba(199,154,46,.18); color: #8a6a12; }
.b-badge.declined { background: #f1f1f1; color: var(--muted); }
.booking-row.consult { border-left: 3px solid var(--accent); }
.booking-row.pending { border-left: 3px solid #c79a2e; }
.row-actions { display: flex; gap: 8px; margin-top: 6px; width: 100%; }
.mini-btn { border: 1px solid var(--line); background: var(--bg); border-radius: 8px; padding: 7px 11px; font-size: .8rem; cursor: pointer; }
.mini-btn.danger { color: #c0392b; border-color: #e8b9b3; }
.mini-btn.danger:hover { background: #fdecea; }
.mini-btn.go { background: var(--ink); color: #fff; border-color: var(--ink); }
.empty { text-align: center; color: var(--muted); padding: 30px; }

/* Setup: niche cards */
.niche-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.niche-card { border: 2px solid var(--line); background: var(--card); border-radius: 14px; padding: 16px 10px; text-align: center; cursor: pointer; transition: border-color .12s; }
.niche-card:hover { border-color: var(--muted); }
.niche-card.sel { border-color: var(--accent); background: var(--accent-soft); }
.niche-card .emoji { font-size: 1.6rem; }
.niche-card .nname { font-weight: 700; font-size: .9rem; margin-top: 6px; }

/* Setup: forms + editor */
.form-card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.form-actions { display: flex; gap: 10px; }
.form-actions .btn { flex: 1; }

.pf-editor { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.pf-row { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.pf-swatch { width: 42px; height: 42px; border-radius: 9px; flex-shrink: 0; }
.pf-row .pf-info { flex: 1; }
.pf-row .pf-info .t { font-weight: 600; font-size: .9rem; }
.pf-row .pf-info .s { color: var(--muted); font-size: .8rem; }

.grad-picker { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.grad-swatch { width: 38px; height: 38px; border-radius: 9px; cursor: pointer; border: 3px solid transparent; }
.grad-swatch.sel { border-color: var(--ink); }

/* Topbar right + install */
.topbar-right { display: flex; align-items: center; gap: 10px; }
.install-btn { border: 1px solid var(--accent); background: var(--accent-soft); color: var(--accent-ink); border-radius: 999px; padding: 7px 13px; font-size: .8rem; font-weight: 700; cursor: pointer; }

/* Select + textarea */
select, textarea { width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; font-size: .95rem; font-family: inherit; background: #fff; color: var(--ink); }
select:focus, textarea:focus { outline: 2px solid var(--accent); border-color: transparent; }
textarea { resize: vertical; line-height: 1.5; }
.lockhint { color: var(--muted); font-weight: 400; font-size: .72rem; }

/* Client location card (address gating) */
.location-card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 13px 16px; margin: 4px 0 8px; font-size: .88rem; }
.location-card .locked { color: var(--muted); display: flex; align-items: center; gap: 7px; }
.location-card .revealed { color: var(--good); font-weight: 600; display: flex; align-items: center; gap: 7px; }

/* Client rules section */
.rules-card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; margin-top: 26px; }
.rules-card h3 { margin: 0 0 10px; font-size: .95rem; }
.rules-card ul { margin: 0; padding-left: 18px; color: var(--muted); font-size: .86rem; }
.rules-card li { margin: 5px 0; }

/* Image upload (setup) */
.image-row { display: flex; gap: 14px; align-items: center; }
.img-preview { width: 76px; height: 76px; border-radius: 11px; border: 1px dashed var(--line); background-size: cover; background-position: center; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: .7rem; flex-shrink: 0; text-align: center; }
.image-actions { display: flex; flex-direction: column; gap: 8px; }
.image-actions .btn { width: auto; margin: 0; padding: 9px 14px; }

/* Booking-step rules agreement */
.policy-box { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: .8rem; color: var(--muted); margin-top: 12px; }
.policy-box ul { margin: 6px 0 0; padding-left: 16px; }

/* Topbar identity */
.whoami { font-size: .8rem; color: var(--muted); font-weight: 600; }
.ghost-mini { background: transparent; border: 1px solid var(--line); color: var(--muted); border-radius: 999px; padding: 6px 12px; font-size: .78rem; cursor: pointer; }
.ghost-mini:hover { background: var(--bg); }
.ghost-mini.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.icon-btn { padding: 6px 10px; font-size: 1rem; line-height: 1; }

/* Impersonation bar */
.impersonate-bar { background: #1c1a17; color: #fff; font-size: .85rem; padding: 9px 18px; display: flex; align-items: center; gap: 10px; justify-content: center; }
.bar-btn { background: var(--accent); border: none; color: #fff; border-radius: 999px; padding: 5px 12px; font-size: .78rem; font-weight: 700; cursor: pointer; }

/* Auth / role gate */
.view.auth { max-width: 420px; }
.auth-card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 26px 22px; box-shadow: var(--shadow); margin-top: 28px; }
.auth-logo { font-weight: 800; font-size: 1.6rem; letter-spacing: -.5px; }
.auth-logo .mark { color: var(--accent); }
.auth-card h2 { margin: 0 0 4px; }
.auth-sub { color: var(--muted); font-size: .9rem; margin: 6px 0 18px; }
.auth-hint { color: var(--muted); font-size: .78rem; text-align: center; margin-top: 12px; }
.role-card, .acct-pick { width: 100%; display: flex; align-items: center; gap: 14px; text-align: left; background: var(--bg); border: 1px solid var(--line); border-radius: 13px; padding: 15px; margin-bottom: 11px; cursor: pointer; font-size: .95rem; color: var(--ink); }
.role-card:hover, .acct-pick:hover { border-color: var(--accent); }
.role-card .rc-emoji, .acct-pick .ai { font-size: 1.6rem; }
.role-card small, .acct-pick small { color: var(--muted); }
.role-card.dev { border-style: dashed; }
.link-back { background: none; border: none; color: var(--muted); cursor: pointer; font-size: .85rem; padding: 0 0 12px; }
.acct-list { margin-bottom: 8px; }
/* Email sign-in form */
.auth-tabs { display: flex; gap: 6px; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 4px; margin-bottom: 16px; }
.auth-tabs .at { flex: 1; background: none; border: none; border-radius: 9px; padding: 10px; cursor: pointer; font-size: .92rem; font-weight: 600; color: var(--muted); }
.auth-tabs .at.active { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.auth-input { width: 100%; box-sizing: border-box; background: var(--bg); border: 1px solid var(--line); border-radius: 11px; padding: 12px 13px; margin-bottom: 11px; font-size: .95rem; color: var(--ink); }
.auth-input:focus { outline: none; border-color: var(--accent); }
.role-toggle { display: flex; gap: 8px; margin-bottom: 14px; }
.role-toggle .rt { flex: 1; background: var(--bg); border: 1px solid var(--line); border-radius: 11px; padding: 11px 8px; cursor: pointer; font-size: .9rem; color: var(--ink); }
.role-toggle .rt.active { border-color: var(--accent); font-weight: 700; box-shadow: inset 0 0 0 1px var(--accent); }
.auth-msg { font-size: .82rem; text-align: center; margin-top: 12px; min-height: 1em; }
.auth-msg.err { color: #c0392b; }
.auth-msg.ok { color: #2f9e6f; }
/* Plan & billing card */
.plan-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.plan-name { font-size: 1.15rem; }
.plan-price { font-weight: 800; font-size: 1.5rem; line-height: 1; white-space: nowrap; }
.plan-price .plan-per { font-size: .8rem; font-weight: 600; color: var(--muted); }
.save-pill { background: var(--accent); color: #fff; border-radius: 999px; padding: 1px 7px; font-size: .68rem; font-weight: 700; margin-left: 4px; }
.plan-perks { list-style: none; padding: 0; margin: 14px 0; display: grid; gap: 8px; }
.plan-perks li { padding-left: 24px; position: relative; font-size: .9rem; color: var(--ink); }
.plan-perks li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 800; }
/* Optional welcome banner / landing page — full-bleed vertical stack of up to 8 images (mobile-first) */
/* Break out of the .view's 20px side padding so the banner fills the whole width edge-to-edge. */
.banner-landing { margin: -10px -20px 0; }
.banner-page { margin: 0; text-align: center; }
.banner-head { padding: 16px 18px 16px; }
.banner-logo { width: 72px; height: 72px; border-radius: 50%; background: var(--bg); border: 2px solid var(--line); display: flex; align-items: center; justify-content: center; font-size: 1.6rem; font-weight: 800; margin: 0 auto 14px; overflow: hidden; }
.banner-name { font-size: clamp(1.5rem, 6.5vw, 2rem); line-height: 1.12; margin: 0 0 6px; }
.banner-sub { font-size: clamp(.95rem, 4vw, 1.05rem); color: var(--muted); margin: 0 0 4px; }
.banner-loc { font-size: .88rem; color: var(--muted); margin: 0; }
.banner-stack { display: flex; flex-direction: column; gap: 0; line-height: 0; } /* edge-to-edge, no rounding/insets */
.banner-img { width: 100%; height: auto; display: block; border-radius: 0; margin: 0; object-fit: cover; }
.banner-img + .banner-img { margin-top: -1px; } /* kill sub-pixel seams between stacked images */
.banner-img.placeholder { aspect-ratio: 3 / 4; }
.banner-about { font-size: .95rem; color: var(--muted); line-height: 1.55; margin: 18px; }
/* Not sticky — sits at the end of the stack so clients scroll through the whole banner to reach it. */
.banner-cta-bar { padding: 24px 18px calc(26px + env(safe-area-inset-bottom, 0px)); }
.banner-cta { width: 100%; max-width: 460px; margin: 0 auto; font-size: 1.05rem; padding: 15px 28px; }
/* Banner editor thumbnails */
.bn-thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.bn-thumb { position: relative; width: 84px; height: 104px; border-radius: 10px; background-size: cover; background-position: center; border: 1px solid var(--line); }
.bn-thumb .inspo-x { position: absolute; top: 3px; right: 3px; }
/* Discovery: category directory + provider rows */
.cat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 4px; }
.cat-card { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; background: var(--bg); border: 1px solid var(--line); border-radius: 14px; padding: 15px; cursor: pointer; text-align: left; }
.cat-card:hover { border-color: var(--accent); }
.cat-card .cc-emoji { font-size: 1.7rem; }
.cat-card .cc-name { font-weight: 700; color: var(--ink); }
.cat-card .cc-count { font-size: .74rem; color: var(--muted); }
.pick-body { display: block; }
.pick-rating { font-size: .78rem; color: var(--accent-ink); font-weight: 700; white-space: nowrap; }
.pick-cats { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; }
/* Category chips (Setup) + badges (client page) */
.cat-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.cat-chip { background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 9px 14px; font-size: .88rem; cursor: pointer; color: var(--ink); }
.cat-chip.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.cat-chip.primary { box-shadow: inset 0 0 0 1px var(--accent); }
.cat-badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 2px; }
.cat-badge { background: var(--accent-soft); color: var(--accent-ink); border-radius: 999px; padding: 3px 10px; font-size: .76rem; font-weight: 600; }
/* Go Live card */
.golive-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-radius: 14px; padding: 14px 16px; margin-bottom: 18px; border: 1px solid var(--line); }
.golive-card.draft { background: #fff7ed; border-color: #fdba74; }
.golive-card.live { background: #ecfdf5; border-color: #6ee7b7; }
.golive-card .btn { width: auto; margin: 0; white-space: nowrap; flex: 0 0 auto; }
/* Sticky Save button (Setup + Settings) */
.save-bar { position: sticky; bottom: 0; z-index: 4; margin-top: 22px; padding: 12px 0 calc(14px + env(safe-area-inset-bottom, 0px)); background: linear-gradient(to top, var(--bg) 72%, rgba(0,0,0,0)); }
.save-bar .btn { margin: 0; }
.save-bar .btn.saved { background: var(--good); }
/* Booking link */
.booking-link { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; font-size: .82rem; word-break: break-all; color: var(--accent); margin-bottom: 10px; font-family: ui-monospace, monospace; }
/* Reviews on the provider page */
.reviews-card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px; margin: 18px 0; }
.reviews-card h3 { margin: 0 0 12px; }
.review { border-top: 1px solid var(--line); padding: 12px 0; }
.review:first-of-type { border-top: none; padding-top: 0; }
.rv-top { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.rv-stars { color: #f5b301; font-size: .9rem; letter-spacing: 1px; }
.rv-name { font-weight: 700; font-size: .85rem; }
.rv-text { font-size: .9rem; color: var(--ink); line-height: 1.5; }
/* Ratings */
.receipt-wrap { display: flex; flex-direction: column; }
.rate-line { width: 100%; text-align: left; background: var(--bg); border: 1px solid var(--line); border-top: none; border-radius: 0 0 10px 10px; padding: 9px 14px; cursor: pointer; font-size: .82rem; color: var(--accent); font-weight: 600; }
.rate-line.rated { color: var(--ink); }
.rate-line.rated span { color: var(--muted); font-weight: 400; margin-left: 6px; }
.star-pick { display: flex; gap: 6px; justify-content: center; margin: 6px 0 14px; }
.star-pick .star { background: none; border: none; cursor: pointer; font-size: 2.1rem; line-height: 1; color: var(--line); padding: 0; }
.star-pick .star.on { color: #f5b301; }
/* Provider profile photo (avatar) — overrides the initials/emoji background with the photo */
.has-photo { background-size: cover !important; background-position: center !important; color: transparent !important; }
.acct-pick .ai.has-photo { width: 46px; height: 46px; border-radius: 50%; flex: 0 0 auto; }
.avatar-preview { width: 84px; height: 84px; border-radius: 50%; background: var(--bg); border: 1px solid var(--line); background-size: cover; background-position: center; display: flex; align-items: center; justify-content: center; font-size: .72rem; color: var(--muted); text-align: center; }
/* Image cropper modal */
.crop-box { max-width: 380px; text-align: center; }
.crop-stage { margin: 0 auto; border-radius: 12px; overflow: hidden; background: #111; touch-action: none; cursor: grab; max-width: 100%; }
.crop-stage:active { cursor: grabbing; }
.crop-stage canvas { display: block; }
.crop-zoom-label { display: block; text-align: left; font-size: .8rem; color: var(--muted); margin: 14px 0 4px; }
.crop-zoom { width: 100%; }
.crop-actions { display: flex; gap: 10px; margin-top: 16px; }
.crop-actions .btn { flex: 1; }

/* Admin console */
.admin-title { font-size: 1.5rem; margin: 8px 0 2px; }
.admin-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 16px 0 6px; }
.artist-table { display: flex; flex-direction: column; gap: 10px; }
.artist-row { display: grid; grid-template-columns: 2fr 1.4fr .7fr .9fr auto; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 13px 16px; }
.ar-id { display: flex; align-items: center; gap: 11px; }
.ar-emoji { font-size: 1.4rem; }
.ar-name { font-weight: 700; }
.ar-sub { color: var(--muted); font-size: .8rem; }
.ar-num { text-align: center; }
.ar-num strong { display: block; }
.ar-num small { color: var(--muted); font-size: .72rem; }
.plan-badge { font-size: .72rem; padding: 4px 10px; border-radius: 999px; font-weight: 700; background: var(--accent-soft); color: var(--accent-ink); white-space: nowrap; }
.plan-badge.suspended { background: #f1d4d4; color: #9a3b3b; }
.live-badge { font-size: .7rem; padding: 4px 9px; border-radius: 999px; font-weight: 700; white-space: nowrap; }
.live-badge.live { background: #ecfdf5; color: #047857; }
.live-badge.draft { background: #fff7ed; color: #c2410c; }
.ar-actions { display: flex; gap: 7px; }

/* Big service select */
.big-select { font-size: 1rem; padding: 13px 12px; }
.niche-note { color: var(--muted); font-size: .82rem; margin-top: 8px; }

/* Client contact row */
.contact-row { display: flex; gap: 10px; flex-wrap: wrap; margin: 14px 0 4px; }
.contact-btn { text-decoration: none; border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 999px; padding: 8px 15px; font-size: .85rem; font-weight: 600; }
.contact-btn.locked { color: var(--muted); background: var(--bg); cursor: default; font-weight: 500; }
.contact-btn.ig { border-color: #c13584; color: #c13584; }
.contact-btn.fb { border-color: #1877f2; color: #1877f2; }
.contact-btn:hover { border-color: var(--accent); }

/* Color picker row */
.color-row { display: flex; align-items: center; gap: 12px; }
.color-row input[type="color"] { width: 54px; height: 40px; padding: 2px; border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer; }

/* Sound toggle */
.toggle-btn { display: inline-block; width: auto; border: 1px solid var(--line); background: var(--bg); color: var(--muted); border-radius: 999px; padding: 9px 18px; font-weight: 700; cursor: pointer; font-size: .9rem; }
.toggle-btn.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-ink); }

/* Reminder timing chips */
.rem-timings { display: flex; gap: 8px; flex-wrap: wrap; }
.rem-chip { border: 1px solid var(--line); background: var(--bg); color: var(--muted); border-radius: 999px; padding: 8px 14px; font-size: .82rem; font-weight: 600; cursor: pointer; }
.rem-chip.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-ink); }
.rem-send { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.rem-send .btn { width: auto; flex: 1; margin: 0; min-width: 120px; }
.auto-pill { display: inline-block; background: var(--accent-soft); color: var(--accent-ink); font-size: .68rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; margin-left: 4px; }

@media (max-width: 640px) {
  .admin-stats { grid-template-columns: repeat(2, 1fr); }
  .artist-row { grid-template-columns: 1fr 1fr; }
  .ar-id { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .portfolio { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .niche-cards { grid-template-columns: repeat(2, 1fr); }
  .grid2 { grid-template-columns: 1fr; }
  /* Mobile top bar: more compact, nav tabs on their own full-width row */
  .topbar { gap: 7px; padding: 9px 14px;
    padding-top: calc(9px + env(safe-area-inset-top, 0px));
    padding-left: calc(14px + env(safe-area-inset-left, 0px));
    padding-right: calc(14px + env(safe-area-inset-right, 0px)); }
  .brand { font-size: 1.08rem; }
  .whoami { font-size: .74rem; }
  .topbar-right { flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
  .view-toggle { order: 3; flex: 1 1 100%; justify-content: center; }
  .vt { padding: 9px 14px; font-size: 0.85rem; }
  .ghost-mini, .install-btn { padding: 6px 11px; font-size: .74rem; }
  .icon-btn { padding: 6px 9px; }
}

/* ===== Receipts ===== */
.receipts-card { background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 14px; padding: 16px; margin-top: 16px; box-shadow: var(--shadow); }
.receipts-card h3 { margin: 0 0 10px; font-size: 1rem; }
.receipts-list { display: flex; flex-direction: column; gap: 8px; }
.receipt-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; width: 100%; text-align: left; background: var(--accent-soft); border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; cursor: pointer; font-family: inherit; color: var(--ink); }
.receipt-row:hover { border-color: var(--accent); }
.rr-main { display: flex; flex-direction: column; }
.rr-main small { color: var(--muted); font-size: 0.74rem; margin-top: 2px; }
.rr-amt { font-weight: 700; color: var(--accent-ink); white-space: nowrap; }

/* The receipt document itself (modal preview + printed PDF) */
.rcpt-preview { margin-bottom: 14px; }
.rcpt { background: #fff; color: #1c1a17; border: 1px solid var(--line); border-radius: 14px; padding: 22px; max-width: 540px; margin: 0 auto; font-size: 0.9rem; line-height: 1.4; }
.rcpt-top { display: flex; justify-content: space-between; align-items: center; }
.rcpt-brand { font-weight: 800; font-size: 1.15rem; }
.rcpt-brand .mark { color: var(--accent); }
.rcpt-tag { letter-spacing: 0.18em; font-size: 0.7rem; color: var(--muted); font-weight: 700; }
.rcpt-sub { color: var(--muted); margin: 2px 0 16px; }
.rcpt-grid { display: flex; gap: 18px; flex-wrap: wrap; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.rcpt-lbl { display: block; font-size: 0.64rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 3px; }
.rcpt-status.paid { color: var(--good); font-weight: 700; }
.rcpt-status.pending { color: var(--accent); font-weight: 700; }
.rcpt-party { display: flex; gap: 18px; flex-wrap: wrap; padding: 14px 0; }
.rcpt-party > div { flex: 1; min-width: 140px; }
.rcpt-table { width: 100%; border-collapse: collapse; margin: 4px 0; }
.rcpt-table th { text-align: left; font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); border-bottom: 1px solid var(--line); padding: 6px 0; }
.rcpt-table th.r, .rcpt-table td.r { text-align: right; }
.rcpt-table td { padding: 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.rcpt-when { color: var(--muted); font-size: 0.78rem; margin-top: 2px; }
.rcpt-totals { padding: 12px 0 4px; }
.rcpt-row { display: flex; justify-content: space-between; padding: 4px 0; }
.rcpt-row.paid { color: var(--good); }
.rcpt-row.due { font-weight: 700; font-size: 1rem; border-top: 1px solid var(--line); margin-top: 6px; padding-top: 10px; }
.rcpt-note { background: var(--accent-soft); color: var(--accent-ink); border-radius: 10px; padding: 10px 12px; font-size: 0.8rem; margin-top: 8px; }
.rcpt-foot { text-align: center; color: var(--muted); font-size: 0.76rem; margin-top: 16px; }

/* ===== Availability editor (setup) ===== */
.avail-months { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.avail-month-btn { border: 1px solid var(--line); background: var(--bg); border-radius: 999px; padding: 8px 14px; cursor: pointer; font-weight: 600; font-size: 0.85rem; color: var(--ink); }
.avail-month-btn.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.avail-status { font-size: 0.84rem; color: var(--muted); margin-bottom: 14px; }
.avail-status .pub { color: var(--good); font-weight: 700; }
.avail-status .unpub { color: var(--accent); font-weight: 700; }
.avail-times { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 10px; min-height: 10px; }
.avail-time-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--accent-soft); color: var(--accent-ink); border: 1px solid var(--line); border-radius: 999px; padding: 6px 6px 6px 12px; font-size: 0.82rem; font-weight: 600; }
.avail-time-chip button { border: none; background: transparent; cursor: pointer; color: var(--accent-ink); font-size: 0.85rem; line-height: 1; padding: 2px 4px; }
.avail-addtime { display: flex; gap: 8px; margin-bottom: 16px; }
.avail-addtime input { flex: 1; }
.avail-addtime .btn { width: auto; margin: 0; white-space: nowrap; }
.avail-quick { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 12px; }
.avail-quick .btn { width: auto; margin: 0; padding: 9px 14px; font-size: 0.85rem; font-weight: 600; }
.avail-cal { margin-bottom: 6px; }

/* ===== Calendar (shared by setup editor + client booking) ===== */
.cal-nav { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; font-size: 1rem; }
.cal-arrow { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); cursor: pointer; font-size: 1.2rem; line-height: 1; color: var(--ink); }
.cal-arrow:disabled { opacity: 0.3; cursor: default; }
.cal-dow { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; margin-bottom: 5px; }
.cal-dow span { text-align: center; font-size: 0.64rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.cal-day { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; border-radius: 9px; font-size: 0.85rem; border: 1px solid transparent; }
.cal-day.blank { visibility: hidden; }
.cal-day.disabled { color: var(--muted); opacity: 0.35; }
.cal-day.closed { border-color: var(--line); background: var(--bg); cursor: pointer; color: var(--ink); }
.cal-day.closed:hover { border-color: var(--accent); }
.cal-day.open { background: var(--accent-soft); color: var(--accent-ink); border-color: var(--line); font-weight: 700; cursor: pointer; }
.cal-day.open:hover { border-color: var(--accent); }
.cal-day.sel { background: var(--accent); color: #fff; border-color: var(--accent); }
.cal-day.today { box-shadow: inset 0 0 0 2px var(--accent); }

/* ===== Aftercare editor ===== */
.ac-steps { display: flex; flex-direction: column; gap: 12px; margin: 6px 0 12px; }
.ac-step { border: 1px solid var(--line); border-radius: 10px; padding: 12px; background: var(--bg); display: flex; flex-direction: column; gap: 8px; }
.ac-step .mini-btn { align-self: flex-start; }
#acAddStep { width: auto; margin: 0 0 10px; padding: 9px 14px; font-size: 0.85rem; font-weight: 600; }

/* ===== Inspiration photos ===== */
.inspo-add { margin: 6px 0 4px; }
.inspo-add .btn { width: auto; margin: 0; padding: 9px 14px; font-size: 0.85rem; font-weight: 600; }
.inspo-thumbs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.inspo-thumb { width: 64px; height: 64px; border-radius: 8px; background-size: cover; background-position: center; position: relative; border: 1px solid var(--line); }
.inspo-x { position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; border-radius: 50%; border: none; background: var(--ink); color: #fff; cursor: pointer; font-size: 0.7rem; line-height: 1; padding: 0; }
.inspo-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.inspo-cell { display: block; aspect-ratio: 1; border-radius: 10px; background-size: cover; background-position: center; border: 1px solid var(--line); }

/* ===== Add-ons ===== */
/* Booking — selectable extras */
.addon-list { display: flex; flex-direction: column; gap: 8px; margin: 6px 0 4px; }
.addon-chip { display: flex; justify-content: space-between; align-items: center; gap: 10px; width: 100%; text-align: left; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; cursor: pointer; font-family: inherit; font-size: 0.9rem; color: var(--ink); }
.addon-chip:hover { border-color: var(--accent); }
.addon-chip.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.addon-chip .addon-price { white-space: nowrap; font-weight: 700; }
/* Setup — the provider's add-on editor */
.addon-editor { display: flex; flex-direction: column; gap: 6px; margin: 6px 0 8px; }
.addon-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font-size: 0.88rem; }
.addon-row .addon-price { color: var(--muted); font-weight: 600; }
.addon-add { display: flex; gap: 8px; margin-bottom: 10px; }
.addon-add input { flex: 1; }
.addon-add input[type="number"] { max-width: 110px; flex: 0 0 auto; }
.addon-add .btn { width: auto; margin: 0; padding: 9px 14px; font-size: 0.85rem; font-weight: 600; }

/* ===== Sign-in wall + Google ===== */
.google-btn-box { display: flex; justify-content: center; margin: 4px 0 6px; min-height: 40px; }
.auth-divider { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 0.8rem; margin: 8px 0; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.wall-role { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 0; }
.wall-label { font-weight: 700; font-size: 0.92rem; }
.link-skip { display: block; margin: 14px auto 0; background: none; border: none; color: var(--muted); cursor: pointer; font-size: 0.85rem; text-decoration: underline; }
.link-skip:hover { color: var(--accent); }
.wall-google { display: flex; align-items: center; justify-content: center; gap: 6px; }
.wall-google small { font-weight: 500; opacity: 0.8; }

/* ===== Consultation call CTA (client view) ===== */
.consult-cta { display: flex; justify-content: space-between; align-items: center; gap: 12px; background: var(--accent-soft); color: var(--accent-ink); border: 1px solid var(--accent); border-radius: 14px; padding: 14px 16px; margin: 4px 0 16px; }
.consult-cta .t { font-weight: 700; }
.consult-cta .s { font-size: 0.84rem; opacity: 0.88; margin-top: 2px; }

/* ===== Booking location choice (studio vs mobile) ===== */
.loc-choice { display: flex; gap: 8px; margin: 4px 0 8px; }
.loc-opt { flex: 1; border: 1px solid var(--line); background: var(--bg); border-radius: 10px; padding: 11px 10px; cursor: pointer; font-family: inherit; font-size: 0.85rem; font-weight: 600; color: var(--ink); }
.loc-opt:hover { border-color: var(--accent); }
.loc-opt.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-ink); }

/* ===== Referrals (placeholder) ===== */
.referral-code { font-weight: 800; font-size: 1.2rem; letter-spacing: 1px; background: var(--accent-soft); color: var(--accent-ink); border-radius: 10px; padding: 12px; text-align: center; border: 1px dashed var(--accent); }
.referral-tiers { margin: 12px 0; padding-left: 18px; color: var(--ink); font-size: 0.9rem; line-height: 1.7; }

/* Client booking status (in "Your bookings") */
.rr-status { font-size: 0.78rem; font-weight: 700; white-space: nowrap; }
.rr-status.pending, .rr-status.requested { color: #8a6a12; }
.rr-status.reserved, .rr-status.quoted { color: var(--good); }
.rr-status.completed { color: var(--muted); }
.rr-status.declined { color: #c0392b; }
.rcpt-status.reserved { color: var(--good); font-weight: 700; }
.rcpt-status.pending, .rcpt-status.requested { color: #8a6a12; font-weight: 700; }
.rcpt-status.completed { color: var(--muted); font-weight: 700; }
.rcpt-status.declined { color: #c0392b; font-weight: 700; }

/* Inspo photo download affordance */
.inspo-cell { position: relative; }
.inspo-dl { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; display: flex; align-items: center; justify-content: center; font-size: .9rem; }

/* Print: show only the receipt, hide the rest of the app */
#printArea { display: none; }
@media print {
  @page { margin: 14mm; }
  body > *:not(#printArea) { display: none !important; }
  #printArea { display: block !important; }
  .rcpt { border: none; border-radius: 0; max-width: 100%; padding: 0; }
}
