/* ScaleUp Agency — demo "Provate il gestionale".
   Three views on the same data: office (cyan line), technician app (indigo), client area (magenta).
   Sample data only: nothing is saved or sent. Loaded after styles.css. */

/* ---------- hero & labels ---------- */
.d-chip { display: inline-flex; align-items: center; gap: 9px; margin: 0; font-family: var(--f-m); font-size: .76rem; line-height: 1.3; color: var(--text-2); padding: 8px 13px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(0,0,0,.5); white-space: nowrap; }
.d-chip::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--l4); box-shadow: 0 0 8px var(--l4); }
.page-hero .actions { align-items: center; }

/* ---------- section ---------- */
.demo-sec { padding-block: 32px clamp(48px, 6vw, 84px); }
.demo-sec[id] { scroll-margin-top: 46px; }
.demo-app { max-width: 1360px; margin: 0 auto; padding-inline: clamp(16px, 2.6vw, 32px); }
.d-noscript { padding: 18px 20px; border-radius: var(--r); border: 1px solid var(--line-2); background: var(--panel); color: var(--text-2); margin-bottom: 14px; }
.d-noscript a { color: var(--cyan); }
.d-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 14px; color: var(--text-3); font-size: .86rem; }
.d-after .sec-head { margin-bottom: 0; }
.d-after .honest { max-width: 72ch; }
.d-after .honest a { color: var(--cyan); font-weight: 600; text-decoration: none; white-space: nowrap; }
.d-after .honest a::after { content: " →"; }
.d-after .honest a:hover { text-decoration: underline; }

