/* Growth Engine, Step 1: the Prospects view, Settings › Growth and the lead panel's Qualified row and Source and touches.
   Tokens only (public/tokens.css); both themes come from the tokens. */

/* ---------- small status tags (WhatsApp consent, landline) ---------- */
.gr-tag{display:inline-block;flex:none;padding:1px 8px;border-radius:var(--r-pill);border:1px solid var(--line-strong);font:600 11px/16px var(--font);color:var(--muted);white-space:nowrap;vertical-align:middle}
.gr-tag.is-on{border-color:color-mix(in srgb,var(--success) 35%,transparent);background:var(--success-tint);color:var(--success)}
.gr-tag.is-off{border-color:color-mix(in srgb,var(--danger) 30%,transparent);background:var(--danger-tint);color:var(--danger)}
.gr-tag.is-warn{border-color:color-mix(in srgb,var(--warn) 35%,transparent);background:var(--warn-tint);color:var(--warn)}

/* ---------- Prospects ---------- */
.gr-pool .sc-filter select{max-width:220px;padding-right:var(--select-arrow-space)}
.gr-bulk{position:sticky;top:0;z-index:var(--z-sticky);display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px 16px;margin:0 0 12px;padding:8px 8px 8px 16px;border:1px solid var(--accent-border);border-radius:var(--r);background:var(--surface);box-shadow:var(--shadow-card)}
.gr-bulk[hidden]{display:none}
.gr-bulk-count{font:600 14px/20px var(--font);color:var(--text-strong)}
.gr-bulk-actions{display:flex;flex-wrap:wrap;gap:8px}
.gr-list{display:flex;flex-direction:column;gap:12px}
.gr-list[aria-busy="true"]>:not(.skeleton){opacity:.6;transition:opacity var(--dur-quick) ease}
.gr-table{position:relative;padding:0;overflow-x:auto} /* relative: the header's sr-only label stays inside the scroller */
/* Fits the content column from 1024px up (the city rides under the company; company and directory wrap); narrower, it
   scrolls inside its card and the actions column stays pinned to the right edge (is-clipped), so Claim and More actions
   are always in reach. */
.gr-table .data-table{min-width:720px}
.gr-table .data-table th,.gr-table .data-table td{padding-left:12px;padding-right:12px}
.gr-table .data-table th[scope="row"]{min-width:180px}
.gr-table .data-table td:nth-child(4){min-width:140px}
.gr-table .data-table td:nth-child(3) .tnum,.gr-table .data-table td:nth-child(5),.gr-table .data-table td:nth-child(6){white-space:nowrap}
.gr-table .data-table .row-actions{padding-left:8px}
.gr-table .data-table tbody tr:hover>*{background:var(--line-soft)}
/* is-clipped (set by growth.js while the table is wider than its card): the actions column is pinned, with a divider */
.gr-table.is-clipped .data-table .row-actions,.gr-table.is-clipped .data-table thead th:last-child{position:sticky;right:0;z-index:1;background:var(--surface);box-shadow:inset 1px 0 0 var(--line)}
.gr-table.is-clipped .data-table tbody tr:hover>.row-actions{background:linear-gradient(var(--line-soft),var(--line-soft)),var(--surface)}
.gr-table .data-table .gr-pick{width:44px;padding:0 0 0 8px}
.gr-hit{display:grid;place-items:center;width:44px;min-height:44px;cursor:pointer}
.gr-fold{display:none}
.gr-fold-n{color:var(--accent-text)}
.gr-pick input,.gr-card-pick input{width:18px;height:18px;margin:0;accent-color:var(--accent);cursor:pointer;vertical-align:middle}
.gr-company{display:block;font:500 15px/20px var(--font);color:var(--text-strong);overflow-wrap:anywhere}
.gr-sub{display:block;font:400 13px/18px var(--font);color:var(--muted);overflow-wrap:anywhere}
.gr-more{font:500 12px/16px var(--font);color:var(--muted)}
.gr-cards{display:none;list-style:none;margin:0;padding:0;flex-direction:column;gap:8px}
.gr-card{display:grid;grid-template-columns:44px minmax(0,1fr) auto;align-items:start;gap:4px 8px;padding:12px 12px 12px 4px;border-radius:var(--r)}
.gr-card-pick{display:grid;place-items:center;min-height:44px;cursor:pointer}
.gr-card-main{display:flex;flex-direction:column;gap:3px;min-width:0;padding-top:2px}
.gr-card-meta{display:flex;align-items:center;flex-wrap:wrap;gap:6px;font:400 13px/18px var(--font);color:var(--text-2)}
.gr-card-actions{display:flex;align-items:center;gap:4px}
@media (max-width:767px){
  .gr-table{display:none}
  .gr-cards{display:flex}
  .gr-pool .pager{justify-content:space-between}
  .gr-pool .pager-word{display:none}
  .gr-pool .pager .btn{min-width:44px}
  .gr-pool .sc-filter{flex:1 1 calc(50% - 4px)}
  .gr-pool .gr-filters{display:flex}
  .gr-fold{display:inline-flex;flex:none;min-height:44px}
  .gr-pool .sc-filter-search{flex:1 1 170px;order:-1;min-width:0}
  .gr-pool .sc-filter.sc-filter-search input[type="search"]{min-width:0}
  .gr-filters:not(.is-open) .sc-filter:not(.sc-filter-search){display:none}
  .gr-filters:not(.is-open) [data-gr-clear]{display:none}
  .gr-pool .sc-filter select{min-width:0;max-width:none}
  .gr-bulk{padding:8px 12px}
  .gr-bulk-actions{width:100%}
  .gr-bulk-actions>.btn{flex:1 1 auto}
}

