:root{--teal:#0b5f55;--teal-d:#084a42;--wa-head:#0b6b5e;--wa-bg:#efeae2;--in:#fff;--out:#d9fdd3;--ink:#111b21;--muted:#667781;--link:#027eb5;--accent:#c9826b;--sand:#f6f1ea;--line:#e4ddd2;--green:#1fa855}
*{box-sizing:border-box;margin:0;padding:0}
html,body{height:100%}
body{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;color:var(--ink);background:radial-gradient(1200px 700px at 15% 0%,#e8f2ee 0%,transparent 60%),radial-gradient(900px 600px at 100% 100%,#f6e7df 0%,transparent 60%),var(--sand);-webkit-font-smoothing:antialiased}
button{font:inherit;cursor:pointer}
a{color:var(--teal)}
.demo-bar{display:flex;gap:14px;justify-content:center;align-items:center;flex-wrap:wrap;background:#10231f;color:#cfe3dc;font-size:.8rem;padding:8px 14px;text-align:center}
.demo-bar a{color:#9fe3c8;font-weight:600;text-decoration:none;white-space:nowrap}

/* ---------- desktop stage */
.stage{max-width:1320px;margin:0 auto;padding:34px 24px 40px;display:grid;grid-template-columns:minmax(0,1fr) 392px 320px;gap:36px;align-items:start}
.intro{padding-top:18px}
.eyebrow{display:inline-flex;align-items:center;gap:8px;background:#fff;border:1px solid var(--line);border-radius:999px;padding:6px 12px;font-size:.8rem;color:#4b5a55;font-weight:600}
.eyebrow i{width:8px;height:8px;border-radius:50%;background:var(--green);box-shadow:0 0 0 4px rgba(31,168,85,.15)}
h1{font-size:clamp(1.9rem,3.2vw,2.75rem);line-height:1.1;letter-spacing:-.02em;margin:18px 0 14px;color:#10231f}
h1 span{color:var(--teal)}
.lead{color:#4b5a55;font-size:1.02rem;line-height:1.6;max-width:520px}
.tries{margin-top:26px}
.label{font-size:.75rem;text-transform:uppercase;letter-spacing:.08em;color:#7a8783;font-weight:700;margin-bottom:10px}
.chips{display:flex;flex-wrap:wrap;gap:8px;max-width:560px}
.chip{background:#fff;border:1px solid var(--line);border-radius:14px;padding:8px 12px;text-align:left;font-size:.88rem;color:#10231f;line-height:1.3;transition:.15s}
.chip small{display:block;color:#7a8783;font-size:.72rem;margin-top:2px}
.chip:hover{border-color:var(--teal);box-shadow:0 6px 16px -10px rgba(11,95,85,.6);transform:translateY(-1px)}
.flow{margin-top:28px;display:flex;flex-wrap:wrap;align-items:center;gap:6px;font-size:.78rem;color:#4b5a55}
.flow span{background:rgba(255,255,255,.7);border:1px dashed #c9d6d0;border-radius:8px;padding:5px 8px}
.flow i{font-style:normal;color:#9aa8a3}

/* ---------- phone */
.phone-wrap{position:sticky;top:20px}
.phone{position:relative;width:392px;height:min(820px,calc(100vh - 80px));min-height:640px;border-radius:46px;background:var(--wa-bg);border:11px solid #121614;box-shadow:0 40px 80px -30px rgba(16,35,31,.55),0 0 0 2px #2c332f inset;overflow:hidden;display:flex;flex-direction:column}
.statusbar{background:var(--wa-head);color:#fff;display:flex;justify-content:space-between;align-items:center;padding:8px 26px 2px;font-size:.8rem;font-weight:600}
.sb-icons{display:flex;gap:5px;align-items:center}.sb-icons svg{height:11px;width:auto}
.wa-head{position:relative;background:var(--wa-head);color:#fff;display:flex;align-items:center;gap:8px;padding:8px 8px 10px 4px;z-index:5}
.ico{background:none;border:0;color:inherit;width:36px;height:36px;display:grid;place-items:center;border-radius:50%;position:relative;flex:none}
.ico svg{width:22px;height:22px}
.ico:hover{background:rgba(255,255,255,.12)}
.back{width:28px}
.avatar{width:38px;height:38px;border-radius:50%;background:linear-gradient(135deg,#f3d1c2,#c9826b);color:#fff;font-weight:800;display:grid;place-items:center;font-size:1.05rem;flex:none;font-family:Georgia,serif}
.avatar.big{width:64px;height:64px;font-size:1.7rem;margin:0 auto 6px}
.who{flex:1;min-width:0}
.name{font-weight:600;font-size:1rem;display:flex;align-items:center;gap:4px;white-space:nowrap}
.vbadge{width:16px;height:16px;flex:none}
.sub{font-size:.76rem;opacity:.85;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.dot{position:absolute;top:7px;right:7px;width:9px;height:9px;border-radius:50%;background:#ffd166;border:2px solid var(--wa-head)}
.menu{position:absolute;right:8px;top:48px;background:#fff;border-radius:10px;box-shadow:0 10px 30px rgba(0,0,0,.25);padding:6px 0;min-width:200px;color:var(--ink)}
.menu button,.menu a{display:block;width:100%;text-align:left;background:none;border:0;padding:10px 16px;font-size:.9rem;color:var(--ink);text-decoration:none}
.menu button:hover,.menu a:hover{background:#f1f3f2}

.chat{flex:1;overflow-y:auto;padding:10px 12px 14px;background-color:var(--wa-bg);background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cg fill='none' stroke='%23d6cfc3' stroke-width='1.4' stroke-linecap='round'%3E%3Cpath d='M20 30c6-10 18-10 22 0-6 6-16 6-22 0zM31 30v12'/%3E%3Cpath d='M110 20l3 7 7 3-7 3-3 7-3-7-7-3 7-3z'/%3E%3Ccircle cx='70' cy='80' r='7'/%3E%3Cpath d='M126 100c0-8 10-14 10-14s10 6 10 14a10 10 0 0 1-20 0z'/%3E%3Cpath d='M30 120c8-4 16 4 24 0'/%3E%3Cpath d='M90 140l6-10 6 10z'/%3E%3C/g%3E%3C/svg%3E");scroll-behavior:smooth}
.day{margin:4px auto 8px;width:max-content;background:#fff;color:#54656f;font-size:.72rem;padding:4px 10px;border-radius:8px;box-shadow:0 1px .5px rgba(11,20,26,.13)}
.notice{background:#ffeecd;color:#54656f;font-size:.74rem;line-height:1.4;padding:7px 10px;border-radius:8px;text-align:center;margin:0 10px 10px;box-shadow:0 1px .5px rgba(11,20,26,.13)}
.bizcard{background:#fff;border-radius:12px;text-align:center;padding:14px 10px 12px;margin:0 30px 14px;box-shadow:0 1px .5px rgba(11,20,26,.13);display:grid;gap:2px}
.bizcard span{font-size:.78rem;color:var(--muted)}.bizcard em{font-size:.72rem;color:var(--green);font-style:normal;margin-top:4px}

/* messages */
.row{display:flex;margin:2px 0;animation:pop .18s ease-out}
.row.me{justify-content:flex-end}
.row+.row.gap{margin-top:8px}
@keyframes pop{from{opacity:0;transform:translateY(6px)}}
.bubble{position:relative;max-width:84%;background:var(--in);border-radius:8px;padding:6px 8px 7px 9px;font-size:.92rem;line-height:1.38;box-shadow:0 1px .5px rgba(11,20,26,.13);word-wrap:break-word;overflow-wrap:anywhere}
.me .bubble{background:var(--out)}
.bubble.tail{border-top-left-radius:0}
.me .bubble.tail{border-top-left-radius:8px;border-top-right-radius:0}
.bubble.tail::before{content:"";position:absolute;top:0;left:-7px;border-top:0 solid transparent;border-right:8px solid var(--in);border-bottom:10px solid transparent}
.me .bubble.tail::before{left:auto;right:-7px;border-right:0;border-left:8px solid var(--out)}
.txt{white-space:pre-wrap}
.txt[dir=rtl]{text-align:right}
.meta{float:right;margin:6px 0 -4px 10px;font-size:.66rem;color:var(--muted);display:inline-flex;gap:3px;align-items:center;line-height:1}
.ticks{width:16px;height:11px;color:#8696a0}.ticks.read{color:#53bdeb}
.src{clear:both;display:flex;gap:5px;align-items:flex-start;margin-top:6px;padding-top:5px;border-top:1px dashed #e2e2e2;font-size:.7rem;color:var(--muted);line-height:1.35}
.src svg{width:12px;height:12px;flex:none;margin-top:1px}
.bubble.has-btns{border-bottom-left-radius:0;border-bottom-right-radius:0}
.btns{display:grid;gap:2px;margin-top:2px}
.btns button,.listbtn{background:#fff;border:0;color:var(--link);font-weight:500;font-size:.9rem;padding:9px 8px;display:flex;align-items:center;justify-content:center;gap:6px;box-shadow:0 1px .5px rgba(11,20,26,.13)}
.btns button:last-child{border-radius:0 0 8px 8px}
.btns button:hover,.listbtn:hover{background:#f7f8f8}
.btns svg,.listbtn svg{width:16px;height:16px}
.stack{max-width:84%;display:flex;flex-direction:column}
.stack .bubble{max-width:100%}
.listbtn{width:100%;border-top:1px solid #eee;margin-top:6px;margin-left:-9px;margin-right:-8px;width:calc(100% + 17px);margin-bottom:-7px;border-radius:0 0 8px 8px;box-shadow:none}
.system{margin:10px auto;width:max-content;max-width:88%;text-align:center;background:#e1f3fb;color:#3b5560;font-size:.74rem;padding:6px 10px;border-radius:8px;box-shadow:0 1px .5px rgba(11,20,26,.13)}

/* location + booking cards */
.loc{padding:3px;width:270px}
.map{height:130px;border-radius:6px;overflow:hidden;position:relative;background:#e9efe6}
.map svg{width:100%;height:100%;display:block}
.loc b{display:block;font-size:.9rem;margin:7px 6px 1px}
.loc span{display:block;font-size:.78rem;color:var(--muted);margin:0 6px}
.loc em{display:block;font-size:.68rem;color:#a07b35;font-style:normal;margin:2px 6px 4px}
.book{padding:0;overflow:hidden;width:270px}
.book-h{background:linear-gradient(135deg,#0b6b5e,#14897a);color:#fff;padding:10px 12px;display:flex;gap:10px;align-items:center}
.book-h svg{width:26px;height:26px;flex:none}
.book-h b{display:block;font-size:.92rem}.book-h span{font-size:.74rem;opacity:.9}
.book dl{padding:8px 12px 2px;display:grid;grid-template-columns:auto 1fr;gap:3px 10px;font-size:.8rem}
.book dt{color:var(--muted)}.book dd{font-weight:500}
.book .meta{margin:4px 8px 6px}

.typing{display:inline-flex;gap:4px;padding:12px 14px}
.typing i{width:7px;height:7px;border-radius:50%;background:#9aa6ac;animation:blink 1.2s infinite}
.typing i:nth-child(2){animation-delay:.2s}.typing i:nth-child(3){animation-delay:.4s}
@keyframes blink{0%,60%,100%{opacity:.3;transform:translateY(0)}30%{opacity:1;transform:translateY(-3px)}}

/* composer */
.composer{display:flex;gap:6px;align-items:flex-end;padding:6px 6px 10px;background:transparent}
.field{flex:1;display:flex;align-items:flex-end;gap:6px;background:#fff;border-radius:24px;padding:6px 12px 6px 10px;box-shadow:0 1px .5px rgba(11,20,26,.13)}
.emoji{width:24px;height:24px;color:#8696a0;flex:none;margin-bottom:3px}
textarea{flex:1;border:0;outline:0;resize:none;font:inherit;font-size:.95rem;line-height:1.35;max-height:110px;padding:5px 0;background:transparent;color:var(--ink)}
#hp{position:absolute;left:-9999px;width:1px;height:1px;opacity:0}
.send{width:46px;height:46px;border-radius:50%;border:0;background:var(--wa-head);color:#fff;display:grid;place-items:center;flex:none}
.send svg{width:21px;height:21px;margin-left:2px}
.send:disabled{opacity:.6}

/* list sheet + ops sheet inside the phone */
.sheet,.ops{position:absolute;inset:0;background:rgba(11,20,26,.35);display:flex;align-items:flex-end;z-index:20;animation:fade .15s}
.sheet[hidden],.ops[hidden]{display:none}
@keyframes fade{from{opacity:0}}
.sheet-card,.ops-card{background:#fff;width:100%;max-height:78%;border-radius:18px 18px 0 0;display:flex;flex-direction:column;animation:up .2s ease-out}
.ops-card{max-height:88%;background:#f7f5f1}
@keyframes up{from{transform:translateY(40px)}}
.sheet-head{display:flex;align-items:center;gap:8px;padding:10px 10px 6px;color:#54656f}
.sheet-head b{flex:1;text-align:center;color:var(--ink);margin-right:44px}
.sheet-body{overflow-y:auto;padding:0 0 6px}
.sec{font-size:.78rem;color:var(--green);font-weight:600;padding:12px 20px 4px}
.opt{display:flex;align-items:center;gap:12px;width:100%;background:none;border:0;text-align:left;padding:9px 20px;border-bottom:1px solid #f0f2f2}
.opt span{flex:1}.opt b{display:block;font-weight:500;font-size:.93rem}.opt small{color:var(--muted);font-size:.78rem}
.opt i{width:20px;height:20px;border-radius:50%;border:2px solid #8696a0;flex:none;position:relative}
.opt.on i{border-color:var(--green)}.opt.on i::after{content:"";position:absolute;inset:3px;border-radius:50%;background:var(--green)}
.sheet-send{margin:8px 16px 16px;border:0;border-radius:24px;background:var(--wa-head);color:#fff;font-weight:600;padding:12px}
.sheet-send:disabled{background:#c9d3d0}

/* side panel */
.side{position:sticky;top:20px;display:grid;gap:14px}
.panel{background:#fff;border:1px solid var(--line);border-radius:18px;padding:16px;box-shadow:0 20px 40px -30px rgba(16,35,31,.4)}
.panel-h b{display:block;font-size:1rem}.panel-h span{font-size:.78rem;color:#7a8783}
.ops-body{padding:0}
.ops .ops-body{overflow-y:auto;padding:4px 14px 18px}
.lead-box{margin:12px 0;border:1px solid #dfe6e2;border-radius:10px;overflow:hidden}
.lead-h{display:flex;align-items:center;gap:8px;background:#f1f7f3;font-size:.78rem;font-weight:700;color:#1d6b3e;padding:7px 10px;border-bottom:1px solid #dfe6e2}
.gs{width:14px;height:16px;border-radius:2px;background:#1e8e3e;position:relative;flex:none}
.gs::after{content:"";position:absolute;inset:4px 3px;border:1.5px solid #fff;border-radius:1px}
.lead-t{width:100%;border-collapse:collapse;font-size:.8rem;background:#fff}
.lead-t th{width:72px;text-align:left;color:#7a8783;font-weight:500;padding:5px 10px;border-bottom:1px solid #f0f2f1;background:#fbfcfb}
.lead-t td{padding:5px 10px;border-bottom:1px solid #f0f2f1;transition:background .6s}
.lead-t td.flash{background:#fff7d6}
.st{display:inline-block;font-size:.7rem;font-weight:700;border-radius:999px;padding:2px 8px;background:#eef1f0;color:#4b5a55}
.st-Qualified{background:#e3effd;color:#1d4f91}.st-Booked{background:#dcf5e6;color:#17663a}.st-Hand-off{background:#fdebd8;color:#9a4a07}
.log{list-style:none;display:grid;gap:6px;max-height:330px;overflow-y:auto;font-size:.8rem}
.ops .log{max-height:none}
.log li{display:flex;gap:8px;align-items:flex-start;line-height:1.35;animation:pop .2s}
.log li.muted{color:#7a8783}
.log .k{flex:none;font-size:.64rem;font-weight:800;letter-spacing:.04em;text-transform:uppercase;border-radius:5px;padding:2px 5px;margin-top:1px;min-width:62px;text-align:center}
.k.kb{background:#eef1f0;color:#4b5a55}.k.sheets{background:#dcf5e6;color:#17663a}.k.calendar{background:#e3effd;color:#1d4f91}.k.crm{background:#ffe6dc;color:#a23d12}
.k.handoff{background:#fdebd8;color:#9a4a07}.k.guard{background:#fde2e2;color:#a51d1d}.k.template{background:#efe7fb;color:#5b2ea6}.k.engine{background:#10231f;color:#cfe3dc}
.meter{margin-top:12px;font-size:.74rem;color:#7a8783;border-top:1px solid #f0f2f1;padding-top:10px}
.links{display:grid;gap:8px;font-size:.85rem}
.links a{background:rgba(255,255,255,.7);border:1px solid var(--line);border-radius:12px;padding:10px 12px;text-decoration:none;font-weight:600}
.links a:hover{background:#fff}

@media (max-width:1240px){
  .stage{grid-template-columns:minmax(0,1fr) 392px;gap:30px}
  .side{grid-column:1;grid-row:2;position:static;margin-top:-10px}
  .phone-wrap{grid-row:1 / span 2;grid-column:2}
}
/* ---------- mobile: the chat is the whole screen */
@media (max-width:860px){
  body{background:var(--wa-bg);overflow:hidden}
  .demo-bar{font-size:.7rem;padding:5px 10px;gap:8px;line-height:1.3;flex-wrap:nowrap}
  .demo-bar .long{display:none}
  .stage{display:block;padding:0;max-width:none}
  .intro,.side{display:none}
  .phone-wrap{position:static}
  .phone{width:100%;height:calc(100dvh - var(--bar,44px));min-height:0;border:0;border-radius:0;box-shadow:none}
  .statusbar{display:none}
  .wa-head{padding-top:calc(8px + env(safe-area-inset-top,0px))}
  .composer{padding-bottom:calc(8px + env(safe-area-inset-bottom,0px))}
  .bubble,.stack{max-width:88%}
}
