.demo-wrap { padding: 24px 0 56px; background: var(--bg-alt); }
.demo-wrap .container { max-width: 1240px; }
.demo-top { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.demo-stats { display: flex; flex-wrap: wrap; gap: 12px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 16px; min-width: 120px; }
.stat b { display: block; font-size: 1.35rem; line-height: 1.2; }
.stat span { color: var(--muted); font-size: 0.8rem; }
.demo-guide { background: #fffbeb; border: 1px solid #fde68a; border-radius: var(--radius); padding: 12px 18px; font-size: 0.92rem; margin-bottom: 20px; }
.demo-guide ol { margin: 6px 0 0; padding-left: 20px; columns: 2; column-gap: 32px; }
@media (max-width: 700px) { .demo-guide ol { columns: 1; } }
.demo-grid { display: grid; grid-template-columns: 1fr 360px; gap: 28px; align-items: start; }
@media (max-width: 960px) { .demo-grid { grid-template-columns: 1fr; } .demo-phone-wrap { justify-self: center; } }
.demo-h { font-size: 1.05rem; margin: 0 0 10px; }
.demo-h small { color: var(--muted); font-weight: 400; margin-left: 6px; }

/* Board */
.board { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 760px) { .board { grid-template-columns: 1fr; } }
.col { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; min-height: 120px; }
.col h3 { font-size: 0.95rem; margin: 0 0 10px; }
.col h3 small { color: var(--muted); font-weight: 400; }
.jobcard, .phcard { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 4px 10px; align-items: start; width: 100%; text-align: left; font: inherit; color: inherit; background: var(--bg-alt); border: 1px solid transparent; border-radius: 10px; padding: 10px; margin-bottom: 8px; cursor: pointer; }
.jobcard:hover, .phcard:hover { border-color: var(--brand); }
.jc-time { font-weight: 700; color: var(--brand-dark); font-size: 0.9rem; }
.jc-main { display: flex; flex-direction: column; min-width: 0; }
.jc-main b { font-size: 0.9rem; line-height: 1.3; }
.jc-main small { color: var(--muted); font-size: 0.78rem; line-height: 1.35; overflow-wrap: anywhere; }
.jobcard .tag, .phcard .tag { grid-column: 2; justify-self: start; }

/* Phone */
.phone { width: 340px; max-width: 100%; background: #0d1f1d; border-radius: 40px; padding: 14px; box-shadow: 0 30px 60px -25px rgba(13,31,29,0.55); position: relative; }
.phone-notch { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); width: 110px; height: 22px; background: #0d1f1d; border-radius: 0 0 16px 16px; z-index: 2; }
.phone-screen { background: #fff; border-radius: 28px; height: 640px; overflow-y: auto; font-size: 0.9rem; line-height: 1.45; }
.ph-head { display: flex; align-items: center; gap: 10px; padding: 34px 16px 10px; position: sticky; top: 0; background: #fff; z-index: 1; border-bottom: 1px solid var(--line); }
.ph-head b { flex: 1; }
.ph-head span { color: var(--muted); font-size: 0.8rem; }
.back { font-size: 1.6rem; line-height: 1; border: 0; background: none; cursor: pointer; padding: 0 6px; color: var(--brand); }
.chips { display: flex; gap: 6px; padding: 10px 16px 0; }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 4px 12px; font: inherit; font-size: 0.82rem; cursor: pointer; }
.chip.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.ph-body { padding: 12px 16px 24px; }
.ph-body h4 { margin: 18px 0 6px; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.ph-card { background: var(--bg-alt); border-radius: 12px; padding: 12px; margin-bottom: 12px; }
.btn.block { display: block; width: 100%; text-align: center; margin: 12px 0; }
.check { list-style: none; padding: 0; margin: 0; }
.check li { padding: 5px 0; border-bottom: 1px solid var(--line); }
.check input { width: 18px; height: 18px; vertical-align: -3px; margin-right: 6px; accent-color: var(--brand); }
.check.ro li.n { color: #b91c1c; }
.lines { list-style: none; padding: 0; margin: 0; }
.lines li { display: flex; justify-content: space-between; gap: 8px; padding: 4px 0; }
.row { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; align-items: center; }
.row input, .row select { flex: 1; min-width: 0; padding: 8px; font: inherit; border: 1px solid var(--line); border-radius: 8px; }
.filebtn { cursor: pointer; }
.photos { display: flex; flex-wrap: wrap; gap: 6px; }
.photos img { width: 72px; height: 54px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
#sig { width: 100%; height: 110px; border: 1.5px dashed var(--muted); border-radius: 10px; touch-action: none; background: #fcfcfc; cursor: crosshair; }
.sigimg { max-width: 220px; border: 1px solid var(--line); border-radius: 8px; display: block; }
.ok-msg { background: #dcfce7; color: #166534; padding: 8px 10px; border-radius: 8px; font-size: 0.85rem; }

/* Dialogs */
.demo-dialog { border: 0; border-radius: 16px; padding: 24px; width: min(440px, calc(100vw - 32px)); box-shadow: 0 30px 80px rgba(0,0,0,0.35); }
.demo-dialog.wide { width: min(860px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow-y: auto; }
.demo-dialog::backdrop { background: rgba(13,31,29,0.55); }
.demo-dialog h2 { margin: 0 0 12px; font-size: 1.3rem; }
.demo-dialog label { display: block; font-weight: 600; font-size: 0.88rem; margin-bottom: 10px; }
.demo-dialog input, .demo-dialog select { display: block; width: 100%; margin-top: 4px; padding: 9px; font: inherit; border: 1px solid var(--line); border-radius: 8px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dlg-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px; flex-wrap: wrap; }
.inv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
@media (max-width: 760px) { .inv-grid { grid-template-columns: 1fr; } }
.inv table { width: 100%; font-size: 0.9rem; }
.inv td { padding: 6px 0; border-bottom: 1px solid var(--line); }
.inv .r { text-align: right; white-space: nowrap; }
.inv .tot td { font-weight: 700; font-size: 1.05rem; border-bottom: 0; }
.pay { text-align: center; margin: 14px 0 0; }
.paid-badge { display: inline-block; background: #dcfce7; color: #166534; font-weight: 700; padding: 10px 18px; border-radius: 999px; }

.demo-toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: #0d1f1d; color: #fff; padding: 12px 18px; border-radius: 12px; font-size: 0.92rem; max-width: min(520px, calc(100vw - 32px)); opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s; z-index: 200; }
.demo-toast.show { opacity: 1; transform: translate(-50%, 0); }
.demo-note { margin-top: 24px; }
