:root {
  color-scheme: light;
  --bg: #f5f1e8;
  --surface: #fffaf0;
  --card: #ffffff;
  --ink: #17231f;
  --muted: #67746f;
  --line: #e5dccb;
  --primary: #0f3d34;
  --primary-2: #176c5d;
  --gold: #c49335;
  --green: #1c7c54;
  --amber: #b66b00;
  --blue: #2864b8;
  --purple: #7447b6;
  --danger: #b42318;
  --shadow: 0 18px 50px rgba(23, 35, 31, .12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: radial-gradient(circle at top left, #fbefd0 0, transparent 32rem), var(--bg); color: var(--ink); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.app-shell { min-height: 100dvh; }
.loading-screen, .login-wrap { min-height: 100dvh; display: grid; place-items: center; padding: 24px; }
.loading-screen { text-align: center; color: var(--muted); }
.brand-mark { width: 64px; height: 64px; border-radius: 22px; display: grid; place-items: center; margin: 0 auto 16px; background: #123c36; color: white; font-weight: 900; box-shadow: var(--shadow); overflow: hidden; border: 1px solid rgba(255,255,255,.16); }
.brand-mark img { width: 100%; height: 100%; object-fit: cover; display: block; }
.brand-mark-large { width: 96px; height: 96px; border-radius: 28px; }
.login-card { width: min(440px, 100%); background: rgba(255,250,240,.92); border: 1px solid rgba(229,220,203,.8); border-radius: 28px; padding: 28px; box-shadow: var(--shadow); backdrop-filter: blur(14px); }
.login-card h1 { margin: 0 0 8px; font-size: 28px; }
.login-card p { color: var(--muted); margin: 0 0 22px; line-height: 1.5; }
.field { display: grid; gap: 8px; margin: 12px 0; }
.field span, label span { font-size: 13px; color: var(--muted); font-weight: 700; }
input, select, textarea { width: 100%; border: 1px solid var(--line); background: white; border-radius: 14px; padding: 12px 14px; color: var(--ink); outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--primary-2); box-shadow: 0 0 0 4px rgba(23,108,93,.12); }
textarea { min-height: 88px; resize: vertical; }
.btn { border: 0; border-radius: 14px; padding: 12px 16px; background: var(--primary); color: white; font-weight: 800; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn:hover { background: var(--primary-2); }
.btn.secondary { background: #efe7d9; color: var(--ink); }
.btn.ghost { background: transparent; color: var(--primary); border: 1px solid var(--line); }
.btn.danger { background: var(--danger); color: white; }
.btn.small { padding: 8px 11px; min-height: 36px; border-radius: 11px; font-size: 13px; }
.error { color: var(--danger); font-weight: 700; margin-top: 10px; }
.success { color: var(--green); font-weight: 700; margin-top: 10px; }
.topbar { position: sticky; top: 0; z-index: 10; background: rgba(245,241,232,.88); backdrop-filter: blur(16px); border-bottom: 1px solid rgba(229,220,203,.8); }
.topbar-inner { max-width: 1180px; margin: 0 auto; padding: 14px 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand .brand-mark { width: 52px; height: 52px; border-radius: 16px; margin: 0; flex: 0 0 auto; }
.brand h1 { margin: 0; font-size: 17px; }
.brand p { margin: 2px 0 0; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.role-badge, .badge { display: inline-flex; align-items: center; border-radius: 999px; padding: 5px 10px; font-size: 12px; font-weight: 800; background: #e7f3ee; color: var(--primary); }
.badge.available { background: #e8f8ee; color: var(--green); }
.badge.reserved { background: #fff3d7; color: var(--amber); }
.badge.sold { background: #e7f0ff; color: var(--blue); }
.badge.construction { background: #f1e8ff; color: var(--purple); }
.badge.handover { background: #e8eeea; color: #2e4a3f; }
.main { max-width: 1180px; margin: 0 auto; padding: 18px 18px 40px; }
.grid { display: grid; gap: 14px; }
.grid.kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 760px) { .grid.kpi { grid-template-columns: repeat(6, minmax(0, 1fr)); } .layout { display: grid; grid-template-columns: minmax(260px, 360px) 1fr; gap: 18px; align-items: start; } }
.card { background: rgba(255,255,255,.86); border: 1px solid rgba(229,220,203,.9); border-radius: 22px; padding: 16px; box-shadow: 0 10px 30px rgba(23,35,31,.06); }
.card h2, .card h3 { margin: 0 0 10px; }
.card p { color: var(--muted); line-height: 1.45; }
.kpi-card { padding: 14px; }
.kpi-card .num { font-size: 24px; font-weight: 900; margin-top: 6px; }
.kpi-card .label { color: var(--muted); font-size: 12px; font-weight: 800; }
.toolbar { display: flex; gap: 10px; overflow-x: auto; padding: 2px 0 12px; }
.chip { border: 1px solid var(--line); background: white; border-radius: 999px; padding: 9px 13px; font-weight: 800; color: var(--muted); white-space: nowrap; }
.chip.active { background: var(--primary); color: white; border-color: var(--primary); }
.unit-list { display: grid; gap: 12px; }
.unit-card { display: grid; gap: 10px; }
.unit-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.unit-code { font-size: 20px; font-weight: 950; }
.meta { color: var(--muted); font-size: 13px; }
.progress-row { display: grid; grid-template-columns: 116px 1fr 44px; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.progress-track { height: 10px; background: #ece4d6; border-radius: 999px; overflow: hidden; }
.progress-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--gold), var(--primary-2)); border-radius: inherit; }
.header-tabs-wrap { position: sticky; top: 71px; z-index: 9; background: rgba(245,241,232,.9); border-bottom: 1px solid rgba(229,220,203,.8); backdrop-filter: blur(16px); padding: 10px 18px; }
.header-tabs { max-width: 1180px; margin: 0 auto; display: grid; gap: 6px; padding: 4px; background: rgba(255,250,240,.94); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 8px 24px rgba(23,35,31,.07); }
.header-tabs button { border: 0; background: transparent; color: var(--muted); font-weight: 900; padding: 10px 8px; border-radius: 13px; min-height: 42px; }
.header-tabs button.active { background: #e8f2ee; color: var(--primary); box-shadow: inset 0 0 0 1px rgba(15,61,52,.08); }
.form-grid { display: grid; gap: 12px; }
@media (min-width: 760px) { .form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); } .header-tabs-wrap { top: 71px; } .header-tabs { gap: 8px; padding: 6px; } }
.checklist { display: grid; gap: 10px; }
.check-row { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: start; padding: 12px; background: #fbf7ed; border: 1px solid var(--line); border-radius: 16px; }
.check-row input[type="checkbox"] { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--primary); }
.check-row .title { font-weight: 850; }
.check-row .sub { color: var(--muted); font-size: 12px; margin-top: 3px; }
.weight { background: white; border: 1px solid var(--line); border-radius: 999px; padding: 4px 8px; font-size: 12px; font-weight: 900; }
.editor-list { display: grid; gap: 10px; }
.editor-item { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 16px; background: #fffdf8; }
.editor-item .row { display: grid; grid-template-columns: 1fr 82px; gap: 8px; }
.editor-item .row.three { grid-template-columns: 1fr 90px 120px; }
.consumer-hero { background: linear-gradient(135deg, #0f3d34, #176c5d); color: white; border: 0; }
.consumer-hero p, .consumer-hero .meta { color: rgba(255,255,255,.78); }
.consumer-hero .progress-track { background: rgba(255,255,255,.2); }
.consumer-hero .progress-fill { background: white; }
.audit-list { display: grid; gap: 8px; max-height: 420px; overflow: auto; }
.audit-item { font-size: 12px; color: var(--muted); padding: 10px; background: #fbf7ed; border-radius: 12px; }
.siteplan-page { width: calc(100vw - 16px); margin-left: 50%; transform: translateX(-50%); }
.siteplan-card { overflow: hidden; padding: 0; border-radius: 18px; background: #ece4d6; }
.siteplan-scroll { overflow: auto; max-height: calc(100dvh - 150px); min-height: calc(100dvh - 170px); background: #ece4d6; overscroll-behavior: contain; }
.siteplan-stage { position: relative; width: 1900px; min-width: 1900px; margin: 0 auto; line-height: 0; }
.siteplan-img { width: 100%; height: auto; display: block; user-select: none; -webkit-user-drag: none; }
.siteplan-hotspot { position: absolute; transform: translate(-50%, -50%); width: 58px; min-height: 72px; border: 0; background: transparent; color: white; padding: 0; display: grid; justify-items: center; align-content: start; gap: 2px; line-height: 1; filter: drop-shadow(0 5px 8px rgba(0,0,0,.38)); }
.siteplan-hotspot:hover, .siteplan-hotspot:focus { z-index: 5; outline: 0; transform: translate(-50%, -50%) scale(1.18); }
.mini-house { position: relative; width: 38px; height: 34px; display: block; }
.mini-house::before { content: ""; position: absolute; left: 6px; top: 1px; width: 26px; height: 26px; background: linear-gradient(135deg, #c49335, #f7d27c); transform: rotate(45deg); border: 2px solid rgba(255,255,255,.95); border-radius: 4px; }
.mini-house::after { content: ""; position: absolute; left: 5px; bottom: 0; width: 28px; height: 22px; background: linear-gradient(180deg, #176c5d, #0f3d34); border: 2px solid rgba(255,255,255,.95); border-top: 0; border-radius: 4px 4px 7px 7px; box-shadow: inset 7px 0 0 rgba(255,255,255,.18), inset -7px 0 0 rgba(255,255,255,.10); }
.siteplan-hotspot.reserved .mini-house::after { background: linear-gradient(180deg, #d98315, #8f4f00); }
.siteplan-hotspot.sold .mini-house::after { background: linear-gradient(180deg, #437bd0, #234f99); }
.siteplan-hotspot.construction .mini-house::after { background: linear-gradient(180deg, #8a5bd0, #583196); }
.siteplan-hotspot.handover .mini-house::after { background: linear-gradient(180deg, #40584f, #263c34); }
.mini-code { white-space: nowrap; background: rgba(15,61,52,.92); border: 1px solid rgba(255,255,255,.88); color: white; border-radius: 999px; padding: 3px 6px; font-size: 10px; font-weight: 950; letter-spacing: -.03em; text-shadow: 0 1px 2px rgba(0,0,0,.45); }
.mini-bars { width: 44px; display: grid; gap: 2px; }
.mini-bars i, .mini-bars b { display: block; height: 4px; width: 100%; border-radius: 999px; background: rgba(0,0,0,.28); overflow: hidden; }
.mini-bars i::before, .mini-bars b::before { content: ""; display: block; height: 100%; border-radius: inherit; }
.mini-bars i::before { width: var(--build); background: #f7d27c; }
.mini-bars b::before { width: var(--pay); background: #73e0b0; }
.dot { width: 10px; height: 10px; border-radius: 999px; display: inline-block; background: var(--green); }
.dot.reserved { background: var(--amber); }
.dot.sold { background: var(--blue); }
.dot.construction { background: var(--purple); }
@media (max-width: 759px) { .main { padding-left: 8px; padding-right: 8px; } .siteplan-page { width: calc(100vw - 8px); } .siteplan-stage { width: 1650px; min-width: 1650px; } .siteplan-scroll { max-height: calc(100dvh - 145px); min-height: calc(100dvh - 165px); } .siteplan-hotspot { width: 54px; min-height: 68px; } }
.hidden { display: none !important; }
