:root {
  --bg: #f4f5f7; --card: #fff; --ink: #000033; --ink2: #3a3d44; --muted: #8a8f9c; --faint: #9aa0aa; --line: #e3e6ea; --line2: #eef0f3;
  --brand: #3757ae; --brand-ink: #fff; --navy: #324372; --soft: #eef1f7; --good: #1f8a5f; --warn: #d6483f; --amber: #b7791f;
  --r: 8px; --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 2px 10px rgba(16, 24, 40, .05);
  --sans: 'Inter', system-ui, -apple-system, sans-serif; --serif: 'Cormorant Garamond', Georgia, serif; --side: 236px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 14px/1.5 var(--sans); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--brand); }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.2; color: var(--ink); }
h1 { font: 700 26px/1.15 var(--sans); letter-spacing: -.01em; }
h2 { font-size: 20px; font-weight: 700; }
h3 { font-size: 18px; font-weight: 700; }
h4 { font-size: 14px; margin-top: 1.2em; }
.muted { color: var(--muted); }
.small, small { font-size: 12.5px; }
.fine { font-size: 12px; color: var(--muted); margin: .6em 0 0; }
.empty { color: var(--muted); margin: .4em 0; }
.warn { color: var(--warn); }
.good { color: var(--good); }
.pre { white-space: pre-wrap; }
.serif { font-family: var(--serif); }
.row { display: flex; align-items: center; gap: 8px; }
.row.wrap { flex-wrap: wrap; }
.row.gap { gap: 12px; margin-top: 12px; }
.row.between { justify-content: space-between; }
.row.end { justify-content: flex-end; }
.row.center { justify-content: center; }
.label { font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }

