: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; }
.bc-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 { 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; margin-right:18px; }
a.link:last-child { margin-right:0; }
#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); }

/* Size: three dropdowns side by side */
.trio { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; }
.pick { display:flex; flex-direction:column; gap:4px; font-size:13px; color:var(--mute); }
.pick select, .row select[data-pick] { border:1px solid var(--line); border-radius:8px; padding:8px; background:#fff; font-size:15px; font-weight:600; color:var(--ink); width:100%; }
.row select[data-pick] { max-width:200px; }
/* Doors and windows: one button per kind, each opening its own list */
.catbtns { display:grid; gap:6px; }
.catbtns button { display:flex; align-items:center; gap:10px; width:100%; text-align:left; border:1px solid var(--line); background:#fff; border-radius:10px; padding:11px 14px; font-weight:600; cursor:pointer; }
.catbtns button span { flex:1; }
.catbtns button b { min-width:22px; height:22px; padding:0 6px; border-radius:999px; background:var(--accent); color:#fff; font-size:12px; display:grid; place-items:center; }
.catbtns button::after { content:''; width:7px; height:7px; border-right:2px solid var(--mute); border-top:2px solid var(--mute); transform:rotate(45deg); }
.catbtns button:hover { border-color:var(--accent); }
.catbtns button.bad { border-color:#dc2626; } .catbtns button.bad b { background:#dc2626; }
.catview { padding:10px 0 18px; }
.catview .back { border:0; background:none; padding:4px 0; color:var(--accent); font-weight:600; cursor:pointer; font-size:14px; }
.catview h2 { margin:6px 0 12px; font-size:19px; }
.catview .addone { width:100%; margin:4px 0 12px; }

#bar-price small.lead { display:block; margin-top:2px; color:var(--mute); font-size:12px; }

.paylist { display:grid; gap:8px; margin:8px 0; } .paylist .btn { width:100%; text-align:center; text-decoration:none; display:block; }
.paylist .payapp { background:#fff; color:var(--ink); border:1px solid var(--line); }

/* Dealer setup: Dealers tab */
.dl-card { border:1px solid var(--line); border-radius:12px; margin:10px 0; background:#fff; overflow:hidden; }
.dl-card.open { border-color:var(--accent); }
.dl-top { display:flex; justify-content:space-between; align-items:center; gap:12px; width:100%; text-align:left; border:0; background:none; padding:12px 14px; cursor:pointer; font:inherit; }
.dl-top small { color:var(--mute); } .dl-top i { color:#b45309; font-style:normal; }
.dl-tabs { display:flex; gap:4px; align-items:center; padding:0 14px; border-bottom:1px solid var(--line); flex-wrap:wrap; }
.dl-tabs button { border:0; background:none; padding:9px 12px; font:inherit; font-weight:600; color:var(--mute); border-bottom:2px solid transparent; cursor:pointer; }
.dl-tabs button.on { color:var(--accent); border-bottom-color:var(--accent); }
.dl-tabs a { margin-left:auto; font-size:13px; }
.dl-body { padding:12px 14px 14px; }
.dl-body textarea, #su-main form[data-dlform] input { border:1px solid var(--line); border-radius:8px; padding:8px; font:inherit; width:100%; box-sizing:border-box; }
.dl-login { display:flex; gap:8px; align-items:center; flex-wrap:wrap; margin:8px 0; } .dl-login input { flex:1; min-width:160px; width:auto !important; }
.dl-login button, .w9 button, .w9 .up { border:1px solid var(--line); background:#fff; border-radius:8px; padding:7px 12px; font:inherit; cursor:pointer; }
button.danger { color:#b42318; border-color:#e3b3ad !important; background:#fff; }
.w9 { display:flex; gap:10px; align-items:center; flex-wrap:wrap; margin:12px 0; padding:10px 12px; background:#f7f8fa; border-radius:10px; }
table.dlq { width:100%; border-collapse:collapse; font-size:13.5px; } table.dlq th, table.dlq td { text-align:left; padding:6px 8px; border-bottom:1px solid var(--line); }
table.dlq td:nth-child(5), table.dlq td:nth-child(6), table.dlq th:nth-child(5), table.dlq th:nth-child(6) { text-align:right; }
table.dls td:nth-child(n+2), table.dls th:nth-child(n+2) { text-align:right; } table.dls { margin-bottom:14px; }
table.dls tr.tot td { font-weight:700; border-top:2px solid var(--line); }
table.dlsd td:nth-child(2), table.dlsd td:nth-child(3), table.dlsd th:nth-child(2), table.dlsd th:nth-child(3) { text-align:left; }
.dl-sum { border:1px solid var(--line); border-radius:12px; background:#fff; padding:12px 14px 2px; margin:10px 0; overflow-x:auto; }
.dl-span { display:flex; gap:6px; margin-bottom:8px; } .dl-span button { border:1px solid var(--line); background:#fff; border-radius:999px; padding:5px 12px; font:inherit; font-size:13px; cursor:pointer; }
.dl-span button.on { background:var(--accent); border-color:var(--accent); color:#fff; }
.st { font-size:12px; padding:2px 7px; border-radius:999px; background:#eef1f4; } .st.signed { background:#dcfce7; color:#166534; } .st.paid { background:#dbeafe; color:#1e40af; }
.tools .btn, .tools button.btn { background:var(--accent); color:#fff; border:1px solid var(--accent); border-radius:8px; padding:8px 16px; font-weight:600; }

/* Door and window styles */
.sicon { flex:none; vertical-align:middle; }
.op-top .sicon { margin-right:2px; }
.op .stylepick { display:flex; align-items:center; gap:8px; font-size:13px; color:var(--mute); margin:6px 0; }
.op .stylepick select { flex:1; }
.op-at { margin:6px 0 0; }
#pop .stylepick { display:block; }
.pickhead { font-weight:600; margin:6px 0 8px; }
.stylegrid { display:grid; grid-template-columns:repeat(auto-fill,minmax(118px,1fr)); gap:8px; margin-bottom:14px; }
.stylegrid button { display:flex; flex-direction:column; align-items:center; gap:4px; border:1px solid var(--line); background:#fff; border-radius:10px; padding:10px 6px; cursor:pointer; font:inherit; font-size:13px; font-weight:600; text-align:center; }
.stylegrid button:hover { border-color:var(--accent); }
.stylegrid .sicon { width:44px; height:48px; }
.stylegrid small { color:var(--mute); font-weight:500; }

/* Dealer setup: door and window styles */
.strow { display:flex; gap:12px; align-items:flex-start; padding:10px 12px; border:1px solid var(--line); border-radius:10px; margin:8px 0; background:#fff; }
.strow .sicon { width:40px; height:44px; margin-top:2px; } .strow.off { opacity:.55; }
.stmain { flex:1; min-width:0; }
.stline { display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.stline input:not([type=checkbox]), .stline select { border:1px solid var(--line); border-radius:7px; padding:7px 8px; font:inherit; }
.stline [data-sty$="|name"] { flex:1; min-width:180px; }
.stprice input { width:80px; }
.stline .x { border:0; background:none; font-size:20px; color:var(--mute); cursor:pointer; }
.stsizes { margin-top:8px; font-size:13px; color:var(--mute); display:flex; gap:5px; flex-wrap:wrap; align-items:center; }
.stsizes button { border:1px solid var(--line); background:#fff; border-radius:999px; padding:2px 9px; font-size:12px; cursor:pointer; color:var(--mute); }
.stsizes button.on { background:var(--accent); border-color:var(--accent); color:#fff; }
/* contracts: the dealer's list and the customer's signing page */
body.ct-page { background:var(--bg); height:auto; min-height:100%; }
#ct-head { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; padding:12px 20px; background:#fff; border-bottom:1px solid var(--line); }
#ct-title { margin:0; font-size:18px; }
#ct-links { display:flex; gap:14px; flex-wrap:wrap; } #ct-links a { color:var(--accent); font-weight:600; text-decoration:none; }
#ct-main { max-width:960px; margin:0 auto; padding:18px 16px 60px; display:flex; flex-direction:column; gap:16px; }
.ct-card, section.ct-card { background:#fff; border:1px solid var(--line); border-radius:14px; padding:18px 20px; }
.ct-card h1 { margin:0 0 8px; font-size:22px; } .ct-card h2 { margin:0 0 12px; font-size:17px; }
.ct-card p { margin:8px 0; } .hint { color:var(--mute); font-size:13.5px; } .warn-t { color:#b42318; font-weight:600; }
.ct-drop { display:flex; flex-direction:column; align-items:center; gap:6px; text-align:center; padding:30px 16px; border:2px dashed var(--line); border-radius:12px; cursor:pointer; color:var(--mute); }
.ct-drop b { color:var(--accent); font-size:16px; } .ct-drop.over, .ct-drop:hover { border-color:var(--accent); background:color-mix(in srgb, var(--accent) 5%, #fff); }
.ct-draft { display:grid; grid-template-columns:200px minmax(0,1fr); gap:18px; align-items:start; }
.ct-thumb canvas { width:180px; border:1px solid var(--line); border-radius:6px; box-shadow:0 2px 8px rgba(0,0,0,.08); } .ct-thumb small { display:block; color:var(--mute); margin-top:6px; word-break:break-all; }
.ct-fields { display:grid; grid-template-columns:1fr 1fr; gap:10px 14px; }
.ct-fields label, .ct-f { display:flex; flex-direction:column; gap:4px; font-size:13px; font-weight:600; color:var(--mute); }
.ct-fields input, .ct-fields textarea, .ct-f input, .ct-paid input, .ct-paid select { border:1px solid var(--line); border-radius:8px; padding:9px 10px; font:inherit; color:var(--ink); font-weight:400; background:#fff; }
.ct-fields .wide { grid-column:1/-1; margin:0; } .ct-btns { display:flex; gap:10px; flex-wrap:wrap; }
.ct-list { width:100%; border-collapse:collapse; font-size:14px; }
.ct-list th { text-align:left; font-size:12px; color:var(--mute); font-weight:600; padding:6px 8px; border-bottom:1px solid var(--line); }
.ct-list td { text-align:left; padding:9px 8px; border-bottom:1px solid var(--line); vertical-align:top; } .ct-list td small { display:block; color:var(--mute); font-size:12px; }
.ct-list tr[data-open] { cursor:pointer; } .ct-list tr[data-open]:hover, .ct-list tr.on { background:#f8f9fb; }
.ct-list .chip.sent, .ct-list .chip.viewed { background:#e3edff; color:#1f4fa3; } .chip.signed, .chip.invoiced { background:#fff0d6; color:#8a5a00; }
.chip.paid, .chip.filed { background:#dcf5e3; color:#17663a; } .chip.void { background:#eceff3; color:var(--mute); } .chip.err { background:#fde4e1; color:#b42318; }
.ct-detail td { background:#f8f9fb; }
.ct-acts { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:10px; }
.ct-acts button, .ct-acts a, .ct-paid button { border:1px solid var(--line); background:#fff; border-radius:8px; padding:7px 11px; font-weight:600; font-size:13px; color:var(--ink); text-decoration:none; }
.ct-acts button:hover, .ct-acts a:hover { border-color:var(--accent); color:var(--accent); } .ct-acts .danger { color:#b42318; }
.ct-paid { display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin:10px 0; font-size:13.5px; } .ct-paid input[name=amount] { width:110px; }
.ct-log { margin:8px 0 0; padding-left:18px; font-size:13px; color:var(--mute); } .ct-log span { color:var(--ink); }
.ct-sign { display:flex; flex-direction:column; gap:16px; }
.ct-pages { display:flex; flex-direction:column; align-items:center; gap:12px; }
.ct-pages canvas { max-width:100%; height:auto; background:#fff; box-shadow:0 2px 10px rgba(0,0,0,.12); }
.ct-styles { display:grid; grid-template-columns:repeat(auto-fill,minmax(230px,1fr)); gap:10px; margin:6px 0 14px; }
.ct-styles button { border:2px solid var(--line); background:#fff; border-radius:10px; padding:10px 12px; min-height:74px; color:#14286e; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.ct-styles button.on { border-color:var(--accent); background:color-mix(in srgb, var(--accent) 6%, #fff); }
.ct-agree { display:flex; gap:10px; align-items:flex-start; margin:4px 0 14px; font-size:14px; } .ct-agree input { margin-top:3px; width:18px; height:18px; accent-color:var(--accent); }
.ct-f { margin-bottom:10px; } .ct-f input { font-size:17px; }
.ct-done h1 { color:#17663a; }
@media (max-width:640px) { .ct-draft { grid-template-columns:1fr; } .ct-fields { grid-template-columns:1fr; } .ct-list th:nth-child(5), .ct-list td:nth-child(5) { display:none; } }
