/* Snap & Stitch demo (/for/upholsterers/demo). Built on site.css tokens: --o orange, --head/--text/--muted, --card/--bg2/--line. */
body.dm { background: var(--bg2); color: var(--text); }
.dm .sp { flex: 1; }
.dm .xs { font-size: 12px; }
.dm .muted { color: var(--muted); }
.dm-banner { position: sticky; top: 0; z-index: 30; display: flex; gap: 10px; align-items: center; justify-content: center; flex-wrap: wrap; padding: 9px 16px; background: var(--deep); color: #fff; font-size: 13px; font-weight: 500; text-align: center; }
.dm-banner b { background: var(--o); color: #fff; border-radius: 4px; padding: 2px 8px; font-size: 11px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }
.dm-top { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; max-width: 1400px; margin: 0 auto; padding: 18px 20px 0; }
.dm-brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--head); font-weight: 900; font-size: 20px; letter-spacing: -.04em; }
.dm-prod { font-weight: 800; color: var(--head); font-size: 14px; padding: 6px 12px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line); background: var(--card); }
.dm-prod i { font-style: normal; color: var(--muted); font-weight: 500; }
.dm-back { color: var(--muted); font-weight: 600; font-size: 14px; text-decoration: none; }
.dm-back:hover { color: var(--o); }
.dm-main { max-width: 1400px; margin: 0 auto; padding: 0 20px 80px; }
.dm-intro { padding: 44px 0 26px; }
.dm-eyebrow { font-size: 11px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; color: var(--o); margin-bottom: 14px; }
.dm-intro h1 { font-size: clamp(40px, 7vw, 86px); }
.dm-intro h1 em { color: var(--o); font-style: normal; }
.dm-intro .lead { max-width: 760px; margin: 18px 0 22px; font-size: 17px; line-height: 1.65; }
.dm-how { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.dm-how li { background: var(--card); box-shadow: inset 0 0 0 .5px var(--line); border-radius: 999px; padding: 8px 16px; font-weight: 700; font-size: 13.5px; color: var(--head); }
.dm-how b { color: var(--o); margin-right: 8px; font-weight: 900; }

/* workspace */
.dm-work { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 18px; align-items: start; }
.dm-stage, .dm-panel, .dm-quote, .dm-flow, .dm-end { background: var(--card); border-radius: 10px; box-shadow: inset 0 0 0 .5px var(--line), 0 18px 40px rgba(0, 0, 0, .05); }
.dm-stage { padding: 12px; }
.dm-tools { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 10px; }
.tl { display: inline-flex; align-items: center; gap: 7px; border: 0; background: var(--soft); color: var(--head); font: 700 13px var(--f, Poppins), sans-serif; padding: 9px 13px; border-radius: 7px; cursor: pointer; }
.tl i { font-style: normal; color: var(--o); }
.tl.on { background: var(--o); color: #fff; } .tl.on i { color: #fff; }
.tl.ghost { background: none; box-shadow: inset 0 0 0 1px var(--line); }
.tl-tol { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; color: var(--muted); }
.tl-tol input { accent-color: var(--o); width: 110px; }
.dm-canvas { position: relative; border-radius: 7px; overflow: hidden; background: #111; line-height: 0; }
.dm-canvas canvas { width: 100%; height: auto; display: block; touch-action: none; cursor: crosshair; }
.dm-hint { position: absolute; left: 12px; bottom: 12px; right: 12px; line-height: 1.35; pointer-events: none; display: flex; }
.dm-hint span { background: rgba(17, 18, 20, .86); color: #fff; font-size: 13px; font-weight: 600; padding: 8px 12px; border-radius: 7px; max-width: 560px; }
.dm-hint span b { color: #ffb183; }
.dm-photo { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 12px; }
.dm-photo .btn { padding: 12px 16px; cursor: pointer; }

/* panel */
.dm-panel { padding: 18px; position: sticky; top: 50px; }
.pn-h { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.pn-h h2, .dm-quote h2, .dm-flow h2 { font-size: 22px; }
.pieces { display: grid; gap: 8px; max-height: 46vh; overflow: auto; padding-right: 2px; }
.pc { border-radius: 8px; box-shadow: inset 0 0 0 1px var(--line); padding: 10px 12px; }
.pc.sel { box-shadow: inset 0 0 0 2px var(--o); }
.pc-h { display: flex; align-items: center; gap: 8px; }
.pc-n { width: 22px; height: 22px; border-radius: 50%; background: var(--o); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 900; flex: none; }
.pc-h input { flex: 1; min-width: 0; border: 0; background: none; font: 800 14px var(--f, Poppins), sans-serif; color: var(--head); padding: 2px 0; }
.pc-x { border: 0; background: none; color: var(--muted); font-size: 18px; cursor: pointer; padding: 0 4px; }
.pc-x:hover { color: var(--o); }
.pc-det { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 6px 0 8px; font-size: 12px; }
.sw { width: 16px; height: 16px; border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .2); flex: none; }
.det-tag { background: color-mix(in srgb, var(--o) 12%, transparent); color: var(--o2); border-radius: 5px; padding: 2px 7px; font-weight: 800; }
.pc-g { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.pc-g select, .pc-g input[type=number], .pl input { font: 500 13px var(--f, Poppins), sans-serif; color: var(--head); background: var(--soft); border: 1px solid transparent; border-radius: 6px; padding: 7px 8px; width: 100%; }
.pc-g select:focus, .pc-g input:focus, .pl input:focus { outline: 0; border-color: var(--o); }
.pc-g .full { grid-column: 1 / -1; }
.pc-c { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 8px; }
.ck { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--text); cursor: pointer; }
.ck input { accent-color: var(--o); }
.pc-p { display: flex; justify-content: space-between; margin-top: 8px; font-size: 12px; color: var(--muted); }
.pc-p b { color: var(--head); font-size: 14px; }
.pieces .empty { padding: 22px 12px; text-align: center; color: var(--muted); font-size: 13.5px; border: 1.5px dashed var(--line); border-radius: 8px; }
.pl { margin-top: 12px; border-radius: 8px; box-shadow: inset 0 0 0 1px var(--line); }
.pl summary { cursor: pointer; padding: 10px 12px; font-weight: 800; color: var(--head); font-size: 14px; }
.pl summary small { display: inline; color: var(--muted); font-weight: 500; font-size: 12px; margin-left: 6px; }
.pl > div { padding: 0 12px 12px; display: grid; gap: 4px; }
.pl h4 { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 10px 0 2px; }
.pl .row { display: grid; grid-template-columns: 1fr 92px; gap: 8px; align-items: center; font-size: 13px; }
.pl .row span i { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.pn-opts { display: grid; gap: 6px; margin: 12px 0; }
.pn-total { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 0; border-top: 1px solid var(--line); margin-bottom: 12px; }
.pn-total span { font-size: 12px; color: var(--muted); }
.pn-total b { font-size: 26px; font-weight: 900; color: var(--head); letter-spacing: -.03em; }
.dm-quote-btn { width: 100%; justify-content: center; border: 0; cursor: pointer; }
.dm-quote-btn:disabled { opacity: .45; cursor: default; }

/* quote */
.dm-quote { margin-top: 18px; padding: clamp(18px, 3vw, 34px); display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; }
.qdoc { border-radius: 8px; box-shadow: inset 0 0 0 1px var(--line); padding: clamp(16px, 3vw, 30px); background: var(--bg); }
.qd-h { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-bottom: 3px solid var(--head); padding-bottom: 12px; margin-bottom: 14px; }
.qd-h input { font: 900 22px var(--f, Poppins), sans-serif; letter-spacing: -.03em; color: var(--head); border: 0; background: none; width: 100%; max-width: 320px; padding: 0; text-transform: uppercase; }
.qd-h small { display: block; color: var(--muted); font-size: 12px; }
.qd-meta { text-align: right; font-size: 13px; }
.qd-meta b { display: block; color: var(--head); font-size: 15px; }
.qd-to { font-size: 13.5px; margin-bottom: 12px; }
.qd-to input { font: 600 13.5px var(--f, Poppins), sans-serif; color: var(--head); border: 0; border-bottom: 1px dashed var(--line); background: none; width: 100%; max-width: 420px; padding: 3px 0; }
.qt { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.qt th { text-align: left; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); padding: 8px 6px; border-bottom: 1px solid var(--line); }
.qt td { padding: 9px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.qt td:last-child, .qt th:last-child { text-align: right; white-space: nowrap; }
.qt td small { display: block; color: var(--muted); font-size: 12px; }
.qt tfoot td { border: 0; padding: 5px 6px; }
.qt tfoot tr.big td { font-size: 19px; font-weight: 900; color: var(--head); padding-top: 10px; }
.qt tfoot tr.dep td { color: var(--o2); font-weight: 800; }
.qd-note { font-size: 12px; color: var(--muted); margin-top: 12px; }
.qside h3 { font-size: 15px; letter-spacing: -.01em; text-transform: none; margin-bottom: 8px; }
.qside p { font-size: 14px; line-height: 1.55; margin-bottom: 14px; }
.qside .btn { width: 100%; justify-content: center; border: 0; cursor: pointer; }

/* job flow */
.dm-flow { margin-top: 18px; padding: clamp(18px, 3vw, 34px); }
.fl-h { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.steps-bar { list-style: none; display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; margin-bottom: 22px; }
.steps-bar li { position: relative; padding-top: 12px; font-size: 11px; font-weight: 700; color: var(--muted); line-height: 1.25; cursor: pointer; }
.steps-bar li::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 5px; border-radius: 3px; background: var(--line); }
.steps-bar li.done::before { background: color-mix(in srgb, var(--o) 55%, transparent); }
.steps-bar li.now { color: var(--head); }
.steps-bar li.now::before { background: var(--o); box-shadow: 0 0 10px var(--o); }
.steps-bar li.todo { cursor: default; }
.fl-body { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 26px; align-items: start; }
.fl-card h3 { font-size: clamp(22px, 2.6vw, 32px); margin: 4px 0 10px; }
.fl-day { font-size: 11px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--o); }
.fl-card > p { font-size: 15.5px; line-height: 1.6; margin-bottom: 14px; max-width: 640px; }
.fl-what { display: grid; gap: 10px; margin: 16px 0; }
.msg { border-radius: 9px; padding: 12px 14px; background: var(--soft); font-size: 14px; line-height: 1.5; max-width: 620px; }
.msg small { display: block; font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.msg.sys { background: color-mix(in srgb, var(--o) 8%, transparent); box-shadow: inset 3px 0 0 var(--o); }
.msg table { border-collapse: collapse; width: 100%; font-size: 13px; margin-top: 6px; }
.msg td { padding: 4px 6px 4px 0; border-bottom: 1px solid var(--line); }
.fl-acts { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 16px; }
.fl-acts .btn { border: 0; cursor: pointer; }
.fl-acts input[type=date], .fl-acts select { font: 600 14px var(--f, Poppins), sans-serif; color: var(--head); background: var(--soft); border: 1px solid var(--line); border-radius: 6px; padding: 10px 10px; }
.shots { display: flex; gap: 8px; flex-wrap: wrap; }
.shots figure { margin: 0; width: 180px; }
.shots img { width: 100%; border-radius: 6px; display: block; }
.shots figcaption { font-size: 11.5px; color: var(--muted); margin-top: 4px; }

/* customer phone */
.phone { position: sticky; top: 60px; border-radius: 34px; padding: 12px; background: #16171a; box-shadow: 0 24px 50px rgba(0, 0, 0, .25); }
.phone-s { border-radius: 24px; background: #fff; color: #1b1d20; min-height: 520px; overflow: hidden; font-size: 13px; }
.ph-top { background: var(--deep); color: #fff; padding: 18px 16px 12px; }
.ph-top small { display: block; opacity: .7; font-size: 11px; }
.ph-top b { font-size: 15px; }
.ph-b { padding: 14px 16px; display: grid; gap: 10px; }
.ph-cap { font-size: 10.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: #7a8088; }
.ph-st { font-size: 18px; font-weight: 900; letter-spacing: -.02em; }
.ph-b .pbtn { display: block; width: 100%; border: 0; border-radius: 10px; background: var(--o); color: #fff; font: 800 14px var(--f, Poppins), sans-serif; padding: 12px; cursor: pointer; }
.ph-b .pbtn.ghost { background: #f0f1f2; color: #1b1d20; }
.ph-b img { width: 100%; border-radius: 10px; display: block; }
.ph-b input, .ph-b select { width: 100%; font: 500 13px var(--f, Poppins), sans-serif; border: 1px solid #e2e4e7; border-radius: 8px; padding: 8px; }
.ph-row { display: flex; justify-content: space-between; border-bottom: 1px solid #eee; padding: 4px 0; }
.ph-tl { list-style: none; display: grid; gap: 4px; font-size: 12px; }
.ph-tl li::before { content: "✓ "; color: var(--o); font-weight: 900; }
.dm-phone-cap { text-align: center; font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-top: 10px; }

.dm-end { margin-top: 18px; padding: clamp(22px, 4vw, 44px); }
.dm-end h2 { font-size: clamp(26px, 3.4vw, 42px); margin-bottom: 12px; }
.dm-end p { max-width: 760px; font-size: 16px; line-height: 1.65; margin-bottom: 18px; }

@media (max-width: 1080px) {
  .dm-work, .dm-quote, .fl-body { grid-template-columns: 1fr; }
  .dm-panel, .phone { position: static; }
  .phone { max-width: 340px; margin: 0 auto; }
  .steps-bar { grid-template-columns: repeat(5, 1fr); row-gap: 14px; }
}
@media (max-width: 560px) {
  .dm-main { padding: 0 12px 60px; }
  .dm-top { padding: 14px 12px 0; }
  .dm-back { width: 100%; }
  .tl { padding: 8px 10px; font-size: 12.5px; }
  .tl-tol input { width: 80px; }
  .qd-meta { text-align: left; }
  .qt { font-size: 12.5px; }
}
.dm [hidden] { display: none !important; }
@media (max-width: 720px) {
  .dm-hint { position: static; padding: 8px 0 0; }
  .dm-hint span { max-width: none; width: 100%; }
  .dm-canvas { overflow: visible; background: none; }
  .dm-canvas canvas { border-radius: 7px; }
}
