/* ===== TimorProp prototype styles ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --brand: #0f766e;
  --brand-dark: #115e59;
  --brand-light: #ccfbf1;
  --accent: #eda100;
  --page: #f6f6f4;
  --surface: #ffffff;
  --ink: #0b0b0b;
  --ink-2: #52514e;
  --ink-3: #898781;
  --hairline: #e1e0d9;
  --ring: rgba(11,11,11,0.10);
  --good: #0ca30c;
  --good-text: #006300;
  --warning: #fab219;
  --serious: #ec835a;
  --critical: #d03b3b;
  --series-1: #2a78d6;
  --radius: 12px;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}

body { background: var(--page); color: var(--ink); font-size: 14.5px; line-height: 1.5; }
button { font: inherit; cursor: pointer; border: none; background: none; }
a { color: var(--brand); }

/* ---------- demo bar ---------- */
.demo-bar {
  background: #1e1b4b; color: #e0e7ff;
  padding: 8px 20px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  font-size: 13px; position: sticky; top: 0; z-index: 90;
}
.demo-bar .tag { background: #4338ca; color: #fff; font-weight: 700; font-size: 11px; padding: 2px 8px; border-radius: 99px; letter-spacing: .04em; }
.demo-bar select {
  font: inherit; background: #312e81; color: #fff; border: 1px solid #4f46e5;
  border-radius: 8px; padding: 4px 8px;
}
.demo-bar label { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.demo-bar .spacer { flex: 1; }

/* PRD annotation chips */
.prd-note {
  display: none; font-size: 11px; font-weight: 600; color: #4338ca;
  background: #eef2ff; border: 1px dashed #a5b4fc; border-radius: 6px;
  padding: 1px 7px; vertical-align: middle; white-space: nowrap;
}
body.show-prd .prd-note { display: inline-block; }

/* ---------- header ---------- */
header.site {
  background: var(--surface); border-bottom: 1px solid var(--hairline);
  padding: 0 24px; display: flex; align-items: center; gap: 22px; height: 60px;
  position: sticky; top: 0; z-index: 80;
}
.demo-bar + header.site { top: 37px; }
.logo { font-size: 19px; font-weight: 800; color: var(--brand-dark); letter-spacing: -.02em; display: flex; align-items: center; gap: 8px; cursor: pointer; }
.logo .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); display: inline-block; }
nav.main { display: flex; gap: 4px; flex: 1; }
nav.main button {
  padding: 8px 14px; border-radius: 8px; color: var(--ink-2); font-weight: 600;
}
nav.main button:hover { background: var(--page); }
nav.main button.active { background: var(--brand-light); color: var(--brand-dark); }
nav.main button .badge {
  background: var(--critical); color: #fff; font-size: 10px; font-weight: 700;
  border-radius: 99px; padding: 1px 6px; margin-left: 4px; vertical-align: top;
}
.lang { border: 1px solid var(--hairline); border-radius: 8px; padding: 6px 10px; color: var(--ink-2); background: var(--surface); font: inherit; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; background: var(--brand); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px;
}
.whoami { font-size: 12px; color: var(--ink-3); text-align: right; line-height: 1.3; }
.whoami b { color: var(--ink); display: block; font-size: 13px; }

/* ---------- layout ---------- */
main { max-width: 1200px; margin: 0 auto; padding: 24px; }
h1 { font-size: 24px; letter-spacing: -.02em; }
h2 { font-size: 18px; letter-spacing: -.01em; margin-bottom: 12px; }
.muted { color: var(--ink-3); }
.small { font-size: 12.5px; }