/* ---------- shell: sidebar + top bar (ThisHouse layout) ---------- */
.side { position: fixed; left: 0; top: 0; bottom: 0; width: var(--side); background: #fff; border-right: 1px solid rgba(16, 24, 40, .08); padding: 18px 12px; overflow-y: auto; z-index: 30; }
.brand { display: flex; flex-direction: column; padding: 2px 10px 16px; text-decoration: none; color: var(--ink); }
.brand b { font-size: 16px; font-weight: 700; letter-spacing: -.01em; }
.brand span { font-size: 12.5px; color: var(--muted); }
#sidenav { display: flex; flex-direction: column; gap: 2px; }
#sidenav .nav-label { font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 14px 10px 6px; border-top: 1px solid var(--line2); margin-top: 8px; }
#sidenav a { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 8px; color: #4a4f5c; text-decoration: none; font-size: 13.5px; font-weight: 500; }
#sidenav a svg { width: 17px; height: 17px; flex: 0 0 auto; stroke: #8a8f9c; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
#sidenav a:hover { background: #f5f6f8; }
#sidenav a.on { background: var(--soft); color: var(--navy); font-weight: 600; }
#sidenav a.on svg { stroke: var(--navy); }
#sidenav a .count { margin-left: auto; font-size: 11px; font-weight: 700; color: #fff; background: var(--warn); border-radius: 99px; min-width: 18px; text-align: center; padding: 0 5px; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 16px; margin-left: var(--side); padding: 0 28px; height: 58px; background: #fff; border-bottom: 1px solid rgba(16, 24, 40, .08); }
.crumbs { flex: 1; font-size: 13.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs b { color: var(--ink); font-weight: 600; }
.crumbs i { font-style: normal; margin: 0 7px; color: #c3c7cf; }
.top-right { display: flex; align-items: center; gap: 12px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--soft) center/cover; display: grid; place-items: center; font: 700 12px var(--sans); color: var(--navy); text-decoration: none; border: 1px solid var(--line); }
.menu-btn { display: none; border: 0; background: none; font-size: 20px; cursor: pointer; color: var(--ink); }
.demo-badge { font-size: 11.5px; font-weight: 600; color: var(--amber); }
.demo-badge.live { color: var(--good); }
.demo-badge.err { color: var(--warn); }
body.public .side, body.public .topbar { display: none; }

#view { margin-left: var(--side); padding: 28px 32px 80px; max-width: calc(1240px + var(--side)); }
body.public #view { margin: 0; max-width: none; padding: 0; }

/* ---------- buttons & inputs ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 15px; border-radius: 8px; border: 1px solid var(--brand); background: var(--brand); color: var(--brand-ink); font: 600 13.5px var(--sans); text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { filter: brightness(1.08); }
.btn.ghost { background: #fff; color: var(--navy); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn.small { padding: 6px 12px; font-size: 12.5px; }
.btn.good { background: var(--good); border-color: var(--good); }
.btn.wide { width: 100%; margin-top: 14px; }
.btn.upload { cursor: pointer; }
.btn[disabled] { opacity: .55; cursor: default; }
.link { background: none; border: 0; color: var(--brand); font: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; padding: 0; }
input, select, textarea { width: 100%; font: 14px var(--sans); color: var(--ink); padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
input:focus, select:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--brand) 30%, transparent); border-color: var(--brand); }
input[type=checkbox], input[type=radio] { width: auto; accent-color: var(--brand); }
input[type=color] { padding: 2px; height: 40px; }
textarea { resize: vertical; }
label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; font-weight: 600; color: var(--ink2); }
label small { font-weight: 400; color: var(--muted); }
label.check { flex-direction: row; align-items: flex-start; gap: 8px; font-weight: 500; margin: 8px 0; }
label.check small { display: block; }
label.check.head { font-size: 15px; margin-top: 0; }
label.inline { flex-direction: row; align-items: center; gap: 8px; }
label.inline input { width: auto; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; margin: 8px 0; }
.form-grid.three { grid-template-columns: repeat(3, 1fr); }
.form-grid.four { grid-template-columns: 2fr 1.2fr 1fr 1.2fr; }
.form-grid .span2 { grid-column: 1 / -1; }

/* ---------- cards: white, square, heading with a navy rule ---------- */
.card { background: var(--card); padding: 24px 28px; margin-bottom: 16px; box-shadow: var(--shadow); }
.card > h3, .card-head { border-bottom: 2px solid var(--ink); padding-bottom: 12px; margin-bottom: 16px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.card-head h3 { margin: 0; border: 0; padding: 0; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.two-col > .card { margin-bottom: 0; }
.two-col + .card, .card + .two-col, .two-col + .two-col { margin-top: 16px; }

.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head p { margin: 4px 0 0; }
.group-title { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; color: var(--muted); margin: 28px 0 12px; }

/* status: plain colored text, no pills */
.chip { display: inline-block; font-size: 11.5px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.s-draft { color: #6b6f78; }
.s-sent { color: var(--brand); }
.s-presented { color: var(--amber); }
.s-won { color: var(--good); }
.s-lost { color: var(--warn); }

/* appointments */
.appt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.appt { display: flex; gap: 14px; background: #fff; padding: 12px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); border: 1px solid transparent; transition: border-color .12s; }
.appt:hover { border-color: var(--line); }
.appt-img { flex: 0 0 104px; height: 88px; background: var(--soft) center/cover; }
.appt-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; font-size: 13px; }
.appt-body b { font: 700 18px/1.15 var(--serif); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.appt-act { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* workspace */
.ws-head { margin-bottom: 18px; }
.back { font-size: 14px; text-decoration: none; color: var(--muted); }
.ws-title { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-top: 6px; }
.ws-title p { margin: 0; }
.status-select { width: auto; font-weight: 600; }
.ws { display: grid; grid-template-columns: 220px 1fr; gap: 24px; align-items: start; }
.ws-steps { position: sticky; top: 78px; background: #fff; box-shadow: var(--shadow); padding: 10px; display: flex; flex-direction: column; gap: 2px; }
.ws-steps a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; font-size: 13.5px; text-decoration: none; color: var(--muted); font-weight: 500; }
.ws-steps a i { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--line); font-style: normal; font-size: 12px; font-weight: 600; background: #fff; }
.ws-steps a.done i { background: var(--good); border-color: var(--good); color: #fff; }
.ws-steps a.on { background: var(--soft); color: var(--navy); font-weight: 600; }
.ws-steps a.on i { border-color: var(--brand); color: var(--brand); }
.ws-steps a.on.done i { color: #fff; }
.ws-main { min-width: 0; }
.step-title { font: 700 22px var(--sans); margin-bottom: 6px; }
.step-intro { color: var(--muted); margin: 0 0 18px; max-width: 760px; }
.step-title span { display: block; font: 600 12px var(--sans); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 4px; }
.ws-foot { display: flex; justify-content: space-between; margin-top: 8px; }

/* photos */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 10px; }
.ph { position: relative; aspect-ratio: 3/2; border-radius: 8px; overflow: hidden; background: var(--soft); }
.ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph .cover { position: absolute; left: 6px; top: 6px; background: var(--ink); color: #fff; font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 2px 7px; border-radius: 3px; }
.ph-btn { position: absolute; left: 6px; bottom: 6px; font-size: 11px; border: 0; border-radius: 6px; padding: 3px 8px; background: rgba(255,255,255,.9); cursor: pointer; opacity: 0; }
.ph:hover .ph-btn { opacity: 1; }
.ph-x, .x { border: 0; background: rgba(255,255,255,.9); width: 26px; height: 26px; border-radius: 50%; cursor: pointer; font-size: 16px; line-height: 1; color: var(--muted); flex: 0 0 auto; }
.ph-x { position: absolute; right: 6px; top: 6px; }
.x:hover, .ph-x:hover { color: var(--warn); }

/* price */
.hc { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 8px 0 4px; }
.hc div { background: var(--soft); border-radius: 6px; padding: 12px 14px; display: flex; flex-direction: column; }
.hc span { font-size: 12px; color: var(--muted); }
.hc b { font-size: 20px; }
.hc small { color: var(--muted); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 8px; border-bottom: 1px solid #f0ece4; white-space: nowrap; }
tr.off td { color: #a7adb0; }
tr.off td:first-child { color: inherit; }
.est-row { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr auto; gap: 8px; align-items: end; margin: 8px 0; }
.suggest { background: #f4f7f1; border-radius: 10px; padding: 10px 14px; margin: 12px 0 0; }

/* plan */
.step-row { display: grid; grid-template-columns: auto 160px 1fr auto; gap: 8px; align-items: center; margin: 6px 0; }
#view [data-ohs] .step-row { grid-template-columns: 160px 1fr auto; }
.steps-edit { margin: 10px 0; }
.checks { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; margin-bottom: 10px; }

/* net sheet (shared with seller page) */
.sp-net { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; }
.sp-net .r { display: flex; justify-content: space-between; gap: 12px; padding: 11px 16px; border-bottom: 1px solid #f0ece4; }
.sp-net .r small { color: var(--muted); font-weight: 400; }
.sp-net .r.minus b { color: #5b6469; font-weight: 500; }
.sp-net .r.total { background: var(--soft); border-bottom: 0; font-size: 17px; }
.sp-net .r.total b { font-size: 20px; }

/* site step */
.tpl-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px; }
.tpl { border: 1.5px solid var(--line); border-radius: 12px; padding: 10px; cursor: pointer; font-weight: 400; }
.tpl input { display: none; }
.tpl.on { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 15%, transparent); }
.tpl b { font-size: 14px; color: var(--ink); }
.tpl small { color: var(--muted); }
.tpl-sw { display: block; height: 54px; border-radius: 8px; margin-bottom: 6px; }
.tpl-sw-modern { background: linear-gradient(135deg, #fff 0 50%, #1f2a30 50%); border: 1px solid var(--line); }
.tpl-sw-classic { background: linear-gradient(135deg, #f4efe4 0 60%, #7a2e2e 60%); }
.tpl-sw-country { background: linear-gradient(135deg, #e9e3d2 0 55%, #4f6b45 55%); }
.tpl-sw-luxury { background: linear-gradient(135deg, #111 0 60%, #b8975a 60%); }
.site-preview { height: 420px; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; position: relative; }

/* send step */
.linkbox { display: flex; gap: 8px; }
.linkbox input { font-size: 13px; color: var(--muted); }
.act-top { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.act-top div { background: var(--soft); border-radius: 6px; padding: 10px; display: flex; flex-direction: column; }
.act-top b { font-size: 18px; }
.act-top span { font-size: 12px; color: var(--muted); }
.bars { display: flex; flex-direction: column; gap: 8px; }
.bar { display: grid; grid-template-columns: 120px 1fr 60px; gap: 10px; align-items: center; font-size: 13px; }
.bar i { display: block; height: 10px; border-radius: 99px; background: var(--brand); opacity: .8; }
.bar b { font-weight: 500; text-align: right; color: var(--muted); }
.alert { background: #eef3f6; border-radius: 10px; padding: 10px 14px; margin: 14px 0 0; font-size: 14px; }
.alert.good { background: #e3f1e8; color: #1f5b37; margin: 0 0 14px; }
.qs { list-style: none; padding: 0; margin: 0; }
.qs li { padding: 10px 0; border-bottom: 1px solid #f0ece4; font-size: 14px; }
.qs li span { display: block; font-size: 12px; color: var(--muted); }

/* proof */
.headshot { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; }
.proof-row { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid #f0ece4; }
.proof-row .form-grid { flex: 1; margin: 0; }
.proof-row > label { flex: 1; }
.thumb { width: 90px; height: 60px; object-fit: cover; border-radius: 6px; }
.ba-slot { width: 110px; height: 74px; border: 1.5px dashed var(--line); border-radius: 8px; display: grid; place-items: center; overflow: hidden; cursor: pointer; flex: 0 0 auto; }
.ba-slot img { width: 100%; height: 100%; object-fit: cover; }
.ba-slot span { color: var(--muted); font-weight: 500; }
.conn .link { align-self: flex-start; }
.conn { border-top: 1px solid #f0ece4; padding: 12px 0; display: flex; flex-direction: column; gap: 4px; }

/* modal & toast */
.modal-wrap { position: fixed; inset: 0; background: rgba(20, 28, 34, .45); display: grid; place-items: center; z-index: 100; padding: 20px; }
.modal { background: #fff; border-radius: 10px; padding: 24px; max-width: 420px; width: 100%; position: relative; max-height: 90vh; overflow: auto; }
.modal.wide { max-width: 640px; }
.modal-close { position: absolute; right: 14px; top: 10px; border: 0; background: none; font-size: 26px; cursor: pointer; color: var(--muted); }
.tabs { display: flex; gap: 20px; border-bottom: 1px solid var(--line); margin: 8px 0 16px; }
.tab { border: 0; background: none; padding: 8px 0; margin-bottom: -1px; border-bottom: 2px solid transparent; font: 600 13.5px var(--sans); color: var(--muted); cursor: pointer; }
.tab.on { color: var(--ink); border-bottom-color: var(--ink); }
.lead-list { display: flex; flex-direction: column; gap: 8px; }
.lead { text-align: left; display: flex; flex-direction: column; gap: 2px; border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 12px 14px; cursor: pointer; font: 14px var(--sans); }
.lead:hover { border-color: var(--brand); }
.lightbox-img { width: 100%; border-radius: 10px; margin-bottom: 10px; }
#toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 10px; font-size: 14px; opacity: 0; transition: .2s; z-index: 200; pointer-events: none; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }

.preview-bar { position: sticky; top: 0; z-index: 30; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 16px; background: var(--ink); color: #fff; font-size: 13px; }
.preview-bar.demo { background: #8a5a00; }
.preview-bar .btn { background: #fff; color: var(--ink); border-color: #fff; }
.notfound { max-width: 480px; margin: 20vh auto; text-align: center; padding: 24px; }

@media (max-width: 860px) {
  .ws { grid-template-columns: 1fr; }
  .ws-steps { position: static; flex-direction: row; overflow-x: auto; }
  .ws-steps a { white-space: nowrap; }
  .two-col, .form-grid, .form-grid.three, .form-grid.four, .checks { grid-template-columns: 1fr; }
  .tpl-grid { grid-template-columns: 1fr 1fr; }
  .side { transform: translateX(-100%); transition: transform .2s; box-shadow: 0 0 40px rgba(0,0,0,.15); }
  body.nav-open .side { transform: none; }
  .topbar, #view { margin-left: 0; }
  .topbar { gap: 10px; padding: 0 12px; }
  .menu-btn { display: block; }
  .demo-badge, #top-new { display: none; }
  .act-top { grid-template-columns: 1fr 1fr 1fr; }
  .bar { grid-template-columns: 90px 1fr 50px; }
  #view { padding: 20px 14px 60px; }
  .card { padding: 18px 16px; }
  .dash { grid-template-columns: 1fr !important; }
  .step-row { grid-template-columns: auto 1fr auto; }
  .est-row { grid-template-columns: 1fr 1fr auto; }
  .step-row input[type=date] { grid-column: 2; }
}

/* ---------- Marketing step ---------- */
.mk-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.mk-types { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 4px 0 14px; border-bottom: 1px solid var(--line); }
.mk-types button { border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; background: none; padding: 7px 0; font: 600 13px var(--sans); color: var(--muted); cursor: pointer; }
.mk-types button.on { color: var(--ink); border-bottom-color: var(--ink); }
.mk-photos { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.mk-photos button { flex: 0 0 auto; width: 84px; height: 58px; border-radius: 8px; border: 2px solid transparent; padding: 0; background: var(--soft) center/cover; cursor: pointer; }
.mk-photos button.on { border-color: var(--brand); }
.mk-previews { display: flex; gap: 14px; align-items: flex-start; }
.mk-previews canvas { display: block; width: 100%; height: auto; border-radius: 10px; box-shadow: 0 6px 20px rgba(20,30,40,.12); background: #eee; }
.mk-sq { flex: 1.6; } .mk-st { flex: 1; }
.mk-previews small { display: block; text-align: center; color: var(--muted); margin-top: 6px; }
.mk-caption textarea { font-size: 13px; line-height: 1.5; }
.mk-tpls { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.mk-tpls .tpl { padding: 8px; }
.tpl-sw-clean { background: linear-gradient(180deg, #9fb3bf 0 64%, #fff 64%); border: 1px solid var(--line); }
.tpl-sw-classic { background: #f6f1e7; box-shadow: inset 0 0 0 8px #f6f1e7, inset 0 0 0 12px #fff; background-image: linear-gradient(#a7b49a, #a7b49a); background-size: 70% 50%; background-position: center 30%; background-repeat: no-repeat; }
.tpl-sw-bold { background: linear-gradient(180deg, #6d7f88, #1b2226); }
.canva-note { display: flex; gap: 10px; align-items: center; background: #f3f0fb; border-radius: 10px; padding: 10px 14px; font-size: 13px; color: #4b3d7a; margin-top: 12px; }
.sheet-preview { height: 520px; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: #e9e6df; display: grid; justify-items: center; padding: 16px 0; }
.sheet-preview .sheet-scale { transform: scale(.52); transform-origin: top center; width: 8.5in; }
@media (max-width: 860px) { .mk-grid { grid-template-columns: 1fr; } .mk-tpls { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Feature sheet (screen + print) ---------- */
#print-sheet { display: none; }
.fs { width: 8.5in; min-height: 11in; box-sizing: border-box; padding: .5in; background: #fff; color: #1f2a30; font-family: var(--fs-body, var(--sans)); display: flex; flex-direction: column; gap: 14px; box-shadow: 0 6px 24px rgba(0,0,0,.12); }
.fs-head { display: flex; justify-content: space-between; align-items: center; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; }
.fs-tag { color: #fff; background: var(--accent); padding: 6px 12px; border-radius: 6px; }
.fs-place { color: #6b7378; }
.fs-hero { height: 4.1in; border-radius: 8px; background: #cfd6d9 center/cover; }
.fs-title { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.fs-title h1 { font: 600 32px/1.1 var(--fs-head, var(--sans)); margin: 0; }
.fs-price { font: 600 26px var(--fs-head, var(--sans)); color: var(--accent); margin: 0; white-space: nowrap; }
.fs-facts { display: flex; border-top: 1px solid #e6e1d7; border-bottom: 1px solid #e6e1d7; }
.fs-facts div { flex: 1; text-align: center; padding: 8px 4px; border-right: 1px solid #e6e1d7; display: flex; flex-direction: column; }
.fs-facts div:last-child { border-right: 0; }
.fs-facts b { font-size: 17px; } .fs-facts span { font-size: 10px; text-transform: uppercase; letter-spacing: .1em; color: #6b7378; }
.fs-body { display: grid; grid-template-columns: 1fr 2.2in; gap: 18px; flex: 1; }
.fs-text p { font-size: 13px; line-height: 1.55; margin: 0 0 8px; }
.fs-text ul { columns: 2; font-size: 12.5px; line-height: 1.7; padding-left: 16px; margin: 6px 0 8px; }
.fs-oh { background: #f4f1ea; padding: 8px 10px; border-radius: 6px; }
.fs-side { display: flex; flex-direction: column; gap: 8px; }
.fs-thumb { height: 1.25in; border-radius: 6px; background: #cfd6d9 center/cover; }
.fs-foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; border-top: 2px solid var(--accent); padding-top: 12px; }
.fs-agent { display: flex; gap: 12px; align-items: center; flex: 1; }
.fs-agent img { width: 62px; height: 62px; border-radius: 50%; object-fit: cover; }
.fs-agent img.fs-logo { width: auto; height: 40px; border-radius: 0; margin-left: auto; }
.fs-agent div { display: flex; flex-direction: column; font-size: 12px; } .fs-agent b { font-size: 15px; } .fs-agent span { color: #6b7378; }
.fs-qr { display: flex; align-items: center; gap: 10px; font-size: 11px; color: #6b7378; line-height: 1.35; }
.fs-qr-code { width: 1in; height: 1in; } .fs-qr-code svg { width: 100%; height: 100%; display: block; }
.fs-fine { font-size: 9px; color: #8a9096; margin: 0; text-align: center; }
.fs-classic { background: #fbf8f2; }
.fs-classic .fs-title h1, .fs-classic .fs-price { font-weight: 600; }
.fs-classic .fs-head { justify-content: center; gap: 16px; }
.fs-classic .fs-hero { border-radius: 0; box-shadow: 0 0 0 6px #fff, 0 0 0 7px #e6dccb; margin: 6px; }
.fs-classic .fs-text p { font-size: 13.5px; }
.fs-bold .fs-hero { height: 4.6in; border-radius: 0; margin: -.5in -.5in 0; }
.fs-bold .fs-head { order: -2; }
.fs-bold .fs-title h1 { font-size: 36px; font-weight: 800; }
.fs-bold .fs-tag { font-size: 14px; }

@media print {
  @page { size: letter; margin: 0; }
  body.printing-sheet > *:not(#print-sheet) { display: none !important; }
  body.printing-sheet #print-sheet { display: block; }
  body.printing-sheet .fs { box-shadow: none; width: 8.5in; height: 11in; }
  body.printing-sheet { background: #fff; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
.mk-grid > div, .mk-previews > div { min-width: 0; }
.sheet-preview { max-width: 100%; }
@media (max-width: 860px) { .sheet-preview { height: 360px; } .sheet-preview .sheet-scale { transform: scale(.4); } .mk-tpls small { display: none; } }

/* ---------- Sign-in ---------- */
.auth { max-width: 380px; margin: 12vh auto; padding: 32px; background: #fff; box-shadow: var(--shadow); }
.auth-brand span { font-size: 12.5px; color: var(--muted); font-weight: 400; }
.auth-brand { display: flex; flex-direction: column; margin-bottom: 18px; font-weight: 700; font-size: 16px; }
.auth h1 { font-size: 24px; margin-bottom: 14px; }
.auth-form { display: flex; flex-direction: column; gap: 12px; }
.auth-note { background: #eef3f6; border-radius: 10px; padding: 10px 12px; font-size: 14px; }
.auth-err { color: var(--warn); font-size: 14px; margin: 0; }
.auth-links { display: flex; justify-content: space-between; margin-top: 14px; font-size: 14px; }
.demo-badge.err { background: #f5e6e1; color: var(--warn); }

/* ---------- Home ---------- */
.dash { display: grid; grid-template-columns: 1.35fr 1fr; gap: 16px; align-items: start; margin-bottom: 16px; }
.dash > .card { margin-bottom: 0; }
.hello { margin-bottom: 22px; }
.hello h1 { margin-bottom: 2px; }
.how { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; }
.how > div { padding: 2px 22px 4px; border-left: 1px solid var(--line); }
.how > div:first-child { border-left: 0; padding-left: 0; }
.how .label { color: var(--brand); }
.how h4 { font-size: 16px; margin: 6px 0 6px; }
.how p { margin: 0 0 10px; color: var(--ink2); font-size: 13.5px; }
.how ul { margin: 0; padding-left: 16px; color: var(--muted); font-size: 12.5px; line-height: 1.7; }
.todo { list-style: none; margin: 0; padding: 0; }
.todo li { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line2); }
.todo li:last-child { border-bottom: 0; }
.todo .tick { flex: 0 0 auto; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid #c3c7cf; display: grid; place-items: center; font-size: 11px; color: #fff; }
.todo li.done .tick { background: var(--good); border-color: var(--good); }
.todo li.done .todo-t { color: var(--muted); text-decoration: line-through; }
.todo .todo-t { flex: 1; font-weight: 600; font-size: 13.5px; }
.todo .todo-t small { display: block; font-weight: 400; color: var(--muted); text-decoration: none; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 16px 18px; }
.timeline li::before { content: ''; position: absolute; left: 0; top: 6px; width: 6px; height: 6px; border-radius: 50%; background: var(--brand); }
.timeline li::after { content: ''; position: absolute; left: 2.5px; top: 14px; bottom: 2px; width: 1px; background: var(--line); }
.timeline li:last-child::after { display: none; }
.timeline .when { font-size: 10.5px; font-weight: 600; color: var(--faint); text-transform: uppercase; letter-spacing: .04em; }
.timeline a { display: block; color: var(--ink); text-decoration: none; font-size: 14px; }
.timeline a:hover { color: var(--brand); }
.attn { list-style: none; margin: 0; padding: 0; }
.attn li { border-bottom: 1px solid var(--line2); }
.attn li:last-child { border-bottom: 0; }
.attn a { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; text-decoration: none; color: var(--ink); }
.attn b { font-size: 12.5px; display: block; }
.attn span { font-size: 11.5px; color: var(--faint); }
.attn em { font-style: normal; font-size: 11px; font-weight: 600; white-space: nowrap; color: var(--faint); }
.attn em.hot { color: var(--warn); }
.attn em.ok { color: var(--good); }

/* house cards (Home, Listings) */
.houses { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; }
.house { text-decoration: none; color: var(--ink); display: block; }
.house-img { aspect-ratio: 3/2; background: var(--soft) center/cover; margin-bottom: 8px; }
.house b { font: 700 18px/1.15 var(--serif); display: block; }
.house span { font-size: 12px; color: var(--muted); display: block; }
.house .ready { font-size: 11px; font-weight: 600; color: var(--brand); margin-top: 2px; }
.house .ready.full { color: var(--good); }
.sample-tag { font: 700 10px var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--amber); margin-left: 6px; vertical-align: middle; }
.empty-box { border: 1.5px dashed var(--line); padding: 26px; text-align: center; color: var(--muted); }
.empty-box p { margin: 0 0 12px; }

/* Listings page */
.lst { display: grid; grid-template-columns: 220px 1fr; gap: 22px; }
.lst-img { aspect-ratio: 3/2; background: var(--soft) center/cover; }
.lst h3 { font: 700 24px/1.1 var(--serif); margin: 0 0 2px; }
.ready-list { list-style: none; padding: 0; margin: 12px 0; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 20px; font-size: 13px; }
.ready-list li { display: flex; gap: 8px; align-items: center; }
.ready-list li i { font-style: normal; width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid #c3c7cf; display: grid; place-items: center; font-size: 9px; color: #fff; flex: 0 0 auto; }
.ready-list li.done i { background: var(--good); border-color: var(--good); }
.ready-list li a { color: var(--ink); text-decoration: none; }
.ready-list li a:hover { color: var(--brand); text-decoration: underline; }
.lst-stats { display: flex; gap: 26px; margin-top: 8px; }
.lst-stats div { display: flex; flex-direction: column; }
.lst-stats b { font-size: 20px; }
.lst-stats span { font-size: 11px; color: var(--muted); }

/* Marketing gallery */
.gal { display: grid; gap: 16px; }
.gal-posts { grid-template-columns: repeat(3, 1fr); }
.gal-sites { grid-template-columns: repeat(4, 1fr); }
.gal-sheets { grid-template-columns: repeat(3, 1fr); }
.gal-item { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--ink); cursor: pointer; background: none; border: 0; padding: 0; font: inherit; text-align: left; }
.gal-item canvas { width: 100%; height: auto; display: block; box-shadow: 0 4px 16px rgba(16,24,40,.12); background: #eee; }
.gal-item b { font-size: 13.5px; }
.gal-item span { font-size: 12px; color: var(--muted); }
.gal-frame { height: 300px; overflow: hidden; position: relative; border: 1px solid var(--line); background: #fff; }
.gal-frame .gal-scale { position: absolute; left: 0; top: 0; width: 1280px; transform: scale(.22); transform-origin: top left; pointer-events: none; }
.gal-item { min-width: 0; }
.gal-sheet { height: 330px; overflow: hidden; border: 1px solid var(--line); background: #e9e6df; position: relative; }
.gal-sheet .sheet-scale { position: absolute; left: 50%; top: 10px; width: 8.5in; transform: translateX(-50%) scale(.36); transform-origin: top center; }
.gal-pick { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.gal-pick select { width: auto; min-width: 260px; }
@media (max-width: 1100px) { .gal-sites { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 860px) {
  .how { grid-template-columns: 1fr; } .how > div { border-left: 0; padding: 12px 0; border-top: 1px solid var(--line); } .how > div:first-child { border-top: 0; }
  .lst { grid-template-columns: 1fr; } .ready-list { grid-template-columns: 1fr; }
  .gal-posts, .gal-sheets, .gal-sites { grid-template-columns: 1fr 1fr; }
}

/* marketing: look controls */
.mk-tpls { grid-template-columns: repeat(6, 1fr); }
.tpl-sw-editorial { background: linear-gradient(180deg, #a9b8a4 0 58%, #f7f4ee 58%); border: 1px solid var(--line); }
.tpl-sw-minimal { background: #6d7f88; box-shadow: inset 0 0 0 5px #6d7f88, inset 0 0 0 6px #fff; }
.tpl-sw-collage { background: linear-gradient(90deg, #8fa3ad 0 60%, #fff 60% 63%, transparent 63%), linear-gradient(180deg, #b7c4b0 0 48%, #fff 48% 52%, #c9b9a3 52%); border: 1px solid var(--line); }
.mk-look { display: grid; grid-template-columns: 1.3fr 1fr; gap: 20px; margin-top: 14px; }
.font-opts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.font-opt { border: 1px solid var(--line); background: #fff; padding: 8px 12px; cursor: pointer; display: flex; flex-direction: column; align-items: flex-start; min-width: 96px; border-radius: 6px; font: inherit; }
.font-opt b { font-size: 24px; line-height: 1.1; font-weight: 500; }
.font-opt span { font-size: 11px; color: var(--muted); font-weight: 600; }
.font-opt.on { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 6px; }
.sw { width: 30px; height: 30px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); cursor: pointer; padding: 0; }
.sw.on { box-shadow: 0 0 0 2px var(--ink); }
.sw-brand { background: conic-gradient(from 0deg, var(--b) 0 100%); }
.swatches input[type=color] { width: 38px; height: 32px; padding: 2px; }
.carousel { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.carousel canvas { width: 100%; height: auto; display: block; box-shadow: 0 2px 10px rgba(16,24,40,.12); background: #eee; }
@media (max-width: 1100px) { .mk-tpls { grid-template-columns: repeat(3, 1fr); } .mk-look { grid-template-columns: 1fr; } .carousel { grid-template-columns: repeat(3, 1fr); } }

/* first-run tour */
.modal.tour-modal { max-width: 520px; padding: 36px 36px 26px; }
.tour { text-align: left; }
.tour-art { width: 56px; height: 56px; border-radius: 50%; background: var(--soft); display: grid; place-items: center; margin-bottom: 18px; }
.tour-art svg { width: 26px; height: 26px; stroke: var(--brand); fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tour .label { color: var(--brand); }
.tour h2 { font-size: 22px; margin: 6px 0 10px; }
.tour p { color: var(--ink2); margin: 0 0 22px; min-height: 72px; }
.tour-dots { display: flex; gap: 6px; margin-bottom: 20px; }
.tour-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--line); }
.tour-dots i.on { background: var(--ink); width: 20px; border-radius: 4px; }

/* comp adjustments */
.muted-link { color: var(--muted); font-weight: 500; }
.adj-quick { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 10px 0 14px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.adj-row { display: grid; grid-template-columns: 1fr 160px 28px; gap: 8px; margin-bottom: 8px; align-items: center; }
.adj-total { display: flex; justify-content: space-between; align-items: baseline; border-top: 2px solid var(--ink); padding-top: 12px; margin: 14px 0 4px; }
.adj-total b { font-size: 20px; }
.sp-adj { display: block; color: var(--muted); font-size: 11.5px; margin-top: 2px; }
.ws-progress { font-size: 11px; font-weight: 600; color: var(--muted); padding: 6px 10px 8px; border-bottom: 1px solid var(--line2); margin-bottom: 4px; }
.ws-progress i { display: block; height: 3px; background: var(--line2); margin-top: 6px; border-radius: 2px; }
.ws-progress i b { display: block; height: 100%; background: var(--good); border-radius: 2px; }

/* =====================================================================
   Modern app look: neutral greys, black actions, rounded cards,
   photos carry the color. Overrides the rules above.
   ===================================================================== */
:root {
  --bg: #f3f3f1; --card: #fff; --ink: #111; --ink2: #3b3b3b; --muted: #777; --faint: #9b9b9b;
  --line: #e7e7e4; --line2: #f0f0ee; --brand: #111; --navy: #111; --soft: #ececea;
  --r: 16px; --shadow: none; --side: 248px;
}
body { background: var(--bg); }
a { color: var(--ink); }
h1 { font-size: 28px; letter-spacing: -.02em; }

/* sidebar */
.side { background: var(--bg); border-right: 0; padding: 22px 14px; }
.brand { padding: 0 10px 18px; }
.brand b { font-size: 19px; letter-spacing: -.03em; }
.create-wrap { position: relative; margin: 0 4px 16px; }
.create-btn { width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px; background: #111; color: #fff; border: 0; border-radius: 999px; padding: 11px 16px; font: 600 14px var(--sans); cursor: pointer; }
.create-btn span { font-size: 18px; line-height: 1; margin-top: -2px; }
.create-btn:hover { background: #2a2a2a; }
.create-menu { position: absolute; left: 0; right: -40px; top: calc(100% + 8px); background: #fff; border-radius: 16px; box-shadow: 0 12px 40px rgba(0,0,0,.14); padding: 8px; z-index: 50; }
.create-menu button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 10px 12px; border-radius: 10px; cursor: pointer; font: inherit; }
.create-menu button:hover { background: var(--bg); }
.create-menu b { display: block; font-size: 14px; }
.create-menu small { color: var(--muted); font-size: 12px; }
#sidenav .nav-label { border-top: 0; margin-top: 4px; padding: 16px 12px 6px; }
#sidenav a { border-radius: 10px; color: #3b3b3b; font-size: 14px; padding: 9px 12px; }
#sidenav a svg { stroke: #6f6f6f; }
#sidenav a:hover { background: #eaeae7; }
#sidenav a.on { background: #e4e4e0; color: #111; }
#sidenav a.on svg { stroke: #111; }
#sidenav a .count { background: #111; }

/* main panel: white, rounded where it meets the sidebar */
.topbar { background: #fff; border-bottom: 1px solid var(--line2); margin-top: 10px; border-radius: 24px 0 0 0; height: 60px; padding: 0 32px; }
#view { background: #fff; min-height: calc(100vh - 70px); padding: 30px 36px 90px; max-width: none; }
body.public #view { background: transparent; min-height: 0; }
.crumbs b { font-weight: 600; }
.demo-badge { font-size: 12px; }

/* buttons, inputs */
.btn { border-radius: 999px; background: #111; border-color: #111; padding: 9px 18px; }
.btn:hover { filter: none; background: #2a2a2a; }
.btn.ghost { background: #fff; color: #111; border-color: var(--line); }
.btn.ghost:hover { border-color: #111; color: #111; background: #fff; }
.btn.small { padding: 6px 14px; }
.btn.good { background: var(--good); border-color: var(--good); }
.link { color: #111; }
input, select, textarea { border-radius: 10px; border-color: var(--line); background: #fafaf9; }
input:focus, select:focus, textarea:focus { background: #fff; border-color: #111; outline: 2px solid rgba(0,0,0,.08); }
input[type=checkbox], input[type=radio] { accent-color: #111; }

/* cards */
.card { border-radius: var(--r); border: 1px solid var(--line); box-shadow: none; padding: 22px 24px; }
.card > h3, .card-head { border-bottom: 0; padding-bottom: 0; margin-bottom: 14px; }
.card > h3, .card-head h3 { font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.label, #sidenav .nav-label, .group-title { letter-spacing: .06em; }
.empty-box { border-radius: 14px; border-color: var(--line); background: #fafaf9; }

/* status: soft pill with a colored dot */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; background: #f2f2f0; color: #333; font-size: 12px; }
.chip::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #aaa; }
.chip.s-sent::before { background: #3b82f6; }
.chip.s-presented::before { background: #e0a100; }
.chip.s-won::before { background: #22a06b; }
.chip.s-lost::before { background: #d9534f; }

/* appointment and house cards */
.appt { border-radius: var(--r); border: 1px solid var(--line); box-shadow: none; padding: 10px; }
.appt:hover { border-color: #cfcfcb; }
.appt-img { border-radius: 12px; }
.appt-body b { font: 700 16px/1.25 var(--sans); letter-spacing: -.01em; }
.house-img, .lst-img { border-radius: 14px; }
.house b, .lst h3 { font-family: var(--sans); letter-spacing: -.01em; }
.house b { font-size: 15px; }
.lst h3 { font-size: 22px; }
.house .ready { color: #555; }

/* today */
.hello h1 { font-size: 30px; }
.todo .tick { border-color: #cfcfcb; }
.timeline li::before { background: #111; }
.attn em.hot { color: #d9534f; }

/* workspace */
.ws-steps { border-radius: var(--r); border: 1px solid var(--line); box-shadow: none; }
.ws-steps a.on { background: var(--bg); color: #111; }
.ws-steps a.on i { border-color: #111; color: #111; }
.ws-progress i b { background: #111; }
.step-title span { color: var(--muted); }

/* filters as pills (Rechat-style), section tabs stay underlined */
.mk-types { border-bottom: 0; gap: 8px; }
.mk-types button { border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; margin: 0; }
.mk-types button.on { background: #111; color: #fff; border-color: #111; }
.font-opt { border-radius: 12px; }
.gal-item canvas { border-radius: 10px; }
.gal-frame, .gal-sheet { border-radius: 12px; }
.modal { border-radius: 20px; }
.tour-art { background: var(--bg); }
.tour-art svg { stroke: #111; }
.tour-dots i.on { background: #111; }

/* phone: bottom tab bar and a create button, like a native app */
.tabbar, .fab { display: none; }
@media (max-width: 860px) {
  .topbar { margin-top: 0; border-radius: 0; padding: 0 14px; }
  #view { padding: 20px 16px 110px; min-height: 100vh; }
  .menu-btn { display: none; }
  .tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: rgba(255,255,255,.96); backdrop-filter: blur(10px); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; text-decoration: none; color: #8a8a8a; font-size: 10.5px; font-weight: 600; padding: 4px 0; }
  .tabbar a svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
  .tabbar a.on { color: #111; }
  .fab { display: grid; place-items: center; position: fixed; right: 18px; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 41; width: 54px; height: 54px; border-radius: 50%; border: 0; background: #111; color: #fff; font-size: 28px; line-height: 1; box-shadow: 0 8px 24px rgba(0,0,0,.25); cursor: pointer; }
  body.public .tabbar, body.public .fab { display: none; }
  .create-menu { right: 0; }
}
.sp-net .r b { white-space: nowrap; }
.sp-net .r span small { display: block; }
label.check > span { display: block; }

/* setup: small widget in the sidebar, a strip on phones, checklist in a window */
.setup-widget { display: block; width: calc(100% - 8px); margin: 18px 4px 0; text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; cursor: pointer; font: inherit; }
.setup-widget:hover { border-color: #cfcfcb; }
.setup-widget b { display: block; font-size: 13.5px; }
.setup-widget span { font-size: 12px; color: var(--muted); }
.setup-widget i, .setup-strip i, .setup-bar { display: block; height: 4px; background: var(--line2); border-radius: 2px; margin-top: 8px; overflow: hidden; }
.setup-widget i b, .setup-strip i b, .setup-bar b { display: block; height: 100%; background: #111; border-radius: 2px; }
.setup-bar { margin: 4px 0 10px; height: 5px; }
.setup-strip { display: none; }
.modal.setup-modal { max-width: 560px; }
@media (max-width: 860px) {
  .setup-strip { display: block; width: 100%; text-align: left; border: 1px solid var(--line); background: #fafaf9; border-radius: 14px; padding: 12px 14px; margin-bottom: 18px; font: inherit; font-size: 13.5px; cursor: pointer; }
}

/* ---------- top bar: search, bell, account ---------- */
.topbar { gap: 14px; }
.crumbs { flex: 0 1 auto; min-width: 0; }
.search-btn { margin-left: auto; display: flex; align-items: center; gap: 10px; width: min(340px, 34vw); padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; background: #fafaf9; color: var(--muted); font: 500 13px var(--sans); cursor: pointer; }
.search-btn:hover { border-color: #cfcfcb; }
.search-btn svg, .bell svg, .pal-in svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; flex: 0 0 auto; }
.search-btn span { flex: 1; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-btn kbd { font: 600 11px var(--sans); color: #888; background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; }
.top-right { margin-left: 0; }
.bell { position: relative; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: #fff; display: grid; place-items: center; cursor: pointer; color: #222; }
.bell svg { width: 17px; height: 17px; stroke-width: 1.8; }
.bell:hover, .avatar:hover { border-color: #cfcfcb; }
.bell i { position: absolute; top: 6px; right: 7px; width: 8px; height: 8px; border-radius: 50%; background: #e5484d; border: 2px solid #fff; }
button.avatar { cursor: pointer; padding: 0; }

/* popover menus */
.pop { position: absolute; z-index: 300; min-width: 220px; max-width: 360px; background: #fff; border-radius: 14px; box-shadow: 0 12px 40px rgba(0,0,0,.16), 0 0 0 1px rgba(0,0,0,.04); padding: 6px; opacity: 0; transform: translateY(-4px) scale(.98); transform-origin: top; transition: opacity .14s ease, transform .14s ease; }
.pop.open { opacity: 1; transform: none; }
.pop button { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: 0; background: none; padding: 9px 10px; border-radius: 9px; cursor: pointer; font: inherit; font-size: 13.5px; color: #111; }
.pop button:hover { background: var(--bg); }
.pop button b { font-weight: 600; display: block; }
.pop button small { display: block; color: var(--muted); font-size: 12px; }
.pop button.on { background: var(--bg); }
.pop button.danger b { color: #d23c3c; }
.pop hr { border: 0; border-top: 1px solid var(--line2); margin: 4px 6px; }
.pop-head { padding: 10px 10px 8px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.pop-head.acct { text-transform: none; letter-spacing: 0; }
.pop-head.acct b { display: block; color: #111; font-size: 14px; }
.pop-head.acct small { font-weight: 500; font-size: 12px; }
.pop-empty { padding: 10px; margin: 0; color: var(--muted); font-size: 13px; }
.pop .notif { align-items: flex-start; }
.pop .notif span:nth-child(2) { flex: 1; }
.pop .notif em { font-style: normal; font-size: 11px; color: var(--faint); white-space: nowrap; }
.pop .nd { width: 8px; height: 8px; border-radius: 50%; background: #9b9b9b; margin-top: 6px; flex: 0 0 auto; }
.pop .nd.hot { background: #e5484d; }
.pop .nd.ok { background: #22a06b; }
.status-btn { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 4px 8px 4px 4px; cursor: pointer; }
.status-btn .chip { background: none; }
.status-btn svg { width: 14px; height: 14px; stroke: #666; fill: none; stroke-width: 2; }
.status-btn:hover { border-color: #cfcfcb; }
.pop button .chip { background: none; padding-left: 0; min-width: 96px; }
.icon-btn { padding: 8px 12px; font-size: 18px; line-height: 1; letter-spacing: 1px; }

/* search palette */
.modal.pal-modal { max-width: 600px; padding: 0; overflow: hidden; align-self: flex-start; margin-top: 12vh; }
.pal-modal .modal-close { display: none; }
.pal-in { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line2); color: #888; }
.pal-in svg { width: 18px; height: 18px; }
.pal-in input { border: 0; background: none; padding: 4px 0; font-size: 16px; outline: none; }
.pal-in input:focus { outline: none; background: none; }
.pal-list { max-height: 50vh; overflow-y: auto; padding: 6px; }
.pal-g { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); padding: 10px 10px 4px; }
.pal-row { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; background: none; text-align: left; padding: 8px 10px; border-radius: 10px; cursor: pointer; font: inherit; }
.pal-row.on, .pal-row:hover { background: var(--bg); }
.pal-row b { display: block; font-size: 14px; font-weight: 600; }
.pal-row small { color: var(--muted); font-size: 12px; }
.pal-img { width: 40px; height: 30px; border-radius: 6px; background: var(--soft) center/cover; flex: 0 0 auto; }
.pal-img.none { width: 0; }
.pal-foot { display: flex; gap: 18px; padding: 10px 18px; border-top: 1px solid var(--line2); font-size: 11.5px; color: var(--faint); }

/* loading placeholders */
.skel { padding: 4px 0; }
.skel.pub { max-width: 900px; margin: 0 auto; padding: 20px; }
.sk { display: block; background: linear-gradient(90deg, #efefed 25%, #f7f7f5 50%, #efefed 75%); background-size: 200% 100%; animation: sk 1.3s ease-in-out infinite; border-radius: 8px; }
.sk.h1 { height: 34px; width: 280px; margin-bottom: 12px; }
.sk.line { height: 12px; margin: 10px 0; }
.sk.w20 { width: 20%; } .sk.w30 { width: 30%; } .sk.w40 { width: 40%; } .sk.w60 { width: 60%; } .sk.w70 { width: 70%; } .sk.w80 { width: 80%; }
.sk.card { background: none; animation: none; border: 1px solid var(--line); border-radius: 16px; padding: 20px; margin-top: 18px; flex: 1; }
.sk.img { height: 140px; flex: 1; border-radius: 12px; }
.sk.hero { height: 280px; border-radius: 16px; margin-bottom: 20px; }
.sk-row { display: flex; gap: 16px; }
@keyframes sk { to { background-position: -200% 0; } }

/* small motion */
.btn, .create-btn, .bell, .avatar, .search-btn, .status-btn { transition: background-color .15s, border-color .15s, transform .08s; }
.btn:active, .create-btn:active, .bell:active, .status-btn:active { transform: scale(.97); }
.modal-wrap { animation: fadeIn .15s ease; }
.modal { animation: popIn .18s ease; }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes popIn { from { opacity: 0; transform: translateY(6px) scale(.98); } }

@media (max-width: 860px) {
  .search-btn { width: 40px; padding: 0; height: 36px; justify-content: center; border-radius: 50%; }
  .search-btn span, .search-btn kbd { display: none; }
  .crumbs { flex: 1; }
}
.form-grid .span3 { grid-column: 1 / -1; }
.rec-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px 20px; }
.rec-grid div { display: flex; flex-direction: column; }
.rec-grid span { font-size: 11.5px; color: var(--muted); }
.rec-grid b { font-size: 14.5px; font-weight: 600; }
@media (max-width: 700px) { .rec-grid { grid-template-columns: 1fr 1fr; } .form-grid.three { grid-template-columns: 1fr 1fr; } }

/* Price step: CMA */
.form-grid.mkt { grid-template-columns: repeat(4, 1fr); }
.form-grid.mkt .span2 { grid-column: 1 / -1; }
.cma-agent { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.cma-agent div { padding: 12px 14px; display: flex; flex-direction: column; border-right: 1px solid var(--line); min-width: 0; }
.cma-agent div:last-child { border-right: 0; }
.cma-agent span { font-size: 11px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.cma-agent b { font-size: 20px; font-weight: 650; letter-spacing: -.01em; margin-top: 2px; }
.cma-agent small { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cma-sum .cma-range { margin-bottom: 0; }
.value-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin: 6px 0 16px; }
.value-opt { text-align: left; border: 1px solid var(--line); background: #fff; border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; cursor: pointer; font: inherit; color: inherit; transition: border-color .15s, box-shadow .15s; }
.value-opt:hover { border-color: #111; }
.value-opt.on { border-color: #111; box-shadow: inset 0 0 0 1px #111; }
.value-opt span { font-size: 12px; color: var(--muted); font-weight: 600; }
.value-opt b { font-size: 20px; font-weight: 650; }
.value-opt small { font-size: 12px; color: var(--muted); }
@media (max-width: 1100px) { .cma-agent { grid-template-columns: repeat(3, 1fr); } .cma-agent div:nth-child(3) { border-right: 0; } .cma-agent div:nth-child(-n+3) { border-bottom: 1px solid var(--line); } }
@media (max-width: 860px) { .form-grid.mkt { grid-template-columns: 1fr 1fr; } .cma-agent { grid-template-columns: 1fr 1fr; } .cma-agent div { border-bottom: 1px solid var(--line); } }
.site-sw-editorial { background: linear-gradient(180deg, #8c8a80 0 56%, #f8f7f3 56%); border: 1px solid var(--line); }
.site-sw-noir { background: linear-gradient(180deg, #5d5f5a 0 56%, #1f2120 56% 80%, #e6e2d6 80%); }
.site-sw-modern { background: linear-gradient(180deg, #9aa5ab 0 56%, #fff 56% 80%, #141414 80%); border: 1px solid var(--line); }
.site-sw-classic { background: linear-gradient(180deg, #a49a88 0 56%, #fbf8f2 56% 80%, #5a2424 80%); border: 1px solid var(--line); }
.site-sw-country { background: linear-gradient(180deg, #8e9a7e 0 56%, #f5f2e9 56% 80%, #3f5638 80%); border: 1px solid var(--line); }
.site-sw-luxury { background: linear-gradient(180deg, #4a4a48 0 56%, #0f0f0f 56% 80%, #b8975a 80%); }
.modal:has(.cma-preview) { max-width: 980px; }

/* Appointments board */
.seg { display: inline-flex; background: #ebebe8; border-radius: 99px; padding: 3px; margin-right: 8px; }
.seg button { border: 0; background: transparent; padding: 7px 14px; border-radius: 99px; font: 600 13px var(--sans, Inter, sans-serif); color: var(--muted); cursor: pointer; }
.seg button.on { background: #fff; color: #111; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.board { display: grid; grid-template-columns: repeat(5, minmax(210px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 12px; align-items: start; }
.bcol { background: #ececea; border-radius: 16px; padding: 10px; min-height: 240px; transition: background .15s, box-shadow .15s; }
.bcol.over { background: #e2e2de; box-shadow: inset 0 0 0 2px #111; }
.bcol header { display: flex; justify-content: space-between; align-items: center; padding: 4px 4px 10px; font-size: 12px; }
.bcol-body { display: flex; flex-direction: column; gap: 8px; min-height: 60px; }
.bcol-empty { font-size: 12px; color: #9a9a96; text-align: center; padding: 18px 0; border: 1.5px dashed #d4d4d0; border-radius: 12px; margin: 0; }
.bcard { display: flex; flex-direction: column; gap: 2px; background: #fff; border-radius: 12px; padding: 10px 12px 12px; text-decoration: none; color: inherit; box-shadow: 0 1px 2px rgba(0,0,0,.05); cursor: grab; transition: transform .12s, box-shadow .12s; }
.bcard:hover { box-shadow: 0 6px 18px rgba(0,0,0,.08); transform: translateY(-1px); }
.bcard.dragging { opacity: .45; }
.bcard-img { height: 92px; border-radius: 8px; background: #ddd center/cover; margin: -2px -4px 8px; }
.bcard b { font-size: 14px; line-height: 1.3; }
.bcard .muted { font-size: 12.5px; }
.bcard-meta { display: flex; justify-content: space-between; font-size: 12.5px; margin-top: 6px; font-weight: 500; }
.bcard-act { font-size: 12px; color: var(--muted); margin-top: 4px; }
@media (max-width: 860px) { .board { grid-template-columns: repeat(5, 78vw); scroll-snap-type: x mandatory; } .bcol { scroll-snap-align: start; } }

/* Listing traffic report + share links */
.traffic { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin: 16px 0 12px; padding-top: 14px; border-top: 1px solid var(--line); }
.traffic h4 { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin: 0 0 10px; }
.traffic-empty { margin: 12px 0; }
.tr-row { display: grid; grid-template-columns: 120px 1fr auto; gap: 10px; align-items: center; font-size: 13px; padding: 4px 0; }
.tr-row i { height: 8px; background: #efefec; border-radius: 99px; overflow: hidden; }
.tr-row i b { display: block; height: 100%; background: #111; border-radius: 99px; }
.tr-row em { font-style: normal; color: var(--muted); font-size: 12px; white-space: nowrap; }
.tr-leads { list-style: none; padding: 0; margin: 0; }
.tr-leads li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.tr-leads li:last-child { border-bottom: 0; }
.tr-leads p { margin: 2px 0 0; color: #444; }
.tr-leads .small { text-align: right; flex: 0 0 auto; }
.modal:has(.share-list) { max-width: 760px; }
.share-list { display: flex; flex-direction: column; }
.share-row { display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.share-qr svg { width: 64px; height: 64px; display: block; }
.share-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.share-txt input { font-size: 12px; padding: 6px 8px; margin-top: 4px; color: var(--muted); }
.share-act { display: flex; flex-direction: column; gap: 6px; }
@media (max-width: 760px) { .traffic { grid-template-columns: 1fr; } .share-row { grid-template-columns: 52px 1fr; } .share-act { grid-column: 1 / -1; flex-direction: row; } }

/* Postcard 6 x 9 */
.pc { --pc-head: 'Fraunces', Georgia, serif; --pc-body: Inter, sans-serif; font-family: var(--pc-body); color: #111; }
.pc-page { width: 9in; height: 6in; position: relative; overflow: hidden; box-sizing: border-box; background: #fff; }
.pc-front { background: #555 center/cover; color: #fff; display: flex; align-items: flex-end; }
.pc-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 45%, rgba(0,0,0,.6)); }
.pc-ftext { position: relative; padding: .45in .5in; }
.pc-tag { display: inline-block; background: var(--accent); color: #fff; font: 700 11px var(--pc-body); letter-spacing: .14em; text-transform: uppercase; padding: 6px 10px; }
.pc-tag.dark { background: #111; }
.pc-front h1 { font: 500 46px/1.02 var(--pc-head); margin: 12px 0 6px; letter-spacing: -.01em; color: #fff; }
.pc-front p { font-size: 15px; margin: 0; opacity: .92; }
.pc-back { display: grid; grid-template-columns: 1.15fr 1fr; padding: .4in .45in; gap: .35in; }
.pc-back h2 { font: 500 26px/1.1 var(--pc-head); margin: 10px 0 8px; }
.pc-facts { display: flex; gap: 18px; border-top: 1px solid #ddd; border-bottom: 1px solid #ddd; padding: 6px 0; }
.pc-facts div { display: flex; flex-direction: column; }
.pc-facts b { font: 500 17px var(--pc-head); }
.pc-facts span { font-size: 8px; text-transform: uppercase; letter-spacing: .1em; color: #777; }
.pc-msg { font-size: 11.5px; line-height: 1.5; margin: 10px 0 6px; }
.pc-oh { font-size: 11px; margin: 0 0 6px; }
.pc-row { display: flex; align-items: center; gap: 10px; font-size: 10px; color: #555; margin: 6px 0 10px; }
.pc-qr svg { width: .8in; height: .8in; display: block; }
.pc-agent { display: flex; align-items: center; gap: 10px; font-size: 10px; }
.pc-agent img { width: .5in; height: .5in; border-radius: 50%; object-fit: cover; }
.pc-agent .pc-logo { width: auto; height: .3in; border-radius: 0; margin-left: auto; }
.pc-agent div { display: flex; flex-direction: column; }
.pc-agent b { font-size: 12px; }
.pc-agent span { color: #666; }
.pc-right { border-left: 1px solid #e3e3e3; padding-left: .3in; display: flex; flex-direction: column; }
.pc-stamp { align-self: flex-end; width: .85in; height: 1in; border: 1px dashed #bbb; display: grid; place-items: center; font-size: 8px; color: #aaa; text-transform: uppercase; letter-spacing: .1em; }
.pc-addr { margin-top: auto; margin-bottom: auto; display: flex; flex-direction: column; gap: .22in; }
.pc-addr i { display: block; height: 1px; background: #ddd; }
.pc-fine { font-size: 7px; color: #999; margin: 0; }
.pc-preview { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; max-width: 760px; }
@media (max-width: 700px) { .pc-preview { grid-template-columns: 1fr; } }
.pc-scale { width: 100%; aspect-ratio: 3/2; overflow: hidden; border-radius: 10px; box-shadow: 0 6px 24px rgba(0,0,0,.1); position: relative; }
.pc-scale .pc-page { position: absolute; top: 0; left: 0; }
@page postcard { size: 9in 6in; margin: 0; }
@media print { body.printing-sheet .pc-page { page: postcard; break-after: page; } }
.mk-market canvas { width: 100%; max-width: 380px; border-radius: 10px; box-shadow: 0 6px 24px rgba(0,0,0,.1); display: block; }

/* Seller expectation + prep notes */
.expect-grid { grid-template-columns: 220px 1fr; }
.prep .prep-out { border-top: 1px solid var(--line); padding-top: 14px; }
.prep-sum { font-size: 16px; line-height: 1.55; margin: 0 0 12px; }
.prep-gap { background: #fbf4e6; border-radius: 12px; padding: 12px 14px; margin: 0 0 12px; }
.prep-gap span { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #a5660c; }
.prep-gap p { margin: 4px 0 0; line-height: 1.55; }
.prep h4 { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin: 18px 0 8px; }
.prep ol, .prep ul { margin: 0; padding-left: 20px; line-height: 1.6; }
.prep-qa details { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; margin-bottom: 8px; background: #fff; }
.prep-qa summary { font-weight: 600; cursor: pointer; }
.prep-qa p { margin: 8px 0 0; line-height: 1.55; color: #333; }
.prep-wait { display: flex; flex-direction: column; gap: 8px; padding: 10px 0; }
@media (max-width: 760px) { .expect-grid { grid-template-columns: 1fr; } }
.note-box { position: relative; margin: 8px 0 10px; }
.note-box textarea { width: 100%; padding-right: 54px; font-size: 15px; line-height: 1.5; }
.mic { position: absolute; right: 10px; bottom: 12px; width: 38px; height: 38px; border-radius: 50%; border: 0; background: #111; display: grid; place-items: center; cursor: pointer; }
.mic svg { width: 18px; height: 18px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; }
.mic.on { background: #c0392b; animation: micpulse 1.2s infinite; }
@keyframes micpulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(192,57,43,.45); } 50% { box-shadow: 0 0 0 8px rgba(192,57,43,0); } }
[data-pane][hidden] { display: none !important; }

/* Connections + guides */
.conn-group { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin: 18px 0 4px; }
.conn-form { display: flex; flex-direction: column; gap: 8px; margin: 8px 0 2px; }
.conn-form select { max-width: 320px; }
.guide h2 { margin-bottom: 10px; }
.guide .tabs { margin-bottom: 14px; flex-wrap: wrap; }
.guide-what { font-size: 15px; line-height: 1.55; margin: 0 0 14px; }
.guide-steps { list-style: none; counter-reset: g; padding: 0; margin: 0 0 14px; }
.guide-steps li { counter-increment: g; border-top: 1px solid var(--line); }
.guide-steps label { display: grid; grid-template-columns: 28px 22px 1fr; align-items: start; gap: 6px; padding: 10px 0; font-size: 14.5px; line-height: 1.45; cursor: pointer; flex-direction: row; font-weight: 400; color: inherit; }
.guide-steps label::before { content: counter(g); font-weight: 700; color: var(--muted); font-size: 13px; padding-top: 1px; }
.guide-steps input { margin: 3px 0 0; width: 16px; height: 16px; accent-color: #111; }
.guide-steps input:checked + span { color: var(--muted); text-decoration: line-through; }
.guide-notes { background: #f6f6f3; border-radius: 12px; padding: 10px 14px; margin: 0 0 16px; }
.guide-notes p { margin: 4px 0; font-size: 13px; line-height: 1.5; color: #444; }
.guide-foot { margin-top: 14px; }
.modal:has(.guide) { max-width: 600px; }
.conn-explain { background: #f6f6f3; border-radius: 12px; padding: 12px 14px; font-size: 13.5px; line-height: 1.5; margin: 4px 0 6px; }
.conn .row .btn.small { margin-top: 6px; }
