/* Solar CRM — plain CSS, no build step (CDDSR-CRM P0 decision). */
:root {
  --navy: #1b2a4a;
  --navy-2: #24365e;
  --amber: #f5a623;
  --teal: #1a9e8f;
  --teal-soft: #e8f6f4;
  --ink: #1f2933;
  --muted: #5b6573;
  --line: #dde3ea;
  --bg: #f3f6f9;
  --white: #ffffff;
  --danger: #b42318;
  --danger-soft: #fdecea;
  --ok-soft: #e8f6f4;
  --radius: 8px;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  color: var(--ink);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { background: var(--bg); font-size: 15px; line-height: 1.45; }
a { color: var(--teal); }
h1 { font-size: 1.5rem; margin: 0 0 4px; color: var(--navy); }
h2 { font-size: 1.1rem; margin: 24px 0 8px; color: var(--navy); }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }

/* Wordmark (replace with logo image when supplied) */
.brand { font-weight: 800; letter-spacing: 0.04em; font-size: 1.15rem; text-decoration: none; white-space: nowrap; }
.brand .m { color: var(--white); }
.brand .r { color: var(--amber); }
.brand .crm { color: #c9d3df; font-weight: 500; font-size: 0.85rem; margin-left: 6px; letter-spacing: 0; }

/* Top bar */
.topbar { background: var(--navy); color: var(--white); display: flex; align-items: center; gap: 16px; padding: 0 16px; height: 56px; position: sticky; top: 0; z-index: 10; }
.topbar .spacer { flex: 1; }
.topbar .who { font-size: 0.85rem; color: #c9d3df; text-align: right; line-height: 1.2; }
.topbar .who strong { color: var(--white); display: block; }
.topbar form { margin: 0; }
.btn-link-light { background: none; border: 1px solid #3b4d75; color: var(--white); border-radius: var(--radius); padding: 6px 12px; cursor: pointer; font: inherit; font-size: 0.85rem; }
.btn-link-light:hover { background: var(--navy-2); }
.menu-toggle { display: none; background: none; border: 0; color: var(--white); font-size: 1.4rem; cursor: pointer; padding: 4px 8px; }

/* Shell */
.shell { display: flex; min-height: calc(100vh - 56px); }
.sidenav { width: 220px; flex: 0 0 220px; background: var(--white); border-right: 1px solid var(--line); padding: 16px 8px; }
.sidenav .section { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin: 16px 12px 6px; }
.sidenav a { display: block; padding: 8px 12px; border-radius: var(--radius); text-decoration: none; color: var(--ink); }
.sidenav a:hover { background: var(--bg); }
.sidenav a.active { background: var(--teal-soft); color: var(--navy); font-weight: 600; box-shadow: inset 3px 0 0 var(--teal); }
.main { flex: 1; min-width: 0; padding: 24px; display: flex; flex-direction: column; }
.content { flex: 1; }
.footer { margin-top: 32px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 0.8rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 8px 16px; }

/* Cards, tables */
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.table-wrap { overflow-x: auto; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--navy); color: var(--white); font-weight: 600; font-size: 0.85rem; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fafbfc; }
td.nowrap { white-space: nowrap; }

/* Chips */
.chip { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 0.78rem; font-weight: 600; white-space: nowrap; }
.chip-active { background: var(--ok-soft); color: #11695f; }
.chip-inactive { background: #eceff3; color: var(--muted); }
.chip-role { background: #fdf1dc; color: #8a5a00; }

/* Forms */
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; margin-bottom: 12px; }
.filters .field { margin: 0; }
.field { margin-bottom: 14px; }
label { display: block; font-weight: 600; font-size: 0.85rem; margin-bottom: 4px; color: var(--navy); }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=search], input[type=url], select {
  width: 100%; padding: 9px 10px; border: 1px solid #c3ccd7; border-radius: var(--radius); font: inherit; background: var(--white);
}
input:focus, select:focus { outline: 2px solid var(--teal); outline-offset: 0; border-color: var(--teal); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.hint { font-size: 0.8rem; color: var(--muted); margin-top: 4px; }
.error { font-size: 0.83rem; color: var(--danger); margin-top: 4px; }
.btn { display: inline-block; border: 0; border-radius: var(--radius); padding: 9px 16px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
.btn-primary { background: var(--teal); color: var(--white); }
.btn-primary:hover { background: #158477; }
.btn-secondary { background: var(--white); color: var(--navy); border: 1px solid #c3ccd7; }
.btn-secondary:hover { background: var(--bg); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 8px; }

/* Alerts */
.alert { padding: 10px 14px; border-radius: var(--radius); margin-bottom: 16px; }
.alert-ok { background: var(--ok-soft); color: #11695f; border: 1px solid #b7e2dc; }
.alert-error { background: var(--danger-soft); color: var(--danger); border: 1px solid #f5c2bd; }

/* Pagination */
.pager { display: flex; gap: 8px; align-items: center; margin-top: 12px; font-size: 0.9rem; }

/* Signed-out pages */
.guest { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; background: linear-gradient(160deg, var(--navy) 0%, var(--navy) 45%, var(--bg) 45%); }
.guest-card { width: 100%; max-width: 400px; background: var(--white); border-radius: 12px; padding: 28px; box-shadow: 0 8px 30px rgba(27, 42, 74, 0.18); }
.guest-card .brand { display: block; margin-bottom: 4px; }
.guest-card .brand .m { color: var(--navy); }
.guest-card .brand .crm { color: var(--muted); }
.guest-card .btn { width: 100%; }
.guest-foot { text-align: center; margin-top: 16px; font-size: 0.8rem; color: var(--muted); }

/* Phone width */
@media (max-width: 760px) {
  .menu-toggle { display: block; }
  .topbar .who { display: none; }
  .sidenav { display: none; position: fixed; top: 56px; left: 0; bottom: 0; z-index: 9; box-shadow: 4px 0 16px rgba(0,0,0,0.12); }
  .sidenav.open { display: block; }
  .main { padding: 16px; }
  .grid-2 { grid-template-columns: 1fr; }
}

/* ---- P1 Leads ---------------------------------------------------------- */
.status { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 0.85rem; white-space: nowrap; }
.status i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: 0 0 10px; }
.overdue { color: var(--danger); font-weight: 600; }
.due-today { color: #8a5a00; font-weight: 600; }
.alert-warn { background: #fdf1dc; color: #6b4600; border: 1px solid #f3d29a; }
.alert-warn ul { margin: 6px 0 8px 18px; padding: 0; }
.cols { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 16px; align-items: start; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 16px; }
.section-title { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin: 18px 0 8px; border-bottom: 1px solid var(--line); padding-bottom: 4px; }
.section-title:first-child { margin-top: 0; }
dl.facts { display: grid; grid-template-columns: 150px 1fr; gap: 6px 12px; margin: 0; }
dl.facts dt { color: var(--muted); font-size: 0.85rem; }
dl.facts dd { margin: 0; }
textarea { width: 100%; padding: 9px 10px; border: 1px solid #c3ccd7; border-radius: var(--radius); font: inherit; min-height: 80px; resize: vertical; }
input[type=date], input[type=datetime-local], input[type=number] { width: 100%; padding: 9px 10px; border: 1px solid #c3ccd7; border-radius: var(--radius); font: inherit; background: var(--white); }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.timeline li:last-child { border-bottom: 0; }
.timeline .meta { font-size: 0.8rem; color: var(--muted); margin-bottom: 2px; }
.timeline .kind { display: inline-block; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; padding: 1px 6px; border-radius: 4px; margin-right: 6px; }
.kind-note { background: var(--teal-soft); color: #11695f; }
.kind-status { background: #e7eefb; color: #1e40af; }
.kind-owner { background: #fdf1dc; color: #8a5a00; }
.note-body { white-space: pre-wrap; }
details.multi { position: relative; }
details.multi summary { list-style: none; cursor: pointer; padding: 9px 10px; border: 1px solid #c3ccd7; border-radius: var(--radius); background: var(--white); min-width: 160px; }
details.multi[open] .multi-panel { display: block; }
.multi-panel { display: none; position: absolute; z-index: 5; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 12px; margin-top: 4px; box-shadow: 0 8px 20px rgba(0,0,0,0.1); min-width: 200px; }
.multi-panel label { font-weight: 400; color: var(--ink); display: flex; gap: 8px; align-items: center; margin: 4px 0; }
.filters .field { min-width: 130px; }
th a { color: var(--white); text-decoration: none; }
th a:hover { text-decoration: underline; }
.radio-row { display: flex; gap: 16px; flex-wrap: wrap; padding-top: 6px; }
.radio-row label { font-weight: 400; color: var(--ink); display: flex; gap: 6px; align-items: center; }
.readonly-banner { background: #eceff3; border: 1px solid var(--line); color: var(--muted); }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.stat .n { font-size: 1.6rem; font-weight: 700; color: var(--navy); line-height: 1.1; }
.stat .l { font-size: 0.8rem; color: var(--muted); }
.stat.alarm .n { color: var(--danger); }
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end; }
.inline-form .field { margin: 0; }
.swatch { width: 44px; height: 38px; padding: 2px; border: 1px solid #c3ccd7; border-radius: var(--radius); background: var(--white); }
@media (max-width: 900px) {
  .cols, .cols.cols-quote { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .grid-3 { grid-template-columns: 1fr; }
  dl.facts { grid-template-columns: 1fr; gap: 0 0; }
  dl.facts dd { margin-bottom: 8px; }
}

/* ---- P2a Quotes -------------------------------------------------------- */
table.lines td { padding: 6px; }
table.lines input, table.lines select { padding: 7px 8px; }
table.lines th { font-size: 0.78rem; }
.cols.cols-quote { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
table.lines td { padding: 5px 4px; }
table.lines .f-product { min-width: 145px; }
table.lines .f-category { min-width: 96px; }
table.lines .f-brand, table.lines .f-model { min-width: 70px; }
table.lines .f-size, table.lines .f-unit, table.lines input[name$="[qty]"] { min-width: 56px; }
.key-summary { margin-top: 8px; padding: 8px 12px; background: var(--teal-soft); border-radius: 8px; }
.key-summary:empty { display: none; }
.key-summary ul { margin: 0 0 4px; padding-left: 18px; }
.error-text { color: var(--red, #b42318); }

/* ---- P2b: quote document, preview and customer signing ---------------- */
.doc-body { background: #e5e9f0; margin: 0; }
.doc-toolbar { position: sticky; top: 0; z-index: 5; display: flex; gap: 12px; align-items: center; justify-content: space-between;
  background: var(--navy); color: #fff; padding: 10px 16px; }
.doc-toolbar-title { font-weight: 600; font-size: .95rem; }
.doc-wrap { max-width: 900px; margin: 0 auto; padding: 16px; }
.doc-paper { background: #fff; padding: 36px 40px; border-radius: 6px; box-shadow: 0 4px 18px rgba(15,23,42,.12); margin: 16px 0; overflow-x: auto; }
.sign-intro, .sign-card { background: #fff; border-radius: 10px; padding: 20px 24px; box-shadow: 0 4px 18px rgba(15,23,42,.08); margin: 16px 0; }
.sign-intro h1, .sign-card h1 { margin: 6px 0 8px; color: var(--navy); }
.brand-line { font-weight: 800; letter-spacing: .04em; color: var(--navy); }
.brand-line span { color: #e8951a; }
.sig-pad { border: 2px dashed #94a3b8; border-radius: 8px; background: #f8fafc; margin-bottom: 8px; }
.sig-pad canvas { display: block; width: 100%; height: 180px; touch-action: none; cursor: crosshair; }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 12px 0 16px; line-height: 1.4; }
.check input { margin-top: 4px; width: 20px; height: 20px; flex: none; }
.btn-wide { width: 100%; }
.btn-small { padding: 4px 10px; font-size: .85rem; }
.facts-table { width: auto; border: 0; }
.facts-table th, .facts-table td { background: none; border: 0; }
.facts-table th { text-align: left; padding: 4px 16px 4px 0; color: var(--muted); font-weight: 500; text-transform: none; letter-spacing: 0; font-size: .95rem; }
.facts-table td { padding: 4px 0; font-weight: 600; }
.sign-link { display: flex; gap: 8px; margin-top: 6px; }
.sign-link input { flex: 1; font-size: .8rem; }
@media (max-width: 760px) {
  .doc-paper { padding: 18px 14px; }
  .doc-toolbar { flex-wrap: wrap; }
}
.agreement-terms { font-size: .92rem; }
.agreement-terms h3 { margin: 18px 0 6px; color: var(--navy); }
.agreement-terms p { margin: 0 0 6px; }

/* ---- P3b: installs ---------------------------------------------------- */
.file-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
.file-tile img, .file-tile .file-icon { display: block; width: 100%; height: 100px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); background: #f8fafc; }
.file-tile .file-icon { display: flex; align-items: center; justify-content: center; font-weight: 700; color: var(--muted); }
.btn-link { background: none; border: 0; padding: 0; color: var(--teal); text-decoration: underline; cursor: pointer; }
fieldset[disabled] input, fieldset[disabled] select, fieldset[disabled] textarea { background: #f8fafc; color: var(--ink, #1f2937); }

/* ---- v0.7.1: quote next-steps bar ------------------------------------- */
.steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.step { display: flex; gap: 8px; align-items: flex-start; }
.step-dot { flex: none; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .85rem; color: var(--muted); background: #fff; }
.step.done .step-dot { background: var(--teal); border-color: var(--teal); color: #fff; }
.accept-box > summary { list-style: none; display: inline-block; }
.accept-box > summary::-webkit-details-marker { display: none; }
.accept-box[open] { flex-basis: 100%; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr 1fr; } }

/* ---- v0.8.0: branding ---------------------------------------------------- */
.logo-preview { border: 1px dashed var(--line); border-radius: 8px; padding: 10px; margin-bottom: 8px; background: #fff; min-height: 70px; display: flex; align-items: center; }
.logo-preview img { max-height: 70px; max-width: 100%; }
.logo-preview.icon img { max-height: 64px; }
.brand-logo-icon { height: 30px; width: 30px; object-fit: contain; border-radius: 6px; background: #fff; padding: 2px; margin-right: 8px; vertical-align: middle; }
.brand-text { font-weight: 800; letter-spacing: .02em; }
.guest-logo { max-height: 70px; max-width: 260px; display: block; margin-bottom: 6px; }
.doc-logo { max-height: 64px; max-width: 260px; display: block; }

/* ---- P4: saved views ------------------------------------------------------ */
.saved-views { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin: 0 0 10px; }
.saved-view { display: inline-flex; align-items: center; gap: 2px; background: var(--teal-soft); border-radius: 999px; padding: 2px 4px 2px 10px; }
.saved-view form { display: inline; }
.saved-view .btn-link { text-decoration: none; padding: 0 6px; font-size: 1rem; }
.save-view summary { cursor: pointer; color: var(--teal); }
.save-view[open] { flex-basis: 100%; }

/* ---- v0.10.0: roof and address --------------------------------------------- */
.roof-img { display: block; width: 100%; max-width: 640px; border-radius: 8px; border: 1px solid var(--line); }
.roof-thumb { display: block; width: 240px; border-radius: 6px; border: 1px solid var(--line); }
.addr-wrap { position: relative; }
.addr-list { position: absolute; z-index: 20; left: 0; right: 0; top: 100%; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px rgba(15,23,42,.12); margin: 2px 0 0; padding: 4px 0; list-style: none; }
.addr-list li { padding: 8px 12px; cursor: pointer; font-size: .95rem; }
.addr-list li:hover, .addr-list li.active { background: var(--teal-soft); }
.addr-list .powered { font-size: .7rem; color: var(--muted); text-align: right; padding: 2px 10px 0; cursor: default; }
.addr-note { font-size: .8rem; color: var(--teal); margin-top: 4px; }

/* ---- v0.11.0: roof sections ---------------------------------------------------- */
.roof-sections table { font-size: 0.85rem; }
.roof-sections th, .roof-sections td { padding: 6px 8px; }
.roof-sections th { white-space: normal; }
.roof-estimate { margin-top: 10px; padding: 10px 12px; border-radius: 8px; background: #f0faf8; border: 1px solid #b8e3db; }
.roof-estimate .big { font-size: 1.15rem; font-weight: 700; color: var(--navy); }

/* ---- v0.12.0 / v0.14.0: live roof dots (lead page and quote builder) ---------- */
.roof-photo { position: relative; max-width: 640px; container-type: inline-size; }
.roof-photo .roof-img { max-width: 100%; }
.r-good { --dot: #1a9e8f; }
.r-fair { --dot: #f5a623; }
.r-poor { --dot: #78808c; }
.roof-dot { position: absolute; transform: translate(-50%, -50%); width: 22px; height: 22px; padding: 0; border-radius: 50%;
  border: 2px solid #fff; box-shadow: 0 0 0 1px #1b2a4a, 0 1px 3px rgba(0, 0, 0, .4); background: var(--dot); color: #fff;
  font: 700 12px/18px system-ui, sans-serif; text-align: center; z-index: 2; }
button.roof-dot { cursor: pointer; }
.roof-dot.off { background: #fff; color: var(--dot); border-color: var(--dot); z-index: 1; }
.roof-dot.on { width: 26px; height: 26px; line-height: 22px; font-size: 13px; z-index: 3; }
.roof-dot.hl { box-shadow: 0 0 0 1px #1b2a4a, 0 0 0 6px rgba(27, 42, 74, .35); z-index: 4; }
/* Slope arrow: a small triangle just outside the dot, rotated to the face's direction (photo is north-up). */
.roof-arrow { position: absolute; inset: -2px; pointer-events: none; }
.roof-arrow::before { content: ""; position: absolute; left: 50%; top: -9px; transform: translateX(-50%);
  border-left: 5px solid transparent; border-right: 5px solid transparent; border-bottom: 8px solid var(--dot);
  filter: drop-shadow(0 0 1px #fff) drop-shadow(0 0 1px #1b2a4a); }
.roof-scale { position: absolute; left: 8px; bottom: 8px; display: flex; align-items: flex-end; gap: 10px; padding: 6px 10px;
  border-radius: 6px; background: rgba(27, 42, 74, .75); color: #fff; font: 700 11px/1 system-ui, sans-serif; }
.roof-north { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.roof-north::before { content: ""; border-left: 5px solid transparent; border-right: 5px solid transparent; border-bottom: 9px solid #fff; }
.roof-bar { position: relative; display: block; height: 4px; background: #fff; margin-bottom: 1px; }
.roof-bar::before, .roof-bar::after { content: ""; position: absolute; bottom: 0; width: 2px; height: 9px; background: #fff; }
.roof-bar::before { left: 0; } .roof-bar::after { right: 0; }
.roof-bar em { position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%); font-style: normal; white-space: nowrap; }
.roof-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 6px 0 4px; }
.roof-legend .sw { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--dot); margin-right: 4px; vertical-align: -1px; }
.roof-best { margin: 0 0 8px; padding: 8px 12px; border-radius: 8px; background: #f0faf8; border: 1px solid #b8e3db; }
.roof-pick-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0 6px; }
.roof-pick-bar .muted { flex: 1 1 260px; }
.rating { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: .78rem; font-weight: 700; color: #fff; background: var(--dot); }
.roof-sections tr.roof-on td { background: #fff7eb; }
.roof-sections tr.hl td { background: #eef3f9; }
.ok-text { color: #15803d; }
.text-btn { display: none; margin-left: 8px; padding: 2px 10px; vertical-align: 1px; }
/* v0.15.1: the Text button only on touch devices (phones and tablets); a computer has no texting app. */
@media (hover: none) and (pointer: coarse) { .text-btn { display: inline-block; } }

/* ---- v0.15.2: progress notes ---------------------------------------------- */
.note-form { display: grid; grid-template-columns: 1fr 200px auto; gap: 10px; align-items: end; margin-bottom: 4px; }
.note-form .field { margin: 0; }
.note-add { padding-bottom: 2px; }
@media (max-width: 720px) { .note-form { grid-template-columns: 1fr; } }
.notes { list-style: none; margin: 0; padding: 0; }
.notes li { padding: 8px 0 8px 12px; border-left: 3px solid #1a9e8f; margin-bottom: 6px; background: #f7fbfa; border-radius: 0 6px 6px 0; }
.notes .meta { font-size: .85rem; margin-bottom: 2px; }
.notes .note-body { white-space: pre-line; }
.notes-more summary { cursor: pointer; font-size: .9rem; margin: 6px 0; color: #1a6e66; }
.last-note { max-width: 320px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---- v0.21.0: panel layout on the roof photo (quote builder) ------------------- */
.roof-photo.roof-layout { max-width: 960px; }
.roof-panels { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; }
.roof-layout .roof-dot { z-index: 2; opacity: .8; }
.panel-spot { fill: rgba(255, 255, 255, .08); stroke: rgba(255, 255, 255, .75); stroke-width: 1.5; stroke-dasharray: 4 3; cursor: pointer; }
.panel-spot:hover { fill: rgba(245, 166, 35, .45); }
.panel-spot.on { fill: rgba(18, 32, 58, .88); stroke: #fff; stroke-width: 2; stroke-dasharray: none; }
.panel-spot.on:hover { fill: rgba(180, 35, 24, .7); }
.panel-spot.hidden { display: none; }
.roof-legend .sw-panel { border-radius: 2px; background: #12203a; border: 1px solid #fff; box-shadow: 0 0 0 1px #12203a; }
.roof-legend .sw-spot { border-radius: 2px; background: #fff; border: 1px dashed #5b6573; }
.layout-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 4px 0 6px; }
.layout-count { font-weight: 700; color: var(--navy); }
.layout-count.warn { color: var(--danger); }
.layout-pic { display: block; max-width: 320px; border-radius: 6px; border: 1px solid var(--line); margin: 6px 0; }
.roof-scroll { max-width: 960px; max-height: 620px; overflow: auto; border-radius: 8px; }
.roof-photo.roof-layout.zoomed { width: 300%; max-width: none; }
.roof-photo.roof-layout.zoomed .roof-img { max-width: none; }

/* v0.21.2: a product row with a problem (e.g. no quantity) */
tr.row-error td { background: #fdecea; }
tr.row-error input[name$="[qty]"] { border-color: var(--danger); outline: 2px solid var(--danger); }