/* ---------- shared controls ---------- */
.demo-app button { font: inherit; }
.demo-app .d-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 600 .88rem/1.2 var(--f-b); padding: 10px 15px; border-radius: 9px; border: 1px solid transparent; background: var(--cyan); color: #03030a; cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .2s, box-shadow .2s, border-color .2s, opacity .2s; }
.demo-app .d-btn:hover { background: #82dbf6; box-shadow: 0 10px 30px -12px rgba(76,201,240,.9); }
.demo-app .d-btn.ghost { background: rgba(255,255,255,.03); color: #fff; border-color: var(--line-2); }
.demo-app .d-btn.ghost:hover { border-color: rgba(76,201,240,.55); background: rgba(76,201,240,.07); box-shadow: none; }
.demo-app .d-btn:disabled { opacity: .42; cursor: not-allowed; box-shadow: none; }
.demo-app .d-btn:disabled:hover { background: var(--cyan); }
.demo-app .d-btn.ghost:disabled:hover { background: rgba(255,255,255,.03); border-color: var(--line-2); }
.demo-app .d-btn.full { width: 100%; }
.demo-app .d-link { background: none; border: 0; padding: 6px 2px; color: var(--text-2); font: 500 .84rem/1.2 var(--f-b); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.demo-app .d-link:hover { color: #fff; }
.demo-app .d-field { display: grid; gap: 6px; min-width: 0; font-family: var(--f-m); font-size: .68rem; line-height: 1.3; color: var(--text-3); }
.demo-app .d-field select, .demo-app .d-field textarea { width: 100%; min-width: 0; font: 500 .86rem/1.35 var(--f-b); color: var(--text); background: #05040a; border: 1px solid var(--line-2); border-radius: 8px; padding: 9px 10px; transition: border-color .2s, box-shadow .2s; }
.demo-app .d-field select { appearance: none; padding-right: 30px; cursor: pointer; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a8a7c0' stroke-width='2' stroke-linecap='round'><path d='M6 9l6 6 6-6'/></svg>"); background-repeat: no-repeat; background-position: right 8px center; background-size: 15px; }
.demo-app .d-field textarea { resize: none; min-height: 62px; }
.demo-app .d-field textarea::placeholder { color: var(--text-3); }
.demo-app .d-field select:focus, .demo-app .d-field textarea:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(76,201,240,.2); }

/* status chips: a ring = to do, a filled dot = done */
.demo-app .chip { display: inline-flex; align-items: center; gap: 6px; font-family: var(--f-m); font-size: .64rem; font-weight: 500; line-height: 1; padding: 4px 8px 4px 7px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--text-2); white-space: nowrap; }
.demo-app .chip::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; border: 1.5px solid currentColor; box-sizing: border-box; }
.demo-app .chip.as { color: var(--l1); border-color: rgba(76,201,240,.35); }
.demo-app .chip.run { color: var(--l4); border-color: rgba(161,92,255,.4); }
.demo-app .chip.ok { color: #fff; border-color: rgba(76,201,240,.3); }
.demo-app .chip.ok::before { background: var(--l1); border-color: var(--l1); }
.demo-app .chip.new { color: #fff; border-color: color-mix(in srgb, var(--c) 55%, transparent); background: color-mix(in srgb, var(--c) 16%, transparent); }
.demo-app .chip.new::before { background: var(--c); border-color: var(--c); box-shadow: 0 0 6px var(--c); }
.demo-app .chip.warn { color: #ff6fae; border-color: rgba(247,37,133,.4); }
.demo-app .chip.pay { color: var(--l4); border-color: rgba(161,92,255,.4); }
.demo-app .chip.sdi { color: #fff; border-color: rgba(111,124,255,.45); }
.demo-app .chip.sdi::before { background: var(--l3); border-color: var(--l3); }

/* the element to use in the current step of the guided path */
.demo-app .hl { position: relative; z-index: 3; outline: 2px solid var(--cyan); outline-offset: 3px; box-shadow: 0 0 0 7px rgba(76,201,240,.14), 0 0 30px -4px rgba(76,201,240,.7); animation: d-hl 1.8s ease-in-out infinite; }
@keyframes d-hl { 50% { box-shadow: 0 0 0 11px rgba(76,201,240,.06), 0 0 38px -2px rgba(76,201,240,.9); } }

/* ---------- guided path: five stations on one line ---------- */
.d-tour { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "line txt acts"; align-items: center; gap: 14px 28px; padding: 16px 18px 16px 22px; margin-bottom: 14px; border-radius: 16px; border: 1px solid var(--line-2); background: linear-gradient(180deg, rgba(17,15,28,.95), rgba(9,8,15,.95)); }
.d-line { grid-area: line; display: flex; align-items: center; }
.d-line .s { position: relative; flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-family: var(--f-m); font-size: .72rem; font-weight: 600; color: var(--text-3); background: #000; border: 2px solid var(--line-3); transition: background .3s, border-color .3s, color .3s; }
.d-line .s.on { color: #fff; border-color: var(--c); box-shadow: 0 0 14px color-mix(in srgb, var(--c) 70%, transparent); }
.d-line .s.ok { color: #03030a; background: var(--c); border-color: var(--c); }
.d-line i { flex: none; width: 16px; height: 2px; background: var(--line-2); }
.d-line i.ok { background: var(--c); }
.d-txt { grid-area: txt; min-width: 0; }
.d-where { display: inline-flex; align-items: center; gap: 9px; font-family: var(--f-m); font-size: .74rem; line-height: 1.3; color: var(--text-2); }
.d-where::before { content: ""; flex: none; width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--c); }
.d-txt h3 { font-size: 1.16rem; margin: 6px 0 4px; letter-spacing: -0.015em; }
.d-txt .t { color: var(--text-2); font-size: .94rem; line-height: 1.5; max-width: 72ch; }
.d-hint { flex-basis: 100%; margin-top: 2px; font-family: var(--f-m); font-size: .7rem; line-height: 1.4; color: var(--text-3); text-align: right; }
.d-hint.ok { color: var(--cyan); }
.d-acts { grid-area: acts; display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; max-width: 300px; }
.d-tour[aria-busy="true"] .d-acts { opacity: .6; }
@media (max-width: 1060px) {
  .d-tour { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "line acts" "txt txt"; }
}
@media (max-width: 600px) {
  .d-tour { grid-template-columns: minmax(0, 1fr); grid-template-areas: "line" "txt" "acts"; padding: 16px; gap: 12px; }
  .d-acts { justify-content: flex-start; max-width: none; }
  .d-hint { text-align: left; }
  .d-line i { width: 12px; }
  .d-txt h3 { font-size: 1.08rem; }
  .d-txt .t { font-size: .9rem; }
}

/* ---------- views: tabs on smaller screens ---------- */
.d-tabs { display: none; }
@media (max-width: 1199px) {
  .d-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-bottom: 12px; padding: 5px; border-radius: 14px; border: 1px solid var(--line-2); background: rgba(9,8,15,.94); }
  .d-tabs button { position: relative; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 6px; border: 0; border-radius: 10px; background: none; color: var(--text-2); font: 600 .88rem/1.2 var(--f-b); cursor: pointer; }
  .d-tabs button::before { content: ""; flex: none; width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--c); }
  .d-tabs button[aria-selected="true"] { background: var(--panel-3); color: #fff; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 45%, transparent); }
  .d-tabs button[aria-selected="true"]::before { background: var(--c); box-shadow: 0 0 8px var(--c); }
  .d-tabs .dot { position: absolute; top: 7px; right: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--c); box-shadow: 0 0 8px var(--c); }
}

/* ---------- stage: office · technician · client ---------- */
.d-stage { display: grid; grid-template-columns: minmax(0, 1.62fr) 296px minmax(0, 1fr); gap: 16px; height: 616px; height: clamp(540px, calc(100vh - 236px), 690px); height: clamp(540px, calc(100svh - 236px), 690px); }
.demo-app .pane { position: relative; min-width: 0; min-height: 0; display: flex; flex-direction: column; border-radius: 16px; border: 1px solid var(--line-2); background: #07060d; overflow: hidden; box-shadow: 0 30px 80px -40px rgba(0,0,0,.9); }
.demo-app .pane::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; z-index: 4; background: linear-gradient(90deg, var(--c), transparent 78%); pointer-events: none; }
.demo-app .pane.ping { animation: d-ping 1.3s ease-out; }
@keyframes d-ping { 0% { border-color: var(--c); box-shadow: 0 0 0 0 color-mix(in srgb, var(--c) 55%, transparent), 0 0 46px -6px color-mix(in srgb, var(--c) 70%, transparent); } 100% { box-shadow: 0 0 0 16px transparent, 0 0 0 0 transparent; } }
.demo-app .w-bar { position: relative; flex: none; display: flex; align-items: center; gap: 12px; padding: 13px 14px 12px 16px; border-bottom: 1px solid var(--line); background: #0b0a13; }
.demo-app .w-title { display: flex; align-items: center; gap: 10px; min-width: 0; margin-right: auto; }
.demo-app .w-title .st { width: 11px; height: 11px; }
.demo-app .w-title b { font-family: var(--f-d); font-weight: 500; font-size: 1rem; line-height: 1.2; color: #fff; white-space: nowrap; }
.demo-app .w-title small { min-width: 0; font-family: var(--f-m); font-size: .7rem; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.demo-app .w-body { position: relative; flex: 1; min-height: 0; overflow: auto; padding: 16px; scrollbar-width: thin; scrollbar-color: var(--line-3) transparent; }
.demo-app .w-body:focus, .demo-app .ph-body:focus { outline: none; }
.demo-app .o-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 20px 0 9px; font-family: var(--f-m); font-size: .7rem; line-height: 1.3; color: var(--text-3); }
.demo-app .o-h:first-child { margin-top: 0; }
.demo-app .o-list { display: grid; gap: 6px; }
.demo-app .o-foot { margin-top: 12px; font-size: .8rem; line-height: 1.5; color: var(--text-3); }
.demo-app .fresh { animation: d-fresh 2.6s ease-out; }
@keyframes d-fresh { 0%, 30% { background-color: color-mix(in srgb, var(--c) 18%, transparent); border-color: color-mix(in srgb, var(--c) 70%, transparent); } }

/* ---------- office ---------- */
.demo-app .o-nav { flex: none; display: flex; gap: 2px; padding: 3px; border-radius: 9px; background: #05040a; border: 1px solid var(--line); }
.demo-app .o-nav button { border: 0; background: none; color: var(--text-2); font: 500 .8rem/1 var(--f-b); padding: 7px 10px; border-radius: 6px; cursor: pointer; transition: background .2s, color .2s; }
.demo-app .o-nav button:hover { color: #fff; }
.demo-app .o-nav button[aria-pressed="true"] { background: var(--panel-3); color: #fff; box-shadow: inset 0 0 0 1px rgba(76,201,240,.3); }
.demo-app .o-date { font-family: var(--f-m); font-size: .72rem; color: var(--text-2); margin-bottom: 10px; }
.demo-app .o-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.demo-app .o-kpi { min-width: 0; padding: 12px 12px 11px; border-radius: 11px; background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 1px solid var(--line); }
.demo-app .o-kpi .k { display: block; font-family: var(--f-m); font-size: .66rem; line-height: 1.3; color: var(--text-3); }
.demo-app .o-kpi .n { display: block; font-family: var(--f-d); font-weight: 500; font-size: 1.75rem; line-height: 1.1; letter-spacing: -0.03em; color: #fff; margin-top: 5px; }
.demo-app .o-kpi .s { display: block; font-size: .74rem; line-height: 1.35; color: var(--text-2); }
.demo-app .o-kpi.up .n { animation: d-up 2.4s ease-out; }
@keyframes d-up { 0%, 35% { color: var(--cyan); text-shadow: 0 0 18px rgba(76,201,240,.85); } }
.demo-app .o-card { position: relative; padding: 14px; border-radius: 12px; border: 1px solid var(--line-2); background: linear-gradient(180deg, #13111f, #0c0b15); }
.demo-app .o-card-h { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 10px; font-family: var(--f-m); font-size: .68rem; line-height: 1.35; color: var(--text-3); }
.demo-app .o-card-h > span { white-space: nowrap; }
.demo-app .o-card-h .tag-k { display: inline-flex; align-items: center; gap: 7px; color: var(--c); }
.demo-app .o-card-h .tag-k::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; border: 2px solid var(--c); }
.demo-app .o-card h4 { font-family: var(--f-d); font-weight: 500; font-size: 1.04rem; line-height: 1.25; letter-spacing: -0.01em; margin: 9px 0 3px; }
.demo-app .o-card h4 small { font-family: var(--f-b); font-weight: 400; font-size: .78rem; color: var(--text-3); margin-left: 6px; letter-spacing: 0; }
.demo-app .o-card p { font-size: .84rem; line-height: 1.45; color: var(--text-2); }
.demo-app .o-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .62fr) auto; gap: 8px; align-items: end; margin-top: 12px; }
.demo-app .o-lines { margin-top: 10px; border-top: 1px solid var(--line); }
.demo-app .o-lines > div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: .84rem; line-height: 1.4; color: var(--text-2); }
.demo-app .o-lines b { flex: none; color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.demo-app .o-lines .tot { color: var(--text); }
.demo-app .o-lines .tot b { color: #fff; }
.demo-app .o-iss { border: 0; padding: 0; margin: 12px 0 0; display: grid; gap: 6px; }
.demo-app .o-iss legend { padding: 0; margin-bottom: 7px; font-family: var(--f-m); font-size: .68rem; color: var(--text-3); }
.demo-app .o-iss label { display: flex; align-items: center; gap: 10px; padding: 9px 11px; border-radius: 9px; border: 1px solid var(--line); background: rgba(255,255,255,.02); font-size: .86rem; line-height: 1.3; color: var(--text); cursor: pointer; transition: border-color .2s, background .2s; }
.demo-app .o-iss label:has(input:checked) { border-color: rgba(76,201,240,.5); background: rgba(76,201,240,.07); }
.demo-app .o-iss input { flex: none; width: 16px; height: 16px; margin: 0; accent-color: var(--cyan); }
.demo-app .o-iss small { font-family: var(--f-m); font-size: .64rem; color: var(--text-3); margin-left: 4px; }
.demo-app .o-send { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.demo-app .o-send .d-btn { white-space: normal; text-align: center; }
.demo-app .o-note { margin-top: 8px; font-family: var(--f-m); font-size: .66rem; line-height: 1.4; color: var(--text-3); }
.demo-app .o-empty { padding: 13px 14px; border-radius: 11px; border: 1px dashed var(--line-2); font-size: .84rem; line-height: 1.5; color: var(--text-2); }
.demo-app .o-empty.ok { border-style: solid; border-color: rgba(76,201,240,.35); background: rgba(76,201,240,.06); color: var(--text); }
.demo-app .o-row { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; align-items: center; gap: 4px 12px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255,255,255,.018); font-size: .84rem; line-height: 1.35; }
.demo-app .o-row.cl, .demo-app .o-row.doc { grid-template-columns: minmax(0, 1fr) auto; }
.demo-app .o-row.doc { grid-template-columns: 28px minmax(0, 1fr) auto; }
.demo-app .o-row .tm { font-family: var(--f-m); font-size: .76rem; color: var(--text-2); }
.demo-app .who { min-width: 0; }
.demo-app .who b { display: block; font-weight: 600; font-size: .86rem; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.demo-app .who span { display: block; font-size: .76rem; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.demo-app .meta { display: grid; justify-items: end; gap: 5px; text-align: right; }
.demo-app .meta small { font-size: .72rem; color: var(--text-2); white-space: nowrap; }
.demo-app .ico { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; border: 1px solid var(--line-2); background: #0d0c16; }
.demo-app .ico::before { content: ""; width: 10px; height: 13px; border-radius: 2px; border: 1.5px solid var(--text-2); box-sizing: border-box; }
.demo-app .ico.fat::before { border-color: var(--l1); }
.demo-app .ico.rap::before { border-color: var(--l3); }

/* ---------- technician app ---------- */
.demo-app .pane-tech { border: 0; background: none; overflow: visible; align-items: center; box-shadow: none; }
.demo-app .pane-tech::before { display: none; }
.demo-app .ph-label { align-self: stretch; display: flex; align-items: center; gap: 9px; margin: 0 0 10px 6px; font-family: var(--f-m); font-size: .72rem; line-height: 1.3; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.demo-app .ph-label::before { content: ""; flex: none; width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--c); }
.demo-app .phone { position: relative; flex: 1; min-height: 0; width: 100%; max-width: 296px; padding: 9px; border-radius: 46px; background: linear-gradient(150deg, #33313f 0%, #121119 38%, #0b0a10 62%, #24232f 100%); box-shadow: inset 0 0 0 1px rgba(255,255,255,.1), 0 0 0 1px #000, 0 34px 80px -34px color-mix(in srgb, var(--c) 55%, transparent); }
.demo-app .pane-tech.ping { animation: none; }
.demo-app .pane-tech.ping .phone { animation: d-ping-ph 1.3s ease-out; }
@keyframes d-ping-ph { 0% { box-shadow: inset 0 0 0 1px rgba(255,255,255,.1), 0 0 0 2px var(--c), 0 0 50px -4px var(--c); } }
.demo-app .ph-screen { position: relative; height: 100%; display: flex; flex-direction: column; border-radius: 38px; overflow: hidden; background: radial-gradient(120% 50% at 50% 0%, #15122a, #06050c 60%); }
.demo-app .ph-island { position: absolute; z-index: 3; top: 9px; left: 50%; width: 86px; height: 24px; margin-left: -43px; border-radius: 14px; background: #000; }
.demo-app .ph-status { flex: none; display: flex; align-items: center; justify-content: space-between; padding: 13px 24px 8px 26px; font: 600 .74rem/1 var(--f-b); color: #fff; }
.demo-app .ph-icons { display: inline-flex; align-items: flex-end; gap: 2px; height: 10px; }
.demo-app .ph-icons i { width: 3px; background: #fff; border-radius: 1px; }
.demo-app .ph-icons i:nth-child(1) { height: 4px; } .demo-app .ph-icons i:nth-child(2) { height: 7px; } .demo-app .ph-icons i:nth-child(3) { height: 10px; }
.demo-app .ph-icons b { width: 19px; height: 10px; margin-left: 5px; border-radius: 3px; border: 1.5px solid rgba(255,255,255,.85); box-sizing: border-box; background: linear-gradient(90deg, #fff 70%, transparent 70%) 1px 1px / calc(100% - 2px) calc(100% - 2px) no-repeat; }
.demo-app .ph-body { position: relative; flex: 1; min-height: 0; overflow: auto; padding: 6px 14px 18px; scrollbar-width: none; }
.demo-app .ph-body::-webkit-scrollbar { display: none; }
.demo-app .ph-h { padding: 6px 4px 14px; }
.demo-app .ph-h small { display: block; font-family: var(--f-m); font-size: .66rem; color: var(--text-3); }
.demo-app .ph-h b { display: block; margin-top: 4px; font-family: var(--f-d); font-weight: 500; font-size: 1.36rem; line-height: 1.15; letter-spacing: -0.02em; color: #fff; }
.demo-app .ph-h span { display: block; margin-top: 2px; font-size: .78rem; color: var(--text-2); }
.demo-app .ph-list { display: grid; gap: 8px; }
.demo-app .ph-job { position: relative; display: grid; gap: 3px; width: 100%; padding: 12px 12px 12px 15px; border-radius: 15px; border: 1px solid var(--line-2); background: #0e0d18; color: var(--text); text-align: left; font-size: .8rem; line-height: 1.35; overflow: hidden; }
.demo-app .ph-job::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px; border-radius: 0 3px 3px 0; background: var(--line-3); }
.demo-app .ph-job.new::before { background: var(--c); box-shadow: 0 0 10px var(--c); }
.demo-app .ph-job.done { opacity: .62; }
.demo-app button.ph-job { cursor: pointer; transition: border-color .2s, background .2s; }
.demo-app button.ph-job:hover { border-color: color-mix(in srgb, var(--c) 55%, transparent); background: #12101f; }
.demo-app .ph-job .r1 { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 2px; }
.demo-app .ph-job .tm { font-family: var(--f-m); font-size: .72rem; color: var(--text-2); }
.demo-app .ph-job b { font-weight: 600; font-size: .9rem; color: #fff; }
.demo-app .ph-job .sub { color: var(--text-3); font-size: .75rem; }
.demo-app .ph-job .go { margin-top: 6px; color: var(--c); font-weight: 600; font-size: .78rem; }
.demo-app .ph-empty { margin-top: 12px; padding: 12px; border-radius: 13px; border: 1px dashed var(--line-2); font-size: .78rem; line-height: 1.45; color: var(--text-3); }
.demo-app .ph-top { position: sticky; top: -6px; z-index: 2; display: flex; align-items: center; gap: 8px; margin: -6px -14px 10px; padding: 8px 14px 9px; background: rgba(8,7,15,.94); border-bottom: 1px solid var(--line); font-family: var(--f-d); font-weight: 500; font-size: 1rem; color: #fff; }
.demo-app .ph-back { flex: none; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; border: 1px solid var(--line-2); background: rgba(255,255,255,.03); color: #fff; font-size: 1.15rem; line-height: 1; cursor: pointer; }
.demo-app .ph-back:hover { border-color: color-mix(in srgb, var(--c) 55%, transparent); }
.demo-app .ph-card { padding: 12px; border-radius: 14px; border: 1px solid var(--line-2); background: #0e0d18; display: grid; gap: 3px; font-size: .8rem; line-height: 1.4; }
.demo-app .ph-card .r1 { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.demo-app .ph-card .tm { font-family: var(--f-m); font-size: .72rem; color: var(--text-2); }
.demo-app .ph-card b { font-weight: 600; font-size: .92rem; color: #fff; }
.demo-app .ph-card .sub { color: var(--text-3); font-size: .75rem; }
.demo-app .ph-card .ask { margin-top: 6px; padding-top: 8px; border-top: 1px solid var(--line); color: var(--text-2); }
.demo-app .ph-sec { margin: 14px 0 0; }
.demo-app fieldset.ph-sec { border: 0; padding: 0; min-width: 0; }
.demo-app .ph-sec legend, .demo-app .ph-k { padding: 0; margin-bottom: 7px; font-family: var(--f-m); font-size: .68rem; line-height: 1.3; color: var(--text-3); }
.demo-app .ph-k { display: block; }
.demo-app fieldset.ph-sec.hl, .demo-app .ph-sec.hl { border-radius: 12px; }
.demo-app #p-checks { padding-top: 6px; }
.demo-app .ph-check { display: flex; align-items: flex-start; gap: 10px; padding: 9px 10px; margin-bottom: 5px; border-radius: 11px; border: 1px solid var(--line); background: rgba(255,255,255,.02); font-size: .8rem; line-height: 1.35; color: var(--text); cursor: pointer; transition: border-color .2s, background .2s; }
.demo-app .ph-check:has(input:checked) { border-color: color-mix(in srgb, var(--c) 55%, transparent); background: color-mix(in srgb, var(--c) 10%, transparent); }
.demo-app .ph-check input { flex: none; width: 17px; height: 17px; margin: 0; accent-color: var(--l3); }
.demo-app .ph-photo { margin: 0; display: grid; gap: 6px; }
.demo-app .ph-photo svg { width: 100%; height: auto; border-radius: 11px; display: block; }
.demo-app .ph-photo figcaption { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-family: var(--f-m); font-size: .66rem; color: var(--text-3); }
.demo-app .ph-help { margin-top: 8px; font-size: .74rem; line-height: 1.4; color: var(--text-3); text-align: center; }
.demo-app #p-next { margin-top: 16px; }
.demo-app .ph-p { font-size: .8rem; line-height: 1.45; color: var(--text-2); margin-bottom: 10px; }
.demo-app .ph-pad { position: relative; height: 176px; border-radius: 14px; background: #f3f3f8; overflow: hidden; touch-action: none; box-shadow: inset 0 1px 3px rgba(0,0,0,.18); }
.demo-app .ph-pad canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: crosshair; }
.demo-app .ph-pad .base { position: absolute; left: 16px; right: 16px; bottom: 38px; border-top: 1.5px dashed #b6b5c8; pointer-events: none; }
.demo-app .ph-pad .x { position: absolute; left: 16px; bottom: 44px; font: 600 .9rem/1 var(--f-b); color: #a3a2b8; pointer-events: none; }
.demo-app .ph-pad .hint { position: absolute; left: 16px; right: 16px; bottom: 14px; font-family: var(--f-m); font-size: .64rem; color: #85849c; pointer-events: none; transition: opacity .2s; }
.demo-app .ph-pad.signed .hint { opacity: 0; }
.demo-app .ph-pad.hl { outline-offset: 2px; }
.demo-app .ph-row { display: flex; justify-content: space-between; gap: 10px; margin: 6px 2px 12px; }
.demo-app .ph-done { display: grid; justify-items: center; gap: 10px; padding: 40px 6px 10px; text-align: center; }
.demo-app .ph-done .ok { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--c); box-shadow: 0 0 30px -4px var(--c), inset 0 0 20px -8px var(--c); }
.demo-app .ph-done .ok::before { content: ""; width: 12px; height: 22px; margin-top: -6px; border: solid #fff; border-width: 0 3px 3px 0; transform: rotate(45deg); }
.demo-app .ph-done b { font-family: var(--f-d); font-weight: 500; font-size: 1.25rem; color: #fff; }
.demo-app .ph-done p { font-size: .8rem; line-height: 1.5; color: var(--text-2); margin-bottom: 12px; }

/* ---------- client area ---------- */
.demo-app .c-tabs { flex: none; display: flex; gap: 2px; padding: 6px 12px 0; border-bottom: 1px solid var(--line); background: #0a0912; }
.demo-app .c-tabs button { position: relative; border: 0; background: none; color: var(--text-2); font: 500 .8rem/1 var(--f-b); padding: 9px 9px 12px; cursor: pointer; }
.demo-app .c-tabs button:hover { color: #fff; }
.demo-app .c-tabs button[aria-pressed="true"] { color: #fff; }
.demo-app .c-tabs button[aria-pressed="true"]::after { content: ""; position: absolute; left: 7px; right: 7px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--c); box-shadow: 0 0 8px var(--c); }
.demo-app .c-next { display: grid; gap: 4px; justify-items: start; padding: 13px 14px; margin-bottom: 4px; border-radius: 12px; border: 1px dashed var(--line-2); font-size: .8rem; line-height: 1.4; color: var(--text-2); }
.demo-app .c-next.on { border-style: solid; border-color: color-mix(in srgb, var(--c) 40%, transparent); background: color-mix(in srgb, var(--c) 7%, transparent); }
.demo-app .c-next .k { font-family: var(--f-m); font-size: .66rem; color: var(--text-3); }
.demo-app .c-next b { font-family: var(--f-d); font-weight: 500; font-size: 1rem; color: #fff; }
.demo-app .c-next .chip { margin-top: 4px; }
.demo-app .c-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 12px; width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255,255,255,.018); color: var(--text); text-align: left; font-size: .84rem; line-height: 1.35; }
.demo-app .c-row.doc { grid-template-columns: 28px minmax(0, 1fr) auto; }
.demo-app button.c-row { cursor: pointer; transition: border-color .2s, background .2s; }
.demo-app button.c-row:hover { border-color: color-mix(in srgb, var(--c) 50%, transparent); background: rgba(255,255,255,.035); }
.demo-app .c-row.new { border-color: color-mix(in srgb, var(--c) 45%, transparent); }
.demo-app .c-row .meta small.open { color: var(--c); font-weight: 600; }
.demo-app .pdf { font-family: var(--f-m); font-size: .64rem; color: var(--text-3); border: 1px solid var(--line-2); border-radius: 5px; padding: 3px 6px; }
.demo-app .c-report { position: absolute; inset: 0; z-index: 6; overflow: auto; padding: 14px; background: rgba(4,3,8,.84); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); }
.demo-app .c-report[hidden] { display: none; }
.demo-app .paper { position: relative; background: #f7f7fb; color: #1a1928; border-radius: 10px; padding: 18px 18px 16px; font-size: .8rem; line-height: 1.45; box-shadow: 0 30px 70px -20px rgba(0,0,0,.85); }
.demo-app .paper:focus { outline: none; }
.demo-app .pp-h { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding-bottom: 10px; border-bottom: 2px solid #1a1928; }
.demo-app .pp-co { font-family: var(--f-d); font-weight: 600; font-size: .86rem; letter-spacing: -0.01em; }
.demo-app .pp-no { font-family: var(--f-m); font-size: .66rem; color: #5c5b72; }
.demo-app .paper h4 { font-family: var(--f-d); font-weight: 500; font-size: 1.1rem; color: #1a1928; margin: 12px 0 8px; }
.demo-app .pp-dl { margin: 0; display: grid; gap: 3px; }
.demo-app .pp-dl div { display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 8px; }
.demo-app .pp-dl dt { font-family: var(--f-m); font-size: .64rem; color: #6c6b82; padding-top: 2px; }
.demo-app .pp-dl dd { margin: 0; }
.demo-app .pp-k { margin: 12px 0 4px; font-family: var(--f-m); font-size: .64rem; color: #6c6b82; }
.demo-app .pp-ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; }
.demo-app .pp-ul li { position: relative; padding-left: 18px; }
.demo-app .pp-ul li::before { content: ""; position: absolute; left: 2px; top: .3em; width: 5px; height: 9px; border: solid #3f37c9; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.demo-app .pp-photo svg { display: block; width: 100%; max-width: 220px; height: auto; border-radius: 6px; }
.demo-app .pp-sign { display: flex; align-items: flex-end; gap: 12px; padding: 6px 10px 8px; border-radius: 8px; border: 1px solid #dddce8; background: #fff; }
.demo-app .pp-sign svg { display: block; width: 62%; max-width: 200px; height: auto; }
.demo-app .pp-sign span { font-family: var(--f-m); font-size: .64rem; color: #6c6b82; padding-bottom: 6px; }
.demo-app .pp-close { margin-top: 16px; background: #1a1928 !important; color: #fff !important; border-color: #1a1928 !important; }
.demo-app .pp-close:hover { background: #2c2a44 !important; box-shadow: none; }

/* ---------- notifications ---------- */
.d-toasts { position: fixed; right: 18px; bottom: 18px; z-index: 80; display: grid; gap: 8px; justify-items: end; width: min(360px, calc(100vw - 32px)); pointer-events: none; }
.d-toast { display: flex; align-items: flex-start; gap: 11px; width: 100%; padding: 11px 14px 12px; border-radius: 12px; background: rgba(13,11,23,.97); border: 1px solid color-mix(in srgb, var(--c) 45%, transparent); box-shadow: 0 18px 50px -16px rgba(0,0,0,.95), 0 0 32px -14px var(--c); font-size: .86rem; line-height: 1.4; color: var(--text); animation: d-toast-in .38s cubic-bezier(.2,.9,.3,1.15) both; }
.d-toast::before { content: ""; flex: none; width: 9px; height: 9px; margin-top: 4px; border-radius: 50%; background: var(--c); box-shadow: 0 0 8px var(--c); }
.d-toast b { display: block; margin-bottom: 1px; font-family: var(--f-m); font-size: .68rem; font-weight: 500; color: var(--c); }
.d-toast small { display: block; margin-top: 3px; font-family: var(--f-m); font-size: .66rem; color: var(--text-3); }
.d-toast.out { animation: d-toast-out .3s ease forwards; }
@keyframes d-toast-in { from { opacity: 0; transform: translateY(12px) scale(.98); } }
@keyframes d-toast-out { to { opacity: 0; transform: translateY(6px); } }

/* ---------- smaller screens: one view at a time ---------- */
@media (max-width: 1199px) {
  .d-stage { display: block; height: auto; }
  .d-stage > .pane { display: none; }
  .d-stage[data-tab="office"] > .pane-office, .d-stage[data-tab="tech"] > .pane-tech, .d-stage[data-tab="client"] > .pane-client { display: flex; }
  .demo-app .pane-office, .demo-app .pane-client { min-height: 560px; }
  .demo-app .pane-client { max-width: 760px; margin-inline: auto; }
  .demo-app .w-body { overflow: visible; }
  .demo-app .phone { flex: none; height: 640px; max-width: 320px; }
  .demo-app .ph-label { justify-content: center; margin-left: 0; }
  .demo-app .c-report { position: relative; inset: auto; overflow: visible; padding: 14px; background: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .demo-app .pane-client.has-report .w-body { display: none; }
}
@media (max-width: 560px) {
  .demo-app .w-bar { flex-wrap: wrap; row-gap: 10px; }
  .demo-app .o-nav { width: 100%; }
  .demo-app .o-nav button { flex: 1; }
  .demo-app .o-form { grid-template-columns: minmax(0, 1fr) minmax(0, .7fr); }
  .demo-app .o-form .d-btn { grid-column: 1 / -1; }
  .demo-app .o-send { grid-template-columns: 1fr; }
  .demo-app .o-kpi { padding: 10px 9px; }
  .demo-app .o-kpi .n { font-size: 1.45rem; }
  .demo-app .o-kpi .s { font-size: .7rem; }
  .demo-app .o-row { grid-template-columns: 40px minmax(0, 1fr); }
  .demo-app .o-row .meta { grid-column: 2; justify-items: start; text-align: left; grid-auto-flow: column; justify-content: start; align-items: center; gap: 8px; }
  .demo-app .o-row.cl .meta, .demo-app .o-row.doc .meta { grid-column: auto; }
  .demo-app .o-row.cl { grid-template-columns: minmax(0, 1fr); }
  .demo-app .o-row.cl .meta { justify-items: start; text-align: left; grid-auto-flow: column; justify-content: start; align-items: center; }
  .demo-app .phone { height: 620px; max-width: 100%; }
  .d-toasts { left: 12px; right: 12px; width: auto; justify-items: stretch; bottom: 12px; }
  .d-toast { padding: 9px 12px; font-size: .8rem; }
  .d-toast b { font-size: .64rem; }
}

@media (prefers-reduced-motion: reduce) {
  .demo-app .hl, .demo-app .pane.ping, .demo-app .pane-tech.ping .phone, .demo-app .fresh, .demo-app .o-kpi.up .n, .d-toast, .d-toast.out { animation: none !important; }
  .demo-app * { transition: none !important; }
}
