/* =====================================================================
   AVERCENTRIS — SHARED STYLESHEET
   Consolidated from: avercentris-ops-hub.html, avercentris-knowledge-base.html, avercentris-workflow-builder.html, avercentris-dialog.html
   Structure:
     1. SHARED — identical across 2+ pages, safe to use anywhere
     2. PAGE-SPECIFIC — only used on one page, kept unscoped (no collision risk)
     3. PAGE-SCOPED OVERRIDES — same selector name means something different per
        page (e.g. .cards, .panel, .layout-equivalent). <body> carries no
        class or id (see header.php) — each page instead wraps its own
        content in a single top-level <div> right after the header/subnav
        include, carrying one of these classes:
     <div class="pageOpsHub">     (Operations Hub)
     <div class="pageKb">         (Knowledge Base)
     <div class="pageDialog">     (Conversations)
   Workflow Builder is the one exception: its one page-level rule
   (overflow:hidden/height:100vh) has to live above <body>, so it's set
   via <html class="page-workflow"> instead (header.php's $htmlClass) —
   see the html.page-workflow rule further down.
   ===================================================================== */

/* ============ 1. SHARED ============ */
:root{ --navy:#1C2B39; --graphite:#2A3540; --steel:#3D6E8C; --cyan:#5FC2E8; --bg:#F3F5F6; --panel:#FFFFFF; --border:#E1E6EA; --text:#1C2B39; --muted:#6B7580; --good:#2E7D46; --goodBg:#E7F4EC; --bad:#C0392B; --badBg:#FBEAE8; --warn:#B8860B; --warnBg:#FBF3DF; --neutralBg:#EEF1F3; --trigger:#6C4CE0; --ai:#3D6E8C; --logic:#B8860B; --action:#2E7D46; }
body{ background:var(--bg); font-family:'Inter',sans-serif; color:var(--text); font-size:13.5px; }
*{ box-sizing:border-box; margin:0; padding:0; }
body[data-theme="dark"]{ --bg:#10161C; --panel:#1B2530; --border:#2A3642; --text:#E8EDF0; --muted:#8B98A5; --neutralBg:#232E3A; --goodBg:rgba(46,125,70,.18); --badBg:rgba(192,57,43,.18); --warnBg:rgba(184,134,11,.18); }
.topbar{ background:var(--navy); color:#fff; padding:0 24px; display:flex; align-items:center; justify-content:space-between; height:62px; flex-shrink:0; }
.brand{ display:flex; align-items:center; gap:10px; }
.brand .mark{ width:28px; height:28px; }
.brand .name{ font-size:17px; font-weight:700; }
.brand .sub{ font-size:11px; color:rgba(255,255,255,.5); margin-left:8px; padding-left:8px; border-left:1px solid rgba(255,255,255,.2); }
.topActions{ display:flex; gap:10px; align-items:center; }
.searchBox input{ background:none; border:none; outline:none; color:#fff; font-size:12.5px; width:100%; }
.searchBox input::placeholder{ color:rgba(255,255,255,.45); }
.searchBox svg{ width:14px; height:14px; opacity:.6; flex-shrink:0; }
.tbtn{ display:flex; align-items:center; gap:6px; background:rgba(255,255,255,.08); border:1px solid rgba(255,255,255,.15); color:#fff; font-size:12px; font-weight:600; padding:8px 12px; border-radius:8px; cursor:pointer; white-space:nowrap; }
.tbtn:hover{ background:rgba(255,255,255,.16); }
.tbtn.accent{ background:var(--cyan); color:var(--navy); border-color:var(--cyan); }
.tbtn.accent:hover{ background:#7fd0f0; }
.card .val{ font-family:'Space Grotesk'; font-size:26px; font-weight:700; color:var(--navy); }
.overlay{ position:fixed; inset:0; background:rgba(28,43,57,.35); display:none; z-index:90; }
.overlay.open{ display:block; }
.panel.open{ right:0 !important; }
.panelHead{ background:var(--navy); color:#fff; padding:20px 22px; }
.panelHead .top{ display:flex; justify-content:space-between; align-items:flex-start; }
.infoRow .k{ color:var(--muted); }
.toast{ position:fixed; bottom:24px; left:50%; transform:translateX(-50%) translateY(20px); background:var(--navy); color:#fff; padding:12px 20px; border-radius:10px; font-size:12.5px; font-weight:600; opacity:0; pointer-events:none; transition:.25s; z-index:200; box-shadow:0 10px 30px rgba(0,0,0,.2); }
.toast.show{ opacity:1; transform:translateX(-50%) translateY(0); }
.subnav{ background:var(--panel); border-bottom:1px solid var(--border); display:flex; gap:4px; padding:0 24px; flex-shrink:0; }
.subnav a{ display:flex; align-items:center; gap:6px; padding:12px 16px; font-size:12.5px; font-weight:600; color:var(--muted); text-decoration:none; border-bottom:2px solid transparent; }
.subnav a:hover{ color:var(--text); }
.subnav a.active{ color:var(--steel); border-bottom-color:var(--steel); }
h1,h2,h3{ font-family:'Space Grotesk',sans-serif; }

/* ============ 2. PAGE-SPECIFIC — Operations Hub only (avercentris-ops-hub.html) ============ */
/* No collision risk: these selectors don't appear on any other page. */
.pageOpsHub{ transition:background .2s,color .2s; }
body[data-theme="dark"] .card, body[data-theme="dark"] .gridWrap, body[data-theme="dark"] .pill button, body[data-theme="dark"] .dropdown, body[data-theme="dark"] .panel{ background:var(--panel); border-color:var(--border); }
body[data-theme="dark"] thead th{ background:rgba(255,255,255,.04); }
body[data-theme="dark"] tbody tr:hover{ background:#212B36; }
h1,h2,h3,.disp{ font-family:'Space Grotesk',sans-serif; }
.pageOpsHub .searchBox{ display:flex; align-items:center; gap:8px; background:rgba(255,255,255,.08); border:1px solid rgba(255,255,255,.15); border-radius:8px; padding:7px 12px; width:230px; }
.pageOpsHub .layout{ padding:22px 24px 60px; max-width:1500px; margin:0 auto; }
.pageOpsHub .cards{ display:grid; grid-template-columns:repeat(6,1fr); gap:14px; margin-bottom:20px; }
.pageOpsHub .card{ background:var(--panel); border:1px solid var(--border); border-radius:12px; padding:16px 16px; }
.pageOpsHub .card .label{ font-size:11px; color:var(--muted); text-transform:uppercase; letter-spacing:.4px; margin-bottom:8px; display:flex; align-items:center; justify-content:space-between; }
.pageOpsHub .card .delta{ font-size:11px; margin-top:4px; font-weight:600; }
.delta.up{ color:var(--good); }
.delta.down{ color:var(--bad); }
.delta.flat{ color:var(--muted); }
.filterBar{ display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin-bottom:16px; }
.filterBar .fl-label{ font-size:11px; color:var(--muted); font-weight:600; text-transform:uppercase; letter-spacing:.4px; margin-right:4px; }
.pill{ position:relative; }
.pill button{ background:var(--panel); border:1px solid var(--border); color:var(--text); font-size:12px; font-weight:600; padding:7px 12px; border-radius:999px; cursor:pointer; display:flex; align-items:center; gap:6px; }
.pill button:hover{ border-color:var(--steel); }
.pill button.active{ background:var(--navy); color:#fff; border-color:var(--navy); }
.pill .chev{ font-size:9px; opacity:.6; }
.dropdown{ display:none; position:absolute; top:calc(100% + 6px); left:0; background:var(--panel); border:1px solid var(--border); border-radius:10px; box-shadow:0 12px 28px rgba(28,43,57,.14); padding:6px; z-index:40; min-width:150px; max-height:240px; overflow-y:auto; }
.dropdown.open{ display:block; }
.dropdown .opt{ padding:8px 10px; font-size:12.5px; border-radius:6px; cursor:pointer; white-space:nowrap; }
.dropdown .opt:hover{ background:var(--neutralBg); }
.clearFilters{ font-size:12px; color:var(--steel); font-weight:600; cursor:pointer; margin-left:4px; }
.gridWrap{ background:var(--panel); border:1px solid var(--border); border-radius:12px; overflow:hidden; overflow-x:auto; }
table{ width:100%; border-collapse:collapse; min-width:1180px; }
thead th{ text-align:left; font-size:10.5px; text-transform:uppercase; letter-spacing:.4px; color:var(--muted); background:var(--neutralBg); padding:11px 14px; border-bottom:1px solid var(--border); white-space:nowrap; }
tbody td{ padding:12px 14px; border-bottom:1px solid var(--border); vertical-align:middle; }
tbody tr{ cursor:pointer; transition:.12s; }
tbody tr:hover{ background:#F7FAFB; }
tbody tr:last-child td{ border-bottom:none; }
.leadId{ font-family:'Space Grotesk'; font-weight:600; color:var(--steel); font-size:12.5px; }
.name{ font-weight:600; }
.company{ color:var(--muted); font-size:12px; }
.badge{ display:inline-flex; align-items:center; gap:5px; font-size:11px; font-weight:700; padding:4px 9px; border-radius:999px; white-space:nowrap; }
.st-New{ background:var(--neutralBg); color:var(--graphite); }
.st-Qualified{ background:#E7F0FB; color:var(--steel); }
.st-Proposal{ background:var(--warnBg); color:var(--warn); }
.st-Won{ background:var(--goodBg); color:var(--good); }
.st-Lost{ background:var(--badBg); color:var(--bad); }
.pr-Low{ color:var(--muted); }
.pr-Medium{ color:var(--warn); }
.pr-High{ color:var(--bad); font-weight:700; }
.confWrap{ display:flex; align-items:center; gap:6px; }
.pageOpsHub .confBar{ width:46px; height:5px; border-radius:3px; background:var(--neutralBg); overflow:hidden; }
.pageOpsHub .confBar i{ display:block; height:100%; background:var(--steel); }
.confBar.hi i{ background:var(--good); }
.confBar.mid i{ background:var(--warn); }
.confBar.lo i{ background:var(--bad); }
.confTxt{ font-size:11.5px; font-weight:700; color:var(--muted); }
.sent{ width:8px; height:8px; border-radius:50%; display:inline-block; }
.sent.Positive{ background:var(--good); }
.sent.Neutral{ background:#B8BFC6; }
.sent.Negative{ background:var(--bad); }
.avatar{ width:24px; height:24px; border-radius:50%; background:var(--steel); color:#fff; font-size:10px; font-weight:700; display:inline-flex; align-items:center; justify-content:center; margin-right:6px; }
.assignedCell{ display:flex; align-items:center; }
.muted{ color:var(--muted); font-size:12px; }
.pageOpsHub .panel{ position:fixed; top:0; right:-480px; width:460px; max-width:92vw; height:100%; background:var(--panel); z-index:91; box-shadow:-16px 0 40px rgba(28,43,57,.2); transition:right .25s ease; display:flex; flex-direction:column; }
.pageOpsHub .panelHead .pname{ font-family:'Space Grotesk'; font-size:19px; font-weight:700; }
.panelHead .pcompany{ font-size:12.5px; color:rgba(255,255,255,.6); margin-top:2px; }
.pageOpsHub .panelClose{ background:rgba(255,255,255,.1); border:none; color:#fff; width:28px; height:28px; border-radius:8px; cursor:pointer; font-size:15px; }
.panelMeta{ display:flex; gap:16px; margin-top:14px; flex-wrap:wrap; }
.panelMeta div span{ display:block; }
.panelMeta .k{ font-size:10px; color:rgba(255,255,255,.5); text-transform:uppercase; letter-spacing:.3px; }
.panelMeta .v{ font-size:12.5px; font-weight:600; margin-top:2px; }
.tabs{ display:flex; border-bottom:1px solid var(--border); padding:0 14px; flex-shrink:0; }
.tab{ padding:12px 12px; font-size:12px; font-weight:600; color:var(--muted); cursor:pointer; border-bottom:2px solid transparent; }
.tab.active{ color:var(--steel); border-bottom-color:var(--steel); }
.pageOpsHub .panelBody{ flex:1; overflow-y:auto; padding:18px 22px; }
.tabPane{ display:none; }
.tabPane.active{ display:block; }
.pageOpsHub .infoRow{ display:flex; justify-content:space-between; padding:8px 0; border-bottom:1px solid var(--neutralBg); font-size:12.5px; }
.pageOpsHub .infoRow .v{ font-weight:600; text-align:right; }
.aiCard{ background:var(--neutralBg); border-radius:10px; padding:14px; margin-bottom:14px; }
.aiCard .lbl{ font-size:10.5px; color:var(--muted); text-transform:uppercase; letter-spacing:.4px; margin-bottom:6px; font-weight:700; }
.aiCard p{ font-size:12.5px; line-height:1.55; }
.pageOpsHub .sectionLbl{ font-size:10.5px; color:var(--muted); text-transform:uppercase; letter-spacing:.4px; font-weight:700; margin-bottom:8px; }
.pageOpsHub .kbTag{ display:inline-flex; align-items:center; gap:5px; background:#E7F0FB; color:var(--steel); font-size:11.5px; font-weight:600; padding:5px 10px; border-radius:8px; margin:3px 4px 3px 0; }
.stepper{ display:flex; flex-direction:column; gap:0; margin:6px 0 16px; }
.step{ display:flex; gap:12px; position:relative; padding-bottom:22px; }
.step:last-child{ padding-bottom:0; }
.step .dotcol{ display:flex; flex-direction:column; align-items:center; }
.step .sdot{ width:14px; height:14px; border-radius:50%; background:var(--neutralBg); border:2px solid var(--border); flex-shrink:0; z-index:2; }
.step.done .sdot{ background:var(--good); border-color:var(--good); }
.step.current .sdot{ background:var(--cyan); border-color:var(--cyan); box-shadow:0 0 0 4px rgba(95,194,232,.25); }
.step .line{ width:2px; flex:1; background:var(--border); margin-top:2px; }
.step.done .line{ background:var(--good); }
.step .stitle{ font-size:12.5px; font-weight:700; margin-top:-2px; }
.step.current .stitle{ color:var(--steel); }
.step .ssub{ font-size:11px; color:var(--muted); margin-top:1px; }
.autoList{ display:flex; flex-direction:column; gap:8px; margin-top:4px; }
.autoItem{ display:flex; align-items:center; gap:8px; font-size:12.5px; }
.autoItem .chk{ width:16px; height:16px; border-radius:5px; display:flex; align-items:center; justify-content:center; font-size:10px; color:#fff; flex-shrink:0; }
.chk.on{ background:var(--good); }
.chk.off{ background:var(--border); color:var(--muted); }
.autoItem.off-item{ color:var(--muted); }
.timeline{ display:flex; flex-direction:column; }
.tItem{ display:flex; gap:12px; position:relative; padding-bottom:18px; }
.tItem:last-child{ padding-bottom:0; }
.tItem .tdotcol{ display:flex; flex-direction:column; align-items:center; }
.tItem .tdot{ width:8px; height:8px; border-radius:50%; background:var(--steel); margin-top:4px; flex-shrink:0; }
.tItem .tline{ width:2px; flex:1; background:var(--border); margin-top:2px; }
.tItem .ttime{ font-size:10.5px; color:var(--muted); font-family:'Space Grotesk'; font-weight:600; min-width:44px; }
.tItem .tlabel{ font-size:12.5px; font-weight:600; }
.costGrid{ display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:10px; }
.costBox{ background:var(--neutralBg); border-radius:10px; padding:12px; text-align:center; }
.costBox .v{ font-family:'Space Grotesk'; font-size:19px; font-weight:700; color:var(--navy); }
.costBox .l{ font-size:10.5px; color:var(--muted); margin-top:2px; }
.convo{ display:flex; flex-direction:column; gap:10px; }
.cmsg{ max-width:85%; padding:9px 12px; border-radius:12px; font-size:12.5px; line-height:1.45; }
.cmsg.customer{ background:var(--neutralBg); align-self:flex-start; border-bottom-left-radius:3px; }
.cmsg.ai{ background:#E7F0FB; color:var(--navy); align-self:flex-end; border-bottom-right-radius:3px; }
.cwho{ font-size:10px; color:var(--muted); margin-bottom:3px; font-weight:700; text-transform:uppercase; letter-spacing:.3px; }
.viewWfBtn{ width:100%; margin-top:16px; background:var(--navy); color:#fff; border:none; padding:11px; border-radius:9px; font-weight:700; font-size:12.5px; cursor:pointer; }
.viewWfBtn:hover{ background:var(--steel); }
.emptyState{ padding:60px 20px; text-align:center; color:var(--muted); font-size:13px; }
body[data-theme="dark"] .topbar{ border-bottom:1px solid #223; }
body[data-theme="dark"] .st-New{ background:#2A3540; color:#C7D0D8; }
body[data-theme="dark"] .st-Qualified{ background:#1E3A52; color:#7FC3EA; }
body[data-theme="dark"] .st-Proposal{ background:#4A3A18; color:#E8C574; }
body[data-theme="dark"] .st-Won{ background:#1C3B28; color:#6FCB8E; }
body[data-theme="dark"] .st-Lost{ background:#3F2020; color:#E68A80; }
body[data-theme="dark"] .kbTag{ background:#1E3A52; color:#7FC3EA; }
body[data-theme="dark"] .gridWrap, body[data-theme="dark"] .card, body[data-theme="dark"] .panel{ box-shadow:none; }
body[data-theme="dark"] .dropdown{ box-shadow:0 12px 28px rgba(0,0,0,.4); }
body[data-theme="dark"] .pill button.active{ background:var(--cyan); color:var(--navy); border-color:var(--cyan); }
#themeToggle .ic{ display:inline-block; }

/* Pagination (Operations Hub) */
.pageOpsHub .pagination{ display:flex; justify-content:center; align-items:center; gap:6px; padding:16px 0 6px; }
.pageOpsHub .pageBtn{ min-width:34px; height:34px; padding:0 8px; border-radius:8px; border:1px solid var(--border); background:var(--panel); color:var(--text); font-size:12.5px; font-weight:600; cursor:pointer; }
.pageOpsHub .pageBtn:hover{ border-color:var(--steel); }
.pageOpsHub .pageBtn.active{ background:var(--navy); color:#fff; border-color:var(--navy); }
.pageOpsHub .pageBtn:disabled{ opacity:.35; cursor:not-allowed; }
.pageOpsHub .pageEllipsis{ color:var(--muted); font-size:12px; padding:0 4px; }
.pageOpsHub .pageInfo{ text-align:center; font-size:11.5px; color:var(--muted); margin-top:4px; }

/* ============ 2. PAGE-SPECIFIC — Knowledge Base only (avercentris-knowledge-base.html) ============ */
/* No collision risk: these selectors don't appear on any other page. */
.pageKb .searchBox{ display:flex; align-items:center; gap:8px; background:rgba(255,255,255,.08); border:1px solid rgba(255,255,255,.15); border-radius:8px; padding:7px 12px; width:260px; }
.pageKb .layout{ padding:22px 24px 60px; max-width:1500px; margin:0 auto; display:grid; grid-template-columns:230px 1fr; gap:20px; }
.pageKb .cards{ display:grid; grid-template-columns:repeat(4,1fr); gap:14px; margin-bottom:20px; grid-column:1 / -1; }
.pageKb .card{ background:var(--panel); border:1px solid var(--border); border-radius:12px; padding:16px; }
.pageKb .card .label{ font-size:11px; color:var(--muted); text-transform:uppercase; letter-spacing:.4px; margin-bottom:8px; }
.pageKb .card .delta{ font-size:11px; margin-top:4px; font-weight:600; color:var(--good); }
.pageKb .panel{ position:fixed; top:0; right:-520px; width:500px; max-width:92vw; height:100%; background:var(--panel); z-index:91; box-shadow:-16px 0 40px rgba(28,43,57,.2); transition:right .25s ease; display:flex; flex-direction:column; }
.pageKb .panelHead .pname{ font-family:'Space Grotesk'; font-size:18px; font-weight:700; line-height:1.3; }
.pageKb .panelClose{ background:rgba(255,255,255,.1); border:none; color:#fff; width:28px; height:28px; border-radius:8px; cursor:pointer; font-size:15px; flex-shrink:0; }
.pageKb .panelBody{ flex:1; overflow-y:auto; padding:20px 22px; }
.pageKb .infoRow{ display:flex; justify-content:space-between; padding:7px 0; border-bottom:1px solid var(--neutralBg); font-size:12.5px; }
.pageKb .infoRow .v{ font-weight:600; }
.pageKb .sectionLbl{ font-size:10.5px; color:var(--muted); text-transform:uppercase; letter-spacing:.4px; font-weight:700; margin-bottom:8px; margin-top:18px; }
body[data-theme="dark"] .card .val, body[data-theme="dark"] .statBox .v{ color:var(--text); }
body[data-theme="dark"] .artTag{ background:#1E3A52; color:#7FC3EA; }
body[data-theme="dark"] .catItem.active{ background:var(--cyan); color:var(--navy); }
.card .delta.warn{ color:var(--warn); }
.sidebar{ background:var(--panel); border:1px solid var(--border); border-radius:12px; padding:14px; height:fit-content; }
.sidebar .sTitle{ font-size:10.5px; text-transform:uppercase; letter-spacing:.4px; color:var(--muted); font-weight:700; margin-bottom:10px; padding:0 6px; }
.catItem{ display:flex; justify-content:space-between; align-items:center; padding:9px 10px; border-radius:8px; cursor:pointer; font-size:12.5px; font-weight:600; margin-bottom:2px; }
.catItem:hover{ background:var(--neutralBg); }
.catItem.active{ background:var(--navy); color:#fff; }
.catItem .cnt{ font-size:11px; font-weight:700; color:var(--muted); background:var(--neutralBg); padding:1px 7px; border-radius:999px; }
.catItem.active .cnt{ background:rgba(255,255,255,.18); color:#fff; }
.main{ display:flex; flex-direction:column; gap:12px; }
.listHead{ display:flex; justify-content:space-between; align-items:center; margin-bottom:2px; }
.listHead h2{ font-size:16px; }
.sortSelect{ font-size:12px; color:var(--muted); font-weight:600; }
.artCard{ background:var(--panel); border:1px solid var(--border); border-radius:12px; padding:16px 18px; cursor:pointer; transition:.12s; }
.artCard:hover{ border-color:var(--steel); }
.artTop{ display:flex; justify-content:space-between; align-items:flex-start; gap:10px; }
.artTitle{ font-weight:700; font-size:14px; }
.artTag{ display:inline-block; background:#E7F0FB; color:var(--steel); font-size:10.5px; font-weight:700; padding:3px 9px; border-radius:999px; margin-top:6px; }
.statusTag{ font-size:10.5px; font-weight:700; padding:3px 9px; border-radius:999px; white-space:nowrap; }
.st-Published{ background:var(--goodBg); color:var(--good); }
.st-Draft{ background:var(--neutralBg); color:var(--muted); }
.st-Review{ background:var(--warnBg); color:var(--warn); }
.artSnippet{ font-size:12.5px; color:var(--muted); margin-top:8px; line-height:1.5; }
.artMeta{ display:flex; gap:18px; margin-top:12px; padding-top:12px; border-top:1px solid var(--neutralBg); }
.artMeta div{ font-size:11px; color:var(--muted); }
.artMeta b{ display:block; color:var(--text); font-size:13px; font-family:'Space Grotesk'; font-weight:700; }
.sectionLbl:first-child{ margin-top:0; }
.artBody{ font-size:13px; line-height:1.7; color:var(--text); }
.statGrid{ display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.statBox{ background:var(--neutralBg); border-radius:10px; padding:12px; text-align:center; }
.statBox .v{ font-family:'Space Grotesk'; font-size:19px; font-weight:700; color:var(--navy); }
.statBox .l{ font-size:10.5px; color:var(--muted); margin-top:2px; }
.panelActions{ display:flex; gap:8px; padding:16px 22px; border-top:1px solid var(--border); }
.pBtn{ flex:1; padding:10px; border-radius:9px; font-weight:700; font-size:12.5px; cursor:pointer; border:1px solid var(--border); background:var(--panel); }
.pBtn.primary{ background:var(--navy); color:#fff; border-color:var(--navy); }
.pBtn.primary:hover{ background:var(--steel); }
.suggestBox{ background:linear-gradient(135deg, #1C2B39, #2A4A5E); color:#fff; border-radius:12px; padding:18px; margin-bottom:16px; grid-column:1 / -1; display:flex; justify-content:space-between; align-items:center; gap:16px; }
.suggestBox .st{ font-size:10.5px; text-transform:uppercase; letter-spacing:.5px; color:var(--cyan); font-weight:700; margin-bottom:5px; }
.suggestBox p{ font-size:13px; max-width:640px; }
.suggestBox button{ background:var(--cyan); color:var(--navy); border:none; padding:9px 16px; border-radius:8px; font-weight:700; font-size:12px; cursor:pointer; white-space:nowrap; }

/* ============ 2. PAGE-SPECIFIC — Workflow Builder only (avercentris-workflow-builder.html) ============ */
/* No collision risk: these selectors don't appear on any other page. */
html.page-workflow{ overflow:hidden; height:100vh; }
.wfHead{ display:flex; align-items:center; justify-content:space-between; padding:12px 24px; background:var(--panel); border-bottom:1px solid var(--border); flex-shrink:0; }
.wfTitleWrap{ display:flex; align-items:center; gap:12px; }
.wfTitle{ font-family:'Space Grotesk'; font-size:16px; font-weight:700; }
.wfStatus{ font-size:10.5px; font-weight:700; padding:4px 10px; border-radius:999px; background:var(--goodBg); color:var(--good); }
.wfMeta{ font-size:11.5px; color:var(--muted); }
.wfActions{ display:flex; gap:8px; }
.wfActions .tbtn{ background:var(--neutralBg); color:var(--text); border-color:var(--border); }
.wfActions .tbtn:hover{ background:#E4E9EC; }
.wfActions .tbtn.accent{ color:var(--navy); }
.builder{ display:grid; grid-template-columns:220px 1fr 340px; height:calc(100vh - 62px - 45px - 57px); }
.library{ background:var(--panel); border-right:1px solid var(--border); padding:16px 12px; overflow-y:auto; }
.libGroup{ margin-bottom:18px; }
.libGroupTitle{ font-size:10px; text-transform:uppercase; letter-spacing:.4px; color:var(--muted); font-weight:700; padding:0 6px 8px; }
.libItem{ display:flex; align-items:center; gap:9px; padding:9px 10px; border-radius:9px; font-size:12px; font-weight:600; margin-bottom:3px; cursor:grab; border:1px solid transparent; }
.libItem:hover{ background:var(--neutralBg); border-color:var(--border); }
.libDot{ width:9px; height:9px; border-radius:3px; flex-shrink:0; }
.libItem.trigger .libDot{ background:var(--trigger); }
.libItem.ai .libDot{ background:var(--ai); }
.libItem.logic .libDot{ background:var(--logic); }
.libItem.action .libDot{ background:var(--action); }
.canvasWrap{ position:relative; overflow:auto; background:
      radial-gradient(circle, var(--border) 1px, transparent 1px) 0 0/22px 22px, var(--bg); }
.canvas{ position:relative; width:900px; height:900px; }
svg.connectors{ position:absolute; top:0; left:0; width:100%; height:100%; pointer-events:none; }
.node{ position:absolute; width:220px; background:var(--panel); border:1.5px solid var(--border); border-radius:12px; padding:12px 14px; cursor:pointer; box-shadow:0 2px 8px rgba(28,43,57,.06); transition:.15s; }
.node:hover{ border-color:var(--steel); box-shadow:0 6px 18px rgba(28,43,57,.12); }
.node.selected{ border-color:var(--steel); box-shadow:0 0 0 3px rgba(61,110,140,.18); }
.nodeTop{ display:flex; align-items:center; gap:8px; margin-bottom:6px; }
.nodeIcon{ width:26px; height:26px; border-radius:7px; display:flex; align-items:center; justify-content:center; font-size:13px; flex-shrink:0; color:#fff; }
.node.trigger .nodeIcon{ background:var(--trigger); }
.node.ai .nodeIcon{ background:var(--ai); }
.node.logic .nodeIcon{ background:var(--logic); }
.node.action .nodeIcon{ background:var(--action); }
.nodeType{ font-size:9.5px; text-transform:uppercase; letter-spacing:.4px; color:var(--muted); font-weight:700; }
.nodeName{ font-size:13px; font-weight:700; }
.nodeSub{ font-size:11px; color:var(--muted); margin-top:2px; line-height:1.4; }
.nodePort{ position:absolute; width:10px; height:10px; border-radius:50%; background:var(--border); border:2px solid var(--panel); }
.nodePort.out{ right:-6px; top:50%; transform:translateY(-50%); }
.nodePort.in{ left:-6px; top:50%; transform:translateY(-50%); }
.branchLabel{ position:absolute; font-size:10px; font-weight:700; background:var(--panel); padding:2px 6px; border-radius:5px; border:1px solid var(--border); color:var(--muted); }
.config{ background:var(--panel); border-left:1px solid var(--border); overflow-y:auto; padding:20px; }
.config .placeholder{ color:var(--muted); font-size:12.5px; text-align:center; padding:60px 20px; line-height:1.6; }
.cfgHead{ display:flex; align-items:center; gap:10px; margin-bottom:18px; }
.cfgIcon{ width:32px; height:32px; border-radius:8px; display:flex; align-items:center; justify-content:center; font-size:15px; color:#fff; flex-shrink:0; }
.cfgTitle{ font-family:'Space Grotesk'; font-size:15px; font-weight:700; }
.cfgType{ font-size:10.5px; color:var(--muted); text-transform:uppercase; letter-spacing:.4px; font-weight:700; }
.cfgField{ margin-bottom:14px; }
.cfgLabel{ font-size:11px; font-weight:700; color:var(--muted); text-transform:uppercase; letter-spacing:.3px; margin-bottom:6px; display:block; }
.cfgInput{ width:100%; padding:9px 11px; border:1px solid var(--border); border-radius:8px; font-size:12.5px; font-family:inherit; background:var(--bg); color:var(--text); }
.cfgInput:disabled{ opacity:.7; }
.cfgNote{ background:var(--neutralBg); border-radius:8px; padding:10px 12px; font-size:11.5px; color:var(--muted); line-height:1.5; margin-top:4px; }
.cfgStats{ display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-top:16px; }
.cfgStatBox{ background:var(--neutralBg); border-radius:9px; padding:10px; text-align:center; }
.cfgStatBox .v{ font-family:'Space Grotesk'; font-weight:700; font-size:16px; color:var(--navy); }
body[data-theme="dark"] .cfgStatBox .v{ color:var(--text); }
.cfgStatBox .l{ font-size:10px; color:var(--muted); margin-top:2px; }
.deleteBtn{ width:100%; margin-top:20px; padding:10px; border-radius:9px; background:none; border:1px solid var(--badBg); color:var(--bad); font-weight:700; font-size:12px; cursor:pointer; }
.deleteBtn:hover{ background:var(--badBg); }
.zoomCtrl{ position:absolute; bottom:16px; right:16px; display:flex; gap:4px; background:var(--panel); border:1px solid var(--border); border-radius:9px; padding:4px; box-shadow:0 4px 14px rgba(0,0,0,.08); }
.zoomCtrl button{ width:28px; height:28px; border:none; background:none; cursor:pointer; font-size:14px; border-radius:6px; color:var(--text); }
.zoomCtrl button:hover{ background:var(--neutralBg); }

/* ============ 2. PAGE-SPECIFIC — Conversations only (avercentris-dialog.html) ============ */
/* No collision risk: these selectors don't appear on any other page. */
.pageDialog{ height:100vh; overflow:hidden; }
.pageDialog .layout{ display:grid; grid-template-columns:300px 1fr 300px; height:calc(100vh - 62px - 45px); }
.pageDialog .confBar{ flex:1; height:5px; border-radius:3px; background:var(--border); overflow:hidden; }
.pageDialog .confBar i{ display:block; height:100%; background:var(--good); }
.pageDialog .infoRow{ display:flex; justify-content:space-between; padding:7px 0; border-bottom:1px solid var(--neutralBg); font-size:12px; }
.pageDialog .infoRow .v{ font-weight:600; text-align:right; }
.pageDialog .kbTag{ display:inline-flex; background:#E7F0FB; color:var(--steel); font-size:11px; font-weight:600; padding:4px 9px; border-radius:7px; margin:3px 4px 0 0; }
.convList{ background:var(--panel); border-right:1px solid var(--border); display:flex; flex-direction:column; overflow:hidden; }
.clHead{ padding:14px 16px; border-bottom:1px solid var(--border); }
.clSearch{ display:flex; align-items:center; gap:8px; background:var(--neutralBg); border-radius:8px; padding:8px 10px; margin-bottom:10px; }
.clSearch input{ border:none; background:none; outline:none; font-size:12.5px; width:100%; color:var(--text); }
.chanTabs{ display:flex; gap:6px; }
.chanTab{ flex:1; text-align:center; padding:6px 4px; border-radius:7px; font-size:11px; font-weight:700; cursor:pointer; color:var(--muted); background:var(--neutralBg); }
.chanTab.active{ background:var(--navy); color:#fff; }
.clScroll{ flex:1; overflow-y:auto; }
.convItem{ display:flex; gap:10px; padding:12px 16px; border-bottom:1px solid var(--neutralBg); cursor:pointer; position:relative; }
.convItem:hover{ background:#F7FAFB; }
.convItem.selected{ background:#EAF2F7; border-left:3px solid var(--steel); padding-left:13px; }
.convItem.unread .convName{ font-weight:800; }
.convAvatar{ width:34px; height:34px; border-radius:50%; background:var(--steel); color:#fff; font-size:12px; font-weight:700; display:flex; align-items:center; justify-content:center; flex-shrink:0; position:relative; }
.chanBadge{ position:absolute; bottom:-3px; right:-3px; width:16px; height:16px; border-radius:50%; background:var(--panel); display:flex; align-items:center; justify-content:center; font-size:9px; border:1.5px solid var(--panel); }
.convBody{ flex:1; min-width:0; }
.convTop{ display:flex; justify-content:space-between; align-items:baseline; gap:6px; }
.convName{ font-size:12.5px; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.convTime{ font-size:10px; color:var(--muted); flex-shrink:0; }
.convPreview{ font-size:11.5px; color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; margin-top:2px; }
.convMeta{ display:flex; gap:5px; margin-top:5px; align-items:center; }
.statusDot{ width:6px; height:6px; border-radius:50%; }
.statusDot.ai{ background:var(--cyan); }
.statusDot.human{ background:var(--warn); }
.statusDot.resolved{ background:var(--good); }
.metaTxt{ font-size:10px; color:var(--muted); font-weight:600; }
.unreadDot{ width:8px; height:8px; border-radius:50%; background:var(--steel); position:absolute; top:14px; right:14px; }
.thread{ display:flex; flex-direction:column; background:var(--bg); overflow:hidden; }
.threadHead{ background:var(--panel); border-bottom:1px solid var(--border); padding:14px 20px; display:flex; justify-content:space-between; align-items:center; flex-shrink:0; }
.thTitle{ font-family:'Space Grotesk'; font-weight:700; font-size:15px; }
.thSub{ font-size:11.5px; color:var(--muted); margin-top:2px; }
.thActions{ display:flex; gap:8px; align-items:center; }
.takeoverWrap{ display:flex; align-items:center; gap:8px; font-size:11.5px; font-weight:600; color:var(--muted); background:var(--neutralBg); padding:6px 12px; border-radius:999px; }
.switch{ width:34px; height:19px; background:var(--border); border-radius:999px; position:relative; cursor:pointer; flex-shrink:0; }
.switch.on{ background:var(--good); }
.switch .knob{ width:15px; height:15px; background:#fff; border-radius:50%; position:absolute; top:2px; left:2px; transition:.15s; }
.switch.on .knob{ left:17px; }
.actBtn{ background:var(--panel); border:1px solid var(--border); color:var(--text); font-size:11.5px; font-weight:600; padding:7px 11px; border-radius:8px; cursor:pointer; }
.actBtn:hover{ border-color:var(--steel); }
.actBtn.resolve{ background:var(--goodBg); color:var(--good); border-color:transparent; }
.thBody{ flex:1; overflow-y:auto; padding:20px; display:flex; flex-direction:column; gap:14px; }
.msgRow{ display:flex; flex-direction:column; max-width:62%; }
.msgRow.customer{ align-self:flex-start; align-items:flex-start; }
.msgRow.ai{ align-self:flex-end; align-items:flex-end; }
.msgRow.admin{ align-self:flex-end; align-items:flex-end; }
.msgWho{ font-size:10.5px; color:var(--muted); margin-bottom:4px; font-weight:700; text-transform:uppercase; letter-spacing:.3px; }
.msgBubble{ padding:10px 14px; border-radius:14px; font-size:13px; line-height:1.5; }
.unlinkedUrl{ text-decoration:underline; text-decoration-style:dotted; text-decoration-color:var(--muted); color:inherit; cursor:text; user-select:all; }
.msgRow.customer .msgBubble{ background:var(--panel); border:1px solid var(--border); border-bottom-left-radius:3px; }
.msgRow.ai .msgBubble{ background:#E7F0FB; color:var(--navy); border-bottom-right-radius:3px; }
.msgRow.admin .msgBubble{ background:var(--navy); color:#fff; border-bottom-right-radius:3px; }
.msgTime{ font-size:10px; color:var(--muted); margin-top:4px; }
.sysNote{ align-self:center; font-size:11px; color:var(--muted); background:var(--neutralBg); padding:5px 12px; border-radius:999px; }
.composer{ background:var(--panel); border-top:1px solid var(--border); padding:12px 16px; flex-shrink:0; }
.composerTop{ display:flex; gap:8px; margin-bottom:8px; }
.chipBtn{ font-size:11px; font-weight:600; color:var(--steel); background:#E7F0FB; padding:5px 10px; border-radius:999px; cursor:pointer; border:none; }
.composerRow{ display:flex; gap:8px; align-items:flex-end; }
.composerInput{ flex:1; border:1px solid var(--border); border-radius:10px; padding:10px 12px; font-size:13px; font-family:inherit; resize:none; min-height:42px; max-height:120px; background:var(--bg); color:var(--text); }
.sendBtn{ background:var(--navy); color:#fff; border:none; width:42px; height:42px; border-radius:10px; cursor:pointer; flex-shrink:0; display:flex; align-items:center; justify-content:center; }
.sendBtn:hover{ background:var(--steel); }
.sendBtn:disabled{ opacity:.4; cursor:not-allowed; }
.aiPausedNote{ font-size:11px; color:var(--warn); margin-top:6px; display:flex; align-items:center; gap:5px; }
.context{ background:var(--panel); border-left:1px solid var(--border); overflow-y:auto; padding:18px; }
.ctxSection{ margin-bottom:20px; }
.ctxLbl{ font-size:10.5px; color:var(--muted); text-transform:uppercase; letter-spacing:.4px; font-weight:700; margin-bottom:10px; }
.leadCard{ display:flex; gap:10px; align-items:center; margin-bottom:14px; }
.leadAvatar{ width:40px; height:40px; border-radius:50%; background:var(--steel); color:#fff; font-weight:700; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.leadName{ font-weight:700; font-size:13.5px; }
.leadCompany{ font-size:11.5px; color:var(--muted); }
.aiBox{ background:var(--neutralBg); border-radius:10px; padding:12px; font-size:12px; line-height:1.55; margin-bottom:10px; }
.confRow{ display:flex; align-items:center; gap:8px; margin-top:8px; }
.goToCrm{ width:100%; margin-top:6px; background:none; border:1px solid var(--border); color:var(--text); padding:9px; border-radius:9px; font-size:12px; font-weight:700; cursor:pointer; }
.goToCrm:hover{ border-color:var(--steel); }

/* ============================================================================
   FORM CONTROLS — shared by #userForm (avercentris-user-form.html),
   #articleForm / .editorCard (avercentris-article-form.html), the category
   modal on avercentris-knowledge-base.html, and the new lead form. Nothing
   previously styled these, so every input rendered as an unstyled native
   browser control — this is the fix.
   ============================================================================ */
.formField{ margin-bottom:16px; }
.formField label,
.editorCard label{
  display:block; font-size:11px; font-weight:700; color:var(--muted);
  text-transform:uppercase; letter-spacing:.4px; margin-bottom:6px;
}
.formField input[type="text"],
.formField input[type="email"],
.formField input[type="tel"],
.formField input[type="password"],
.formField input[type="number"],
.formField input[type="date"],
.formField textarea,
.formField select,
#userForm input[type="text"],
#userForm input[type="email"],
#userForm input[type="tel"],
#userForm input[type="password"],
#passwordForm input[type="password"]{
  width:100%; padding:10px 12px; border:1px solid var(--border); border-radius:9px;
  font-size:13px; font-family:inherit; background:var(--bg); color:var(--text);
  transition:.12s border-color;
}
.formField textarea{ resize:vertical; min-height:70px; line-height:1.5; }
.formField input:focus,
.formField textarea:focus,
.formField select:focus,
#userForm input:focus,
#passwordForm input:focus{
  outline:none; border-color:var(--steel); box-shadow:0 0 0 3px rgba(61,110,140,.12);
}
.formField input:disabled,
.formField textarea:disabled,
.formField select:disabled{ opacity:.6; cursor:not-allowed; background:var(--neutralBg); }
.formField input::placeholder,
.formField textarea::placeholder{ color:#9AA3AB; }

/* Native <select> loses its OS arrow once width/border are overridden —
   draw a lightweight custom one so it doesn't look broken. */
.formField select{
  appearance:none; -webkit-appearance:none;
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6'><path d='M0 0l5 6 5-6z' fill='%235B6570'/></svg>");
  background-repeat:no-repeat; background-position:right 12px center; padding-right:32px;
}
body[data-theme="dark"] .formField select{
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6'><path d='M0 0l5 6 5-6z' fill='%238B98A5'/></svg>");
}

/* Checkbox/toggle rows (e.g. #fActive on user-form, #fPublish-style flags) */
.toggleRow input[type="checkbox"]{
  width:16px; height:16px; accent-color:var(--steel); cursor:pointer; flex-shrink:0;
}
.toggleRow label{ margin:0; text-transform:none; font-size:13px; font-weight:600; letter-spacing:0; color:var(--text); cursor:pointer; }

/* Tag input + suggestion dropdown (article-form.html) */
.tagInputWrap{ position:relative; }
.tagSuggestions{
  display:none; position:absolute; top:calc(100% + 4px); left:0; right:0;
  background:var(--panel); border:1px solid var(--border); border-radius:9px;
  box-shadow:0 10px 24px rgba(28,43,57,.12); max-height:180px; overflow-y:auto; z-index:30;
}
.tagSuggestions.open{ display:block; }
.tagSuggestions .sugItem{ padding:8px 12px; font-size:12.5px; cursor:pointer; }
.tagSuggestions .sugItem:hover{ background:var(--neutralBg); }
.tagChips{ display:flex; flex-wrap:wrap; gap:6px; margin-top:8px; }
.tagChip{ display:inline-flex; align-items:center; gap:6px; background:var(--neutralBg); color:var(--text); font-size:11.5px; font-weight:600; padding:5px 10px; border-radius:999px; }
.tagChip button{ background:none; border:none; color:var(--muted); cursor:pointer; font-size:12px; line-height:1; padding:0; }
.tagChip button:hover{ color:var(--bad); }

/* ============ 3. PAGE-SCOPED OVERRIDES (see header note) ============ */
/* Nothing additional here — conflicting selectors are already scoped inline above */

/* ============================================================================
   BUTTONS — .btnPrimary / .btnGhost were previously copy-pasted into each
   page's own <style> block (article-form, lead-form, user-form, pitch-
   generator, index/login) rather than defined once here. That meant any
   NEW page using these classes (like the "New ticket" modal added to
   avercentris-dialog.php) had no styling at all unless someone remembered
   to paste the block in again. Defining them once, here, fixes that for
   good — existing per-page copies still work identically since the rules
   are the same, just redundant now.
   ============================================================================ */
.btnGhost{ background:none; border:1px solid var(--border); color:var(--text); padding:10px 18px; border-radius:9px; font-weight:700; font-size:13px; cursor:pointer; }
.btnGhost:hover{ border-color:var(--steel); }
.btnPrimary{ background:var(--navy); color:#fff; border:none; padding:10px 18px; border-radius:9px; font-weight:700; font-size:13px; cursor:pointer; }
.btnPrimary:hover{ background:var(--steel); }
.btnPrimary:disabled{ opacity:.5; cursor:not-allowed; }

/* ============================================================================
   MODALS — shared by the category modal (avercentris-knowledge-base.php)
   and the new-ticket modal (avercentris-dialog.php). This was missing
   entirely before — .modalOverlay/.open existed in the markup/JS of the
   category modal with nothing to actually show/style it.
   ============================================================================ */
.modalOverlay{
  display:none; position:fixed; inset:0; background:rgba(28,43,57,.45);
  align-items:center; justify-content:center; z-index:500;
}
.modalOverlay.open{ display:flex; }
.modalBox{
  background:var(--panel); border-radius:14px; padding:24px; width:100%; max-width:420px;
  box-shadow:0 24px 60px rgba(28,43,57,.25); max-height:85vh; overflow-y:auto;
}
.modalHead{ display:flex; justify-content:space-between; align-items:center; margin-bottom:16px; }
.modalHead h3{ font-family:'Space Grotesk',sans-serif; font-size:16px; color:var(--navy); }
.modalClose{ background:none; border:none; font-size:16px; color:var(--muted); cursor:pointer; line-height:1; }
.modalClose:hover{ color:var(--text); }
.modalActions{ display:flex; justify-content:flex-end; gap:10px; margin-top:18px; }

/* ============================================================================
   EDITOR-STYLE PAGES — shared by Article Form, Lead Form, User Form
   (all three built as "a form inside a card" screens). Truly identical
   rules live here unscoped; anywhere the same class name meant something
   slightly different per page, that page keeps its own scoped override
   below instead of silently inheriting a value it didn't ask for.
   ============================================================================ */
.editorWrap{ max-width:760px; margin:0 auto; padding:28px 24px 80px; }
.editorHead{ display:flex; justify-content:space-between; align-items:center; margin-bottom:22px; }
.editorHead h1{ font-family:'Space Grotesk'; font-size:22px; }
.editorHead .sub{ font-size:12.5px; color:var(--muted); margin-top:3px; }
.editorCard{ background:var(--panel); border:1px solid var(--border); border-radius:14px; padding:24px; margin-bottom:16px; }
.row2{ display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.editorActions{ display:flex; justify-content:space-between; align-items:center; }

/* Article Form — page-specific (unique names, no collision risk) */
.pageArticleForm .editorActions .left{ display:flex; gap:8px; }
.pageArticleForm .helpTxt{ font-size:11px; color:var(--muted); margin-top:5px; }
.pageArticleForm .fileDrop{ border:1.5px dashed var(--border); border-radius:10px; padding:16px; text-align:center; font-size:12.5px; color:var(--muted); cursor:pointer; }
.pageArticleForm .fileDrop:hover{ border-color:var(--steel); }
.pageArticleForm .fileDrop.hasFile{ border-color:var(--good); color:var(--good); border-style:solid; }
.pageArticleForm .statusPills{ display:flex; gap:8px; }
.pageArticleForm .statusPill{ flex:1; text-align:center; padding:9px; border-radius:8px; border:1.5px solid var(--border); font-size:12.5px; font-weight:700; cursor:pointer; color:var(--muted); }
.pageArticleForm .statusPill.active{ border-color:var(--navy); background:var(--navy); color:#fff; }

/* Lead Form — page-specific + one .cardTitle override (differs from User Form's) */
.pageLeadForm .cardTitle{ font-family:'Space Grotesk'; font-size:14px; font-weight:700; color:var(--steel); margin-bottom:14px; text-transform:uppercase; letter-spacing:.4px; }
.pageLeadForm .fieldError{ color:var(--bad); font-size:11px; margin-top:5px; display:none; }
.pageLeadForm .formField.hasError input, .pageLeadForm .formField.hasError select{ border-color:var(--bad); }
.pageLeadForm .formField.hasError .fieldError{ display:block; }
.pageLeadForm .formField input:disabled{ background:var(--neutralBg); color:var(--muted); cursor:not-allowed; }
.pageLeadForm .formField textarea{ min-height:80px; resize:vertical; }

/* User Form — page-specific overrides + unique rules */
.pageUserForm .editorWrap{ max-width:640px; } /* narrower than the 760px shared default */
.pageUserForm .cardTitle{ font-family:'Space Grotesk'; font-size:15px; font-weight:700; margin-bottom:16px; }
.pageUserForm .toggleRow{ display:flex; align-items:center; gap:10px; font-size:13px; font-weight:600; }
.pageUserForm .passwordCard{ display:none; }
.pageUserForm .passwordCard.show{ display:block; }

/* ============================================================================
   USERS LIST — all unique names, no collisions, kept unscoped
   ============================================================================ */
.usersWrap{ margin:0 auto; padding:28px 24px 80px; }
.usersHead{ display:flex; justify-content:space-between; align-items:center; margin-bottom:20px; }
.usersHead h1{ font-family:'Space Grotesk'; font-size:22px; }
.userTable{ width:100%; background:var(--panel); border:1px solid var(--border); border-radius:12px; overflow:hidden; border-collapse:collapse; }
.userTable th{ text-align:left; font-size:10.5px; text-transform:uppercase; letter-spacing:.4px; color:var(--muted); background:var(--neutralBg); padding:11px 14px; }
.userTable td{ padding:12px 14px; border-top:1px solid var(--border); font-size:13px; }
.userTable tr:hover td{ background:#F7FAFB; }
.roleBadge{ font-size:11px; font-weight:700; padding:3px 9px; border-radius:999px; background:#E7F0FB; color:var(--steel); }
.activeDot{ width:8px; height:8px; border-radius:50%; display:inline-block; }
.activeDot.on{ background:var(--good); } .activeDot.off{ background:var(--bad); }
.rowActions{ display:flex; gap:8px; }
.rowActions a{ font-size:12px; font-weight:700; color:var(--steel); text-decoration:none; cursor:pointer; }
.rowActions a:hover{ text-decoration:underline; }
.emptyState{ padding:50px; text-align:center; color:var(--muted); font-size:13px; }

/* ============================================================================
   PITCH GENERATOR — mostly unique names (.genWrap/.genHead/.genLayout etc.);
   two classes (.editorCard, .row2, .btnPrimary) would have collided with
   the editor-style shared rules above with slightly different values, so
   they're renamed/scoped here instead of silently overriding the shared
   ones.
   ============================================================================ */
.pagePitchGenerator{ }
.genWrap{ max-width:920px; margin:0 auto; padding:28px 24px 80px; }
.genHead{ margin-bottom:22px; }
.genHead h1{ font-family:'Space Grotesk'; font-size:22px; }
.genHead .sub{ font-size:12.5px; color:var(--muted); margin-top:3px; }
.genLayout{ display:grid; grid-template-columns:340px 1fr; gap:20px; align-items:start; }
.genCard{ background:var(--panel); border:1px solid var(--border); border-radius:14px; padding:22px; }
.pagePitchGenerator .row2{ gap:14px; } /* shared .row2 is gap:16px; this page wants 14px */
.pagePitchGenerator .btnPrimary{ width:100%; padding:11px; margin-top:6px; } /* shared .btnPrimary otherwise applies */
.outputCard{ background:var(--panel); border:1px solid var(--border); border-radius:14px; padding:22px; min-height:420px; display:flex; flex-direction:column; }
.outputHead{ display:flex; justify-content:space-between; align-items:center; margin-bottom:12px; }
.outputHead h3{ font-family:'Space Grotesk'; font-size:15px; }
.copyBtn{ background:var(--neutralBg); border:1px solid var(--border); color:var(--text); font-size:12px; font-weight:700; padding:7px 12px; border-radius:8px; cursor:pointer; }
.copyBtn:hover{ border-color:var(--steel); }
.pitchOutput{ flex:1; width:100%; border:1px solid var(--border); border-radius:10px; padding:16px; font-size:13.5px; line-height:1.6; font-family:'Inter',sans-serif; resize:vertical; min-height:280px; background:var(--bg); color:var(--text); }
.emptyHint{ color:var(--muted); font-size:13px; text-align:center; margin:auto; padding:40px 20px; }
.aiBlock{ margin-top:16px; }
.aiBlock summary{ cursor:pointer; font-size:12.5px; font-weight:700; color:var(--steel); }
.aiPromptBox{ margin-top:10px; border:1px dashed var(--border); border-radius:10px; padding:14px; font-size:12px; color:var(--muted); background:var(--neutralBg); white-space:pre-wrap; max-height:220px; overflow-y:auto; }
.toast{ position:fixed; bottom:24px; left:50%; transform:translateX(-50%) translateY(20px); background:var(--navy); color:#fff; padding:12px 20px; border-radius:10px; font-size:12.5px; font-weight:600; opacity:0; pointer-events:none; transition:.25s; z-index:200; }
.toast.show{ opacity:1; transform:translateX(-50%) translateY(0); }
@media(max-width:820px){ .genLayout{ grid-template-columns:1fr; } }

/* ============ Responsive — scoped per page since breakpoints/layouts differ ============ */
/* Operations Hub */
@media(max-width:1100px){
  .pageOpsHub .cards{ grid-template-columns:repeat(3,1fr); }
}
@media(max-width:720px){
  .pageOpsHub .cards{ grid-template-columns:repeat(2,1fr); }
  .pageOpsHub .searchBox{ width:140px; }
}

/* Knowledge Base */
@media(max-width:860px){
  .pageKb .layout{ grid-template-columns:1fr; }
  .pageKb .cards{ grid-template-columns:repeat(2,1fr); }
}