/* ---------- Settings › Growth ---------- */
.gr-settings{max-width:760px}
.gr-settings>.banner{margin-top:12px}
.gr-pool-reps{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:8px;margin-top:12px}
.gr-pool-reps .person-name{font-weight:500}
.gr-edit-table{position:relative} /* the header's sr-only label stays inside the scroller */
.gr-edit-table .data-table td{padding:6px 8px}
.gr-edit-table .data-table th{padding:10px 8px}
.gr-edit-table .data-table td input{min-height:36px;padding:6px 10px;font-size:14px}
.gr-edit-table:has(tbody:empty){display:none}
/* Settings › Growth › Ad codes with the owner's Meta ad ids (eight fields a row, too many for one line in the 760px form):
   from 1024px each code is a block of labelled fields four across (Code, Product, Campaign, Ad set, then Ad, Meta ad ids
   over two, Note), Remove at its corner, like the stacked rows below 1024px. No field is squeezed (Code keeps its 8
   characters, the ids an 18-digit Meta ad id) and nothing sits behind a horizontal scroll. A manager's table (no ids)
   stays a table. */
@media (min-width:1024px){
  .gr-edit-table:has(td.gr-meta-ids){border:0;border-radius:0;overflow:visible}
  .gr-edit-table:has(td.gr-meta-ids) .data-table{display:block;min-width:0}
  .gr-edit-table:has(td.gr-meta-ids) thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
  .gr-edit-table:has(td.gr-meta-ids) tbody{display:flex;flex-direction:column;gap:8px}
  .gr-edit-table:has(td.gr-meta-ids) tbody tr{position:relative;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px 12px;padding:12px 60px 12px 12px;border:1px solid var(--line-soft);border-radius:var(--r)}
  .gr-edit-table:has(td.gr-meta-ids) .data-table td{display:flex;flex-direction:column;gap:4px;min-width:0;padding:0;border:0}
  .gr-edit-table:has(td.gr-meta-ids) td[data-label]::before{content:attr(data-label);font:500 12px/16px var(--font);color:var(--muted)}
  .gr-edit-table:has(td.gr-meta-ids) .data-table td.row-actions{position:absolute;top:4px;right:4px}
  .gr-edit-table:has(td.gr-meta-ids) td.gr-meta-ids{grid-column:span 2}
}
.gr-ads-h{scroll-margin-top:16px} /* the Ads screen's links land here */
.gr-url{overflow-wrap:anywhere}
.gr-settings .set-facts li{display:flex;align-items:center;flex-wrap:wrap;gap:6px 8px}
.gr-settings .chip-row{display:flex;flex-wrap:wrap;gap:8px}
@media (pointer:coarse),(max-width:767px){.gr-edit-table .data-table td input{min-height:44px;font-size:16px}}
/* Narrower than the 640px table (tablet and phone): each row stacks into a small labelled block, Remove at its corner,
   so nothing sits off to the side behind a horizontal scroll. */
