:root {
  --brand: #0F766E; --brand-soft: #0F766E1A; --ink: #1C1917; --muted: #78716C; --line: #E7E5E4;
  --bg: #FAFAF9; --card: #fff; --danger: #B91C1C; --success: #15803D; --warn: #B45309; --r: 14px;
}
body.worker { --brand: #C2410C; --brand-soft: #C2410C1A; }
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif; background: var(--bg); color: var(--ink); font-size: 15px; -webkit-font-smoothing: antialiased; }
a { color: var(--brand); }
h1 { font-size: 24px; font-weight: 800; margin: 6px 0 4px; line-height: 1.2; }
h2 { font-size: 17px; font-weight: 800; margin: 20px 0 10px; }
p { margin: 6px 0; }
.view { max-width: 520px; margin: 0 auto; padding-bottom: 90px; min-height: 100vh; }
.pad { padding: 16px 18px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.err { color: var(--danger); font-size: 14px; min-height: 0; }
.err:empty { display: none; }
.warn { color: var(--warn); }
.note { background: #FFF7ED; border: 1px dashed #FDBA74; color: #9A3412; border-radius: 12px; padding: 10px 12px; font-size: 13px; }
.kicker { font-size: 12px; font-weight: 800; letter-spacing: .05em; color: var(--brand); display: block; }
.big { font-size: 28px; }
.grow { flex: 1; min-width: 0; }

/* cards & rows */
.card { display: block; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; margin: 10px 0; color: inherit; text-decoration: none; }
a.card:hover { border-color: var(--brand); }
.card.hl { background: var(--brand-soft); border-color: var(--brand); }
.card.warnbox { background: #FFFBEB; border-color: var(--warn); }
.card.warnbox b { color: var(--warn); display: block; }
.row { display: flex; align-items: center; gap: 12px; }
.rowb { display: flex; justify-content: space-between; align-items: center; padding: 4px 0; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.price { font-size: 22px; font-weight: 800; }
.brandcard { background: var(--brand); border-color: var(--brand); color: #fff; }
.bignum { font-size: 32px; font-weight: 800; margin-top: 4px; }
.avatar { width: 46px; height: 46px; border-radius: 23px; background: var(--brand); color: #fff; font-weight: 800; font-size: 18px; display: flex; align-items: center; justify-content: center; flex: none; }
.round { width: 46px; height: 46px; border-radius: 23px; background: var(--brand-soft); display: inline-flex; align-items: center; justify-content: center; font-size: 20px; text-decoration: none; position: relative; flex: none; }
.round i[hidden] { display: none; }
.round i { position: absolute; top: -3px; right: -3px; min-width: 20px; height: 20px; border-radius: 10px; background: var(--danger); color: #fff; font-style: normal; font-size: 10px; font-weight: 800; display: flex; align-items: center; justify-content: center; border: 2px solid #fff; padding: 0 3px; }
.verified { display: inline-block; background: #DCFCE7; color: var(--success); font-weight: 800; font-size: 11px; border-radius: 999px; padding: 2px 8px; vertical-align: middle; }

/* forms */
label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin: 10px 0; }
.lbl { font-size: 13px; font-weight: 600; color: var(--muted); margin: 14px 0 8px; }
input, textarea, select { display: block; width: 100%; margin-top: 5px; font: inherit; font-size: 16px; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--brand); outline-offset: -1px; }
.btn { display: block; width: 100%; height: 50px; border: 0; border-radius: var(--r); background: var(--brand); color: #fff; font: inherit; font-weight: 800; font-size: 16px; cursor: pointer; margin: 10px 0; text-align: center; line-height: 50px; text-decoration: none; padding: 0 14px; }
.btn.small { height: 40px; line-height: 40px; font-size: 14px; }
.btn.outline { background: #fff; color: var(--ink); border: 1px solid var(--line); line-height: 48px; }
.btn.outline.small { line-height: 38px; }
.btn.ghost { background: transparent; color: var(--muted); }
.btn.danger { background: var(--danger); }
.btn:disabled { opacity: .45; cursor: default; }
.link { background: none; border: 0; color: var(--brand); font: inherit; font-weight: 700; cursor: pointer; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0; }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 8px 12px; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; color: var(--ink); }
.chip.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.spin { display: inline-block; width: 18px; height: 18px; border: 3px solid #ffffff66; border-top-color: #fff; border-radius: 50%; animation: sp .8s linear infinite; vertical-align: middle; flex: none; }
.spin.dark { border-color: var(--brand-soft); border-top-color: var(--brand); }
@keyframes sp { to { transform: rotate(360deg); } }

/* top bar, tabs */
.topbar { display: flex; align-items: center; gap: 8px; margin: -4px 0 8px; font-size: 16px; }
.back { font-size: 30px; line-height: 1; text-decoration: none; color: var(--ink); background: none; border: 0; cursor: pointer; padding: 0 6px 4px 0; }
.tabbar { position: fixed; bottom: 0; left: 0; right: 0; display: flex; background: #fff; border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); z-index: 900; }
.tabbar a { flex: 1; text-align: center; font-size: 11px; font-weight: 600; color: var(--muted); padding: 8px 0 10px; text-decoration: none; }
.tabbar a b { display: block; font-size: 18px; }
.tabbar a.on { color: var(--brand); }
@media (min-width: 560px) { .tabbar { max-width: 520px; margin: 0 auto; border-left: 1px solid var(--line); border-right: 1px solid var(--line); } }

/* map */
.map { height: 240px; border-radius: 16px; overflow: hidden; margin: 10px 0; border: 1px solid var(--line); z-index: 1; }
.map.short { height: 190px; }
.maprow { display: flex; justify-content: space-between; align-items: center; margin: -4px 0 6px; }
.pill { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 700; }
.pin span { display: flex; width: 36px; height: 36px; border-radius: 18px; background: #fff; border: 3px solid var(--brand); align-items: center; justify-content: center; font-size: 17px; box-shadow: 0 2px 6px #0003; }
.pin.job span { border-color: #2563EB; }
.pin.worker span { border-color: #C2410C; }
.me-dot span { display: block; width: 22px; height: 22px; border-radius: 11px; background: #2563EB; border: 4px solid #fff; box-shadow: 0 0 0 6px #2563EB33, 0 2px 4px #0003; }
body.worker .me-dot span { background: #C2410C; box-shadow: 0 0 0 6px #C2410C33, 0 2px 4px #0003; }

/* service grid */
.grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.tile { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 10px 2px; font: inherit; font-size: 11px; font-weight: 600; cursor: pointer; color: var(--ink); }
.tile span { display: block; font-size: 24px; margin-bottom: 3px; }
.tile:hover { background: var(--brand-soft); }

/* photos */
.photos { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.photos img, .thumb img { width: 72px; height: 72px; border-radius: 10px; object-fit: cover; background: var(--line); cursor: zoom-in; }
.thumb { position: relative; }
.thumb button { position: absolute; top: -6px; right: -6px; width: 22px; height: 22px; border-radius: 11px; border: 0; background: var(--ink); color: #fff; font-size: 11px; cursor: pointer; }
.addphoto { width: 72px; height: 72px; border-radius: 12px; border: 1.5px dashed var(--line); background: #fff; font-size: 20px; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.addphoto small { font-size: 10px; color: var(--muted); font-weight: 600; }
.idphoto { width: 140px; border-radius: 10px; border: 1px solid var(--line); }

/* status steps */
.steps { display: flex; margin: 14px 0 6px; }
.steps div { flex: 1; text-align: center; font-size: 11px; color: var(--muted); }
.steps i { display: block; width: 12px; height: 12px; border-radius: 6px; background: var(--line); margin: 0 auto 4px; }
.steps .on { color: var(--ink); font-weight: 700; }
.steps .on i { background: var(--brand); }
.stars button { font-size: 34px; background: none; border: 0; cursor: pointer; color: #F59E0B; }

/* online card & switch */
.card.online { display: flex; align-items: center; padding: 18px 14px; }
.card.online b { font-size: 17px; }
.card.online.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.card.online.on span { color: #ffffffcc; }
.card.online span { color: var(--muted); font-size: 13px; }
.switch { width: 52px; height: 30px; border-radius: 15px; border: 0; background: #D6D3D1; position: relative; cursor: pointer; flex: none; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 12px; background: #fff; transition: left .2s; }
.on .switch { background: #ffffff66; }
.on .switch::after { left: 25px; }
.switch .spin { position: absolute; left: 17px; top: 6px; }

/* modals, toasts */
.modal { position: fixed; inset: 0; background: #0009; display: flex; align-items: flex-end; justify-content: center; z-index: 2000; animation: fade .2s; }
.sheet { background: #fff; width: 100%; max-width: 520px; border-radius: 24px 24px 0 0; padding: 22px 20px 28px; animation: up .25s; max-height: 92vh; overflow-y: auto; }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }
.sheet h3 { margin: 0 0 6px; }
.offer-title { font-size: 26px; margin: 6px 0; }
.timer { float: right; width: 52px; height: 52px; border-radius: 26px; border: 3px solid var(--brand); color: var(--brand); font-weight: 800; display: flex; align-items: center; justify-content: center; }
.stats { display: flex; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 12px 0; padding: 10px 0; }
.stats div { flex: 1; } .stats small { color: var(--muted); display: block; } .stats b { font-size: 15px; }
.viewer { align-items: center; flex-direction: column; color: #fff; cursor: zoom-out; }
.viewer img { max-width: 94vw; max-height: 82vh; border-radius: 8px; }
#toasts { position: fixed; top: 12px; left: 0; right: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; z-index: 3000; pointer-events: none; padding: 0 12px; }
.toast { pointer-events: auto; background: var(--ink); color: #fff; border-radius: 12px; padding: 12px 14px; max-width: 480px; width: 100%; display: flex; gap: 12px; align-items: center; justify-content: space-between; box-shadow: 0 6px 20px #0003; font-size: 14px; animation: fade .2s; }
.toast.bad { background: var(--danger); }
.toast button { background: #fff; color: var(--ink); border: 0; border-radius: 8px; padding: 6px 10px; font: inherit; font-weight: 700; cursor: pointer; flex: none; }

/* chat */
.chat { display: flex; flex-direction: column; height: calc(100vh - 70px); padding: 12px 14px 0; }
.chat .msgs { flex: 1; overflow-y: auto; padding: 4px 0 8px; display: flex; flex-direction: column; }
.bubble { max-width: 80%; border-radius: 16px; padding: 9px 12px; margin: 4px 0; font-size: 15px; word-wrap: break-word; }
.bubble.mine { align-self: flex-end; background: var(--brand); color: #fff; border-bottom-right-radius: 4px; }
.bubble.theirs { align-self: flex-start; background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.bubble small { display: block; text-align: right; font-size: 10px; opacity: .7; margin-top: 3px; }
.bubble img { max-width: 200px; border-radius: 10px; display: block; margin-bottom: 4px; cursor: zoom-in; }
.quick { display: flex; gap: 8px; overflow-x: auto; padding: 6px 0; }
.quick .chip { white-space: nowrap; font-size: 13px; }
.composer { display: flex; gap: 8px; align-items: center; padding: 8px 0 12px; }
.composer input { margin: 0; border-radius: 22px; }
.composer .icon, .composer .send { width: 44px; height: 44px; border-radius: 22px; border: 0; font-size: 18px; cursor: pointer; flex: none; }
.composer .icon { background: none; }
.composer .send { background: var(--brand); color: #fff; }

/* auth & landing */
.auth .brand, .landing .brand { font-size: 40px; font-weight: 900; color: var(--brand); margin-top: 24px; }
.landing main { max-width: 520px; margin: 0 auto; }
.lead { font-size: 17px; color: var(--muted); }
.choice { display: flex; gap: 14px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 18px; margin: 12px 0; text-decoration: none; color: var(--ink); font-size: 16px; }
.choice.customer { border-left: 6px solid #0F766E; }
.choice.worker { border-left: 6px solid #C2410C; }
.choice small { color: var(--muted); font-size: 13px; }
.choice:hover { box-shadow: 0 4px 16px #0001; }
.how { padding-left: 20px; line-height: 1.55; font-size: 14px; }
.how li { margin-bottom: 8px; }