/* ---------- hero / search ---------- */
.hero {
  background: linear-gradient(120deg, #115e59, #0f766e 55%, #0d9488);
  border-radius: 16px; padding: 34px 32px 30px; color: #fff; margin-bottom: 22px;
}
.hero h1 { color: #fff; margin-bottom: 4px; }
.hero p { color: #ccfbf1; margin-bottom: 18px; }
.search-bar {
  background: var(--surface); border-radius: 12px; padding: 10px;
  display: grid; grid-template-columns: 1fr 1fr 1fr 1fr 1fr auto; gap: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,.18);
}
.search-bar select, .search-bar input {
  font: inherit; border: 1px solid var(--hairline); border-radius: 8px;
  padding: 9px 10px; background: #fff; color: var(--ink); width: 100%;
}
.search-bar .go {
  background: var(--accent); color: #422006; font-weight: 700; border-radius: 8px; padding: 9px 18px;
}
.toggle-group { display: inline-flex; background: rgba(255,255,255,.15); border-radius: 10px; padding: 3px; margin-bottom: 14px; }
.toggle-group button { color: #ccfbf1; font-weight: 700; padding: 7px 20px; border-radius: 8px; }
.toggle-group button.active { background: #fff; color: var(--brand-dark); }

/* ---------- results ---------- */
.results-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.results-head .count { font-weight: 700; }
.view-toggle { margin-left: auto; display: inline-flex; border: 1px solid var(--hairline); border-radius: 8px; overflow: hidden; }
.view-toggle button { padding: 7px 14px; font-weight: 600; color: var(--ink-2); background: var(--surface); }
.view-toggle button.active { background: var(--brand); color: #fff; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }

.card {
  background: var(--surface); border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--ring); cursor: pointer; transition: transform .12s, box-shadow .12s;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0,0,0,.10); }
.photo {
  height: 170px; display: flex; align-items: center; justify-content: center;
  font-size: 54px; position: relative; overflow: hidden;
}
.photo .wm {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 800; letter-spacing: .35em; color: rgba(255,255,255,.28);
  transform: rotate(-18deg); text-transform: uppercase; pointer-events: none; user-select: none;
}
.photo .ribbons { position: absolute; top: 10px; left: 10px; display: flex; gap: 6px; }
.pill {
  font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 99px; letter-spacing: .02em;
}
.pill.rent  { background: #dbeafe; color: #1e40af; }
.pill.sale  { background: #ffedd5; color: #9a3412; }
.pill.free  { background: #fee2e2; color: #991b1b; }
.pill.lease { background: #d1fae5; color: #065f46; }
.pill.gray  { background: #f1f0ed; color: var(--ink-2); }
.pill.pending { background: #fef3c7; color: #92400e; }
.pill.flagged { background: #fee2e2; color: #991b1b; }
.pill.live { background: #d1fae5; color: #065f46; }

.card .body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.price { font-size: 19px; font-weight: 800; }
.price .per { font-size: 13px; font-weight: 500; color: var(--ink-3); }
.card h3 { font-size: 15px; font-weight: 700; }
.loc { color: var(--ink-3); font-size: 13px; }
.specs { display: flex; gap: 12px; color: var(--ink-2); font-size: 12.5px; margin-top: 2px; }
.card .foot {
  border-top: 1px solid var(--hairline); margin-top: auto; padding-top: 10px;
  display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-2);
}
.vbadge { color: var(--brand-dark); font-weight: 700; display: inline-flex; align-items: center; gap: 3px; }
.star { color: var(--accent); }

/* ---------- map ---------- */
.map-wrap { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--ring); height: 480px; background: linear-gradient(180deg,#bfdbfe 0%,#bfdbfe 42%,#d9f99d 46%,#ecfccb 60%,#fef9c3 100%); }
.map-label { position: absolute; font-size: 11px; font-weight: 700; color: rgba(30,64,175,.5); letter-spacing: .2em; }
.pin {
  position: absolute; transform: translate(-50%, -100%); cursor: pointer;
  background: var(--brand-dark); color: #fff; font-weight: 700; font-size: 12px;
  padding: 4px 9px; border-radius: 8px; box-shadow: 0 3px 8px rgba(0,0,0,.25);
  white-space: nowrap;
}
.pin::after { content: ""; position: absolute; left: 50%; top: 100%; transform: translateX(-50%); border: 6px solid transparent; border-top-color: var(--brand-dark); }
.pin:hover { background: var(--accent); color: #422006; z-index: 5; }
.pin:hover::after { border-top-color: var(--accent); }
.pin.sale-pin { background: #9a3412; }
.pin.sale-pin::after { border-top-color: #9a3412; }

/* ---------- detail ---------- */
.back { color: var(--ink-2); font-weight: 600; margin-bottom: 14px; display: inline-flex; align-items: center; gap: 6px; }
.detail-grid { display: grid; grid-template-columns: 1.7fr 1fr; gap: 22px; align-items: start; }
.gallery .photo { height: 340px; border-radius: var(--radius); font-size: 96px; }
.thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 8px; }
.thumbs .photo { height: 72px; border-radius: 8px; font-size: 28px; opacity: .85; }
.panel { background: var(--surface); border: 1px solid var(--ring); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; }
.panel h2 { margin-bottom: 10px; }
.kv { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; font-size: 13.5px; }
.kv .k { color: var(--ink-3); }
.kv .v { font-weight: 600; text-align: right; }
.feature-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.feature-tags span { background: var(--page); border: 1px solid var(--hairline); border-radius: 8px; padding: 3px 10px; font-size: 12.5px; color: var(--ink-2); }

.legal-tier { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border-radius: 10px; font-size: 13px; margin-top: 10px; }
.legal-tier.ok { background: #f0fdf4; border: 1px solid #bbf7d0; color: #14532d; }
.legal-tier.warn { background: #fffbeb; border: 1px solid #fde68a; color: #713f12; }

.disclaimer {
  background: #fef2f2; border: 1px solid #fecaca; color: #7f1d1d;
  border-radius: 10px; padding: 14px 16px; font-size: 13.5px; margin-bottom: 12px;
}
.disclaimer b { display: block; margin-bottom: 4px; }
.disclaimer .alt { margin-top: 10px; display: flex; gap: 8px; flex-wrap: wrap; }
.disclaimer .alt button { background: #fff; border: 1px solid #fca5a5; color: #991b1b; font-weight: 600; border-radius: 8px; padding: 6px 12px; font-size: 12.5px; }

.cta { width: 100%; background: var(--brand); color: #fff; font-weight: 700; font-size: 15px; padding: 13px; border-radius: 10px; }
.cta:hover { background: var(--brand-dark); }
.cta:disabled { background: #d6d5d0; color: #898781; cursor: not-allowed; }
.cta.secondary { background: var(--surface); color: var(--brand-dark); border: 1.5px solid var(--brand); margin-top: 8px; }
.cta.secondary:hover { background: var(--brand-light); }

.agent-card { display: flex; align-items: center; gap: 12px; }
.agent-card .avatar { width: 44px; height: 44px; font-size: 16px; }
.report { color: var(--ink-3); font-size: 12.5px; text-align: center; margin-top: 12px; width: 100%; }
.report:hover { color: var(--critical); }

.review { border-top: 1px solid var(--hairline); padding: 12px 0; }
.review:first-of-type { border-top: none; }
.review .head { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 3px; }

/* ---------- chat ---------- */
.chat-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 100; display: flex; justify-content: flex-end; }
.chat-panel { width: 720px; max-width: 95vw; background: var(--surface); height: 100%; display: flex; }
.chat-list { width: 250px; border-right: 1px solid var(--hairline); overflow-y: auto; }
.chat-list .head, .chat-thread .head { padding: 14px 16px; border-bottom: 1px solid var(--hairline); font-weight: 700; display: flex; align-items: center; justify-content: space-between; }
.conv { padding: 12px 16px; cursor: pointer; border-bottom: 1px solid var(--hairline); }
.conv:hover, .conv.active { background: var(--page); }
.conv .who { font-weight: 700; font-size: 13.5px; display: flex; justify-content: space-between; }
.conv .preview { color: var(--ink-3); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-thread { flex: 1; display: flex; flex-direction: column; }
.msgs { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: var(--page); }
.msg { max-width: 75%; padding: 9px 13px; border-radius: 14px; font-size: 13.5px; }
.msg.them { background: var(--surface); border: 1px solid var(--hairline); align-self: flex-start; border-bottom-left-radius: 4px; }
.msg.me { background: var(--brand); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.msg .t { display: block; font-size: 10.5px; opacity: .6; margin-top: 3px; }
.chat-note { font-size: 11.5px; color: var(--ink-3); background: #fffbeb; border-top: 1px solid #fde68a; padding: 7px 14px; }
.chat-input { display: flex; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--hairline); }
.chat-input input { flex: 1; border: 1px solid var(--hairline); border-radius: 10px; padding: 10px 12px; font: inherit; }
.chat-input button { background: var(--brand); color: #fff; font-weight: 700; border-radius: 10px; padding: 0 18px; }
.close-x { color: var(--ink-3); font-size: 20px; line-height: 1; }

/* ---------- modal (booking) ---------- */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 110; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal { background: var(--surface); border-radius: 16px; width: 560px; max-width: 100%; max-height: 92vh; overflow-y: auto; }
.modal .head { padding: 18px 22px 0; display: flex; justify-content: space-between; align-items: flex-start; }
.modal .head h2 { margin: 0; }
.modal .content { padding: 16px 22px 22px; }
.steps { display: flex; gap: 6px; margin: 12px 22px 0; }
.steps span { flex: 1; height: 4px; border-radius: 99px; background: var(--hairline); }
.steps span.done { background: var(--brand); }
.frow { display: flex; justify-content: space-between; padding: 8px 0; font-size: 13.5px; border-bottom: 1px dashed var(--hairline); }
.frow.total { font-weight: 800; font-size: 15px; border-bottom: none; }
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 4px; }
.field select, .field input { width: 100%; font: inherit; border: 1px solid var(--hairline); border-radius: 8px; padding: 9px 10px; }
.opt-row { display: flex; gap: 8px; flex-wrap: wrap; }
.opt-pill {
  border: 1.5px solid var(--hairline); border-radius: 9px; padding: 8px 18px;
  font-weight: 700; color: var(--ink-2); background: var(--surface);
}
.opt-pill:hover { border-color: var(--brand); }
.opt-pill.active { border-color: var(--brand); background: var(--brand-light); color: var(--brand-dark); }
.plan-card {
  display: block; width: 100%; text-align: left; border: 1.5px solid var(--hairline);
  border-radius: 12px; padding: 12px 14px; margin-bottom: 8px; background: var(--surface);
}
.plan-card:hover { border-color: var(--brand); }
.plan-card.active { border-color: var(--brand); background: #f0fdfa; box-shadow: 0 0 0 1px var(--brand); }
.plan-card .top { display: flex; justify-content: space-between; align-items: baseline; font-weight: 800; gap: 10px; }
.plan-card .top .amt { white-space: nowrap; }
.plan-card .desc { font-size: 12.5px; color: var(--ink-2); margin-top: 3px; }
.plan-card .radio { display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--hairline); margin-right: 7px; vertical-align: -2px; }
.plan-card.active .radio { border-color: var(--brand); background: radial-gradient(circle, var(--brand) 45%, transparent 50%); }
.paypal-btn { width: 100%; background: #ffc439; color: #003087; font-weight: 800; font-size: 15px; border-radius: 99px; padding: 12px; margin-top: 6px; }
.paypal-btn:hover { filter: brightness(.96); }
.pay-alt { text-align: center; color: var(--ink-3); font-size: 12px; margin-top: 8px; }
.success-icon { width: 56px; height: 56px; border-radius: 50%; background: #d1fae5; color: #065f46; font-size: 26px; display: flex; align-items: center; justify-content: center; margin: 6px auto 12px; }
.schedule { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 10px; }
.schedule th { text-align: left; color: var(--ink-3); font-weight: 600; padding: 6px 8px; border-bottom: 1px solid var(--hairline); }
.schedule td { padding: 7px 8px; border-bottom: 1px solid var(--hairline); font-variant-numeric: tabular-nums; }
.wire-box { background: var(--page); border: 1px solid var(--hairline); border-radius: 10px; padding: 14px; font-size: 13px; margin-top: 10px; }
.wire-box .row { display: flex; justify-content: space-between; padding: 3px 0; }
.wire-box .row b { font-family: ui-monospace, monospace; }
.timeline { list-style: none; margin-top: 10px; }
.timeline li { display: flex; gap: 10px; padding: 6px 0; font-size: 13px; align-items: baseline; }
.timeline .dot-t { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; position: relative; top: 1px; }
.dot-t.done { background: var(--good); }
.dot-t.now { background: var(--accent); }
.dot-t.next { background: var(--hairline); }

/* ---------- dashboards ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 20px; }
.kpi { background: var(--surface); border: 1px solid var(--ring); border-radius: var(--radius); padding: 16px 18px; }
.kpi .label { font-size: 12.5px; color: var(--ink-2); font-weight: 600; }
.kpi .value { font-size: 26px; font-weight: 800; letter-spacing: -.02em; margin-top: 2px; }
.kpi .delta { font-size: 12px; font-weight: 600; }
.kpi .delta.up { color: var(--good-text); }
.kpi .delta.warn { color: #92400e; }

.table-panel { background: var(--surface); border: 1px solid var(--ring); border-radius: var(--radius); padding: 18px; margin-bottom: 18px; overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data th { text-align: left; color: var(--ink-3); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--hairline); white-space: nowrap; }
table.data td { padding: 9px 10px; border-bottom: 1px solid var(--hairline); vertical-align: middle; }
table.data td.num { font-variant-numeric: tabular-nums; text-align: right; }
table.data th.num { text-align: right; }
table.data tr:last-child td { border-bottom: none; }
table.data select {
  font: inherit; font-size: 13px; border: 1px solid var(--hairline); border-radius: 8px;
  padding: 6px 8px; background: var(--surface); color: var(--ink);
}
table.data select:hover { border-color: var(--brand); }

.btn-sm { font-size: 12px; font-weight: 700; border-radius: 7px; padding: 5px 11px; }
.btn-approve { background: #d1fae5; color: #065f46; }
.btn-approve:hover { background: #a7f3d0; }
.btn-reject { background: #fee2e2; color: #991b1b; margin-left: 6px; }
.btn-reject:hover { background: #fecaca; }
.btn-neutral { background: var(--page); color: var(--ink-2); border: 1px solid var(--hairline); }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }

/* chart */
.chart-wrap { padding-top: 6px; }
.bars { display: flex; align-items: flex-end; gap: 14px; height: 160px; border-bottom: 1px solid #c3c2b7; padding: 0 6px; position: relative; }
.bars .gridline { position: absolute; left: 0; right: 0; height: 1px; background: var(--hairline); }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; position: relative; z-index: 1; }
.bar { width: 26px; background: var(--series-1); border-radius: 4px 4px 0 0; position: relative; transition: filter .1s; }
.bar:hover { filter: brightness(1.15); }
.bar .tip {
  display: none; position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%);
  background: var(--ink); color: #fff; font-size: 11.5px; font-weight: 600; padding: 4px 8px; border-radius: 6px; white-space: nowrap; z-index: 4;
}
.bar:hover .tip { display: block; }
.bar-label-top { font-size: 11.5px; font-weight: 700; color: var(--ink-2); margin-bottom: 4px; }
.x-labels { display: flex; gap: 14px; padding: 6px 6px 0; }
.x-labels span { flex: 1; text-align: center; font-size: 11.5px; color: var(--ink-3); }

.status-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; }
.status-chip .dot-s { width: 8px; height: 8px; border-radius: 50%; }

/* managed-marketplace components */
.managed-badge {
  background: var(--brand-light); color: var(--brand-dark); font-size: 12px; font-weight: 700;
  border-radius: 99px; padding: 3px 10px;
}
.team-tag {
  display: inline-block; font-size: 10.5px; font-weight: 800; letter-spacing: .06em;
  border-radius: 6px; padding: 2px 8px; vertical-align: middle;
}
.team-tag.landlord-t { background: #ede9fe; color: #5b21b6; }
.team-tag.buyer-t { background: #dbeafe; color: #1e40af; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.form-grid .field.full { grid-column: 1 / -1; }
.file-chip {
  display: inline-flex; align-items: center; gap: 6px; background: var(--page);
  border: 1px dashed var(--ink-3); border-radius: 8px; padding: 5px 10px;
  font-size: 12px; color: var(--ink-2); margin: 2px 6px 2px 0; cursor: pointer;
}
.file-chip:hover { border-color: var(--brand); color: var(--brand-dark); }
.check-row {
  display: flex; gap: 10px; align-items: flex-start; font-size: 12.5px;
  padding: 10px 12px; border: 1.5px solid var(--hairline); border-radius: 10px;
  margin-bottom: 8px; cursor: pointer; background: var(--surface); color: var(--ink-2);
}
.check-row input { margin-top: 2px; accent-color: var(--brand); }
.check-row.checked { border-color: var(--brand); background: #f0fdfa; }
.check-row b { display: block; color: var(--ink); margin-bottom: 2px; }

.empty { text-align: center; color: var(--ink-3); padding: 40px 0; }

/* ---------- landlord request form / agreements ---------- */
.check-row {
  display: flex; gap: 10px; align-items: flex-start; font-size: 13px;
  padding: 10px 12px; border: 1.5px solid var(--hairline); border-radius: 10px;
  margin-bottom: 8px; cursor: pointer; background: var(--surface);
}
.check-row input { margin-top: 3px; flex-shrink: 0; }
.check-row.checked { border-color: var(--brand); background: #f0fdfa; }
.check-row b { display: block; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid .full { grid-column: 1 / -1; }
.file-chip {
  display: inline-flex; align-items: center; gap: 6px; background: var(--page);
  border: 1px dashed var(--ink-3); border-radius: 8px; padding: 5px 10px;
  font-size: 12px; color: var(--ink-2); margin: 2px 6px 2px 0;
}
.team-tag {
  display: inline-block; font-size: 11px; font-weight: 700; border-radius: 99px;
  padding: 2px 9px; letter-spacing: .02em;
}
.team-tag.landlord-t { background: #ede9fe; color: #5b21b6; }
.team-tag.buyer-t { background: #dbeafe; color: #1e40af; }
.team-tag.marketing-t { background: #ffedd5; color: #9a3412; }
.managed-badge {
  display: inline-flex; align-items: center; gap: 6px; background: var(--brand-light);
  color: var(--brand-dark); font-weight: 700; font-size: 12px; border-radius: 99px; padding: 3px 10px;
}
table.data input[type="number"] {
  font: inherit; font-size: 13px; border: 1px solid var(--hairline); border-radius: 8px;
  padding: 6px 8px; width: 100px; background: var(--surface); color: var(--ink);
}
table.data input[type="number"]:focus { border-color: var(--brand); outline: none; }

/* ---------- auth & profile menu ---------- */
.btn-auth {
  border: 1.5px solid var(--brand); color: var(--brand-dark); font-weight: 700;
  border-radius: 9px; padding: 8px 16px; background: var(--surface); white-space: nowrap;
}
.btn-auth:hover { background: var(--brand-light); }
.btn-auth.primary { background: var(--brand); color: #fff; }
.btn-auth.primary:hover { background: var(--brand-dark); }
.auth-tabs { display: flex; gap: 6px; margin-bottom: 14px; }
.auth-tabs button { flex: 1; padding: 9px; border-radius: 9px; font-weight: 700; background: var(--page); color: var(--ink-2); }
.auth-tabs button.active { background: var(--brand-light); color: var(--brand-dark); }
.profile-wrap { position: relative; }
.profile-wrap .avatar { cursor: pointer; border: 2px solid transparent; }
.profile-wrap .avatar:hover { border-color: var(--accent); }
.profile-menu {
  position: absolute; right: 0; top: 44px; background: var(--surface);
  border: 1px solid var(--ring); border-radius: 12px; width: 280px; z-index: 96;
  box-shadow: 0 14px 36px rgba(0,0,0,.16); overflow: hidden;
}
.profile-menu .p-head { padding: 13px 16px; border-bottom: 1px solid var(--hairline); }
.profile-menu .p-item {
  display: flex; width: 100%; text-align: left; gap: 8px; padding: 11px 16px;
  font-weight: 600; color: var(--ink-2); font-size: 13.5px; align-items: center;
}
.profile-menu .p-item:hover { background: var(--page); }

/* dokumen legal (CMS) */
.doc-body {
  white-space: pre-wrap; font-size: 13px; line-height: 1.65; color: var(--ink-2);
  background: var(--page); border: 1px solid var(--hairline); border-radius: 10px;
  padding: 14px 16px; max-height: 52vh; overflow-y: auto; margin-bottom: 12px;
}
@media (max-width: 900px) { .form-grid { grid-template-columns: 1fr; } }

.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--ink); color: #fff; padding: 11px 20px; border-radius: 10px; font-weight: 600;
  font-size: 13.5px; z-index: 200; box-shadow: 0 8px 24px rgba(0,0,0,.3); animation: pop .18s ease-out;
}
@keyframes pop { from { opacity: 0; transform: translate(-50%, 8px); } }

.notice {
  background: #eff6ff; border: 1px solid #bfdbfe; color: #1e3a8a;
  border-radius: 10px; padding: 12px 14px; font-size: 13px; margin-bottom: 16px;
}

/* ---------- ops console: tabs per departemen ---------- */
.admin-tabs {
  display: flex; gap: 6px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 16px;
  -webkit-overflow-scrolling: touch;
}
.admin-tabs button {
  white-space: nowrap; padding: 8px 15px; border-radius: 99px; font-weight: 700;
  background: var(--surface); border: 1px solid var(--hairline); color: var(--ink-2); font-size: 13px;
}
.admin-tabs button:hover { border-color: var(--brand); }
.admin-tabs button.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.dept-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.dept-card {
  background: var(--surface); border: 1px solid var(--ring); border-radius: 12px;
  padding: 16px; cursor: pointer; display: flex; flex-direction: column; gap: 5px;
  transition: transform .1s, box-shadow .1s;
}
.dept-card:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,.08); border-color: var(--brand); }
.dept-card .d-icon { font-size: 22px; }
.dept-card .d-members { border-top: 1px dashed var(--hairline); padding-top: 6px; margin-top: 4px; }
.member-cell { display: flex; align-items: center; gap: 8px; }
.member-cell .avatar { flex-shrink: 0; }

/* sub-menu di dalam divisi / landlord portal — target sentuh besar, ramah pengguna awam */
.sub-tabs {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
  gap: 10px; margin-bottom: 16px;
}
.sub-tab {
  display: flex; gap: 10px; align-items: center; text-align: left;
  background: var(--surface); border: 1.5px solid var(--hairline); border-radius: 12px;
  padding: 12px 14px; min-height: 62px;
}
.sub-tab .s-icon { font-size: 24px; flex-shrink: 0; }
.sub-tab b { display: block; font-size: 14px; color: var(--ink); }
.sub-tab small { color: var(--ink-3); font-size: 11.5px; line-height: 1.35; display: block; }
.sub-tab:hover { border-color: var(--brand); }
.sub-tab.active { border-color: var(--brand); background: var(--brand-light); box-shadow: 0 0 0 1px var(--brand); }
.sub-tab.active small { color: var(--brand-dark); }
.quick-actions { display: flex; flex-direction: column; gap: 8px; max-width: 420px; }
.quick-actions .cta { margin-top: 0; }
.staff-bar {
  display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--ring); border-radius: 10px;
  padding: 9px 14px; margin-bottom: 12px; font-size: 13.5px;
}

@media (max-width: 900px) {
  .detail-grid, .two-col { grid-template-columns: 1fr; }
  .search-bar { grid-template-columns: 1fr 1fr; }
}

/* ---------- mobile ---------- */
@media (max-width: 700px) {
  body { font-size: 14px; }
  main { padding: 14px 12px; }

  /* header & demo bar: jangan sticky bertumpuk di layar kecil */
  .demo-bar { position: static; font-size: 12px; padding: 8px 12px; gap: 8px; }
  .demo-bar > span:last-child { display: none; }
  .demo-bar select { max-width: 46vw; }
  header.site, .demo-bar + header.site { position: static; height: auto; flex-wrap: wrap; padding: 10px 12px; gap: 8px 10px; }
  .logo { font-size: 17px; }
  nav.main { order: 3; width: 100%; overflow-x: auto; gap: 2px; }
  nav.main button { padding: 7px 10px; font-size: 12.5px; white-space: nowrap; }
  .lang { display: none; }
  .whoami { font-size: 10.5px; max-width: 34vw; }
  .btn-auth { padding: 7px 12px; font-size: 13px; }
  .profile-menu { right: -6px; width: min(280px, 88vw); }

  /* hero & search */
  .hero { padding: 20px 16px 18px; border-radius: 12px; }
  .hero h1 { font-size: 19px; }
  h1 { font-size: 20px; }
  .search-bar { grid-template-columns: 1fr; }
  .grid { grid-template-columns: 1fr; }
  .map-wrap { height: 360px; }

  /* KPI & tabel: tabel discroll horizontal, jangan digepengkan */
  .kpis { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .kpi { padding: 12px 14px; }
  .kpi .value { font-size: 21px; }
  table.data { min-width: 560px; }
  .table-panel, .panel { padding: 14px; }
  .table-panel h2, .panel h2 { font-size: 16px; }

  /* modal jadi bottom-sheet */
  .modal-overlay { padding: 0; align-items: flex-end; }
  .modal { width: 100% !important; max-height: 94vh; border-radius: 16px 16px 0 0; }
  .modal .content { padding: 14px 16px 20px; }
  .opt-pill { padding: 8px 13px; font-size: 13.5px; }

  /* chat full-screen */
  .chat-panel { width: 100vw; }
  .chat-list { width: 104px; }
  .conv .preview { display: none; }
  .msg { max-width: 88%; }

  /* detail */
  .gallery .photo { height: 220px; font-size: 64px; }
  .thumbs .photo { height: 56px; font-size: 20px; }

  .form-grid { grid-template-columns: 1fr; }
  .dept-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 420px) {
  .dept-grid { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: 1fr 1fr; }
}
