/* Bhoomi Desk — phone first (390 px), widened for desktop at the bottom.
   Look: soft grey canvas, white rounded sheets, one land-green brand colour,
   site-plan status colours (green available, amber booked, red sold, grey hold). */
:root {
  --bg: #edf0f3; --card: #fff; --ink: #141920; --ink2: #39414c; --mute: #6c7581; --faint: #9aa2ad;
  --line: #e5e9ee; --line2: #d6dce3; --field: #f4f6f8;
  --brand: #145c45; --brand-d: #0d4334; --brand-soft: #e2efe9; --brand-ink: #0f4a37;
  --avail: #2b8a55; --avail-bg: #d6eedd; --booked: #b96d0c; --booked-bg: #fae0b6; --sold: #b8392a; --sold-bg: #f5cdc7; --hold: #66707c; --hold-bg: #e1e5ea;
  --red: #c4362c; --red-bg: #fbe6e3; --amber: #a86300; --amber-bg: #fdf0d9; --green: #1d8048; --green-bg: #e1f3e8; --wa: #1fa855;
  --r: 22px; --r-md: 16px; --r-sm: 12px;
  --sh: 0 1px 1px rgba(18, 28, 40, .04), 0 8px 22px -12px rgba(18, 28, 40, .16);
  --sh-md: 0 1px 2px rgba(18, 28, 40, .05), 0 14px 30px -14px rgba(18, 28, 40, .22);
  --sh-lg: 0 2px 6px rgba(18, 28, 40, .06), 0 28px 60px -18px rgba(18, 28, 40, .32);
  --ease: cubic-bezier(.2, .8, .2, 1); --spring: cubic-bezier(.34, 1.4, .5, 1);
  --dock-h: 74px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 15px/1.45 "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums; overscroll-behavior-y: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
h1, h2, h3, h4 { margin: 0; letter-spacing: -.015em; line-height: 1.2; }
p { margin: 0; }
.hide { display: none !important; }
.mute { color: var(--mute); }
.faint { color: var(--faint); }
.red { color: var(--red); } .green { color: var(--green); } .amber { color: var(--amber); }
.b { font-weight: 700; } .sb { font-weight: 600; }
.sm { font-size: 13px; } .xs { font-size: 12px; }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.right { text-align: right; }
.row-flex { display: flex; align-items: center; gap: 10px; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.ell { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gap-s { gap: 6px; } .mt-s { margin-top: 6px; } .mt { margin-top: 12px; } .mt-l { margin-top: 20px; }

/* ---------- shell ---------- */
#app { min-height: 100dvh; }
.side { display: none; }
.main { min-height: 100dvh; padding-bottom: calc(var(--dock-h) + 28px + env(safe-area-inset-bottom)); }
.top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 10px; padding: 12px 16px 10px; background: rgba(237, 240, 243, .86); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); }
.top.scrolled { box-shadow: 0 1px 0 var(--line2); }
.top h1 { font-size: 19px; font-weight: 750; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top .sub { font-size: 12px; color: var(--mute); font-weight: 500; display: block; margin-top: 1px; letter-spacing: 0; }
.iconbtn { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: #fff; box-shadow: var(--sh); flex: none; transition: transform .2s var(--ease); }
.iconbtn:active { transform: scale(.92); }
.iconbtn svg { width: 20px; height: 20px; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 14px; flex: none; }
.mark { width: 34px; height: 34px; flex: none; }
#view { padding: 4px 16px 0; }
.view-in > * { animation: rise .45s var(--ease) both; }
.view-in > *:nth-child(2) { animation-delay: .04s; } .view-in > *:nth-child(3) { animation-delay: .08s; } .view-in > *:nth-child(4) { animation-delay: .12s; }
.view-in > *:nth-child(5) { animation-delay: .16s; } .view-in > *:nth-child(6) { animation-delay: .2s; } .view-in > *:nth-child(n+7) { animation-delay: .24s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: none; } }
@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes growy { from { transform: scaleY(0); } to { transform: scaleY(1); } }

/* dock (phone) */
.dock { position: fixed; z-index: 40; left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom)); height: var(--dock-h); background: #fff; border-radius: 26px; box-shadow: var(--sh-lg); display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; padding: 0 6px; max-width: 520px; margin: 0 auto; }
.dock a { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; font-weight: 600; color: var(--faint); padding: 8px 0; transition: color .2s; }
.dock a svg { width: 23px; height: 23px; transition: transform .3s var(--spring); }
.dock a.on { color: var(--brand); }
.dock a.on svg { transform: translateY(-1px) scale(1.06); }
.dock .plus { justify-self: center; width: 56px; height: 56px; border-radius: 20px; background: var(--brand); color: #fff; display: grid; place-items: center; box-shadow: 0 10px 22px -10px rgba(20, 92, 69, .9), inset 0 1px 0 rgba(255, 255, 255, .18); transition: transform .25s var(--spring); }
.dock .plus:active { transform: scale(.9) rotate(45deg); }
.dock .plus svg { width: 26px; height: 26px; }

/* ---------- cards & lists ---------- */
.card { background: var(--card); border-radius: var(--r); box-shadow: var(--sh); margin-bottom: 14px; }
.pad { padding: 16px; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 16px 8px; }
.card-h h3 { font-size: 16px; font-weight: 700; }
.card-h a, .link { font-size: 13px; font-weight: 650; color: var(--brand); }
.sec-h { display: flex; align-items: baseline; justify-content: space-between; margin: 22px 4px 10px; }
.sec-h h2 { font-size: 18px; font-weight: 750; }
.list { padding: 2px 0 6px; }
.li { display: flex; align-items: center; gap: 12px; padding: 12px 16px; position: relative; transition: background .15s; }
.li + .li::before { content: ""; position: absolute; left: 16px; right: 16px; top: 0; height: 1px; background: var(--line); }
.li:active { background: #f7f9fa; }
a.li, button.li { width: 100%; text-align: left; }
.li .t { font-weight: 650; font-size: 15px; }
.li .m { font-size: 13px; color: var(--mute); margin-top: 1px; }
.li .amt { font-weight: 700; text-align: right; white-space: nowrap; }
.li .am { font-size: 12px; text-align: right; margin-top: 1px; white-space: nowrap; }
.thumb { width: 46px; height: 46px; border-radius: 13px; object-fit: cover; flex: none; background: var(--field); }
.initial { width: 42px; height: 42px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 700; font-size: 14px; background: var(--brand-soft); color: var(--brand-ink); }
.empty { padding: 28px 16px; text-align: center; color: var(--mute); font-size: 14px; }
.chev { width: 16px; height: 16px; color: var(--faint); flex: none; }

/* labels (no dots) */
.lbl { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 3px 8px; border-radius: 7px; white-space: nowrap; letter-spacing: .01em; }
.lbl.avail { background: var(--avail-bg); color: #1d6b40; } .lbl.booked { background: var(--booked-bg); color: #8a5000; } .lbl.sold { background: var(--sold-bg); color: #8f2a1e; } .lbl.hold { background: var(--hold-bg); color: #4d5661; }
.lbl.red { background: var(--red-bg); color: var(--red); } .lbl.green { background: var(--green-bg); color: var(--green); } .lbl.amber { background: var(--amber-bg); color: var(--amber); } .lbl.grey { background: var(--field); color: var(--ink2); } .lbl.ink { background: var(--ink); color: #fff; }

/* chips */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 16px 12px; margin: 0 -16px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; height: 36px; padding: 0 14px; border-radius: 18px; background: #fff; box-shadow: var(--sh); font-size: 13.5px; font-weight: 600; color: var(--ink2); display: inline-flex; align-items: center; gap: 6px; transition: background .2s, color .2s, transform .2s var(--spring); }
.chip:active { transform: scale(.95); }
.chip.on { background: var(--ink); color: #fff; }
.chip .n { font-size: 12px; opacity: .65; }

/* buttons */
.btn { height: 48px; padding: 0 18px; border-radius: 15px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 700; font-size: 15px; transition: transform .2s var(--spring), box-shadow .2s, background .2s; white-space: nowrap; }
.btn:active { transform: scale(.96); }
.btn.pri { background: var(--brand); color: #fff; box-shadow: 0 8px 18px -10px rgba(20, 92, 69, .9), inset 0 1px 0 rgba(255, 255, 255, .15); }
.btn.ink { background: var(--ink); color: #fff; }
.btn.sec { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line2); }
.btn.soft { background: var(--brand-soft); color: var(--brand-ink); }
.btn.danger { background: var(--red-bg); color: var(--red); }
.btn.wa { background: var(--wa); color: #fff; }
.btn.sm { height: 38px; padding: 0 13px; border-radius: 12px; font-size: 13.5px; }
.btn.block { width: 100%; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btns { display: flex; gap: 8px; flex-wrap: wrap; }
.btns .btn { flex: 1 1 auto; }
.actions-row { display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px 14px; padding: 2px 16px 4px; scrollbar-width: none; }
.actions-row::-webkit-scrollbar { display: none; }
.actions-row .btn { flex: none; }

/* ---------- home ---------- */
.hello { padding: 6px 4px 14px; }
.hello h2 { font-size: 26px; font-weight: 800; letter-spacing: -.025em; }
.hello p { color: var(--mute); font-size: 14px; margin-top: 3px; }
.proj-rail { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -16px 14px; padding: 2px 16px 10px; scrollbar-width: none; }
.proj-rail::-webkit-scrollbar { display: none; }
.pcard { flex: none; width: 86%; max-width: 420px; scroll-snap-align: center; border-radius: var(--r); overflow: hidden; position: relative; aspect-ratio: 16 / 11; box-shadow: var(--sh-md); color: #fff; display: block; isolation: isolate; }
.pcard img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform 1.2s var(--ease); }
.pcard:hover img { transform: scale(1.04); }
.pcard::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(10, 16, 20, .05) 30%, rgba(10, 16, 20, .82) 100%); }
.pcard .in { position: absolute; left: 0; right: 0; bottom: 0; padding: 16px; }
.pcard .tag { position: absolute; top: 14px; left: 14px; font-size: 12px; font-weight: 700; background: rgba(255, 255, 255, .92); color: var(--ink); padding: 5px 10px; border-radius: 9px; }
.pcard h3 { font-size: 21px; font-weight: 800; }
.pcard .pl { font-size: 13px; opacity: .85; margin-top: 2px; }
.pcard .nums { display: flex; gap: 18px; margin-top: 10px; font-size: 12px; opacity: .92; }
.pcard .nums b { display: block; font-size: 17px; font-weight: 800; }
.segbar { display: flex; height: 8px; border-radius: 5px; overflow: hidden; background: rgba(255, 255, 255, .25); margin-top: 12px; gap: 2px; transform-origin: left; animation: grow .9s .2s var(--ease) both; }
.segbar span { display: block; height: 100%; }
.segbar .s-sold { background: #f0826f; } .segbar .s-booked { background: #f6b955; } .segbar .s-avail { background: #7fd39c; } .segbar .s-hold { background: #c9d0d8; }
.card .segbar { background: var(--field); }
.card .segbar .s-sold { background: var(--sold); } .card .segbar .s-booked { background: #e09a2c; } .card .segbar .s-avail { background: #5bbb80; } .card .segbar .s-hold { background: #bcc3cc; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--ink2); font-weight: 600; }
.legend i { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }

.big { font-size: 30px; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.big.md { font-size: 24px; }
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border-top: 1px solid var(--line); }
.kpis > div { background: #fff; padding: 14px 16px; }
.kpis .k { font-size: 12.5px; color: var(--mute); font-weight: 600; }
.kpis .v { font-size: 19px; font-weight: 800; margin-top: 2px; letter-spacing: -.02em; }
.kpis > div:last-child:nth-child(odd) { grid-column: span 2; }
.card > .kpis:last-child { border-radius: 0 0 var(--r) var(--r); overflow: hidden; }

.bars { display: flex; align-items: flex-end; gap: 8px; height: 112px; padding: 0 16px; }
.bars .bcol { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.bars .bar { width: 100%; max-width: 34px; border-radius: 9px 9px 4px 4px; background: #cfe3d9; transform-origin: bottom; animation: growy .8s var(--ease) both; }
.bars .bcol.cur .bar { background: var(--brand); }
.bars .bl { font-size: 11px; color: var(--mute); font-weight: 600; }
.bars .bv { font-size: 10.5px; font-weight: 700; color: var(--ink2); }

.photo-band { position: relative; border-radius: var(--r); overflow: hidden; color: #fff; margin-bottom: 14px; box-shadow: var(--sh-md); isolation: isolate; }
.photo-band img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.photo-band::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(12, 22, 18, .88), rgba(12, 22, 18, .45)); }
.photo-band .in { padding: 18px 16px; }

.due-strip { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 0 16px 14px; }
.due-strip > div { border-radius: 14px; padding: 12px; background: var(--field); }
.due-strip .k { font-size: 12px; font-weight: 650; color: var(--mute); }
.due-strip .v { font-size: 20px; font-weight: 800; margin-top: 2px; letter-spacing: -.02em; }
.due-strip .od { background: var(--red-bg); } .due-strip .od .v, .due-strip .od .k { color: var(--red); }

.meter { height: 6px; border-radius: 4px; background: var(--field); overflow: hidden; margin-top: 6px; }
.meter > span { display: block; height: 100%; border-radius: 4px; background: var(--brand); transform-origin: left; animation: grow .9s var(--ease) both; }
.meter.warn > span { background: #e0912a; } .meter.bad > span { background: var(--red); }

.notice { display: flex; gap: 12px; align-items: center; padding: 13px 16px; }
.notice + .notice { border-top: 1px solid var(--line); }
.notice .date { width: 46px; flex: none; text-align: center; border-radius: 12px; background: var(--field); padding: 5px 0; line-height: 1.1; }
.notice .date b { display: block; font-size: 17px; font-weight: 800; }
.notice .date span { font-size: 10.5px; font-weight: 700; color: var(--mute); text-transform: uppercase; }
.notice.late .date { background: var(--red-bg); color: var(--red); } .notice.late .date span { color: var(--red); }

/* ---------- project ---------- */
.p-hero { position: relative; margin: 0 -16px 14px; height: 230px; overflow: hidden; color: #fff; isolation: isolate; }
.p-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; animation: kenburns 14s ease-out both; }
@keyframes kenburns { from { transform: scale(1.12); } to { transform: scale(1); } }
.p-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(8, 14, 18, .1), rgba(8, 14, 18, .85)); }
.p-hero .in { position: absolute; left: 16px; right: 16px; bottom: 16px; }
.p-hero h2 { font-size: 26px; font-weight: 800; }
.tabs { display: flex; gap: 4px; background: #dfe4e9; padding: 4px; border-radius: 15px; margin-bottom: 14px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { flex: 1; height: 38px; border-radius: 11px; font-size: 13.5px; font-weight: 650; color: var(--ink2); white-space: nowrap; padding: 0 12px; transition: background .2s, box-shadow .2s; }
.tabs button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(18, 28, 40, .12); }

/* plot layout drawing */
.map-wrap { overflow: auto; border-radius: 0 0 var(--r) var(--r); -webkit-overflow-scrolling: touch; position: relative; }
.map-wrap svg { display: block; width: 100%; min-width: 640px; height: auto; transition: min-width .3s var(--ease); }
.map-wrap.z2 svg { min-width: 980px; } .map-wrap.z3 svg { min-width: 1400px; }
.map .ground { fill: #f3f1ea; }
.map .road { fill: #d9dde2; } .map .road-line { stroke: #fff; stroke-width: 2; stroke-dasharray: 14 10; }
.map .road-t { font-size: 13px; font-weight: 700; fill: #7c8691; letter-spacing: .08em; }
.map .park { fill: #cfe7c8; } .map .tree { fill: #8cc785; }
.map .park-t { font-size: 14px; font-weight: 800; fill: #4f8a48; letter-spacing: .1em; }
.map .plot { cursor: pointer; transform-box: fill-box; transform-origin: center; animation: pop .5s var(--spring) both; }
.map .plot rect { stroke: #fff; stroke-width: 3; transition: filter .2s; }
.map .plot:hover rect { filter: brightness(.94); }
.map .plot text { font-size: 14px; font-weight: 800; pointer-events: none; text-anchor: middle; }
.map .plot .ar { font-size: 11px; font-weight: 600; opacity: .8; }
.map .plot.avail rect { fill: var(--avail-bg); } .map .plot.avail text { fill: #1d6b40; }
.map .plot.booked rect { fill: var(--booked-bg); } .map .plot.booked text { fill: #8a5000; }
.map .plot.sold rect { fill: var(--sold-bg); } .map .plot.sold text { fill: #8f2a1e; }
.map .plot.hold rect { fill: url(#hatch); } .map .plot.hold text { fill: #4d5661; }
.map .plot.dim { opacity: .25; }
.map .plot.sel rect { stroke: var(--ink); stroke-width: 4; }
.map .gate { fill: var(--brand); } .map .gate-t { fill: #fff; font-size: 12px; font-weight: 800; letter-spacing: .1em; }
.map-tools { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 16px; }
.zoom { display: flex; background: var(--field); border-radius: 11px; }
.zoom button { width: 36px; height: 34px; font-weight: 800; font-size: 18px; color: var(--ink2); }

/* building stack */
.tower { padding: 8px 16px 16px; }
.floor { display: grid; grid-template-columns: 42px repeat(4, 1fr); gap: 6px; margin-bottom: 6px; align-items: stretch; }
.floor .fl { font-size: 11.5px; font-weight: 700; color: var(--mute); display: grid; place-items: center; }
.flat { border-radius: 10px; padding: 8px 4px; text-align: center; font-weight: 800; font-size: 13px; line-height: 1.15; animation: pop .45s var(--spring) both; transition: transform .2s var(--spring); }
.flat:active { transform: scale(.94); }
.flat small { display: block; font-size: 10.5px; font-weight: 600; opacity: .8; }
.flat.avail { background: var(--avail-bg); color: #1d6b40; } .flat.booked { background: var(--booked-bg); color: #8a5000; } .flat.sold { background: var(--sold-bg); color: #8f2a1e; } .flat.hold { background: var(--hold-bg); color: #4d5661; }
.tower-roof { height: 12px; margin: 0 0 8px 48px; border-radius: 10px 10px 0 0; background: repeating-linear-gradient(90deg, #cfd5dc 0 10px, #dfe4e9 10px 20px); }
.tower-base { height: 8px; margin: 2px 0 0 48px; border-radius: 3px; background: #b9c1ca; }

.stages { padding: 4px 16px 16px; }
.stg { display: flex; gap: 12px; position: relative; padding-bottom: 16px; }
.stg::before { content: ""; position: absolute; left: 11px; top: 26px; bottom: 0; width: 2px; background: var(--line2); }
.stg:last-child::before { display: none; }
.stg .pt { width: 24px; height: 24px; border-radius: 8px; flex: none; background: var(--field); border: 2px solid var(--line2); }
.stg.done .pt { background: var(--brand); border-color: var(--brand); }
.stg.done::before { background: var(--brand); }
.stg.next .pt { border-color: var(--brand); background: #fff; box-shadow: 0 0 0 4px var(--brand-soft); }

/* booking */
.steps { display: flex; padding: 14px 16px 16px; }
.steps .st { flex: 1; text-align: center; font-size: 11.5px; font-weight: 650; color: var(--faint); position: relative; padding-top: 22px; }
.steps .st::before { content: ""; position: absolute; top: 5px; left: 50%; transform: translateX(-50%); width: 14px; height: 14px; border-radius: 5px; background: var(--line2); z-index: 1; }
.steps .st::after { content: ""; position: absolute; top: 11px; left: -50%; width: 100%; height: 2px; background: var(--line2); }
.steps .st:first-child::after { display: none; }
.steps .st.on { color: var(--ink); } .steps .st.on::before { background: var(--brand); } .steps .st.on::after { background: var(--brand); }
.steps .st.cur::before { box-shadow: 0 0 0 5px var(--brand-soft); }
.sched .li { padding-top: 10px; padding-bottom: 10px; }
.sched .bar-mini { width: 4px; align-self: stretch; border-radius: 2px; background: var(--line2); flex: none; }
.sched .paid .bar-mini { background: var(--green); } .sched .overdue .bar-mini { background: var(--red); } .sched .soon .bar-mini { background: #e0912a; }
.cost { padding: 4px 16px 14px; }
.cost .cr { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; font-size: 14px; }
.cost .cr span:first-child { color: var(--ink2); }
.cost .cr small { color: var(--faint); margin-left: 4px; }
.cost .cr.tot { border-top: 1.5px dashed var(--line2); margin-top: 6px; padding-top: 11px; font-weight: 800; font-size: 16px; }
.cost .cr.tot span:first-child { color: var(--ink); }
.cost .cr.sub { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 9px; font-weight: 650; }
.docs .li { padding: 10px 16px; }
.tick { width: 24px; height: 24px; border-radius: 8px; border: 2px solid var(--line2); display: grid; place-items: center; flex: none; transition: background .2s, border-color .2s; }
.tick svg { width: 14px; height: 14px; color: #fff; opacity: 0; transition: opacity .2s; }
.tick.on { background: var(--brand); border-color: var(--brand); } .tick.on svg { opacity: 1; }

/* ---------- forms ---------- */
.form { display: grid; gap: 12px; }
.f { display: grid; gap: 5px; }
.f > span { font-size: 12.5px; font-weight: 650; color: var(--ink2); }
.f input, .f select, .f textarea { width: 100%; height: 48px; border-radius: 13px; border: 1.5px solid transparent; background: var(--field); padding: 0 13px; font-size: 16px; outline: none; transition: border-color .2s, background .2s; appearance: none; -webkit-appearance: none; }
.f select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%236c7581' stroke-width='2'%3E%3Cpath d='M1 1l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 34px; }
.f textarea { height: 84px; padding: 11px 13px; resize: vertical; }
.f input:focus, .f select:focus, .f textarea:focus { border-color: var(--brand); background: #fff; }
.f .hint { font-size: 12px; color: var(--mute); }
.f2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.check { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; padding: 4px 0; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--brand); }
.seg-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.seg-pick label { position: relative; }
.seg-pick input { position: absolute; opacity: 0; pointer-events: none; }
.seg-pick span { display: inline-flex; height: 38px; align-items: center; padding: 0 13px; border-radius: 11px; background: var(--field); font-size: 13.5px; font-weight: 650; color: var(--ink2); cursor: pointer; transition: background .2s, color .2s; }
.seg-pick input:checked + span { background: var(--ink); color: #fff; }
.calc { background: var(--field); border-radius: 15px; padding: 6px 14px; }
.calc .cr { display: flex; justify-content: space-between; padding: 6px 0; font-size: 14px; }
.calc .cr.tot { border-top: 1px dashed var(--line2); font-weight: 800; font-size: 15.5px; padding-top: 9px; }
.warnbox { background: var(--amber-bg); color: #7a4800; border-radius: 13px; padding: 10px 12px; font-size: 13px; font-weight: 600; }
.warnbox.red { background: var(--red-bg); color: var(--red); }
.infobox { background: var(--brand-soft); color: var(--brand-ink); border-radius: 13px; padding: 10px 12px; font-size: 13px; font-weight: 600; }
.formpage { padding-bottom: 90px; }
.savebar { position: fixed; z-index: 45; left: 0; right: 0; bottom: 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: rgba(255, 255, 255, .94); backdrop-filter: blur(12px); box-shadow: 0 -1px 0 var(--line), 0 -10px 30px -18px rgba(0, 0, 0, .3); display: flex; align-items: center; gap: 12px; }
.savebar .tot { flex: 1; min-width: 0; }
.savebar .tot b { display: block; font-size: 19px; font-weight: 800; letter-spacing: -.02em; }
.savebar .tot span { font-size: 12px; color: var(--mute); }
body.has-savebar .dock { display: none; }
.search { position: relative; margin-bottom: 12px; }
.search input { width: 100%; height: 48px; border-radius: 15px; border: 0; background: #fff; box-shadow: var(--sh); padding: 0 14px 0 44px; font-size: 15.5px; outline: none; }
.search svg { position: absolute; left: 14px; top: 14px; width: 20px; height: 20px; color: var(--faint); }

/* ---------- sheet ---------- */
.scrim { position: fixed; inset: 0; z-index: 80; background: rgba(12, 18, 24, .42); opacity: 0; transition: opacity .3s; }
.scrim.on { opacity: 1; }
.sheet { position: fixed; z-index: 81; left: 0; right: 0; bottom: 0; max-height: 92dvh; background: #fff; border-radius: 26px 26px 0 0; box-shadow: var(--sh-lg); transform: translateY(105%); transition: transform .42s var(--spring); display: flex; flex-direction: column; }
.sheet.on { transform: none; }
.sheet .grab { width: 40px; height: 5px; border-radius: 3px; background: var(--line2); margin: 9px auto 0; flex: none; }
.sheet .sh-h { display: flex; align-items: center; gap: 10px; padding: 12px 18px 10px; flex: none; }
.sheet .sh-h h3 { font-size: 19px; font-weight: 800; flex: 1; }
.sheet .sh-h .sub { font-size: 13px; color: var(--mute); font-weight: 500; display: block; margin-top: 2px; letter-spacing: 0; }
.sheet .sh-b { overflow-y: auto; padding: 4px 18px calc(18px + env(safe-area-inset-bottom)); -webkit-overflow-scrolling: touch; }
.sheet .sh-f { padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); flex: none; display: flex; gap: 8px; }
.sheet .sh-f .btn { flex: 1; }
.menu-list .li { padding: 14px 4px; }
.menu-list .li + .li::before { left: 4px; right: 4px; }
.quick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.quick { border-radius: 18px; overflow: hidden; position: relative; aspect-ratio: 4 / 3; color: #fff; text-align: left; isolation: isolate; box-shadow: var(--sh); transition: transform .2s var(--spring); }
.quick:active { transform: scale(.96); }
.quick img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.quick::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(0, 0, 0, 0) 25%, rgba(0, 0, 0, .78)); }
.quick span { position: absolute; left: 12px; right: 12px; bottom: 10px; font-weight: 750; font-size: 15px; line-height: 1.2; }
.quick small { display: block; font-weight: 500; font-size: 12px; opacity: .85; }
.quick.plain { background: var(--field); color: var(--ink); aspect-ratio: auto; padding: 14px 12px; box-shadow: none; }
.quick.plain::after { display: none; }
.quick.plain span { position: static; }

/* toast */
.toast { position: fixed; z-index: 99; left: 50%; bottom: calc(var(--dock-h) + 26px); transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 14px; font-size: 14px; font-weight: 600; opacity: 0; transition: opacity .25s, transform .35s var(--spring); pointer-events: none; max-width: calc(100% - 32px); box-shadow: var(--sh-lg); }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* tables (reports) */
.tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { text-align: left; font-size: 12px; color: var(--mute); font-weight: 700; padding: 10px 12px; border-bottom: 1px solid var(--line2); white-space: nowrap; background: #fafbfc; position: sticky; top: 0; }
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td.n, .tbl th.n { text-align: right; }
.tbl tr.tot td { font-weight: 800; background: #fafbfc; border-top: 1.5px solid var(--line2); }
.tbl tbody tr:active { background: #f7f9fa; }

/* login */
.login { min-height: 100dvh; display: flex; flex-direction: column; background: #0f1714; }
.login .ph { position: relative; height: 44dvh; min-height: 260px; overflow: hidden; color: #fff; isolation: isolate; }
.login .ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; animation: kenburns 18s ease-out both; }
.login .ph::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(10, 16, 14, .25), rgba(10, 16, 14, .1) 40%, rgba(10, 16, 14, .75)); }
.login .ph .in { position: absolute; left: 20px; right: 20px; bottom: 44px; }
.login .ph h1 { font-size: 32px; font-weight: 800; letter-spacing: -.03em; }
.login .ph p { opacity: .85; margin-top: 4px; }
.login .brandrow { position: absolute; top: 18px; left: 20px; display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 17px; }
.login .panel { flex: 1; background: var(--bg); border-radius: 28px 28px 0 0; margin-top: -26px; padding: 22px 18px 30px; animation: rise .6s var(--ease) both; }
.pin-in { width: 100%; height: 60px; border-radius: 18px; border: 2px solid transparent; background: #fff; box-shadow: var(--sh); font-size: 28px; font-weight: 800; letter-spacing: .5em; text-align: center; outline: none; padding-left: .5em; }
.pin-in:focus { border-color: var(--brand); }
.pin-in.err { animation: shake .4s; border-color: var(--red); }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.roles .li { padding: 12px 14px; }
.roles .li + .li::before { left: 14px; right: 14px; }
.roles .pin { font-weight: 800; letter-spacing: .12em; background: var(--field); padding: 5px 9px; border-radius: 9px; font-size: 13px; }

/* print helpers */
#print-root { display: none; }

/* ---------- desktop: the phone app widened ---------- */
@media (min-width: 760px) {
  #view { padding: 4px 24px 0; }
  .top { padding: 16px 24px 12px; }
  .pcard { width: 380px; }
  .proj-rail { margin: 0 -24px 14px; padding: 2px 24px 10px; }
  .chips { margin: 0 -24px; padding: 2px 24px 12px; }
  .p-hero { margin: 0 0 16px; border-radius: var(--r); height: 280px; }
  .sheet { left: auto; top: 0; bottom: 0; width: 470px; max-height: none; border-radius: 26px 0 0 26px; transform: translateX(105%); }
  .sheet .grab { display: none; }
  .sheet .sh-h { padding-top: 22px; }
  .quick-grid { grid-template-columns: repeat(3, 1fr); }
  .toast { bottom: 30px; }
  .savebar { left: auto; right: 24px; bottom: 20px; width: 520px; border-radius: 20px; }
  .login { flex-direction: row; }
  .login .ph { height: auto; flex: 1.2; }
  .login .panel { flex: 1; max-width: 520px; margin: 0; border-radius: 0; padding: 60px 48px; display: flex; flex-direction: column; justify-content: center; }
}
@media (min-width: 1024px) {
  #app { display: grid; grid-template-columns: 252px 1fr; }
  .side { display: flex; flex-direction: column; position: sticky; top: 0; height: 100dvh; background: #fff; border-right: 1px solid var(--line); padding: 18px 14px; overflow-y: auto; }
  .side .brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; }
  .side .brand b { font-size: 16px; font-weight: 800; display: block; }
  .side .brand span { font-size: 12px; color: var(--mute); }
  .side .grp { font-size: 11.5px; font-weight: 700; color: var(--faint); padding: 14px 10px 6px; }
  .side a { display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 11px; font-size: 14.5px; font-weight: 600; color: var(--ink2); transition: background .15s; }
  .side a svg { width: 19px; height: 19px; color: var(--faint); }
  .side a:hover { background: var(--field); }
  .side a.on { background: var(--brand-soft); color: var(--brand-ink); }
  .side a.on svg { color: var(--brand); }
  .side .new { margin: 4px 0 8px; }
  .side .me { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 12px 8px 0; border-top: 1px solid var(--line); }
  .dock { display: none; }
  .main { padding-bottom: 40px; min-width: 0; }
  #view { max-width: 1240px; padding: 4px 28px 0; }
  .top { padding: 18px 28px 12px; max-width: 1240px; }
  .cols { display: grid; grid-template-columns: 1.35fr 1fr; gap: 16px; align-items: start; }
  .cols-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: start; }
  .cols > .col, .cols-3 > .col { min-width: 0; }
  .proj-rail { margin: 0 0 14px; padding: 2px 0 10px; }
  .chips { margin: 0; padding: 2px 0 12px; }
  .actions-row { margin: 0 0 14px; padding: 2px 0 4px; }
  .map-wrap svg { min-width: 0; }
  .map-wrap.z2 svg { min-width: 1300px; } .map-wrap.z3 svg { min-width: 1800px; }
  body.has-savebar .main { padding-bottom: 100px; }
  .kpis.k4 { grid-template-columns: repeat(4, 1fr); }
  .kpis.k4 > div:last-child:nth-child(odd) { grid-column: auto; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
}
@media print {
  body > *:not(#print-root) { display: none !important; }
  #print-root { display: block !important; }
}
.savebar-slot:empty { display: none; }
.savebar-slot:not(:empty) { position: fixed; z-index: 45; left: 0; right: 0; bottom: 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: rgba(255, 255, 255, .94); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 -1px 0 var(--line), 0 -10px 30px -18px rgba(0, 0, 0, .3); display: flex; align-items: center; gap: 12px; animation: rise .4s var(--ease) both; }
.savebar-slot .tot { flex: 1; min-width: 0; }
.savebar-slot .tot b { display: block; font-size: 19px; font-weight: 800; letter-spacing: -.02em; }
.savebar-slot .tot span { font-size: 12px; color: var(--mute); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (min-width: 760px) { .savebar-slot:not(:empty) { left: auto; right: 24px; bottom: 20px; width: 520px; border-radius: 20px; } }
@media (min-width: 1024px) { .hide-d { display: none; } }
.f2 > * { min-width: 0; }
.f input, .f select { min-width: 0; max-width: 100%; }
input[type=date] { -webkit-min-logical-width: 0; }

/* layout editor */
.map-wrap.drawing svg { touch-action: none; cursor: crosshair; }
.map.editing .plot { cursor: pointer; }
.map.on-img .plot rect { fill-opacity: .72; stroke-width: 2; }
.draw-rect { fill: rgba(20, 92, 69, .18); stroke: var(--brand); stroke-width: 3; stroke-dasharray: 8 5; }
.pos-grid { display: grid; gap: 8px; }
.pos { display: grid; grid-template-columns: 52px 1fr 1fr 1fr 1fr; gap: 6px; align-items: center; background: var(--field); border-radius: 12px; padding: 8px; }
.pos b { font-size: 12.5px; }
.pos select, .pos input { height: 38px; border-radius: 10px; border: 1.5px solid transparent; background: #fff; padding: 0 8px; font-size: 14px; min-width: 0; width: 100%; }
.pos .check { grid-column: 2 / -1; font-size: 13px; padding: 0; }
@media (max-width: 420px) { .pos { grid-template-columns: 1fr 1fr; } .pos b { grid-column: 1 / -1; } .pos .check { grid-column: 1 / -1; } }

/* land details + public map */
.land-box { background: var(--field); border-radius: 15px; padding: 12px; display: grid; gap: 10px; }
.land-box input, .land-box select { background: #fff !important; }
.land-rows { display: grid; gap: 6px; }
.land-row { display: grid; grid-template-columns: 1fr 1fr 0.8fr 1fr 34px; gap: 6px; align-items: center; }
.land-row input, .land-row select, .land-extra input { height: 42px; border-radius: 11px; border: 1.5px solid transparent; padding: 0 9px; font-size: 14.5px; min-width: 0; width: 100%; background: #fff; }
.land-extra { display: grid; gap: 6px; }
@media (max-width: 420px) { .land-row { grid-template-columns: 1fr 1fr 34px; } .land-row input[name=lr_area], .land-row select { grid-column: span 1; } }
#public { min-height: 100dvh; background: var(--bg); padding-bottom: 30px; }
.pub-top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: rgba(237, 240, 243, .92); backdrop-filter: blur(12px); }
.pub-top b { display: block; font-size: 15px; } .pub-top span { font-size: 12px; color: var(--mute); }
#public #view { max-width: 980px; margin: 0 auto; }

/* round 3: brokers on land, many expenses, KYC */
.land-broker { border-top: 1px dashed var(--line2); padding-top: 10px; display: grid; gap: 10px; }
.more-land summary { cursor: pointer; font-size: 13.5px; list-style: none; }
.more-land summary::-webkit-details-marker { display: none; }
.exp-rows { display: grid; gap: 8px; }
.exp-row { display: grid; grid-template-columns: 1.2fr 1.2fr 0.9fr 1fr 34px; gap: 6px; align-items: center; background: var(--field); border-radius: 12px; padding: 6px; }
.exp-row select, .exp-row input { height: 40px; border-radius: 10px; border: 1.5px solid transparent; background: #fff; padding: 0 8px; font-size: 14px; min-width: 0; width: 100%; }
@media (max-width: 520px) { .exp-row { grid-template-columns: 1fr 1fr 34px; } .exp-row [name=xr_pid] { grid-column: 1 / 3; } .exp-row [name=xr_amt] { grid-column: 1; } .exp-row [name=xr_note] { grid-column: 2; } }
.kyc-thumbs, .kyc-up { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 0 16px 12px; }
.kyc-up { padding: 0; }
.kyc-thumb { position: relative; aspect-ratio: 3 / 4; border-radius: 12px; overflow: hidden; background: var(--field); display: flex; align-items: flex-end; cursor: pointer; border: 1.5px solid var(--line2); }
.kyc-thumb.empty { border-style: dashed; align-items: center; justify-content: center; text-align: center; }
.kyc-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.kyc-thumb span { position: relative; font-size: 11px; font-weight: 700; padding: 4px 6px; width: 100%; color: var(--ink2); }
.kyc-thumb:not(.empty) span { background: rgba(255, 255, 255, .88); }
@media (max-width: 420px) {
  .land-row { grid-template-columns: 1fr 1fr 34px; }
  .land-row > :nth-child(1) { grid-column: 1; grid-row: 1; }
  .land-row > :nth-child(2) { grid-column: 2 / 4; grid-row: 1; }
  .land-row > :nth-child(3) { grid-column: 1; grid-row: 2; }
  .land-row > :nth-child(4) { grid-column: 2; grid-row: 2; }
  .land-row > :nth-child(5) { grid-column: 3; grid-row: 2; }
}
