:root { --accent:#c2410c; --ink:#16202b; --mute:#5c6a78; --line:#dfe4ea; --bg:#f5f6f8; --card:#fff; }
* { box-sizing:border-box; }
html, body { margin:0; height:100%; }
body { font:15px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color:var(--ink); background:var(--bg); }
button, select, input { font:inherit; color:inherit; }
button { cursor:pointer; }
#app { display:grid; grid-template-columns:minmax(0,1fr) 400px; height:100vh; height:100dvh; }
#stage { position:relative; min-height:0; background:#dde8f1; }
#view { display:block; width:100%; height:100%; touch-action:none; outline:none; }
#views { position:absolute; left:12px; top:12px; display:flex; flex-wrap:wrap; gap:6px; max-width:calc(100% - 24px); }
#views button { border:0; border-radius:999px; padding:7px 13px; background:rgba(255,255,255,.9); box-shadow:0 1px 3px rgba(0,0,0,.18); font-size:13px; font-weight:600; }
#views button.on { background:var(--ink); color:#fff; }
#tip { position:absolute; left:12px; bottom:12px; font-size:12.5px; color:#22303d; background:rgba(255,255,255,.75); padding:5px 10px; border-radius:999px; pointer-events:none; }
#side { display:flex; flex-direction:column; min-height:0; background:var(--card); border-left:1px solid var(--line); }
#brand { display:flex; align-items:baseline; justify-content:space-between; gap:12px; padding:14px 18px; border-bottom:1px solid var(--line); }
#brand .co { font-size:18px; font-weight:700; }
#brand .ph { color:var(--accent); font-weight:700; text-decoration:none; white-space:nowrap; }
#panel { flex:1; overflow-y:auto; padding:4px 18px 18px; }
section { padding:14px 0; border-bottom:1px solid var(--line); }
h3 { margin:0 0 10px; font-size:12px; letter-spacing:.08em; text-transform:uppercase; color:var(--mute); }
.chips { display:flex; flex-wrap:wrap; gap:8px; }
.chips button { border:1px solid var(--line); background:#fff; border-radius:999px; padding:7px 14px; font-weight:600; }
.chips button:hover { border-color:var(--accent); color:var(--accent); }
.sl { display:grid; grid-template-columns:1fr auto; align-items:baseline; margin:8px 0 4px; }
.sl span { color:var(--mute); } .sl b { font-size:15px; }
.sl input { grid-column:1/-1; width:100%; margin:6px 0 0; accent-color:var(--accent); }
.cards { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; margin-bottom:12px; }
.cards button { text-align:left; border:2px solid var(--line); background:#fff; border-radius:10px; padding:10px; display:flex; flex-direction:column; gap:4px; }
.cards small { color:var(--mute); font-size:12px; line-height:1.3; }
.cards button:disabled { opacity:.4; cursor:not-allowed; }
.chips button:disabled { opacity:.45; cursor:not-allowed; }
.cards button.on { border-color:var(--accent); background:color-mix(in srgb, var(--accent) 7%, #fff); }
.row { display:flex; align-items:center; justify-content:space-between; gap:10px; margin:8px 0; }
.row > span { color:var(--mute); }
.seg { display:inline-flex; background:#eceff3; border-radius:9px; padding:3px; }
.seg button { border:0; background:none; border-radius:7px; padding:6px 11px; font-size:13.5px; font-weight:600; color:var(--mute); }
.seg button.on { background:#fff; color:var(--ink); box-shadow:0 1px 2px rgba(0,0,0,.18); }
.seg button:disabled { opacity:.4; cursor:not-allowed; }
.wrow { display:flex; flex-direction:column; gap:5px; margin:10px 0; }
.wrow > span { color:var(--mute); font-size:13.5px; }
.wrow .seg { display:flex; } .wrow .seg button { flex:1; padding:6px 4px; }
.chips button.on { border-color:var(--accent); color:var(--accent); background:color-mix(in srgb, var(--accent) 7%, #fff); }
.dims2 { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-top:8px; }
.dims2 label { display:flex; flex-direction:column; gap:3px; font-size:12.5px; color:var(--mute); }
.dims2 input { border:1px solid var(--line); border-radius:7px; padding:6px 8px; width:100%; }
.op .wrow:first-of-type { margin-top:6px; }
.op { border:1px solid var(--line); border-radius:10px; padding:10px 12px; margin-top:10px; }
.op.bad { border-color:#e3b341; background:#fffaeb; }
.op-top { display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
.op-top strong { margin-right:auto; }
.op select { border:1px solid var(--line); border-radius:7px; padding:5px 6px; background:#fff; font-size:13.5px; }
.x { border:0; background:none; font-size:22px; line-height:1; color:var(--mute); padding:0 4px; }
.warn { color:#8a5a00; font-size:13px; margin-top:6px; }
ul.warn { padding-left:18px; }
.hint { color:var(--mute); font-size:12.5px; margin:8px 0 0; }
.tabs { display:flex; gap:6px; margin-bottom:10px; flex-wrap:wrap; }
.tabs button { display:flex; align-items:center; gap:6px; border:1px solid var(--line); background:#fff; border-radius:8px; padding:6px 10px; font-weight:600; font-size:13.5px; }
.tabs button.on { border-color:var(--ink); }
.tabs i { width:14px; height:14px; border-radius:50%; border:1px solid rgba(0,0,0,.25); }
.sw { display:grid; grid-template-columns:repeat(8,1fr); gap:7px; }
.sw button { aspect-ratio:1; border-radius:8px; border:1px solid rgba(0,0,0,.22); padding:0; }
.sw button.on { outline:3px solid var(--accent); outline-offset:2px; }
.link { border:0; background:none; color:var(--mute); text-decoration:underline; padding:14px 0 0; font-size:13px; }
#bar { position:relative; display:flex; flex-direction:column; gap:8px; padding:10px 14px 12px; border-top:1px solid var(--line); background:#fff; }
#bar-price { margin-right:auto; display:flex; flex-direction:column; }
#bar-price small { color:var(--mute); font-size:12px; white-space:nowrap; }
#bar-price strong { font-size:24px; line-height:1.1; }
#bar-price em { font-style:normal; font-size:12px; color:var(--mute); font-weight:500; }
.btn { border:0; border-radius:10px; padding:12px 16px; font-weight:700; background:var(--accent); color:#fff; white-space:nowrap; }
.btn.ghost { background:#eceff3; color:var(--ink); padding:12px 11px; }
#breakdown { display:none; position:absolute; left:12px; right:12px; bottom:calc(100% + 8px); max-height:60vh; overflow:auto; background:#fff; border:1px solid var(--line); border-radius:12px; box-shadow:0 10px 30px rgba(0,0,0,.18); padding:14px; }
#breakdown.on { display:block; }
table { width:100%; border-collapse:collapse; font-size:14px; }
td { padding:5px 0; vertical-align:top; } td:last-child { text-align:right; white-space:nowrap; padding-left:12px; font-variant-numeric:tabular-nums; }
tr.tot td { border-top:2px solid var(--ink); font-weight:700; font-size:16px; padding-top:8px; }
#toast { position:fixed; left:50%; bottom:90px; transform:translate(-50%,20px); background:var(--ink); color:#fff; padding:10px 16px; border-radius:10px; opacity:0; pointer-events:none; transition:.2s; max-width:90vw; z-index:50; }
#toast.on { opacity:1; transform:translate(-50%,0); }
dialog { border:0; border-radius:14px; padding:0; width:min(560px, 94vw); max-height:92vh; box-shadow:0 20px 60px rgba(0,0,0,.35); color:var(--ink); }
dialog::backdrop { background:rgba(15,22,30,.55); }
.dl { padding:20px 22px; }
.dl h2 { margin:0 0 4px; font-size:20px; } .dl p { margin:6px 0 12px; }
.dl ul { margin:8px 0 12px; padding-left:18px; font-size:14px; }
.fields { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin:12px 0; }
.fields label { display:flex; flex-direction:column; gap:4px; font-size:13px; color:var(--mute); }
.fields .wide { grid-column:1/-1; }
.fields input, .fields textarea { border:1px solid var(--line); border-radius:8px; padding:9px 10px; font:inherit; color:var(--ink); }
.actions { display:flex; gap:8px; justify-content:flex-end; flex-wrap:wrap; margin-top:14px; }
#bar[hidden], #bar-open[hidden], #bar-details[hidden] { display:none; }
#bar-top { display:flex; align-items:center; gap:8px; }
#bar-btns { display:flex; gap:8px; } #bar-btns .btn { flex:1; padding:11px 8px; }
#bar-open { display:flex; justify-content:space-between; gap:8px; font-size:13px; background:#eef4ff; border-radius:8px; padding:6px 10px; }
#bar-open button { border:0; background:none; text-decoration:underline; color:var(--mute); padding:0; font-size:13px; }
.zip { width:110px; border:1px solid var(--line); border-radius:8px; padding:8px 10px; font-size:16px; letter-spacing:.06em; }
dialog.wide { width:min(760px, 96vw); }
.ck { display:flex; align-items:center; gap:8px; margin:8px 0; } .ck input { width:18px; height:18px; accent-color:var(--accent); }
.doc { border:1px solid var(--line); border-radius:10px; padding:12px 14px; margin:10px 0; font-size:14px; }
.doc-h { display:flex; justify-content:space-between; gap:10px; flex-wrap:wrap; border-bottom:1px solid var(--line); padding-bottom:8px; margin-bottom:8px; }
.doc h4 { margin:12px 0 4px; font-size:12px; letter-spacing:.08em; text-transform:uppercase; color:var(--mute); }
.doc ul { margin:4px 0; padding-left:18px; } .doc p { margin:6px 0; }
.sig { margin-top:10px; } .sig img { display:block; max-width:260px; height:auto; border-bottom:1px solid var(--ink); }
.pad { position:relative; border:2px dashed #b8c0ca; border-radius:10px; margin:10px 0; background:#fff; }
.pad canvas { display:block; width:100%; height:auto; aspect-ratio:10/3; touch-action:none; cursor:crosshair; }
.pad span { position:absolute; inset:0; display:grid; place-items:center; color:#9aa5b1; pointer-events:none; }
.pad.inked span { display:none; }
.pad button { position:absolute; right:8px; top:8px; border:0; background:#eceff3; border-radius:6px; padding:4px 10px; font-size:13px; }
table.list td { padding:9px 8px 9px 0; border-bottom:1px solid var(--line); text-align:left; white-space:normal; font-variant-numeric:normal; }
table.list small { color:var(--mute); }
td.acts { display:flex; flex-wrap:wrap; gap:6px; justify-content:flex-end; padding-right:0 !important; }
td.acts button { border:1px solid var(--line); background:#fff; border-radius:7px; padding:5px 9px; font-size:13px; font-weight:600; }
.chip { display:inline-block; font-size:11.5px; font-weight:700; border-radius:999px; padding:2px 8px; background:#eceff3; color:var(--mute); }
.chip.s-signed { background:#dcf5e3; color:#17663a; } .chip.s-sent, .chip.s-viewed { background:#e3edff; color:#1f4fa3; } .chip.s-lead { background:#fff0d6; color:#8a5a00; }
.pb-hosted #dealer-open { display:none; }
.dl h4 { margin:16px 0 4px; font-size:12px; letter-spacing:.08em; text-transform:uppercase; color:var(--mute); }
#bg-pick { display:grid; grid-template-columns:repeat(4,1fr); gap:8px; max-width:560px; }
#bg-pick button { border:2px solid var(--line); background:#fff; border-radius:10px; padding:6px 6px 8px; font-size:13px; font-weight:600; display:flex; flex-direction:column; gap:6px; align-items:center; }
#bg-pick button.on { border-color:var(--accent); }
#bg-pick i { display:block; width:100%; height:44px; border-radius:6px; }
@media (max-width:520px) { #bg-pick { grid-template-columns:repeat(2,1fr); } }
#preview-bar { position:absolute; left:50%; top:54px; transform:translateX(-50%); display:flex; gap:8px; align-items:center; flex-wrap:wrap; justify-content:center; background:#fff4e0; border:1px solid #e3b341; color:#5c3d00; border-radius:10px; padding:8px 12px; font-size:13.5px; box-shadow:0 4px 14px rgba(0,0,0,.15); max-width:calc(100% - 24px); }
#preview-bar[hidden] { display:none; }
#inside-bar { position:absolute; left:50%; bottom:14px; transform:translateX(-50%); display:flex; gap:12px; align-items:center; background:var(--ink); color:#fff; border-radius:12px; padding:9px 10px 9px 16px; font-size:14px; box-shadow:0 6px 18px rgba(0,0,0,.25); max-width:calc(100% - 24px); }
#inside-bar[hidden] { display:none; }
#inside-bar button { border:0; background:var(--accent); color:#fff; border-radius:8px; padding:8px 16px; font-weight:700; }
#preview-bar button { border:1px solid #d9a52e; background:#fff; border-radius:7px; padding:5px 10px; font-weight:600; font-size:13px; }
/* ---- dealer setup page ---- */
body.setup-page { background:#fff; }
#dealer { height:100vh; height:100dvh; }
#setup { display:grid; grid-template-columns:210px minmax(0,1fr); grid-template-rows:auto minmax(0,1fr); height:100%; }
#setup header { grid-column:1/-1; display:flex; align-items:center; gap:8px; padding:12px 16px; border-bottom:1px solid var(--line); flex-wrap:wrap; }
#setup header b { font-size:18px; } #setup header .sp { flex:1; }
#setup header a { color:var(--mute); font-size:13.5px; }
#setup header button { border:1px solid var(--line); background:#fff; border-radius:8px; padding:8px 13px; font-weight:600; }
#setup header button.btn { border-color:var(--accent); background:var(--accent); color:#fff; }
#setup header button:disabled { opacity:.4; cursor:default; }
#su-status { font-size:13px; color:var(--mute); } #su-status.dirty { color:#9a5b00; font-weight:600; }
#su-nav { border-right:1px solid var(--line); padding:10px; display:flex; flex-direction:column; gap:2px; overflow:auto; background:#fafbfc; }
#su-nav button, .sheets button { text-align:left; border:0; background:none; border-radius:8px; padding:9px 11px; font-weight:600; color:var(--mute); }
#su-nav button.on, .sheets button.on { background:color-mix(in srgb, var(--accent) 10%, #fff); color:var(--ink); }
#su-main { overflow:auto; padding:8px 20px 20px; min-width:0; }
#su-main h3 { margin:14px 0 4px; font-size:17px; letter-spacing:0; text-transform:none; color:var(--ink); }
#su-main h4 { margin:16px 0 6px; font-size:12px; letter-spacing:.08em; text-transform:uppercase; color:var(--mute); }
#su-main p { margin:4px 0 12px; max-width:860px; }
#su-main select { border:1px solid var(--line); border-radius:8px; padding:8px; background:#fff; }
.split { display:grid; grid-template-columns:190px minmax(0,1fr); gap:16px; } .sheets { display:flex; flex-direction:column; gap:2px; padding-top:12px; } .sheet { min-width:0; }
.tools { display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin:8px 0; font-size:14px; }
.tools input { width:74px; } .tools input, table.rows input, table.rows select, .items input { border:1px solid var(--line); border-radius:7px; padding:6px 8px; }
.tools button, table.rows button { border:1px solid var(--line); background:#fff; border-radius:7px; padding:6px 10px; font-weight:600; font-size:13px; }
.gridwrap { overflow:auto; max-height:calc(100vh - 330px); border:1px solid var(--line); border-radius:8px; }
table.grid { border-collapse:separate; border-spacing:0; width:auto; font-size:13px; }
table.grid th { position:sticky; top:0; background:#f1f3f6; padding:6px 8px; font-weight:700; white-space:nowrap; border-bottom:1px solid var(--line); z-index:1; text-align:right; }
table.grid tr th:first-child { left:0; z-index:2; text-align:left; border-right:1px solid var(--line); }
table.grid tr:not(:first-child) th { top:auto; z-index:1; }
table.grid td { padding:0; border-bottom:1px solid #eef0f3; border-right:1px solid #eef0f3; }
table.grid input { width:68px; border:0; padding:6px 7px; text-align:right; background:transparent; font-variant-numeric:tabular-nums; }
table.grid input:focus { outline:2px solid var(--accent); outline-offset:-2px; background:#fff; }
input.chg { background:#ffe8c7 !important; }
table.rows { width:auto; } table.rows th { text-align:left; font-size:12.5px; color:var(--mute); padding:4px 8px 4px 0; font-weight:600; }
table.rows td { padding:4px 8px 4px 0; text-align:left !important; white-space:nowrap; } table.rows td.pc input { width:84px; }
table.rows input[data-f=zips] { width:320px; } table.rows input[data-f=label] { width:220px; } table.rows input[data-f=value] { width:84px; }
.items { display:grid; grid-template-columns:repeat(auto-fill, minmax(290px, 1fr)); gap:6px 22px; max-width:960px; }
.items label { display:flex; align-items:center; gap:5px; } .items span { flex:1; } .items i { font-style:normal; color:var(--mute); width:10px; } .items input { width:92px; text-align:right; }
@media (max-width:760px) { #setup { grid-template-columns:1fr; grid-template-rows:auto auto minmax(0,1fr); } #su-nav { flex-direction:row; border-right:0; border-bottom:1px solid var(--line); } #su-nav button { white-space:nowrap; } .split { grid-template-columns:1fr; } .sheets { flex-direction:row; flex-wrap:wrap; } }
#pop { position:absolute; z-index:5; min-width:210px; max-width:260px; background:#fff; border-radius:12px; box-shadow:0 10px 30px rgba(0,0,0,.28); padding:10px 12px 12px; display:flex; flex-direction:column; gap:8px; font-size:14px; }
#pop[hidden] { display:none; }
.pop-h { display:flex; justify-content:space-between; align-items:center; } .pop-h button { border:0; background:none; font-size:22px; line-height:1; color:var(--mute); }
#pop label { display:flex; flex-direction:column; gap:3px; font-size:12.5px; color:var(--mute); } #pop label.ck { flex-direction:row; font-size:14px; color:var(--ink); margin:0; }
#pop select, #pop input[type=number] { border:1px solid var(--line); border-radius:7px; padding:7px 8px; font-size:14px; color:var(--ink); background:#fff; }
#pop p { margin:0; color:var(--mute); } #pop .seg { display:flex; } #pop .seg button { flex:1; }
#pop > button { border:1px solid var(--line); background:#fff; border-radius:8px; padding:8px; font-weight:600; }
#pop > button.del { border-color:#e9b4b4; color:#a12020; }
h4.sub { margin:12px 0 2px; font-size:13px; } .row small { color:var(--mute); font-size:12px; margin-left:4px; }
.row select { border:1px solid var(--line); border-radius:8px; padding:7px 8px; background:#fff; max-width:170px; }
#print { display:none; }
@media (max-width: 860px) {
  #app { grid-template-columns:1fr; grid-template-rows:44vh minmax(0,1fr); }
  #side { border-left:0; border-top:1px solid var(--line); }
  #tip { display:none; }
  .cards { grid-template-columns:1fr; }
}
@media print {
  #app, dialog, #toast, body.setup-page #dealer { display:none !important; }
  html, body { background:#fff !important; height:auto; }
  @page { margin:0.5in; }
  #print { display:block; color:#111; font-size:12.5px; -webkit-print-color-adjust:exact; print-color-adjust:exact; }
  #print h1 { margin:0; font-size:24px; } #print h2 { margin:12px 0 4px; font-size:12px; letter-spacing:.08em; text-transform:uppercase; color:#555; }
  #print p { margin:3px 0; } #print ul { margin:4px 0; padding-left:18px; } #print li { margin:1px 0; }
  #print .p-head { display:flex; justify-content:space-between; align-items:flex-end; gap:20px; }
  #print .p-meta { text-align:right; display:flex; flex-direction:column; } #print .p-meta b { font-size:16px; }
  #print .p-img { width:100%; max-height:3.9in; object-fit:contain; border:1px solid #ccc; margin:10px 0 2px; }
  #print table { font-size:12.5px; } #print td { padding:3px 0; } #print .hint { color:#555; font-size:11px; }
  #print .terms { font-size:11px; color:#444; margin-top:12px; }
  #print .sig img { width:2.6in; border:0; border-bottom:1px solid #000; display:block; }
  #print .sig, #print .sigline { break-inside:avoid; }
  #print .sigline { display:flex; gap:40px; margin-top:44px; } #print .sigline span { flex:1; border-top:1px solid #000; padding-top:4px; font-size:12px; }
  #print .sigline span:last-child { flex:0 0 1.6in; }
  /* Classic: plain letterhead, everything in one column */
  #print.tpl-classic .p-head { border-bottom:2px solid #111; padding-bottom:8px; }
  /* Modern: colour band across the top, building and price side by side */
  #print.tpl-modern .p-head { background:var(--accent); color:#fff; padding:16px 18px; border-radius:8px; align-items:center; }
  #print.tpl-modern h2 { color:var(--accent); }
  #print.tpl-modern .p-body { display:grid; grid-template-columns:1fr 1fr; gap:0 26px; }
  #print.tpl-modern .p-cust, #print.tpl-modern .p-img { grid-column:1/-1; }
  #print.tpl-modern .p-img { border:0; border-radius:8px; }
  #print.tpl-modern tr.tot td { border-top-color:var(--accent); }
  /* Compact: small picture beside the customer, tight type, made to fit one page */
  #print.tpl-compact { font-size:11px; } #print.tpl-compact h1 { font-size:18px; }
  #print.tpl-compact .p-head { border-bottom:1px solid #999; padding-bottom:5px; }
  #print.tpl-compact .p-body { display:grid; grid-template-columns:1fr 2.9in; gap:0 16px; }
  #print.tpl-compact .p-cust { grid-column:1; grid-row:1; } #print.tpl-compact .p-img { grid-column:2; grid-row:1 / span 2; max-height:2.2in; margin:6px 0; }
  #print.tpl-compact .p-build { grid-column:1; grid-row:2; } #print.tpl-compact .p-price { grid-column:1/-1; }
  #print.tpl-compact table, #print.tpl-compact td { font-size:11px; padding:1.5px 0; }
}
a.link { display:inline-block; }
#tpl-pick { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; max-width:520px; }
#tpl-pick button { border:2px solid var(--line); background:#fff; border-radius:10px; padding:8px; font-weight:600; font-size:13px; display:flex; flex-direction:column; gap:6px; align-items:center; }
#tpl-pick button.on { border-color:var(--accent); }
.tp { width:100%; aspect-ratio:8.5/11; background:#fff; border:1px solid #cfd5dc; border-radius:3px; padding:7%; display:grid; gap:5%; align-content:start; }
.tp i { display:block; background:#d7dce2; border-radius:2px; height:6px; } .tp i.h { height:12px; background:#8a94a0; } .tp i.pic { height:auto; aspect-ratio:16/9; background:#b9c7d6; }
.tp.modern i.h { height:20px; background:var(--accent); margin:-7% -7% 0; border-radius:2px 2px 0 0; } .tp.modern .cols, .tp.compact .cols { display:grid; grid-template-columns:1fr 1fr; gap:6%; }
.tp .cols > div { display:grid; gap:4px; align-content:start; } .tp.compact i.pic { aspect-ratio:4/3; }

/* dealer setup: what you offer, payment methods */
.offer { display:grid; grid-template-columns:repeat(auto-fill, minmax(190px, 1fr)); gap:6px 14px; margin-bottom:6px; }
.offer .dot { display:inline-block; width:14px; height:14px; border-radius:50%; border:1px solid #0003; vertical-align:-2px; margin-right:5px; }
.paylist { display:grid; grid-template-columns:max-content 1fr; gap:6px 12px; align-items:center; margin-top:6px; }
.paylist input:not([type=checkbox]) { padding:7px 9px; border:1px solid var(--line); border-radius:7px; font:inherit; }
.pay { margin:10px 0; font-size:14px; } .pay ul { margin:4px 0 0; padding-left:18px; } .pay p { margin:6px 0 0; }
@media print {
  #print.tpl-order { font-size:11.5px; } #print.tpl-order h1 { font-size:20px; margin:0; } #print.tpl-order h2 { font-size:13px; margin:10px 0 3px; }
  #print.tpl-order .p-head { display:flex; justify-content:space-between; border-bottom:2px solid #111; padding-bottom:6px; }
  #print.tpl-order .p-meta { text-align:right; display:flex; flex-direction:column; }
  #print.tpl-order .o-top { display:grid; grid-template-columns:1fr 3.3in; gap:14px; } #print.tpl-order .o-top ul { margin:0; padding-left:16px; }
  #print.tpl-order .o-main { width:100%; border:1px solid #bbb; margin-top:10px; }
  #print.tpl-order .o-ops { width:100%; border-collapse:collapse; } #print.tpl-order .o-ops th, #print.tpl-order .o-ops td { border:1px solid #bbb; padding:2px 6px; text-align:left; font-size:11px; }
  #print.tpl-order .o-sides { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-top:10px; break-inside:avoid; }
  #print.tpl-order figure { margin:0; break-inside:avoid; } #print.tpl-order figure img { width:100%; border:1px solid #bbb; display:block; }
  #print.tpl-order figcaption { text-align:center; font-weight:700; padding:2px 0; }
  #print.tpl-order .o-money { margin-top:10px; padding-top:6px; border-top:2px solid #111; font-size:13px; }
}

/* license */
.demo-note, #su-demo { background:#fff4d6; color:#7a4b00; border:1px solid #ecd28a; border-radius:6px; padding:3px 9px; font-size:12.5px; font-weight:600; }
.demo-note { margin-bottom:6px; display:inline-block; }
.okbox, .warnbox { border-radius:8px; padding:10px 13px; margin:8px 0 12px; max-width:760px; }
.okbox { background:#e9f6ec; border:1px solid #abd9b5; } .warnbox { background:#fff4d6; border:1px solid #ecd28a; }
#lic-key { font-family:ui-monospace, Consolas, monospace; font-size:12.5px; word-break:break-all; }
#brand { flex-wrap:wrap; } #brand .demo-note { flex-basis:100%; margin-bottom:8px; }
.btn:disabled { opacity:.45; cursor:not-allowed; }

/* Slim, quiet scrollbars inside the designer, so on a web page it does not look like a second page scrollbar. */
#panel, #su-main, #su-nav, dialog, .gridwrap, #breakdown { scrollbar-width: thin; scrollbar-color: #cdd3da transparent; }
#panel::-webkit-scrollbar, #su-main::-webkit-scrollbar, dialog::-webkit-scrollbar, #breakdown::-webkit-scrollbar { width: 8px; height: 8px; }
#panel::-webkit-scrollbar-thumb, #su-main::-webkit-scrollbar-thumb, dialog::-webkit-scrollbar-thumb, #breakdown::-webkit-scrollbar-thumb { background: #cdd3da; border-radius: 8px; }
#panel::-webkit-scrollbar-track, #su-main::-webkit-scrollbar-track, dialog::-webkit-scrollbar-track, #breakdown::-webkit-scrollbar-track { background: transparent; }

/* Folding option groups */
section.fold > h3 { cursor:pointer; display:flex; justify-content:space-between; align-items:center; margin:-14px 0 0; padding:14px 0 10px; user-select:none; }
section.fold > h3::after { content:''; width:7px; height:7px; border-right:2px solid var(--mute); border-bottom:2px solid var(--mute); transform:rotate(-135deg); margin:4px 4px 0 0; transition:transform .15s; }
section.fold > h3:hover, section.fold > h3:focus-visible { color:var(--ink); outline:none; }
section.fold.shut > h3 { padding-bottom:14px; margin-bottom:-14px; }
section.fold.shut > h3::after { transform:rotate(45deg); margin-top:-4px; }
section.fold.shut > :not(h3) { display:none; }
/* This quote's own sales tax rate */
.taxrow input { width:64px; padding:3px 5px; border:1px solid var(--line); border-radius:6px; font:inherit; text-align:right; }
.taxrow small { display:block; color:var(--mute); font-size:11px; }
.taxrow button { display:block; border:0; background:none; padding:0; font-size:11px; text-decoration:underline; color:var(--mute); cursor:pointer; }

/* Add-ons typed onto one quote */
.xrow button { border:0; background:none; color:var(--mute); font-size:16px; line-height:1; padding:0 4px; cursor:pointer; }
.xadd div { display:flex; gap:6px; margin:6px 0 2px; }
.xadd input { min-width:0; padding:5px 7px; border:1px solid var(--line); border-radius:6px; font:inherit; font-size:13px; }
.xadd [data-xlabel] { flex:1; width:0; } .xadd [data-xamount] { width:72px; flex:none; text-align:right; }
.xadd [data-xadd] { border:1px solid var(--line); background:#fff; border-radius:6px; padding:5px 10px; font:inherit; font-size:13px; cursor:pointer; }
.xsaved { flex-wrap:wrap; } .xsaved button { border:1px dashed var(--line); background:#fff; border-radius:999px; padding:3px 9px; font:inherit; font-size:12px; cursor:pointer; }

/* Dealer setup: color list and add-on list */
.colist, .addlist { display:grid; gap:6px; margin:8px 0; max-width:520px; }
.colist > div, .addlist > div { display:flex; gap:6px; align-items:center; }
.colist input[type=color] { width:42px; height:34px; padding:2px; border:1px solid var(--line); border-radius:6px; background:#fff; cursor:pointer; }
.colist input:not([type=color]), .addlist input { padding:7px 9px; border:1px solid var(--line); border-radius:6px; font:inherit; min-width:0; }
.colist [data-col$="hex"] { width:92px; font-family:ui-monospace,Menlo,Consolas,monospace; } .colist [data-col$="name"], .addlist [data-addon$="label"] { flex:1; }
.addlist [data-addon$="amount"] { width:110px; text-align:right; }
.colist button, .addlist button { border:0; background:none; font-size:18px; color:var(--mute); cursor:pointer; padding:0 6px; }

.pay .paid, p.okline { color:#166534; font-weight:600; } .pay .paid small { font-weight:400; color:var(--mute); }
.sig .rec { font-size:11px; color:var(--mute); }

/* ---------- materials and costs (contractor only) ---------- */
.matwrap { max-height:max(180px, calc(100vh - 560px)); overflow:auto; border:1px solid var(--line); border-radius:10px; margin:10px 0; }
table.mat { width:100%; border-collapse:collapse; font-size:13.5px; }
table.mat th, table.mat td { text-align:left; padding:6px 10px; border-bottom:1px solid var(--line); vertical-align:top; }
table.mat th { font-size:12px; color:var(--mute); font-weight:600; position:sticky; top:0; background:#fff; }
table.mat .n { text-align:right; white-space:nowrap; font-variant-numeric:tabular-nums; }
table.mat tr.grp th { position:static; background:#f3f4f6; color:var(--ink); font-size:12px; letter-spacing:.06em; text-transform:uppercase; }
table.mat td small { display:block; color:var(--mute); font-size:12px; }
table.costsum { border-collapse:collapse; margin:8px 0 12px; min-width:340px; font-size:14px; }
table.costsum td { padding:4px 0; } table.costsum td:last-child { text-align:right; padding-left:28px; font-variant-numeric:tabular-nums; }
table.costsum small { color:var(--mute); margin-left:6px; }
table.costsum tr.tot td { border-top:1px solid var(--ink); font-weight:700; }
table.costsum tr.good td:last-child { color:#15803d; } table.costsum tr.bad td:last-child { color:#b91c1c; }
h4.sub + .chips { margin-top:6px; }
@media print {
  #print table.mat { font-size:11px; } #print table.mat th, #print table.mat td { padding:2.5px 6px; border-bottom:1px solid #ddd; }
  #print table.mat th { position:static; } #print table.mat tr.grp th { background:#eee; }
  #print table.mat tr { break-inside:avoid; } #print table.mat th:first-child { width:38%; } #print table.mat td:nth-child(4) { width:34%; } #print .o-mat { break-before:page; }
  #print.tpl-mat .p-head { border-bottom:2px solid #111; padding-bottom:8px; margin-bottom:8px; }
}

/* ---------- plan drawings and the homeowner's plan order ---------- */
.plans figure { margin:0; } .plans svg { width:100%; height:auto; display:block; }
.plans .plan svg { max-height:70vh; } .plans .elevs { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.plans figcaption { font-size:12.5px; font-weight:600; text-align:center; } .plan-notes { font-size:13px; margin:6px 0; padding-left:18px; }
.plan-buy { display:grid; grid-template-columns:1fr 1fr; gap:18px; align-items:start; }
.plan-prev { border:1px solid var(--line); border-radius:10px; padding:8px; } .plan-prev svg { width:100%; height:auto; display:block; }
.demo-wrap { position:relative; overflow:hidden; }
.demo-mark { position:absolute; inset:0; display:grid; grid-template-columns:1fr 1fr; place-items:center; pointer-events:none; }
.demo-mark span { font:800 34px/1 system-ui, sans-serif; letter-spacing:.12em; color:rgba(190,30,30,.28); transform:rotate(-24deg); }
.plan-pick { display:flex; gap:10px; align-items:flex-start; border:1px solid var(--line); border-radius:10px; padding:10px 12px; margin-bottom:8px; cursor:pointer; }
.plan-pick:has(input:checked) { border-color:var(--accent); box-shadow:0 0 0 1px var(--accent); }
.plan-pick i { font-style:normal; font-weight:700; color:var(--accent); margin-left:6px; } .plan-pick small { display:block; color:var(--mute); margin-top:3px; }
@media (max-width:760px) { .plan-buy { grid-template-columns:1fr; } }
@media print {
  #print.tpl-plans .p-head, #print.tpl-order .p-head { border-bottom:2px solid #111; padding-bottom:6px; }
  #print.tpl-plans .o-top { display:grid; grid-template-columns:1fr 3.3in; gap:14px; } #print.tpl-plans .o-main { width:100%; border:1px solid #bbb; margin-top:10px; }
  #print.tpl-plans .o-ops { width:100%; border-collapse:collapse; } #print.tpl-plans .o-ops th, #print.tpl-plans .o-ops td { border:1px solid #bbb; padding:2px 6px; text-align:left; font-size:11px; }
  #print .plans { break-before:page; } #print .plans .plan svg { max-height:6.6in; } #print .plans .elev-h { break-before:page; } #print .plans figure { break-inside:avoid; }
  #print .print-demo { position:fixed; inset:0; display:grid; grid-template-columns:1fr 1fr 1fr; place-items:center; z-index:5; }
  #print .print-demo span { font:800 54px/1 Arial, sans-serif; letter-spacing:.12em; color:rgba(190,30,30,.16); transform:rotate(-28deg); }
}

/* Change orders and invoices on a job, and the customer list */
.jobdoc { border:1px solid var(--line, #d5dbe1); border-radius:10px; padding:12px 14px; margin:12px 0; background:#fff; }
.jobdoc .doc-h { display:flex; justify-content:space-between; gap:12px; margin-bottom:6px; }
.jobdoc .doc-h span { color:#5c6a78; font-size:13px; }
.jobdoc .acts { display:flex; flex-wrap:wrap; gap:6px; margin-top:8px; }
.jobdoc .acts button { font:inherit; font-size:13px; padding:5px 10px; border:1px solid #c5ced6; border-radius:7px; background:#fff; cursor:pointer; }
.jobdoc .acts button:hover { background:#f1f4f6; }
.jobdoc .sig img { max-height:70px; }
table.docitems { margin:4px 0; } table.docitems td.n, table.docitems th.n { text-align:right; white-space:nowrap; }
table.jobsum { margin:10px 0 14px; }
.docline { display:grid; grid-template-columns:1fr 130px; gap:8px; margin:6px 0; }
.docline input { font:inherit; padding:8px 10px; border:1px solid #c5ced6; border-radius:8px; min-width:0; }
.jobdocs-h { margin:18px 0 0; }
table.cust th { text-align:left; font-size:13px; color:#5c6a78; padding:6px 8px; }
table.cust td:first-child, table.cust th:first-child { width:30px; }
@media print { #print.tpl-jobdoc h2 { margin:16px 0 6px; font-size:15px; } #print.tpl-jobdoc table.mat { width:100%; } }
/* Homeowner products: visible before opening checkout. */
.homeowner-offer{padding:16px 0 14px;border-bottom:1px solid var(--line)}
.homeowner-offer h2{font-size:19px;margin:0 0 6px;line-height:1.25}
.homeowner-intro{font-size:13px;color:var(--mute);margin:0 0 12px}
.homeowner-tier{padding:10px 12px;background:#f5f7f9;border:1px solid var(--line);border-radius:8px;margin:8px 0}
.homeowner-tier b{font-size:14px}.homeowner-tier p{font-size:12px;line-height:1.45;margin:5px 0 0}
.homeowner-note{font-size:11px;color:var(--mute);line-height:1.45;margin:10px 0 0}
#bar-price strong.homeowner-bar-prices{font-size:14px;line-height:1.4}
