/* =========================================================
   GhépThợ – giao diện hiện đại (bản đồ tràn màn hình + bảng nổi)
   ========================================================= */
:root {
  --primary: #2563eb;
  --primary-2: #06b6d4;
  --primary-dark: #1d4ed8;
  --primary-soft: #eff6ff;
  --accent: #f97316;
  --accent-2: #fb923c;
  --green: #10b981;
  --green-dark: #047857;
  --green-soft: #ecfdf5;
  --red: #ef4444;
  --red-soft: #fef2f2;
  --amber: #f59e0b;
  --text: #0f172a;
  --text-2: #334155;
  --muted: #64748b;
  --border: #e2e8f0;
  --bg: #f1f5f9;
  --card: #ffffff;
  --grad: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 100%);
  --grad-cta: linear-gradient(135deg, #f97316 0%, #fb923c 50%, #f59e0b 100%);
  --r-lg: 24px;
  --r: 16px;
  --r-sm: 12px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .08);
  --shadow: 0 10px 30px -8px rgba(15, 23, 42, .18), 0 4px 10px -4px rgba(15, 23, 42, .08);
  --shadow-lg: 0 24px 60px -12px rgba(15, 23, 42, .30);
  --sheet-w: 430px;
  --gap: 16px;
  --top-h: 60px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; }
