/* ============ Plot Map — shared theme (mobile first) ============ */
:root {
  --brand: #f5b301;
  --accent: #22c55e;
  --bg: #060a17;
  --bg2: #0b1226;
  --card: #0f1830;
  --card2: #142040;
  --line: rgba(148, 163, 184, .15);
  --line2: rgba(148, 163, 184, .28);
  --text: #eef2f8;
  --muted: #8b9ab5;
  --green: #16a34a;
  --indigo: #3b4cca;
  --radius: 16px;
  --top: 60px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.45 var(--font); }
body.fullscreen { height: 100%; overflow: hidden; overscroll-behavior: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.ico { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ico.fill { fill: currentColor; stroke: none; }
.caps { font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

/* ---------- buttons & inputs ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: 12px;
  border: 1px solid var(--line2); background: var(--card2); font-weight: 700; text-decoration: none; white-space: nowrap; transition: transform .1s, filter .15s, background .15s; }
.btn:hover { filter: brightness(1.12); }
.btn:active { transform: scale(.98); }
.btn.sm { height: 36px; padding: 0 12px; border-radius: 10px; font-size: 14px; }
.btn.xs { height: 30px; padding: 0 10px; border-radius: 8px; font-size: 13px; }
.btn.primary { background: var(--brand); color: #111; border-color: transparent; }
.btn.green { background: linear-gradient(180deg, #22c55e, #16a34a); color: #fff; border-color: transparent; box-shadow: 0 8px 24px -10px rgba(34,197,94,.7); }
.btn.indigo { background: linear-gradient(180deg, #2e3a8c, #253079); color: #c7d2fe; border-color: rgba(129,140,248,.45); }
.btn.danger { background: rgba(239,68,68,.12); color: #fca5a5; border-color: rgba(239,68,68,.4); }
.btn.ghost { background: transparent; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; display: inline-grid; place-items: center; background: rgba(20, 32, 64, .7);
  border: 1px solid var(--line); text-decoration: none; flex: none; }
.icon-btn:hover { background: var(--card2); }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > span { font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: .04em; }
.input, .field input, .field select, .field textarea { width: 100%; min-height: 44px; padding: 10px 12px; border-radius: 12px; background: var(--bg2);
  border: 1px solid var(--line2); outline: none; color: var(--text); }
.field textarea { min-height: 80px; resize: vertical; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 25%, transparent); }
.row { display: flex; gap: 10px; align-items: center; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.check { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--brand); }

/* ---------- status pills ---------- */
.pill { display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px; border-radius: 999px; font-size: 12px; font-weight: 800;
  letter-spacing: .12em; text-transform: uppercase; border: 1.5px solid currentColor; }
.pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.pill.available { color: #4ade80; background: rgba(22,163,74,.14); }
.pill.booked { color: #fb923c; background: rgba(249,115,22,.14); }
.pill.hold { color: #60a5fa; background: rgba(37,99,235,.14); }
.pill.sold { color: #f87171; background: rgba(220,38,38,.14); }
.dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; flex: none; }

/* ---------- toasts ---------- */
#toasts { position: fixed; z-index: 1000; left: 50%; bottom: calc(96px + var(--safe-b)); transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: #0f1830; border: 1px solid var(--line2); padding: 10px 16px; border-radius: 12px; font-weight: 600; box-shadow: 0 10px 30px rgba(0,0,0,.4); animation: tin .2s ease-out; }
.toast.ok { border-color: rgba(34,197,94,.5); }
.toast.err { border-color: rgba(239,68,68,.6); color: #fecaca; }
.toast.out { opacity: 0; transition: opacity .3s; }
@keyframes tin { from { transform: translateY(10px); opacity: 0; } }

/* ============ MAP (shared by viewer, client panel, editor) ============ */
.map-svg { width: 100%; height: 100%; display: block; touch-action: none; user-select: none; -webkit-user-select: none; cursor: grab; }
.map-svg.panning { cursor: grabbing; }
.plot { cursor: pointer; }
.plot .plot-shape { fill-opacity: .86; stroke: rgba(15,23,42,.45); stroke-width: .9; vector-effect: non-scaling-stroke; transition: fill .35s, fill-opacity .35s, opacity .35s; }
.plot .plot-base { pointer-events: none; }
.has-bg .plot .plot-shape { fill-opacity: .55; }
.plot:hover .plot-shape { fill-opacity: .96; stroke: #fff; stroke-width: 1.8; }
.plot .plot-no { fill: #fff; font-weight: 800; text-anchor: middle; dominant-baseline: central; pointer-events: none;
  paint-order: stroke; stroke: rgba(0,0,0,.55); stroke-width: .18em; stroke-linejoin: round; font-family: var(--font); }
.plot.dim { opacity: .12; }
.plot.muted .plot-shape { fill: #334155; fill-opacity: .62; stroke: rgba(15,23,42,.4); }
.plot.muted .plot-no { opacity: .35; }
.plot.hi .plot-shape { fill-opacity: .95; stroke: rgba(255,255,255,.9); stroke-width: 1.4; animation: hi-pop .9s ease-out; }
@keyframes hi-pop { 0% { fill-opacity: .4; stroke-width: 5; } 100% { fill-opacity: .95; stroke-width: 1.4; } }
.plot.selected .plot-shape { fill-opacity: 1; }
.sel-fx { pointer-events: none; }
.sel-fx .plot-glow { fill: rgba(255,255,255,.22); stroke: rgba(253,224,71,.55); stroke-width: 10; stroke-linejoin: round; vector-effect: non-scaling-stroke; animation: glow 1.6s ease-in-out infinite; }
.sel-fx .ants-bg { fill: none; stroke: #0f172a; stroke-width: 2.6; vector-effect: non-scaling-stroke; }
.sel-fx .ants { fill: none; stroke: #fff; stroke-width: 2.6; stroke-dasharray: 6 5; vector-effect: non-scaling-stroke; animation: ants .55s linear infinite; }
.sel-fx .block-fill { fill: rgba(255,255,255,.07); }
.sel-fx .block-ants-bg { fill: none; stroke: rgba(15,23,42,.7); stroke-width: 1.6; vector-effect: non-scaling-stroke; }
.sel-fx .block-ants { fill: none; stroke: rgba(255,255,255,.95); stroke-width: 1.6; stroke-dasharray: 4 4; vector-effect: non-scaling-stroke; animation: ants 1.1s linear infinite; }
@keyframes ants { to { stroke-dashoffset: -22; } }
@keyframes glow { 50% { stroke: rgba(253,224,71,.15); fill: rgba(255,255,255,.1); } }
.plot.flash .plot-shape { animation: flash 0.9s ease-in-out 3; }
@keyframes flash { 50% { fill-opacity: 1; stroke: #fde047; stroke-width: 6; } }
.road-label, .amenity-label, .label-text { fill: #fff; font-weight: 800; text-anchor: middle; dominant-baseline: central; pointer-events: none;
  paint-order: stroke; stroke: rgba(0,0,0,.7); stroke-width: .22em; stroke-linejoin: round; letter-spacing: .04em; font-family: var(--font); }
.road-label { text-transform: uppercase; fill: #fef3c7; }
.label-text { stroke: none; }

/* ============ VIEWER ============ */
.v-top { position: fixed; z-index: 30; inset: 0 0 auto 0; height: var(--top); display: flex; align-items: center; gap: 10px; padding: 0 12px;
  background: linear-gradient(180deg, rgba(6,10,23,.96), rgba(6,10,23,.82)); border-bottom: 1px solid var(--line); backdrop-filter: blur(10px); }
.v-brand { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 0 1 auto; }
.v-logo { width: 38px; height: 38px; border-radius: 50%; flex: none; object-fit: cover; background: var(--card2); border: 2px solid var(--brand);
  display: grid; place-items: center; font-weight: 900; font-size: 13px; color: var(--brand); overflow: hidden; }
.v-logo img { width: 100%; height: 100%; object-fit: cover; }
.v-name { font-weight: 900; font-size: 13px; letter-spacing: .03em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v-loc { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v-search { flex: 1; display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border-radius: 12px; min-width: 0;
  background: rgba(20, 32, 64, .7); border: 1px solid var(--line); max-width: 380px; margin: 0 auto; }
.v-search:focus-within { border-color: var(--brand); }
.v-search input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; font-size: 16px; }
.v-actions { display: flex; gap: 8px; }
.v-wa { background: linear-gradient(180deg, #22c55e, #16a34a); border-color: transparent; color: #fff; }
.v-stage { position: fixed; inset: var(--top) 0 0 0; overflow: hidden; background: radial-gradient(ellipse at 50% 40%, #10193a, var(--bg) 70%); }
.v-tilt { position: absolute; inset: 0; transform-origin: 50% 50%; will-change: transform; }
.v-tilt.anim { transition: transform .65s cubic-bezier(.2,.8,.2,1); }
.v-tilt.over { inset: -70%; }
.rot-pair { display: flex; gap: 6px; margin-left: 3px; }
.rot-pair .round.sm { margin-left: 0; }
.round svg#needle { transition: transform .2s; }
.v-ctrls { position: absolute; z-index: 5; left: 12px; top: 12px; display: flex; flex-direction: column; gap: 10px; }
.round { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: rgba(11, 18, 38, .88);
  border: 1px solid var(--line2); font-weight: 900; font-size: 13px; box-shadow: 0 6px 18px rgba(0,0,0,.35); }
.round.sm { width: 40px; height: 40px; margin-left: 3px; font-size: 20px; }
.round.on { background: var(--brand); color: #111; border-color: transparent; }
.round svg { width: 30px; height: 30px; }

.v-legend { position: absolute; z-index: 5; left: 12px; bottom: calc(12px + var(--safe-b)); display: flex; gap: 6px; flex-wrap: wrap; max-width: calc(100% - 24px); }
.chip { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line2);
  background: rgba(11, 18, 38, .9); font-size: 13px; font-weight: 700; white-space: nowrap; box-shadow: 0 4px 14px rgba(0,0,0,.3); }
.chip b { font-variant-numeric: tabular-nums; }
.chip.off { opacity: .4; }
.chip .dot { border-radius: 50%; }

/* plot sheet — bottom sheet on mobile, side panel on desktop (like the reference) */
.backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(3, 6, 15, .3); opacity: 0; pointer-events: none; transition: opacity .25s; }
.backdrop.show { opacity: 1; pointer-events: auto; }
.sheet { position: fixed; z-index: 50; left: 0; right: 0; bottom: 0; max-height: 66vh; overflow-y: auto; overscroll-behavior: contain;
  background: linear-gradient(180deg, #0e1733, #0a1128); border-top: 3px solid var(--brand); border-radius: 22px 22px 0 0;
  padding: 10px 20px calc(20px + var(--safe-b)); transform: translateY(105%); transition: transform .35s cubic-bezier(.2,.8,.2,1);
  box-shadow: 0 -20px 50px rgba(0,0,0,.5); }
.sheet.open { transform: none; }
.sheet-grab { width: 44px; height: 5px; border-radius: 3px; background: var(--line2); margin: 0 auto 12px; }
.sheet-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.sheet-close { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line2); background: rgba(255,255,255,.03); display: grid; place-items: center; flex: none; }
.plot-title { font-size: 34px; font-weight: 900; letter-spacing: -.02em; margin: 12px 0 2px; line-height: 1.05; }
.plot-loc { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.diagram-card { margin: 16px 0 6px; border: 1px solid var(--line2); border-radius: 18px; background: radial-gradient(ellipse at 50% 30%, #13204a, #0b1430); padding: 8px; }
.diagram { width: 100%; height: auto; display: block; }
.dg-no { font-weight: 900; text-anchor: middle; dominant-baseline: central; font-family: var(--font); }
.dg-label { fill: var(--muted); font-size: 11px; text-anchor: middle; font-family: var(--font); font-weight: 600; }
.dg-label.strong { fill: var(--text); font-weight: 800; }
.dg-road { fill: #cbd5e1; font-size: 9.5px; font-weight: 800; letter-spacing: .14em; text-anchor: middle; dominant-baseline: central; font-family: var(--font);
  paint-order: stroke; stroke: #252c3b; stroke-width: 6px; }
.dg-dim line { stroke: var(--muted); stroke-width: 1.2; }
.spec { list-style: none; margin: 4px 0 18px; padding: 0; }
.spec li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.spec li span { font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.spec li b { font-size: 17px; font-weight: 800; text-align: right; font-variant-numeric: tabular-nums; }
.spec li.price b { color: var(--brand); font-size: 20px; }
.note { padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--brand) 10%, transparent); border: 1px solid color-mix(in srgb, var(--brand) 35%, transparent); margin-bottom: 16px; font-size: 14px; }
.cta { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cta .btn { height: 54px; border-radius: 16px; font-size: 17px; font-weight: 800; }
.sold-banner { text-align: center; padding: 12px; border-radius: 14px; margin-bottom: 12px; font-weight: 700; background: rgba(239,68,68,.1); color: #fca5a5; border: 1px solid rgba(239,68,68,.3); font-size: 14px; }
.share-row { display: flex; justify-content: center; margin-top: 12px; }

.v-list { position: fixed; z-index: 50; inset: auto 0 0 0; height: 78vh; display: flex; flex-direction: column; background: #0a1128;
  border-top: 3px solid var(--brand); border-radius: 22px 22px 0 0; transform: translateY(105%); transition: transform .35s cubic-bezier(.2,.8,.2,1); }
.v-list.open { transform: none; }
.v-list-head { padding: 10px 16px 12px; border-bottom: 1px solid var(--line); }
.v-list-filters { display: flex; gap: 6px; overflow-x: auto; margin-top: 10px; scrollbar-width: none; }
.v-list-filters .chip { box-shadow: none; cursor: pointer; }
.v-list-filters .chip.active { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 18%, #0b1226); }
.v-list-body { overflow-y: auto; padding: 10px 12px calc(16px + var(--safe-b)); display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; align-content: start; }
.tile { border: 1px solid var(--line); border-left: 4px solid var(--c); border-radius: 12px; padding: 10px; background: var(--card); text-align: left; }
.tile b { display: block; font-size: 18px; font-weight: 900; }
.tile small { color: var(--muted); font-size: 12px; }
.tile i { display: block; font-style: normal; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--c); margin-top: 3px; }

.v-loading { position: fixed; inset: 0; display: grid; place-items: center; z-index: 100; background: var(--bg); transition: opacity .3s; }
.v-loading.done { opacity: 0; pointer-events: none; visibility: hidden; transition: opacity .3s, visibility 0s .3s; }
.spinner { width: 38px; height: 38px; border-radius: 50%; border: 3px solid var(--line2); border-top-color: var(--brand); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.tip { position: fixed; z-index: 60; pointer-events: none; padding: 7px 10px; border-radius: 10px; background: rgba(2,6,23,.95); border: 1px solid var(--line2); font-size: 13px; opacity: 0; transition: opacity .12s; white-space: nowrap; }
.tip.show { opacity: 1; }

@media (min-width: 900px) {
  .sheet { left: 0; top: 0; right: auto; bottom: 0; width: 420px; max-height: none; border-radius: 0; border-top: 3px solid var(--brand);
    padding: 22px 30px 30px; transform: translateX(-105%); }
  .sheet-grab { display: none; }
  .v-legend, .v-ctrls { transition: left .35s cubic-bezier(.2,.8,.2,1); }
  body.sheet-open .v-legend, body.sheet-open .v-ctrls { left: 432px; }
  .plot-title { font-size: 42px; }
  .v-list { left: auto; top: var(--top); height: auto; width: 380px; border-radius: 0; border-top: 0; border-left: 1px solid var(--line); transform: translateX(105%); }
}
@media (max-width: 640px) {
  .v-name-wrap, .v-wa span { display: none; }
  .v-wa { width: 40px; padding: 0; }
  .round { width: 42px; height: 42px; }
}

/* ============ ADMIN SHELL ============ */
.a-top { position: sticky; top: 0; z-index: 30; height: 60px; display: flex; align-items: center; gap: 12px; padding: 0 16px;
  background: rgba(6,10,23,.92); border-bottom: 1px solid var(--line); backdrop-filter: blur(10px); }
.a-top .title { font-weight: 900; letter-spacing: .02em; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.a-main { max-width: 1180px; margin: 0 auto; padding: 20px 16px 80px; }
.a-h1 { font-size: 26px; font-weight: 900; margin: 6px 0 4px; letter-spacing: -.01em; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; margin-top: 18px; }
.pcard { display: flex; flex-direction: column; gap: 12px; }
.pcard-head { display: flex; gap: 12px; align-items: center; }
.pcard-logo { width: 46px; height: 46px; border-radius: 12px; background: var(--card2); border: 2px solid var(--b, var(--brand)); display: grid; place-items: center; font-weight: 900; color: var(--b, var(--brand)); overflow: hidden; flex: none; }
.pcard-logo img { width: 100%; height: 100%; object-fit: cover; }
.bar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: var(--bg2); }
.bar i { display: block; height: 100%; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.stat { background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 8px; text-align: center; }
.stat b { display: block; font-size: 20px; font-weight: 900; font-variant-numeric: tabular-nums; }
.stat small { font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin: 18px 0; overflow-x: auto; scrollbar-width: none; }
.tab { padding: 12px 14px; border: 0; background: none; color: var(--muted); font-weight: 800; border-bottom: 2px solid transparent; white-space: nowrap; }
.tab.active { color: var(--text); border-color: var(--brand); }
.table { width: 100%; border-collapse: collapse; }
.table td, .table th { padding: 11px 8px; border-bottom: 1px solid var(--line); text-align: left; font-size: 14px; }
.table th { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.modal-bg { position: fixed; inset: 0; z-index: 200; background: rgba(2,4,12,.7); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 16px; }
.modal { width: min(480px, 100%); max-height: 90vh; overflow-y: auto; background: var(--card); border: 1px solid var(--line2); border-radius: 20px; padding: 22px; }
.modal h3 { margin: 0 0 16px; font-size: 20px; }
.upload { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1.5px dashed var(--line2); border-radius: 14px; cursor: pointer; }
.upload:hover { border-color: var(--brand); }
.upload img { width: 54px; height: 54px; object-fit: cover; border-radius: 10px; background: var(--bg2); }
.empty { text-align: center; padding: 50px 20px; color: var(--muted); }
.copy { display: flex; gap: 6px; }
.copy input { flex: 1; min-width: 0; height: 36px; border-radius: 10px; background: var(--bg2); border: 1px solid var(--line); padding: 0 10px; color: var(--muted); font-size: 13px; }

/* ============ LOGIN ============ */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: radial-gradient(ellipse at 50% 0%, #142050, var(--bg) 60%); }
.login { width: min(400px, 100%); }
.login .v-logo { width: 64px; height: 64px; font-size: 20px; margin: 0 auto 14px; }
.login h1 { text-align: center; font-size: 24px; margin: 0 0 4px; }
.login p.sub { text-align: center; margin: 0 0 22px; color: var(--muted); }
.err { color: #fca5a5; font-size: 14px; min-height: 20px; margin-bottom: 8px; }

/* ============ CLIENT PANEL ============ */
.c-body { padding-bottom: calc(80px + var(--safe-b)); }
.c-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.c-stat { border-radius: 16px; padding: 14px; border: 1px solid var(--line); background: var(--card); position: relative; overflow: hidden; text-align: left; }
.c-stat::after { content: ""; position: absolute; inset: auto 0 0 0; height: 3px; background: var(--c); }
.c-stat b { display: block; font-size: 30px; font-weight: 900; line-height: 1.1; font-variant-numeric: tabular-nums; }
.c-stat span { font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--c); }
.c-stat.active { border-color: var(--c); background: color-mix(in srgb, var(--c) 10%, var(--card)); }
.c-tabs { position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: 1fr 1fr 1fr; background: rgba(6,10,23,.96);
  border-top: 1px solid var(--line); padding-bottom: var(--safe-b); backdrop-filter: blur(10px); }
.c-tabs button { height: 62px; border: 0; background: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--muted); font-size: 12px; font-weight: 700; }
.c-tabs button.active { color: var(--brand); }
.c-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.c-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--c); text-align: left; width: 100%; }
.c-row .no { font-size: 20px; font-weight: 900; min-width: 52px; }
.c-row .meta { flex: 1; min-width: 0; font-size: 13px; color: var(--muted); }
.c-map { position: fixed; inset: 60px 0 calc(62px + var(--safe-b)) 0; }
.status-picker { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 16px 0; }
.status-opt { height: 64px; border-radius: 16px; border: 2px solid var(--line2); background: var(--card); display: flex; align-items: center; justify-content: center; gap: 10px; font-weight: 800; font-size: 16px; }
.status-opt .dot { width: 14px; height: 14px; border-radius: 50%; }
.status-opt.active { border-color: var(--c); background: color-mix(in srgb, var(--c) 16%, var(--card)); color: #fff; }
.feed { display: flex; flex-direction: column; gap: 8px; }
.feed-item { display: flex; gap: 10px; align-items: center; padding: 12px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); font-size: 14px; }
.feed-item time { color: var(--muted); font-size: 12px; margin-left: auto; white-space: nowrap; }
@media (min-width: 720px) { .c-stats { grid-template-columns: repeat(4, 1fr); } }

/* ============ EDITOR ============ */
.ed { position: fixed; inset: 0; display: grid; grid-template-rows: 56px 1fr; grid-template-columns: 64px 1fr 320px; }
.ed-top { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; padding: 0 12px; border-bottom: 1px solid var(--line); background: var(--bg2); }
.ed-top .title { font-weight: 900; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ed-tools { display: flex; flex-direction: column; gap: 6px; padding: 10px 8px; border-right: 1px solid var(--line); background: var(--bg2); overflow-y: auto; }
.tool { width: 48px; height: 48px; border-radius: 12px; border: 1px solid transparent; background: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--muted); font-size: 9.5px; font-weight: 800; letter-spacing: .03em; }
.tool:hover { background: var(--card); color: var(--text); }
.tool.active { background: color-mix(in srgb, var(--brand) 18%, transparent); color: var(--brand); border-color: color-mix(in srgb, var(--brand) 50%, transparent); }
.tool .ico { width: 22px; height: 22px; }
.tool-sep { height: 1px; background: var(--line); margin: 4px 0; }
.ed-canvas { position: relative; overflow: hidden; background: #050812; }
.ed-canvas .map-svg { cursor: default; }
.ed-canvas.tool-pan .map-svg, .ed-canvas.space .map-svg { cursor: grab; }
.ed-canvas.drawing .map-svg { cursor: crosshair; }
.ed-hint { position: absolute; left: 50%; top: 12px; transform: translateX(-50%); z-index: 5; padding: 8px 14px; border-radius: 999px; background: rgba(2,6,23,.88); border: 1px solid var(--line2); font-size: 13px; pointer-events: none; white-space: nowrap; max-width: calc(100% - 24px); overflow: hidden; text-overflow: ellipsis; }
.ed-zoom { position: absolute; right: 12px; bottom: 12px; display: flex; gap: 6px; z-index: 5; }
.ed-side { border-left: 1px solid var(--line); background: var(--bg2); overflow-y: auto; padding: 16px; }
.ed-side h4 { margin: 0 0 12px; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.ed-side .field { margin-bottom: 10px; }
.ed-side .field input, .ed-side .field select { min-height: 38px; padding: 7px 10px; border-radius: 10px; }
.sel-box { fill: color-mix(in srgb, var(--brand) 8%, transparent); stroke: var(--brand); stroke-dasharray: 6 4; vector-effect: non-scaling-stroke; pointer-events: none; }
.ed-el { cursor: move; }
.ed-sel-outline { fill: none; stroke: #38bdf8; stroke-width: 2.5; vector-effect: non-scaling-stroke; pointer-events: none; }
.handle { fill: #fff; stroke: #0284c7; stroke-width: 2; vector-effect: non-scaling-stroke; cursor: pointer; }
.handle:hover { fill: #38bdf8; }
.draft { fill: color-mix(in srgb, var(--brand) 25%, transparent); stroke: var(--brand); stroke-width: 2; vector-effect: non-scaling-stroke; pointer-events: none; }
.draft-pt { fill: var(--brand); pointer-events: none; }
.amenity, .road, .free-label { cursor: inherit; }
.ed-canvas .road path, .ed-canvas .amenity path { pointer-events: all; }
.ed-canvas .free-label { pointer-events: all; }
.ed-canvas .free-label * { pointer-events: all; }
.ed-canvas .layer-labels .road-label, .ed-canvas .layer-labels .amenity-label { pointer-events: none; }
.kbd { display: inline-block; padding: 1px 6px; border-radius: 5px; border: 1px solid var(--line2); font-size: 11px; color: var(--muted); }
.legend-mini { display: flex; flex-wrap: wrap; gap: 6px; }
.save-state { font-size: 12px; color: var(--muted); white-space: nowrap; }
.save-state.dirty { color: #fbbf24; }
@media (max-width: 900px) {
  .ed { grid-template-columns: 56px 1fr; grid-template-rows: 56px 1fr auto; }
  .ed-side { grid-column: 1 / -1; max-height: 40vh; border-left: 0; border-top: 1px solid var(--line); }
  .tool { width: 42px; height: 44px; }
}
.ed-canvas .road path, .ed-canvas .amenity path { stroke: rgba(56,189,248,.65); stroke-width: 1.5; stroke-dasharray: 6 4; vector-effect: non-scaling-stroke; }
.decor { pointer-events: none; }
.ed-canvas .decor { pointer-events: all; cursor: move; }
.palette { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 12px; }
.palette button { height: 62px; border-radius: 12px; border: 1px solid var(--line2); background: var(--card); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 11px; font-weight: 700; }
.palette button span { font-size: 22px; }
.palette button.active { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 16%, var(--card)); }
.card-text { fill: #f8fafc; font-weight: 700; dominant-baseline: central; font-family: var(--font); letter-spacing: .02em; }
.compass-text { font-weight: 900; dominant-baseline: central; text-anchor: middle; letter-spacing: .14em; font-family: var(--font); }
.map-card, .compass-card { pointer-events: none; }
.v-stage:has(.v-tilt.over) { background: radial-gradient(ellipse at 50% 55%, #111a2e 0%, #070b16 55%, #03050a 100%); }
.compass-letter { fill: #fff; font-weight: 900; text-anchor: middle; dominant-baseline: central; font-family: var(--font); }
.compass-text { text-anchor: middle; }
.chip { transition: background .25s, box-shadow .25s, opacity .25s, transform .15s; cursor: pointer; }
.chip:active { transform: scale(.96); }
.chip.active { background: var(--c); border-color: transparent; color: #fff; box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 35%, transparent), 0 8px 22px -6px var(--c); }
.chip.active .dot { background: #fff !important; }
.chip.faded { opacity: .55; }
.chip.all { background: #f8fafc; color: #0f172a; border-color: transparent; }
/* natural (photo-like) plot view: grass plots with soil borders */
.map-svg.natural .plot .plot-shape { fill-opacity: 0; stroke: #c9805a; stroke-width: 2.6; }
.map-svg.natural .plot .plot-no { fill: #f8fafc; stroke: rgba(30,20,10,.55); }
.map-svg.natural .plot .plot-no { font-style: italic; }
.map-svg.natural .plot.selected .plot-shape { fill: #4ade80; fill-opacity: .85; }
.chip.toggle { gap: 8px; }
.chip.toggle .sw { width: 30px; height: 18px; border-radius: 9px; background: #334155; position: relative; transition: background .2s; flex: none; }
.chip.toggle .sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #f8fafc; transition: transform .2s; }
.chip.toggle.on .sw { background: #10b981; }
.chip.toggle.on .sw::after { transform: translateX(12px); }
/* 3D: plot numbers float above the board as upright badges */
.pins { position: absolute; inset: 0; pointer-events: none; z-index: 4; opacity: 0; transition: opacity .3s; }
.pins.show { opacity: 1; }
.pin { position: absolute; left: 0; top: 0; pointer-events: auto; transform-origin: 50% 100%; min-width: 30px; height: 22px; padding: 0 7px;
  border-radius: 7px; border: 2px solid var(--c); background: rgba(8,12,24,.92); color: #fff; font: 800 12px/18px var(--font);
  box-shadow: 0 4px 10px rgba(0,0,0,.45); cursor: pointer; white-space: nowrap; margin-top: -7px; transition: opacity .25s; }
.pin::after { content: ""; position: absolute; left: 50%; bottom: -7px; width: 2px; height: 6px; margin-left: -1px; background: var(--c); border-radius: 1px; }
.pin:hover, .pin.sel { background: var(--c); }
.pin.sel { box-shadow: 0 0 0 3px rgba(255,255,255,.75), 0 6px 16px rgba(0,0,0,.5); }
.pin.muted { opacity: .25; }
.map-svg .scene-far { transition: opacity .45s; }
.map-svg .scene-board-shadow { opacity: 0; transition: opacity .45s; }
.map-svg.pins-on .scene-far { opacity: 0; pointer-events: none; }
.map-svg.pins-on .scene-board-shadow { opacity: 1; }
.map-svg.pins-on .plot.pinned .plot-no { opacity: 0; }
.map-svg.pins-on .plot .plot-no { opacity: 1; }

/* True 3D buyer view: WebGL owns animation, SVG is only mounted for the flat map. */
.world3d { position: absolute; inset: 0; background: #c4d0cc; }
.world3d canvas { display: block; width: 100%; height: 100%; touch-action: none; outline-offset: -3px; }
.world3d[hidden], .v-tilt[hidden] { display: none !important; }
.scene-hint { position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); padding: 9px 16px; border: 1px solid #ffffff40; border-radius: 24px; background: #152a24d9; color: #e6e8d8; font-size: 11px; letter-spacing: .02em; pointer-events: none; white-space: nowrap; }
.scene-hint span { margin: 0 8px; opacity: .5; }
@media (max-width: 900px) { .scene-hint { bottom: 72px; font-size: 10px; padding: 7px 12px; } }
.round:disabled { opacity: .35; cursor: default; }

.scene-hint { top: 18px; bottom: auto; left: auto; right: 18px; transform: none; }
@media (max-width: 900px) { .scene-hint { top: 12px; bottom: auto; right: 12px; font-size: 9px; } }

/* Reusable venture assets: pointer drag/drop and touch click-to-place. */
.asset-library { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.asset-card { display:flex; flex-direction:column; align-items:center; gap:5px; padding:10px 6px; min-width:0; border:1px solid var(--line); border-radius:10px; background:var(--panel,#172033); color:inherit; cursor:grab; }
.asset-card.active { border-color:var(--brand,#f5b301); box-shadow:0 0 0 1px var(--brand,#f5b301); }
.asset-card img { width:100%; aspect-ratio:1; object-fit:contain; border-radius:6px; background:#e6e9e2; }
.asset-card strong { font-size:12px; text-align:center; }
.asset-card small { font-size:10px; opacity:.65; }
.asset-icon { font-size:30px; line-height:1.8; }
.asset-card:focus-visible { outline:2px solid var(--brand,#f5b301); outline-offset:2px; }

.asset-card { touch-action:none; user-select:none; }

/* ===== hover card (buyer map) ===== */
.tip.hovercard { white-space: normal; min-width: 230px; max-width: 300px; padding: 14px 18px 15px; border-radius: 18px; background: rgba(9,14,28,.96);
  border: 1.5px solid var(--c); box-shadow: 0 18px 40px -12px rgba(0,0,0,.65), 0 0 0 4px color-mix(in srgb, var(--c) 14%, transparent); backdrop-filter: blur(8px);
  transform: translateY(4px) scale(.98); transition: opacity .14s, transform .14s; }
.tip.hovercard.show { transform: none; }
.hc-top { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.hc-pill { background: var(--c); color: #fff; font-size: 11.5px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; padding: 5px 12px; border-radius: 9px; }
.hc-no { color: #aab4c6; font-weight: 700; font-size: 15px; }
.hc-area { font-size: 22px; font-weight: 900; letter-spacing: -.01em; color: #fff; line-height: 1.15; }
.hc-area small { font-size: 15px; font-weight: 800; color: #e2e8f0; }
.hc-sub { margin-top: 4px; color: #8f9bb0; font-size: 13.5px; font-weight: 600; }
/* 2D hover highlight: brighter plot with a white dashed selector */
.plot.hover .plot-shape { fill-opacity: 1; stroke: #fff; stroke-width: 2.2; stroke-dasharray: 6 4; filter: brightness(1.18); }
.map-svg.natural .plot.hover .plot-shape { fill: #4ade80; fill-opacity: .85; }
/* decent, smaller plot numbers */
.plot .plot-no { font-weight: 700; font-style: italic; fill: rgba(255,255,255,.94); stroke: rgba(15,23,42,.45); stroke-width: .12em; letter-spacing: .01em; }
.ed-canvas.tool-erase .map-svg { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='26' viewBox='0 0 24 24' fill='%23fff' stroke='%23e11d48' stroke-width='1.8' stroke-linejoin='round'%3E%3Cpath d='M5.5 14.5l7-7a2.1 2.1 0 0 1 3 0l3 3a2.1 2.1 0 0 1 0 3l-6.5 6.5H9z'/%3E%3C/svg%3E") 6 20, crosshair; }
.ed-canvas.tool-erase .map-svg [data-id]:hover path, .ed-canvas.tool-erase .map-svg [data-id]:hover rect { outline: none; filter: brightness(.7) sepia(1) hue-rotate(-50deg) saturate(4); }

.loading-card { display:flex; flex-direction:column; align-items:center; gap:18px; text-align:center; padding:28px; max-width:420px; }
.loading-card h2 { font-size:21px; margin:0; }
.loading-card p { color:var(--muted); line-height:1.5; margin:0; }
.loading-slow { font-size:12px; animation:loading-hint 12s forwards; }
@keyframes loading-hint { 0%,90% {opacity:0} 100% {opacity:1} }
.asset-loading { position:absolute; top:12px; left:50%; transform:translateX(-50%); z-index:12; padding:9px 14px; border-radius:20px; background:#13221ee8; color:#fff; font-size:12px; white-space:nowrap; pointer-events:none; }
.asset-loading[hidden] { display:none; }
@media (prefers-reduced-motion:reduce) { .spinner { animation-duration:2s; } }
