/* Cosmo v2 interface: the Atlas Design System (Atlas-Platform/design-system.html, design-tokens.md) applied to Cosmo.
   "Content first. Chrome on glass. One colour thing." Atlas's one colour is purple; Cosmo's is its blue (purple is Atlas).
   Greys are Atlas's neutral scale, the font is the system font, cards are flat with a hairline, menus float on material.
   Loaded only by index.html; /classic.html is the previous interface, untouched. Layout and behaviour: v2.js. */

/* ---------- tokens: Atlas neutrals instead of Cosmo's blue-tinted greys ---------- */
:root, :root[data-theme="dark"] {
  --bg: #0e0e0e; --plane: #0e0e0e;
  --surface: #161616; --surface-2: #1c1c1c; --surface-3: #2a2a2a; --card: #161616; --panel: #161616;
  --ink: #f5f5f5; --ink-2: rgba(245,245,245,.72); --muted: rgba(245,245,245,.46);
  --line: #262626; --line-2: #333333;
  --sb-bg: #0e0e0e; --sb-line: #262626; --sb-ink: #f5f5f5; --sb-muted: #a3a3a3; --sb-chip: #1c1c1c; --sb-hover: #1c1c1c; --sb-active: #2a2a2a; --sb-active-ink: #f5f5f5;
  --grid: rgba(255,255,255,.07);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", Inter, "Segoe UI", system-ui, sans-serif;
  --num: -apple-system, BlinkMacSystemFont, "SF Pro Display", Inter, "Segoe UI", system-ui, sans-serif;
  --soft: #1c1c1c; --on: #2a2a2a;
  --mat: rgba(22,22,22,.66); --mat-thick: rgba(26,26,26,.9); --mat-edge: rgba(255,255,255,.09); --mat-hi: rgba(255,255,255,.08);
  --sh-card: 0 1px 3px rgba(0,0,0,.3);
  --sh-float: 0 0 0 1px rgba(255,255,255,.06), 0 12px 32px -6px rgba(0,0,0,.6);
  --sh-over: 0 0 0 1px rgba(255,255,255,.08), 0 30px 80px -10px rgba(0,0,0,.75);
  --ease: cubic-bezier(.2,.8,.2,1); --spring: cubic-bezier(.34,1.3,.64,1);
}
:root[data-theme="light"] {
  --bg: #ffffff; --plane: #ffffff;
  --surface: #ffffff; --surface-2: #f5f5f5; --surface-3: #ebebeb; --card: #ffffff; --panel: #ffffff;
  --ink: #171717; --ink-2: rgba(23,23,23,.72); --muted: rgba(23,23,23,.5);
  --line: #e5e5e5; --line-2: #d4d4d4;
  --sb-bg: #ffffff; --sb-line: #e5e5e5; --sb-ink: #171717; --sb-muted: #737373; --sb-chip: #f5f5f5; --sb-hover: #f5f5f5; --sb-active: #ebebeb; --sb-active-ink: #171717;
  --grid: #f0f0f0;
  --soft: #f5f5f5; --on: #ebebeb;
  --mat: rgba(255,255,255,.7); --mat-thick: rgba(252,252,252,.9); --mat-edge: rgba(0,0,0,.08); --mat-hi: rgba(255,255,255,.85);
  --sh-card: 0 1px 3px rgba(0,0,0,.06);
  --sh-float: 0 1px 2px rgba(0,0,0,.05), 0 10px 30px -6px rgba(0,0,0,.12);
  --sh-over: 0 2px 8px rgba(0,0,0,.06), 0 28px 70px -10px rgba(0,0,0,.22);
}
body.cv2 { font-family: var(--font); letter-spacing: -.006em; -webkit-font-smoothing: antialiased; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- type: Large Title once per page, Title 3 for sections ---------- */
.page-t { font-size: 32px; font-weight: 700; letter-spacing: -.03em; }
.h2 { font-size: 17px; font-weight: 600; letter-spacing: -.015em; }

/* ---------- cards: flat panel, hairline, radius 18 ---------- */
.card { background: var(--panel); border: 0; box-shadow: var(--sh-card), inset 0 0 0 1px var(--line); border-radius: 18px; }

/* ---------- rail: flat on the page with a hairline; the current page is a grey fill ---------- */
.sidebar { width: 72px; background: var(--bg); border-right: 1px solid var(--line); padding: 14px 0 16px; }
/* Atlas rail: the pages start at the top (Cosmo first), search, bell and the profile picture sit at the bottom.
   Every item is the same 42px square with a 20px outline icon; the current page is a grey fill. */
.nav-wrap { flex: 0 0 auto; align-items: flex-start; margin-top: 0; width: 100%; }
.nav { gap: 6px; }
.nav-item { width: 42px; height: 42px; border-radius: 12px; border: 0; color: var(--muted); }
.nav-item:hover { background: var(--soft); color: var(--ink); border-color: transparent; }
.nav-item.active, .nav-item.active:hover { background: var(--on); color: var(--ink); border: 0; box-shadow: none; }
.nav-label { background: var(--mat-thick); color: var(--ink); box-shadow: var(--sh-float); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
.nav-badge { border-color: var(--bg); }
.sb-foot { gap: 6px; }
#sbSettings { display: none; }
.sb-foot .tb-ic { width: 42px; height: 42px; border: 0; border-radius: 12px; background: transparent; color: var(--muted); }
.sb-foot .tb-ic:hover { background: var(--soft); color: var(--ink); transform: none; }
.sb-foot .tb-ic svg { width: 20px; height: 20px; }
.sb-foot .tb-av { width: 42px; height: 42px; margin: 0; border: 0; border-radius: 12px; background: transparent; display: inline-flex; align-items: center; justify-content: center; box-shadow: none; transition: background .15s; }
.sb-foot .tb-av:hover { background: var(--soft); box-shadow: none; }
.sb-foot .tb-av .sb-av { width: 30px; height: 30px; border-radius: 50%; box-shadow: 0 0 0 1px var(--line); }

/* ---------- top bar: only there when a page has a tab row in it ---------- */
.topbar { background: var(--bg); }
@media (min-width: 861px) {
  .topbar:has(#tbSlot:empty) { padding-top: 6px; padding-bottom: 0; margin-bottom: 18px; min-height: 0; }
  html.cv-on-agent .topbar { display: none; }
  html.cv-on-agent .main { padding-top: 0; padding-bottom: 0; }
  html.cv-on-agent .ag-wrap { margin: 0 -36px; height: 100vh; height: 100dvh; }
}

/* ---------- buttons: pills, grey fills, one blue thing per view ---------- */
.btn { border-radius: 999px; }
button:active:not(:disabled), .btn:active { transform: scale(.97); }

/* =====================================================================
   COSMO: the main page. Left: money and to-dos. Middle: the agent. Right: chats.
   ===================================================================== */
.ag-wrap { gap: 0; }
.cv-left { width: 340px; flex-shrink: 0; display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--line); padding: 22px 18px 0 22px; background: var(--bg); }
.cvl-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.cvl-head h1 { margin: 0; font-size: 32px; font-weight: 700; letter-spacing: -.03em; line-height: 1.1; color: var(--ink); }
.cvl-x { display: none; width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--soft); color: var(--ink); align-items: center; justify-content: center; }
.cvl-seg { display: flex; gap: 6px; margin-bottom: 18px; flex-wrap: wrap; }
.cvl-seg button, .pl-pills button { height: 32px; padding: 0 14px; border-radius: 999px; border: 0; background: transparent; box-shadow: inset 0 0 0 1px var(--line); color: var(--ink-2); font: inherit; font-size: 13.5px; font-weight: 500; display: inline-flex; align-items: center; gap: 7px; cursor: pointer; transition: background .15s, color .15s, box-shadow .15s; white-space: nowrap; }
.cvl-seg button:hover, .pl-pills button:hover { background: var(--soft); color: var(--ink); }
.cvl-seg button.on, .pl-pills button.on { background: var(--ink); color: var(--bg); box-shadow: none; font-weight: 600; }
.cvl-seg i, .pl-pills i { font-style: normal; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--on); color: var(--ink); font-size: 11.5px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; font-variant-numeric: tabular-nums; }
.cvl-seg button.on i, .pl-pills button.on i { background: color-mix(in srgb, var(--bg) 22%, transparent); color: var(--bg); }
.cvl-seg .cvl-n { background: var(--crit); color: #fff; }
.cvl-body { flex: 1; min-height: 0; overflow-y: auto; padding: 0 4px 28px 0; margin-right: -4px; scrollbar-width: thin; }

/* payments */
.pay-t { display: flex; align-items: baseline; gap: 8px; font-size: 21px; font-weight: 700; letter-spacing: -.02em; color: var(--ink); }
.pay-range { position: relative; display: inline-flex; align-items: center; gap: 3px; font-size: 14px; font-weight: 500; color: var(--muted); cursor: pointer; }
.pay-range:hover { color: var(--ink); }
.pay-range select { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.pay-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin: 10px 0 22px; }
.pay-l { font-size: 13px; color: var(--muted); }
.pay-v { font-family: var(--num); font-size: 36px; font-weight: 700; letter-spacing: -.035em; line-height: 1.05; color: var(--ink); margin-top: 2px; }
.pay-p { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.pay-spark { width: 132px; height: 46px; flex-shrink: 0; overflow: visible; }
.tx-h { display: flex; align-items: baseline; justify-content: space-between; margin: 0 2px 10px; font-size: 15px; font-weight: 600; color: var(--ink); }
.tx-hn { font-size: 12.5px; font-weight: 500; color: var(--muted); }

/* a transaction card: day header, rows, Show more */
.tx-card { background: var(--panel); border-radius: 18px; box-shadow: var(--sh-card), inset 0 0 0 1px var(--line); padding: 12px 8px 8px; margin-bottom: 12px; }
.tx-ch { display: flex; justify-content: space-between; align-items: baseline; padding: 2px 10px 8px; font-size: 14px; font-weight: 600; color: var(--ink); }
.tx-cn { font-size: 12.5px; font-weight: 500; color: var(--muted); }
.tx-row, .cvt-row { width: 100%; display: flex; align-items: center; gap: 12px; padding: 9px 10px; border: 0; border-radius: 12px; background: transparent; color: var(--ink); font: inherit; text-align: left; cursor: pointer; text-decoration: none; transition: background .15s; }
.tx-row:hover, .cvt-row:hover { background: var(--soft); }
.tx-card:not(.all) .tx-more { display: none; }
.tx-av { position: relative; width: 40px; height: 40px; flex-shrink: 0; }
.tx-av > span { width: 40px; height: 40px; border-radius: 50%; background: var(--on); color: var(--ink-2); font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; overflow: hidden; background-size: cover; background-position: center; }
.tx-av img, .pl-av img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.tx-dot { position: absolute; right: -1px; bottom: -1px; width: 13px; height: 13px; border-radius: 50%; border: 2.5px solid var(--panel); background: var(--muted); }
.cv-left .cvt-row .tx-dot { border-color: var(--bg); }
.tx-dot.ok { background: var(--good); } .tx-dot.dep { background: var(--brand); } .tx-dot.pend { background: var(--warn); } .tx-dot.bad { background: var(--crit); }
.tx-m { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tx-n { font-size: 14.5px; font-weight: 600; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: baseline; gap: 8px; }
.tx-d { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-r { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.tx-amt { font-family: var(--num); font-size: 14.5px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ink); white-space: nowrap; }
.tx-amt.mut { color: var(--muted); } .tx-amt.bad { color: var(--crit); }
.tx-sub { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.tx-chip { height: 22px; padding: 0 9px; border-radius: 999px; background: var(--on); color: var(--ink-2); font-size: 11.5px; font-weight: 500; display: inline-flex; align-items: center; }
.tx-show { display: flex; align-items: center; justify-content: center; gap: 4px; width: 100%; height: 34px; margin-top: 2px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; }
.tx-show:hover { color: var(--ink); background: var(--soft); }

/* to-do */
.cvt-note { font-size: 12.5px; color: var(--muted); margin: -4px 2px 10px; }
.cvt-row { padding: 10px 8px; align-items: flex-start; }
.cvt-t { font-size: 11.5px; font-weight: 400; color: var(--muted); }
.cvt-q { font-size: 12.5px; color: var(--ink-2); margin-top: 4px; padding: 6px 10px; border-radius: 4px 12px 12px 12px; background: var(--soft); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: normal; }
.cvt-open { width: 32px; height: 32px; flex-shrink: 0; border-radius: 50%; border: 0; background: transparent; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.cvt-open:hover { background: var(--on); color: var(--ink); }
.cv-link { display: inline-flex; align-items: center; gap: 4px; margin: 4px 10px; font-size: 13px; color: var(--muted); text-decoration: none; }
.cv-link:hover { color: var(--ink); }
.cv-empty-s { padding: 18px 16px; border-radius: 16px; background: var(--soft); color: var(--muted); font-size: 13px; line-height: 1.5; }
.cv-empty-s b { display: block; color: var(--ink); font-weight: 600; margin-bottom: 2px; }
.cv-sk { height: 64px; border-radius: 16px; margin-bottom: 10px; background: linear-gradient(90deg, var(--soft) 0%, var(--on) 50%, var(--soft) 100%); background-size: 200% 100%; animation: cvSk 1.3s linear infinite; }
.cv-sk.s { height: 140px; }
@keyframes cvSk { to { background-position: -200% 0; } }

/* the middle: start screen like Atlas (cards, the big question, the composer under it) */
.ag-main { padding: 22px 40px 26px; }
.ag-main.cv-empty { justify-content: center; }
.ag-main.cv-empty .ag-stream { flex: 0 0 auto; overflow: visible; padding-bottom: 26px; }
.ag-main.cv-empty .ag-foot, .ag-main .ag-foot { width: 100%; max-width: 860px; margin: 0 auto; }
.ag-stream > .ag-msg, .ag-stream > .ag-tools { width: 100%; max-width: 860px; margin-left: auto; margin-right: auto; }
.cv-hero { display: flex; flex-direction: column; align-items: center; gap: 34px; width: 100%; max-width: 860px; margin: 0 auto; }
.cv-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; width: 100%; }
.cv-card { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-height: 132px; padding: 18px 18px 16px; border: 0; border-radius: 18px; background: var(--panel); box-shadow: var(--sh-card), inset 0 0 0 1px var(--line); color: var(--ink); font: inherit; text-align: left; cursor: pointer; transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .15s; animation: cvRise .5s var(--ease) both; }
.cv-card:nth-child(2) { animation-delay: .05s; } .cv-card:nth-child(3) { animation-delay: .1s; }
.cv-card:hover { transform: translateY(-2px); box-shadow: var(--sh-float); }
.cv-ci { width: 30px; height: 30px; margin-bottom: 14px; color: var(--ink); display: inline-flex; align-items: center; }
.cv-ct { font-size: 16px; font-weight: 600; letter-spacing: -.015em; }
.cv-cs { font-size: 13px; color: var(--muted); line-height: 1.45; }
.cv-q { margin: 0; font-size: 48px; font-weight: 700; letter-spacing: -.045em; line-height: 1.05; text-align: center; color: var(--ink); animation: cvRise .6s var(--ease) both .08s; }
.cv-hero .ag-ob { width: 100%; }
@keyframes cvRise { from { opacity: 0; transform: translateY(10px); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
@media (prefers-reduced-motion: reduce) { .cv-card, .cv-q { animation: none; } }
/* the composer: a tall rounded field, the send button a blue circle */
.ag-inwrap { border: 0; border-radius: 22px; background: var(--panel); box-shadow: var(--sh-float), inset 0 0 0 1px var(--line); padding: 12px 12px 10px 16px; min-height: 108px; align-items: flex-end; flex-wrap: wrap; position: relative; }
.ag-inwrap .ag-type { flex: 1 1 100%; order: -1; align-self: stretch; }
.ag-inwrap textarea { font-size: 15px; padding: 2px 0 10px; min-height: 48px; }
.ag-plus { order: 0; }
.ag-inwrap > .ag-ic, .ag-inwrap > .ag-send { margin-left: auto; }
.ag-inwrap > .ag-mic { margin-left: auto; }
.ag-inwrap > .ag-mic ~ .ag-send { margin-left: 0; }
.ag-send { width: 36px; height: 36px; border-radius: 50%; background: var(--brand); box-shadow: 0 6px 14px -6px var(--glow); }
.ag-main:not(.cv-empty) .ag-inwrap { min-height: 0; }
.ag-me .ag-bubble { background: var(--on); color: var(--ink); border-radius: 18px 18px 6px 18px; }
:root[data-theme="dark"] .ag-me .ag-bubble { background: var(--on); }

/* the right: chats */
.ag-rail { width: 280px; border-right: 0; border-left: 1px solid var(--line); padding: 16px 14px 14px; background: var(--bg); }
.ag-rail > .ag-new, .ag-rail > .ag-rail-t { display: none; }
.cvr-top { display: flex; align-items: center; justify-content: flex-end; gap: 4px; margin-bottom: 26px; }
.cvr-top button { width: 34px; height: 34px; border-radius: 10px; border: 0; background: transparent; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.cvr-top button:hover { background: var(--soft); color: var(--ink); }
.cvr-sep { width: 1px; height: 18px; background: var(--line); margin: 0 4px; }
#agList { flex: 1; min-height: 0; overflow-y: auto; }
.cvr-g { display: flex; align-items: center; justify-content: space-between; padding: 10px 8px 6px; font-size: 13px; color: var(--muted); }
.cvr-s { width: 26px; height: 26px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.cvr-s:hover { background: var(--soft); color: var(--ink); }
.cvr-q { width: 100%; height: 34px; margin: 0 0 6px; padding: 0 12px; border-radius: 999px; border: 0; box-shadow: inset 0 0 0 1px var(--line); background: var(--soft); color: var(--ink); font: inherit; font-size: 13px; outline: none; box-sizing: border-box; }
.cvr-chat { width: 100%; display: flex; align-items: center; gap: 9px; padding: 8px 8px; border: 0; border-radius: 10px; background: transparent; color: var(--ink); font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.cvr-chat:hover { background: var(--soft); }
.cvr-chat.on { background: var(--on); font-weight: 600; }
.cvr-ic { color: var(--brand); display: inline-flex; flex-shrink: 0; }
.cvr-chat .ct { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cvr-chat .cw { font-size: 12px; color: var(--muted); flex-shrink: 0; font-weight: 400; }
.cvr-none { padding: 8px; font-size: 13px; color: var(--muted); }
.cvr-foot button { width: 100%; display: flex; align-items: center; justify-content: space-between; padding: 10px 8px; border: 0; border-radius: 10px; background: transparent; color: var(--ink); font: inherit; font-size: 14px; cursor: pointer; }
.cvr-foot button:hover { background: var(--soft); }
.cvr-foot span { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12.5px; }

/* narrower computers: chats become a sheet from the right */
@media (min-width: 861px) and (max-width: 1279px) {
  .ag-mtop { display: flex; gap: 8px; justify-content: flex-end; margin-bottom: 6px; }
  .ag-mtop #cvPayBtn, .ag-mtop #agNewM { display: none; }
  .ag-mbtn { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px; border-radius: 999px; border: 0; background: var(--soft); color: var(--ink); font: inherit; font-size: 13px; cursor: pointer; }
  .ag-rail { position: fixed; top: 0; right: 0; bottom: 0; height: 100vh; z-index: 130; width: 300px; transform: translateX(102%); transition: transform .3s cubic-bezier(.22,1,.36,1); box-shadow: none; visibility: hidden; }
  .ag-rail.open { transform: none; box-shadow: var(--sh-over); visibility: visible; }
  .ag-scrim { display: block; position: fixed; inset: 0; z-index: 125; background: rgba(0,0,0,.22); opacity: 0; pointer-events: none; transition: opacity .25s; }
  .ag-scrim.on { opacity: 1; pointer-events: auto; }
  .cv-left { width: 310px; }
  .ag-main { padding: 18px 28px 22px; }
  .cv-q { font-size: 40px; }
}
@media (min-width: 861px) and (max-width: 1040px) { .cv-cards { grid-template-columns: 1fr; } .cv-card { min-height: 0; flex-direction: row; align-items: center; gap: 12px; } .cv-ci { margin: 0; } .cv-cs { margin-left: auto; text-align: right; } }

/* phone: the chat is the page; Money and Chats open as sheets */
@media (max-width: 860px) {
  .cv-left { position: fixed; top: 0; bottom: 0; left: 0; width: min(380px, 92vw); z-index: 130; padding: calc(env(safe-area-inset-top, 0px) + 16px) 14px 0 16px; border-right: 0; border-radius: 0 22px 22px 0; transform: translateX(-102%); visibility: hidden; transition: transform .3s cubic-bezier(.22,1,.36,1), visibility 0s .3s; }
  .cv-left.is-open { transform: none; visibility: visible; box-shadow: var(--sh-over); transition: transform .3s cubic-bezier(.22,1,.36,1); }
  .cvl-x { display: inline-flex; }
  .ag-rail { left: auto !important; right: 0; border-radius: 22px 0 0 22px !important; transform: translateX(102%) !important; border-left: 0; }
  .ag-rail.open { transform: none !important; }
  .ag-mbtn { border: 0 !important; background: var(--soft) !important; border-radius: 999px !important; }
  .ag-main { padding: 6px 14px 10px; }
  .cv-hero { gap: 18px; }
  .cv-q { font-size: 30px; order: -1; margin-top: 6px; }
  .cv-cards { grid-template-columns: 1fr; gap: 8px; }
  .cv-card { min-height: 0; flex-direction: row; align-items: center; gap: 12px; padding: 14px; border-radius: 16px; }
  .cv-ci { margin: 0; width: 22px; }
  .cv-card .cv-cs { display: none; }
  .ag-inwrap { min-height: 0; border-radius: 22px; padding: 8px 8px 8px 12px; }
  .ag-inwrap textarea { min-height: 0; padding: 6px 0; }
  .ag-inwrap .ag-type { flex: 1 1 auto; order: 0; }
  .ag-plus { order: -1; }
}

/* =====================================================================
   PIPELINE: the list
   ===================================================================== */
#p-pipeline.on { display: block; }
.pl-wrap { max-width: 920px; margin: 0 auto; }
.pl-head { display: flex; align-items: center; gap: 14px; margin: 4px 0 18px; flex-wrap: wrap; }
.pl-head h1 { margin: 0; font-size: 32px; font-weight: 700; letter-spacing: -.03em; line-height: 1.1; color: var(--ink); }
.pl-sp { flex: 1; }
.pl-views { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--soft); }
.pl-views button { height: 32px; padding: 0 13px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font: inherit; font-size: 13px; font-weight: 500; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.pl-views button:hover { color: var(--ink); }
.pl-views button.on { background: var(--panel); color: var(--ink); box-shadow: var(--sh-card), inset 0 0 0 1px var(--line); font-weight: 600; }
.pl-bolt { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--soft); color: var(--muted); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: background .2s, color .2s, box-shadow .25s, transform .18s var(--ease); }
.pl-bolt:hover { color: var(--ink); }
.pl-bolt.on { background: var(--brand); color: #fff; box-shadow: 0 8px 20px -8px var(--glow), inset 0 1px 0 rgba(255,255,255,.3); }
.pl-search { display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 16px; border-radius: 999px; background: var(--soft); color: var(--muted); margin-bottom: 14px; cursor: text; transition: box-shadow .25s; }
.pl-search:focus-within { box-shadow: inset 0 0 0 1px var(--line-2), 0 4px 14px rgba(0,0,0,.06); }
.pl-search input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; color: var(--ink); font: inherit; font-size: 15px; }
.pl-search input::-webkit-search-cancel-button { opacity: .5; }
.pl-pills { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 6px; scrollbar-width: none; }
.pl-pills::-webkit-scrollbar { display: none; }
.pl-note { font-size: 12.5px; color: var(--muted); margin: 4px 4px 0; }
.pl-note:empty { display: none; }
.pl-list { display: flex; flex-direction: column; margin-top: 8px; }
.pl-row { display: flex; align-items: flex-start; gap: 14px; width: 100%; padding: 14px 12px; border: 0; border-radius: 16px; background: transparent; color: var(--ink); font: inherit; text-align: left; cursor: pointer; transition: background .15s; animation: cvRise .35s var(--ease) both; }
.pl-row + .pl-row { box-shadow: 0 -1px 0 var(--line); }
.pl-row:hover { background: var(--soft); box-shadow: none; }
.pl-row:hover + .pl-row { box-shadow: none; }
/* the photo with a ring that fills as the lead moves through the stages */
.pl-av { position: relative; width: 52px; height: 52px; flex-shrink: 0; border-radius: 50%; padding: 3px; background: conic-gradient(var(--rc) calc(var(--pg) * 1%), var(--line) 0); }
.pl-av > span { width: 100%; height: 100%; border-radius: 50%; border: 2px solid var(--bg); background: var(--on); color: var(--ink-2); font-size: 14px; font-weight: 600; display: flex; align-items: center; justify-content: center; overflow: hidden; box-sizing: border-box; background-size: cover; background-position: center; }
.pl-row:hover .pl-av > span { border-color: var(--soft); }
.pl-m { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.pl-top { display: flex; align-items: center; gap: 8px; }
.pl-n { font-size: 16px; font-weight: 600; letter-spacing: -.015em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.pl-t { margin-left: auto; font-size: 12.5px; color: var(--muted); flex-shrink: 0; }
.pl-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--brand); flex-shrink: 0; }
.pl-msg { font-size: 14px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-msg.un { color: var(--ink); }
.pl-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.pl-chip { height: 24px; padding: 0 10px; border-radius: 999px; background: var(--soft); color: var(--ink-2); font-size: 12px; font-weight: 500; display: inline-flex; align-items: center; gap: 5px; }
.pl-row:hover .pl-chip { background: var(--on); }
.pl-chip.ai { background: var(--brand-soft); color: var(--brand); }
.pl-chip.you { background: var(--crit-soft); color: var(--crit); }
.pl-more { padding: 16px; text-align: center; font-size: 13px; color: var(--muted); }
.pl-empty { margin-top: 10px; }
#cvToList { height: 34px; display: inline-flex; align-items: center; gap: 6px; }
@media (max-width: 860px) {
  .pl-head { gap: 10px; margin-bottom: 12px; }
  .pl-head h1 { font-size: 28px; }
  .pl-views { order: 5; width: 100%; justify-content: stretch; }
  .pl-views button { flex: 1; justify-content: center; }
  .pl-row { padding: 12px 6px; gap: 12px; }
  .pl-av { width: 48px; height: 48px; }
  .pl-n { font-size: 15px; }
}

/* =====================================================================
   ANALYTICS: deals as transactions
   ===================================================================== */
#dealTbl .tx-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; align-items: start; }
#dealTbl .tx-card { margin: 0; box-shadow: inset 0 0 0 1px var(--line); }
.lr { border-radius: 14px; }
.lr:hover { background: var(--soft); }

/* =====================================================================
   PROFILE MENU: floats on thick material
   ===================================================================== */
.cv-me { position: fixed; z-index: 400; width: 260px; padding: 6px; border-radius: 16px; background: var(--mat-thick); -webkit-backdrop-filter: blur(30px) saturate(1.8); backdrop-filter: blur(30px) saturate(1.8); box-shadow: var(--sh-over), inset 0 0 0 .5px var(--mat-edge); display: none; transform-origin: bottom left; }
.cv-me.is-open { display: block; animation: cvPop .28s var(--spring); }
@keyframes cvPop { from { opacity: 0; transform: scale(.94) translateY(6px); } to { opacity: 1; transform: none; } }
.cvm-h { display: flex; align-items: center; gap: 10px; padding: 10px 10px 12px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.cvm-h img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; background: var(--on); flex-shrink: 0; }
.cvm-h > span { min-width: 0; display: flex; flex-direction: column; }
.cvm-h b { font-size: 14px; font-weight: 600; color: var(--ink); }
.cvm-h b + span { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cv-me button, .cv-me a { width: 100%; display: flex; align-items: center; gap: 11px; padding: 9px 10px; border: 0; border-radius: 9px; background: transparent; color: var(--ink); font: inherit; font-size: 14px; text-align: left; text-decoration: none; cursor: pointer; }
.cv-me button:hover, .cv-me a:hover { background: var(--on); }
.cv-me svg { color: var(--muted); flex-shrink: 0; }
.cvm-sep { display: block; height: 1px; background: var(--line); margin: 5px 8px; }

/* =====================================================================
   PHONE TAB BAR: floating glass, the selected tab a grey capsule
   ===================================================================== */
@media (max-width: 860px) {
  .tabbar { grid-template-columns: repeat(4, minmax(0, 1fr)) 52px; left: 10px; right: 10px; bottom: calc(env(safe-area-inset-bottom, 0px) + 8px); height: auto; padding: 6px; border: 0; border-radius: 26px; background: var(--mat); -webkit-backdrop-filter: blur(24px) saturate(1.9); backdrop-filter: blur(24px) saturate(1.9); box-shadow: var(--sh-float), inset 0 0 0 .5px var(--mat-edge), inset 0 1px 0 var(--mat-hi); align-items: center; gap: 2px; }
  .tabbar.has-or { grid-template-columns: repeat(5, minmax(0, 1fr)) 52px; } /* + Outreach, owner only (v2.js outreachNav) */
  .tab { padding: 6px 0 5px; border-radius: 20px; text-decoration: none; transition: background .2s, color .2s; }
  .tab.on { background: var(--on); color: var(--ink); }
  .tab .b { right: calc(50% - 22px); top: 0; }
  .tab-me { border: 0; background: transparent; padding: 0; justify-self: center; }
  .tab-me img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: var(--on); box-shadow: 0 0 0 1px var(--line); display: block; }
  .topbar #sbUser { display: none; }
  .tb-ic { border: 0; background: var(--soft); }
}

/* =====================================================================
   The old "Your Urgent To Dos" pop-up: its list is in Cosmo's To-do tab now (v2.js asapHtml)
   ===================================================================== */
#td { display: none !important; }
.cvt-sec { margin: 20px 2px 10px; font-size: 15px; font-weight: 600; color: var(--ink); }
.cvt-asap { padding: 6px; }
.cvt-a { display: flex; align-items: center; gap: 10px; padding: 9px 8px; border-radius: 12px; transition: opacity .3s, transform .3s; }
.cvt-a:hover { background: var(--soft); }
.cvt-a.done { opacity: .35; }
.cvt-a.crit .cvt-at { font-weight: 600; }
.cvt-ck { width: 20px; height: 20px; flex-shrink: 0; border-radius: 6px; border: 1.5px solid var(--line-2); background: transparent; cursor: pointer; padding: 0; transition: background .2s, border-color .2s; }
.cvt-ck:hover { border-color: var(--ink-2); }
.cvt-ck.on { background: var(--ink); border-color: var(--ink); }
.cvt-at { flex: 1; min-width: 0; font-size: 13.5px; color: var(--ink); line-height: 1.35; }
.cvt-go { flex-shrink: 0; height: 30px; padding: 0 12px; border-radius: 999px; border: 0; background: var(--on); color: var(--ink); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.cvt-go:hover { background: var(--line-2); }
/* profile menu name: plain case (a global rule capitalised it) */
.cvm-h b, .cvm-h b + span { text-transform: none !important; letter-spacing: -.01em !important; }
/* phone: the start screen sits at the top, not centred in a tall gap */
@media (max-width: 860px) {
  .ag-main.cv-empty { justify-content: flex-start; }
  .ag-main.cv-empty .ag-foot { margin-top: auto; }
  .ag-mtop { justify-content: flex-start !important; gap: 6px !important; }
  #agNewM { margin-left: auto; }
}
.tx-ed { cursor: pointer; border-radius: 6px; padding: 1px 4px; margin: -1px -4px; transition: background .15s; }
.tx-ed:hover { background: var(--on); }
/* row dividers: a straight hairline from the text edge, not the rounded row's outline */
.pl-row { position: relative; }
.pl-row + .pl-row, .pl-row:hover + .pl-row { box-shadow: none; }
.pl-row + .pl-row::before { content: ""; position: absolute; top: 0; left: 78px; right: 12px; height: 1px; background: var(--line); }
.pl-row:hover::before, .pl-row:hover + .pl-row::before { opacity: 0; }
@media (max-width: 860px) { .pl-row + .pl-row::before { left: 66px; right: 6px; } }

/* =====================================================================
   ROUND 2 (Etele, 2026-12-01)
   ===================================================================== */
/* --- the rail runs the full height: logo at the top (blue, as before), the pages under it, the picture at the very bottom --- */
:root { --cv-top: 22px; }
.sidebar { height: 100vh; height: 100dvh; padding: var(--cv-top) 0 12px; }
.rail-brand { display: flex; flex-shrink: 0; }
.rail-brand .brand-mark { width: 44px; height: 44px; border-radius: 13px; background: var(--brand); box-shadow: 0 6px 16px -8px var(--glow); transition: transform .18s var(--ease); }
.rail-brand:hover .brand-mark { transform: scale(1.04); }
.nav-wrap { margin-top: 22px; }
.root { min-height: 100vh; min-height: 100dvh; }

/* --- one title line: every page starts with a 44px row whose top lines up with the logo --- */
@media (min-width: 861px) {
  .topbar:not(:has(#tbAcct)) { display: none !important; }
  .topbar:has(#tbAcct) { justify-content: flex-end; padding-top: 10px; margin-bottom: 0; }
  .main { padding-top: var(--cv-top); }
  .cv-left { padding-top: var(--cv-top); }
  html.cv-on-agent .main { padding-top: 0; }
}
.page-t, .cv-title, .cvl-head h1, .pl-head h1, #p-flows .fl-h1 { font-size: 32px !important; font-weight: 700 !important; letter-spacing: -.03em !important; line-height: 44px !important; margin: 0 !important; }
.page-h { align-items: flex-start; margin-top: 0 !important; }
.page-h .page-s { margin-top: 0; }
.page-h .page-actions { min-height: 44px; display: flex; align-items: center; }
.cvl-head { min-height: 44px; align-items: flex-start; margin-bottom: 14px; }
.pl-head { margin: 0 0 18px; align-items: flex-start; }
.pl-head > .pl-views, .pl-head > .pl-acts { margin-top: 3px; }
#p-flows .fl-top { padding-top: 0 !important; align-items: flex-start !important; }
/* the "What worked" heading inside Analytics is a section, not the page title */
#p-performance .page-h[style] .page-t { font-size: 19px !important; line-height: 1.3 !important; }
@media (max-width: 860px) { .page-t, .cv-title, .pl-head h1 { font-size: 28px !important; line-height: 40px !important; } }

/* --- Pipeline: List, Board and Bookings switch under the header; Board and Bookings use the full width --- */
.pl-wrap { max-width: none; margin: 0; }
.pl-wrap[data-view="list"] .pl-head { max-width: 980px; }
#plListView { max-width: 980px; }
.pl-v[hidden] { display: none !important; }
.pl-acts { display: inline-flex; gap: 8px; }
.pl-acts .sv-act { display: inline-flex; gap: 8px; }
#plBoardView > .sv, #plBookView > .sv { display: block; }
.pl-wrap[data-view="bookings"] .pl-bolt { visibility: hidden; }

/* --- flags --- */
.pl-pills button.hot i { background: var(--crit); color: #fff; }
.pl-addf { width: 32px; padding: 0 !important; justify-content: center; flex-shrink: 0; color: var(--muted) !important; }
.pl-chip.f-bad { background: var(--crit-soft); color: var(--crit); }
.pl-chip.f-ok { background: var(--good-soft); color: var(--good); }
.pl-chip.f-mut { background: var(--on); color: var(--muted); }
.pl-chip.f-you { background: var(--brand-soft); color: var(--brand); }
.cv-flags { width: 340px; max-height: min(620px, calc(100vh - 120px)); overflow-y: auto; transform-origin: top left; padding: 8px; }
.cvf-h { display: flex; align-items: baseline; justify-content: space-between; padding: 6px 8px 10px; }
.cvf-h b { font-size: 15px; color: var(--ink); }
.cvf-h span { font-size: 12px; color: var(--muted); }
.cvf-row { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 9px; cursor: grab; background: transparent; }
.cvf-row:hover { background: var(--on); }
.cvf-row.drag { opacity: .45; }
.cvf-grip { color: var(--muted); display: inline-flex; }
.cvf-row label { flex: 1; min-width: 0; display: flex; align-items: center; gap: 9px; font-size: 14px; color: var(--ink); cursor: pointer; }
.cvf-row input { accent-color: var(--ink); width: 15px; height: 15px; }
.cvf-what { font-size: 11.5px; color: var(--muted); max-width: 120px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cvf-del { width: 24px; height: 24px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0 !important; }
.cvf-del:hover { background: var(--line-2); color: var(--ink); }
.cvf-new { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; padding: 12px 8px 6px; border-top: 1px solid var(--line); }
.cvf-new b { font-size: 14px; color: var(--ink); }
.cvf-new input, .cvf-new select { height: 36px; border-radius: 10px; border: 0; box-shadow: inset 0 0 0 1px var(--line); background: var(--panel); color: var(--ink); font: inherit; font-size: 13.5px; padding: 0 12px; outline: none; }
.cvf-kind { display: flex; gap: 4px; padding: 3px; border-radius: 999px; background: var(--soft); }
.cvf-kind button { flex: 1; height: 28px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font: inherit; font-size: 12.5px; cursor: pointer; padding: 0 !important; justify-content: center !important; }
.cvf-kind button.on { background: var(--panel); color: var(--ink); box-shadow: var(--sh-card); font-weight: 600; }
.cvf-add { height: 36px; border: 0; border-radius: 999px; background: var(--ink) !important; color: var(--bg) !important; font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; justify-content: center !important; }
.cvf-msg { font-size: 12px; color: var(--crit); }
.cvf-msg:empty { display: none; }

/* --- Analytics: drop the grey line when the box under it already says it's empty --- */
.card:has(.empty) .card-h .sub { display: none; }
.cv-convs { display: flex; flex-direction: column; }
.cv-convs-n { font-size: 12.5px; color: var(--muted); margin: 8px 10px 0; }
/* flags: one line that scrolls sideways; the edges fade out where there is more (Etele 2026-12-01) */
.pl-pills { flex-wrap: nowrap; overflow-x: auto; overscroll-behavior-x: contain; scroll-behavior: smooth; cursor: grab; padding: 2px 0 6px; }
.pl-pills.dragging { cursor: grabbing; scroll-behavior: auto; user-select: none; }
.pl-pills.fade-r { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 56px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 56px), transparent); }
.pl-pills.fade-l { -webkit-mask-image: linear-gradient(90deg, transparent, #000 56px); mask-image: linear-gradient(90deg, transparent, #000 56px); }
.pl-pills.fade-l.fade-r { -webkit-mask-image: linear-gradient(90deg, transparent, #000 56px, #000 calc(100% - 56px), transparent); mask-image: linear-gradient(90deg, transparent, #000 56px, #000 calc(100% - 56px), transparent); }
.pl-pills > button { flex-shrink: 0; }
.cvf-kind button { white-space: nowrap; }
/* Analytics: where leads drop off */
.cvd { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.cvd-bars { display: flex; flex-direction: column; gap: 14px; padding-top: 4px; }
.cvd-r { display: grid; grid-template-columns: minmax(150px, 230px) minmax(0, 1fr) 36px; align-items: center; gap: 14px; }
.cvd-l { font-size: 13.5px; color: var(--ink); }
.cvd-t { height: 8px; border-radius: 999px; background: var(--soft); overflow: hidden; }
.cvd-t i { display: block; height: 100%; border-radius: 999px; }
.cvd-r b { text-align: right; font-size: 14px; font-weight: 600; color: var(--ink); }
.cvd-h { font-size: 12.5px; color: var(--muted); margin: 0 10px 4px; }
@media (max-width: 1000px) { .cvd { grid-template-columns: 1fr; } .cvd-r { grid-template-columns: minmax(0, 1fr) 90px 30px; } }
/* Home: the All tab */
.cva-h { display: flex; align-items: center; justify-content: space-between; margin: 18px 2px 8px; font-size: 15px; font-weight: 600; color: var(--ink); }
.cva-h:first-child { margin-top: 2px; }
.cva-h > span { display: inline-flex; align-items: center; gap: 7px; }
.cva-n { font-style: normal; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--crit); color: #fff; font-size: 11.5px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; }
.cva-h button { display: inline-flex; align-items: center; gap: 2px; border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 12.5px; font-weight: 500; cursor: pointer; padding: 4px 6px; border-radius: 8px; }
.cva-h button:hover { color: var(--ink); background: var(--soft); }
.cva-g { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; padding: 2px 10px 10px; }
.cva-v { font-family: var(--num); font-size: 26px; font-weight: 700; letter-spacing: -.03em; color: var(--ink); }
.cva-money .pay-spark { width: 110px; height: 38px; }
.cva-none { padding: 14px 16px; border-radius: 14px; background: var(--soft); color: var(--muted); font-size: 13px; }
.cvl-seg { flex-wrap: nowrap; }
.cvl-seg button { padding: 0 12px; }
.cva-n.calm { background: var(--on); color: var(--ink); }
/* which Instagram: the profile menu section, the ring and the pill (2026-12-01) */
.cvm-sec { padding: 8px 10px 4px; font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.cv-me .cvm-ig { justify-content: flex-start; }
.cv-me .cvm-ig > span:nth-child(2) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cv-me .cvm-ig em { font-style: normal; font-size: 11.5px; color: var(--muted); margin-left: 4px; }
.cv-me .cvm-ig.on { font-weight: 600; }
.cv-me .cvm-ig svg { color: var(--ink); }
.cvm-igdot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; margin: 0 4px 0 5px; }
.cvm-igdot.ok { background: var(--good); } .cvm-igdot.off { background: var(--muted); }
html.cv-lane .sb-foot .tb-av .sb-av, html.cv-lane .tab-me img { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--brand); }
.cvl-head { justify-content: flex-start; gap: 10px; }
.cvl-head .cvl-x { margin-left: auto; }
.cv-igpill { align-self: center; height: 28px; padding: 0 11px; border: 0; border-radius: 999px; background: var(--brand-soft); color: var(--brand); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; max-width: 150px; overflow: hidden; text-overflow: ellipsis; }
/* Settings, Connections: what each extra Instagram is for */
.cn-note { margin: -2px 0 14px 54px; display: flex; flex-direction: column; gap: 6px; }
.cn-note label { font-size: 13px; font-weight: 600; color: var(--ink); display: flex; flex-direction: column; gap: 1px; }
.cn-note label span { font-weight: 400; font-size: 12px; color: var(--muted); }
.cn-note-r { display: flex; gap: 8px; }
.cn-note-r .field { flex: 1; min-width: 0; }
@media (max-width: 860px) { .cn-note { margin-left: 0; } }
/* Pipeline list runs the full width like Board; the header buttons stay put across List, Board and Bookings */
.pl-wrap[data-view="list"] .pl-head, #plListView { max-width: none; }
.pl-wrap .pl-head { max-width: none; }
#bkSync { display: none !important; }
/* comment on a lead */
.pl-cm { height: 24px; min-width: 28px; padding: 0 8px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; gap: 4px; color: var(--muted); background: transparent; box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; transition: background .15s, color .15s; }
.pl-cm:hover { background: var(--on); color: var(--ink); }
.pl-cm.has { color: var(--brand); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand) 35%, transparent); background: var(--brand-soft); }
.pl-cm b { font-size: 11.5px; font-weight: 600; }
.cv-cm { padding: 12px; transform-origin: top left; }
.cvc-h { display: flex; flex-direction: column; gap: 1px; margin-bottom: 10px; }
.cvc-h b { font-size: 15px; color: var(--ink); }
.cvc-h span { font-size: 12px; color: var(--muted); }
.cvc-list { display: flex; flex-direction: column; gap: 6px; max-height: 220px; overflow-y: auto; margin-bottom: 10px; }
.cvc-c { position: relative; padding: 8px 30px 8px 10px; border-radius: 10px; background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); }
.cvc-c p { margin: 0 0 3px; font-size: 13.5px; color: var(--ink); line-height: 1.4; white-space: pre-wrap; }
.cvc-c span { font-size: 11.5px; color: var(--muted); }
.cvc-c button { position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0 !important; }
.cvc-c button:hover { background: var(--on); color: var(--ink); }
.cvc-quick { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.cvc-quick button { height: 28px; padding: 0 10px !important; border: 0; border-radius: 999px; background: var(--on); color: var(--ink-2); font: inherit; font-size: 12.5px; cursor: pointer; width: auto !important; }
.cvc-quick button:hover { color: var(--ink); background: var(--line-2); }
.cv-cm textarea { width: 100%; box-sizing: border-box; border: 0; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--line); background: var(--panel); color: var(--ink); font: inherit; font-size: 14px; padding: 10px 12px; resize: vertical; outline: none; min-height: 72px; }
.cvc-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; }
.cvc-stop { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.cvc-stop input { accent-color: var(--ink); }
.cvc-save { height: 34px; padding: 0 18px !important; border: 0; border-radius: 999px; background: var(--ink) !important; color: var(--bg) !important; font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; width: auto !important; }
.cvc-msg { display: block; font-size: 12px; color: var(--muted); margin-top: 6px; }
.cvc-msg:empty { display: none; }
/* account switch in the profile menu */
.cvm-acav { width: 22px; height: 22px; border-radius: 50%; background: var(--on); color: var(--ink-2); font-size: 10px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
/* the feedback check-in can be closed (shown once either way) */
.ml-top { display: flex; align-items: center; gap: 10px; }
.ml-top .ml-dots { margin-left: auto; }
.ml-x { width: 26px; height: 26px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.ml-x:hover { background: var(--soft); color: var(--ink); }
/* lead panel: the Pipeline status dropdown is a pill the same height as Ignore and Delete next to it (2026-12-02) */
.ld-status select.field { height: 40px; min-height: 40px; padding: 0 36px 0 16px; border-radius: 999px; border: 1px solid var(--line); background-color: var(--surface); color: var(--ink); font: inherit; font-size: 13.5px; font-weight: 500; line-height: 38px; -webkit-appearance: none; appearance: none; cursor: pointer; box-shadow: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2.2' 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 14px center; }
.ld-status select.field:hover { border-color: var(--line-2); }
.ld-status .btn, .ld-acts .btn { height: 40px; }
/* one control system (2026-12-02, "keep the buttons consistent"): tab groups, dropdowns and buttons in a row are all 40px pills.
   A tab group is a grey track with the chosen tab as a white pill, like Pipeline's List / Board / Bookings. */
.seg, .seg.sm { box-sizing: border-box; height: 40px; padding: 3px; gap: 2px; border: 0; border-radius: 999px; background: var(--soft); align-items: center; }
.seg button, .seg.sm button { height: 34px; padding: 0 14px; border-radius: 999px; font-size: 13px; font-weight: 500; color: var(--muted); background: transparent; border: 0; box-shadow: none; display: inline-flex; align-items: center; white-space: nowrap; }
.seg button:hover { color: var(--ink); }
.seg button.on, .seg.sm button.on { background: var(--panel); color: var(--ink); font-weight: 600; box-shadow: var(--sh-card), inset 0 0 0 1px var(--line); }
.ws-pick select, .ws-pick-host .ws-pick select { box-sizing: border-box; height: 40px; border-radius: 999px; border: 1px solid var(--line); box-shadow: none; background-color: var(--surface); }
.sv-bar .btn, .sv-act .btn, .page-actions .btn { box-sizing: border-box; height: 40px; border-radius: 999px; }
.sv-bar input.field, .sv-act input.field { box-sizing: border-box; height: 40px; border-radius: 999px; padding: 0 14px; }
.sv-act { display: inline-flex; align-items: center; gap: 8px; }
.pl-views { box-sizing: border-box; height: 40px; align-items: center; }
.pl-views button { height: 34px; }
.pl-head > .pl-views, .pl-head > .pl-acts { margin-top: 2px; }
.pl-bolt { width: 44px; height: 44px; }
/* the start screen: things happening, drifting up under the composer, faded like Atlas's recent edits */
.ag-main.cv-empty { justify-content: flex-start; }
.ag-main.cv-empty .ag-stream { margin-top: max(24px, 11vh); }
.cv-drift { display: none; }
.ag-main.cv-empty .cv-drift:not(:empty) { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; flex: 1 1 0; min-height: 150px; width: 100%; max-width: 860px; margin: 26px auto 0; overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 18%, #000 45%, transparent 100%); mask-image: linear-gradient(to bottom, transparent 0, #000 18%, #000 45%, transparent 100%); }
.cvd-col { min-width: 0; overflow: hidden; }
.cvd-track { display: flex; flex-direction: column; gap: 12px; animation: cvdRise var(--dur, 80s) linear infinite; animation-delay: var(--delay, 0s); }
.cvd-col:hover .cvd-track { animation-play-state: paused; }
@keyframes cvdRise { from { transform: translateY(0); } to { transform: translateY(calc(-50% - 6px)); } }
.cvd-card { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; width: 100%; padding: 12px 13px; border: 0; border-radius: 16px; background: var(--panel); box-shadow: var(--sh-card), inset 0 0 0 1px var(--line); color: var(--ink); font: inherit; text-align: left; cursor: pointer; opacity: .5; transition: opacity .25s, transform .25s var(--ease), box-shadow .25s; }
.cvd-card:hover { opacity: 1; transform: translateY(-2px); box-shadow: var(--sh-float); }
.cvd-k { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 999px; background: var(--soft); color: var(--muted); font-size: 11.5px; font-weight: 600; }
.cvd-card.money .cvd-k { background: var(--good-soft); color: var(--good); }
.cvd-who { display: flex; align-items: center; gap: 7px; min-width: 0; max-width: 100%; }
.cvd-who b { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cvd-av { width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0; background: var(--on); color: var(--ink-2); font-size: 9.5px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; overflow: hidden; }
.cvd-txt { font-size: 12.5px; color: var(--muted); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cvd-card.money .cvd-txt { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
@media (max-width: 1100px) { .ag-main.cv-empty .cv-drift:not(:empty) { grid-template-columns: repeat(3, minmax(0, 1fr)); } .cvd-col:nth-child(4) { display: none; } }
@media (max-width: 860px) { .ag-main.cv-empty .cv-drift:not(:empty) { display: none; } .ag-main.cv-empty .ag-stream { margin-top: 0; } }
@media (prefers-reduced-motion: reduce) { .cvd-track { animation: none; } }
.cvd-card { flex-shrink: 0; }
/* drifting cards: never squeezed (a column of cards in a flex track shrank to fit and cut the text) */
.cvd-card { height: auto !important; min-height: 0; max-height: none !important; }
.cvd-card > * { flex-shrink: 0; }
.cvd-txt { flex-shrink: 0; max-height: none; }
/* the chat view: messages in the middle column, the composer at the bottom */
.ag-main:not(.cv-empty) .ag-stream { padding-top: 8px; }
.ag-main:not(.cv-empty) .ag-foot { margin-top: 12px; }
/* Settings, Connections: one look for every Instagram's fix box, and adding one is a row like the others (2026-12-02) */
.cn-fix { margin: 2px 0 14px 52px; padding: 14px 16px; border: 0; border-radius: 14px; background: var(--soft); font-size: 13.5px; line-height: 1.5; }
.cn-fix p { margin: 0 0 4px; }
.cn-fix ol { margin: 4px 0 0; }
.cn-fix-btns { margin-top: 12px; align-items: center; }
.cn-fix-msg:not(:empty) { display: block; margin-top: 8px; font-size: 12.5px; color: var(--muted); }
.cn-add .cn-plus { display: inline-flex; align-items: center; justify-content: center; color: var(--muted); background: var(--soft); }
.cn-add .cn-desc { max-width: 560px; }
.cn-add-r { margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.cn-add-r .cn-fix-msg:not(:empty) { margin-top: 0; max-width: 260px; text-align: right; }
@media (max-width: 860px) { .cn-fix { margin-left: 0; } }
/* a connected Instagram: Note and Remove as small icons before its status; the note editor opens only on demand */
.cn-acts { display: inline-flex; gap: 4px; margin-left: auto; margin-right: 8px; }
.cn-acts + .cn-state { margin-left: 0; }
.cn-act { width: 32px; height: 32px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; transition: background .15s, color .15s; }
.cn-act:hover { background: var(--soft); color: var(--ink); }
.cn-act.on { color: var(--brand); }
.cn-row .cn-desc { overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.cn-note { margin: 2px 0 14px 52px; padding: 14px 16px; border-radius: 14px; background: var(--soft); }
.cn-note .field { height: 40px; border-radius: 999px; padding: 0 16px; background: var(--panel); }
.cn-note .btn { height: 40px; }
