:root {
  --navy: #194466; --orange: #EF8733; --ink: #1F2A44;
  --line: #e6e9ef; --bg: #f4f6f9; --green: #2e9e5b;
  --r: 16px; --shadow: 0 10px 30px rgba(25,68,102,.10);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
/* the hidden attribute must win over explicit display (e.g. .dims { display:grid }) */
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
/* The tool is a light-themed app — pin the colour scheme so native controls (the Google
   address element, number inputs, etc.) don't render dark/inverted on dark-mode devices. */
html { color-scheme: light; }
body { font-family: 'Mulish', system-ui, sans-serif; color: var(--ink); background: var(--bg); color-scheme: light; }
#app { min-height: 100%; display: flex; flex-direction: column; }

/* Top bar */
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 14px 22px; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.topbar__brand { font-weight: 800; font-size: 22px; color: var(--navy); display: flex; align-items: baseline; gap: 10px; }
.topbar__brand span { font-size: 13px; font-weight: 600; color: rgba(31,42,68,.55); }
.topbar__reset { border: 1.5px solid var(--line); background: #fff; color: var(--navy); border-radius: 999px; padding: 9px 16px; font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; }

/* Layout: two-pane on landscape/tablet, stacked on portrait */
.layout { flex: 1; display: grid; grid-template-columns: 1fr; gap: 0; }
@media (min-width: 900px) { .layout { grid-template-columns: 1fr 360px; } }
.builder { padding: 26px 26px 120px; max-width: 720px; margin: 0 auto; width: 100%; }
@media (min-width: 900px) { .builder { padding: 34px 40px; } }

.panel__title { font-size: 30px; font-weight: 800; color: var(--navy); margin: 0 0 6px; letter-spacing: -.4px; }
.panel__sub { color: rgba(31,42,68,.65); margin: 0 0 24px; }
.panel__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.panel__head .panel__title { margin: 0; }
.panel--done { text-align: center; padding-top: 60px; }

/* Fields */
.field { margin-bottom: 20px; }
.label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 8px; }
.input { width: 100%; height: 54px; padding: 0 16px; border: 1.5px solid #d8dde7; border-radius: 12px; font: inherit; font-size: 17px; background: #fff; color: var(--ink); }
.input:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 4px rgba(239,135,51,.18); }
/* Google PlaceAutocompleteElement (replaces #propAddr when a key is present) */
.addr-ac { width: 100%; display: block; color-scheme: light; }
gmp-place-autocomplete { color-scheme: light; --gmpx-color-surface: #fff; }

/* Segmented control */
.seg { display: flex; gap: 8px; flex-wrap: wrap; }
.seg button { flex: 1; min-width: 96px; min-height: 52px; border: 1.5px solid var(--line); background: #fff; color: var(--navy); border-radius: 12px; font: inherit; font-weight: 600; font-size: 15px; cursor: pointer; transition: border-color .15s, background .15s, transform .08s; }
.seg button:active { transform: scale(.97); }
.seg button.is-on { border-color: var(--orange); background: #fff7ef; box-shadow: 0 0 0 3px rgba(239,135,51,.14); }

/* Buttons */
.btn { font: inherit; font-weight: 700; border-radius: 12px; cursor: pointer; border: 1.5px solid transparent; transition: transform .08s, box-shadow .15s, background .15s; }
.btn:active { transform: scale(.98); }
.btn--lg { width: 100%; min-height: 58px; font-size: 18px; margin-top: 8px; }
.btn--primary { background: var(--orange); color: #fff; box-shadow: 0 8px 20px rgba(239,135,51,.28); }
.btn--primary[disabled] { background: #d8dde7; color: #8a93a6; box-shadow: none; cursor: not-allowed; }
.btn--ghost { background: #fff; border-color: var(--line); color: var(--navy); padding: 12px 18px; }
.btn--secondary { background: var(--navy); color: #fff; box-shadow: 0 8px 20px rgba(25,68,102,.22); }
.accept__hint { font-size: 13px; color: #6b7689; margin: 12px 2px 0; line-height: 1.5; }
.label__opt { color: #6b7689; font-weight: 400; font-size: 13px; }
.extralist { margin: 2px 0 8px; }
.extra-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: #f4f6f9; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 6px; }
.extra-item__desc { flex: 1; color: var(--navy); font-weight: 600; font-size: 14px; }
.extra-item__cost { color: var(--navy); font-weight: 800; font-size: 14px; white-space: nowrap; }
.extra-item__del { border: none; background: none; color: #c0392b; font-size: 17px; cursor: pointer; padding: 2px 6px; line-height: 1; }
.extra-add { display: flex; gap: 8px; align-items: stretch; }
.extra-add__desc { flex: 1; min-width: 0; }
.extra-add__cost { width: 120px; flex: 0 0 auto; }
.extra-add__btn { flex: 0 0 auto; min-height: 0; align-self: stretch; }
.exchips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 10px; }
.exchip { min-height: 42px; padding: 8px 15px; border: 1.5px solid var(--line); background: #fff; color: var(--navy); border-radius: 999px; font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; transition: border-color .12s, background .12s; }
.exchip:active { background: #fff7ef; border-color: var(--orange); }
.exchip.is-on { background: #fff7ef; border-color: var(--orange); box-shadow: 0 0 0 3px rgba(239,135,51,.14); }
.review { margin: 4px 0 14px; padding: 14px 16px; background: #f4f6f9; border: 1px solid var(--line); border-radius: 12px; }
.review__title { font-weight: 800; color: var(--navy); font-size: 13px; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 8px; }
.review__room { padding: 8px 0; border-bottom: 1px solid #e6e9ef; }
.review__room:last-of-type { border-bottom: 0; }
.review__rname { font-weight: 700; color: var(--navy); font-size: 14px; margin-bottom: 3px; }
.review__opt { display: flex; justify-content: space-between; font-size: 14px; color: var(--ink); padding: 2px 0; }
.review__opt--x span { color: #6b7689; }
.review__hint { font-size: 12px; color: #6b7689; font-style: italic; }
.review__total { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; padding-top: 10px; border-top: 2px solid var(--navy); font-weight: 800; color: var(--navy); font-size: 16px; }
.summary__line--extra span { color: #cfe0ee; }
.editor__hint { font-weight: 400; font-size: 13px; color: #6b7689; }
.unitcard__tick { color: var(--orange); font-weight: 800; margin-left: 4px; }
.btn--add { width: 100%; min-height: 56px; background: #fff; border: 2px dashed #c3cdda; color: var(--navy); font-size: 17px; margin-top: 6px; }

/* Room list */
.roomlist { display: flex; flex-direction: column; gap: 12px; margin-bottom: 14px; }
.roomcard { display: flex; align-items: center; gap: 14px; background: #fff; border: 1.5px solid var(--line); border-radius: var(--r); padding: 16px 18px; box-shadow: var(--shadow); }
.roomcard__main { flex: 1; min-width: 0; }
.roomcard__name { font-weight: 800; color: var(--navy); font-size: 17px; }
.roomcard__meta { font-size: 13px; color: rgba(31,42,68,.6); margin-top: 2px; }
.roomcard__price { font-weight: 800; color: var(--navy); font-size: 16px; white-space: nowrap; }
.roomcard__del { border: none; background: #f4f6f9; color: #8a93a6; width: 38px; height: 38px; border-radius: 10px; font-size: 18px; cursor: pointer; }

/* Summary rail */
.summary { background: var(--navy); color: #fff; padding: 26px 24px; display: flex; flex-direction: column; }
@media (min-width: 900px) { .summary { position: sticky; top: 57px; align-self: start; height: calc(100vh - 57px); border-radius: 0; } }
.summary__label { font-size: 13px; color: rgba(255,255,255,.7); }
.summary__total { font-size: 44px; font-weight: 800; letter-spacing: -1px; font-variant-numeric: tabular-nums; line-height: 1.1; margin: 2px 0; }
.summary__note { font-size: 12px; color: rgba(255,255,255,.6); }
.summary__lines { margin-top: 22px; display: flex; flex-direction: column; gap: 12px; overflow-y: auto; }
.summary__line { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; border-bottom: 1px solid rgba(255,255,255,.12); padding-bottom: 10px; }
.summary__line span:first-child { color: rgba(255,255,255,.85); }
.summary__line strong { white-space: nowrap; }
.summary__empty { color: rgba(255,255,255,.55); font-size: 14px; margin-top: 20px; }
.summary.has-lines .summary__empty { display: none; }

/* Room editor (inline panel — no modal) */
.editor__sub { font-size: 15px; color: var(--navy); margin: 18px 0 10px; font-weight: 800; }
.dims { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.sizeline { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: #f4f6f9; border-radius: 12px; padding: 12px 16px; margin: 4px 0 4px; }
.sizeline strong { color: var(--navy); font-size: 18px; }
.link { background: none; border: none; color: var(--navy); text-decoration: underline; font: inherit; font-size: 14px; cursor: pointer; margin-left: auto; }

/* Room-type picker (tap-friendly, replaces free-text room name) */
.roompick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (min-width: 560px) { .roompick { grid-template-columns: 1fr 1fr 1fr; } }
.roompick__tile { min-height: 56px; padding: 10px 12px; border: 1.5px solid var(--line); background: #fff; color: var(--navy); border-radius: 12px; font: inherit; font-weight: 600; font-size: 15px; cursor: pointer; transition: border-color .15s, background .15s, transform .08s; }
.roompick__tile:active { transform: scale(.97); }
.roompick__tile.is-on { border-color: var(--orange); background: #fff7ef; box-shadow: 0 0 0 3px rgba(239,135,51,.14); }
.roompick__tile--custom { border-style: dashed; color: #6b7689; }
.hint { font-size: 13px; color: rgba(31,42,68,.6); margin: 0 0 10px; }
#ductedZones { display: flex; flex-wrap: wrap; gap: 8px; }
.zonechip { display: inline-flex; align-items: center; background: #fff7ef; border: 1.5px solid #f3c79a; color: var(--navy); border-radius: 999px; padding: 7px 13px; font-size: 13.5px; font-weight: 600; }
.zone { border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; background: #fff; }
.zone__head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.zone__name { flex: 1; font-weight: 700; color: var(--navy); font-size: 15px; }
.zone__kw { font-weight: 800; color: var(--orange); font-size: 14px; white-space: nowrap; }
.zone__del { border: none; background: none; color: #c0392b; font-size: 17px; cursor: pointer; padding: 2px 6px; line-height: 1; }
.zone__dims { display: flex; gap: 8px; }
.zone__dim { flex: 1; display: flex; flex-direction: column; font-size: 12px; color: #6b7689; font-weight: 600; gap: 3px; }
.zone__in { min-height: 44px; }
.photo { margin: 2px 0; }
.photo__btn { min-height: 48px; }
.photo__item { position: relative; display: inline-block; }
.photo__item img { max-width: 220px; max-height: 180px; border-radius: 10px; border: 1px solid var(--line); display: block; }
.photo__del { position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; border-radius: 50%; border: none; background: rgba(25,68,102,.85); color: #fff; font-size: 15px; cursor: pointer; line-height: 1; }

/* Unit options */
.unitlist { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.unitlist__msg { color: rgba(31,42,68,.6); font-size: 14px; margin: 4px 0; }
.unitcard { display: flex; align-items: center; gap: 12px; text-align: left; background: #fff; border: 2px solid var(--line); border-radius: 14px; padding: 14px 16px; cursor: pointer; font: inherit; transition: border-color .15s, box-shadow .15s; }
.unitcard.is-on { border-color: var(--orange); box-shadow: 0 0 0 4px rgba(239,135,51,.15); }
.unitcard--dim { opacity: .62; }
.unitcard--dim.is-on { opacity: 1; }
.unitcard__body { flex: 1; min-width: 0; }
.unitcard__brand { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: var(--orange); }
.unitcard__title { font-weight: 700; color: var(--navy); font-size: 15px; line-height: 1.25; }
.unitcard__kw { font-size: 12.5px; color: rgba(31,42,68,.6); }
.unitcard__price { font-weight: 800; color: var(--navy); white-space: nowrap; }
.unitcard__tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 5px; }
.unitcard__badge { font-size: 11px; font-weight: 700; color: var(--navy); background: #eef2f7; border-radius: 999px; padding: 2px 9px; white-space: nowrap; }
.unitcard__badge--fit { color: #fff; background: #1e7d43; }
.unitcard__badge--under { color: #8a4b00; background: #fdeeda; }
.unitcard__code { font-size: 11px; color: rgba(31,42,68,.45); letter-spacing: .3px; white-space: nowrap; }

/* Unit list filters (brand chips + wall/floor) */
.unitfilters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 0 0 12px; }
.unitfilters .exchips { margin: 0; }
.seg--mini { flex-wrap: nowrap; }
.seg--mini button { flex: 0 0 auto; min-width: 0; min-height: 42px; font-size: 14px; padding: 0 14px; border-radius: 999px; }
.unitlist__more { align-self: flex-start; border: none; background: none; padding: 2px 0 6px; color: var(--navy); font: inherit; font-weight: 700; font-size: 14px; text-decoration: underline; cursor: pointer; }

.accept__row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 10px; }
.accept__row .btn--ghost { flex: 0 0 auto; }
.accept__row .btn--lg { flex: 1; margin-top: 0; }
.accept__err { color: #c0392b; font-size: 14px; margin-top: 12px; }

/* Done */
.done__tick { width: 64px; height: 64px; border-radius: 50%; background: var(--green); color: #fff; font-size: 32px; font-weight: 800; display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; animation: tickPop .42s cubic-bezier(.16,1,.3,1), ripple 1.2s ease-out .18s 1; }
@keyframes tickPop { 0% { transform: scale(.6); opacity: 0; } 60% { transform: scale(1.08); } 100% { transform: scale(1); opacity: 1; } }
@keyframes ripple { 0% { box-shadow: 0 0 0 0 rgba(46,158,91,.45); } 100% { box-shadow: 0 0 0 34px rgba(46,158,91,0); } }
.done__summary { font-size: 17px; }
.done__ref { color: rgba(31,42,68,.7); }

@media (prefers-reduced-motion: reduce) {
  .done__tick { animation: none; }
  .btn:active, .seg button:active { transform: none; }
}

/* ---- Sales tool v2: rep switcher, resume bar, ducted steppers + zoning ---- */
.topbar__right { display: flex; align-items: center; gap: 10px; }
.topbar__rep { border: 1.5px solid var(--line); background: #fff7ef; color: var(--navy); border-radius: 999px; padding: 9px 16px; font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; }
.topbar__rep strong { color: var(--orange); }

.repwrap { position: fixed; inset: 0; background: rgba(25,68,102,.45); display: flex; align-items: center; justify-content: center; z-index: 60; padding: 24px; }
.reppanel { background: #fff; border-radius: 18px; padding: 28px; width: 100%; max-width: 440px; box-shadow: 0 24px 60px rgba(0,0,0,.25); }
.reppanel__title { margin: 0 0 4px; font-size: 24px; font-weight: 800; color: var(--navy); }
.reppanel__sub { margin: 0 0 18px; color: rgba(31,42,68,.65); font-size: 14px; }
.replist { display: flex; flex-direction: column; gap: 10px; }
.repbtn { min-height: 58px; border: 2px solid var(--line); border-radius: 14px; background: #fff; font: inherit; font-size: 18px; font-weight: 700; color: var(--navy); cursor: pointer; transition: border-color .12s, background .12s; }
.repbtn.is-on, .repbtn:active { border-color: var(--orange); background: #fff7ef; }

.resume { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; background: #fff7ef; border: 1.5px solid var(--orange); border-radius: 14px; padding: 14px 18px; margin-bottom: 20px; font-weight: 600; color: var(--navy); }
.resume__btns { display: flex; gap: 8px; margin-left: auto; }
.resume .btn { min-height: 44px; padding: 8px 16px; font-size: 14px; margin-top: 0; }

.stepper { display: inline-flex; align-items: center; gap: 0; border: 1.5px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; }
.stepper__btn { width: 48px; height: 48px; border: none; background: #fff; font-size: 22px; font-weight: 700; color: var(--navy); cursor: pointer; }
.stepper__btn:active { background: #fff7ef; }
.stepper__val { min-width: 44px; text-align: center; font-weight: 800; color: var(--navy); font-size: 17px; }
.stepper--sm .stepper__btn { width: 36px; height: 36px; font-size: 17px; }
.stepper--sm .stepper__val { min-width: 30px; font-size: 14px; }

.zone__outlets { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #6b7689; font-weight: 600; white-space: nowrap; }
.zone__dims { flex-wrap: wrap; align-items: flex-end; }

.seg--wrap button { flex: 0 1 auto; min-width: 0; padding: 0 16px; }
.zonecfg { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-top: 12px; }
.zonecfg__item { display: flex; flex-direction: column; gap: 5px; }
.zonecfg__label { font-size: 12.5px; font-weight: 700; color: #6b7689; }
.zonecfg__price { font-weight: 800; color: var(--orange); font-size: 16px; margin-left: auto; }

.addr-manual { margin: 8px 0 0; display: block; margin-left: 0; font-size: 13px; color: #6b7689; }

/* Textarea variant of .input — the 54px fixed height + zero vertical padding made
   the notes placeholder hug the top edge. */
textarea.input { height: auto; min-height: 96px; padding: 13px 16px; line-height: 1.5; resize: vertical; }

/* ---- Lead pickup (start a quote from a captured lead) ---- */
.leadlist { display: flex; flex-direction: column; gap: 10px; margin: 14px 0 18px; }
.leadcard { display: flex; align-items: center; gap: 12px; text-align: left; background: #fff; border: 2px solid var(--line); border-radius: 14px; padding: 14px 16px; cursor: pointer; font: inherit; transition: border-color .15s; }
.leadcard:active { border-color: var(--orange); }
.leadcard__body { flex: 1; min-width: 0; }
.leadcard__name { font-weight: 700; color: var(--navy); font-size: 16px; }
.leadcard__meta { font-size: 13px; color: rgba(31,42,68,.6); margin-top: 2px; }
.leadcard__tags { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.leadcard__rec { font-size: 12.5px; font-weight: 700; color: #2d6cb3; margin-top: 4px; }
.leadcard__visit { font-size: 12.5px; font-weight: 700; color: #5b3fb3; margin-top: 2px; }
.leadchip { font-size: 11.5px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: #eef5fb; color: #2d6cb3; white-space: nowrap; }
.leadchip--finder { background: #fff2e2; color: #b3610f; }
.leadchip--mine { background: #e6f7ec; color: #1e7d43; }
.leadtabs { display: flex; gap: 8px; margin: 4px 0 12px; }
.leadtabs button { border: 1.5px solid var(--line); background: #fff; color: var(--navy); border-radius: 999px; padding: 8px 16px; font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; }
.leadtabs button.is-on { border-color: var(--orange); background: #fff7ef; }
.leadgate { background: #f8fafc; border: 1.5px solid var(--line); border-radius: 14px; padding: 16px; margin: 14px 0; }
.leadgate .input { margin-top: 10px; }
.leadgate__btn { margin-top: 10px; }
.leads__empty { color: rgba(31,42,68,.6); font-size: 14px; margin: 14px 0; }