body {
  font-family: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { margin: 0; letter-spacing: -.02em; }
h1 { font-size: 26px; line-height: 1.2; font-weight: 800; }
h2 { font-size: 20px; font-weight: 700; }
h3 { font-size: 16px; font-weight: 700; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.grow { flex: 1; min-width: 0; }
.full { width: 100%; }
svg.lucide { width: 18px; height: 18px; stroke-width: 2.2; flex: none; }

/* ---------- Map ---------- */
#map { position: fixed; inset: 0; z-index: 0; background: #e8eef3; }
.leaflet-tile-pane { filter: saturate(.55) brightness(1.04) contrast(.92) hue-rotate(-8deg); }
.leaflet-control-zoom { border: 0 !important; box-shadow: var(--shadow) !important; border-radius: 14px !important; overflow: hidden; }
.leaflet-control-zoom a { width: 40px !important; height: 40px !important; line-height: 40px !important; color: var(--text-2) !important; border: 0 !important; }
.leaflet-top.leaflet-right { top: calc(var(--top-h) + var(--gap) * 2); right: 6px; }
.leaflet-control-attribution { font-size: 10px; border-radius: 8px 0 0 0; }

/* ---------- Top bar ---------- */
.topbar {
  position: fixed; top: var(--gap); left: var(--gap); right: var(--gap); z-index: 1000;
  height: var(--top-h);
  display: flex; align-items: center; gap: 14px;
  padding: 0 10px 0 12px;
  background: rgba(255, 255, 255, .86);
  backdrop-filter: blur(16px) saturate(1.6);
  -webkit-backdrop-filter: blur(16px) saturate(1.6);
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 20px;
  box-shadow: var(--shadow);
}
.brand { display: flex; align-items: center; gap: 10px; }
.logo {
  width: 40px; height: 40px; border-radius: 13px; display: block; flex: none;
  box-shadow: 0 6px 14px -4px rgba(37, 99, 235, .55);
}
.brand-txt b { display: block; font-size: 18px; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.brand-txt small { display: block; font-size: 11.5px; color: var(--muted); font-weight: 500; }
.tabs {
  display: flex; gap: 4px; margin: 0 auto; padding: 4px;
  background: rgba(241, 245, 249, .9); border-radius: 14px;
}
.tabs button {
  display: flex; align-items: center; gap: 7px;
  border: 0; background: transparent; padding: 8px 14px; border-radius: 11px;
  font-weight: 600; font-size: 14px; color: var(--muted); white-space: nowrap; transition: all .2s var(--ease);
}
.tabs button svg { width: 17px; height: 17px; }
.tabs button:hover { color: var(--text); }
.tabs button.active { background: #fff; color: var(--primary); box-shadow: var(--shadow-sm); }
.hotline {
  display: flex; align-items: center; gap: 7px; text-decoration: none;
  font-weight: 700; font-size: 14px; color: #fff; background: var(--text);
  padding: 9px 14px; border-radius: 13px; white-space: nowrap;
}
.hotline svg { width: 16px; height: 16px; }

/* ---------- Sheet (bảng điều khiển nổi) ---------- */
.sheet {
  position: fixed; z-index: 900;
  top: calc(var(--top-h) + var(--gap) * 2); left: var(--gap); bottom: var(--gap);
  width: var(--sheet-w);
  background: var(--card);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; overflow: hidden;
}
.sheet-handle { display: none; }
.panel { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 22px 20px 0; scrollbar-width: thin; }
.panel::-webkit-scrollbar { width: 6px; }
.panel::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 9px; }

.view, .stage { display: none; }
.view.active, .stage.active { display: block; animation: rise .35s var(--ease); }
.stage.active { padding-bottom: 22px; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Hero ---------- */
.eyebrow { margin: 0 0 4px; font-size: 13px; font-weight: 600; color: var(--muted); }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.pill {
  display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600;
  padding: 5px 10px; border-radius: 99px; background: var(--bg); color: var(--text-2);
}
.pill svg { width: 14px; height: 14px; color: var(--primary); }
/* Nút tải app trên trang chủ */
.app-banner {
  position: relative; display: flex; align-items: center; gap: 11px; margin: 18px 0 0; padding: 10px 12px; color: #fff; text-decoration: none; border-radius: 18px;
  background: radial-gradient(180px 90px at 95% 0, rgba(6, 182, 212, .55), transparent 70%), linear-gradient(120deg, #0b1f4b, #1d4ed8);
  box-shadow: 0 12px 24px -14px rgba(29, 78, 216, .9); transition: transform .15s var(--ease), box-shadow .15s;
}
.app-banner:hover { transform: translateY(-1px); box-shadow: 0 16px 28px -14px rgba(29, 78, 216, 1); }
.app-banner img { flex: none; width: 44px; height: 44px; border-radius: 12px; box-shadow: 0 0 0 2px rgba(255, 255, 255, .22); }
.app-banner .grow { flex: 1; min-width: 0; }
.app-banner b { display: block; font-size: 14.5px; line-height: 1.3; font-weight: 800; }
.app-banner small { display: block; font-size: 12px; line-height: 1.35; color: #c7d7f5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-banner-btn { flex: none; display: inline-flex; align-items: center; gap: 5px; padding: 8px 13px; font-size: 13.5px; font-weight: 800; color: #0b1f4b; background: #fff; border-radius: 11px; }
.app-banner-btn svg { width: 15px; height: 15px; }
.app-banner-x { position: absolute; top: -6px; right: -6px; display: grid; place-items: center; width: 22px; height: 22px; padding: 0; color: #475569; background: #fff; border: 1px solid var(--border); border-radius: 50%; }
.app-banner-x svg { width: 12px; height: 12px; }
.home-seo { margin-top: 22px; }
.home-seo h2 { font-size: 17px; margin: 0 0 6px; }
.home-seo p { font-size: 13.5px; line-height: 1.6; color: var(--muted); margin: 0 0 12px; }
.home-seo nav { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.home-seo nav a { display: flex; align-items: center; justify-content: space-between; padding: 11px 13px; font-size: 13.5px; font-weight: 600; color: var(--text); background: var(--bg); border-radius: 12px; text-decoration: none; transition: background .15s, color .15s; }
.loc-card { display: flex; flex-direction: column; gap: 10px; }
.loc-card h2 { text-align: center; margin: 0; }
.loc-card .btn-cta, .loc-card .btn-primary, .loc-card .btn-soft { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; text-decoration: none; }
.loc-card .btn-soft, .loc-card .btn-primary { padding: 12px; border-radius: 14px; font-weight: 600; }
.loc-card svg { width: 18px; height: 18px; }
.loc-card .small { font-size: 12.5px; margin: 0; }
.loc-steps { text-align: left; margin: 0; padding: 12px 14px 12px 32px; background: var(--bg); border-radius: 14px; font-size: 14px; line-height: 1.55; }
.loc-steps li + li { margin-top: 4px; }
.home-seo nav a:last-child:nth-child(odd) { grid-column: 1 / -1; }
.home-seo nav a::after { content: "›"; font-size: 17px; line-height: 1; color: var(--muted); }
.home-seo nav a:hover { color: var(--primary); background: #e9eef5; }
.home-seo h3 { font-size: 15px; margin: 18px 0 6px; }
.home-seo .areas { display: grid; gap: 10px; }
.home-seo .area-card { padding: 12px; border: 1px solid var(--border); border-radius: var(--r); background: var(--card); }
.home-seo .area-head { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; font-size: 14px; }
.home-seo .area-head svg { width: 16px; height: 16px; color: var(--primary); flex: none; }
.home-seo .area-head small { margin-left: auto; font-size: 12px; color: var(--muted); }
.home-seo .area-svc, .home-seo .area-list { display: flex; flex-wrap: wrap; gap: 6px; }
.home-seo .area-svc { margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px dashed var(--border); }
.home-seo .area-svc a { padding: 6px 10px; font-size: 12.5px; font-weight: 600; color: var(--primary-dark); background: var(--primary-soft); border-radius: 999px; text-decoration: none; transition: background .15s; }
.home-seo .area-svc a:hover { background: #dbeafe; }
.home-seo .area-list a { display: inline-flex; align-items: center; gap: 6px; padding: 6px 6px 6px 11px; font-size: 13px; font-weight: 600; color: var(--text); background: var(--bg); border-radius: 999px; text-decoration: none; transition: background .15s, color .15s; }
.home-seo .area-list a small { padding: 1px 7px; font-size: 11px; font-weight: 600; color: var(--green-dark); background: var(--green-soft); border-radius: 999px; }
.home-seo .area-list a:hover { color: var(--primary); background: #e9eef5; }
.home-seo .hint { margin: 14px 0 4px; }
.home-seo .hint a { color: var(--primary); font-weight: 600; text-decoration: none; }
.home-seo .hint.small { margin-top: 6px; font-size: 12.5px; }
.home-seo .hint.small a { color: var(--muted); font-weight: 500; }
.page-title { font-size: 26px; line-height: 1.2; font-weight: 800; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 16px; }

/* ---------- Cards ---------- */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--r); }
.section-title { display: flex; align-items: center; justify-content: space-between; margin: 24px 0 12px; }
.count-pill { font-size: 12px; font-weight: 700; color: var(--green-dark); background: var(--green-soft); padding: 4px 10px; border-radius: 99px; }
.count-pill::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--green); margin-right: 6px; vertical-align: 1px; animation: blink 1.6s infinite; }

/* Vị trí */
.loc-card { margin-top: 20px; padding: 12px 12px 12px 14px; box-shadow: var(--shadow-sm); }
.loc-row { display: flex; align-items: center; gap: 12px; }
.loc-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: #fff7ed; color: var(--accent); flex: none; }
.loc-label { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.dot-sep { opacity: .5; }
.inline-select {
  flex: 0 1 auto; min-width: 0; text-overflow: ellipsis;
  border: 0; background: transparent; color: var(--primary); font-weight: 700; font-size: 12px;
  padding: 0 2px; cursor: pointer; outline: none; max-width: 170px;
}
.bare-input { width: 100%; border: 0; outline: none; padding: 2px 0 0; font-size: 15px; font-weight: 600; background: transparent; text-overflow: ellipsis; }
.icon-btn {
  flex: none; width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--border);
  background: #fff; display: grid; place-items: center; color: var(--text-2); transition: all .2s;
}
.icon-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.suggest { margin-top: 10px; border-top: 1px solid var(--border); padding-top: 6px; }
.suggest button {
  display: flex; gap: 8px; align-items: flex-start; width: 100%; text-align: left; border: 0; background: none;
  padding: 9px 8px; font-size: 13.5px; border-radius: 10px; color: var(--text-2);
}
.suggest button svg { width: 16px; height: 16px; margin-top: 2px; color: var(--muted); }
.suggest button:hover { background: var(--bg); }

/* Dịch vụ */
.service-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.service {
  position: relative; border: 1.5px solid transparent; background: var(--bg); border-radius: var(--r);
  padding: 12px 4px 10px; display: flex; flex-direction: column; align-items: center; gap: 7px;
  font-size: 12px; font-weight: 600; text-align: center; line-height: 1.25; color: var(--text-2);
  transition: all .2s var(--ease);
}
.service .s-ic {
  width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--c) 14%, white); color: var(--c); transition: all .2s var(--ease);
}
.service .s-ic svg { width: 21px; height: 21px; }
.service small { font-weight: 500; color: var(--muted); font-size: 11px; margin-top: -4px; }
.service:hover { background: #e9eef5; transform: translateY(-1px); }
.service.active { background: #fff; border-color: var(--c); box-shadow: 0 8px 20px -10px var(--c); color: var(--text); }
.service.active .s-ic { background: var(--c); color: #fff; }
.service.active::after {
  content: ""; position: absolute; top: 7px; right: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--c);
}

/* Form */
.form-card { padding: 6px; }
.field {
  display: flex; align-items: center; gap: 10px; padding: 4px 12px; border-radius: 12px; transition: background .15s;
}
.field + .field { border-top: 1px solid var(--border); border-radius: 0; }
.field:focus-within { background: var(--bg); border-radius: 12px; }
.field > svg { color: var(--muted); }
.field.area { align-items: flex-start; }
.field.area > svg { margin-top: 12px; }
.field input, .field textarea, .field select {
  flex: 1; min-width: 0; border: 0; outline: none; background: transparent; padding: 10px 0; resize: none;
}
.field select { cursor: pointer; }
.segmented {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; margin: 6px;
  background: var(--bg); border-radius: 12px;
}
.segmented input { display: none; }
.segmented span {
  display: flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 4px; border-radius: 9px;
  font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; transition: all .2s;
}
.segmented span svg { width: 15px; height: 15px; }
.segmented input:checked + span { background: #fff; color: var(--primary); box-shadow: var(--shadow-sm); }

.toggle-row {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; margin: 2px; border-radius: 12px; cursor: pointer;
}
.toggle-row input { display: none; }
.toggle-row b { display: block; font-size: 14px; }
.toggle-row small { display: block; font-size: 12px; color: var(--muted); }
.tr-ic { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: #fff7ed; color: var(--accent); flex: none; }
.switch { flex: none; width: 46px; height: 27px; border-radius: 99px; background: #cbd5e1; position: relative; transition: .25s var(--ease); }
.switch::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 21px; height: 21px; border-radius: 50%;
  background: #fff; transition: .25s var(--ease); box-shadow: 0 2px 4px rgba(0,0,0,.2);
}
input:checked + .switch { background: var(--accent); }
input:checked + .switch::after { left: 22px; }
.switch.lg { width: 54px; height: 31px; }
.switch.lg::after { width: 25px; height: 25px; }
input:checked + .switch.lg { background: var(--green); }
input:checked + .switch.lg::after { left: 26px; }

/* ---------- CTA dính đáy ---------- */
.cta-bar {
  position: sticky; bottom: 0; z-index: 5;
  margin: 18px -20px 0; padding: 14px 20px 18px;
  background: linear-gradient(to bottom, rgba(255,255,255,.0), #fff 14px);
}
.cta-bar::before { content: ""; position: absolute; inset: 14px 0 0; background: #fff; border-top: 1px solid var(--border); z-index: -1; }
.estimate { margin-bottom: 10px; }
/* Thanh đặt thợ gọn một hàng: giá bên trái, nút bên phải, chi tiết giá bật lên phía trên để không che nội dung */
.cta-bar.compact {
  bottom: 12px; display: block; margin: 18px 0 12px; padding: 10px 10px 10px;
  background: #fff; border: 1px solid #dbe3ee; border-radius: 20px;
  box-shadow: 0 8px 26px -8px rgba(15, 23, 42, .28), 0 16px 0 0 #fff; /* lớp trắng che nội dung lộ ở khe dưới thanh */
}
.cta-bar.compact::before { display: none; }
.cta-bar.compact .estimate { margin: 0 4px 8px; }
.cta-bar.compact .btn-cta { width: 100%; padding: 15px; font-size: 17px; border-radius: 14px; }
.estimate summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.estimate summary::-webkit-details-marker { display: none; }
.est-price { display: flex; align-items: center; gap: 4px; }
.est-price b { font-size: 21px; line-height: 1.2; font-weight: 800; letter-spacing: -.02em; }
.est-price svg { width: 17px; height: 17px; color: var(--muted); transition: transform .2s; }
.estimate details[open] .est-price svg { transform: rotate(180deg); }
.est-eta { display: flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 600; color: var(--green-dark); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.est-eta.none { color: #92400e; }
.est-eta svg { flex: none; width: 13px; height: 13px; }
.est-pop { position: absolute; left: 0; right: 0; bottom: calc(100% + 8px); padding: 14px; font-size: 13px; background: #fff; border: 1px solid var(--border); border-radius: 16px; box-shadow: 0 16px 40px -14px rgba(15, 23, 42, .4); }
.est-pop-title { margin-bottom: 8px; font-size: 13px; font-weight: 700; }
.est-rows { padding: 10px 12px; background: var(--bg); border-radius: 12px; }
.row { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; }
.row > span:first-child { color: var(--muted); }
.row > span:last-child { text-align: right; font-weight: 600; }
.row.total { border-top: 1px dashed #cbd5e1; margin-top: 6px; padding-top: 8px; }
.row.total > span { color: var(--text); font-weight: 800; }
.pay-note {
  display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 12.5px; font-weight: 500;
  color: var(--green-dark); background: var(--green-soft); border-radius: 10px; padding: 8px 10px;
}
.pay-note svg { width: 16px; height: 16px; }
.est-empty { font-size: 13px; color: var(--muted); }

.btn-cta {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 16px; padding: 16px; font-size: 17px; font-weight: 800; letter-spacing: -.01em;
  color: #fff; background: var(--grad-cta); background-size: 150% 150%;
  box-shadow: 0 12px 24px -10px rgba(249, 115, 22, .7);
  transition: transform .15s, box-shadow .2s, background-position .4s;
}
.btn-cta svg { width: 20px; height: 20px; }
.btn-cta svg.lucide-zap { fill: #fff; }
.btn-cta:hover { background-position: 100% 0; box-shadow: 0 16px 30px -10px rgba(249, 115, 22, .8); }
.btn-cta:active { transform: scale(.98); }
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 0; background: var(--primary); color: #fff; font-weight: 700; padding: 10px 16px; border-radius: 12px; transition: background .15s;
}
.btn-primary:hover { background: var(--primary-dark); }
.btn-soft {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 0; background: var(--bg); font-weight: 700; padding: 13px 16px; border-radius: 14px; color: var(--text-2); transition: background .15s;
}
.btn-soft:hover { background: #e2e8f0; }
.btn-soft.danger { color: var(--red); }
.btn-soft.danger:hover { background: var(--red-soft); }
.link-btn { border: 0; background: none; color: var(--primary); font-weight: 600; padding: 0; font-size: 14px; }
.hint { text-align: center; font-size: 12.5px; color: var(--muted); margin: 12px 0 0; }
.hint svg { width: 14px; height: 14px; vertical-align: -2px; }
.trust-note {
  display: flex; gap: 10px; align-items: flex-start; margin-top: 16px; padding: 12px 14px; font-size: 13px; line-height: 1.5; color: var(--text-2);
  background: var(--green-soft); border-radius: 14px;
}
.trust-note b { color: var(--green-dark); }
.trust-note svg { color: var(--green); width: 16px; height: 16px; margin-top: 1px; }

/* ---------- Thẻ thợ ---------- */
.tech-list { display: flex; flex-direction: column; gap: 10px; }
.tech-card {
  display: flex; gap: 12px; align-items: center;
  border: 1px solid var(--border); border-radius: var(--r); padding: 12px;
  background: #fff; transition: all .2s var(--ease); cursor: pointer;
}
.tech-card:hover { border-color: #bfdbfe; box-shadow: var(--shadow); transform: translateY(-1px); }
.tech-card.off { opacity: .55; }
/* Thợ đang nghỉ: thẻ giữ nguyên kiểu dáng như thợ online, chỉ khác chấm trạng thái và chữ ghi chú */
.tech-card.sleep .sleep-note { color: var(--muted, #64748b); font-weight: 600; }
.list-cap { display: flex; align-items: center; gap: 7px; margin: 16px 2px 6px; font-size: 12.5px; font-weight: 700; color: var(--muted, #64748b); text-transform: uppercase; letter-spacing: .03em; }
.list-cap svg { width: 15px; height: 15px; }
.pop-note { display: block; margin-top: 6px; font-size: 11.5px; color: var(--muted, #64748b); line-height: 1.5; }
.tech-card.static { cursor: default; }
.tech-card.static:hover { transform: none; box-shadow: none; border-color: var(--border); }
.avatar {
  flex: none; width: 48px; height: 48px; border-radius: 16px;
  display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 15px; position: relative;
  background: var(--c, var(--primary));
  background-image: linear-gradient(135deg, rgba(255,255,255,.25), rgba(255,255,255,0));
}
.avatar.lg { width: 56px; height: 56px; font-size: 18px; border-radius: 18px; background-color: var(--primary); }
.avatar img, .tmk img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; display: block; }
/* Cửa hàng của thợ */
.smk {
  width: 36px; height: 36px; border-radius: 50% 50% 50% 4px; transform: rotate(-45deg); display: grid; place-items: center;
  background: #ea580c; color: #fff; border: 2px solid #fff; box-shadow: 0 4px 10px -2px rgba(15,23,42,.45);
}
.smk svg { width: 18px; height: 18px; transform: rotate(45deg); }
.pop-cover { display: block; width: calc(100% + 32px); max-width: none; height: 96px; object-fit: cover; margin: -14px -16px 10px; border-radius: 12px 12px 0 0; }
.pop-shop { font-size: 12.5px; color: var(--text-2); margin: 6px 0 0; white-space: pre-line; }
.tech-card .shop-name { font-size: 12.5px; font-weight: 600; color: #c2410c; margin-top: 1px; }
.shop-cover {
  position: relative; height: 130px; border-radius: 16px; overflow: hidden; background: var(--bg) center / cover no-repeat;
  display: grid; place-items: center; color: var(--muted); font-size: 13px;
}
.shop-faces { display: flex; align-items: center; gap: 12px; margin: 12px 0; }
.shop-faces .grow { flex: 1; min-width: 0; }
.photo-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.photo-btns .btn-soft { padding: 9px 12px; font-size: 13px; }
.photo-btns svg { width: 15px; height: 15px; }
.shop-pin { font-size: 13px; color: var(--text-2); margin: 0 0 8px; }
.avatar .st { position: absolute; right: -3px; bottom: -3px; width: 15px; height: 15px; border-radius: 50%; border: 3px solid #fff; background: var(--green); }
.avatar .st.busy { background: #94a3b8; }
.avatar .st.sleep { background: #cbd5e1; }
.tech-card .name { font-weight: 700; font-size: 15px; display: flex; align-items: center; gap: 5px; }
.tech-card .name svg { width: 15px; height: 15px; color: var(--primary); }
.meta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; font-size: 12.5px; color: var(--muted); margin-top: 1px; }
.meta span { display: inline-flex; align-items: center; gap: 3px; }
.meta svg { width: 13px; height: 13px; }
.meta .rate { color: var(--text); font-weight: 700; }
.meta .rate svg { color: var(--amber); fill: var(--amber); }
.chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 7px; }
.chip { font-size: 11px; font-weight: 600; background: var(--bg); padding: 3px 8px; border-radius: 99px; color: var(--text-2); }
.chip.grad { background: var(--green-soft); color: var(--green-dark); }
.chip.hl { background: var(--primary-soft); color: var(--primary); }
.tech-card .side { text-align: right; flex: none; display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.dist { font-weight: 800; font-size: 15px; }
.side small { color: var(--muted); font-size: 12px; font-weight: 500; }
.pick-btn {
  border: 0; background: var(--primary-soft); color: var(--primary); font-weight: 700; font-size: 13px;
  padding: 7px 12px; border-radius: 10px; transition: all .15s; white-space: nowrap; cursor: pointer;
  min-height: 34px; display: inline-flex; align-items: center; justify-content: center;
}
.pick-btn:hover { background: var(--primary); color: #fff; }
.vehicle { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); margin-top: 8px; }
.vehicle svg { width: 15px; height: 15px; }
.plate { font-weight: 800; color: var(--text); background: #fefce8; border: 1.5px solid #facc15; padding: 1px 7px; border-radius: 6px; font-size: 12px; letter-spacing: .02em; }
.empty { text-align: center; color: var(--muted); padding: 28px 16px; border: 1.5px dashed var(--border); border-radius: var(--r); font-size: 14px; }
.empty svg { width: 32px; height: 32px; display: block; margin: 0 auto 8px; color: #cbd5e1; }

/* ---------- Đang tìm ---------- */
.search-hero { text-align: center; padding-top: 6px; }
.radar { position: relative; width: 170px; height: 170px; margin: 6px auto 18px; }
.radar span { position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle, rgba(249,115,22,.0) 30%, rgba(249,115,22,.28) 100%); animation: ping 2.4s var(--ease) infinite; }
.radar span:nth-child(2) { animation-delay: .8s; }
.radar span:nth-child(3) { animation-delay: 1.6s; }
.radar b {
  position: absolute; inset: 52px; border-radius: 50%; display: grid; place-items: center;
  background: var(--grad-cta); color: #fff; box-shadow: 0 12px 28px -6px rgba(249,115,22,.65);
}
.radar b svg { width: 30px; height: 30px; animation: spin 3s linear infinite; }
@keyframes ping { 0% { transform: scale(.35); opacity: 1; } 100% { transform: scale(1); opacity: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
.search-hero p { margin: 6px 0 0; font-size: 14px; }
.search-log { list-style: none; padding: 0; margin: 20px 0; display: flex; flex-direction: column; gap: 8px; }
.search-log li {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r);
  border: 1px solid var(--border); font-size: 14px; animation: rise .35s var(--ease);
}
.search-log li .avatar { width: 40px; height: 40px; font-size: 13px; border-radius: 13px; }
.search-log li b { display: block; font-weight: 700; }
.search-log li small { color: var(--muted); font-size: 12px; }
.search-log .tag { margin-left: auto; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 99px; background: var(--bg); color: var(--muted); display: inline-flex; align-items: center; gap: 5px; }
.search-log .tag .spinner { width: 12px; height: 12px; border: 2px solid #cbd5e1; border-top-color: var(--primary); border-radius: 50%; animation: spin .8s linear infinite; }
.search-log li.ok { border-color: #a7f3d0; background: var(--green-soft); }
.search-log li.ok .tag { background: var(--green); color: #fff; }
.search-log li.no { opacity: .55; }
.search-log li.no .tag { background: var(--red-soft); color: var(--red); }

/* ---------- Theo dõi ---------- */
.status-card {
  background: var(--grad); color: #fff; border-radius: var(--r-lg); padding: 18px 18px 14px;
  box-shadow: 0 16px 30px -14px rgba(37, 99, 235, .7); position: relative; overflow: hidden;
}
.status-card::after {
  content: ""; position: absolute; width: 220px; height: 220px; border-radius: 50%; right: -80px; top: -110px;
  background: radial-gradient(circle, rgba(255,255,255,.22), transparent 70%);
}
.status-card.done { background: linear-gradient(135deg, #059669, #10b981); box-shadow: 0 16px 30px -14px rgba(16,185,129,.7); }
.sc-top { display: flex; align-items: flex-start; gap: 12px; position: relative; z-index: 1; }
.sc-top small { font-size: 12px; opacity: .85; font-weight: 500; }
.sc-top h2 { margin-top: 2px; font-size: 19px; }
.eta-badge {
  flex: none; background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.3); border-radius: 16px;
  padding: 6px 12px; text-align: center; min-width: 68px; backdrop-filter: blur(6px);
}
.eta-badge b { display: block; font-size: 24px; line-height: 1.1; font-weight: 800; }
.eta-badge b svg { width: 24px; height: 24px; }
.eta-badge small { font-size: 11px; opacity: .9; }
.progress { height: 6px; background: rgba(255,255,255,.25); border-radius: 99px; margin: 16px 0 12px; overflow: hidden; position: relative; z-index: 1; }
.progress div { height: 100%; width: 0; background: #fff; border-radius: 99px; transition: width .4s var(--ease); }
.steps { display: flex; list-style: none; padding: 0; margin: 0; position: relative; z-index: 1; }
.steps li { flex: 1; text-align: center; font-size: 11px; font-weight: 500; opacity: .65; }
.steps li span { display: block; width: 8px; height: 8px; margin: 0 auto 5px; border-radius: 50%; background: rgba(255,255,255,.5); }
.steps li.done, .steps li.current { opacity: 1; font-weight: 700; }
.steps li.done span { background: #fff; }
.steps li.current span { background: #fff; box-shadow: 0 0 0 4px rgba(255,255,255,.35); animation: blink 1.4s infinite; }
#assignedTech { margin-top: 14px; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0; }
.act {
  position: relative; display: flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 14px; padding: 13px; font-weight: 700; font-size: 15px; text-decoration: none;
  background: var(--primary-soft); color: var(--primary); transition: all .15s;
}
.act:hover { filter: brightness(.97); }
.act-call { background: var(--green); color: #fff; box-shadow: 0 10px 20px -10px rgba(16,185,129,.9); }
.unread { position: absolute; top: 9px; right: 14px; width: 9px; height: 9px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 3px #fff; }

.chat { overflow: hidden; margin-bottom: 12px; }
.chat-msgs { height: 200px; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 6px; background: #f8fafc; }
.msg { max-width: 80%; padding: 8px 12px; border-radius: 16px; font-size: 14px; animation: rise .25s var(--ease); }
.msg.me { align-self: flex-end; background: var(--primary); color: #fff; border-bottom-right-radius: 5px; }
.msg.them { align-self: flex-start; background: #fff; border: 1px solid var(--border); border-bottom-left-radius: 5px; }
.msg.sys { align-self: center; font-size: 12px; color: var(--muted); background: none; padding: 2px; }
.chat-form { display: flex; gap: 6px; padding: 8px; border-top: 1px solid var(--border); }
.chat-note { margin: 0; padding: 0 10px 6px; font-size: 11px; color: var(--muted); text-align: center; }
#onText.warn { color: #b45309; font-weight: 600; }
.chat-form input { flex: 1; border: 0; outline: none; padding: 8px 10px; background: var(--bg); border-radius: 12px; }
.send-btn { width: 42px; border: 0; border-radius: 12px; background: var(--primary); color: #fff; display: grid; place-items: center; }

.summary { padding: 14px 16px; font-size: 14px; margin-bottom: 12px; }
.summary .row > span:last-child { font-weight: 600; }
.svc-tag { display: inline-flex; align-items: center; gap: 5px; }
.svc-tag svg { width: 15px; height: 15px; color: var(--c); }
.urgent-tag { color: var(--accent); font-weight: 800; font-size: 11px; background: #fff7ed; padding: 1px 6px; border-radius: 6px; }

/* ---------- Lịch sử ---------- */
.h-card { display: flex; gap: 12px; border: 1px solid var(--border); border-radius: var(--r); padding: 14px; margin-bottom: 10px; transition: box-shadow .2s; }
.h-card:hover { box-shadow: var(--shadow); }
.h-ic { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; flex: none; background: color-mix(in srgb, var(--c) 14%, white); color: var(--c); }
.h-card .top { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.h-card .top b { font-size: 15px; }
.badge { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 99px; white-space: nowrap; }
.badge.done { background: var(--green-soft); color: var(--green-dark); }
.badge.cancelled { background: var(--red-soft); color: var(--red); }
.badge.active { background: #fff7ed; color: #c2410c; }
.h-card .info { display: flex; align-items: center; gap: 5px; font-size: 13px; color: var(--muted); margin-top: 3px; }
.h-card .info svg { width: 14px; height: 14px; }
.h-card .bottom { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
.h-card .price { font-weight: 800; font-size: 15px; }
.warranty-call { display: flex; align-items: center; gap: 6px; margin-top: 10px; padding: 8px 10px; font-size: 13px; font-weight: 600; color: var(--green-dark, #047857); background: var(--green-soft, #ecfdf5); border-radius: 10px; text-decoration: none; }
.warranty-call svg { width: 15px; height: 15px; flex: none; }
.stars-s { color: var(--amber); font-size: 13px; letter-spacing: 1px; }

/* ---------- Chế độ thợ ---------- */
.promo {
  display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: var(--r); margin-bottom: 20px;
  background: linear-gradient(135deg, #ecfdf5, #d1fae5); color: #065f46;
}
.promo > svg { width: 28px; height: 28px; color: var(--green); }
.promo b { display: block; font-size: 15px; }
.promo span { font-size: 13px; }
.skill-checks { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.skill-checks label {
  display: flex; align-items: center; gap: 9px; font-size: 13px; font-weight: 600; cursor: pointer;
  border: 1.5px solid var(--border); border-radius: 12px; padding: 10px; transition: all .15s; color: var(--text-2);
}
.skill-checks label svg { width: 17px; height: 17px; color: var(--c); }
.skill-checks input { display: none; }
.skill-checks label:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); color: var(--text); }
.skill-checks label:has(input:checked)::after { content: "✓"; margin-left: auto; color: var(--primary); font-weight: 800; }
.tech-self { display: flex; align-items: center; gap: 12px; }
.tech-self b { font-size: 17px; }
.badge-grad {
  display: inline-flex; align-items: center; gap: 4px; background: var(--green-soft); color: var(--green-dark); font-weight: 700; font-size: 12px;
  padding: 2px 9px; border-radius: 99px; margin-top: 3px;
}
.badge-grad svg { width: 13px; height: 13px; }
.online-card {
  display: flex; align-items: center; gap: 12px; margin-top: 16px; padding: 14px; cursor: pointer;
  border-radius: var(--r); border: 1.5px solid var(--border); transition: all .25s var(--ease);
}
.online-card input { display: none; }
.ring-test { display: inline-flex; align-items: center; gap: 6px; margin: 8px 0 0 4px; padding: 4px 6px; font: inherit; font-size: 13px; font-weight: 600; color: var(--primary); background: none; border: 0; cursor: pointer; }
.ring-test svg { width: 16px; height: 16px; }
.online-card.disabled { opacity: .5; cursor: not-allowed; }
.notice { display: flex; gap: 12px; align-items: center; margin-top: 16px; padding: 12px 14px; border-radius: var(--r); font-size: 13px; }
.notice svg { width: 24px; height: 24px; }
.notice b { display: block; font-size: 14px; }
.notice.pending { background: #fffbeb; color: #92400e; }
.notice.fee { background: #eff6ff; color: #1e3a8a; align-items: flex-start; }
.notice.fee span { display: block; margin-top: 2px; line-height: 1.5; }
.fee-line { margin: -4px 0 12px; padding: 8px 10px; color: #1e3a8a; background: #eff6ff; border-radius: 10px; }
.notice.locked { background: var(--red-soft); color: #991b1b; }
.online-card b { display: block; font-size: 15px; }
.online-card small { display: block; font-size: 12.5px; color: var(--muted); }
.oc-ic { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--bg); color: var(--muted); transition: all .25s; }
.online-card:has(input:checked) { border-color: #6ee7b7; background: var(--green-soft); }
.online-card:has(input:checked) .oc-ic { background: var(--green); color: #fff; }
.earn-card {
  margin: 12px 0 16px; padding: 18px; border-radius: var(--r-lg); color: #fff;
  background: linear-gradient(135deg, #0f172a, #1e3a8a); box-shadow: 0 16px 30px -14px rgba(15,23,42,.7);
}
.earn-card small { font-size: 12.5px; opacity: .75; }
.earn-card > div > b { display: block; font-size: 30px; font-weight: 800; letter-spacing: -.03em; }
.earn-row { display: flex; gap: 14px; margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.15); font-size: 13px; }
.earn-row span { display: flex; align-items: center; gap: 5px; opacity: .9; }
.earn-row svg { width: 15px; height: 15px; }
.job-card { border: 2px solid var(--accent); border-radius: var(--r-lg); padding: 16px; animation: rise .35s var(--ease); box-shadow: 0 16px 30px -18px rgba(249,115,22,.9); }
.job-card.accepted { border-color: var(--green); box-shadow: 0 16px 30px -18px rgba(16,185,129,.9); }
.job-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; }
.job-top b { font-size: 15px; display: flex; align-items: center; gap: 6px; }
.job-svc { display: flex; align-items: center; gap: 10px; margin: 8px 0; }
.job-svc .h-ic { width: 40px; height: 40px; border-radius: 12px; }
.price-big { font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.price-big small { font-size: 12.5px; font-weight: 600; color: var(--green-dark); }
.countdown {
  width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; font-weight: 800;
  background: conic-gradient(var(--accent) var(--p, 100%), var(--bg) 0); position: relative; flex: none;
}
.countdown span { position: relative; z-index: 1; }
.countdown::before { content: ""; position: absolute; inset: 5px; background: #fff; border-radius: 50%; }
.job-card .actions { margin-bottom: 0; }
.wait { text-align: center; padding: 30px 12px; color: var(--muted); border: 1.5px dashed var(--border); border-radius: var(--r); }
.wait .pulse { width: 14px; height: 14px; border-radius: 50%; background: var(--green); margin: 0 auto 12px; box-shadow: 0 0 0 0 rgba(16,185,129,.6); animation: pulse 1.6s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 16px rgba(16,185,129,0); } 100% { box-shadow: 0 0 0 0 rgba(16,185,129,0); } }
@keyframes blink { 50% { opacity: .35; } }

/* ---------- Marker bản đồ ---------- */
.tmk {
  width: 40px; height: 40px; border-radius: 14px; display: grid; place-items: center;
  background: var(--c); color: #fff; font-weight: 800; font-size: 12.5px; font-family: "Be Vietnam Pro", sans-serif;
  border: 3px solid #fff; box-shadow: 0 0 0 2.5px var(--green), 0 6px 14px -2px rgba(15,23,42,.45);
  transition: transform .2s var(--ease);
  background-image: linear-gradient(135deg, rgba(255,255,255,.25), rgba(255,255,255,0));
}
.tmk:hover { transform: scale(1.12) translateY(-2px); }
.tmk.busy { box-shadow: 0 0 0 2.5px #94a3b8, 0 4px 10px -2px rgba(15,23,42,.3); filter: grayscale(.9); opacity: .7; }
.tmk.dim { opacity: .35; transform: scale(.85); }
.tmk.me { --c: var(--primary); border-radius: 50%; box-shadow: 0 0 0 3px var(--green), 0 6px 14px -2px rgba(15,23,42,.45); }
.tmk.me svg { width: 20px; height: 20px; }
.mvk {
  width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; color: #fff;
  background: var(--grad); border: 3px solid #fff; box-shadow: 0 8px 20px -4px rgba(37,99,235,.7);
}
.mvk svg { width: 24px; height: 24px; }
.umk { position: relative; width: 40px; height: 48px; }
.umk .halo { position: absolute; left: 50%; bottom: 0; width: 22px; height: 10px; margin-left: -11px; border-radius: 50%; background: rgba(249,115,22,.35); animation: halo 1.8s infinite; }
.umk .pin {
  position: absolute; left: 50%; top: 0; width: 34px; height: 34px; margin-left: -17px;
  border-radius: 50% 50% 50% 4px; transform: rotate(-45deg); background: var(--grad-cta);
  border: 3px solid #fff; box-shadow: 0 8px 16px -4px rgba(249,115,22,.75);
}
.umk .pin::after { content: ""; position: absolute; inset: 8px; border-radius: 50%; background: #fff; }
@keyframes halo { 0% { transform: scale(.6); opacity: 1; } 100% { transform: scale(2.4); opacity: 0; } }
.pulse-mk { width: 240px; height: 240px; position: relative; pointer-events: none; }
.pulse-mk span { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--accent); background: rgba(249,115,22,.10); animation: ping 2.4s var(--ease) infinite; }
.pulse-mk span:nth-child(2) { animation-delay: 1.2s; }
.leaflet-popup-content-wrapper { border-radius: 18px; box-shadow: var(--shadow-lg); padding: 2px; }
.leaflet-popup-content { margin: 14px 16px; font-family: "Be Vietnam Pro", sans-serif; font-size: 13px; line-height: 1.5; min-width: 190px; }
.pop-head { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.pop-head .avatar { width: 40px; height: 40px; border-radius: 13px; font-size: 13px; }
.pop-head b { font-size: 14.5px; display: block; }
.pop-btn { width: 100%; margin-top: 10px; padding: 9px; }
.leaflet-tooltip { font-family: "Be Vietnam Pro", sans-serif; font-weight: 700; border-radius: 10px; border: 0; box-shadow: var(--shadow); padding: 5px 10px; }

.map-tools { position: fixed; right: 16px; top: calc(var(--top-h) + var(--gap) * 2 + 96px); z-index: 800; }
.map-btn { width: 40px; height: 40px; border-radius: 14px; border: 0; background: #fff; box-shadow: var(--shadow); display: grid; place-items: center; color: var(--text-2); }
.map-btn:hover { color: var(--primary); }
.map-legend {
  position: fixed; left: calc(var(--sheet-w) + var(--gap) * 2); bottom: var(--gap); z-index: 800;
  background: rgba(255,255,255,.92); backdrop-filter: blur(10px); border-radius: 12px;
  padding: 7px 12px; font-size: 12px; font-weight: 600; display: flex; gap: 12px; box-shadow: var(--shadow);
}
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; }
.dot.online { background: var(--green); }
.dot.busy { background: #94a3b8; }
.dot.me { background: var(--accent); }

/* ---------- Modal & toast ---------- */
.modal {
  position: fixed; inset: 0; z-index: 2000; background: rgba(15,23,42,.45); backdrop-filter: blur(4px);
  display: grid; place-items: center; padding: 16px; animation: fadein .25s;
}
@keyframes fadein { from { opacity: 0; } }
.modal-card {
  background: #fff; border-radius: 28px; padding: 26px 22px 20px; width: 100%; max-width: 400px;
  max-height: 90vh; overflow-y: auto; animation: pop .4s var(--ease); text-align: center; box-shadow: var(--shadow-lg);
}
@keyframes pop { from { opacity: 0; transform: scale(.92) translateY(10px); } }
.done-icon {
  width: 72px; height: 72px; border-radius: 50%; margin: 0 auto 12px; display: grid; place-items: center;
  background: linear-gradient(135deg, #059669, #34d399); color: #fff; box-shadow: 0 0 0 10px var(--green-soft);
}
.done-icon svg { width: 36px; height: 36px; stroke-width: 3; }
.invoice { text-align: left; background: var(--bg); border-radius: var(--r); padding: 12px 14px; margin: 16px 0; font-size: 14px; }
.stars { display: flex; justify-content: center; gap: 6px; margin: 4px 0 14px; }
.stars button { border: 0; background: none; padding: 2px; color: #e2e8f0; transition: transform .15s; }
.stars button svg { width: 34px; height: 34px; fill: currentColor; stroke: none; }
.stars button:hover { transform: scale(1.15); }
.stars button.on { color: var(--amber); }
.modal-card textarea {
  width: 100%; border: 1px solid var(--border); border-radius: 14px; padding: 10px 12px; outline: none; resize: none; margin-bottom: 12px;
}
.modal-card textarea:focus { border-color: var(--primary); }
.toast {
  position: fixed; left: 50%; top: calc(var(--top-h) + var(--gap) * 2); transform: translate(-50%, -12px); z-index: 3000;
  background: var(--text); color: #fff; padding: 11px 18px; border-radius: 14px; font-size: 14px; font-weight: 600;
  opacity: 0; pointer-events: none; transition: .3s var(--ease); max-width: calc(100vw - 32px); text-align: center; box-shadow: var(--shadow-lg);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Mobile: bottom sheet ---------- */
@media (max-width: 860px) {
  :root { --gap: 10px; --top-h: 54px; }
  .topbar { gap: 8px; padding: 0 6px 0 8px; border-radius: 18px; }
  .logo { width: 36px; height: 36px; border-radius: 11px; }
  .brand-txt small { display: none; }
  .brand-txt b { font-size: 16px; }
  .tabs { margin: 0 0 0 auto; }
  .tabs button { padding: 7px 9px; font-size: 12.5px; gap: 5px; }
  .hotline span { display: none; }
  .hotline { padding: 9px; }
  .sheet {
    top: auto; left: 0; right: 0; bottom: 0; width: auto; height: 58vh;
    border-radius: 26px 26px 0 0; transition: height .35s var(--ease);
  }
  .sheet.expanded { height: calc(100vh - var(--top-h) - var(--gap) * 2 - 6px); height: calc(100dvh - var(--top-h) - var(--gap) * 2 - 6px); }
  .sheet.collapsed { height: 30vh; }
  .sheet-handle { display: block; flex: none; border: 0; background: none; padding: 10px 0 4px; cursor: grab; }
  .sheet-handle span { display: block; width: 42px; height: 5px; border-radius: 9px; background: #cbd5e1; margin: 0 auto; }
  .panel { padding: 6px 16px 0; }
  .cta-bar { margin: 18px -16px 0; padding: 12px 16px calc(14px + env(safe-area-inset-bottom)); }
  h1 { font-size: 22px; }
  .map-legend { display: none; }
  /* Khung đặt thợ che đáy bản đồ: đưa logo và ghi nguồn bản đồ lên trên để luôn nhìn thấy */
  .leaflet-bottom.leaflet-right { top: calc(var(--top-h) + var(--gap) * 2); bottom: auto; left: 0; right: auto; }
  .leaflet-bottom.leaflet-right .leaflet-control { float: left; clear: both; margin: 0 0 4px 8px; }
  .map-tools { top: calc(var(--top-h) + var(--gap) * 2 + 92px); right: 10px; }
  .leaflet-top.leaflet-right { right: 0; }
  .toast { top: auto; bottom: calc(58vh + 12px); }
}
@media (max-width: 480px) {
  .tabs button span { display: none; }
  .tabs button { padding: 8px 12px; }
  .tabs button svg { width: 19px; height: 19px; }
  .service-grid { gap: 8px; }
  .service { font-size: 11px; padding: 10px 2px 8px; }
  .service .s-ic { width: 38px; height: 38px; }
  /* Thẻ thợ trên màn hình hẹp: 2 hàng — hàng trên thông tin, hàng dưới khoảng cách + trạng thái + nút */
  .tech-card { flex-wrap: wrap; padding: 11px; gap: 9px 10px; }
  .tech-card .avatar { width: 44px; height: 44px; border-radius: 14px; font-size: 14px; }
  .tech-card .grow { flex: 1; min-width: calc(100% - 64px); }
  .tech-card .side { flex: 0 0 100%; flex-direction: row; justify-content: flex-end; align-items: center; gap: 10px; margin-top: 2px; padding-top: 9px; border-top: 1px dashed var(--border); }
  .tech-card .side .dist { margin-right: auto; }
  .side small { font-size: 12px; }
  .list-cap { font-size: 11px; gap: 6px; margin: 14px 2px 4px; }
}

/* ---------- Đăng nhập OTP & phần dùng chung app khách / app thợ ---------- */
.tab-link {
  display: flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 11px;
  font-weight: 600; font-size: 14px; color: var(--muted); white-space: nowrap; text-decoration: none;
}
.tab-link svg { width: 17px; height: 17px; }
.tab-link:hover { color: var(--text); }
.modal-card { position: relative; }
.modal-x {
  position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border-radius: 10px; border: 0;
  background: var(--bg); display: grid; place-items: center; color: var(--muted);
}
.otp-card h2 { margin-bottom: 6px; }
.otp-card .btn-cta { margin-top: 14px; }
.otp-ic {
  width: 64px; height: 64px; border-radius: 20px; margin: 0 auto 14px; display: grid; place-items: center;
  background: var(--primary-soft); color: var(--primary);
}
.otp-ic svg { width: 30px; height: 30px; }
.field.boxed { border: 1.5px solid var(--border); border-radius: 14px; margin-top: 12px; text-align: left; }
.field.boxed:focus-within { border-color: var(--primary); background: #fff; }
.field.boxed + .field.boxed { border-top: 1.5px solid var(--border); border-radius: 14px; }
.otp-input {
  width: 100%; margin-top: 16px; text-align: center; font-size: 30px; font-weight: 800; letter-spacing: .45em;
  padding: 12px 0 12px .45em; border: 1.5px solid var(--border); border-radius: 16px; outline: none; font-variant-numeric: tabular-nums;
}
.otp-input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.dev-code { margin: 12px 0 0; font-size: 12.5px; background: #fffbeb; color: #92400e; border-radius: 10px; padding: 8px 10px; }
.otp-err { color: var(--red); font-size: 13.5px; font-weight: 600; min-height: 1em; margin: 10px 0 0; }
.btn-cta:disabled, .btn-primary:disabled { opacity: .55; cursor: wait; }
.conn-bad { position: fixed; top: calc(var(--top-h) + var(--gap) + 6px); left: 50%; transform: translateX(-50%); z-index: 1200;
  background: #fef2f2; color: #991b1b; font-size: 12.5px; font-weight: 700; padding: 5px 12px; border-radius: 99px; box-shadow: var(--shadow); }
.search-log li .avatar.anon { background: #e2e8f0; color: var(--muted); }
.search-log li .avatar.anon svg { width: 18px; height: 18px; }
.radar.stopped span { animation: none; opacity: 0; }
.radar.stopped b { background: #94a3b8; box-shadow: none; }
.radar.stopped b svg { animation: none; }
@media (max-width: 480px) { .tab-link span { display: none; } .tab-link { padding: 8px 12px; } .tab-link svg { width: 19px; height: 19px; } }

/* ---------- App thợ ---------- */
.logo.dark { box-shadow: 0 6px 14px -4px rgba(15,23,42,.5); }
button.hotline { border: 0; cursor: pointer; font: inherit; font-weight: 700; font-size: 14px; }
.benefits { list-style: none; padding: 0; margin: 16px 0 20px; display: flex; flex-direction: column; gap: 10px; }
.benefits li { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--text-2); }
.benefits svg { width: 20px; height: 20px; color: var(--primary); padding: 7px; box-sizing: content-box; background: var(--primary-soft); border-radius: 10px; }
.setup { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.setup-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: #fffbeb; color: #92400e; font-size: 13px; }
.setup-item svg { width: 20px; height: 20px; }
.setup-item .grow b { display: block; font-size: 13.5px; }
.setup-item button { border: 0; background: #92400e; color: #fff; font-weight: 700; border-radius: 10px; padding: 7px 11px; font-size: 12.5px; white-space: nowrap; }
.setup-item.info { background: var(--primary-soft); color: var(--primary-dark); }
.setup-item.info button { background: var(--primary); }
.money-field input { font-size: 22px; font-weight: 800; text-align: right; }
.money-field span { font-weight: 800; color: var(--muted); }
.cust-row { display: flex; align-items: center; gap: 10px; margin: 10px 0; padding: 10px 12px; border-radius: 14px; background: var(--bg); }
.cust-row .avatar { width: 40px; height: 40px; border-radius: 13px; font-size: 13px; background: var(--text-2); }
.cust-row b { display: block; }
.nav-links { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.nav-links a { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--primary); text-decoration: none; background: var(--primary-soft); padding: 7px 11px; border-radius: 10px; }
.nav-links svg { width: 15px; height: 15px; }
.gps-line { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 10px; font-size: 12.5px; color: var(--muted); }
.gps-line svg { width: 14px; height: 14px; }
.gps-line.warn { color: #b45309; }
.job-steps { display: flex; gap: 4px; margin: 10px 0 4px; }
.job-steps span { flex: 1; height: 5px; border-radius: 9px; background: var(--border); }
.job-steps span.on { background: var(--green); }
.job-card .chat { margin: 12px 0 0; }
.job-card .chat-msgs { height: 160px; }
.big-step { width: 100%; margin-top: 12px; }

.map-info { width: 22px; height: 22px; padding: 0; border: 0; border-radius: 50%; background: rgba(255,255,255,.85); color: #475569; font: italic 700 13px/22px Georgia, serif; text-align: center; cursor: pointer; box-shadow: 0 1px 3px rgba(15,23,42,.25); }