@media (max-width:1023px){
  .gr-edit-table{border:0;border-radius:0;overflow:visible}
  .gr-edit-table .data-table{display:block;min-width:0}
  .gr-edit-table thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
  .gr-edit-table tbody{display:flex;flex-direction:column;gap:8px}
  .gr-edit-table tbody tr{position:relative;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 12px;padding:12px;border:1px solid var(--line-soft);border-radius:var(--r)}
  .gr-edit-table tbody tr:has(td.row-actions){padding-right:60px}
  .gr-edit-table .data-table td{display:flex;flex-direction:column;gap:4px;min-width:0;padding:0;border:0}
  .gr-edit-table td[data-label]::before{content:attr(data-label);font:500 12px/16px var(--font);color:var(--muted)}
  .gr-edit-table .data-table td.row-actions{position:absolute;top:4px;right:4px}
  .gr-edit-table td.row-actions .btn-icon{width:44px;height:44px}
}
@media (max-width:480px){.gr-edit-table tbody tr{grid-template-columns:minmax(0,1fr)}}

/* ---------- lead panel: Qualified (status tier) ---------- */
.p-qual{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-top:16px;padding-top:14px;border-top:1px solid var(--line-soft)}
.p-qual-main{display:flex;flex-direction:column;gap:2px;min-width:0}
.p-qual-meta{font:400 13px/18px var(--font);color:var(--text-2)}
.p-qual .switch{flex:none}
@media (pointer:coarse){.p-qual .switch{width:52px;height:30px}.p-qual .switch .track::after{width:24px;height:24px}.p-qual .switch input:checked+.track::after{transform:translateX(22px)}}

