
/* ===== Assistly app (dashboard + sign-in) — built on tokens.css + dashboard.css ===== */
[hidden]{display:none!important}
body.auth-mode{overflow:auto;background:var(--paper)}
.page{display:none}
.page.active{display:block}

/* ---------- Auth ---------- */
#authPage.active{display:block}
.auth{min-height:100vh;display:grid;grid-template-columns:minmax(380px,520px) 1fr}
.auth-brand{position:relative;overflow:hidden;background:var(--brand-900);color:#fff;padding:40px 44px;display:flex;flex-direction:column}
.auth-brand::after{content:"";position:absolute;right:-180px;bottom:-200px;width:520px;height:520px;border-radius:50%;background:radial-gradient(closest-side,rgba(127,203,174,.22),transparent);pointer-events:none}
.auth-brand .logo{color:#fff;font-size:22px}
.auth-brand .logo svg rect{fill:#fff}
.auth-brand .logo svg path{fill:var(--brand-700)}
.auth-brand .logo svg circle:not(:last-child){fill:#fff}
.auth-brand .logo svg circle:last-child{stroke:#fff}
.auth-brand h2{font-size:38px;line-height:1.08;letter-spacing:-.03em;margin:auto 0 18px;max-width:420px}
.auth-brand h2 em{font-family:var(--serif);font-style:italic;font-weight:400;color:var(--brand-300);letter-spacing:-.01em}
.auth-brand ul{list-style:none;margin:0;padding:0;display:grid;gap:14px;max-width:400px}
.auth-brand li{display:flex;gap:12px;font-size:15px;line-height:1.45;color:rgba(255,255,255,.86)}
.auth-brand li .i{width:20px;height:20px;color:var(--brand-300);margin-top:1px}
.auth-brand .free{margin-top:28px;display:inline-flex;align-items:center;gap:8px;font-size:13.5px;font-weight:600;color:#fff;background:rgba(255,255,255,.1);border:1px solid rgba(255,255,255,.16);padding:8px 12px;border-radius:999px;align-self:flex-start}
.auth-brand .free .i{width:16px;height:16px;color:var(--brand-300)}
.auth-brand .foot{margin-top:auto;padding-top:40px;font-size:12.5px;color:rgba(255,255,255,.55)}
.auth-main{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px 24px}
.auth-logo-m{display:none;margin-bottom:22px}
.auth-card{width:100%;max-width:420px;background:var(--surface);border:1px solid var(--line);border-radius:22px;box-shadow:var(--sh-2);padding:34px 32px 28px}
.auth-card h1{font-size:28px;letter-spacing:-.03em;margin:0 0 6px;line-height:1.15}
.auth-card .muted{color:var(--muted);font-size:15px;margin:0 0 24px;line-height:1.5}
.field{margin-bottom:16px}
.field label{display:block;font-size:13.5px;font-weight:600;color:var(--ink-2);margin-bottom:6px}
.field .row{display:flex;justify-content:space-between;align-items:baseline}
textarea.input{height:auto;min-height:96px;padding:12px 14px;line-height:1.5;resize:vertical}
.btn-block{width:100%}
.btn:disabled{opacity:.6;cursor:default}
.linkbtn{border:0;background:none;padding:0;color:var(--brand-700);font-weight:650;cursor:pointer;font-size:inherit}
.linkbtn:hover{text-decoration:underline}
.auth-switch{margin-top:18px;text-align:center;color:var(--muted);font-size:14.5px}
.auth-switch .linkbtn{margin-left:4px}
.auth-alt{margin-top:14px;text-align:right;font-size:13.5px}
.legal-links{margin-top:22px;text-align:center;font-size:13px;color:var(--faint)}
.legal-links a{color:var(--muted)}
.legal-links a:hover{color:var(--ink)}
.status{font-size:14px;line-height:1.45;min-height:0}
.status:empty{display:none}
.note{display:flex;gap:10px;align-items:flex-start;font-size:14px;line-height:1.45;padding:11px 13px;border-radius:12px;margin:0 0 16px}
.note .i{width:18px;height:18px;margin-top:1px}
.note.ok{background:var(--ok-bg);color:#0B5F44}
.note.err{background:var(--err-bg);color:#9B2424}
.note.info{background:var(--sunken);color:var(--ink-2)}
.status.ok{color:var(--ok)} .status.err{color:var(--err)}
.fine{font-size:13px;color:var(--muted);margin:14px 0 0;line-height:1.5}
.auth-card .status{margin-top:12px}
@media (max-width:900px){
  .auth{grid-template-columns:1fr}
  .auth-brand{display:none}
  .auth-logo-m{display:inline-flex}
  .auth-main{justify-content:flex-start;padding:36px 16px 28px}
  .auth-card{padding:26px 20px 22px;border-radius:20px}
  .auth-card h1{font-size:25px}
}

.auth-perks{display:none}
@media (max-width:900px){
  .auth-perks{display:grid;gap:12px;list-style:none;margin:26px 0 0;padding:0 6px;width:100%;max-width:420px}
  .auth-perks li{display:flex;gap:10px;align-items:center;font-size:14.5px;color:var(--ink-2)}
  .auth-perks .i{width:18px;height:18px;color:var(--brand-600)}
}

/* ---------- App shell ---------- */
.app{grid-template-columns:256px 1fr}
.main{min-width:0;min-height:0;height:100vh;overflow:hidden;position:relative}
.main>.page.active{height:100%}
.side .nv{border:1px solid transparent;background:none;width:100%;cursor:pointer;text-align:left;font-family:inherit}
.side .nv .soonb{margin-left:auto;font-size:10.5px;font-weight:700;color:var(--muted);background:var(--sunken);padding:2px 7px;border-radius:999px;border:1px solid var(--line)}
.biz{margin-bottom:18px}
.biz>div{min-width:0}
.biz b{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.plan-card{margin-top:auto;padding:14px;border-radius:14px;background:var(--surface);border:1px solid var(--line)}
.plan-card b{font-size:13.5px;display:flex;justify-content:space-between;align-items:center}
.plan-card b span{font-size:11.5px;font-weight:700;color:var(--brand-700);background:var(--brand-50);border:1px solid var(--brand-200);padding:1px 8px;border-radius:999px}
.plan-card p{margin:6px 0 8px;font-size:12.5px;color:var(--muted);line-height:1.45}
.plan-card button{font-size:13px}
.side-foot{display:flex;gap:6px;align-items:center;padding-top:12px}
.side-foot .nv{flex:1}

/* ---------- Inbox ---------- */
#dashboardPage.active{display:grid;grid-template-columns:340px 1fr 304px;height:100vh}
#dashboardPage>*{min-width:0;min-height:0}
.list-head .row{gap:8px}
.list-head .row h1{margin-right:auto}
.list-head .btn-sm{height:32px;font-size:13px;gap:6px}
.list-head .btn-sm .i{width:15px;height:15px}
.search{padding:0}
.search input{border:0;background:transparent;outline:0;height:38px;width:100%;font-size:14px;color:var(--ink);padding:0 12px 0 0}
.search .i{margin-left:12px}
.search:focus-within{box-shadow:var(--ring);background:var(--surface)}
.tab{border:0;background:none;cursor:pointer;font-family:inherit}
.tab:hover:not(.on){background:var(--sunken)}
.cv{cursor:pointer;text-align:left}
.cv:hover:not(.on){background:#FCFBF8}
.cv .top b{flex:0 1 auto;min-width:0}
.list-empty{padding:40px 24px;text-align:center;color:var(--muted);font-size:14px;line-height:1.5}
.list-empty .i{width:28px;height:28px;margin:0 auto 10px;color:var(--faint)}
.convo-name{min-width:0}
.chat{min-height:0}
.chat-head .who b span{overflow:hidden;text-overflow:ellipsis}
.chat-head .acts{display:flex;gap:6px}
.chat-head .iconbtn{cursor:pointer}
.chat-head .iconbtn:hover{background:var(--sunken)}
.chat-head .iconbtn.danger:hover{color:var(--err);border-color:#F3C9C9}
#modePill{display:none;height:20px;font-size:11.5px;padding:0 7px;flex:none}
#modePill.show{display:inline-flex}
#modePill .i{width:12px;height:12px}
#chatSubtitle{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
.seg{cursor:pointer;font-family:inherit}
.seg:disabled{cursor:default;opacity:.7}
.seg span{pointer-events:none}
.seg .on-ai{background:var(--surface);color:var(--brand-700);box-shadow:var(--sh-1)}
.warn-strip{display:flex;gap:8px;align-items:flex-start;background:var(--warn-bg);color:#7A4F0E;border-bottom:1px solid #F1DDB0;padding:9px 24px;font-size:13px;line-height:1.45}
.warn-strip .i{width:16px;height:16px;margin-top:1px}
.thread{gap:4px}
.m .b{white-space:pre-wrap;word-break:break-word}
.m.sys .b{background:var(--warn-bg);border:1px solid #F1DDB0;color:#6B4710;border-bottom-right-radius:6px}
.m.sys{align-self:flex-end;align-items:flex-end}
.m.sys .meta{color:var(--warn)}
.m.auto .b{background:var(--sunken);color:var(--ink-2,#3f3f46);border:1px dashed var(--line)}
.m.auto .meta{color:var(--muted)}
.m .meta .improve-btn{border:0;background:none;padding:0 0 0 4px;margin-left:2px;border-left:1px solid var(--brand-200);font:inherit;font-weight:600;color:var(--muted);cursor:pointer}
.m .meta .improve-btn:hover{color:var(--brand-700);text-decoration:underline}
.event.wait{color:var(--team-700);background:var(--team-bg);border-color:var(--team-line)}
.empty-chat{margin:auto;text-align:center;color:var(--muted);font-size:14.5px;max-width:340px;line-height:1.5;padding:20px}
.empty-chat .ill{width:64px;height:64px;border-radius:20px;background:var(--brand-50);border:1px solid var(--brand-200);color:var(--brand-700);display:grid;place-items:center;margin:0 auto 16px}
.empty-chat .ill .i{width:28px;height:28px}
.empty-chat b{display:block;color:var(--ink);font-family:var(--display);font-size:18px;letter-spacing:-.015em;margin-bottom:4px}
.empty-chat .btn{margin-top:16px}
.composer{border-color:var(--brand-200)}
.composer .who{color:var(--brand-700)}
.composer.human{border-color:var(--team-line)}
.composer.human .who{color:var(--team-700)}
.composer.test{border-color:var(--line-2)}
.composer.test .who{color:var(--ink-2)}
.composer.test .sr-wrap{display:none} /* saved replies are for answering real visitors, not for testing */
.composer.idle{border-color:var(--line)}
.composer.idle .who{color:var(--muted)}
.composer .tools .btn{background:var(--brand-700)}
.composer .tools .btn:hover{background:var(--brand-800)}
.composer.human .tools .btn{background:var(--team)}
.composer.human .tools .btn:hover{background:var(--team-700)}
.composer textarea:disabled{background:transparent;cursor:not-allowed}
.composer .tools .hint{margin-left:6px}

/* Details panel */
.d-empty{color:var(--muted);font-size:13.5px;line-height:1.5;text-align:center;padding:40px 10px}
.d-empty .i{width:26px;height:26px;color:var(--faint);margin:0 auto 10px}
.lead-card{border-color:var(--line);background:linear-gradient(180deg,var(--brand-50),#fff 70%)}
.lead-card.is-lead{border-color:var(--brand-200)}
.lead-card .top{gap:6px;justify-content:flex-start;flex-wrap:wrap}
.lead-card .need{display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden}
.lead-card .need-l{font-size:11.5px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--faint);margin:14px 0 4px}
.kv span.none{color:var(--faint)}
.kv a{word-break:break-all}
.actions .btn{cursor:pointer}
.actions .btn[aria-disabled=true]{opacity:.45;pointer-events:none}
.panel-sec .rowbtns{display:flex;gap:8px;flex-wrap:wrap}
.panel-sec .rowbtns .btn{height:34px;font-size:13px}

/* ---------- Content pages ---------- */
.pg{overflow:auto;height:100vh}
.pg-in{max-width:960px;margin:0 auto;padding:36px 40px 64px}
.pg-head{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;margin-bottom:24px;flex-wrap:wrap}
.pg-head h1{font-size:28px;letter-spacing:-.03em;margin:0 0 4px;line-height:1.15}
.pg-head p{margin:0;color:var(--muted);font-size:15px;max-width:600px;line-height:1.5}
.cardx{background:var(--surface);border:1px solid var(--line);border-radius:18px;box-shadow:var(--sh-1);padding:24px;margin-bottom:18px}
.cardx h2{font-size:17px;letter-spacing:-.015em;margin:0 0 4px;display:flex;align-items:center;gap:9px}
.cardx h2 .i{width:19px;height:19px;color:var(--brand-700)}
.cardx>p.desc{margin:0 0 18px;color:var(--muted);font-size:14px;line-height:1.5}
.grid2{display:grid;grid-template-columns:1fr 1fr;gap:18px}
.grid2>.cardx{margin-bottom:0}
.inline{display:flex;gap:10px;align-items:stretch}
.inline .input{flex:1;min-width:0}
.drop{position:relative;display:flex;align-items:center;gap:12px;border:1.5px dashed var(--line-2);border-radius:14px;padding:16px;background:#FCFBF9;cursor:pointer;margin-bottom:12px}
.drop:hover,.drop:focus-within{border-color:var(--brand-500);background:var(--brand-50)}
.drop input{position:absolute;inset:0;opacity:0;cursor:pointer;width:100%}
.drop .ic{width:40px;height:40px;border-radius:12px;background:var(--surface);border:1px solid var(--line);display:grid;place-items:center;color:var(--brand-700);flex:none}
.drop b{display:block;font-size:14.5px}
.drop small{color:var(--muted);font-size:13px}
.source-row{display:flex;align-items:center;gap:12px;padding:12px 0;border-top:1px solid var(--line);font-size:14.5px}
.source-row:first-child{border-top:0}
.source-row .sic{width:36px;height:36px;border-radius:10px;background:var(--brand-50);color:var(--brand-700);display:grid;place-items:center;flex:none}
.source-row .sic .i{width:18px;height:18px}
.source-row .txt{flex:1;min-width:0}
.source-row .txt>div:first-child{font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.source-row .meta{color:var(--muted);font-size:12.5px;margin-top:1px}
.source-row button{flex:none;height:32px;padding:0 12px;border-radius:9px;border:1px solid var(--line-2);background:var(--surface);color:var(--err);font-weight:600;font-size:13px;cursor:pointer}
.source-row button:hover{background:var(--err-bg);border-color:#F3C9C9}
.meta{color:var(--muted);font-size:13px}
.codebox{position:relative;background:var(--ink);color:#E6F4EE;border-radius:14px;padding:16px 16px 16px 16px;font:13.5px/1.55 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;word-break:break-all;margin:0 0 12px}
.codebox textarea{all:unset;display:block;width:100%;min-height:44px;white-space:pre-wrap;word-break:break-all;font:inherit;color:inherit;resize:none}
.steps-mini{margin:14px 0 0;padding:0;list-style:none;display:grid;gap:8px;font-size:14px;color:var(--ink-2)}
.steps-mini li{display:flex;gap:10px}
.steps-mini li b{flex:none;width:22px;height:22px;border-radius:50%;background:var(--brand-50);color:var(--brand-700);font-size:12px;display:grid;place-items:center;border:1px solid var(--brand-200)}
.swatches{display:flex;flex-wrap:wrap;gap:10px;margin-bottom:14px}
.sw{width:34px;height:34px;border-radius:50%;border:3px solid #fff;box-shadow:0 0 0 1px var(--line-2);cursor:pointer;padding:0}
.sw.on{box-shadow:0 0 0 2px var(--ink)}
.colorrow{display:flex;gap:10px;align-items:center}
.colorrow input[type=color]{width:44px;height:44px;border:1px solid var(--line-2);border-radius:12px;padding:3px;background:var(--surface);cursor:pointer}
.colorrow .input{max-width:140px;font-family:ui-monospace,Menlo,monospace;text-transform:uppercase}
.wprev{border-radius:18px;background:var(--sunken);border:1px solid var(--line);padding:18px;display:flex;flex-direction:column;align-items:flex-end;gap:12px;min-height:260px;justify-content:flex-end}
.wprev .p-panel{width:100%;max-width:300px;background:#fff;border-radius:18px;box-shadow:var(--sh-3);overflow:hidden}
.wprev .p-head{background:var(--pv,#0F5D46);color:var(--pvi,#fff);padding:12px 14px;display:flex;align-items:center;gap:10px}
.wprev .p-head .a{width:30px;height:30px;border-radius:50%;background:rgba(255,255,255,.18);display:grid;place-items:center}
.wprev .p-head .a .i{width:15px;height:15px}
.wprev .p-head b{font-size:14px;display:block;line-height:1.2}
.wprev .p-head small{font-size:11.5px;opacity:.85}
.wprev .p-body{padding:12px;display:grid;gap:8px;font-size:13px}
.wprev .p-ai{background:#F2F4F7;border-radius:14px;border-bottom-left-radius:5px;padding:8px 11px;max-width:85%;white-space:pre-wrap;word-break:break-word}
.wprev .p-me{justify-self:end;background:var(--pv,#0F5D46);color:var(--pvi,#fff);border-radius:14px;border-bottom-right-radius:5px;padding:8px 11px;max-width:85%}
.wprev .p-launch{width:52px;height:52px;border-radius:50%;background:var(--pv,#0F5D46);color:var(--pvi,#fff);display:grid;place-items:center;box-shadow:var(--sh-3)}
.wprev .p-launch .i{width:24px;height:24px}
.leads-table{width:100%;border-collapse:collapse}
.lead-item{display:grid;grid-template-columns:40px minmax(0,1.2fr) minmax(0,1.4fr) auto;gap:14px;align-items:center;padding:14px 4px;border-top:1px solid var(--line)}
.lead-item:first-child{border-top:0}
.lead-item .av{width:40px;height:40px;font-size:14px}
.lead-main{min-width:0;cursor:pointer}
.lead-name{font-weight:650;font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.lead-email{font-size:13.5px;color:var(--ink-2);word-break:break-all}
.lead-msg{font-size:13.5px;color:var(--muted);min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.lead-msg small{display:block;color:var(--faint);font-size:12px}
.lead-actions{display:flex;gap:8px}
.lead-actions .btn{height:34px;font-size:13.5px}
.lead-fail{font-size:12px;color:var(--err);margin-top:2px}
.btn-danger{background:var(--surface);color:var(--err);border-color:#F0CACA}
.btn-danger:hover{background:var(--err-bg)}
.btn-danger.solid{background:var(--err);color:#fff;border-color:var(--err)}
.btn-danger.solid:hover{background:#A82828}
.soon-pg{max-width:620px;margin:8vh auto 0;text-align:center;padding:0 24px}
.soon-pg .ill{width:72px;height:72px;border-radius:22px;display:grid;place-items:center;margin:0 auto 18px;background:var(--brand-50);border:1px solid var(--brand-200);color:var(--brand-700)}
.soon-pg .ill .i{width:32px;height:32px}
.soon-pg .ill.hot{background:var(--hot-bg);border-color:var(--hot-line);color:var(--hot)}
.soon-pg h1{font-size:30px;letter-spacing:-.03em;margin:12px 0 8px}
.soon-pg p{color:var(--muted);font-size:15.5px;line-height:1.6;margin:0 auto 22px;max-width:520px}
.soon-pg ul{text-align:left;list-style:none;padding:18px 20px;margin:0 auto 24px;max-width:440px;display:grid;gap:10px;background:var(--surface);border:1px solid var(--line);border-radius:16px}
.soon-pg li{display:flex;gap:10px;font-size:14.5px;color:var(--ink-2)}
.soon-pg li .i{width:18px;height:18px;color:var(--brand-600);margin-top:2px}
.badge-soon{background:var(--sunken);color:var(--muted);border-color:var(--line)}
.more-list{display:grid;gap:8px}
.more-list button{display:flex;align-items:center;gap:12px;height:54px;padding:0 16px;border-radius:14px;background:var(--surface);border:1px solid var(--line);font:inherit;font-weight:600;font-size:15px;color:var(--ink);cursor:pointer;text-align:left}
.more-list button .i{color:var(--brand-700)}
.more-list button .soonb{margin-left:auto;font-size:11px;font-weight:700;color:var(--muted);background:var(--sunken);padding:2px 8px;border-radius:999px}
.more-list button.out{color:var(--err)} .more-list button.out .i{color:var(--err)}

/* Modal + toast */
.modal{position:fixed;inset:0;background:rgba(20,26,36,.42);display:none;align-items:center;justify-content:center;z-index:100;padding:20px}
.modal.open{display:flex}
.modal-card{background:var(--surface);border-radius:20px;box-shadow:var(--sh-3);width:100%;max-width:400px;padding:24px}
.modal-card h3{margin:0 0 6px;font-size:19px;letter-spacing:-.02em}
.modal-card p{margin:0 0 18px;color:var(--muted);font-size:14.5px;line-height:1.5}
.modal-card .btns{display:flex;justify-content:flex-end;gap:8px;margin-top:18px}
.improve-box{margin-top:8px;background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:12px;box-shadow:var(--sh-2);width:min(420px,100%);align-self:flex-end}
.improve-box b{font-size:13px;display:block;margin-bottom:8px}
.improve-box .btns{display:flex;gap:8px;margin-top:10px}
.improve-box .status{margin-top:8px;font-size:13px}
.toast{position:fixed;left:50%;bottom:28px;transform:translateX(-50%) translateY(20px);background:var(--ink);color:#fff;padding:11px 16px;border-radius:12px;font-size:14px;font-weight:550;box-shadow:var(--sh-3);opacity:0;pointer-events:none;transition:opacity .18s,transform .18s;z-index:120;display:flex;gap:8px;align-items:center}
.toast.show{opacity:1;transform:translateX(-50%) translateY(0)}
.toast .i{width:16px;height:16px;color:var(--brand-300)}
.toast{width:max-content;max-width:calc(100vw - 32px)}
.toast.err{background:var(--err)}
.toast.err .i{color:#fff}
.toast span{min-width:0}

@media (max-width:1600px){ #dashboardPage .mode label{display:none} }
.lead-strip{background:var(--brand-50);border-bottom-color:var(--brand-200)}

/* ---------- Responsive ---------- */
@media (max-width:1280px){
  .app{grid-template-columns:232px 1fr}
  #dashboardPage.active{grid-template-columns:320px 1fr}
}
@media (max-width:980px){ .grid2{grid-template-columns:1fr} }
@media (max-width:760px){
  body:not(.auth-mode){overflow:auto}
  .app{display:block;padding-bottom:76px}
  .main{height:auto;overflow:visible}
  #dashboardPage.active{display:block;height:auto}
  .list{min-height:calc(100vh - 76px)}
  .list-head .btn-sm span{display:none}
  body.view-chat #dashboardPage .list{display:none}
  body.view-chat #dashboardPage .chat{display:flex;height:100vh;height:100dvh;position:fixed;inset:0;z-index:10}
  body.view-chat .tabbar{display:none!important}
  .chat-head .acts{order:3}
  .chat-head .mode{order:4}
  .warn-strip{padding:9px 14px}
  .composer .tools .hint{display:none}
  .pg{height:auto;overflow:visible}
  .pg-in{padding:22px 16px 40px}
  .pg-head h1{font-size:25px}
  .cardx{padding:18px;border-radius:16px}
  .inline{flex-direction:column}
  .lead-item{grid-template-columns:40px 1fr;row-gap:8px}
  .lead-msg{grid-column:2}
  .lead-actions{grid-column:2}
  .soon-pg{margin-top:28px}
  .soon-pg h1{font-size:25px}
  .tabbar button{flex:1;display:flex;flex-direction:column;align-items:center;gap:3px;font:inherit;font-size:11px;font-weight:600;color:var(--muted);position:relative;background:none;border:0;cursor:pointer}
  .tabbar button .i{width:22px;height:22px}
  .tabbar button.on{color:var(--brand-700)}
  .tabbar button .c{position:absolute;top:-4px;left:calc(50% + 6px);background:var(--brand-700);color:#fff;font-size:10px;font-weight:800;min-width:17px;height:17px;border-radius:999px;display:grid;place-items:center;padding:0 4px;border:2px solid #fff}
  .toast{bottom:92px}
}

/* ---------- Plans, locks, upgrade pop-up ---------- */
.lockb{margin-left:auto;display:inline-flex;align-items:center;gap:3px;font-size:10.5px;font-weight:700;color:var(--brand-700);background:var(--brand-50);padding:2px 7px 2px 6px;border-radius:999px;border:1px solid var(--brand-200);white-space:nowrap}
.lockb .i{width:11px;height:11px;stroke-width:2.2;color:var(--brand-700)!important}
.lockchip{gap:7px}
.lockchip .lockb{margin-left:4px}
.lockchip>.i{color:var(--hot)}
.more-list button .lockb{margin-left:auto}
.up-card{text-align:center;max-width:420px;padding:28px 26px 22px}
.up-card .up-ic{width:60px;height:60px;border-radius:18px;margin:0 auto 14px;display:grid;place-items:center;background:var(--brand-50);border:1px solid var(--brand-200);color:var(--brand-700)}
.up-card .up-ic .i{width:28px;height:28px}
.up-card .up-ic.hot{background:var(--hot-bg);border-color:var(--hot-line);color:var(--hot)}
.up-card .badge .i{width:12px;height:12px}
.up-card h3{font-size:22px;margin:12px 0 6px}
.up-card p{margin:0 auto 12px;max-width:330px}
.up-price{font-size:14px;color:var(--ink-2);background:var(--sunken);border-radius:12px;padding:10px 12px;margin:4px 0 0}
.up-card .btns{justify-content:center}
.up-card .btns .btn{flex:1}
.bplans{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-bottom:8px}
.bplan{position:relative;background:var(--surface);border:1px solid var(--line);border-radius:18px;padding:20px;box-shadow:var(--sh-1)}
.bplan.pop{border:1.5px solid var(--brand-700);box-shadow:var(--sh-3)}
.bplan.current{background:var(--brand-50);border-color:var(--brand-200)}
.bplan .pop-tag{position:absolute;top:-11px;left:20px;background:var(--brand-700);color:#fff;font-size:11.5px;font-weight:700;padding:3px 10px;border-radius:999px}
.bplan h3{margin:0;font-size:18px}
.bplan .for{margin:2px 0 12px;font-size:13px;color:var(--muted);min-height:36px}
.bplan .price{display:flex;align-items:baseline;gap:3px;margin-bottom:14px}
.bplan .price b{font-family:var(--display);font-size:30px;letter-spacing:-.03em}
.bplan .price span{color:var(--muted);font-size:13.5px}
.bplan ul{list-style:none;padding:0;margin:16px 0 0;display:grid;gap:8px;font-size:13.5px;color:var(--ink-2)}
.bplan li{display:flex;gap:8px;align-items:flex-start}
.bplan li .i{width:16px;height:16px;color:var(--brand-600);margin-top:2px}
.bplan .plan-btn:disabled{opacity:1;cursor:default}
.bplan.current .plan-btn{background:var(--brand-700);color:#fff;border-color:var(--brand-700)}
.bplan:not(.current) .plan-btn{background:var(--sunken);color:var(--muted);border-color:var(--line);box-shadow:none}
@media (max-width:1180px){ .bplans{grid-template-columns:1fr 1fr} }
@media (max-width:760px){ .bplans{grid-template-columns:1fr} .up-card .btns{flex-direction:column-reverse;gap:10px} .up-card .btns .btn{height:48px;flex:none} }

/* ===== accounts-1: sign-in safety + team ===== */
/* "or" divider + alternative sign-in buttons */
.alt-or{display:flex;align-items:center;gap:12px;margin:18px 0 14px;color:var(--faint);font-size:12.5px;font-weight:600;text-transform:uppercase;letter-spacing:.06em}
.alt-or::before,.alt-or::after{content:"";flex:1;height:1px;background:var(--line)}
.alt-btns{display:grid;gap:10px}
.alt-btns:empty{display:none}
.pk-btn .i{width:20px;height:20px;color:var(--brand-700)}
/* Google's own button style (light theme, pill): white, #747775 border, G logo, Roboto Medium */
.gbtn{display:flex;align-items:center;justify-content:center;gap:12px;height:48px;width:100%;padding:0 16px;border-radius:999px;background:#fff;border:1px solid #747775;color:#1F1F1F;font-family:Roboto,Inter,Arial,sans-serif;font-weight:500;font-size:15px;letter-spacing:.01em;text-decoration:none;cursor:pointer;transition:background .15s,box-shadow .15s}
.gbtn:hover{background:#F8FAFF;box-shadow:0 1px 2px rgba(60,64,67,.15)}
.gbtn:focus-visible{outline:none;box-shadow:0 0 0 3px rgba(27,143,105,.28)}
.gbtn svg.g{width:20px;height:20px;flex:none}
/* code step */
.code-ic{width:52px;height:52px;border-radius:16px;background:var(--brand-50);color:var(--brand-700);display:grid;place-items:center;margin-bottom:16px}
.code-ic .i{width:26px;height:26px}
.code-input{font-family:var(--display);font-size:26px;font-weight:700;letter-spacing:.32em;text-align:center;height:58px;font-variant-numeric:tabular-nums}
.code-input::placeholder{color:var(--line-2);letter-spacing:.32em}
.check{display:flex;align-items:center;gap:10px;font-size:14px;color:var(--ink-2);margin:2px 0 18px;cursor:pointer;user-select:none}
.check input{width:18px;height:18px;accent-color:var(--brand-700);margin:0}
#codeView .auth-switch .linkbtn:disabled{color:var(--faint);cursor:default;text-decoration:none}
/* team page */
.team-card{padding:6px 22px}
.trow{display:flex;align-items:center;gap:14px;padding:16px 0;border-bottom:1px solid var(--line)}
.trow:last-child{border-bottom:0}
.trow .av{width:42px;height:42px;border-radius:50%;color:#fff;display:grid;place-items:center;font-weight:700;font-size:14.5px;flex:none}
.tmain{min-width:0;flex:1;display:flex;flex-direction:column;gap:1px}
.tmain b{font-size:15px;color:var(--ink)}
.tmain small{font-size:13px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tmain .tstat{color:var(--faint);font-size:12.5px}
.trow .role{flex:none}
.trow .role .i{width:13px;height:13px}
.tacts{display:flex;gap:8px;flex:none}
.tacts:empty{display:none}
.tacts .btn .i{width:15px;height:15px}
.you{color:var(--muted);font-weight:500}
.warn-t{color:var(--warn);font-weight:600}
.danger-t{color:var(--err)!important}
.danger-t:hover{background:var(--err-bg)!important}
.t-empty{display:flex;gap:14px;align-items:center;padding:18px 0 20px;color:var(--muted)}
.t-empty .i{width:22px;height:22px;color:var(--team);flex:none}
.t-empty b{display:block;color:var(--ink);font-size:14.5px}
.t-empty span{font-size:13.5px}
.seat-top{display:flex;justify-content:space-between;align-items:flex-start;gap:16px}
.seat-top b{font-size:15px;display:block}
.seat-top small{font-size:13.5px;color:var(--muted)}
.seat-price{font-family:var(--display);font-weight:800;font-size:20px;color:var(--ink);text-align:right;line-height:1.1;white-space:nowrap}
.seat-price small{display:block;font-family:var(--font);font-weight:500;font-size:12px;color:var(--muted)}
.seat-bar{height:8px;border-radius:999px;background:var(--sunken);margin-top:14px;overflow:hidden}
.seat-bar span{display:block;height:100%;background:var(--team);border-radius:999px}
.ticks{list-style:none;margin:10px 0 0;padding:0;display:grid;gap:9px}
.ticks li{display:flex;gap:10px;font-size:14.5px;color:var(--ink-2);align-items:flex-start}
.ticks li .i{width:17px;height:17px;color:var(--brand-700);margin-top:2px;flex:none}
.ticks.no li .i{color:var(--muted)}
.team-rules{margin-top:0}
#teamPage .pg-head{align-items:flex-start;gap:16px}
#teamPage .pg-head .btn{flex:none}
#teamPage .pg-head .btn .i{width:17px;height:17px}
/* settings: security */
.sec-row{display:flex;gap:14px;align-items:flex-start;padding:16px 0;border-top:1px solid var(--line)}
.sec-card>.desc+.sec-row{border-top:0;padding-top:4px}
.sec-ic{width:38px;height:38px;border-radius:11px;background:var(--sunken);display:grid;place-items:center;flex:none;color:var(--ink-2)}
.sec-ic .i{width:19px;height:19px}
.sec-ic.g-ic svg.g{width:18px;height:18px}
.sec-main{flex:1;min-width:0}
.sec-main>b{font-size:15px;display:block}
.sec-main>small{display:block;font-size:13.5px;color:var(--muted);line-height:1.45;margin-top:2px}
.sec-row>.btn,.sec-row>.badge{flex:none}
.sec-acts{display:flex;gap:8px;align-items:center;flex-wrap:wrap;justify-content:flex-end;flex:none}
.sec-list{display:grid;gap:8px;margin-top:10px}
.sec-list:empty{display:none}
.sec-item{display:flex;align-items:center;gap:10px;padding:9px 12px;border:1px solid var(--line);border-radius:12px;background:var(--surface)}
.sec-item>.i{width:17px;height:17px;color:var(--muted);flex:none}
.sec-item>span{flex:1;min-width:0;display:flex;flex-direction:column}
.sec-item b{font-size:14px;font-weight:600}
.sec-item small{font-size:12.5px;color:var(--muted)}
.sec-item .linkbtn{font-size:13px}
.muted-t{color:var(--muted)}
/* authenticator modal */
.totp-card{max-width:440px}
.qr{display:grid;place-items:center;padding:12px;background:#fff;border:1px solid var(--line);border-radius:16px;width:max-content;margin:6px auto 0}
.qr img{display:block;width:180px;height:180px;image-rendering:pixelated}
.totp-card code,.backup-grid code{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:13px;background:var(--sunken);padding:2px 6px;border-radius:6px;word-break:break-all}
.totp-card .code-input{margin:4px 0 4px}
.backup-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:6px 0 18px}
.backup-grid code{display:block;text-align:center;font-size:15px;padding:9px 6px;letter-spacing:.06em}
.modal-card .field{margin-bottom:12px}
.modal-card .status{margin:6px 0 4px}
/* billing: team lines */
.bplan li.team-li .i{color:var(--team)}
.extra-seat{display:flex;gap:12px;align-items:center;justify-content:center;margin:22px auto 0;padding:12px 16px;max-width:640px;border:1px solid var(--team-line);background:var(--team-bg);color:var(--team-700);border-radius:14px;font-size:14px;line-height:1.45}
.extra-seat .i{width:20px;height:20px;flex:none}
@media (max-width:760px){
  .team-card{padding:4px 16px}
  .trow{flex-wrap:wrap;gap:8px 12px}
  .tmain{flex:1 1 calc(100% - 56px)}
  .trow .role{order:3;margin-left:54px}
  .tacts{order:4;width:100%;padding-left:54px}
  .seat-top{flex-direction:column;gap:6px}
  .seat-price{text-align:left}
  #teamPage .pg-head{flex-direction:column}
  #teamPage .pg-head .btn{width:100%}
  .sec-row{flex-wrap:wrap}
  .sec-row>.btn,.sec-acts{width:100%;margin-left:52px;justify-content:flex-start}
  .sec-row>.btn{width:calc(100% - 52px)}
  .sec-acts{width:calc(100% - 52px)}
  .backup-grid code{font-size:14px}
  .inline .input{flex:none;width:100%}
}

/* ================= features-2 ================= */
/* 👍 / 👎 on AI answers */
.m .meta .rate{display:inline-flex;gap:2px;margin-left:4px;padding-left:6px;border-left:1px solid var(--brand-200)}
.rate-btn{width:26px;height:24px;border:0;background:none;border-radius:7px;display:grid;place-items:center;color:var(--faint);cursor:pointer;padding:0}
.rate-btn .i{width:14px!important;height:14px!important}
.rate-btn:hover{background:var(--sunken);color:var(--ink-2)}
.rate-btn.on{background:var(--brand-50);color:var(--brand-700)}
.rate-btn.down.on{background:var(--hot-bg);color:var(--hot-700)}
.improve-box .q{margin:-2px 0 8px;font-size:13px;color:var(--muted)}
.nokb{align-self:flex-start;display:flex;align-items:center;flex-wrap:wrap;gap:6px 8px;margin:4px 0 6px 2px;padding:6px 10px;font-size:12.5px;color:var(--hot-700);background:var(--hot-bg);border:1px solid var(--hot-line);border-radius:10px;max-width:min(520px,92%)}
.nokb .i{width:14px;height:14px;flex:none}
.nokb .teach-link{border:0;background:none;padding:0;font:inherit;font-weight:700;color:var(--hot-700);text-decoration:underline;cursor:pointer}
.nokb.done{color:var(--ok);background:var(--ok-bg);border-color:#BFE6D5}
.event.night .i,.kv .night .i{color:var(--team)}
.badge-night{background:var(--team-bg);color:var(--team-700);border-color:var(--team-line)}
.nv .cnt.soft{background:var(--hot-bg);color:var(--hot-700)}
.more-list .cnt-m{margin-left:auto;font-size:12px;font-weight:700;min-width:22px;height:20px;padding:0 6px;border-radius:999px;display:grid;place-items:center;background:var(--hot-bg);color:var(--hot-700)}
.more-list .cnt-m:not([hidden])+.lockb{margin-left:6px}

/* Unanswered questions */
.un-sum{margin:-8px 2px 14px}
.uq{padding:20px 22px}
.uq-top{display:flex;align-items:flex-start;gap:10px;justify-content:space-between}
.uq-q{font-size:16.5px;line-height:1.4;letter-spacing:-.01em}
.uq-top .badge{flex:none}
.uq-meta{font-size:12.5px;color:var(--muted);margin-top:4px}
.uq-bot{display:flex;gap:8px;margin-top:12px;padding:10px 12px;background:var(--sunken);border-radius:12px;font-size:13.5px;color:var(--ink-2)}
.uq-bot .i{width:15px;height:15px;color:var(--brand-700);margin-top:2px;flex:none}
.uq-teach{margin-top:12px}
.uq-teach textarea{width:100%;min-height:84px;resize:vertical}
.uq-acts{display:flex;gap:8px;flex-wrap:wrap;margin-top:14px}
.uq-acts .i{width:16px;height:16px}
.uq-st{margin:8px 0 0;font-size:13px}
.uq.done{background:var(--ok-bg);border-color:#BFE6D5}
.uq-done{display:flex;gap:10px;align-items:flex-start;color:#0C4A38;font-size:14.5px}
.uq-done .i{color:var(--ok);flex:none}

/* Analytics */
.seg-tabs{display:inline-flex;background:var(--sunken);border:1px solid var(--line);border-radius:12px;padding:3px;gap:2px}
.seg-tabs button{border:0;background:none;font:inherit;font-size:13.5px;font-weight:600;color:var(--muted);padding:7px 12px;border-radius:9px;cursor:pointer}
.seg-tabs button.on{background:var(--surface);color:var(--ink);box-shadow:var(--sh-1)}
.stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:18px}
.stat{background:var(--surface);border:1px solid var(--line);border-radius:16px;padding:16px 18px;box-shadow:var(--sh-1);display:flex;flex-direction:column;gap:2px;position:relative}
.stat .s-ic{position:absolute;right:14px;top:14px;width:32px;height:32px;border-radius:10px;display:grid;place-items:center;background:var(--brand-50);color:var(--brand-700)}
.stat .s-ic .i{width:17px;height:17px}
.stat.lead .s-ic{background:var(--hot-bg);color:var(--hot)}
.stat.warn .s-ic{background:var(--warn-bg);color:var(--warn)}
.stat small{font-size:12.5px;font-weight:600;color:var(--muted)}
.stat b{font-family:var(--display);font-size:30px;letter-spacing:-.03em;line-height:1.15;margin-top:4px}
.stat .sub{font-size:12.5px;color:var(--muted)}
.qlist{margin:0 0 6px;padding:0;list-style:none;counter-reset:q;display:grid;gap:8px}
.qlist li{counter-increment:q;display:flex;align-items:flex-start;gap:10px;font-size:14px;color:var(--ink-2);line-height:1.45}
.qlist li::before{content:counter(q);flex:none;width:22px;height:22px;border-radius:7px;display:grid;place-items:center;font-size:12px;font-weight:700;background:var(--brand-50);color:var(--brand-700)}
.qlist.warn li::before{background:var(--hot-bg);color:var(--hot-700)}
.qlist li span{flex:1;min-width:0}
.qlist li em{font-style:normal;font-size:12px;font-weight:700;color:var(--muted);background:var(--sunken);border-radius:999px;padding:1px 8px;flex:none}
.qlist li.empty{color:var(--muted);align-items:center}
.qlist li.empty::before{display:none}
.qlist li.empty .i{color:var(--ok)}
#analyticsPage .grid2{margin-bottom:18px}
#analyticsPage .linkbtn{margin-top:6px}
.note{font-size:13px;color:var(--warn);background:var(--warn-bg);border-radius:10px;padding:8px 12px;margin:12px 0 0}

/* Switch */
.switch{display:inline-flex;align-items:center;gap:10px;cursor:pointer;font-size:14.5px;font-weight:500;user-select:none}
.switch input{position:absolute;opacity:0;width:1px;height:1px}
.switch .track{width:40px;height:24px;border-radius:999px;background:var(--line-2);position:relative;transition:background .15s;flex:none}
.switch .track::after{content:"";position:absolute;left:3px;top:3px;width:18px;height:18px;border-radius:50%;background:#fff;box-shadow:0 1px 2px rgba(0,0,0,.2);transition:transform .15s}
.switch input:checked+.track{background:var(--brand-600)}
.switch input:checked+.track::after{transform:translateX(16px)}
.switch input:focus-visible+.track{box-shadow:var(--ring)}
.switch input:disabled+.track{opacity:.5}

/* Settings: test alert, business hours */
.test-alert{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:16px;padding-top:14px;border-top:1px solid var(--line);font-size:14px;color:var(--muted);flex-wrap:wrap}
.card-top{display:flex;align-items:center;gap:10px}
.card-top h2{margin-bottom:4px}
.card-top .lockb{margin-left:0}
#hoursCard:not(.locked) .card-top .lockb{display:none}
#hoursCard.locked #hoursBody{opacity:.55;pointer-events:none}
.lock-cta{margin-top:16px}
.lock-cta .btn .i{width:16px;height:16px}
#hoursTz{max-width:340px}
.hours-grid{display:grid;gap:6px;margin-top:6px}
.hrow{display:grid;grid-template-columns:110px 80px 1fr;align-items:center;gap:10px;padding:6px 0;border-top:1px solid var(--line)}
.hrow:first-child{border-top:0}
.hrow b{font-size:14px;font-weight:600}
.hrow .chk{display:flex;align-items:center;gap:6px;font-size:13.5px;color:var(--ink-2)}
.hrow .chk input{width:16px;height:16px;accent-color:var(--brand-700)}
.hrow .times{display:flex;align-items:center;gap:8px;font-size:13.5px;color:var(--muted)}
.hrow .times .input{height:38px;width:126px;padding:0 10px}
.hrow .closed-l{display:none;color:var(--faint);font-size:13.5px}
.hrow.closed .times{display:none}
.hrow.closed .closed-l{display:block}
.hours-now .pill{display:inline-flex;align-items:center;gap:6px;font-size:13px;font-weight:600;padding:4px 10px;border-radius:999px}
.hours-now .pill .i{width:14px;height:14px}
.hours-now .pill.open{background:var(--ok-bg);color:var(--ok)}
.hours-now .pill.closed{background:var(--team-bg);color:var(--team-700)}

/* Leads: status + export */
.head-btns{display:flex;gap:8px;flex-wrap:wrap}
.head-btns .btn .i{width:16px;height:16px}
.lead-tabs{margin:0 0 12px;display:flex;gap:6px;flex-wrap:wrap}
.lead-badges{display:flex;gap:6px;flex-wrap:wrap;margin-top:6px}
.lead-badges .badge .i{width:12px;height:12px}
.lead-status{height:34px;border-radius:9px;border:1px solid var(--line-2);background:var(--surface);font:inherit;font-size:13.5px;font-weight:600;padding:0 28px 0 10px;cursor:pointer;color:var(--ink);appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23667085' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 9px center}
.lead-status.s-new{background-color:var(--brand-50);border-color:var(--brand-200);color:var(--brand-800)}
.lead-status.s-contacted{background-color:var(--team-bg);border-color:var(--team-line);color:var(--team-700)}
.lead-status.s-won{background-color:var(--ok-bg);border-color:#9FD8BF;color:var(--ok)}
.lead-status.s-lost{background-color:var(--sunken);border-color:var(--line);color:var(--muted)}

/* Saved replies */
.sr-wrap{position:relative}
#savedRepliesBtn{height:30px;padding:0 8px;font-size:13px;color:var(--ink-2)}
#savedRepliesBtn .i{width:15px;height:15px}
#savedRepliesBtn .lockb{margin-left:4px}
.sr-pop{position:absolute;left:0;bottom:calc(100% + 8px);width:min(360px,calc(100vw - 32px));background:var(--surface);border:1px solid var(--line);border-radius:14px;box-shadow:var(--sh-3);z-index:40;overflow:hidden}
.sr-head{padding:12px 14px 8px;display:flex;flex-direction:column}
.sr-head b{font-size:14px}
.sr-head small{font-size:12px;color:var(--muted)}
.sr-list{max-height:260px;overflow:auto;padding:0 6px}
.sr-item{display:flex;align-items:flex-start;border-radius:10px}
.sr-item:hover{background:var(--sunken)}
.sr-use{flex:1;min-width:0;text-align:left;border:0;background:none;font:inherit;padding:8px;cursor:pointer;display:flex;flex-direction:column;gap:1px}
.sr-use b{font-size:13.5px}
.sr-use span{font-size:12.5px;color:var(--muted);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.sr-del{border:0;background:none;color:var(--faint);padding:8px;cursor:pointer;border-radius:8px}
.sr-del:hover{color:var(--err)}
.sr-empty{margin:4px 8px 8px;font-size:13px;color:var(--muted)}
.sr-foot{padding:10px 14px;border-top:1px solid var(--line)}
.sr-foot .btn .i{width:15px;height:15px}

@media (max-width:900px){
  .stats{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  .stat{padding:14px}
  .stat b{font-size:26px}
}
@media (max-width:640px){
  .hrow{grid-template-columns:1fr auto;row-gap:6px}
  .hrow .times,.hrow .closed-l{grid-column:1 / -1}
  .hrow .times .input{width:auto;flex:1}
  .lead-actions{flex-wrap:wrap}
  .test-alert{flex-direction:column;align-items:flex-start}
  #analyticsPage .pg-head{align-items:flex-start}
  .uq{padding:16px}
  .uq-top{flex-direction:column;gap:6px}
  #savedRepliesBtn span:not(.lockb){display:none}
}
.composer .tools #savedRepliesBtn{margin-left:0;background:transparent;color:var(--ink-2);box-shadow:none}
.composer .tools #savedRepliesBtn:hover{background:var(--sunken)}
.composer.human .tools #savedRepliesBtn{background:transparent;color:var(--team-700)}
.composer.human .tools #savedRepliesBtn:hover{background:var(--team-bg)}
.composer .tools .sr-pop .btn{margin-left:0;background:var(--surface);color:var(--ink);border-color:var(--line-2)}
.composer .tools .sr-pop .btn:hover{background:var(--sunken)}
@media (max-width:640px){
  .lead-tabs{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;-webkit-overflow-scrolling:touch}
  .lead-tabs::-webkit-scrollbar{display:none}
  .lead-tabs .tab{flex:none}
  .lead-item .lead-actions{display:grid;grid-template-columns:1fr 1fr auto;gap:8px;grid-column:1 / -1}
  .lead-item .lead-actions .btn{height:36px;padding:0 10px;font-size:13.5px}
  .lead-item .lead-status{width:100%}
}

/* launch-1: website import progress */
.imp{margin-top:14px;padding:12px 14px;border:1px solid var(--line);border-radius:12px;background:var(--sunken)}
.imp-top{display:flex;justify-content:space-between;gap:10px;align-items:baseline;font-size:13.5px}
.imp-top span{color:var(--muted);font-size:12.5px;white-space:nowrap}
.imp-bar{height:8px;border-radius:99px;background:var(--line);overflow:hidden;margin:9px 0 7px}
.imp-bar i{display:block;height:100%;width:0;background:var(--brand-500);border-radius:99px;transition:width .6s ease}
.imp small{display:block;color:var(--muted);font-size:12.5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.imp.done{background:var(--brand-50);border-color:var(--brand-200)}
.imp.done small{white-space:normal;color:var(--ink-2)}
.imp.failed{background:#FDECEC;border-color:#F5C2C2}
.imp.failed .imp-bar{display:none}
.imp small.imp-hint{white-space:normal;margin-top:3px}
.imp-more{margin-top:10px}
.imp-top b{min-width:0}
.imp.failed small{white-space:normal;color:#9B2C2C}

/* launch-1: sign-up business type + Q&A editor */
label .opt{font-weight:400;color:var(--faint);font-size:12px}
select.input{appearance:auto;cursor:pointer}
textarea.input.faq-ed{width:100%;height:340px;min-height:200px;font:13.5px/1.55 Inter,system-ui,sans-serif;resize:vertical;padding:12px 14px}
.faq-meta{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:10px 0 12px;font-size:13px;color:var(--muted)}
.faq-meta .pill{display:inline-flex;align-items:center;gap:5px;padding:3px 10px;border-radius:99px;font-weight:600;font-size:12px}
.faq-meta .pill.ok{background:var(--brand-50);color:var(--brand-700)}
.faq-meta .pill.todo{background:#FDF5E3;color:#7A4F0E}
.faq-row{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-top:12px}
.faq-row select{max-width:240px}

/* launch-1: is my chat live? */
.live-now{display:flex;align-items:flex-start;gap:10px;padding:12px 14px;border-radius:12px;background:var(--sunken);border:1px solid var(--line);font-size:14px;color:var(--ink-2);line-height:1.45}
.live-dot{flex:0 0 10px;height:10px;border-radius:50%;background:var(--faint);margin-top:5px}
.live-now.on{background:var(--brand-50);border-color:var(--brand-200)}
.live-now.on .live-dot{background:var(--brand-500);box-shadow:0 0 0 4px rgba(27,143,105,.18)}
.live-now.old .live-dot{background:#B7791F}
.add-email-strip{padding:10px 16px;border-top:1px solid #F1DDB0}
.add-email-strip a{color:var(--brand-700);font-weight:600}
@media (max-width:760px){textarea.input.faq-ed{height:300px}}

/* ===== help-1: sidebar Help link + first-run checklist ===== */
.side .help-nv{margin-top:10px}
.side .help-nv .help-q{margin-left:auto;width:20px;height:20px;border-radius:50%;display:grid;place-items:center;font-size:12px;font-weight:700;color:var(--brand-700);background:var(--brand-50);border:1px solid var(--brand-200)}
.setup-card{margin:12px 14px 4px;padding:14px 14px 12px;border-radius:16px;background:var(--surface);border:1px solid var(--brand-200);box-shadow:var(--sh-1)}
.setup-top{display:flex;align-items:flex-start;justify-content:space-between;gap:8px}
.setup-top b{display:block;font-family:var(--display);font-size:15px;letter-spacing:-.012em}
.setup-top small{display:block;font-size:12.5px;color:var(--muted);margin-top:1px}
.setup-x{width:28px;height:28px;border-radius:8px;border:0;background:none;color:var(--muted);display:grid;place-items:center;cursor:pointer;flex:none}
.setup-x:hover{background:var(--sunken);color:var(--ink)}
.setup-bar{height:5px;border-radius:999px;background:var(--sunken);margin:10px 0 8px;overflow:hidden}
.setup-bar span{display:block;height:100%;width:0;background:var(--brand-500);border-radius:999px;transition:width .3s}
.setup-list{list-style:none;margin:0;padding:0}
.setup-list li{display:flex;align-items:center;gap:4px}
.setup-list button{flex:1;min-width:0;display:flex;align-items:center;gap:10px;padding:7px 6px;border:0;background:none;border-radius:10px;text-align:left;cursor:pointer;font:inherit;font-size:13.5px;font-weight:550;color:var(--ink)}
.setup-list button:hover{background:var(--sunken)}
.setup-list button > .i{color:var(--muted);margin-left:auto}
.setup-list .sc{width:20px;height:20px;border-radius:50%;border:1.5px solid var(--line-2);display:grid;place-items:center;flex:none;color:#fff}
.setup-list .sc .i{width:12px;height:12px;stroke-width:3}
.setup-list .sl{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.setup-list li.done .sc{background:var(--brand-500);border-color:var(--brand-500)}
.setup-list li.done .sl{color:var(--muted)}
.setup-list li.done button{cursor:default}
.setup-list li.done button:hover{background:none}
.setup-list .sd{margin-left:auto;font-size:11.5px;font-weight:700;color:var(--brand-700)}
.setup-list .sh{width:24px;height:24px;flex:none;border-radius:50%;display:grid;place-items:center;font-size:12px;font-weight:700;color:var(--muted);border:1px solid var(--line)}
.setup-list .sh:hover{color:var(--brand-700);border-color:var(--brand-200);background:var(--brand-50)}
.setup-guide{display:inline-block;margin:6px 6px 0;font-size:13px;font-weight:600;color:var(--brand-700)}
.setup-guide:hover{text-decoration:underline}
@media (max-width:760px){.setup-card{margin:12px 14px 6px}.setup-list button{font-size:14.5px;padding:9px 6px}}
.guide-link{display:inline-block;margin-top:12px;font-size:13.5px;font-weight:600;color:var(--brand-700)}
.guide-link:hover{text-decoration:underline}

/* ===== pricing-1: Free plan chat limit + price lists from lib/plans.js ===== */
.usage-note{margin:12px 14px 4px;display:flex;gap:9px;align-items:flex-start;padding:11px 13px;border-radius:14px;font-size:13.5px;line-height:1.45;background:var(--sunken);color:var(--ink-2);border:1px solid var(--line)}
.usage-note .i{width:17px;height:17px;margin-top:1px;flex:none;color:var(--muted)}
.usage-note.full{background:var(--warn-bg);color:#6B4710;border-color:#F1DDB0}
.usage-note.full .i{color:var(--warn)}
.usage-note .linkbtn{margin-left:4px;white-space:nowrap}
.early-banner{display:flex;gap:10px;align-items:flex-start;background:var(--brand-50);border:1px solid var(--brand-200);color:var(--brand-900);border-radius:16px;padding:14px 16px;margin:0 0 18px;max-width:720px;font-size:14.5px;line-height:1.5}
.early-banner .i{width:20px;height:20px;flex:none;color:var(--brand-700);margin-top:1px}
.usage-meter{background:var(--surface);border:1px solid var(--line);border-radius:16px;padding:16px 18px;margin:0 0 22px;box-shadow:var(--sh-1);max-width:720px}
.usage-meter .um-top{display:flex;justify-content:space-between;align-items:baseline;gap:6px 14px;flex-wrap:wrap}
.usage-meter .um-top b{font-size:15px}
.usage-meter .um-top small{color:var(--muted);font-size:13px}
.usage-meter .um-bar{height:8px;border-radius:999px;background:var(--sunken);margin:10px 0 10px;overflow:hidden}
.usage-meter .um-bar span{display:block;height:100%;border-radius:999px;background:var(--brand-600);transition:width .3s}
.usage-meter.near .um-bar span{background:var(--warn)}
.usage-meter.full .um-bar span{background:var(--warn)}
.usage-meter p{margin:0;font-size:13.5px;line-height:1.5;color:var(--ink-2)}
.usage-meter.early{display:flex;gap:10px;align-items:flex-start;background:var(--ok-bg);border-color:#BFE6D3;color:#0B5F44;font-size:14px;line-height:1.5}
.usage-meter.early .i{width:18px;height:18px;margin-top:2px;flex:none}
.event.limit{max-width:min(560px,92%);border-radius:14px;text-align:left;line-height:1.4;background:var(--warn-bg);border-color:#F1DDB0;color:#6B4710}
.event.limit .i{color:var(--warn)}
.bplan li.later{color:var(--faint)}
.bplan li.later .i{color:var(--line-2)}
.bplan li .soon{display:inline-flex;align-items:center;height:19px;padding:0 7px;margin-left:6px;border-radius:999px;font-size:10.5px;font-weight:700;background:var(--sunken);color:var(--muted);border:1px solid var(--line);white-space:nowrap}
/* Leads: tap a number to call, tap an email to write (pricing-1 polish) */
.lead-email{display:flex;flex-wrap:wrap;gap:4px 14px;word-break:normal}
.lead-link{display:inline-flex;align-items:center;gap:5px;color:var(--brand-700);font-weight:600;text-decoration:none;min-height:28px;overflow-wrap:anywhere}
.lead-link:hover{text-decoration:underline}
.lead-link .i{color:var(--brand-600);flex:none}
.lead-actions .call-btn{display:inline-flex;align-items:center;gap:6px;text-decoration:none}
@media (max-width:760px){
  .lead-item .lead-actions:has(.call-btn){grid-template-columns:1fr 1fr}
  .lead-item .lead-actions .call-btn{justify-content:center;order:-2}
  .lead-item .lead-actions:has(.call-btn) .secondary-btn{order:-1}
}

/* polish-1: a plan limitation shown as a small note, not a ticked feature */
.bplan .plan-note{display:flex;gap:6px;align-items:flex-start;margin:12px 0 0;font-size:12.5px;line-height:1.45;color:var(--muted)}
.bplan .plan-note .i{width:14px;height:14px;flex:none;margin-top:2px;color:var(--faint)}

/* polish-1: Q&A editor */
.faq-list{display:grid;gap:8px;margin:4px 0 4px}
.faq-item{display:flex;gap:12px;align-items:flex-start;border:1px solid var(--line);border-radius:12px;padding:12px 14px;background:var(--surface)}
.faq-item.open{border-color:#F1DDB0;background:#FFFBF2}
.faq-body{flex:1;min-width:0}
.faq-q{font-weight:650;color:var(--ink);font-size:14px;line-height:1.45;display:flex;flex-wrap:wrap;gap:6px;align-items:center;word-break:break-word}
.faq-q .pill{display:inline-flex;align-items:center;padding:1px 8px;border-radius:99px;font-weight:600;font-size:11.5px}
.faq-q .pill.todo{background:#FDF5E3;color:#7A4F0E}
.faq-notelabel{font-size:11.5px;font-weight:700;text-transform:uppercase;letter-spacing:.04em;color:var(--muted)}
.faq-a{margin-top:3px;font-size:13.5px;line-height:1.5;color:var(--ink-2);white-space:pre-wrap;word-break:break-word}
.faq-a i{color:var(--faint)}
.faq-acts{display:flex;gap:4px;flex:none}
.faq-acts .btn{height:30px;padding:0 9px;font-size:12.5px;gap:5px}
.faq-acts .i{width:14px;height:14px}
.faq-item.editing{display:block;border-color:var(--brand-200);box-shadow:0 0 0 3px var(--brand-50)}
.faq-item.editing label{display:block;font-size:13px;font-weight:600;color:var(--ink-2);margin:0 0 5px}
.faq-item.editing .input{width:100%;margin-bottom:10px}
.faq-item.editing textarea.input{min-height:84px;resize:vertical;font:13.5px/1.5 Inter,system-ui,sans-serif;padding:10px 12px}
.faq-item.editing .faq-row{margin-top:2px}
.faq-textbtn{margin-left:auto;font-size:13px}
.faq-textbox{margin-top:4px}
@media (max-width:760px){
  .faq-item{flex-direction:column;gap:8px}
  .faq-acts{align-self:flex-end}
  .faq-textbtn{margin-left:0}
  #faqListActions .btn,#faqListActions select{flex:1 1 100%;max-width:none}
}

/* polish-1: change sign-in email panel (sits under the Email row) */
.chg-email{margin:2px 0 14px 52px;padding:14px 16px;border:1px solid var(--line);border-radius:12px;background:var(--sunken)}
.chg-email .desc{font-size:13.5px;line-height:1.5}
.chg-done{margin:0 0 12px 52px}
@media (max-width:760px){ .chg-email,.chg-done{margin-left:0} .chg-email .grid2{grid-template-columns:1fr} }

/* widget-1: logo, bot name & position */
.brandbox{border:1px solid var(--line);border-radius:14px;padding:14px 14px 4px;margin:4px 0 18px;background:var(--surface)}
.brandbox .brand-top{display:flex;align-items:center;gap:8px;margin-bottom:12px}
.brandbox .brand-top b{font-size:14px}
#brandBox:not(.locked) .brand-top .lockb{display:none}
#brandBox.locked #brandBody{opacity:.55;pointer-events:none}
#brandBox .lock-cta{margin:4px 0 12px}
#brandBox .lock-cta .btn{white-space:normal;text-align:left;max-width:100%}
.brandbox,.brandbox .field{min-width:0}
.bhint{font-size:12.5px;color:var(--muted,#667085);margin:6px 0 0;line-height:1.45}
.vh{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.logorow{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.logo-pv{width:44px;height:44px;border-radius:50%;background:var(--pv,#0F5D46);color:var(--pvi,#fff);display:grid;place-items:center;overflow:hidden;flex:none;box-shadow:0 0 0 1px var(--line-2)}
.logo-pv img,.wprev .p-head .a img{width:100%;height:100%;object-fit:cover;display:block}
.logo-pv.has-logo,.wprev .p-head .a.has-logo{background:#fff}
.logo-pv .i{width:20px;height:20px}
.wprev .p-head .a{overflow:hidden}
#logoPick{cursor:pointer}
.logorow .btn{display:inline-flex;align-items:center;margin:0}
#logoFile:focus-visible + #logoRemove,#logoPick:focus-within{outline:2px solid var(--brand-600,#0F5D46)}
.posrow{display:flex;gap:10px;flex-wrap:wrap}
.posopt{display:flex!important;align-items:center;gap:8px;border:1px solid var(--line-2);border-radius:12px;padding:10px 14px;margin:0!important;font-weight:500!important;cursor:pointer;min-height:44px}
.posopt input{accent-color:var(--brand-600,#0F5D46);width:18px;height:18px;margin:0}
.posopt:has(input:checked){border-color:var(--brand-600,#0F5D46);background:var(--brand-50,#EEF8F3)}
.wprev.left{align-items:flex-start}

/* build-3: "Email the code" to whoever runs the website */
.sendcode{margin-top:14px;padding:12px 14px;border:1px dashed var(--line-2);border-radius:12px;background:var(--sunken)}
.sendcode label{display:block;font-size:13.5px;color:var(--ink-2);margin-bottom:8px;line-height:1.45}
.sendcode-row{display:flex;gap:8px;flex-wrap:wrap}
.sendcode-row .input{flex:1 1 180px;min-width:0}
.sendcode .status{margin-top:8px}

/* sidebar-scroll-1 (Oct 11): on a short window the sidebar scrolls on its own, so every
   item down to Log out can be reached. The page itself stays put. */
.side{height:100vh;height:100dvh;min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:var(--line-2) transparent;padding-bottom:24px}
.side>*{flex-shrink:0}
/* sidebar-scroll-1: every dialog stays fully on screen in a short window. The dim layer
   scrolls if it must, and the card never grows taller than the window (its inside scrolls). */
.modal{overflow-y:auto;overscroll-behavior:contain}
.modal-card{max-height:90vh;max-height:90dvh;overflow-y:auto;margin:auto;flex-shrink:0;position:relative;z-index:1}
@media (max-height:640px){
  .modal{padding:16px}
  .up-card{padding:20px 22px 16px}
  .up-card .up-ic{width:44px;height:44px;border-radius:14px;margin-bottom:8px}
  .up-card .up-ic .i{width:22px;height:22px}
  .up-card h3{font-size:19px;margin:8px 0 4px}
  .up-card p{margin-bottom:8px}
}
/* sidebar-scroll-1: in a short window the empty reply box (no chat open) no longer covers
   the "No conversation open" message and its Test your bot button */
@media (max-height:600px){ .composer.idle{display:none} }
/* sidebar-scroll-1: the Free chat limit banner has a real Upgrade button (40 of 50 and 50 of 50) */
.usage-note{align-items:center}
.usage-note .un-text{flex:1;min-width:0}
.usage-note .un-btn{flex:none}
.usage-note:not(.full){background:var(--hot-bg);border-color:var(--hot-line);color:#7A2E06}
.usage-note:not(.full) .i{color:var(--hot)}
.usage-note.full{background:var(--err-bg);border-color:#F5C2C2;color:#7F1D1D}
.usage-note.full .i{color:var(--err)}
@media (max-width:420px){ .usage-note{flex-wrap:wrap} .usage-note .un-btn{width:100%} }
/* sidebar-scroll-1: on a short window the whole inbox column scrolls (setup checklist, chat limit
   banner and its Upgrade button included), instead of squeezing the chat list to nothing */
@media (min-width:761px) and (max-height:700px){
  .list{overflow-y:auto;min-height:0;overscroll-behavior:contain}
  .list .convs{flex:0 0 auto;overflow:visible;min-height:160px}
}

/* plans-2: five plans on Plans & billing, trial notice, inbox locked at the chat limit */
.bplans{grid-template-columns:repeat(5,minmax(0,1fr));gap:12px}
.bplan{padding:18px 14px}
.bplan .price b{font-size:27px}
@media (max-width:1480px){ .bplans{grid-template-columns:repeat(3,minmax(0,1fr))} .bplan{padding:20px} .bplan .price b{font-size:30px} }
@media (max-width:1180px){ .bplans{grid-template-columns:1fr 1fr} }
@media (max-width:760px){ .bplans{grid-template-columns:1fr} }
.trial-pill{display:inline-flex;align-items:center;gap:5px;margin-top:6px;padding:3px 9px;border-radius:999px;background:var(--brand-50);border:1px solid var(--brand-200);color:var(--brand-800);font-size:12px;font-weight:650;white-space:nowrap}
.trial-pill .i{width:13px;height:13px}
.trial-box{display:flex;gap:12px;align-items:flex-start;padding:14px 16px;border-radius:14px;background:var(--brand-50);border:1px solid var(--brand-200);color:var(--ink-2);margin:0 0 14px;font-size:14px;line-height:1.5}
.trial-box > .i{color:var(--brand-700);flex:none;margin-top:2px}
.trial-box b{color:var(--ink)}
.trial-box .tb-days{display:inline-block;font-weight:750;color:var(--brand-800)}
.trial-box.ending{background:#FDF5E3;border-color:#F1D9A6}
.trial-box.ending > .i{color:#B9470A}
.trial-box.ended{background:var(--sunken);border-color:var(--line)}
.trial-box a{color:var(--brand-700);font-weight:650}
.reply-locked{display:flex;gap:10px;align-items:center;flex-wrap:wrap;padding:12px 14px;border-radius:12px;background:#FDF5E3;border:1px solid #F1D9A6;color:#6B4710;font-size:14px;line-height:1.45}
.reply-locked .i{color:#B9470A;flex:none}
.reply-locked span{flex:1 1 200px}
#billingPage .pg-in{max-width:1180px}
.bplan .plan-btn{white-space:normal;height:auto;min-height:40px;line-height:1.25;padding-top:8px;padding-bottom:8px}

/* owner-1: client ID in Settings */
.client-id{display:inline-flex;align-items:center;height:40px;padding:0 14px;border-radius:var(--r-md);background:var(--sunken);border:1px solid var(--line);font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:16px;font-weight:650;letter-spacing:.02em;color:var(--ink)}
.side .nv.owner-only .i{color:var(--brand-700)}

/* earn-1: Invite & earn card in Settings */
.invite-card{background:linear-gradient(180deg,var(--brand-50) 0,var(--surface) 120px);border-color:var(--brand-200)}
.invite-row{flex-wrap:nowrap}
.invite-link{flex:1;min-width:0;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:14.5px;font-weight:600;color:var(--ink);background:var(--surface)}
.invite-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:18px 0 6px}
.invite-stats div{background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:12px 14px;display:flex;flex-direction:column;gap:2px}
.invite-stats b{font-size:22px;letter-spacing:-.02em;color:var(--ink)}
.invite-mail{display:flex;margin:14px 0 4px}
.invite-stats span{font-size:12.5px;color:var(--muted);line-height:1.3}
.invite-list{list-style:none;margin:12px 0 0;padding:0;border-top:1px solid var(--line)}
.invite-list li{display:flex;align-items:center;gap:10px;padding:10px 0;border-bottom:1px solid var(--line);font-size:14.5px}
.invite-list .nm{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:600}
.invite-list .tag{flex:none;font-size:12px;font-weight:650;padding:3px 9px;border-radius:999px;border:1px solid var(--line);background:var(--sunken);color:var(--ink-2)}
.invite-list .tag.ok{background:var(--ok-bg,#E8F7F0);color:var(--ok,#11734B);border-color:#BFE6D5}
.invite-list .tag.wait{background:var(--brand-50);color:var(--brand-700);border-color:var(--brand-200)}
.invite-list .tag.off{color:var(--muted)}
.invite-how{margin:14px 0 0;line-height:1.55}
@media (max-width:520px){
  .invite-row{flex-direction:column;align-items:stretch}
  .invite-row .btn{width:100%}
  .invite-link{font-size:13px;padding-left:12px;padding-right:12px}
  .invite-stats{gap:8px}
  .invite-stats div{padding:10px}
  .invite-stats b{font-size:19px}
}

/* earn-2: Refer & earn */
.badge-ref{background:#FCEEF3;color:#9E1F52;border-color:#F4C6D7}
.kv .ref .i{color:#C2336B}
.re-grid{margin-bottom:18px}
.re-switch{margin:4px 0 16px}
#reSettingsCard .fine{display:block;margin:12px 0 6px}
#reSettingsCard .re-honest{margin:14px 0 4px;padding:10px 12px;background:var(--sunken);border-radius:10px;color:var(--ink-2,var(--muted))}
.re-steps{margin:6px 0 12px;padding-left:20px;display:grid;gap:10px;font-size:14.5px;line-height:1.5}
.re-steps b{font-weight:650}
.re-list-head{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:12px}
.re-list-head h2{margin:0}
.re-list{display:flex;flex-direction:column}
.re-item{display:grid;grid-template-columns:40px minmax(0,1fr) auto;gap:14px;align-items:start;padding:14px 4px;border-top:1px solid var(--line)}
.re-item:first-child{border-top:0}
.re-item.is-new{background:linear-gradient(90deg,#FDF4F8,transparent 60%);border-radius:12px}
.re-item .av{width:40px;height:40px;border-radius:50%;display:grid;place-items:center;color:#fff;font-weight:700;font-size:14px}
.re-name{font-weight:650;font-size:15.5px;display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.re-sub{font-size:13px;color:var(--muted);margin-top:3px}
.re-by{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:6px;font-size:13.5px}
.re-by>.i{color:#C2336B}
.re-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.lead-status.s-rewarded{background-color:#FCEEF3;border-color:#F4C6D7;color:#9E1F52}
@media (max-width:760px){
  .re-item{grid-template-columns:36px minmax(0,1fr)}
  .re-item .av{width:36px;height:36px}
  .re-actions{grid-column:1 / -1;justify-content:flex-start}
}

/* kb-1: knowledge files + website refresh */
.site-fresh{margin-top:14px;padding:12px 14px;border:1px solid var(--line);border-radius:12px;background:var(--sunken)}
.sf-row{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.sf-ic{width:34px;height:34px;border-radius:10px;background:var(--brand-50);color:var(--brand-700);display:grid;place-items:center;flex:none}
.sf-ic .i{width:17px;height:17px}
.sf-txt{flex:1;min-width:180px}
.sf-txt b{display:block;font-size:14px;overflow-wrap:anywhere}
.sf-txt small{display:block;color:var(--muted);font-size:12.5px;margin-top:2px}
.sf-warn{display:flex;gap:8px;align-items:flex-start;margin-top:10px;padding:9px 11px;border-radius:10px;background:#FFF6E5;border:1px solid #F3DDB0;color:#7A4B00;font-size:13px;line-height:1.4}
.sf-warn .i{width:16px;height:16px;flex:none;margin-top:1px}
.kb-files-row{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.kb-files-row .meta{color:var(--muted);font-size:13px}
.kb-files{margin-top:12px}
.kb-files .kb-empty{padding:8px 0;color:var(--muted);font-size:13.5px}
.kb-file .kb-ok{display:flex;align-items:center;gap:5px;color:var(--ok, #1F7A4D);font-size:12.5px;font-weight:600;margin-top:3px}
.kb-file .kb-ok .i{width:14px;height:14px}
.sf-warn[hidden],.site-fresh[hidden]{display:none}

/* insights-1: Insights page (charts from real counts; empty sections are hidden) */
#analyticsPage .stats.n1{grid-template-columns:minmax(0,1fr)}
#analyticsPage .stats.n2{grid-template-columns:repeat(2,minmax(0,1fr))}
#analyticsPage .stats.n3{grid-template-columns:repeat(3,minmax(0,1fr))}
#analyticsPage .stats.n4{grid-template-columns:repeat(4,minmax(0,1fr))}
#analyticsPage .stats.n5{grid-template-columns:repeat(5,minmax(0,1fr))}
#analyticsPage .stats.n1 .stat{max-width:340px}
.in-head{display:flex;align-items:baseline;justify-content:space-between;gap:12px;flex-wrap:wrap}
.in-head h2{margin:0}
.in-head .desc{margin:0}
.in-bars{display:flex;align-items:flex-end;gap:3px;height:148px;margin-top:18px;padding-bottom:1px;border-bottom:1px solid var(--line)}
.in-bar{flex:1 1 0;min-width:0;height:100%;display:flex;align-items:flex-end;cursor:default}
.in-bar i{display:block;width:100%;border-radius:5px 5px 2px 2px;background:var(--brand-200);transition:height .45s ease}
.in-bar.peak i{background:var(--brand-700)}
.in-bar:hover i{background:var(--brand-500)}
.in-bar.zero i{height:3px!important;background:var(--sunken);border-radius:2px}
.in-hbars{height:96px;gap:2px}
.in-axis{display:flex;justify-content:space-between;margin-top:8px;font-size:12px;color:var(--muted)}
.in-big{display:flex;align-items:baseline;gap:10px;margin:6px 0 10px}
.in-big b{font-family:var(--display);font-size:44px;letter-spacing:-.03em;line-height:1}
.in-big span{color:var(--muted);font-size:14px}
.in-unans li{align-items:center}
.in-unans li span em{margin-left:4px}
.in-teach{flex:none}
.in-empty{text-align:center;padding:40px 24px}
.in-empty-ic{width:52px;height:52px;margin:0 auto 14px;border-radius:16px;display:grid;place-items:center;background:var(--brand-50);color:var(--brand-700)}
.in-empty-ic .i{width:24px;height:24px}
.in-empty h2{justify-content:center}
.in-empty .desc{max-width:460px;margin:6px auto 18px}
.in-empty-act{display:flex;gap:10px;justify-content:center;flex-wrap:wrap}
@media (max-width:980px){ #analyticsPage .stats.n4,#analyticsPage .stats.n5{grid-template-columns:repeat(2,minmax(0,1fr))} #analyticsPage .stats.n3{grid-template-columns:repeat(3,minmax(0,1fr))} }
@media (max-width:640px){
  #analyticsPage .stats.n3,#analyticsPage .stats.n4,#analyticsPage .stats.n5{grid-template-columns:repeat(2,minmax(0,1fr))}
  #analyticsPage .stats.n1 .stat{max-width:none}
  .in-bars{height:120px;gap:2px}
  .in-hbars{height:80px;gap:1px}
  .in-bar i{border-radius:3px 3px 1px 1px}
  .in-unans li{flex-wrap:wrap}
  .in-unans li .in-teach{margin-left:32px}
  .in-empty{padding:30px 18px}
  .in-empty-act .btn{width:100%}
}

.in-split{display:flex;gap:3px;height:14px;border-radius:999px;overflow:hidden;margin:14px 0 14px;background:var(--sunken)}
.in-split i{display:block;min-width:6px}
.in-split i.ai{background:var(--brand-700)}
.in-split i.team{background:var(--team,#5B5BD6)}
.in-legend{list-style:none;margin:0;padding:0;display:grid;gap:8px}
.in-legend li{display:flex;align-items:center;gap:9px;font-size:14px;color:var(--ink-2)}
.in-legend li b{margin-left:auto;font-weight:700;color:var(--ink)}
.in-legend .dot{width:10px;height:10px;border-radius:3px;flex:none}
.in-legend .dot.ai{background:var(--brand-700)}
.in-legend .dot.team{background:var(--team,#5B5BD6)}
.in-legend .dot.clock{background:var(--line-2,#D9D3C7)}

/* referral-tracking: rewards owed ledger (Oct 13, 2026) */
.re-ledger-card{margin:0 0 16px}
.re-ledger-sum{display:flex;gap:12px;flex-wrap:wrap;margin:10px 0 12px}
.re-ledger-sum:empty{display:none}
.re-ledger-sum>div{flex:1 1 120px;background:#F8F7F4;border:1px solid var(--line,#EAECF0);border-radius:12px;padding:10px 12px}
.re-ledger-sum small{display:block;color:#667085;font-size:12.5px}
.re-ledger-sum b{font-size:20px}
.re-ledger-sum .due{background:#ECFDF3;border-color:#ABEFC6}
.re-led-row{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:10px;align-items:center;padding:10px 0;border-top:1px solid var(--line,#EAECF0)}
.re-led-who{min-width:0;display:flex;flex-direction:column}
.re-led-who .fine{overflow-wrap:anywhere}
.re-led-amt{display:flex;flex-direction:column;align-items:flex-end;white-space:nowrap}
.re-sub-h{font-size:14px;margin:16px 0 6px}
.re-ppl-row{display:grid;grid-template-columns:minmax(0,2fr) repeat(5,minmax(0,1fr));gap:8px;padding:8px 0;border-top:1px solid var(--line,#EAECF0);font-size:13.5px}
.re-ppl-h{color:#667085;font-size:12.5px;border-top:0}
.re-ppl-name{overflow-wrap:anywhere;font-weight:600}
.badge-cust{display:inline-flex;align-items:center;gap:4px;background:#ECFDF3;color:#067647;border-radius:999px;padding:3px 9px;font-size:12.5px;font-weight:600;white-space:nowrap}
.re-rule{margin:6px 0 4px}
.re-rule-row{display:flex;flex-wrap:wrap;gap:8px}
.re-rule-row .input{flex:1 1 160px;min-width:0}
.re-rule-row [hidden]{display:none}
.re-val-l{display:flex;flex-direction:column;gap:4px;width:100%}
@media (max-width:640px){
  .re-led-row{grid-template-columns:minmax(0,1fr) auto}
  .re-led-act{grid-column:1 / -1}
  .re-led-act .btn{width:100%}
  .re-ppl-h{display:none}
  .re-ppl-row{grid-template-columns:repeat(5,minmax(0,1fr))}
  .re-ppl-name{grid-column:1 / -1}
  .re-ppl-row span[data-l]::before{content:attr(data-l);display:block;color:#667085;font-size:11.5px}
}
.cal-note:empty{display:none}
