/* InfiChat look v3 — brand palette from the logo, sidebar shell, motion.
   Loaded after console.css: this file only overrides, it never removes behaviour. */
:root{
  --bg:#F5F4FB;--surface:#FFFFFF;--surface2:#EFEDF8;--surface3:#E4E0F3;
  --border:#E2DFF0;--border2:#CCC6E3;
  --text:#140D38;--text2:#4A4570;--text3:#655F8C;
  --accent:#4A22F5;--accent2:#7A0FE6;--accent-bg:#EEE9FF;--accent-soft:rgba(74,34,245,.08);
  --btn:#4A22F5;--btn-hover:#3A14E0;--btn-ring:rgba(124,31,224,.32);
  --success:#0A6E4E;--success-bg:#DBF4EA;
  --warn:#8A3D00;--warn-bg:#FFE9D2;
  --kw-tcf:#4A22F5;--kw-vocab:#B4500A;--kw-grammar:#0A6E4E;--kw-other:#B70CA3;
  --grad:linear-gradient(100deg,#331DFD,#9C0DD2 42%,#EE1C76 76%,#FE800F);
  --btn-grad:linear-gradient(100deg,#331DFD,#8A12DC);
  --glow:rgba(124,31,224,.34);
  --radius:18px;--radius-sm:12px;--r-xs:9px;--r-lg:24px;
  --shadow:0 1px 2px rgba(20,13,56,.04);
  --shadow2:0 14px 32px -18px rgba(20,13,56,.28);
  --font-display:'Bricolage Grotesque','Figtree',system-ui,sans-serif;
  --spring:cubic-bezier(.2,.9,.3,1.4);--glide:cubic-bezier(.2,.8,.2,1);
}
:root[data-theme="dark"]{
  --bg:#0F0A24;--surface:#191233;--surface2:#221A42;--surface3:#2D2356;
  --border:#30275A;--border2:#43377A;
  --text:#F4F1FF;--text2:#C6C0E6;--text3:#A49DCB;
  --accent:#AFA2FF;--accent2:#D6A6FF;--accent-bg:rgba(175,162,255,.16);--accent-soft:rgba(175,162,255,.10);
  --btn:#5B3BFF;--btn-hover:#6D4FFF;--btn-ring:rgba(175,120,255,.42);
  --success:#5ADBA9;--success-bg:rgba(90,219,169,.14);
  --warn:#FFB877;--warn-bg:rgba(255,184,119,.14);
  --kw-tcf:#AFA2FF;--kw-vocab:#FFB877;--kw-grammar:#5ADBA9;--kw-other:#F58CD9;
  --glow:rgba(175,120,255,.45);
  --shadow:0 1px 3px rgba(0,0,0,.4);--shadow2:0 18px 40px -18px rgba(0,0,0,.7);
}
[data-theme="dark"] input,[data-theme="dark"] select,[data-theme="dark"] textarea{background:#130D2B}
[data-theme="dark"] .cbf-name:hover,[data-theme="dark"] .cbf-name:focus{background:#130D2B}

body{font-family:'Figtree',-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;font-size:15px}
h1,h2,.card-title,.perf-title h2,.kt-v,.dn-num,.flow-h,.fx-n,.logo h1{font-family:var(--font-display)}

/* ── logo ── */
.logo{gap:10px}
.logo-mark{height:34px;width:auto;display:block;transition:transform .5s var(--spring)}
.logo:hover .logo-mark{transform:rotate(-6deg) scale(1.08)}
.logo h1{font-size:1.4rem;font-weight:800;letter-spacing:-.02em;color:var(--text)}
.logo h1 span,.auth-logo h1 span{background:var(--grad);-webkit-background-clip:text;background-clip:text;color:transparent}

/* ── shell: side menu on wide screens, top bar on small ones ── */
.tab{display:inline-flex;align-items:center;gap:10px}
.tab svg{width:18px;height:18px;flex:none;transition:transform .28s var(--spring)}
.tab:hover svg{transform:scale(1.2) rotate(-8deg)}
@media(min-width:901px){
  .shell{max-width:none;padding:0;display:grid;grid-template-columns:236px minmax(0,1fr);align-items:start}
  .shell>.header{grid-column:1;grid-row:1/span 40;position:sticky;top:0;height:100vh;box-sizing:border-box;display:flex;flex-direction:column;align-items:stretch;gap:20px;margin:0;padding:22px 14px 16px;background:var(--surface);border-right:1px solid var(--border);z-index:60}
  .header::before{display:none}
  .shell>*:not(.header){grid-column:2;min-width:0}
  .shell>.pane{padding:28px clamp(18px,2.6vw,40px) 44px}
  .logo{padding:0 8px}
  .header .tabs{flex-direction:column;align-items:stretch;width:100%;background:none;padding:0;gap:4px;justify-self:stretch;overflow:visible}
  .tab{padding:11px 12px;border-radius:12px;font-size:.94rem;font-weight:600;text-align:left;transition:background .2s,transform .2s var(--glide),color .2s}
  .tab:hover{background:var(--surface2);color:var(--accent);transform:translateX(4px)}
  .tab-ind{display:none}
  .tab.active,.tabs.has-ind .tab.active{background:var(--accent-bg);color:var(--accent);box-shadow:none;font-weight:700}
  [data-theme="dark"] .tab.active{background:var(--accent-bg);color:var(--accent)}
  .header-actions{margin-top:auto;justify-self:stretch;justify-content:space-between;gap:8px}
  .acct{flex:1;min-width:0}.acct-btn{width:100%;border-radius:14px}.acct-name{max-width:none;flex:1;text-align:left}
  .acct-menu,.notif-menu{top:auto;bottom:calc(100% + 10px);right:auto;left:0;transform-origin:bottom left}
}
@media(max-width:900px){.tab svg{display:none}}

/* ── buttons ── */
.btn{border-radius:12px;transition:transform .2s var(--glide),box-shadow .2s,background-color .2s,border-color .2s,color .2s}
.btn:hover{transform:translateY(-2px);border-color:var(--accent);background:var(--accent-bg);color:var(--accent)}
.btn:active{transform:scale(.97)}
.btn-primary{background:var(--btn-grad);border-color:transparent;color:#fff;overflow:hidden}
.btn-primary::before{content:"";position:absolute;top:0;bottom:0;left:-60%;width:40%;background:linear-gradient(100deg,transparent,rgba(255,255,255,.38),transparent);transform:skewX(-18deg);transition:left .55s;pointer-events:none}
.btn-primary:hover{background:var(--btn-grad);border-color:transparent;color:#fff;transform:translateY(-2px);box-shadow:0 14px 28px -10px var(--glow)}
.btn-primary:hover::before{left:120%}
.btn-primary:disabled{background:var(--btn-grad)}
.btn-ghost:hover{background:var(--surface2);border-color:transparent;color:var(--text)}
.btn-danger:hover,.btn-danger-solid:hover{background:var(--danger);border-color:var(--danger);color:#fff}
.btn.is-success,.btn.is-success:hover{background:var(--success);border-color:var(--success);color:#fff}
.icon-btn{transition:transform .25s var(--spring),background-color .2s,color .2s}
.icon-btn:hover{transform:scale(1.12) rotate(-6deg);color:var(--accent)}
.scan-reply-btn{background:var(--btn-grad);box-shadow:0 10px 26px -8px var(--glow)}
.scan-reply-btn:hover{box-shadow:0 16px 34px -8px var(--glow)}
[data-theme="dark"] .scan-reply-btn{background:var(--btn-grad)}

/* ── cards: a gradient outline draws on hover; small tiles also lift ── */
.card,.kt,.vc,.ar-rules-col,.ar-editor-col{border-radius:22px}
.card,.kt,.vc{position:relative;transition:transform .28s var(--glide),box-shadow .28s}
.card::after,.kt::after,.vc::after,.rule-list-item::after{content:"";position:absolute;inset:0;border-radius:inherit;padding:1.5px;background:var(--grad);-webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);-webkit-mask-composite:xor;mask-composite:exclude;opacity:0;transition:opacity .3s;pointer-events:none}
.card:hover::after,.kt:hover::after,.vc:hover::after,.rule-list-item:hover::after{opacity:1}
.card:hover{box-shadow:0 22px 44px -28px var(--glow)}
.kt:hover,.vc:hover{transform:translateY(-4px);box-shadow:0 22px 40px -22px var(--glow)}
.card-title{font-size:1.1rem;font-weight:800;letter-spacing:-.01em}
.card-subtitle{font-size:.82rem}
.perf-title h2{font-size:1.5rem;font-weight:800;letter-spacing:-.02em}
.kt{padding:18px 20px}.kt-l{font-size:.82rem;font-weight:600}
.kt-v{font-size:2.2rem;font-weight:800;letter-spacing:-.03em}

/* ── small controls ── */
.toggle.on,.toggle-label input[type="checkbox"]:checked+.toggle,[data-theme="dark"] .toggle.on,[data-theme="dark"] .toggle-label input[type="checkbox"]:checked+.toggle{background:var(--btn-grad)}
.toggle::after{transition:left .22s var(--glide),width .15s}
.chip{transition:transform .2s var(--glide),background-color .2s,color .2s}
.chip:hover{transform:translateY(-1px)}
.chip.active,[data-theme="dark"] .chip.active{background:var(--btn-grad);color:#fff}
.seg{border-radius:12px;padding:4px}.seg button{border-radius:9px;transition:background-color .2s,color .2s,transform .2s}
.seg button:hover{transform:translateY(-1px)}
.seg button.on{background:var(--btn-grad);color:#fff;box-shadow:none}
.badge{border-radius:99px;padding:4px 10px;font-weight:700}
.badge-fail{background:var(--danger-bg);color:var(--danger)}
.plan-pill{border-radius:99px}
input,select,textarea{border-radius:12px}
.acct-av,.conn-avatar{background:var(--btn-grad)}
.al-tab.active{background:var(--btn-grad);color:#fff;box-shadow:none}.al-tab.active span{color:rgba(255,255,255,.8)}
.l-tbl tr{transition:background-color .18s}
.al-av{transition:box-shadow .2s,transform .2s}
.al-tbl tr:hover .al-av{box-shadow:0 0 0 3px var(--surface),0 0 0 5px var(--accent);transform:scale(1.06)}
.al-ext{display:inline-block;transition:transform .2s var(--glide)}
a.al-msg:hover .al-ext{transform:translate(2px,-2px)}

/* ── dashboard: the comment → DM thread ── */
.flow{margin-bottom:20px}
.flow-head{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:6px 20px;margin-bottom:14px}
.flow-h{font-size:clamp(1.15rem,1.5vw,1.4rem);font-weight:700;letter-spacing:-.02em;line-height:1.25;color:var(--text)}
.flow-sub{font-size:.84rem;color:var(--text3)}
/* one box, four steps in a row, an arrow between each pair */
.fx{list-style:none;margin:0;padding:18px clamp(14px,2vw,28px);display:grid;grid-template-columns:minmax(0,1fr) 40px minmax(0,1fr) 40px minmax(0,1fr) 40px minmax(0,1fr);align-items:center;background:var(--surface);border:1px solid var(--border);border-radius:22px;transition:box-shadow .28s}
.fx:hover{box-shadow:0 22px 44px -30px var(--glow)}
.fx-box{display:flex;align-items:center;justify-content:center;gap:14px;min-width:0;padding:4px 6px;border-radius:14px;transition:transform .28s var(--glide)}
.fx-box:hover{transform:translateY(-3px)}
.fx-art{flex:0 0 clamp(96px,8.6vw,128px);aspect-ratio:120/76}
.fx-art svg{width:100%;height:100%;display:block;overflow:visible}
.fx-tx{min-width:0}
.fx-n{font-family:var(--font-display);font-size:clamp(1.4rem,1.9vw,1.8rem);font-weight:800;letter-spacing:-.03em;line-height:1.05;color:var(--text);font-variant-numeric:tabular-nums}
.fx-l{font-size:.9rem;font-weight:600;color:var(--text2);line-height:1.3;margin-top:3px;white-space:nowrap}
.fx-arrow{display:flex;align-items:center;justify-content:center;color:var(--text3)}
.fx-arrow svg{width:32px;height:18px;overflow:visible}
.fx-shaft,.fx-head{fill:none;stroke:currentColor;stroke-width:3;stroke-linecap:round;stroke-linejoin:round}
/* the pictures */
.fx-c1{fill:#331DFD}.fx-c2{fill:#EE1C76}.fx-c3{fill:#FE800F}
.fx-ink{fill:#fff;opacity:.92}
.fx-stroke{fill:none;stroke:#fff;stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round}
.fx-tray-back{fill:var(--surface3)}
.fx-tray{fill:var(--text);opacity:.9}
.fx-bub{fill:var(--surface2);stroke:var(--border2);stroke-width:1.5}
.fx-line{fill:var(--border2)}
.fx-av{fill:var(--border2)}
.fx-elbow,.fx-trail{fill:none;stroke:var(--border2);stroke-width:2.5;stroke-linecap:round}
.fx-trail{stroke-dasharray:3 7}
.fx-ok{fill:var(--success)}
.fx-kw{font:800 10px/1 'Figtree',system-ui,sans-serif;fill:#fff;letter-spacing:.04em}
.fx-grad{fill:#8A12DC}
.fx-box:nth-child(3) .fx-grad{fill:#9C0DD2}
[data-theme="dark"] .fx-c1{fill:#7C6BFF}[data-theme="dark"] .fx-tray{fill:#CFC8F5}
/* one pass, only when something new has just arrived (.go is added for a few seconds) */
.fx-ph{fill:var(--text);opacity:.9}.fx-scr{fill:var(--surface)}.fx-notch{fill:var(--surface);opacity:.35}
.fx-dot{fill:var(--text3)}
.fx-scan{fill:#8A12DC;opacity:0}
[data-theme="dark"] .fx-ph{fill:#2A2540;opacity:1}[data-theme="dark"] .fx-scr{fill:#14111F}
/* one sequence per box: --d staggers the boxes left to right; hovering a box replays its own scene */
.fx-box:nth-child(1){--d:0s}.fx-box:nth-child(3){--d:.7s}.fx-box:nth-child(5){--d:1.4s}.fx-box:nth-child(7){--d:2.1s}
.fx-box:hover{--d:0s}
.fx-in,.fx-float,.fx-pop,.fx-slide,.fx-fly,.fx-hit,.fx-land,.fx-glow,.fx-dot{transform-box:fill-box;transform-origin:center}
.fx-draw{stroke-dasharray:40;stroke-dashoffset:0}
.flow.go .fx-in,.fx-box:hover .fx-in{animation:fx-rise .5s var(--glide) both}
.flow.go .fx-in.r1,.fx-box:hover .fx-in.r1{animation-delay:calc(var(--d) + .05s)}
.flow.go .fx-in.r2,.fx-box:hover .fx-in.r2{animation-delay:calc(var(--d) + .3s)}
.flow.go .fx-in.r3,.fx-box:hover .fx-in.r3{animation-delay:calc(var(--d) + .55s)}
.flow.go .fx-in.r4,.fx-box:hover .fx-in.r4{animation-delay:calc(var(--d) + .8s)}
.flow.go .fx-dot,.fx-box:hover .fx-dot{animation:fx-bob .6s ease-in-out calc(var(--d) + 1s) 3}
.flow.go .fx-dot.t2,.fx-box:hover .fx-dot.t2{animation-delay:calc(var(--d) + 1.15s)}
.flow.go .fx-dot.t3,.fx-box:hover .fx-dot.t3{animation-delay:calc(var(--d) + 1.3s)}
.flow.go .fx-float.fl,.fx-box:hover .fx-float.fl{animation:fx-in-l .7s var(--spring) var(--d) both}
.flow.go .fx-float.fr,.fx-box:hover .fx-float.fr{animation:fx-in-r .7s var(--spring) calc(var(--d) + .45s) both}
.flow.go .fx-scan,.fx-box:hover .fx-scan{animation:fx-scan 1.3s ease-in-out var(--d) both}
.flow.go .fx-hit,.fx-box:hover .fx-hit{animation:fx-hit .5s var(--spring) calc(var(--d) + 1.05s) both}
.flow.go .fx-pop,.fx-box:hover .fx-pop{animation:fx-pop .45s var(--spring) calc(var(--d) + 1.4s) both}
.flow.go .fx-draw,.fx-box:hover .fx-draw{animation:fx-draw .6s ease-out calc(var(--d) + .2s) both}
.flow.go .fx-slide,.fx-box:hover .fx-slide{animation:fx-slide .5s var(--glide) calc(var(--d) + .7s) both}
.flow.go .fx-glow,.fx-box:hover .fx-glow{animation:fx-glow .9s ease-in-out var(--d) both}
.flow.go .fx-fly,.fx-box:hover .fx-fly{animation:fx-fly .8s var(--glide) calc(var(--d) + .6s) both}
.flow.go .fx-land,.fx-box:hover .fx-land{animation:fx-pop .45s var(--spring) calc(var(--d) + 1.35s) both}
.flow.go .fx-arrow{animation:fx-arrow .5s ease both}
.flow.go .fx-arrow:nth-child(2){animation-delay:.7s}.flow.go .fx-arrow:nth-child(4){animation-delay:1.4s}.flow.go .fx-arrow:nth-child(6){animation-delay:2.1s}
@keyframes fx-rise{0%{transform:translateY(8px);opacity:0}100%{transform:none;opacity:1}}
@keyframes fx-bob{0%,100%{transform:none}50%{transform:translateY(-2.500px)}}
@keyframes fx-in-l{0%{transform:translate(-16px,6px) scale(.6);opacity:0}100%{transform:none;opacity:1}}
@keyframes fx-in-r{0%{transform:translate(16px,6px) scale(.6);opacity:0}100%{transform:none;opacity:1}}
@keyframes fx-scan{0%{transform:translateY(0);opacity:0}12%{opacity:.35}80%{transform:translateY(48px);opacity:.35}100%{transform:translateY(22px);opacity:0}}
@keyframes fx-hit{0%{transform:scale(.3);opacity:0}100%{transform:none;opacity:1}}
@keyframes fx-pop{0%{transform:scale(.4);opacity:0}100%{transform:none;opacity:1}}
@keyframes fx-draw{0%{stroke-dashoffset:40}100%{stroke-dashoffset:0}}
@keyframes fx-slide{0%{transform:translateX(-10px);opacity:0}100%{transform:none;opacity:1}}
@keyframes fx-glow{0%,100%{opacity:1}40%{opacity:.35}}
@keyframes fx-fly{0%{transform:translate(-14px,14px) scale(.6) rotate(-8deg);opacity:0}100%{transform:none;opacity:1}}
@keyframes fx-arrow{0%,100%{color:var(--text3);transform:none}50%{color:var(--accent);transform:translateX(5px)}}
@media(max-width:1380px){.fx-box{flex-direction:column;align-items:center;text-align:center;gap:8px}.fx-art{flex-basis:auto;width:118px}}
@media(max-width:640px){.fx{grid-template-columns:repeat(2,minmax(0,1fr));gap:18px 10px;padding:16px 12px}.fx-arrow{display:none!important}.fx-art{flex-basis:auto;width:112px}}

/* ── auto-replies: rules as cards, the editor as a thread of steps ── */
.ar-rules-list{padding:10px}
.rule-list-item{border:1.5px solid var(--border);border-radius:14px;padding:12px 14px;margin-bottom:8px;transition:transform .2s var(--glide),background-color .2s,border-color .2s}
.rule-list-item:hover{background:var(--surface);border-color:transparent;transform:translateX(4px)}
.rule-list-item.selected{background:var(--accent-bg);border-color:var(--accent)}
.rule-list-item .rli-name{font-size:.92rem;font-weight:700}
.rule-list-item .rli-meta{font-size:.74rem}
.editor{counter-reset:step}
.editor .ed-section{counter-increment:step;border:0;border-radius:0;background:linear-gradient(180deg,#9C0DD2,#EE1C76) 17.5px 48px/5px calc(100% - 44px) no-repeat;padding:44px 0 22px 58px;margin-top:0}
.editor .ed-section+.ed-section{margin-top:0}
.editor .ed-section:first-child{background-image:linear-gradient(180deg,#331DFD,#9C0DD2)}
.editor .ed-section:last-child{background:none}
.editor .ed-section:nth-last-child(2){background-image:linear-gradient(180deg,#EE1C76,#FE800F)}
.editor .ed-section::before,[data-theme="dark"] .editor .ed-section::before{content:counter(step);top:0;left:0;width:40px;height:40px;padding:0;border-radius:50%;display:flex;align-items:center;justify-content:center;background:var(--btn-grad);color:#fff;font-size:.95rem;font-weight:800;letter-spacing:0;transition:transform .3s var(--spring)}
.editor .ed-section:hover::before{transform:scale(1.12)}
.editor .ed-section::after{content:attr(data-step);position:absolute;top:8px;left:58px;font-family:var(--font-display);font-size:1.08rem;font-weight:800;letter-spacing:-.01em;color:var(--text)}
@media(max-width:560px){.editor .ed-section{padding-left:50px}.editor .ed-section::after{left:50px}}

/* ── phones ── */
.phone-frame{border:10px solid var(--text);background:var(--surface);box-shadow:0 30px 60px -30px rgba(20,13,56,.55);transition:transform .35s var(--glide)}
.phone-frame:hover{transform:translateY(-4px) rotate(-.6deg)}
[data-theme="dark"] .phone-frame{border-color:#2D2356;background:#130D2B}
.phone-frame.phone-mini{border-width:8px}
.pv-bub.user,[data-theme="dark"] .pv-bub.user{background:var(--btn-grad);color:#fff}
.pv-bub.brand{background:var(--accent-bg)}
.phone-screen.play .pv-comment,.phone-screen.play .pv-bub,.phone-screen.play .pv-ctx{animation:pv-pop .45s cubic-bezier(.2,.9,.3,1.2) both}
.phone-screen.play .pv-comment.reply,.phone-screen.play .pv-bub:nth-of-type(2){animation-delay:.6s}
.phone-screen.play .pv-bub:nth-of-type(3){animation-delay:1.1s}.phone-screen.play .pv-bub:nth-of-type(n+4){animation-delay:1.6s}
@keyframes pv-pop{from{opacity:0;transform:translateY(14px) scale(.92)}to{opacity:1;transform:none}}

/* ── chatbot canvas ── */
.cbf-node{border-radius:18px;transition:transform .2s var(--glide),box-shadow .2s,border-color .2s}
.cbf-node:hover{transform:translateY(-2px);box-shadow:0 16px 30px -18px var(--glow)}
.cbf-node.root{border-top:4px solid #7A0FE6}

/* ── connection ── */
.conn-banner{border-radius:20px}

/* ── login ── */
.auth-logo .logo-mark{height:56px}
.auth-card{border-radius:24px}

@media (prefers-reduced-motion:reduce){
  .flow .fx-in,.flow .fx-float,.flow .fx-dot,.flow .fx-scan,.flow .fx-hit,.flow .fx-pop,.flow .fx-draw,.flow .fx-slide,.flow .fx-glow,.flow .fx-fly,.flow .fx-land,.flow.go .fx-arrow,.cu-bar.wait i,.phone-screen.play .pv-comment,.phone-screen.play .pv-bub,.phone-screen.play .pv-ctx{animation:none}
  .btn,.btn-primary::before,.card,.kt,.vc,.tab,.tab svg,.icon-btn,.rule-list-item,.phone-frame,.fx-box,.tx-btn,.live-pill,.cbf-node,.logo-mark,.chip,.seg button,.al-av,.al-ext{transition:none}
  .btn:hover,.kt:hover,.vc:hover,.tab:hover,.rule-list-item:hover,.phone-frame:hover,.cbf-node:hover,.chip:hover,.seg button:hover,.icon-btn:hover{transform:none}
}

[hidden]{display:none!important}

/* ── Live badge: top right on every page ── */
.live{position:relative;display:flex;justify-content:flex-end;padding:14px clamp(18px,2.6vw,40px) 0;z-index:40}
.shell>.live+.pane,.shell>.live~.pane{padding-top:14px}
.live-pill{display:inline-flex;align-items:center;gap:8px;padding:7px 12px 7px 11px;border-radius:99px;border:1px solid var(--border);background:var(--surface);color:var(--text);font:700 .86rem/1 'Figtree',system-ui,sans-serif;cursor:pointer;transition:transform .2s var(--glide),box-shadow .2s,border-color .2s}
.live-pill:hover{transform:translateY(-1px);box-shadow:0 10px 22px -14px var(--glow);border-color:var(--border2)}
.live-pill:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.live-dot{width:9px;height:9px;border-radius:50%;background:var(--text3);flex:none}
.live-caret{font-size:.7rem;color:var(--text3)}
.live[data-state="live"] .live-pill{border-color:color-mix(in srgb,var(--success) 45%,var(--border));color:var(--success);background:var(--success-bg)}
.live[data-state="live"] .live-dot{background:var(--success);box-shadow:0 0 0 4px color-mix(in srgb,var(--success) 22%,transparent)}
.live[data-state="paused"] .live-dot{background:var(--warn)}
.live[data-state="attn"] .live-pill{color:var(--danger);border-color:var(--danger)}
.live[data-state="attn"] .live-dot{background:var(--danger)}
.live-menu{position:absolute;top:calc(100% + 8px);right:clamp(18px,2.6vw,40px);width:min(320px,calc(100vw - 36px));background:var(--surface);border:1px solid var(--border);border-radius:16px;box-shadow:0 24px 48px -24px rgba(20,13,56,.45);padding:14px;visibility:hidden;opacity:0;transform:translateY(-4px);transition:opacity .16s,transform .16s,visibility 0s linear .16s}
.live-menu.open{visibility:visible;opacity:1;transform:none;transition-delay:0s}
.live-status{font-size:.86rem;color:var(--text2);line-height:1.5}
.live-status a{color:var(--accent);font-weight:600}
.live-acts{display:flex;gap:8px;justify-content:flex-end;margin-top:12px}
@media(max-width:900px){.live{padding:10px 0 0}.live-menu{right:0}}

/* ── Save buttons: the label tells you whether there is anything to save ── */
.save-note{font-size:.82rem;color:var(--text3);margin-right:auto;display:none;align-items:center;gap:7px}
.save-note.on{display:inline-flex}
.save-note.on::before{content:'';width:8px;height:8px;border-radius:50%;background:#FE800F}
.ar-save-bar .ed-hint+.save-note{margin-right:0}
.btn.btn-saved,.btn.btn-saved:hover,.btn.btn-saved:disabled{background:var(--success-bg);border-color:transparent;color:var(--success);opacity:1;cursor:default;transform:none;box-shadow:none}
.btn.btn-saved::before{display:none}

/* ── Catch up: minimise button and the corner scorecard ── */
.cu-modal{position:relative}
.cu-min{position:absolute;top:12px;right:12px;width:34px;height:34px;border-radius:10px;border:1px solid var(--border);background:var(--surface);color:var(--text2);display:flex;align-items:center;justify-content:center;cursor:pointer;transition:background-color .2s,color .2s,transform .2s var(--glide)}
.cu-min:hover{background:var(--surface2);color:var(--accent);transform:translate(1px,1px)}
.cu-min svg{width:18px;height:18px}
.cu-card{position:fixed;right:20px;bottom:20px;z-index:980;width:min(300px,calc(100vw - 24px));background:var(--surface);border:1px solid var(--border);border-radius:18px;box-shadow:0 26px 50px -22px rgba(20,13,56,.5);padding:14px 14px 16px;animation:cu-in .28s var(--glide)}
@keyframes cu-in{from{transform:translateY(14px);opacity:0}}
.cu-c-head{display:flex;align-items:center;gap:8px}
.cu-c-dot{width:9px;height:9px;border-radius:50%;background:var(--accent);flex:none}
.cu-card[data-stage="done"] .cu-c-dot{background:var(--success)}
.cu-card[data-stage="error"] .cu-c-dot{background:var(--danger)}
.cu-c-t{font:700 .92rem/1.2 var(--font-display);color:var(--text)}
.cu-c-s{font-size:.8rem;color:var(--text3);margin-right:auto}
.cu-c-btn{width:28px;height:28px;border-radius:8px;border:0;background:transparent;color:var(--text2);display:flex;align-items:center;justify-content:center;cursor:pointer;font-size:1.1rem;line-height:1;transition:background-color .2s,color .2s}
.cu-c-btn:hover{background:var(--surface2);color:var(--accent)}
.cu-c-btn svg{width:16px;height:16px}
.cu-c-body{margin-top:10px}
.cu-c-row{display:flex;justify-content:space-between;align-items:baseline;font-size:.86rem;color:var(--text2);margin-top:10px}
.cu-c-row b{font-variant-numeric:tabular-nums;color:var(--text)}
.cu-c-line{font-size:.86rem;color:var(--text2);line-height:1.45}
.cu-c-go{margin-top:12px;width:100%;justify-content:center}
.cu-bar.wait i{width:36%;animation:cu-wait 1.3s ease-in-out infinite}
@keyframes cu-wait{0%{margin-left:-36%}100%{margin-left:100%}}
@media(max-width:560px){.cu-card{left:10px;right:10px;bottom:10px;width:auto}}

/* ── Any table can open large ── */
.tx-host{position:relative}
.tx-btn{position:absolute;top:10px;right:10px;z-index:9;height:30px;min-width:30px;padding:0 7px;border-radius:9px;border:1px solid var(--border);background:var(--surface);color:var(--text2);display:inline-flex;align-items:center;justify-content:center;gap:7px;cursor:pointer;font:600 .8rem/1 'Figtree',system-ui,sans-serif;opacity:0;transition:opacity .18s,transform .2s var(--glide),color .2s,border-color .2s}
.tx-btn svg{width:15px;height:15px}
.tx-btn kbd{font:600 .7rem/1 'Figtree',system-ui,sans-serif;padding:3px 5px;border-radius:5px;background:var(--surface2);border:1px solid var(--border);color:var(--text3)}
.tx-host:hover>.tx-btn,.tx-btn:focus-visible,.tx-full>.tx-btn{opacity:1}
.tx-btn:hover{color:var(--accent);border-color:var(--accent);transform:scale(1.06)}
.tx-btn:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
@media(hover:none){.tx-btn{opacity:1}}
/* keep the card's own header buttons clear of the expand button */
.tx-host>.card-header,.tx-host>.vc-h{padding-right:40px}
.tx-back{position:fixed;inset:0;z-index:940;background:rgba(15,10,36,.55);animation:tx-fade .18s ease}
.tx-full{position:fixed!important;inset:clamp(10px,3vh,28px) clamp(10px,3vw,40px);z-index:950;margin:0!important;max-width:none!important;overflow:auto;transform:none!important;box-shadow:0 40px 80px -30px rgba(15,10,36,.7)!important;padding:20px 22px 22px;animation:tx-grow .22s var(--glide)}
.tx-full>.card-header,.tx-full>.vc-h{padding-right:110px!important}
.tx-full>.tx-btn{top:16px;right:16px;padding:0 10px;color:var(--text)}
.tx-full .vt-wrap,.tx-full #logBody,.tx-full .tbl-scroll{max-height:none!important;overflow:visible!important}
.tx-full table{width:100%}
.tx-full td,.tx-full .al-msg,.tx-full .al-post,.tx-full .al-name{white-space:normal!important;max-width:none!important;overflow:visible!important;text-overflow:clip!important}
.tx-full .hide-sm{display:table-cell!important}
.tx-lock{overflow:hidden}
@keyframes tx-fade{from{opacity:0}}
@keyframes tx-grow{from{opacity:0;transform:scale(.98)}}

/* ── Chatbot ── */
.cbf-info{display:flex;gap:9px;align-items:flex-start;font-size:.86rem;line-height:1.45;color:var(--text2);background:var(--accent-bg);border-radius:12px;padding:9px 12px;margin:8px 0 10px}
.cbf-info b{color:var(--text)}
/* full page: only the canvas. The chatbot list and the phone preview step aside until you leave it. */
.cb-three-col.cbf-fullscreen{grid-template-columns:minmax(0,1fr);padding:16px clamp(14px,2vw,28px);z-index:930}
.cb-three-col.cbf-fullscreen>.ar-rules-col,.cb-three-col.cbf-fullscreen>.ar-phones-col{display:none}
.cb-three-col.cbf-fullscreen .cbf-wrap{height:calc(100vh - 300px);min-height:320px}
@media(prefers-reduced-motion:reduce){.cu-card,.tx-back,.tx-full{animation:none}}

/* ── icons inside buttons ── */
.ic{width:16px;height:16px;flex:none;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;vertical-align:-3px;margin-right:7px}

/* ── Performance: title on its own line, every filter on the one line under it ── */
.perf-bar{display:flex;flex-wrap:wrap;align-items:center;gap:10px 12px}
.perf-title{flex:0 0 100%}
.perf-filters{flex-wrap:nowrap;gap:10px;min-width:0}
.perf-actions{margin-left:auto;flex-wrap:nowrap}
.perf-custom input{width:132px}
@media(max-width:1180px){.perf-filters{flex-wrap:wrap}.perf-actions{margin-left:0}}

/* ── Activity log: title, filters and tabs stay in view while the rows scroll ── */
.al-card{overflow:visible}
.al-stick{position:sticky;top:0;z-index:6;background:var(--surface);padding-top:2px;margin:-2px 0 0}
.al-stick::after{content:'';position:absolute;left:0;right:0;bottom:-10px;height:10px;background:linear-gradient(var(--surface),transparent);pointer-events:none}
.al-stick .card-header{margin-bottom:12px}
.log-filters{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(0,1.1fr) minmax(0,.85fr) minmax(0,1.5fr) auto 138px auto 138px auto;gap:8px;align-items:center;margin-bottom:10px}
.log-filters select,.log-filters input{width:100%;max-width:none!important;min-width:0;font-size:.84rem;height:38px;box-sizing:border-box}
.log-filters .btn{height:38px}
.al-chips{display:flex;gap:8px;align-items:center;flex-wrap:wrap;padding-bottom:10px}
.al-chips .al-tabs{margin:0 0 0 auto}
#logBody{border:1px solid var(--border);border-radius:var(--radius);overflow-x:auto}
.al-tbl thead th{background:var(--surface)}
@media(min-width:1101px){
  #logBody{overflow:visible}
  .al-tbl thead{position:static}
  .al-tbl thead th{position:sticky;top:var(--stick-top,0);z-index:4}
  .al-tbl thead th:first-child{border-top-left-radius:var(--radius)}.al-tbl thead th:last-child{border-top-right-radius:var(--radius)}
}
@media(max-width:1100px){.log-filters{grid-template-columns:repeat(4,minmax(0,1fr))}.log-filters .filter-label{display:none}.log-filters .search-input{grid-column:span 2}}
@media(max-width:640px){.log-filters{grid-template-columns:repeat(2,minmax(0,1fr))}.al-stick{position:static}.al-chips .al-tabs{margin-left:0}}

/* large view: the card scrolls, its heading stays, the Close button stays */
.tx-full{padding-top:0}
.tx-full>.card-header,.tx-full>.vc-h,.tx-full>.al-stick{position:sticky;top:0;z-index:6;background:var(--surface);padding-top:20px;margin-top:0}
.tx-full>.vc-h{padding-bottom:10px;margin-bottom:0}
.tx-full thead th{position:sticky;top:var(--stick-top,0);z-index:4;background:var(--surface)}
.tx-full #logBody{overflow:visible!important}
.tx-full>.tx-btn{position:fixed;top:calc(clamp(10px,3vh,28px) + 16px);right:calc(clamp(10px,3vw,40px) + 18px);z-index:8}
.tx-full .al-stick .card-header{padding-right:110px}
.tx-host>.al-stick .card-header{padding-right:40px}
.tx-full{overflow:auto!important}
.tx-full>.al-stick .card-header{padding-right:124px}

/* Connection: hand over to a person */
.ho-grid{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(0,1fr);gap:14px 18px;margin-top:14px;transition:opacity .15s}
.ho-wide{grid-column:1/-1}
.ho-field{display:flex;flex-direction:column;min-width:0}
.ho-field label{font-size:.82rem;font-weight:600;color:var(--text);margin-bottom:5px}
.ho-field input,.ho-field select,.ho-field textarea{width:100%;font-size:.86rem}
.ho-field textarea{resize:vertical;min-height:56px}
.ho-hint{font-size:.76rem;line-height:1.45;color:var(--text3);margin-top:5px}
.ho-off .ho-grid{opacity:.55}
.oauth-hero .oauth-note{font-size:.8rem;color:var(--text3);max-width:440px;margin:-8px auto 20px}
@media(max-width:720px){.ho-grid{grid-template-columns:minmax(0,1fr)}}

/* ── Instagram / Facebook marks (official files) with a plain fallback ── */
.bi{position:relative;display:inline-grid;place-items:center;width:18px;height:18px;flex:none;vertical-align:-4px;margin-right:7px}
.bi svg{width:100%;height:100%;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.bi img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;background:var(--surface);border-radius:22%}
.bi.lg{width:44px;height:44px;margin:0}
/* ── dashboard: both / Instagram / Facebook ── */
.plat-bar{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:0 0 14px}
.plat-bar[hidden]{display:none}
.plat-lbl{font-size:.84rem;font-weight:600;color:var(--text3)}
.plat-bar .seg button{display:inline-flex;align-items:center}
.plat-bar .seg button.on .bi img{box-shadow:0 0 0 2px #fff}

/* ── connection hub: Instagram ── InfiChat ── Facebook ── */
.hub{display:flex;align-items:center;justify-content:center;gap:0;padding:10px 4px 4px}
.hub-node{display:flex;flex-direction:column;align-items:center;gap:6px;text-align:center;min-width:0;width:clamp(96px,16vw,150px);padding:12px 8px;border-radius:18px;outline:none;transition:transform .28s var(--glide),background-color .28s}
.hub-node b{font-size:.92rem;color:var(--text)}
.hub-node span{font-size:.78rem;color:var(--text3);max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.hub-node.is-on span{color:var(--text2)}
.hub-node:not(.is-on) .bi{filter:grayscale(1);opacity:.55}
.hub-node:hover,.hub-node:focus-visible{transform:translateY(-4px);background:var(--surface2)}
.hub-node:focus-visible{box-shadow:0 0 0 2px var(--accent)}
.hub-mark{display:grid;place-items:center;width:58px;height:58px;border-radius:18px;background:var(--btn-grad);box-shadow:0 14px 30px -16px var(--glow)}
.hub-mark img{width:34px;height:34px;object-fit:contain}
.hub-line{position:relative;flex:1 1 60px;max-width:180px;height:4px;border-radius:4px;margin-top:-34px;background:repeating-linear-gradient(90deg,var(--border2) 0 6px,transparent 6px 12px);transition:filter .28s,opacity .28s}
.hub-line.on,.hub-line.idle{background:linear-gradient(90deg,#331DFD,#8A12DC 50%,#EE1C76)}
.hub-line.idle{opacity:.45}
.hub-line i{position:absolute;top:50%;left:0;width:10px;height:10px;margin-top:-5px;border-radius:50%;background:#fff;box-shadow:0 0 0 3px #8A12DC;opacity:0}
.hub-line.on i{animation:hub-pkt 2.4s ease-in-out infinite}
.hub-line.l-fb.on i{animation-direction:reverse}
/* hovering a platform lights its own link */
.hub:has([data-side="ig"]:hover) .l-ig,.hub:has([data-side="ig"]:focus-visible) .l-ig,
.hub:has([data-side="fb"]:hover) .l-fb,.hub:has([data-side="fb"]:focus-visible) .l-fb{filter:drop-shadow(0 0 6px #8A12DC);opacity:1}
.hub:has(.hub-core:hover) .hub-line{filter:drop-shadow(0 0 6px #8A12DC);opacity:1}
@keyframes hub-pkt{0%{left:0;opacity:0}15%{opacity:1}85%{opacity:1}100%{left:calc(100% - 10px);opacity:0}}
@media(max-width:560px){.hub-node{width:88px;padding:8px 2px}.bi.lg{width:36px;height:36px}.hub-mark{width:46px;height:46px}.hub-mark img{width:26px;height:26px}.hub-line{margin-top:-30px}}
/* connecting / connected */
.hub-ov{position:fixed;inset:0;z-index:960;display:grid;place-items:center;padding:20px;background:rgba(15,10,36,.55);backdrop-filter:blur(6px);opacity:0;transition:opacity .25s}
.hub-ov.show{opacity:1}
.hub-ov-card{width:min(560px,100%);background:var(--surface);border:1px solid var(--border);border-radius:24px;padding:26px 22px 24px;text-align:center;box-shadow:0 40px 80px -30px rgba(15,10,36,.7);transform:translateY(10px) scale(.98);transition:transform .35s var(--spring)}
.hub-ov.show .hub-ov-card{transform:none}
.hub-ov-card h3{margin:12px 0 4px;font-size:1.2rem}
.hub-ov-card p{margin:0 0 4px;color:var(--text2);font-size:.9rem}
.hub-ov-card .btn{margin-top:14px}
.hub-try .hub-line{background:repeating-linear-gradient(90deg,#8A12DC 0 8px,transparent 8px 16px);background-size:32px 4px;animation:hub-dash .6s linear infinite}
.hub-try .hub-line.l-fb{animation-direction:reverse}
.hub-try .hub-line i{animation:hub-pkt 1.1s ease-in-out infinite}
.hub-try .hub-node .bi{filter:none;opacity:1;animation:hub-breathe 1.1s ease-in-out infinite}
.hub-try .hub-mark{animation:hub-ring 1.1s ease-out infinite}
.hub-done .hub-mark{animation:hub-pop .5s var(--spring) both}
.hub-done .hub-line.on i{animation-duration:1.4s}
@keyframes hub-dash{to{background-position:32px 0}}
@keyframes hub-breathe{0%,100%{transform:none}50%{transform:scale(1.08)}}
@keyframes hub-ring{0%{box-shadow:0 0 0 0 rgba(138,18,220,.45)}100%{box-shadow:0 0 0 18px rgba(138,18,220,0)}}
@keyframes hub-pop{0%{transform:scale(.6)}100%{transform:none}}
@media(prefers-reduced-motion:reduce){.hub-line i,.hub-try .hub-line,.hub-try .hub-line i,.hub-try .hub-node .bi,.hub-try .hub-mark,.hub-done .hub-mark{animation:none}.hub-node,.hub-ov,.hub-ov-card{transition:none}}
/* connect card */
.oauth-steps{text-align:left;max-width:520px;margin:6px auto 16px;padding-left:20px;font-size:.86rem;color:var(--text2);display:flex;flex-direction:column;gap:6px}
.oauth-steps b{color:var(--text)}
.btn-connect{display:inline-flex;align-items:center;font-size:.95rem;padding:11px 28px}
.btn-connect .bi{width:20px;height:20px}
.ig-msg-tip{display:flex;gap:10px;align-items:flex-start;text-align:left;margin-top:16px}
.ig-msg-tip .bi{margin:0}
/* welcome & menu */
.wl-card .card-header select{max-width:220px}
.wl-sync{font-size:.82rem;color:var(--text3);margin:-4px 0 12px}
.wl-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px 22px}
.wl-grid h4{margin:0 0 2px;font-size:.92rem}
.wl-grid h4 small{font-weight:500;color:var(--text3);margin-left:6px;font-size:.76rem}
.wl-grid .ho-hint{margin:0 0 10px}
.wl-wide{grid-column:1/-1}
.wl-row{display:flex;flex-direction:column;gap:6px;padding:10px;border:1px solid var(--border);border-radius:12px;margin-bottom:8px;background:var(--surface2)}
.wl-q{display:flex;gap:6px;align-items:center}
.wl-q input{flex:1;min-width:0}
.wl-q select{flex:0 0 auto;width:auto}
.wl-row [hidden]{display:none}
.wl-card .ar-save-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
@media(max-width:760px){.wl-grid{grid-template-columns:1fr}}
@media(max-width:560px){.plat-lbl,.plat-long{display:none}.plat-bar .seg{display:flex;width:100%}.plat-bar .seg button{flex:1;justify-content:center;padding-left:6px;padding-right:6px}}