/* ---------- lead panel: Source and touches ---------- */
.gr-meta{max-width:55%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.gr-touches{display:flex;flex-direction:column;gap:16px;padding:4px 20px 20px}
.gr-first{display:flex;flex-direction:column;align-items:flex-start;gap:4px}
.gr-first-value{margin:0;font:400 15px/22px var(--font);color:var(--text)}
.gr-first-value strong{font-weight:600;color:var(--text-strong)}
.gr-first-extra{margin:0;font:400 13px/18px var(--font);color:var(--muted)}
.gr-first-extra:empty{display:none}
.gr-first .btn{margin-top:6px}
.gr-consent ul{list-style:none;margin:6px 0 0;padding:0;display:flex;flex-direction:column;gap:4px}
.gr-consent-row{display:flex;align-items:center;flex-wrap:wrap;gap:8px;min-height:36px;font:400 14px/20px var(--font);color:var(--text)}
.gr-consent-row .btn{margin-left:auto}
.gr-touch-list{list-style:none;margin:8px 0 0;padding:0;display:flex;flex-direction:column}
.gr-touch{position:relative;display:grid;grid-template-columns:16px minmax(0,1fr);gap:10px;padding:0 0 12px}
.gr-touch:not(:last-child)::before{content:'';position:absolute;left:7px;top:14px;bottom:0;width:1px;background:var(--line)}
.gr-touch-dot{width:9px;height:9px;margin:6px 0 0 3px;border-radius:50%;background:var(--muted)}
.gr-touch:first-child .gr-touch-dot{background:var(--text-strong)}
.gr-touch-main{display:flex;flex-direction:column;gap:1px;min-width:0}
.gr-touch-kind{font:500 14px/20px var(--font);color:var(--text-strong)}
.gr-touch-extra{font:400 13px/18px var(--font);color:var(--text-2);overflow-wrap:anywhere}
.gr-touch-when{font:400 12px/16px var(--font);color:var(--muted)}
.gr-empty{margin:6px 0 0;font:400 13px/18px var(--font);color:var(--muted);max-width:52ch}
.gr-timeline>.btn{margin-top:4px}
@media (max-width:767px){.gr-touches{padding:4px 16px 16px}.gr-meta{max-width:45%}}
@media (forced-colors:active){.gr-tag{border:1px solid CanvasText}.gr-touch-dot{background:CanvasText}}

/* ---------- Growth Engine, Step 2 ---------- */
/* Settings › Growth: the Interakt connection's Send test and its answer */
.gr-test{align-items:center}
.gr-test .ui-hint{margin:0}
.gr-test-result{margin-top:8px}
.gr-test-result:empty{display:none}
.gr-test-result.is-ok{color:var(--success)}
.gr-test-result.is-bad{color:var(--danger)}

/* Today: Awaiting reply (the WhatsApp mark rides inside the due signal) */
.t-row-line2 .due>.icon{flex:none;margin-right:4px;vertical-align:-2px}

/* Settings › Import directory */
.dir{max-width:760px}
.dir-intro{margin-top:4px}
.dir-trail{list-style:none;display:flex;flex-wrap:wrap;gap:8px 20px;margin:16px 0 0;padding:0;font:500 13px/18px var(--font);color:var(--muted)}
.dir-trail li{display:inline-flex;align-items:center;gap:8px}
.dir-trail-n{display:inline-grid;place-items:center;width:22px;height:22px;border-radius:var(--r-pill);border:1px solid var(--line-strong);font:600 12px/1 var(--font);color:var(--muted)}
.dir-trail .is-now{color:var(--text-strong)}
.dir-trail .is-now .dir-trail-n{border-color:var(--accent-border);background:var(--accent-tint);color:var(--accent-text)}
.dir-trail .is-done .dir-trail-n{border-color:color-mix(in srgb,var(--success) 35%,transparent);background:var(--success-tint);color:var(--success)}
.dir .set-form,.dir-map,.dir-review,.dir-apply,.dir-done{max-width:none}
.dir-done>.banner{margin-top:16px}
.dir-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 16px}
.dir-rows{list-style:none;margin:12px 0 0;padding:0;display:flex;flex-direction:column;border:1px solid var(--line-soft);border-radius:var(--r)}
.dir-row{display:flex;flex-direction:column;gap:2px;padding:10px 14px;min-width:0}
.dir-row+.dir-row{border-top:1px solid var(--line-soft)}
.dir-row-meta{display:flex;flex-wrap:wrap;align-items:center;gap:4px 8px;margin-top:2px;font:400 13px/18px var(--font);color:var(--text-2)}
.dir-counts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1px;margin:16px 0 0;border:1px solid var(--line-soft);border-radius:var(--r);overflow:hidden;background:var(--line-soft)}
.dir-count{display:flex;flex-direction:column;gap:2px;padding:12px 14px;background:var(--surface);min-width:0}
.dir-count dt{font:500 12px/16px var(--font);color:var(--muted)}
.dir-count dd{margin:0;font:400 22px/28px var(--font-display);font-variant-numeric:tabular-nums;color:var(--text-strong)}
.dir-count dd.tone-danger{color:var(--danger)}
.dir-count dd.tone-accent{color:var(--text-strong)}
.dir-count-note{display:block;font:400 12px/16px var(--font);color:var(--muted)}
.dir-fold{margin-top:12px;border:1px solid var(--line-soft);border-radius:var(--r)}
.dir-fold>summary{display:flex;align-items:center;gap:8px;min-height:44px;padding:0 14px;cursor:pointer;list-style:none;font:500 14px/20px var(--font);color:var(--text)}
.dir-fold>summary::-webkit-details-marker{display:none}
.dir-fold>summary>.icon{flex:none;color:var(--muted);transition:transform var(--dur-quick) var(--ease-out-soft)}
.dir-fold[open]>summary>.icon{transform:rotate(90deg)}
.dir-fold>summary:focus-visible{outline:2px solid var(--focus-ring);outline-offset:2px;border-radius:var(--r)}
.dir-fold-n{margin-left:auto;color:var(--muted)}
.dir-fold .dir-rows{margin:0;border:0;border-top:1px solid var(--line-soft);border-radius:0}
.dir-invalid{list-style:none;margin:0;padding:10px 14px 12px;border-top:1px solid var(--line-soft);display:flex;flex-direction:column;gap:4px;font:400 13px/18px var(--font);color:var(--text-2)}
.dir-fold>.ui-hint{margin:0;padding:0 14px 12px}
.dir-status{margin-top:16px}
.dir-status:empty{display:none}
.dir-progress{display:block;width:100%;height:10px;margin-top:16px;appearance:none;-webkit-appearance:none;border:0;border-radius:var(--r-pill);background:var(--column);overflow:hidden;color:var(--info)}
.dir-progress::-webkit-progress-bar{background:var(--column);border-radius:var(--r-pill)}
.dir-progress::-webkit-progress-value{background:var(--info);border-radius:var(--r-pill)}
.dir-progress::-moz-progress-bar{background:var(--info);border-radius:var(--r-pill)}
.dir-progress-text{margin:8px 0 0;font:500 14px/20px var(--font);color:var(--text)}
.dir-log-list{list-style:none;margin:12px 0 0;padding:0;display:flex;flex-direction:column;border:1px solid var(--line-soft);border-radius:var(--r)}
.dir-log-row{display:flex;align-items:center;flex-wrap:wrap;gap:8px 12px;padding:12px 14px}
.dir-log-row+.dir-log-row{border-top:1px solid var(--line-soft)}
.dir-log-main{flex:1 1 260px;min-width:0;display:flex;flex-direction:column;gap:2px}
@media (max-width:767px){
  .dir-fields{grid-template-columns:minmax(0,1fr)}
  .dir-counts{grid-template-columns:repeat(2,minmax(0,1fr))}
  .dir-log-row .btn{margin-left:auto}
}
@media (forced-colors:active){.dir-progress{border:1px solid CanvasText}.dir-trail-n{border-color:CanvasText}}
.dir [data-dir-from]{align-self:flex-start}
.dir input[type="file"]{max-width:100%;font:400 14px/20px var(--font);color:var(--text-2)}
.dir input[type="file"]::file-selector-button{margin-right:12px;min-height:40px;padding:8px 14px;border:1px solid var(--hairline);border-radius:var(--r);background:var(--surface-sheen),var(--surface);color:var(--text);font:500 14px/20px var(--font);box-shadow:var(--shadow-card);cursor:pointer;transition:border-color var(--dur-quick) ease,color var(--dur-quick) ease}
.dir input[type="file"]:hover::file-selector-button{border-color:var(--line-strong);color:var(--text-strong)}
.dir input[type="file"]:focus-visible{outline:2px solid var(--focus-ring);outline-offset:2px;border-radius:var(--r)}
@media (pointer:coarse){.dir input[type="file"]::file-selector-button{min-height:44px}}

