/* workspace-v3.css — LeadPilot 1.14.1: the approved v3 components (Leads table, document nav, WhatsApp sections,
   route settings). Presentation only; loaded after theme-v2.css. */
.v3-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); display: flex; flex-direction: column; min-width: 0; }
.v3-vtabs { display: flex; gap: 4px; padding: 0 16px; border-bottom: 1px solid var(--line); align-items: center; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.v3-vtabs button { border: 0; background: transparent; padding: 0 10px; height: 44px; font: inherit; font-size: 14px; font-weight: 500; color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; box-shadow: none; border-radius: 0; }
.v3-vtabs button:hover { color: var(--ink); }
.v3-vtabs button.on { color: var(--brand); font-weight: 600; border-bottom-color: var(--brand); }
.v3-vtabs button .n { font-size: 12.5px; color: var(--faint); font-variant-numeric: tabular-nums; } .v3-vtabs button.on .n { color: var(--brand); }
.v3-filters { display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.v3-filters .lbl { font-size: 12.5px; color: var(--muted); margin-right: 2px; } .v3-filters .sp { flex: 1; }
.v3-sel { height: 32px !important; padding: 0 10px !important; border-radius: var(--r) !important; border: 1px solid var(--line2) !important; font-size: 13px !important; color: #334155; background: var(--surface); width: auto !important; min-width: 0; }
.v3-link { border: 0; background: transparent; color: var(--brand); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; padding: 4px 6px; border-radius: var(--r-sm); box-shadow: none; }
.v3-link:hover { background: var(--brand-bg); }
.v3-tablewrap { overflow: auto; }
.v3-table { width: 100%; min-width: 780px; border-collapse: collapse; table-layout: fixed; }
.v3-table th { font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); text-align: left; padding: 0 14px; height: 40px; border-bottom: 1px solid var(--line); font-weight: 600; background: var(--raise); white-space: nowrap; }
.v3-table td { padding: 9px 14px; height: 56px; border-bottom: 1px solid var(--line); vertical-align: middle; font-size: 14px; line-height: 18px; color: var(--ink); }
.v3-table td.clip { overflow: hidden; }
.v3-table td.money { white-space: nowrap; }
.v3-table tr:last-child td { border-bottom: 0; }
.v3-table tbody tr { cursor: pointer; } .v3-table tbody tr:hover td { background: var(--raise); } .v3-table tbody tr:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.v3-table tr.on td { background: var(--brand-bg); } .v3-table tr.on td:first-child { box-shadow: inset 3px 0 0 var(--brand); }
.v3-table td .t { font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v3-table td .t.wrap { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 18px; }
.v3-table td .s { font-size: 13px; line-height: 18px; color: var(--muted); margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v3-table .r { text-align: right; } .v3-table .num { font-variant-numeric: tabular-nums; }
.v3-table .budget { font-weight: 500; color: var(--muted); }
.v3-table td.v3-empty { height: 120px; text-align: center; color: var(--muted); }
.v3-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; padding: 0 9px; height: 24px; border-radius: 999px; border: 1px solid transparent; white-space: nowrap; }
.v3-badge i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; display: inline-block; flex: none; }
.v3-badge.new { background: #EEF1F5; color: #475569; border-color: #E2E8F0; }
.v3-badge.asg { background: var(--brand-bg); color: var(--brand); border-color: #C9DAFB; }
.v3-badge.con { background: #FFF4E0; color: #B45309; border-color: #FBDDA8; }
.v3-badge.quo { background: #EFE9FD; color: #6D28D9; border-color: #D9CCF8; }
.v3-badge.won { background: #E7F6EC; color: #15803D; border-color: #BFE6CC; }
.v3-badge.lost { background: #FDECEC; color: #B91C1C; border-color: #F5C2C2; }
.v3-owner { display: inline-flex; align-items: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.v3-owner .av { width: 28px; height: 28px; border-radius: 50%; background: #E3E9F2; color: #334155; font-size: 11.5px; font-weight: 700; display: inline-grid; place-items: center; margin-right: 8px; flex: none; }
.v3-owner.none { color: var(--muted); } .v3-owner.none .av { background: var(--raise); color: var(--faint); }
.v3-foot { display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); gap: 12px; }
.v3-advanced { margin-top: 16px; } .v3-advanced > summary { cursor: pointer; font-weight: 600; font-size: 13.5px; color: var(--muted); padding: 8px 0; }
.v3-advanced[open] > summary { color: var(--ink); margin-bottom: 8px; }
.v3-advanced .feedbar:has(> #crmSearch) { display: flex !important; } /* the old table keeps its own search once opened */
.hidden { display: none !important; }
/* the drawer header: company first */
.crm-drawer header h3 { font-size: 18px; font-weight: 700; letter-spacing: -.2px; }
.crm-drawer header .d-sub { font-size: 13px; color: var(--muted); margin-top: 3px; line-height: 1.4; }
.crm-drawer header .d-id { font-family: inherit; font-size: 12px; margin-top: 4px; }
/* Documents */
.v3-docnav { flex-direction: row !important; justify-content: space-between; align-items: center; }
.v3-docnav .qi-toolbar { align-items: center; }
.v3-menuhost { position: relative; }
.v3-menu { position: absolute; right: 0; top: 44px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 8px 28px rgba(16, 36, 58, .14); min-width: 220px; padding: 6px; z-index: 30; display: flex; flex-direction: column; }
.v3-menu .v3-menuitem { width: 100%; text-align: left; border: 0 !important; background: transparent !important; padding: 9px 10px !important; border-radius: var(--r-sm) !important; font-size: 13.5px !important; box-shadow: none !important; color: var(--ink) !important; }
.v3-menu .v3-menuitem:hover { background: var(--raise) !important; }
.qi-grid { grid-template-columns: 272px minmax(0, 1fr) !important; }
.qi-grid .qi-preview { display: none; }
.qi-grid.show-preview { grid-template-columns: minmax(0, 1fr) 420px !important; }
.qi-grid.show-preview .qi-list { display: none; } .qi-grid.show-preview .qi-preview { display: block; grid-column: auto; }
.qi-grid.three { grid-template-columns: 272px minmax(0, 1fr) 420px !important; }
.qi-grid.three .qi-list { display: block; } .qi-grid.three .qi-preview { display: block; grid-column: auto; }
.qi-grid .qi-preview.empty { display: none !important; }
/* WhatsApp */
.v3-sectabs { display: inline-flex; border: 1px solid var(--line2); border-radius: var(--r); overflow: hidden; background: var(--surface); margin-bottom: 16px; }
.v3-sectabs button { white-space: nowrap; border: 0; border-left: 1px solid var(--line); background: transparent; padding: 0 12px; height: 36px; font: inherit; font-size: 13.5px; font-weight: 500; color: #334155; cursor: pointer; border-radius: 0; box-shadow: none; }
.v3-sectabs button:first-child { border-left: 0; } .v3-sectabs button.on { background: var(--brand-bg); color: var(--brand); font-weight: 600; }
.v3-seg3 { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line2); border-radius: var(--r); overflow: hidden; background: var(--surface); margin-bottom: 8px; }
.v3-seg3 button { border: 0; border-left: 1px solid var(--line); background: transparent; height: 34px; font: inherit; font-size: 13px; font-weight: 500; color: #334155; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 6px; border-radius: 0; box-shadow: none; }
.v3-seg3 button:first-child { border-left: 0; } .v3-seg3 button.on { background: var(--brand-bg); color: var(--brand); font-weight: 600; }
.v3-seg3 button .n { font-size: 12px; color: var(--muted); } .v3-seg3 button.on .n { color: var(--brand); }
.wt-split.v3-wa-split { grid-template-columns: 240px minmax(0, 1fr) 320px !important; gap: 16px; align-items: start; }
.v3-wa-preview { position: sticky; top: 12px; background: var(--raise); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; }
.v3-wa-preview .wt-bubble { margin-top: 10px; }
.v3-wa-footer { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.v3-wa-footer .wt-check { flex-basis: 100%; }
.wt-head-actions #waTplSave { display: none; } /* the save lives in the footer */
.wt-head-actions:has(#waTplSave) .wt-pill { margin-left: 0; }
@media (max-width: 1180px) { .wt-split.v3-wa-split { grid-template-columns: 220px minmax(0, 1fr) !important; } .v3-wa-preview { grid-column: 1 / -1; position: static; } }
/* document list in 272 px: number + customer stacked, total + status on the right */
.qi-table th:nth-child(2), .qi-table td:nth-child(2) { display: none; }
.qi-table td:first-child b { font-family: inherit; font-size: 13.5px; }
.qi-table td:first-child .sm { white-space: normal; }
.qi-table td { padding: 10px 10px; }
.v3-wa-split > * { min-width: 0; }
.wt-ed-head { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; }
.wt-ed-head .wt-inline { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); }
.v3-wa-listcol { min-width: 0; }
.wt-head h2 { display: none; } .wt-head { margin-bottom: 8px; }
/* Pipeline: stage-jump row + edge cues */
.v3-jumprow { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; } .v3-jumprow .sp { flex: 1; }
.v3-jump { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.v3-jump button { height: 30px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line2); background: var(--surface); font: inherit; font-size: 12.5px; font-weight: 500; color: #334155; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; box-shadow: none; }
.v3-jump button:hover { border-color: #334155; } .v3-jump button i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; } .v3-jump button .n { color: var(--muted); font-variant-numeric: tabular-nums; }
.v3-scroll { width: 32px; padding: 0 !important; justify-content: center; font-size: 16px; } .v3-scroll[disabled] { opacity: .4; }
.v3-boardshell { position: relative; min-width: 0; }
.v3-edge { position: absolute; top: 0; bottom: 6px; width: 36px; pointer-events: none; opacity: 0; transition: opacity .15s; }
.v3-edge.l { left: 0; background: linear-gradient(90deg, var(--bg), transparent); } .v3-edge.r { right: 0; background: linear-gradient(270deg, var(--bg), transparent); } .v3-edge.show { opacity: 1; }
/* Lead Bot dashboard */
body.v3-bot .top .bar { align-items: center; flex-wrap: nowrap; gap: 12px; }
body.v3-bot .pagehead { flex: 1; min-width: 0; }
body.v3-bot .pagehead h1 { display: inline; } body.v3-bot .pagehead .v3-crumb { margin-left: 10px; font-size: 13px; color: var(--faint); font-weight: 500; }
body.v3-bot .top .bar #state, body.v3-bot .top .bar #cloudChip { display: none; }
body.v3-bot .v3-botactions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
body.v3-bot .v3-botactions .mode { margin: 0 !important; } body.v3-bot .v3-botactions .mode button { padding: 6px 14px; }
body.v3-bot .top { padding-bottom: 12px; }
body.v3-bot .top .funnel, body.v3-bot .top #scanline, body.v3-bot .top #feedPick, body.v3-bot .top .licrow, body.v3-bot .top #miniStats { display: none !important; }
body.v3-bot.clean-secondary .v3-botactions { display: none; }
.v3-dash { display: flex; flex-direction: column; gap: 14px; }
.v3-strip { padding: 10px 16px; gap: 8px; }
.v3-striprow { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; min-height: 28px; }
.v3-striprow #state { display: inline-flex; } .v3-striprow #scanline { padding: 0; margin: 0; border: 0; background: transparent; font-size: 13px; color: var(--muted); }
.v3-striprow .sp { flex: 1; } .v3-striprow #cloudChip { margin: 0; }
.v3-strip #feedPick { margin: 0; padding: 8px 0 0; border-top: 1px solid var(--line); }
.v3-counters { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.v3-counter { padding: 14px 16px; border-right: 1px solid var(--line); } .v3-counter:last-child { border-right: 0; }
.v3-counter .k, .v3-counter .k > span { font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.v3-counter .v, .v3-counter .v b { font-size: 26px !important; font-weight: 700; margin: 2px 0 0 !important; color: var(--ink); line-height: 1.2; }
.v3-counter .v b small { font-size: 13px; color: var(--muted); font-weight: 500; margin-left: 2px; }
.v3-counter .limbar { margin-top: 8px; }
.v3-livecard { padding: 12px 16px; } .v3-livecard .livemain { flex: none; width: 100%; }
body.v3-bot #tab-live:not(.hidden) { display: block; }
.v3-dash .v3-advanced { margin-top: 0; } .v3-dash .liveside { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 1000px) { .v3-dash .liveside { grid-template-columns: 1fr; } body.v3-bot .top .bar { flex-wrap: wrap; } }
.v3-boardshell .crm-col-head .n { position: static; }
/* navigation: the active leaf is the only highlighted page button; a CRM leaf stays plain while a Lead Bot page is open */
body.full .crm-subnav button.on:not(.lp-leaf) { background: transparent; color: var(--navy-ink) !important; font-weight: 500; }
body.full .crm-subnav button.on:not(.lp-leaf)::before { display: none; }
body.full .crm-subnav button.on:not(.lp-leaf) .lp-ic { color: var(--navy-icon); }
body.full .crm-subnav button.on:not(.lp-leaf) .n { color: var(--navy-muted); }
/* CRM header controls belong to Leads and Pipeline only */
body.full:not([data-lp-pane="leads"]):not([data-lp-pane="pipeline"]) .crm-head .crm-search, body.full:not([data-lp-pane="leads"]):not([data-lp-pane="pipeline"]) .crm-head > .btn.primary { display: none; }
/* lead panel: actions first */
.v3-panel-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0 0 14px; }
.v3-panel-acts .btn { justify-content: center; text-align: center; }
.v3-panel-acts .btn.primary { grid-column: auto; } .v3-panel-acts .btn.primary.v3-quote { grid-column: 1 / -1; } .v3-panel-acts .btn[disabled] { opacity: .55; cursor: not-allowed; }
.v3-panel-acts .v3-nophone { grid-column: 1 / -1; }
.v3-panel-more .btn { font-size: 12.5px; padding: 6px 10px; }