/* Lead panel: WhatsApp attention (a customer waiting for a reply, a message that reads like a stop request) */
.gr-attn{display:grid;gap:8px;margin:0 0 12px}
.gr-attn .banner-text p+p{margin-top:2px}
.gr-attn-note{font-size:13px;line-height:18px}
.gr-attn-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}

/* Lead panel: Chatbot answers (fix E2), right under Qualified: what the customer told the WhatsApp bot or the Interakt
   chatbot, for the first call. Two columns, one under 480px; labels muted, values in the text colour. */
.gr-answers{display:flex;flex-direction:column;gap:8px;margin:12px 0 0;padding:12px 0 0;border-top:1px solid var(--line-soft)}
.gr-answers-head{display:flex;align-items:baseline;justify-content:space-between;flex-wrap:wrap;gap:2px 12px}
.gr-answers-head .p-label{margin:0}
.gr-answers-meta{font:400 12px/16px var(--font);color:var(--muted)}
.gr-answers-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 16px;margin:0}
.gr-answers-list>div{display:flex;flex-direction:column;gap:2px;min-width:0}
.gr-answers-list dt{font:500 12px/16px var(--font);color:var(--muted)}
.gr-answers-list dd{margin:0;font:400 14px/20px var(--font);color:var(--text);overflow-wrap:anywhere}
@media (max-width:479px){.gr-answers-list{grid-template-columns:minmax(0,1fr)}}

/* Settings › Growth › WhatsApp bot */
.gr-bot-switch{display:flex;align-items:center;justify-content:space-between;gap:12px;max-width:420px;margin:12px 0 4px}
.gr-bot-switch>.sheet-label{flex:1;cursor:pointer}
/* Touch: the kill switch is a 44 px row (the text toggles it too) and the switch the panel's Qualified size. */
@media (pointer:coarse){.gr-bot-switch{min-height:44px}.gr-bot-switch>.sheet-label{display:flex;align-items:center;min-height:44px}.gr-bot-switch .switch{width:52px;height:30px}.gr-bot-switch .switch .track::after{width:24px;height:24px}.gr-bot-switch .switch input:checked+.track::after{transform:translateX(22px)}}
.gr-bot-mode{margin:8px 0 0;padding:0;border:0}
.gr-bot-mode legend{margin-bottom:6px}
.gr-bot-mode small{display:block}
.gr-bot-facts{margin-top:10px}
