:root {
  --primary: #305090;
  --primary-hover: #204080;
  --primary-soft: #dfe5f3;
  --accent: #e3a71c;
  --bg: #e9ecf4;
  --surface: #ffffff;
  --surface-2: #f6f7fb;
  --border: #d0d4e4;
  --border-soft: #e6e9ef;
  --text: #2b2f3a;
  --text-2: #5e6473;
  --hover: #dcdfec;
  --row-hover: #f5f6f8;
  --danger: #c93d50;
  --shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
  --radius: 8px;
  --header-h: 48px;
  --name-col: 340px;
  --col-w: 150px;
  font-family: 'Figtree', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #161b2c; --surface: #242b40; --surface-2: #1d2335; --border: #3d4660; --border-soft: #333b52;
    --text: #d8dce6; --text-2: #9aa1b4; --hover: #343d58; --row-hover: #2b3349; --primary-soft: #2a3d6b;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #161b2c; --surface: #242b40; --surface-2: #1d2335; --border: #3d4660; --border-soft: #333b52;
  --text: #d8dce6; --text-2: #9aa1b4; --hover: #343d58; --row-hover: #2b3349; --primary-soft: #2a3d6b;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body, #root { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font-size: 14px; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--primary); }
[hidden] { display: none !important; }

/* ---------- buttons & inputs ---------- */
.btn { border: 0; border-radius: 4px; padding: 0 12px; height: 32px; display: inline-flex; align-items: center; gap: 6px; background: transparent; white-space: nowrap; }
.btn:hover { background: var(--hover); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-outline { border: 1px solid var(--border); }
.btn-danger { color: var(--danger); }
.btn-sm { height: 28px; padding: 0 8px; font-size: 13px; }
.icon-btn { width: 32px; height: 32px; border: 0; border-radius: 4px; background: transparent; display: inline-grid; place-items: center; color: var(--text-2); }
.icon-btn:hover { background: var(--hover); color: var(--text); }
.input { height: 36px; border: 1px solid var(--border); border-radius: 4px; padding: 0 10px; background: var(--surface); width: 100%; outline: none; }
.input:focus { border-color: var(--primary); }
textarea.input { height: auto; padding: 10px; resize: vertical; min-height: 80px; }
.muted { color: var(--text-2); }
.svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- auth ---------- */
.auth { min-height: 100%; display: grid; grid-template-columns: 1fr 1fr; }
.auth-hero { background: linear-gradient(135deg, #16254a 0%, #204080 55%, #6070a0 130%); color: #fff; padding: 64px; display: flex; flex-direction: column; justify-content: center; gap: 24px; }
.auth-hero h1 { font-size: 44px; line-height: 1.1; margin: 0; }
.auth-hero p { font-size: 18px; opacity: .85; max-width: 460px; margin: 0; }
.hero-board { display: grid; gap: 6px; max-width: 460px; margin-top: 16px; }
.hero-row { display: grid; grid-template-columns: 6px 1fr 110px 110px; gap: 2px; background: rgba(255,255,255,.08); border-radius: 4px; overflow: hidden; height: 34px; align-items: stretch; }
.hero-row > div { display: flex; align-items: center; justify-content: center; font-size: 13px; }
.hero-row > div:nth-child(2) { justify-content: flex-start; padding-left: 10px; }
.auth-form-wrap { display: grid; place-items: center; padding: 32px; background: var(--surface); }
.auth-form { width: 100%; max-width: 380px; display: grid; gap: 14px; }
.auth-form h2 { margin: 0 0 4px; font-size: 28px; }
.auth-form label { display: grid; gap: 6px; font-size: 13px; color: var(--text-2); }
.auth-form .btn-primary { height: 40px; justify-content: center; font-size: 15px; }
.auth-switch { text-align: center; color: var(--text-2); }
.auth-switch button { border: 0; background: none; color: var(--primary); padding: 0; }
.form-error { color: var(--danger); font-size: 13px; min-height: 18px; }
@media (max-width: 860px) { .auth { grid-template-columns: 1fr; } .auth-hero { padding: 32px 16px; } .auth-hero h1 { font-size: 32px; } .hero-board { display: none; } }

/* ---------- logo ---------- */
.logo { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 18px; letter-spacing: -0.2px; }
.logo-dots { display: inline-flex; gap: 3px; align-items: flex-end; }
.logo-dots i { width: 8px; height: 8px; border-radius: 50%; display: block; }
.logo-dots i:nth-child(1) { background: #204080; }
.logo-dots i:nth-child(2) { background: #e3a71c; height: 14px; border-radius: 4px; }
.logo-dots i:nth-child(3) { background: #6070a0; }
.logo small { font-weight: 400; color: var(--text-2); font-size: 13px; }

/* ---------- shell ---------- */
.shell { height: 100%; display: grid; grid-template-rows: var(--header-h) 1fr; }
.topbar { display: flex; align-items: center; gap: 12px; padding: 0 12px 0 16px; background: var(--surface-2); }
.spacer, .topbar .spacer { flex: 1; }
.avatar { width: 30px; height: 30px; border-radius: 50%; color: #fff; display: inline-grid; place-items: center; font-size: 12px; font-weight: 600; flex: none; border: 2px solid var(--surface); }
.avatar.sm { width: 24px; height: 24px; font-size: 10px; }
.avatar.lg { width: 36px; height: 36px; font-size: 14px; }
.avatar-stack { display: inline-flex; }
.avatar-stack .avatar + .avatar { margin-left: -8px; }
.avatar.empty { background: transparent; border: 1px dashed var(--border); color: var(--text-2); }

.main-wrap { display: grid; grid-template-columns: 260px 1fr; min-height: 0; padding: 0 8px 8px 0; background: var(--surface-2); }
.sidebar { padding: 8px 8px 8px 12px; overflow: auto; display: flex; flex-direction: column; gap: 4px; }
.sidebar.collapsed { display: none; }
.side-section { font-size: 12px; color: var(--text-2); text-transform: uppercase; letter-spacing: .5px; padding: 12px 8px 4px; display: flex; align-items: center; justify-content: space-between; }
.ws-select { display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: 6px; border: 1px solid var(--border); background: var(--surface); width: 100%; text-align: left; }
.ws-badge { width: 28px; height: 28px; border-radius: 6px; background: linear-gradient(135deg, #204080, #6070a0); color: #fff; display: grid; place-items: center; font-weight: 700; flex: none; }
.ws-select .name { flex: 1; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-item { display: flex; align-items: center; gap: 8px; padding: 0 8px; height: 34px; border-radius: 4px; border: 0; background: transparent; width: 100%; text-align: left; color: var(--text); }
.side-item:hover { background: var(--hover); }
.side-item.active { background: var(--primary-soft); }
.side-item span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-search { margin: 4px 0; height: 32px; }

.content { background: var(--surface); border-radius: var(--radius); min-width: 0; min-height: 0; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 0 0 1px var(--border-soft); }
@media (max-width: 800px) {
  .main-wrap { grid-template-columns: minmax(0, 1fr); padding: 0; }
  .sidebar { position: fixed; z-index: 30; top: var(--header-h); bottom: 0; left: 0; width: 260px; background: var(--surface-2); box-shadow: var(--shadow); }
  .content { border-radius: 0; }
  :root { --name-col: 220px; --col-w: 130px; }
}

/* ---------- board header ---------- */
.board-head { padding: 16px 24px 0; }
.board-title-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.board-title { font-size: 24px; font-weight: 600; border: 1px solid transparent; border-radius: 4px; padding: 2px 6px; margin-left: -7px; background: transparent; min-width: 120px; max-width: 100%; outline: none; }
.board-title:hover { border-color: var(--border); }
.board-title:focus { border-color: var(--primary); }
.board-title-row .spacer { flex: 1; }
.board-desc { color: var(--text-2); border: 1px solid transparent; border-radius: 4px; padding: 2px 6px; margin: 2px 0 0 -7px; width: min(600px, 100%); background: transparent; outline: none; }
.board-desc:hover { border-color: var(--border); }
.board-desc:focus { border-color: var(--primary); }
.tabs { display: flex; gap: 4px; margin-top: 10px; border-bottom: 1px solid var(--border-soft); overflow-x: auto; }
.tab { border: 0; background: transparent; padding: 8px 12px; border-radius: 4px 4px 0 0; color: var(--text); display: flex; gap: 6px; align-items: center; position: relative; white-space: nowrap; }
.tab:hover { background: var(--hover); }
.tab.active::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--primary); }
.toolbar { display: flex; gap: 8px; align-items: center; padding: 12px 24px; flex-wrap: wrap; }
.toolbar .search { width: 200px; height: 32px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border-radius: 4px; border: 0; background: transparent; }
.chip:hover { background: var(--hover); }
.chip.on { background: var(--primary-soft); }

/* ---------- table ---------- */
.board-body { flex: 1; overflow: auto; padding: 0 24px 40px; }
.group { margin-bottom: 36px; --gc: #305090; width: max-content; min-width: 100%; }
.group-head { display: flex; align-items: center; gap: 4px; height: 40px; position: sticky; left: 0; width: max-content; z-index: 4; }
.group-head .caret { color: var(--gc); }
.group-name { color: var(--gc); font-weight: 600; font-size: 17px; border: 1px solid transparent; border-radius: 4px; padding: 2px 6px; background: transparent; outline: none; min-width: 60px; }
.group-name:hover { border-color: var(--border); }
.group-name:focus { border-color: var(--primary); color: var(--text); }
.group-count { color: var(--text-2); font-size: 13px; margin-left: 4px; }
.group-menu { opacity: 0; }
.group-head:hover .group-menu { opacity: 1; }

.grid { display: grid; grid-template-columns: 6px var(--name-col) repeat(var(--ncols), var(--col-w)) 48px; width: max-content; min-width: 100%; }
.grid .cell { border-bottom: 1px solid var(--border-soft); border-right: 1px solid var(--border-soft); height: 37px; display: flex; align-items: center; justify-content: center; background: var(--surface); position: relative; min-width: 0; }
.grid .bar { background: var(--gc); border: 0 !important; position: sticky; left: 0; z-index: 3; }
.grid .bar::before { content: ''; position: absolute; right: 100%; top: -1px; bottom: -1px; width: 24px; background: var(--surface); }
.grid .bar.first { border-top-left-radius: 6px; }
.grid .bar.last { border-bottom-left-radius: 6px; }
.grid .hcell { font-size: 13px; color: var(--text-2); border-top: 1px solid var(--border-soft); }
.grid .hcell.name { justify-content: flex-start; padding-left: 36px; position: sticky; left: 6px; z-index: 2; }
.grid .hcell .col-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 22px; cursor: text; }
.grid .hcell .col-lock { position: absolute; left: 6px; top: 50%; transform: translateY(-50%); color: var(--text-2); opacity: .8; display: flex; }
.grid .hcell .col-menu { position: absolute; right: 2px; opacity: 0; width: 22px; height: 22px; }
.grid .hcell:hover .col-menu { opacity: 1; }
.grid .add-col { color: var(--text-2); border-top: 1px solid var(--border-soft); }
.grid .filler { border-right: 0; }
.row { display: contents; }
.row:hover > .cell:not(.bar) { background: var(--row-hover); }
.grid .cell.name { justify-content: flex-start; padding: 0 6px 0 8px; gap: 6px; position: sticky; left: 6px; z-index: 1; }
.grid .cell.name .drag { cursor: grab; color: var(--text-2); opacity: 0; width: 18px; display: grid; place-items: center; }
.grid .cell.name:hover .drag { opacity: 1; }
.item-name { flex: 1; min-width: 0; border: 1px solid transparent; border-radius: 3px; background: transparent; padding: 3px 5px; outline: none; overflow: hidden; text-overflow: ellipsis; }
.item-name:hover { border-color: var(--border); }
.item-name:focus { border-color: var(--primary); background: var(--surface); }
.open-item { border: 0; background: transparent; color: var(--text-2); display: inline-flex; align-items: center; gap: 3px; height: 26px; padding: 0 6px; border-radius: 4px; font-size: 12px; }
.open-item:hover { background: var(--hover); color: var(--primary); }
.open-item .badge { background: var(--primary); color: #fff; border-radius: 10px; padding: 0 5px; font-size: 11px; line-height: 16px; }
.row-menu { opacity: 0; width: 26px; height: 26px; }
.cell.name:hover .row-menu { opacity: 1; }
.drop-before > .cell { box-shadow: inset 0 2px 0 var(--primary); }
.drop-after > .cell { box-shadow: inset 0 -2px 0 var(--primary); }
.dragging > .cell { opacity: .4; }

.cell-status { width: 100%; height: 100%; border: 0; color: #fff; font-weight: 500; font-size: 13px; padding: 0 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; position: relative; }
.cell-status:hover::after { content: ''; position: absolute; right: 0; top: 0; width: 10px; height: 10px; background: linear-gradient(225deg, var(--surface) 50%, transparent 50%); }
.cell-input { width: 100%; height: 100%; border: 1px solid transparent; background: transparent; padding: 0 8px; outline: none; text-align: center; text-overflow: ellipsis; }
.cell-input:hover { border-color: var(--border); }
.cell-input:focus { border-color: var(--primary); background: var(--surface); }
.cell-input.num { text-align: right; }
.cell-btn { width: 100%; height: 100%; border: 0; background: transparent; display: flex; align-items: center; justify-content: center; gap: 4px; }
.cell-btn:hover { outline: 1px solid var(--border); outline-offset: -1px; }
.cell-link { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 8px; max-width: 100%; }
.cell .placeholder { color: var(--text-2); opacity: 0; }
.cell:hover .placeholder { opacity: 1; }
.cell input[type=checkbox] { width: 18px; height: 18px; accent-color: #2e9e6b; cursor: pointer; }
.date-overdue { color: var(--danger); }

.add-row > .cell.name { padding-left: 34px; }
.add-row input { border: 1px solid transparent; background: transparent; outline: none; width: 100%; height: 28px; padding: 0 6px; border-radius: 3px; }
.add-row input:focus { border-color: var(--primary); }
.add-row > .cell { border-bottom-color: var(--border-soft); }
.summary > .cell { border: 0; background: transparent !important; height: 34px; }
.summary > .cell.sum { border: 1px solid var(--border-soft); border-top: 0; font-weight: 600; font-size: 13px; padding: 4px; }
.summary .sum:first-of-type { border-left: 1px solid var(--border-soft); }
.dist { display: flex; width: 100%; height: 22px; border-radius: 2px; overflow: hidden; }
.dist i { display: block; height: 100%; }
.add-group { margin-top: -16px; position: sticky; left: 0; }

/* ---------- kanban ---------- */
.kanban { display: flex; gap: 12px; align-items: flex-start; padding-bottom: 24px; min-height: 100%; }
.lane { width: 270px; flex: none; background: var(--surface-2); border-radius: 8px; display: flex; flex-direction: column; max-height: 100%; }
.lane-head { color: #fff; padding: 10px 12px; border-radius: 8px 8px 0 0; font-weight: 600; display: flex; justify-content: space-between; }
.lane-body { padding: 8px; display: grid; gap: 8px; min-height: 80px; overflow: auto; align-content: start; }
.lane.drop .lane-body { outline: 2px dashed var(--primary); outline-offset: -4px; border-radius: 8px; }
.card { background: var(--surface); border-radius: 6px; padding: 10px 12px; box-shadow: 0 1px 3px rgba(0,0,0,.12); cursor: grab; display: grid; gap: 8px; border-left: 4px solid var(--gc, var(--border)); }
.card:hover { box-shadow: 0 4px 12px rgba(0,0,0,.15); }
.card-title { font-weight: 500; }
.card-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; color: var(--text-2); font-size: 12px; }
.card-meta .pill { padding: 2px 8px; border-radius: 10px; color: #fff; font-size: 11px; }
.lane-add { border: 0; background: transparent; color: var(--text-2); text-align: left; padding: 8px 12px 12px; }
.lane-add:hover { color: var(--primary); }
.kanban-config { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.kanban-config select { height: 32px; border: 1px solid var(--border); border-radius: 4px; padding: 0 8px; background: var(--surface); }

/* ---------- dashboard ---------- */
.dash { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; padding-bottom: 24px; }
.widget { border: 1px solid var(--border-soft); border-radius: 8px; padding: 16px 18px; background: var(--surface); }
.widget h3 { margin: 0 0 12px; font-size: 15px; font-weight: 600; }
.kpis { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; }
.kpi { border: 1px solid var(--border-soft); border-radius: 8px; padding: 14px 18px; }
.kpi .label { color: var(--text-2); font-size: 13px; }
.kpi .value { font-size: 28px; font-weight: 700; margin-top: 4px; font-variant-numeric: tabular-nums; }
.hbar { display: grid; grid-template-columns: 120px 1fr 52px; gap: 10px; align-items: center; margin-bottom: 8px; font-size: 13px; }
.hbar .track { background: var(--surface-2); border-radius: 4px; height: 20px; overflow: hidden; }
.hbar .fill { height: 100%; border-radius: 4px; }
.hbar .n { text-align: right; font-variant-numeric: tabular-nums; color: var(--text-2); }
.hbar .lbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; gap: 6px; align-items: center; }
.list-row { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border-soft); font-size: 13px; }
.list-row:last-child { border-bottom: 0; }
.list-row .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- popover ---------- */
.popover { position: fixed; z-index: 100; background: var(--surface); border-radius: 8px; box-shadow: var(--shadow); padding: 8px; min-width: 200px; max-width: 320px; max-height: 70vh; overflow: auto; }
.pop-title { font-size: 12px; color: var(--text-2); padding: 4px 6px 8px; }
.label-list { display: grid; gap: 6px; padding: 4px; }
.label-opt { border: 0; color: #fff; height: 32px; border-radius: 2px; font-weight: 500; min-width: 180px; padding: 0 10px; }
.label-opt:hover { opacity: .85; }
.label-edit { display: flex; gap: 6px; align-items: center; }
.label-edit .swatch { width: 26px; height: 26px; border-radius: 4px; border: 0; flex: none; }
.label-edit input { flex: 1; height: 30px; border: 1px solid var(--border); border-radius: 4px; padding: 0 8px; background: var(--surface); }
.menu-item { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: transparent; height: 34px; padding: 0 10px; border-radius: 4px; text-align: left; color: var(--text); }
.menu-item:hover { background: var(--hover); }
.menu-item.danger { color: var(--danger); }
.menu-sep { height: 1px; background: var(--border-soft); margin: 6px 0; }
.swatches { display: grid; grid-template-columns: repeat(6, 26px); gap: 6px; padding: 6px; }
.swatches button { width: 26px; height: 26px; border-radius: 50%; border: 0; }
.swatches button.sel { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--text); }
.person-opt { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: transparent; padding: 6px 8px; border-radius: 4px; text-align: left; }
.person-opt:hover { background: var(--hover); }
.person-opt.sel { background: var(--primary-soft); }
.type-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }

/* ---------- drawer ---------- */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.25); z-index: 50; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(640px, 100%); background: var(--surface); z-index: 51; box-shadow: var(--shadow); display: flex; flex-direction: column; animation: slideIn .18s ease-out; }
@keyframes slideIn { from { transform: translateX(40px); opacity: 0; } }
.drawer-head { padding: 16px 20px 0; }
.drawer-head .top { display: flex; align-items: center; gap: 8px; }
.drawer-head input { font-size: 22px; font-weight: 600; flex: 1; border: 1px solid transparent; border-radius: 4px; padding: 4px 6px; background: transparent; outline: none; }
.drawer-head input:hover { border-color: var(--border); }
.drawer-head input:focus { border-color: var(--primary); }
.drawer-body { flex: 1; overflow: auto; padding: 16px 20px; }
.update-box { display: grid; gap: 8px; margin-bottom: 20px; }
.update-box .actions { display: flex; justify-content: flex-end; }
.update { border: 1px solid var(--border-soft); border-radius: 8px; padding: 14px 16px; margin-bottom: 12px; }
.update-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.update-head .who { font-weight: 600; }
.update-body { white-space: pre-wrap; line-height: 1.5; }
.act-row { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border-soft); font-size: 13px; }
.act-row .when { color: var(--text-2); width: 90px; flex: none; }
.info-grid { display: grid; grid-template-columns: 160px 1fr; border: 1px solid var(--border-soft); border-radius: 8px; overflow: hidden; }
.info-grid > div { min-height: 40px; display: flex; align-items: center; border-bottom: 1px solid var(--border-soft); }
.info-grid > .k { padding: 0 12px; color: var(--text-2); background: var(--surface-2); font-size: 13px; }
.info-grid > .v { position: relative; }
.info-grid > .v > * { height: 40px; }
.empty-state { text-align: center; padding: 48px 16px; color: var(--text-2); }
.empty-state .big { font-size: 40px; margin-bottom: 8px; }

/* ---------- modal ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(15, 17, 40, .5); display: grid; place-items: center; z-index: 80; padding: 16px; }
.modal { background: var(--surface); border-radius: 12px; width: min(560px, 100%); padding: 24px; box-shadow: var(--shadow); display: grid; gap: 16px; max-height: 90vh; overflow: auto; }
.modal.wide { width: min(1120px, 100%); }
.modal h2 { margin: 0; font-size: 22px; }
.modal .actions { display: flex; justify-content: flex-end; gap: 8px; }
.tpl-cats { display: flex; flex-wrap: wrap; gap: 6px; }
.tpl-scroll { max-height: 42vh; overflow: auto; padding: 2px; }
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.tpl { border: 2px solid var(--border-soft); border-radius: 8px; padding: 12px; text-align: left; background: var(--surface); display: grid; gap: 4px; }
.tpl:hover { border-color: var(--border); }
.tpl.sel { border-color: var(--primary); background: var(--primary-soft); }
.tpl strong { font-size: 14px; }
.tpl span { font-size: 12px; color: var(--text-2); }

/* ---------- toasts ---------- */
.toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); display: grid; gap: 8px; z-index: 200; }
.toast { background: #2b2f3a; color: #fff; padding: 10px 16px; border-radius: 6px; box-shadow: var(--shadow); font-size: 14px; animation: slideIn .2s; }
.toast.error { background: var(--danger); }

.welcome { display: grid; place-items: center; height: 100%; text-align: center; padding: 24px; }
.welcome h2 { font-size: 26px; margin: 8px 0; }

/* ---------- modules ---------- */
.icon-btn.on { background: var(--primary-soft); color: var(--primary); }
.bell { position: relative; }
.bell-badge { position: absolute; top: 2px; right: 2px; background: var(--danger); color: #fff; border-radius: 10px; font-size: 10px; line-height: 14px; min-width: 14px; padding: 0 3px; text-align: center; }
.brand-logo img { display: block; }
.brand-hero { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.brand-hero img { max-height: 72px; max-width: 280px; background: #fff; padding: 8px 12px; border-radius: 10px; align-self: flex-start; }
.brand-name { font-size: 28px; font-weight: 700; } .brand-tag { opacity: .85; }
.page { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.field { display: grid; gap: 6px; margin-bottom: 12px; } .field-label { font-size: 13px; color: var(--text-2); }
.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; padding-bottom: 32px; }
.settings-grid .widget h4 { margin: 18px 0 6px; font-size: 14px; }
.logo-preview { min-height: 64px; display: flex; align-items: center; } .logo-preview img { max-height: 64px; max-width: 240px; }
.key-reveal { background: var(--primary-soft); border-radius: 8px; padding: 12px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.key-reveal code { background: var(--surface); padding: 6px 8px; border-radius: 4px; word-break: break-all; }
pre.code { background: var(--surface-2); border: 1px solid var(--border-soft); border-radius: 6px; padding: 12px; font-size: 12.5px; overflow: auto; white-space: pre; }
.chip-code { display: inline-block; background: var(--surface-2); border: 1px solid var(--border-soft); border-radius: 4px; padding: 1px 6px; margin: 2px; cursor: pointer; font-size: 12px; }
.chip-code:hover { border-color: var(--primary); }

/* help */
.help-drawer { width: min(520px, 100%); }
.help-body { padding-top: 0; }
.help-sec { border: 1px solid var(--border-soft); border-radius: 8px; margin-bottom: 8px; overflow: hidden; }
.help-sec-head { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: var(--surface-2); padding: 12px 14px; font-weight: 600; color: var(--text); text-align: left; }
.help-sec.open .help-sec-head { background: var(--primary-soft); }
.help-sec-body { padding: 12px 14px; }
.help-intro { margin: 0 0 12px; color: var(--text-2); line-height: 1.5; }
.help-item { padding: 10px 0; border-top: 1px solid var(--border-soft); }
.help-name { font-weight: 600; margin-bottom: 4px; }
.help-row { display: grid; grid-template-columns: 60px 1fr; gap: 8px; font-size: 13px; line-height: 1.5; margin-top: 2px; }
.help-k { color: var(--text-2); font-size: 11px; text-transform: uppercase; letter-spacing: .5px; padding-top: 3px; }

/* subitems */
.sub-toggle { width: 22px; height: 22px; opacity: .35; margin-left: -4px; position: relative; }
.sub-toggle.has, .cell.name:hover .sub-toggle { opacity: 1; }
.sub-count { position: absolute; right: -4px; top: -4px; background: var(--primary); color: #fff; border-radius: 8px; font-size: 9px; line-height: 12px; padding: 0 3px; }
.sub-row > .cell { background: var(--surface-2); }

/* columns */
.tl-pill { position: relative; width: 100%; height: 24px; border-radius: 12px; background: var(--primary-soft); overflow: hidden; display: flex; align-items: center; justify-content: center; font-size: 12px; }
.tl-pill i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--primary); opacity: .35; }
.tl-pill span { position: relative; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 6px; }
.formula-val { font-variant-numeric: tabular-nums; padding: 0 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.time-cell { display: flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; }
.time-cell .running { color: var(--danger); animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { opacity: .4; } }
.link-pills { display: flex; gap: 4px; overflow: hidden; }
.link-pill { background: var(--primary-soft); color: var(--primary); border-radius: 10px; padding: 2px 8px; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 110px; }
.mirror-val { font-size: 13px; padding: 0 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }

/* timeline view */
.tl-wrap { display: flex; flex-direction: column; height: 100%; }
.tl-scroll { overflow: auto; flex: 1; border: 1px solid var(--border-soft); border-radius: 8px; }
.tl-canvas { position: relative; }
.tl-head { display: flex; position: sticky; top: 0; z-index: 3; background: var(--surface); border-bottom: 1px solid var(--border-soft); }
.tl-label-col { width: 260px; flex: none; position: sticky; left: 0; background: var(--surface); z-index: 2; padding: 0 12px; display: flex; align-items: center; gap: 8px; border-right: 1px solid var(--border-soft); font-size: 13px; }
.tl-grid { position: relative; height: 40px; background-image: linear-gradient(to right, var(--border-soft) 1px, transparent 1px); background-size: 36px 100%; }
.tl-month { position: absolute; top: 2px; font-size: 11px; font-weight: 600; color: var(--text-2); padding-left: 4px; border-left: 1px solid var(--border); height: 100%; }
.tl-day { position: absolute; top: 22px; font-size: 11px; text-align: center; color: var(--text-2); } .tl-day.wknd { color: var(--border); }
.tl-group { font-weight: 600; padding: 10px 12px 4px; position: sticky; left: 0; display: inline-block; }
.tl-row { display: flex; height: 40px; border-bottom: 1px solid var(--border-soft); }
.tl-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; } .tl-name:hover { color: var(--primary); }
.tl-today { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--accent); z-index: 1; }
.tl-bar { position: absolute; top: 8px; height: 24px; border-radius: 6px; color: #fff; font-size: 12px; padding: 0 8px; line-height: 24px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.tl-bar.done { opacity: .5; } .tl-bar.late { outline: 2px solid var(--danger); }

/* calendar */
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-dow { font-size: 12px; color: var(--text-2); text-align: center; padding: 4px; }
.cal-cell { min-height: 96px; border: 1px solid var(--border-soft); border-radius: 6px; padding: 4px; display: flex; flex-direction: column; gap: 3px; background: var(--surface); }
.cal-cell.empty { background: transparent; border-color: transparent; }
.cal-cell.today { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.cal-day { font-size: 12px; color: var(--text-2); }
.cal-item { border: 0; color: #fff; border-radius: 4px; font-size: 11px; padding: 2px 6px; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-item.done { opacity: .5; text-decoration: line-through; }

/* workload */
.wl-grid { display: grid; gap: 1px; background: var(--border-soft); border: 1px solid var(--border-soft); border-radius: 8px; overflow: hidden; }
.wl-grid > div { background: var(--surface); padding: 8px 10px; font-size: 13px; }
.wl-head { font-weight: 600; color: var(--text-2); font-size: 12px; }
.wl-person { display: flex; align-items: center; gap: 8px; }
.wl-cell { display: flex; flex-direction: column; gap: 4px; }
.wl-cell.over { background: #fbe9ec; } :root[data-theme="dark"] .wl-cell.over { background: #4a2630; }
.wl-bar { height: 8px; background: var(--surface-2); border-radius: 4px; overflow: hidden; } .wl-bar i { display: block; height: 100%; background: var(--primary); } .wl-cell.over .wl-bar i { background: var(--danger); }

/* drawer tabs */
.act-type { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .4px; padding: 2px 8px; border-radius: 10px; background: var(--primary-soft); color: var(--primary); }
.dropzone { border: 2px dashed var(--border); border-radius: 8px; padding: 20px; text-align: center; color: var(--text-2); cursor: pointer; display: grid; gap: 4px; justify-items: center; }
.dropzone.over, .dropzone:hover { border-color: var(--primary); color: var(--primary); }
.sms-thread { display: grid; gap: 8px; }
.bubble { max-width: 85%; padding: 10px 12px; border-radius: 12px; font-size: 14px; white-space: pre-wrap; }
.bubble.out { background: var(--primary); color: #fff; justify-self: end; border-bottom-right-radius: 4px; } .bubble.out .muted { color: rgba(255,255,255,.75); }
.bubble.in { background: var(--surface-2); justify-self: start; border-bottom-left-radius: 4px; }
.qline { display: grid; grid-template-columns: 1fr 80px 110px 100px 32px; gap: 6px; align-items: center; }
.qline.head { font-size: 11px; color: var(--text-2); text-transform: uppercase; }
.qline .amt { text-align: right; font-variant-numeric: tabular-nums; }

/* automations / forms / campaigns */
.rule-card { display: flex; align-items: center; gap: 10px; border: 1px solid var(--border-soft); border-radius: 8px; padding: 10px 12px; }
.rule-block { border: 1px solid var(--border-soft); border-radius: 8px; padding: 12px; display: grid; gap: 8px; }
.rule-kw { font-weight: 700; color: var(--primary); text-transform: uppercase; font-size: 12px; letter-spacing: .5px; }
.step-card { border: 1px solid var(--border-soft); border-radius: 8px; padding: 10px; display: grid; gap: 8px; }
.switch { position: relative; width: 36px; height: 20px; flex: none; } .switch input { opacity: 0; width: 0; height: 0; }
.switch i { position: absolute; inset: 0; background: var(--border); border-radius: 10px; transition: .15s; } .switch i::after { content: ''; position: absolute; width: 16px; height: 16px; left: 2px; top: 2px; background: #fff; border-radius: 50%; transition: .15s; }
.switch input:checked + i { background: var(--accent-strong, #2e9e6b); } .switch input:checked + i::after { transform: translateX(16px); }
@media (max-width: 800px) { .qline { grid-template-columns: 1fr 60px 80px 70px 28px; } .help-drawer { width: 100%; } }

/* platform owner badge + hosted companies */
.platform-badge { position: fixed; right: 14px; bottom: 12px; z-index: 40; display: flex; align-items: center; gap: 8px; padding: 6px 10px 6px 6px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border-soft); box-shadow: 0 2px 10px rgba(0,0,0,.12); text-decoration: none; color: var(--text); font-size: 11px; line-height: 1.1; }
.platform-badge img { width: 30px; height: 30px; border-radius: 50%; }
.platform-badge small { display: block; color: var(--text-2); font-size: 10px; }
.platform-badge b { font-size: 12px; }
.platform-badge:hover { border-color: var(--primary); }
@media (max-width: 800px) { .platform-badge span { display: none; } .platform-badge { padding: 4px; } }
.company-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; padding-bottom: 60px; }
.company-card { border: 1px solid var(--border-soft); border-top: 4px solid var(--primary); border-radius: 10px; padding: 14px 16px; background: var(--surface); display: grid; gap: 8px; }
.company-card-head { display: flex; gap: 12px; align-items: center; } .company-card-head img { max-height: 40px; max-width: 120px; }
.company-stats { display: flex; gap: 14px; font-size: 13px; color: var(--text-2); }
.toasts { bottom: 64px; }

/* government capture */
.gov-tab .widget { margin-bottom: 12px; }
.req-grid { display: grid; grid-template-columns: 140px 1fr; gap: 4px 12px; font-size: 13px; }
.gap { display: flex; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--border-soft); font-size: 13px; color: var(--danger); }
.gap.soft { color: var(--text-2); } .gap:last-child { border-bottom: 0; }
.fit-ok { color: #2e9e6b; display: flex; align-items: center; gap: 6px; font-weight: 600; }
.partner-card { display: flex; gap: 12px; align-items: flex-start; border: 1px solid var(--border-soft); border-radius: 8px; padding: 10px 12px; margin-bottom: 8px; }
.covers { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0; }
.cover { display: inline-flex; align-items: center; gap: 4px; background: #e3f3ea; color: #1f6e49; border-radius: 10px; padding: 2px 8px; font-size: 11px; }
:root[data-theme="dark"] .cover { background: #1f3a2d; color: #8fd4ad; }
.qa { padding: 8px 0; border-bottom: 1px solid var(--border-soft); } .qa:last-of-type { border-bottom: 0; }
.qa-q { font-weight: 600; font-size: 13px; margin-bottom: 6px; }
.qa-chip { height: 28px; text-transform: capitalize; }

/* ---------- mobile (iPhone / Galaxy) ---------- */
.mobile-nav { display: none; }
.side-backdrop { display: none; }
@media (hover: none) and (pointer: coarse) { .row-menu, .group-menu, .grid .cell.name .drag, .grid .hcell .col-lock { position: absolute; left: 6px; top: 50%; transform: translateY(-50%); color: var(--text-2); opacity: .8; display: flex; }
.grid .hcell .col-menu { opacity: 1; } }
@media (max-width: 760px) {
  :root { --name-col: 170px; --col-w: 118px; --header-h: 52px; }
  html, body { overscroll-behavior-y: none; }
  .topbar { gap: 4px; padding: 0 6px 0 8px; }
  .topbar .brand-logo img { max-height: 32px !important; max-width: 120px !important; }
  .main-wrap { padding: 0 0 calc(56px + env(safe-area-inset-bottom)) 0; }
  .content { border-radius: 0; box-shadow: none; }
  body.mobile .sidebar { width: min(300px, 86vw); padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  body.mobile .side-backdrop { display: block; position: fixed; inset: var(--header-h) 0 0 0; background: rgba(0,0,0,.35); z-index: 29; }
  .board-head { padding: 10px 12px 0; }
  .board-title-row h2, .board-title-row input.board-title { font-size: 19px; }
  .board-desc { display: none; }
  .tabs { gap: 0; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { white-space: nowrap; min-height: 40px; }
  .toolbar { padding: 8px 12px; gap: 6px; }
  .toolbar .search { width: 100%; }
  .toolbar .chip { height: 36px; }
  .board-body { padding: 0 12px 24px; }
  .group { margin-bottom: 24px; }
  .group-name { font-size: 16px; }
  .btn { min-height: 40px; } .side-item { height: 44px; } .input, .cell-input { font-size: 16px; } /* 16px prevents iOS zoom-on-focus */
  .popover { max-width: calc(100vw - 16px); max-height: 60vh; }
  .drawer { width: 100%; animation: slideUp .2s ease-out; }
  .drawer-head { padding: 12px 14px 0; } .drawer-head input { font-size: 18px; } .drawer-body { padding: 12px 14px calc(16px + env(safe-area-inset-bottom)); }
  .modal-backdrop { align-items: end; padding: 0; }
  .modal { width: 100%; max-height: 92vh; border-radius: 16px 16px 0 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); animation: slideUp .2s ease-out; }
  .modal h2 { font-size: 19px; }
  .tpl-grid { grid-template-columns: 1fr 1fr; } .tpl-scroll { max-height: 36vh; }
  .kanban { gap: 10px; scroll-snap-type: x mandatory; }
  .lane { width: min(84vw, 300px); scroll-snap-align: start; }
  .help-drawer { width: 100%; }
  .platform-badge { bottom: calc(62px + env(safe-area-inset-bottom)); right: 8px; }
  .settings-grid { grid-template-columns: 1fr !important; }
  .widget { padding: 14px; }
  .mobile-nav { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; height: calc(56px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: var(--surface); border-top: 1px solid var(--border-soft); z-index: 45; box-shadow: 0 -2px 10px rgba(0,0,0,.06); }
  .mobile-nav button { border: 0; background: transparent; color: var(--text-2); display: grid; place-items: center; gap: 2px; font-size: 11px; padding-top: 6px; }
  .mobile-nav button.active { color: var(--primary); }
  .mobile-nav button .svg { width: 22px; height: 22px; }
  .mobile-nav .fab { position: relative; }
  .mobile-nav .fab span { width: 44px; height: 44px; border-radius: 50%; background: var(--primary); color: #fff; display: grid; place-items: center; margin-top: -18px; box-shadow: 0 4px 12px rgba(0,0,0,.2); }
}
@keyframes slideUp { from { transform: translateY(24px); opacity: .6; } to { transform: none; opacity: 1; } }
/* Cards view (phone-friendly list; also usable on desktop) */
.cards { display: grid; gap: 18px; padding-bottom: 12px; }
.cards-group { display: grid; gap: 8px; }
.cards-group-head { display: flex; align-items: center; gap: 8px; color: var(--gc); font-weight: 600; font-size: 15px; }
.cards-group-head .count { color: var(--text-2); font-weight: 400; font-size: 13px; }
.card-item { display: grid; gap: 8px; padding: 12px 12px 12px 14px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border-soft); border-left: 4px solid var(--gc, var(--border)); text-align: left; width: 100%; color: var(--text); }
.card-item:active { background: var(--hover); }
.card-item .title { font-weight: 500; font-size: 15px; display: flex; gap: 8px; align-items: center; }
.card-item .title .sub { color: var(--text-2); font-size: 12px; font-weight: 400; }
.card-item .chips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.card-item .pill { padding: 3px 9px; border-radius: 10px; color: #fff; font-size: 12px; white-space: nowrap; }
.card-item .kv { font-size: 12px; color: var(--text-2); display: inline-flex; gap: 4px; align-items: center; background: var(--surface-2); border-radius: 6px; padding: 3px 7px; }
.card-item .kv b { color: var(--text); font-weight: 500; }
.card-item .kv.overdue b { color: var(--danger); }
.cards-add { display: flex; gap: 8px; }
.cards-add .input { flex: 1; }

/* ---------- Leads page (R3) ---------- */
.link-btn { border: 0; background: none; color: var(--primary); padding: 0 4px; cursor: pointer; font: inherit; display: inline-flex; gap: 4px; align-items: center; }
.link-btn:hover { text-decoration: underline; }
.leads-page .board-body { flex: 1; min-height: 0; }
.leads-list { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.lead-filters { padding: 10px 24px 6px; display: grid; gap: 8px; }
.lead-views, .lead-filter-row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.lead-filter-row .input.lf { height: 32px; padding: 0 8px; font-size: 13px; }
.tier-filter { display: inline-flex; gap: 2px; }
.tier-filter .chip { padding: 0 4px; }
.tier-badge { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; color: #fff; font-weight: 700; font-size: 12px; flex: none; }
.dnc-badge { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 4px; background: var(--danger); color: #fff; font-size: 10px; font-weight: 700; vertical-align: middle; }
.conv-badge { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 4px; background: #e3a71c; color: #1d1d1d; font-size: 10px; font-weight: 700; vertical-align: middle; }
.bulkbar { position: sticky; top: 0; z-index: 3; margin: 0 24px 6px; padding: 8px 12px; border-radius: 8px; background: var(--primary-soft); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 13px; }
.leads-scroll { flex: 1; min-height: 0; overflow: auto; margin: 0 24px; border: 1px solid var(--border-soft); border-radius: 8px; }
.leads-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.leads-table th { position: sticky; top: 0; z-index: 2; background: var(--surface-2); text-align: left; font-weight: 600; padding: 8px; border-bottom: 1px solid var(--border-soft); white-space: nowrap; color: var(--text-2); font-size: 12px; }
.leads-table td { padding: 6px 8px; border-bottom: 1px solid var(--border-soft); vertical-align: middle; }
.leads-table tbody tr { cursor: pointer; }
.leads-table tbody tr:hover { background: var(--hover); }
.leads-table tr.sel { background: var(--primary-soft); }
.leads-table tr.dnc .lc-name .nm { color: var(--text-2); }
.leads-table .lc-name { min-width: 220px; max-width: 360px; }
.leads-table .lc-name .nm { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.leads-table .lc-name .sub { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.leads-table .lc-cat { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.leads-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.leads-table a.strike { text-decoration: line-through; color: var(--text-2); }
.status-sel, .owner-sel { height: 28px; border: 1px solid var(--border-soft); border-radius: 14px; background: var(--surface); color: var(--text); font-size: 12px; padding: 0 8px; max-width: 150px; }
.status-sel { border-color: var(--c, var(--border)); box-shadow: inset 4px 0 0 var(--c, transparent); }
.pager { display: flex; gap: 8px; align-items: center; padding: 10px 220px 14px 24px; font-size: 13px; flex-wrap: wrap; }
.pager .spacer { flex: 1; }
.undo-bar { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 210; background: #2b2f3a; color: #fff; padding: 8px 10px 8px 16px; border-radius: 8px; display: flex; gap: 10px; align-items: center; box-shadow: var(--shadow); font-size: 14px; }
.undo-bar .btn { background: transparent; color: #fff; border-color: rgba(255,255,255,.4); }
.undo-bar .icon-btn { color: #fff; }
.fld { display: grid; gap: 4px; font-size: 12px; color: var(--text-2); }
.fld .input { color: var(--text); font-size: 14px; }
.fld-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.lead-drawer { width: min(720px, 100%); }
.lead-head-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 8px 0 12px; border-bottom: 1px solid var(--border-soft); }
.lead-head-row .spacer { flex: 1; }
.dnc-banner { background: rgba(209, 75, 90, .12); border: 1px solid var(--danger); border-radius: 8px; padding: 10px 14px; font-size: 13px; }
.lead-note { padding: 8px 0; border-bottom: 1px solid var(--border-soft); font-size: 13px; }
.lead-note:last-child { border-bottom: 0; }
.lead-note .meta { display: flex; gap: 8px; align-items: center; margin-bottom: 4px; flex-wrap: wrap; }
.lead-note .body { white-space: pre-wrap; }
.lead-note.k-system .body { color: var(--text-2); }
table.kv { width: 100%; border-collapse: collapse; font-size: 13px; }
table.kv th { text-align: left; color: var(--text-2); font-weight: 500; padding: 5px 10px 5px 0; vertical-align: top; white-space: nowrap; width: 1%; }
table.kv td { padding: 5px 0; vertical-align: top; word-break: break-word; }
table.kv.preview th, table.kv.preview td { padding: 5px 8px; border-bottom: 1px solid var(--border-soft); white-space: nowrap; }
.dropzone { border: 2px dashed var(--border); border-radius: 10px; padding: 22px; text-align: center; cursor: pointer; display: grid; gap: 6px; justify-items: center; color: var(--text-2); }
.dropzone.over, .dropzone:hover { border-color: var(--primary); color: var(--text); }
.imp-counts { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.dupe-pair { border: 1px solid var(--border-soft); border-radius: 8px; padding: 12px; margin-bottom: 12px; background: var(--surface); }
.dupe-reason { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; font-size: 13px; }
.dupe-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dupe-card { border: 1px solid var(--border-soft); border-radius: 8px; padding: 10px; display: grid; gap: 4px; align-content: start; }
.rule { border: 1px solid var(--border-soft); border-radius: 8px; padding: 10px; display: grid; gap: 10px; margin-bottom: 10px; }
@media (max-width: 800px) {
  .lead-filters { padding: 8px 12px; }
  .lead-filter-row .input.lf { width: calc(50% - 4px) !important; }
  .leads-scroll { margin: 0 8px; }
  .bulkbar { margin: 0 8px 6px; }
  .pager { padding: 10px 12px; }
  .dupe-cards { grid-template-columns: 1fr; }
  .leads-table th:nth-child(n+8), .leads-table td:nth-child(n+8) { display: none; }
}
.lead-dash .hbar { grid-template-columns: 140px 1fr auto; }
.lead-dash .hbar .n { white-space: nowrap; min-width: 52px; }

/* ---------- R4: live, bulk, views, search, reports, SSO ---------- */
.row-check { width: 15px; height: 15px; margin: 0 4px 0 2px; flex: none; accent-color: var(--primary); opacity: .35; cursor: pointer; }
.row:hover .row-check, .row-check:checked, .hcell .row-check { opacity: 1; }
.cell.name.selected { background: var(--primary-soft); }
.board-bulk { margin: 0 24px 8px; }
.live-pill { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 14px; background: #e5f6ee; color: #1f7a50; font-size: 12px; font-weight: 600; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #2e9e6b; box-shadow: 0 0 0 0 rgba(46,158,107,.6); animation: livePulse 2s infinite; }
@keyframes livePulse { 0% { box-shadow: 0 0 0 0 rgba(46,158,107,.55); } 70% { box-shadow: 0 0 0 7px rgba(46,158,107,0); } 100% { box-shadow: 0 0 0 0 rgba(46,158,107,0); } }
.filter-pop { display: grid; gap: 6px; padding: 4px; width: min(520px, 90vw); }
.filter-row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.filter-row .input { height: 32px; width: auto; min-width: 110px; font-size: 13px; }
.filter-row select[multiple] { height: auto; }
.view-opt { display: flex; align-items: center; }
.view-opt .person-opt { flex: 1; }
.label-pick { display: grid; gap: 4px; padding: 4px; min-width: 180px; }
.label-opt { border: 0; color: #fff; padding: 6px 10px; border-radius: 4px; text-align: left; cursor: pointer; }
.global-search { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text-2); min-width: 220px; cursor: pointer; }
.global-search span { flex: 1; text-align: left; }
.global-search kbd { font-family: inherit; font-size: 11px; border: 1px solid var(--border); border-radius: 4px; padding: 0 4px; }
.search-modal { width: min(640px, 92vw); }
.search-results { max-height: 60vh; overflow: auto; display: grid; }
.search-hit { display: flex; gap: 10px; align-items: center; border: 0; background: none; padding: 8px 10px; border-radius: 6px; text-align: left; color: var(--text); cursor: pointer; font: inherit; font-size: 14px; }
.search-hit .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-hit.sel { background: var(--primary-soft); }
.report-grid { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 16px; padding: 16px 24px; overflow: auto; align-items: start; }
.rbuild { display: grid; gap: 10px; align-content: start; }
.rchart .hbar .lbl { font-size: 12px; }
.legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--text-2); margin-top: 8px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 4px; vertical-align: middle; }
.ms-btn { display: flex; gap: 10px; align-items: center; justify-content: center; text-decoration: none; height: 40px; }
.ms-logo { display: grid; grid-template-columns: 9px 9px; gap: 2px; }
.ms-logo i { width: 9px; height: 9px; } .ms-logo i:nth-child(1) { background: #f25022; } .ms-logo i:nth-child(2) { background: #7fba00; } .ms-logo i:nth-child(3) { background: #00a4ef; } .ms-logo i:nth-child(4) { background: #ffb900; }
@media (max-width: 800px) {
  .report-grid { grid-template-columns: 1fr; padding: 12px; }
  .global-search { min-width: 0; } .global-search span, .global-search kbd { display: none; }
  .filter-pop { min-width: 0; }
  .board-bulk { margin: 0 8px 8px; }
}
.label-chips { display: flex; flex-wrap: wrap; gap: 4px; flex-basis: 100%; }
.lchip { border: 1px solid var(--c); background: transparent; color: var(--text); border-radius: 12px; padding: 2px 10px; font-size: 12px; cursor: pointer; }
.lchip.on { background: var(--c); color: #fff; }
.popover:has(.filter-pop) { max-width: min(560px, 94vw); }

/* ---------- R5: accounts + forecast ---------- */
.pill { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 600; white-space: nowrap; }
table.mt { width: 100%; border-collapse: collapse; font-size: 13px; }
table.mt th { background: var(--surface-2); color: var(--text-2); font-size: 12px; text-align: left; padding: 8px; border-bottom: 1px solid var(--border-soft); white-space: nowrap; }
table.mt td { padding: 6px 8px; border-bottom: 1px solid var(--border-soft); }
table.mt td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fc-in { height: 30px; width: 120px; text-align: right; }
.fc-total td { background: var(--surface-2); }
.att-track { display: inline-block; width: 80px; height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.att-track i { display: block; height: 100%; border-radius: 4px; }
a.list-row:hover { background: var(--row-hover); }

/* ---------- R6: catalog quotes, approvals, mail sync ---------- */
.qline.qline-cat { grid-template-columns: 1fr 64px 80px 70px 96px 92px 32px; }
.approval-box { border: 1px solid; border-left-width: 4px; border-radius: 6px; padding: 8px 10px; margin-top: 8px; }
.approver-actions { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.conn-card { display: flex; gap: 10px; align-items: center; border: 1px solid var(--border-soft); border-radius: 8px; padding: 10px 12px; }
.conn-card .grow { flex: 1; min-width: 0; }
.prov-logo { width: 28px; height: 28px; border-radius: 6px; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 13px; flex: none; }
.price-grid input { height: 30px; width: 110px; text-align: right; }
@media (max-width: 800px) { .qline.qline-cat { grid-template-columns: 1fr 56px 70px 80px 28px; } .qline.qline-cat > :nth-child(3), .qline.qline-cat > :nth-child(6) { display: none; } }
.btn:disabled, .btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ---------- R7: AI assist ---------- */
.ai-card { border: 1px solid #c9b6f2; background: linear-gradient(180deg, rgba(154,107,209,.08), transparent 70%); border-radius: 10px; padding: 12px 14px; }
.ai-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.ai-head h3 { margin: 0; font-size: 15px; }
.tag-ai { font-size: 11px; color: #6b4bb8; background: #ece4ff; border-radius: 4px; padding: 1px 6px; }
.ai-md h4 { margin: 8px 0 2px; font-size: 13px; color: var(--text-2); text-transform: uppercase; letter-spacing: .3px; }
.ai-md p { margin: 2px 0; font-size: 13px; } .ai-li { font-size: 13px; margin: 2px 0; }
.ai-pre { white-space: pre-wrap; font-family: inherit; font-size: 13px; background: var(--surface-2); padding: 8px; border-radius: 6px; }
.ai-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
@media (prefers-color-scheme: dark) { .tag-ai { background: #3b2f5c; color: #d9c8ff; } }
@media (max-width: 800px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .kpi { padding: 10px 12px; } .kpi .value { font-size: 20px; } }

/* file upload progress (R7.5) */
.up-bar { height: 4px; background: var(--border-soft, #e6e8ef); border-radius: 2px; overflow: hidden; margin-top: 6px; }
.up-bar > i { display: block; height: 100%; background: var(--primary); width: 0; transition: width .2s ease; }
.up-row.up-done .up-bar > i { background: #2e9e6b; }
.up-row.up-failed .up-bar > i { background: var(--danger, #c0392b); width: 100% !important; }
.up-row.up-failed .up-state { color: var(--danger, #c0392b); }
.up-row.up-done .up-state { color: #2e9e6b; }
.dropzone.busy { border-style: solid; border-color: var(--primary); }
.dropzone > * { pointer-events: none; }

/* checklist subitems (R7.6) */
.check-row .chk-cell { padding: 0 8px 0 52px; display: flex; align-items: center; }
.check-row .chk-rest { padding: 0 10px; display: flex; align-items: center; justify-content: flex-start; }
.check-row .chk-rest .chk-line { width: auto; }
.chk-line { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 34px; }
.chk-line .chk-done { width: 16px; height: 16px; accent-color: #2e9e6b; flex: none; cursor: pointer; }
.chk-line .chk-name { flex: 1 1 260px; min-width: 120px; border: 1px solid transparent; background: transparent; padding: 4px 6px; border-radius: 6px; font: inherit; color: inherit; }
.chk-line .chk-name:hover, .chk-line .chk-name:focus { border-color: var(--border); background: var(--surface); outline: none; }
.chk-line .chk-due, .chk-line .chk-owner { height: 28px; border: 1px solid var(--border-soft, var(--border)); border-radius: 6px; background: var(--surface); color: var(--text-2); font-size: 12px; padding: 0 6px; flex: none; }
.chk-line .chk-due { width: 132px; }
.chk-line .chk-owner { width: 140px; }
.chk-line .chk-due.overdue { color: #c0392b; border-color: #c0392b; font-weight: 600; }
.chk-line .chk-due.soon { color: #b46a00; border-color: #e0a040; }
.chk-line .chk-avatar-gap { width: 24px; flex: none; }
.chk-line .chk-plus { color: var(--text-2); width: 16px; display: inline-flex; justify-content: center; flex: none; }
.check-row.done .chk-name, .chk-line.done .chk-name { text-decoration: line-through; color: var(--text-2); }
.check-row .chk-del { opacity: 0; } .check-row:hover .chk-del, .chk-line:hover .chk-del { opacity: 1; }
.chk-drawer .chk-line { border-bottom: 1px solid var(--border-soft, #eee); padding: 4px 0; }
.chk-drawer .chk-line .chk-del { opacity: .6; }
.chk-badge.all { background: #2e9e6b; color: #fff; }
.chk-badge.late { box-shadow: inset 0 0 0 2px #c0392b; }
@media (max-width: 700px) { .chk-line { flex-wrap: wrap; } .chk-line .chk-name { flex-basis: 100%; } }

/* column reorder (R7.7) */
.hcell[draggable="true"] { cursor: grab; }
.hcell.col-drop-l { box-shadow: inset 3px 0 0 var(--primary); }
.hcell.col-drop-r { box-shadow: inset -3px 0 0 var(--primary); }

/* marketing (R8) */
.mk-body { display: grid; gap: 14px; align-content: start; }
.mk-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.mk-legal { font-size: 13px; margin: 0; }
.mk-text { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 16px; }
.mk-text.reply { border-left: 3px solid var(--primary); }
.mk-facts { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--text-2); margin-top: 6px; align-items: center; }
.mk-blocked { color: #b4232f; background: #fdecee; border-radius: 6px; padding: 6px 10px; font-size: 13px; margin-top: 8px; display: flex; gap: 6px; align-items: center; }
.mk-text-msg { display: grid; gap: 8px; align-content: start; }
.mk-confirm { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; }
.mk-convo { display: grid; gap: 4px; margin-top: 10px; max-height: 220px; overflow: auto; }
.mk-convo .bubble { max-width: 85%; padding: 6px 10px; border-radius: 12px; font-size: 13px; white-space: pre-wrap; }
.mk-convo .bubble.in { background: var(--hover, #eef0f5); justify-self: start; }
.mk-convo .bubble.out { background: var(--primary); color: #fff; justify-self: end; }
.mk-thread summary { cursor: pointer; padding: 6px 0; border-bottom: 1px solid var(--border-soft); }
.mk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.mk-camp { text-align: left; cursor: pointer; display: grid; gap: 6px; font: inherit; color: inherit; }
.mk-camp:hover { border-color: var(--primary); }
.mk-stats { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--text-2); }
.mk-st-running, .mk-st-published, .mk-st-active, .mk-st-sent { background: #e5f5ec; color: #1e7a4c; }
.mk-st-paused, .mk-st-scheduled, .mk-st-draft, .mk-st-partial { background: #fff4e0; color: #9a5b00; }
.mk-st-failed, .mk-st-opted_out { background: #fdecee; color: #b4232f; }
.mk-st-replied { background: #e8eefb; color: #24448a; }
.mk-step { border: 1px solid var(--border-soft); border-radius: 8px; padding: 10px; display: grid; gap: 8px; }
.mk-types { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mk-type { display: flex; gap: 8px; align-items: flex-start; border: 1px solid var(--border-soft); border-radius: 8px; padding: 10px; cursor: pointer; }
.modal.mk-wide { width: min(760px, 100%); }
.mk-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.mk-preview { border: 1px dashed var(--border); border-radius: 8px; padding: 10px; font-size: 13px; display: grid; gap: 4px; }
.mk-pick { display: grid; gap: 2px; max-height: 320px; overflow: auto; }
.mk-video img, .mk-thumb { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 6px; background: #1f2430; color: #fff; display: grid; place-items: center; margin-bottom: 8px; }
.mk-live { width: 100%; max-height: 360px; background: #000; border-radius: 8px; }
.mk-clock { font-variant-numeric: tabular-nums; }
.mk-net { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 4px; color: #fff; font-size: 11px; font-weight: 700; flex: none; }
@media (max-width: 800px) { .mk-text { grid-template-columns: 1fr; } .mk-types { grid-template-columns: 1fr; } }
/* sales videos (R8.1) */
.mk-vcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 256px)); gap: 14px; }
.mk-vcard { text-align: left; font: inherit; color: inherit; background: var(--surface); border: 1px solid var(--border-soft); border-radius: 10px; padding: 12px; display: grid; gap: 6px; cursor: pointer; box-shadow: 0 1px 3px rgba(0,0,0,.05); }
.mk-vcard:hover { border-color: var(--primary); box-shadow: 0 3px 10px rgba(0,0,0,.08); }
.mk-vthumb { position: relative; aspect-ratio: 16/9; background: #000; border-radius: 8px; overflow: hidden; display: grid; place-items: center; color: #fff; margin-bottom: 4px; }
.mk-vthumb img { width: 100%; height: 100%; object-fit: contain; }
.mk-play { position: absolute; width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.95); box-shadow: 0 2px 8px rgba(0,0,0,.25); }
.mk-play::after { content: ''; position: absolute; left: 13px; top: 9px; border-style: solid; border-width: 8px 0 8px 12px; border-color: transparent transparent transparent var(--primary); }
.mk-crumb { font-size: 12px; } .mk-crumb a { color: var(--primary); text-decoration: none; }
.mk-vgrid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr); gap: 16px; align-items: start; }
.mk-player { width: 100%; border-radius: 8px; background: #000; aspect-ratio: 16/9; display: block; }
@media (max-width: 900px) { .mk-vgrid { grid-template-columns: 1fr; } }

/* ---------- R9 lead research ---------- */
.rs-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.rs-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rs-views, .rs-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.rs-note { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; padding: 8px 12px; border-radius: 8px; }
.rs-note.ok { background: #e6f4ec; color: #1f6b47; }
.rs-note.warn { background: #fdf3e1; color: #7a5310; }
.rs-note code { font-size: 12px; background: rgba(0,0,0,.06); padding: 1px 4px; border-radius: 4px; }
.rs-presets { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; margin-top: 12px; }
.rs-preset { text-align: left; display: grid; gap: 6px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); cursor: pointer; color: var(--text); }
.rs-preset { align-content: start; }
.rs .fld-grid { align-items: start; }
.rs-preset span { font-size: 12px; color: var(--text-2); line-height: 1.4; }
.rs-preset:hover { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-soft); }
.rs-markets { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.rs-card { border: 1px solid var(--border-soft); border-radius: 10px; padding: 12px; display: grid; gap: 6px; align-content: start; background: var(--surface-2); }
.rs-card .btn { justify-self: start; }
.rs-chip { font-size: 11px; font-weight: 600; background: var(--primary-soft); color: var(--primary); border-radius: 10px; padding: 1px 8px; }
.rs-last { display: grid; gap: 6px; font-size: 12px; margin: 4px 0; }
.rs-mini { display: flex; gap: 10px; flex-wrap: wrap; color: var(--text-2); }
.rs-mini b { color: var(--text); }
.rs-pill { display: inline-block; font-size: 11px; font-weight: 600; color: #fff; background: var(--c); border-radius: 10px; padding: 1px 8px; text-transform: capitalize; }
.rs-tierbar { display: flex; height: 16px; border-radius: 4px; overflow: hidden; font-size: 10px; color: #fff; font-weight: 600; }
.rs-tierbar span { display: flex; align-items: center; justify-content: center; white-space: nowrap; overflow: hidden; }
.rs-hist td, .rs-hist th { white-space: nowrap; font-size: 13px; }
.rs-live { border-left: 3px solid var(--primary); display: grid; gap: 10px; }
.rs-steps { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; flex-wrap: wrap; }
.rs-steps li { display: flex; align-items: center; gap: 6px; font-size: 12px; padding: 4px 10px 4px 4px; border-radius: 14px; background: var(--surface-2); color: var(--text-2); }
.rs-steps li .n { width: 20px; height: 20px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--border); color: var(--text); font-weight: 600; font-size: 11px; }
.rs-steps li.done .n { background: #2e9e6b; color: #fff; }
.rs-steps li.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.rs-steps li.active .n { background: var(--primary); color: #fff; }
.rs-bar { height: 6px; background: var(--border-soft); border-radius: 3px; overflow: hidden; }
.rs-bar span { display: block; height: 100%; background: var(--primary); transition: width .4s; }
.rs-edit td { padding: 4px 6px 4px 0; vertical-align: middle; }
.rs-edit .input { width: 100%; }
.rs-check { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; margin: 6px 0; }
.rs-check input { margin-top: 3px; }
.rs-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; margin-top: 8px; }
.rs-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.rs-weights { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.rs-preview { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 13px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border-soft); }
.rs-savebar { position: sticky; bottom: 0; display: flex; gap: 8px; align-items: center; padding: 10px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 -2px 10px rgba(0,0,0,.06); }
.rs-how { display: flex; gap: 12px; margin: 10px 0; }
.rs-how .n { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--primary); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; }
.rs-how p { margin: 4px 0 0; font-size: 13px; color: var(--text-2); }
.rs-ol { margin: 0; padding-left: 20px; display: grid; gap: 8px; font-size: 13px; }
.rs .fld small { font-size: 11px; }

.join-code { font-size: 18px; font-weight: 700; letter-spacing: 2px; padding: 6px 12px; border-radius: 8px; background: var(--surface-2); border: 1px dashed var(--border); }
.company-flag { display: flex; gap: 6px; align-items: center; font-size: 12px; margin: 6px 0 2px; }

/* ---------- sales strategy templates ---------- */
.st-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.st-card { border: 1px solid var(--border-soft); border-radius: 10px; padding: 12px; display: grid; gap: 6px; align-content: start; background: var(--surface-2); }
.st-used { display: flex; flex-wrap: wrap; gap: 4px; }
.st-co { font-size: 11px; border-radius: 10px; padding: 1px 8px; background: #e6f4ec; color: #1f6b47; }
.st-co.old { background: #fdf3e1; color: #7a5310; }
.st-report { display: grid; gap: 8px; max-height: 320px; overflow: auto; font-size: 13px; border: 1px solid var(--border-soft); border-radius: 8px; padding: 10px; }
.st-rep ul { margin: 4px 0 0; padding-left: 18px; }
.st-rep.add strong { color: #1f6b47; } .st-rep.upd strong { color: var(--primary); } .st-rep.skip strong { color: #7a5310; } .st-rep.same strong { color: var(--text-2); }
.st-apply { width: 100%; min-width: 0; box-sizing: border-box; }
.st-apply .st-report, .st-apply p { overflow-wrap: anywhere; }

.company-features { display: grid; gap: 2px; margin: 6px 0 4px; }
.addon-list { display: grid; gap: 2px; padding-left: 22px; border-left: 2px solid var(--border-soft); margin-left: 6px; }
.addon-list.off { opacity: .5; }
.addon-dev { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .4px; background: #fdf3e1; color: #7a5310; border-radius: 8px; padding: 1px 6px; margin-left: 6px; }

/* ---------- incumbent check ---------- */
.inc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.inc-pill { display: inline-block; font-size: 11px; font-weight: 700; color: #fff; background: var(--c); border-radius: 10px; padding: 2px 9px; white-space: nowrap; }
.inc-who { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.inc-name { font-size: 18px; font-weight: 700; }
.inc-money { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 12px 0 8px; }
.inc-money .value { font-size: 22px; }
.inc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 16px; margin: 10px 0; }
.inc-kv { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; border-bottom: 1px solid var(--border-soft); padding: 3px 0; }
.inc-kv span { color: var(--text-2); } .inc-kv b { font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.inc-ul { margin: 6px 0 0; padding-left: 18px; font-size: 13px; display: grid; gap: 3px; }
.inc-none { display: grid; gap: 6px; }
@media (max-width: 640px) { .inc-money, .inc-grid { grid-template-columns: 1fr; } }

/* ---------- recompete finder ---------- */
.rc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px 14px; }
.rc-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.rc-check { display: flex; gap: 6px; align-items: center; font-size: 13px; }
.rc-lead { display: flex; gap: 10px; align-items: center; font-size: 12px; color: var(--text-2); flex-wrap: wrap; }
.rc-lead label { display: flex; gap: 6px; align-items: center; }
.rc-summary { padding: 10px 14px; border-bottom: 1px solid var(--border-soft); font-size: 13px; }
.rc-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.rc-table th { text-align: left; font-weight: 600; color: var(--text-2); padding: 8px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; position: sticky; top: 0; background: var(--surface); }
.rc-table td { padding: 8px 10px; border-bottom: 1px solid var(--border-soft); vertical-align: top; }
.rc-row-main { cursor: pointer; } .rc-row-main:hover td, .rc-row-main.open td { background: var(--row-hover); }
.rc-desc { font-weight: 600; max-width: 380px; overflow-wrap: anywhere; }
.rc-sub { font-size: 11px; }
.rc-flags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 3px; }
.rc-flag { font-size: 10px; font-weight: 600; border-radius: 8px; padding: 1px 6px; background: var(--surface-2); color: var(--text-2); }
.rc-flag.final { background: #fdecee; color: #b4232f; } .rc-flag.opts { background: #e6eefb; color: #305090; }
.rc-status { font-size: 11px; font-weight: 600; border-radius: 10px; padding: 2px 8px; background: #e6f4ec; color: #1f6b47; white-space: nowrap; }
.rc-status.dismissed { background: var(--surface-2); color: var(--text-2); }
.rc-detail td { background: var(--surface-2); }
.rc-detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 6px 24px; padding: 6px 4px; }
.rc-cards { display: grid; gap: 12px; max-width: 1100px; }
.rc-card-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.rc-card-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; margin: 10px 0; }
.rc-card-kpis div { display: grid; gap: 2px; font-size: 13px; } .rc-card-kpis span { font-size: 11px; color: var(--text-2); }
.side-item .side-count, .side-count { flex: 0 0 auto; width: auto; margin-left: auto; font-size: 11px; font-weight: 700; background: var(--primary); color: #fff; border-radius: 10px; padding: 0 7px; }

.sam-key { display: flex; gap: 8px; align-items: center; font-size: 13px; padding: 8px 10px; border-radius: 8px; background: var(--surface-2); }
.sam-test td, .sam-test th { font-size: 13px; }
.sam-ok { color: #1f6b47; font-weight: 600; } .sam-bad { color: #b4232f; font-weight: 600; }

/* ---------- buyer intent ---------- */
.int-pill { display: inline-block; font-size: 11px; font-weight: 700; color: #fff; background: var(--c); border-radius: 10px; padding: 1px 8px; }
.int-stars { color: #e3a71c; letter-spacing: 1px; font-size: 12px; white-space: nowrap; } .int-stars .off { color: var(--border); }
.int-badge { display: flex; gap: 6px; align-items: center; white-space: nowrap; }
.int-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.int-row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.int-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; margin-top: 10px; }
.int-kpis > div { display: grid; gap: 3px; font-size: 13px; } .int-kpis span:first-child { font-size: 11px; color: var(--text-2); }
.int-action { display: flex; gap: 6px; align-items: flex-start; font-size: 13px; background: var(--primary-soft); border-radius: 8px; padding: 8px 10px; }
.int-signals { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; margin-top: 10px; }
.int-sig { border: 1px solid var(--border-soft); border-radius: 8px; padding: 8px; display: grid; gap: 3px; background: var(--surface-2); }
.int-sig-score { font-size: 11px; font-weight: 700; color: var(--primary); }
.int-json { max-height: 260px; overflow: auto; font-size: 11px; background: var(--surface-2); padding: 8px; border-radius: 6px; }
.int-scoring { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-top: 8px; }
.int-score-mod { display: grid; gap: 4px; border: 1px solid var(--border-soft); border-radius: 8px; padding: 8px; }
.rc-cat { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 2px 12px; margin: 4px 0 6px; }
.rc-row-main.is-new td:first-child { box-shadow: inset 3px 0 0 var(--primary); }

/* Acquisition files (R10.6) */
.acq-known { display: flex; gap: 6px; flex-wrap: wrap; }
.acq-known .chip.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.acq-notices { display: grid; gap: 6px; max-height: 420px; overflow: auto; }
.acq-notice { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); cursor: pointer; font-size: 13px; }
.acq-notice input { margin-top: 3px; flex: 0 0 auto; }
.acq-notice .grow { flex: 1; min-width: 0; }
.acq-title { margin-top: 2px; overflow-wrap: anywhere; }
.acq-count { margin-left: 8px; padding: 1px 8px; border-radius: 10px; background: color-mix(in srgb, var(--primary) 14%, transparent); color: var(--primary); font-size: 12px; font-weight: 600; }
.acq-pulled { margin: 0; padding-left: 18px; font-size: 13px; display: grid; gap: 3px; }
.mk-bubble-opts { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 13px; }
.mk-seg { display: inline-flex; gap: 4px; }

/* Lead status pipeline (R10.7) */
.lead-status-bar { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 8px; }
.lsb { display: flex; align-items: center; gap: 8px; padding: 6px 12px; border: 1px solid var(--border); border-left: 4px solid var(--c); border-radius: 8px; background: var(--surface); font: inherit; font-size: 13px; cursor: pointer; white-space: nowrap; color: var(--text); }
.lsb b { font-variant-numeric: tabular-nums; }
.lsb:hover { background: color-mix(in srgb, var(--c) 8%, var(--surface)); }
.lsb.on { background: color-mix(in srgb, var(--c) 16%, var(--surface)); border-color: var(--c); }
.lv-label { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-right: 2px; align-self: center; }

/* Sidebar board list a little larger (R10.7) */
.side-item { font-size: 15px; }
@media (min-width: 801px) { .side-item { height: 36px; } }
.side-item svg { width: 17px; height: 17px; flex: 0 0 auto; }

/* Emoji picker + email template styling (R10.7) */
.emoji-pop { position: fixed; z-index: 2000; width: 320px; max-height: 320px; display: flex; flex-direction: column; gap: 6px; padding: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.18); }
.emoji-grid { overflow: auto; display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; }
.emoji-cat { grid-column: 1 / -1; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin: 6px 2px 2px; }
.emoji { border: 0; background: none; font-size: 20px; line-height: 1; padding: 5px 0; border-radius: 6px; cursor: pointer; }
.emoji:hover { background: var(--hover); }
.mk-stylebar { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; padding: 6px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); }
.mk-col { display: inline-flex; gap: 4px; align-items: center; font-size: 12px; color: var(--text-2); }
.mk-sep { width: 1px; height: 22px; background: var(--border); margin: 0 4px; }
.fmt-btn { min-width: 32px; justify-content: center; }
.mk-email-prev { background: #fff; color: #1f2430; border: 1px solid var(--border); border-radius: 8px; padding: 12px; margin-top: 6px; }
.sa-row { display: grid; gap: 6px; padding: 10px; border: 1px solid var(--border); border-radius: 8px; }
.sa-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.sa-grid { display: grid; grid-template-columns: 1fr 1fr auto auto; gap: 8px; align-items: center; }
@media (max-width: 800px) { .sa-grid { grid-template-columns: 1fr; } }
.sa-row code { font-size: 11px; background: var(--bg); padding: 2px 6px; border-radius: 4px; overflow-wrap: anywhere; }
.mk-email-log td, .mk-email-log th { padding: 8px 10px; vertical-align: top; font-size: 13px; }
.mk-email-log tr.mk-failed td { background: color-mix(in srgb, var(--danger, #c93d50) 6%, transparent); }

/* AI lead finder + usage (R11) */
.lf-meter { display: grid; gap: 4px; font-size: 12px; color: var(--text-2); min-width: 180px; }
.lf-meter i { display: block; height: 6px; background: var(--border); border-radius: 4px; overflow: hidden; }
.lf-meter i b { display: block; height: 100%; }
.lf-meter.big { font-size: 15px; font-weight: 600; color: var(--text); max-width: 520px; }
.lf-meter.big i { height: 10px; }
.lf-body { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 16px; padding: 16px 24px; min-height: 0; flex: 1; overflow: hidden; }
.lf-projects { display: flex; flex-direction: column; gap: 6px; overflow: auto; }
.lf-proj { text-align: left; border: 1px solid var(--border); background: var(--surface); border-radius: 8px; padding: 8px 10px; display: grid; gap: 2px; cursor: pointer; font: inherit; color: var(--text); }
.lf-proj.on { border-color: var(--primary); background: var(--primary-soft); }
.lf-it { display: flex; gap: 6px; align-items: center; font-size: 13px; }
.lf-it span { flex: 1; }
.lf-main { min-width: 0; display: flex; flex-direction: column; overflow: hidden; }
.lf-proj-view { display: flex; flex-direction: column; gap: 8px; min-height: 0; flex: 1; overflow: auto; }
.lf-proj-head { display: flex; gap: 8px; align-items: flex-start; }
.lf-chat-wrap { display: flex; flex-direction: column; min-height: 0; flex: 1; gap: 8px; }
.lf-chat { flex: 1; overflow: auto; display: flex; flex-direction: column; gap: 10px; padding: 4px 2px; min-height: 240px; max-height: calc(100vh - 330px); }
.lf-msg { display: flex; flex-direction: column; gap: 6px; max-width: 86%; }
.lf-msg.user { align-self: flex-end; }
.lf-bubble { white-space: pre-wrap; padding: 10px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); font-size: 14px; line-height: 1.45; }
.lf-msg.user .lf-bubble { background: var(--primary); color: #fff; border-color: var(--primary); }
.lf-proposals { display: grid; gap: 6px; }
.lf-card { display: grid; gap: 4px; padding: 8px 10px; border: 1px dashed var(--primary); border-radius: 8px; background: var(--primary-soft); justify-items: start; }
.lf-compose { display: flex; gap: 8px; align-items: flex-end; }
.lf-compose textarea { flex: 1; resize: vertical; }
.lf-starters { display: flex; gap: 6px; flex-wrap: wrap; }
.lf-strategy { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.lf-strategy ul { margin: 0; padding-left: 18px; }
.lf-sources { display: grid; gap: 10px; }
.lf-src-head { display: flex; gap: 8px; align-items: flex-start; flex-wrap: wrap; }
.lf-cands td, .lf-cands th { padding: 7px 9px; vertical-align: top; font-size: 13px; }
.lf-sig { display: grid; grid-template-columns: 1fr 2fr 70px; gap: 6px; }
.lf-rates { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.lf-days { display: flex; gap: 4px; align-items: flex-end; height: 100px; }
.lf-day { display: flex; flex-direction: column; align-items: center; gap: 2px; flex: 1; max-width: 26px; }
.lf-day i { display: block; width: 100%; background: var(--primary); border-radius: 3px 3px 0 0; }
.lf-day small { font-size: 10px; color: var(--muted); }
@media (max-width: 800px) { .lf-body { grid-template-columns: 1fr; padding: 12px; overflow: auto; } .lf-chat { max-height: none; } .lf-msg { max-width: 100%; } .lf-sig { grid-template-columns: 1fr; } }

/* ===================== R12 ===================== */
.chip-code.ok { background: #e3f4ea; border-color: #b9e2c9; color: #1f7a4c; cursor: default; }
.chip-code.bad { background: #fbe6e9; border-color: #f2c2c9; color: #a3283b; cursor: default; }
:root[data-theme="dark"] .chip-code.ok { background: #1f3a2d; border-color: #2f5a43; color: #8fd8ae; }
:root[data-theme="dark"] .chip-code.bad { background: #44222a; border-color: #6a3340; color: #f1a3b0; }
.btn-ghost { background: transparent; border: 1px solid transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--hover); color: var(--text); }
.side-item .side-badge, .side-badge { flex: 0 0 auto; overflow: visible; margin-left: auto; background: var(--danger); color: #fff; border-radius: 10px; font-size: 11px; font-weight: 700; padding: 1px 7px; }
.side-item .addon-tag, .addon-tag { flex: 0 0 auto; margin-left: auto; font-size: 10px; text-transform: uppercase; letter-spacing: .04em; border: 1px solid var(--border); border-radius: 4px; padding: 0 5px; color: var(--text-2); }
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.seg button { background: transparent; border: 0; padding: 5px 12px; font: inherit; font-size: 13px; color: var(--text-2); cursor: pointer; }
.seg button.on { background: var(--primary); color: #fff; }

/* Today */
.today-page .board-body { display: grid; gap: 16px; align-content: start; grid-template-columns: minmax(0, 1fr); }
.td-grid > *, .td-grid aside > * { min-width: 0; }
.td-kpis { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.td-kpis .kpi { padding: 10px 14px; background: var(--surface); }
.td-kpis .kpi .value { font-size: 22px; }
.kpi.warn { border-color: #f0b4bd; box-shadow: inset 3px 0 0 var(--danger); }
.td-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.td-grid aside { display: grid; gap: 16px; }
.td-h { margin: 0 0 10px; font-size: 16px; }
.td-card { background: var(--surface); border: 1px solid var(--border-soft); border-left: 4px solid var(--k); border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; display: grid; gap: 4px; transition: box-shadow .15s; }
.td-card:hover { box-shadow: 0 2px 10px rgba(0, 0, 0, .07); }
.td-card-top { display: flex; align-items: center; gap: 6px; }
.td-kind { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--k); }
.td-title { font-weight: 700; font-size: 15px; }
.td-sub { font-size: 12px; }
.td-why { font-size: 13px; }
.td-snip { font-size: 13px; color: var(--text-2); font-style: italic; border-left: 2px solid var(--border); padding-left: 8px; }
.td-acts { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 6px; }
.td-pop { position: absolute; right: 0; bottom: 110%; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; box-shadow: var(--shadow); display: grid; z-index: 30; min-width: 130px; }
.td-pop button { background: none; border: 0; text-align: left; padding: 8px 12px; font: inherit; font-size: 13px; cursor: pointer; color: var(--text); }
.td-pop button:hover { background: var(--hover); }
.td-empty { text-align: center; padding: 30px; }
.td-empty .big { font-size: 34px; color: #2e9e6b; }
.td-meet { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--border-soft); }
.td-meet:first-of-type { border-top: 0; }
.td-time { font-weight: 700; font-size: 13px; min-width: 62px; color: var(--primary); }
.td-deal { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--border-soft); color: inherit; text-decoration: none; }
.td-deal:hover .td-deal-name { color: var(--primary); }
.td-deal-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.td-health { display: grid; justify-items: end; gap: 3px; min-width: 56px; }
.td-health b { font-size: 14px; color: var(--hc); }
.td-health i { display: block; width: 56px; height: 5px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.td-health i span { display: block; height: 100%; background: var(--hc); }
.td-setup { border: 1px solid var(--primary-soft); }
.td-progress { height: 6px; background: var(--surface-2); border-radius: 3px; overflow: hidden; margin: 10px 0; }
.td-progress b { display: block; height: 100%; background: var(--primary); }
.td-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 8px 16px; }
.td-step { display: flex; gap: 10px; align-items: center; font-size: 13px; }
.td-step.done { color: var(--text-2); text-decoration: line-through; }
.td-check { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--border); display: grid; place-items: center; flex: none; }
.td-step.done .td-check { background: #2e9e6b; border-color: #2e9e6b; color: #fff; }
@media (max-width: 1000px) { .td-grid { grid-template-columns: 1fr; } }
@media (max-width: 800px) { .td-steps { grid-template-columns: 1fr; } .td-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* One timeline */
.widget.tl .tl-top { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.tl-filters { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 8px; }
.tl-filters .chip { height: 26px; font-size: 12px; }
.tl-list { position: relative; display: grid; gap: 2px; }
.tl-list::before { content: ''; position: absolute; left: 12px; top: 6px; bottom: 6px; width: 2px; background: var(--border-soft); }
.tl-entry { position: relative; display: flex; gap: 10px; padding: 6px 0; }
.tl-dot { position: relative; z-index: 1; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--border-soft); color: var(--text-2); flex: none; }
.tl-entry.k-email_in .tl-dot, .tl-entry.k-text_in .tl-dot { background: #e1edfb; color: #2f7fd1; border-color: #c5dcf6; }
.tl-entry.k-call .tl-dot { background: #fdf0dc; color: #c07a10; border-color: #f4dcb3; }
.tl-entry.k-meeting .tl-dot { background: #ece6fd; color: #6a4bd8; border-color: #d8ccfa; }
.tl-entry.k-deal .tl-dot { background: #e3f4ea; color: #2e9e6b; border-color: #bfe3cd; }
:root[data-theme="dark"] .tl-entry .tl-dot { background: var(--surface-2); }
.tl-main { flex: 1; min-width: 0; }
.tl-head { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: 13px; }
.tl-meta { font-size: 12px; }
.tl-body { font-size: 13px; white-space: pre-wrap; margin-top: 3px; overflow-wrap: anywhere; }
.tl-acts { display: flex; gap: 10px; }
.tl-acts .link-btn { font-size: 12px; display: inline-flex; gap: 4px; align-items: center; }
.tl-entry.upcoming .tl-main { background: var(--primary-soft); border-radius: 6px; padding: 4px 8px; }
.tl-quote { background: var(--surface-2); border-left: 3px solid var(--border); border-radius: 4px; padding: 8px 10px; font-size: 13px; }

/* Leads: simpler filters */
.lead-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.fchip { display: inline-flex; align-items: center; gap: 2px; padding-right: 2px; height: 26px; font-size: 12px; }
.lead-adv { padding: 10px; background: var(--surface-2); border: 1px solid var(--border-soft); border-radius: 8px; }

/* Drawer "More" tab */
select.tab.tab-more { appearance: none; -webkit-appearance: none; background: transparent; border: 0; font: inherit; color: var(--text-2); cursor: pointer; padding: 0 12px; }
select.tab.tab-more.active { color: var(--primary); font-weight: 600; }

/* Email domain check */
.dns-status { border: 1px solid var(--border-soft); border-radius: 8px; padding: 10px 12px; margin: 6px 0 12px; display: grid; gap: 8px; }
.dns-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.dns-table th { text-align: left; color: var(--text-2); font-weight: 600; font-size: 12px; padding: 4px 6px; border-bottom: 1px solid var(--border-soft); }
.dns-table td { padding: 6px; border-bottom: 1px solid var(--border-soft); vertical-align: top; }
.dns-table code { background: var(--surface-2); padding: 1px 4px; border-radius: 3px; font-size: 11px; overflow-wrap: anywhere; }

/* AI assistant */
.as-fab { position: fixed; right: 22px; bottom: 76px; z-index: 60; width: 52px; height: 52px; border-radius: 50%; border: 0; cursor: pointer; color: #fff; background: linear-gradient(135deg, var(--primary), #6a4bd8); box-shadow: 0 6px 18px rgba(48, 80, 144, .45); display: grid; place-items: center; transition: transform .15s; }
.as-fab:hover { transform: scale(1.06); }
.as-panel { position: fixed; right: 16px; bottom: 16px; top: calc(var(--header-h) + 12px); width: min(420px, calc(100vw - 32px)); z-index: 70; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); display: flex; flex-direction: column; overflow: hidden; }
.as-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--border-soft); color: var(--primary); }
.as-head strong { color: var(--text); }
.as-ctx { font-size: 12px; color: var(--text-2); padding: 6px 14px; background: var(--surface-2); border-bottom: 1px solid var(--border-soft); }
.as-msgs { flex: 1; overflow: auto; padding: 14px; display: grid; gap: 10px; align-content: start; }
.as-hello p { margin: 0 0 10px; font-size: 13px; color: var(--text-2); }
.as-sug { display: flex; flex-wrap: wrap; gap: 6px; }
.as-sug .chip { height: auto; min-height: 28px; padding: 4px 10px; font-size: 12px; text-align: left; }
.as-msg { font-size: 13px; line-height: 1.5; max-width: 100%; }
.as-msg p { margin: 0 0 6px; } .as-msg ul { margin: 0 0 6px; padding-left: 18px; }
.as-msg.user { justify-self: end; background: var(--primary); color: #fff; border-radius: 12px 12px 2px 12px; padding: 8px 12px; max-width: 85%; white-space: pre-wrap; }
.as-msg.assistant { background: var(--surface-2); border-radius: 12px 12px 12px 2px; padding: 10px 12px; }
.as-msg.err { background: #fbe6e9; color: #a3283b; }
.as-msg.typing { display: flex; gap: 4px; width: 54px; }
.as-msg.typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--text-2); animation: asdot 1s infinite ease-in-out; }
.as-msg.typing span:nth-child(2) { animation-delay: .15s; } .as-msg.typing span:nth-child(3) { animation-delay: .3s; }
@keyframes asdot { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.as-block { background: var(--surface); border: 1px solid var(--border-soft); border-radius: 8px; padding: 8px 10px; margin-top: 8px; }
.as-bt { font-weight: 700; font-size: 12px; margin-bottom: 6px; }
.as-bar { display: grid; grid-template-columns: 96px 1fr auto; gap: 6px; align-items: center; font-size: 12px; margin: 3px 0; }
.as-bl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.as-bar i { height: 10px; background: var(--surface-2); border-radius: 5px; overflow: hidden; display: block; }
.as-bar i b { display: block; height: 100%; background: var(--primary); border-radius: 5px; }
.as-bv { font-variant-numeric: tabular-nums; font-weight: 600; }
.as-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.as-table th { text-align: left; color: var(--text-2); font-weight: 600; padding: 3px 4px; border-bottom: 1px solid var(--border-soft); }
.as-table td { padding: 4px; border-bottom: 1px solid var(--border-soft); }
.as-table tr:hover td { background: var(--row-hover); }
.as-action { display: flex; gap: 8px; align-items: center; background: var(--surface); border: 1px solid var(--primary-soft); border-radius: 8px; padding: 8px 10px; margin-top: 8px; }
.as-action.done { opacity: .7; }
.as-foot { display: flex; gap: 8px; align-items: flex-end; padding: 10px 12px; border-top: 1px solid var(--border-soft); }
.as-foot textarea { resize: none; flex: 1; }
.as-note { font-size: 11px; padding: 0 12px 8px; }
@media (max-width: 800px) { .as-fab { bottom: 76px; right: 14px; } .as-panel { top: 8px; right: 8px; left: 8px; bottom: 8px; width: auto; } }

/* r12.0.3 legal links under the sign-in form */
.auth-legal { text-align: center; font-size: 12px; color: var(--text-2); margin-top: 18px; }
.auth-legal a { color: var(--text-2); }
.auth-legal a:hover { color: var(--primary); }

/* r12.0.6 emergency check-in */
.ci-sos { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 8px; border: 0; background: #c62f45; color: #fff; font-weight: 700; font-size: 13px; cursor: pointer; box-shadow: 0 0 0 3px rgba(198,47,69,.18); white-space: nowrap; max-width: 360px; }
.ci-sos:hover { background: #a9243a; }
.ci-sos-label { overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 760px) { .ci-sos-label { display: none; } .ci-sos { padding: 0 9px; } }
.ci-danger { background: #c62f45 !important; color: #fff !important; font-weight: 700; border: 0; }
.ci-danger:disabled { opacity: .6; }
.ci-modal { display: grid; gap: 12px; width: 100%; min-width: 0; }
.ci-modal .input, .ci-modal textarea { width: 100%; box-sizing: border-box; }
.ci-ico { width: 36px; height: 36px; border-radius: 10px; background: #fbe6e9; color: #c62f45; display: grid; place-items: center; flex: none; }
.ci-seg { display: flex; gap: 6px; flex-wrap: wrap; }
.ci-seg button { border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 18px; padding: 5px 12px; font-size: 13px; cursor: pointer; }
.ci-seg button.on { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); font-weight: 600; }
.ci-people { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 4px 12px; max-height: 180px; overflow: auto; }
.ci-people:empty { display: none; }
.ci-person { display: flex; gap: 6px; align-items: center; font-size: 13px; }
.ci-body { padding: 16px 24px; display: grid; gap: 16px; align-content: start; }
.ci-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 760px) { .ci-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ci-body { padding: 12px; } }
.ci-kpi { background: var(--surface); border: 1px solid var(--border-soft); border-radius: 10px; padding: 12px 14px; }
.ci-kpi .l { color: var(--text-2); font-size: 12px; } .ci-kpi .v { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; } .ci-kpi .s { font-size: 12px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ci-h { display: flex; align-items: center; gap: 8px; padding: 12px 14px 4px; flex-wrap: wrap; } .ci-h h3 { margin: 0; flex: 1; font-size: 15px; }
.ci-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.ci-chip { border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 16px; padding: 4px 11px; font-size: 13px; cursor: pointer; } .ci-chip.on { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); font-weight: 600; }
.ci-t { width: 100%; border-collapse: collapse; font-size: 13px; }
.ci-t th { text-align: left; font-size: 12px; color: var(--text-2); font-weight: 600; padding: 8px 12px; border-bottom: 1px solid var(--border-soft); white-space: nowrap; }
.ci-t td { padding: 9px 12px; border-bottom: 1px solid var(--border-soft); vertical-align: middle; }
.ci-t td .btn { margin-left: 6px; }
.ci-help-row td { background: rgba(198, 47, 69, .07); }
.ci-pill { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; border-radius: 10px; padding: 2px 9px; white-space: nowrap; }
.ci-pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.ci-safe { background: #e3f4ea; color: #1f7a4c; } .ci-help { background: #fbe6e9; color: #a3283b; } .ci-replied { background: #e1edfb; color: #2163a8; } .ci-pending { background: #eceef3; color: #5e6473; } .ci-open { background: #fbe6e9; color: #a3283b; }
.ci-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border-soft); margin-top: 10px; align-items: center; flex-wrap: wrap; }
.ci-tabs button { border: 0; background: none; padding: 8px 12px; font-size: 14px; color: var(--text-2); border-bottom: 2px solid transparent; cursor: pointer; } .ci-tabs button.on { color: var(--primary); border-color: var(--primary); font-weight: 600; }
.ci-back { margin-left: auto; font-size: 13px; }
.ci-page a.btn { text-decoration: none; }

/* r12.0.7 sign-up consent + company acceptance screen */
.auth-consent { display: flex !important; flex-direction: row !important; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--text-2); line-height: 1.45; }
.auth-consent input { margin-top: 3px; flex: none; width: 16px; height: 16px; }
.lg-back { position: fixed; inset: 0; z-index: 9500; background: rgba(15, 20, 35, .55); display: grid; place-items: center; padding: 16px; }
.lg-card { background: var(--surface); color: var(--text); border-radius: 14px; width: min(620px, 100%); max-height: 92vh; overflow: auto; padding: 24px 26px; box-shadow: 0 24px 70px rgba(0,0,0,.35); display: grid; gap: 14px; }
.lg-card h2 { margin: 0; font-size: 22px; }
.lg-card ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: 14px; line-height: 1.5; }
.lg-links { display: flex; gap: 14px; flex-wrap: wrap; font-size: 14px; }
.lg-agree { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.5; background: var(--bg); border: 1px solid var(--border-soft); border-radius: 10px; padding: 12px; }
.lg-agree input { margin-top: 3px; width: 18px; height: 18px; flex: none; }

/* r12.0.8 – emergency check-in is a small alarm icon (admins only) */
.ci-icon { color: var(--text-2); }
.ci-icon:hover { color: #c62f45; }
.ci-icon.live { color: #c62f45; }
.ci-live-badge { background: #c62f45; }
.dc-ico { background: var(--primary-soft); color: var(--primary); } /* r14.6.13 data call */
.ci-icon:hover { color: var(--primary); } .ci-icon.live { color: var(--primary); } .ci-live-badge { background: var(--primary); }

/* ===================== r12.1 – sales-first layout (phones first, fine on desktop) ===================== */
.ms-page { padding: 16px 20px 24px; display: grid; gap: 12px; align-content: start; max-width: 860px; }
.ms-head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ms-head h2 { margin: 0; font-size: 22px; }
.ms-back { font-size: 28px; line-height: 1; text-decoration: none; color: var(--text-2); padding: 0 4px; }
.ms-spacer { flex: 1; }
.ms-ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.ms-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ms-meta { margin-top: 4px; flex-wrap: wrap; font-size: 13px; }
.ms-card { display: block; background: var(--surface); border: 1px solid var(--border-soft); border-radius: 14px; padding: 12px 14px; color: inherit; text-decoration: none; text-align: left; font: inherit; width: 100%; transition: transform .15s ease; }
a.ms-card:hover, .ms-lead:hover { border-color: var(--border); }
.ms-list { display: grid; gap: 10px; }
.ms-name { font-weight: 700; font-size: 15px; }
.ms-money { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ms-next { margin-top: 6px; font-size: 13px; }
.ms-late { color: var(--danger); font-weight: 600; }
.ms-sum, .ms-hint { font-size: 13px; }
.ms-hint { text-align: center; }
.ms-pill { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; border-radius: 10px; padding: 2px 9px; color: var(--c, #5e6473); background: color-mix(in srgb, var(--c, #8a90a0) 14%, transparent); border: 0; white-space: nowrap; }
.ms-pill.solid { color: #fff; background: var(--c); }
.ms-pill-btn { font-size: 13px; padding: 5px 11px; cursor: pointer; }
.status-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; border-radius: 10px; padding: 2px 9px; color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); white-space: nowrap; }
.status-badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.ms-search .input { width: 100%; border-radius: 12px; height: 42px; }
.ms-chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.ms-chips::-webkit-scrollbar { display: none; }
.ms-chip { flex: none; border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 16px; padding: 6px 12px; font-size: 13px; cursor: pointer; }
.ms-chip.on { background: var(--primary); color: #fff; border-color: var(--primary); }
.ms-toggle { display: inline-flex; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.ms-toggle button { border: 0; background: var(--surface); color: var(--text-2); padding: 6px 12px; font-size: 13px; cursor: pointer; }
.ms-toggle button.on { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.ms-big { font-size: 28px; font-weight: 800; font-variant-numeric: tabular-nums; }
.ms-bar { flex: 1; height: 6px; border-radius: 4px; background: var(--border-soft); overflow: hidden; }
.ms-bar i { display: block; height: 100%; border-radius: 4px; }
.ms-nextcard { border-left: 4px solid #e0952a; cursor: pointer; }
.ms-nextcard:disabled { cursor: default; }
.ms-act-row { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-top: 1px solid var(--border-soft); font-size: 14px; }
.ms-act-row:first-of-type { border-top: 0; }
.ms-act-row .svg { margin-top: 3px; color: var(--text-2); flex: none; }
.ms-more summary { cursor: pointer; font-weight: 600; color: var(--primary); list-style: none; }
.ms-more[open] summary { margin-bottom: 8px; }
.ms-wide { width: 100%; justify-content: center; }
.ms-callnext { height: 46px; font-size: 15px; }
.ms-callbtn { flex: none; width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--primary); color: #fff; display: grid; place-items: center; cursor: pointer; }
/* action bar: Call · Text · Email · Log */
.ms-actions { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; }
.ms-act { display: grid; place-items: center; gap: 2px; border: 1px solid var(--border); background: var(--surface); color: var(--primary); border-radius: 12px; padding: 9px 0; font-weight: 600; font-size: 13px; cursor: pointer; font-family: inherit; }
.ms-act.primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.ms-act:disabled { opacity: .45; cursor: default; }
.ms-deal-page .ms-actions { position: sticky; bottom: 0; background: var(--bg); padding: 10px 0 4px; z-index: 5; }
/* swipe feedback */
.ms-deal { position: relative; }
.ms-deal.sw-r { box-shadow: inset 6px 0 0 #1f7a4c; }
.ms-deal.sw-l { box-shadow: inset -6px 0 0 #305090; }
/* bottom sheet */
.ms-sheet-wrap { position: fixed; inset: 0; z-index: 9000; background: rgba(15, 20, 35, .45); display: flex; align-items: flex-end; justify-content: center; }
.ms-sheet { background: var(--surface); color: var(--text); width: min(560px, 100%); border-radius: 20px 20px 0 0; padding: 10px 16px calc(18px + env(safe-area-inset-bottom)); display: grid; gap: 10px; max-height: 92vh; overflow: auto; box-shadow: 0 -10px 40px rgba(0,0,0,.25); animation: slideUp .2s ease-out; }
@media (min-width: 761px) { .ms-sheet-wrap { align-items: center; } .ms-sheet { border-radius: 16px; padding-bottom: 18px; } }
.ms-grab { width: 40px; height: 5px; border-radius: 3px; background: var(--border); margin: 0 auto 4px; }
.ms-sheet-title { font-size: 18px; font-weight: 700; }
.ms-sheet textarea, .ms-sheet input.input { width: 100%; box-sizing: border-box; }
.ms-label { font-weight: 600; font-size: 13px; }
.ms-opts { display: flex; gap: 6px; flex-wrap: wrap; }
.ms-opts button { border: 1.5px solid var(--border); background: var(--surface); color: var(--text); border-radius: 12px; padding: 9px 12px; font-weight: 600; font-size: 14px; cursor: pointer; font-family: inherit; }
.ms-opts button.on { border-color: #1f7a4c; background: #effaf3; color: #1f5a3a; }
.ms-grid2 { display: grid; grid-template-columns: 1fr 1fr; }
.ms-stage-list { display: grid; gap: 6px; }
.ms-stage { display: flex; align-items: center; gap: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 12px; padding: 12px; font-size: 15px; font-weight: 600; cursor: pointer; text-align: left; font-family: inherit; }
.ms-stage .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--c); }
.ms-stage.on { border-color: var(--primary); background: var(--primary-soft); }
.ms-bottom-space { height: 4px; }
/* leads: one row of controls, quiet table */
.lf-view { width: 150px; }
.leads-phone .lead-status-bar { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.leads-phone .lead-filter-row { flex-wrap: nowrap; }
.leads-phone .lead-filter-row .lf-view { width: 112px; flex: none; }
.ms-lead.dnc { opacity: .7; }
.lead-drawer .ms-actions { margin-bottom: 2px; }
@media (max-width: 760px) {
  .ms-page { padding: 12px 14px 90px; }
  .lead-drawer .ms-actions { position: sticky; bottom: 0; z-index: 6; background: var(--surface); padding: 8px 0; border-top: 1px solid var(--border-soft); order: 99; }
  .lead-drawer .drawer-body { display: flex !important; flex-direction: column; }
  .ms-deal-page .ms-actions { bottom: calc(56px + env(safe-area-inset-bottom)); }
  .topbar .icon-btn[title="Toggle dark mode"] { display: none; }
  /* Kanban on a phone: one stage per screen, swipe between stages */
  .kanban { scroll-snap-type: x mandatory; gap: 10px; }
  .kanban { overflow-x: auto; }
  .kanban > .lane { flex: 0 0 calc(100vw - 44px) !important; width: calc(100vw - 44px) !important; max-width: none !important; scroll-snap-align: start; }
}

/* r12.1 fixes */
.ms-page { grid-template-columns: minmax(0, 1fr); grid-auto-rows: max-content; }
.ms-head h2.ms-ellipsis { flex: 1 1 auto; }
.ms-head .ms-spacer { display: none; }
.ms-chips { min-height: 34px; align-items: center; }
.platform-badge-side { display: none; }
body.mobile .platform-badge { display: none; }
body.mobile .platform-badge-side { display: flex; align-items: center; gap: 8px; margin: 18px 8px 8px; padding-top: 12px; border-top: 1px solid var(--border-soft); text-decoration: none; color: var(--text-2); font-size: 11px; }
body.mobile .platform-badge-side img { width: 22px; height: 22px; border-radius: 50%; }
body.mobile .platform-badge-side small { display: inline; margin-right: 4px; font-size: 11px; }
body.mobile .platform-badge-side b { font-size: 11px; font-weight: 600; }
.td-setup-mini { display: flex; align-items: center; gap: 10px; width: 100%; border: 1px solid var(--border-soft); cursor: pointer; font: inherit; color: var(--text); padding: 10px 14px; margin: 12px 0; }
.td-setup-mini .td-progress { margin: 0; }
.td-setup-mini .muted { font-size: 13px; }
@media (max-width: 760px) {
  .today-page .board-head { padding: 12px 14px 4px; }
  .today-page .board-title-row { flex-wrap: wrap; row-gap: 6px; }
  .today-page .board-title-row h2 { font-size: 20px !important; }
  .today-page .board-title-row > .muted { flex-basis: 100%; margin-left: 0 !important; order: 5; font-size: 13px; }
  .today-page .board-title-row .icon-btn { display: none; }
  .today-page .td-plan { padding: 4px 8px; }
  .today-page .board-body { padding: 8px 14px 90px !important; }
  /* KPI tiles become one swipeable strip so "Do next" is on the first screen */
  .td-kpis { display: flex; overflow-x: auto; scrollbar-width: none; gap: 8px; margin: 0 -14px; padding: 2px 14px 4px; }
  .td-kpis::-webkit-scrollbar { display: none; }
  .td-kpis .kpi { flex: 0 0 auto; min-width: 112px; padding: 8px 12px; }
  .td-kpis .kpi .label { font-size: 11px; }
  .td-kpis .kpi .value { font-size: 18px; }
  .td-card { padding: 10px 12px; }
  .td-acts { flex-wrap: wrap; gap: 6px; }
  .td-acts .btn-ghost { padding: 4px 6px; }
  .td-snip { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
}
@media (max-width: 760px) { .td-kpis { flex: none; min-height: 60px; align-items: stretch; } .today-page .board-body { display: block; } }

/* r12.1 one-row board toolbar */
.toolbar { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding: 10px 24px; }
.toolbar::-webkit-scrollbar { display: none; }
.toolbar > * { flex: none; }
.toolbar > span { flex-wrap: nowrap !important; }
.toolbar .live-pill { margin-left: auto; order: 99; }
.live-pill.solo { width: 28px; padding: 0; justify-content: center; }
.board-desc:placeholder-shown:not(:focus) { height: 0; padding: 0; margin: 0; opacity: 0; }
.board-head:hover .board-desc:placeholder-shown { height: auto; padding: 2px 6px; opacity: .7; }
@media (max-width: 760px) { .toolbar { padding: 8px 12px; gap: 6px; } .toolbar .search { width: 130px; } }
/* r12.1 deal drawer summary card */
.deal-head-card { margin: 10px 0 6px; padding: 12px 14px; border: 1px solid var(--border-soft); border-radius: 12px; background: var(--bg); display: grid; gap: 10px; }
.dh-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dh-value { font-size: 22px; font-weight: 700; }
.dh-health { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-2); }
.dh-health i { width: 9px; height: 9px; border-radius: 50%; }
.dh-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.dh-fact { display: grid; gap: 2px; min-width: 0; }
.dh-fact span { font-size: 11px; color: var(--text-2); text-transform: uppercase; letter-spacing: .03em; }
.dh-fact b { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dh-fact b.warn { color: #c62f45; }
.dh-next { display: flex; gap: 8px; align-items: baseline; text-align: left; background: var(--surface); border: 1px dashed var(--border); border-radius: 8px; padding: 8px 10px; font: inherit; color: var(--text); cursor: pointer; }
.dh-next span { font-size: 12px; color: var(--text-2); flex: none; }
.dh-next:disabled { cursor: default; }
.deal-head-card .ms-actions { gap: 6px; }
.deal-head-card .ms-actions .ms-act { display: flex; align-items: center; justify-content: center; padding: 6px 4px; flex-direction: row; gap: 6px; min-height: 36px; height: auto; }
@media (max-width: 760px) { .dh-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .undo-bar { bottom: calc(70px + env(safe-area-inset-bottom)); max-width: calc(100vw - 24px); } }
.ms-empty { display: grid; gap: 12px; justify-items: center; text-align: center; }
.ms-empty-acts { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.vid-purpose { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent); white-space: nowrap; }
.layout-back { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 300; font: 600 30px/1 inherit; font-family: inherit; padding: 18px 30px; border-radius: 999px; border: 0; background: #2b2f3a; color: #fff; box-shadow: 0 8px 24px rgba(0,0,0,.3); }
/* r12.2 meeting notes */
.mt-page { max-width: 980px; }
.mt-note-row { width: 100%; background: none; border: 0; border-top: 1px solid var(--border-soft); padding: 10px 2px; cursor: pointer; font: inherit; color: var(--text); display: flex; align-items: center; gap: 10px; }
.mt-note-row:first-of-type { border-top: 0; }
.mt-recent { display: grid; margin-top: 6px; }
.mt-title { flex: 1; min-width: 0; font-size: 22px; font-weight: 700; border: 1px solid transparent; background: transparent; color: var(--text); border-radius: 6px; padding: 2px 6px; font-family: inherit; }
.mt-title:hover, .mt-title:focus { border-color: var(--border); outline: none; }
.mt-decision { padding: 6px 10px; border-left: 3px solid var(--primary); background: var(--bg); border-radius: 4px; margin-top: 6px; font-size: 14px; }
.mt-table-wrap { overflow-x: auto; margin-top: 8px; }
.mt-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.mt-table th { text-align: left; font-size: 12px; color: var(--text-2); font-weight: 600; padding: 4px 6px; }
.mt-table td { padding: 4px 6px; border-top: 1px solid var(--border-soft); vertical-align: top; }
.mt-table tr.sent td { opacity: .65; }
.mt-cell { height: 32px; padding: 4px 8px; min-width: 120px; }
.mt-transcript pre { white-space: pre-wrap; font-family: inherit; font-size: 13px; max-height: 50vh; overflow: auto; color: var(--text-2); }
.mt-transcript summary { cursor: pointer; font-weight: 600; }
.mt-lead-list { display: grid; max-height: 220px; overflow: auto; }
.mt-lead-list .list-row { background: none; border: 0; text-align: left; padding: 8px; border-radius: 6px; cursor: pointer; font: inherit; color: var(--text); }
.mt-lead-list .list-row.sel { background: var(--primary-soft); }
@media (max-width: 760px) { .mt-table thead { display: none; } .mt-table tr { display: grid; grid-template-columns: 28px 1fr 1fr 28px; gap: 4px; padding: 6px 0; border-top: 1px solid var(--border-soft); } .mt-table td { border: 0; padding: 2px; } .mt-table td:nth-child(2) { grid-column: 2 / 4; } .mt-table td:nth-child(3) { grid-column: 2; } .mt-table td:nth-child(4) { grid-column: 3; } .mt-table td:nth-child(5) { grid-row: 1; grid-column: 4; } .mt-cell { min-width: 0; width: 100%; } }
/* r12.2 Gap Cap Workflow */
.gcx-page { max-width: 1180px; }
.gc-pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; color: var(--c); background: color-mix(in srgb, var(--c) 13%, transparent); white-space: nowrap; }
.gcx-scroll { overflow-x: auto; }
.gcx-grid { width: 100%; border-collapse: collapse; font-size: 13px; }
.gcx-grid th { position: sticky; top: 0; background: #1f3766; color: #fff; text-align: left; padding: 6px 8px; font-weight: 600; font-size: 12px; }
.gcx-grid td { border: 1px solid var(--border-soft); padding: 0; vertical-align: top; }
.gcx-grid tr.ai td { background: color-mix(in srgb, #f5d76e 18%, var(--surface)); }
.gcx-n { color: var(--text-2); text-align: center; font-size: 11px; width: 32px; padding: 6px 0 !important; background: var(--bg); }
.gcx-cell { width: 100%; border: 0; background: transparent; padding: 6px 8px; font: inherit; color: var(--text); min-width: 70px; }
.gcx-cell:focus { outline: 2px solid var(--primary); outline-offset: -2px; background: var(--surface); }
.gcx-text { resize: none; overflow: hidden; min-height: 32px; min-width: 280px; line-height: 1.4; field-sizing: content; }
.gcx-acts { white-space: nowrap; padding: 2px 4px !important; }
.gcx-r { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 6px; color: #fff; font-weight: 700; font-size: 13px; }
.gcx-r.r5 { background: #1f7a4c; } .gcx-r.r4 { background: #4a9d6f; } .gcx-r.r3 { background: #d8a31a; } .gcx-r.r2 { background: #e0752a; } .gcx-r.r1 { background: #c62f45; } .gcx-r.r0 { background: var(--border); color: var(--text-2); }
.gcx-heat, .gcx-ptable { width: 100%; border-collapse: collapse; font-size: 13px; }
.gcx-heat th, .gcx-heat td, .gcx-ptable th, .gcx-ptable td { padding: 7px 8px; border-top: 1px solid var(--border-soft); text-align: left; vertical-align: middle; }
.gcx-heat th { font-size: 12px; color: var(--text-2); font-weight: 600; vertical-align: bottom; } .gcx-ptable th { font-size: 12px; color: var(--text-2); font-weight: 600; }
.gcx-heat .c { text-align: center; } .gcx-heat th.c div { font-size: 12px; color: var(--text); margin-bottom: 3px; }
.gcx-send-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.gcx-plist { max-height: 240px; overflow: auto; border: 1px solid var(--border-soft); border-radius: 8px; padding: 4px; }
.gcx-prow { display: flex; gap: 8px; align-items: center; padding: 6px; border-radius: 6px; cursor: pointer; font-size: 13px; }
.gcx-prow:hover { background: var(--bg); }
.gcx-manual { display: grid; grid-template-columns: 1fr 1fr 1.3fr auto; gap: 6px; }
.gcx-chosen { display: flex; flex-wrap: wrap; gap: 6px; }
.gcx-x { border: 0; background: none; color: inherit; cursor: pointer; font-size: 14px; padding: 0 0 0 2px; }
.gcx-preview { white-space: pre-wrap; font-family: inherit; font-size: 12.5px; background: var(--bg); border: 1px solid var(--border-soft); border-radius: 8px; padding: 10px; max-height: 260px; overflow: auto; margin: 0; }
@media (max-width: 760px) { .gcx-send-grid { grid-template-columns: 1fr; } .gcx-manual { grid-template-columns: 1fr 1fr; } }
/* r12.2: dialogs that ask for more room get it (instead of cutting off the right side) */
.modal:has(> div[style*="min-width"]) { width: min(900px, 100%); }
.modal > div[style*="min-width"] { min-width: 0 !important; }
.gcx-grid td:nth-child(2) .gcx-cell { width: 64px; min-width: 64px; } .gcx-grid td:nth-child(3) .gcx-cell { width: 150px; min-width: 150px; }
.mt-table td:nth-child(3) .mt-cell { min-width: 160px; }
@media (max-width: 760px) {
  .mt-page .ms-head, .gcx-page .ms-head { flex-wrap: wrap; row-gap: 8px; }
  .mt-page .ms-head h2.ms-ellipsis { flex: 1 1 100%; }
  .gcx-page .ms-head .mt-title, .mt-page .ms-head .mt-title { flex: 1 1 calc(100% - 40px); font-size: 19px; }
  .gcx-page .ms-head > .btn { flex: 1 1 auto; justify-content: center; }
  .gcx-heat td:nth-child(2) { min-width: 180px; }
}
.gcx-team { margin-top: 6px; display: grid; gap: 2px; }
.gcx-tm { font-size: 12px; display: flex; gap: 4px; align-items: center; }
.gcx-tm .gcx-x { color: var(--danger); }
/* r12.3 AI campaign builder */
.aic-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.aic-tone { display: grid; gap: 8px; align-content: start; padding: 12px; border: 1px solid var(--border-soft); border-radius: 10px; background: var(--bg); }
.aic-sp { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--border-soft); border-radius: 10px; }
.aic-steps { display: grid; gap: 10px; max-height: 58vh; overflow: auto; padding-right: 4px; }
.aic-step { border: 1px solid var(--border-soft); border-left: 4px solid var(--primary); border-radius: 10px; padding: 10px 12px; display: grid; gap: 6px; }
.aic-step.aic-sms { border-left-color: #7a4e9e; } .aic-step.aic-task { border-left-color: #e0952a; }
.aic-step-head { display: flex; align-items: center; gap: 6px; }
.aic-day { font-size: 12px; font-weight: 700; background: var(--primary-soft); color: var(--primary); padding: 2px 8px; border-radius: 999px; }
.aic-facts { font-size: 12px; color: #9a5b00; background: #fff6e5; border-radius: 6px; padding: 6px 8px; }
.aic-name { flex: 1; min-width: 220px; font-weight: 600; }
@media (max-width: 760px) { .aic-grid { grid-template-columns: 1fr; } }

/* r12.3 Meet */
.meet-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; }
.meet-busy { border: 1px solid var(--border-soft); border-radius: 10px; padding: 10px 12px; background: var(--bg); display: grid; gap: 6px; align-content: start; font-size: 13px; }
.meet-busy-row { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 8px; padding: 4px 0; border-top: 1px solid var(--border-soft); }
.meet-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.meet-link { display: flex; gap: 8px; }
.meet-row { display: flex; align-items: center; gap: 4px; padding: 8px 0; border-top: 1px solid var(--border-soft); }
@media (max-width: 760px) { .meet-grid { grid-template-columns: 1fr; } }

/* r12.3 – Gap Cap in capture */
.gcx-nda { font-size: 12.5px; line-height: 1.45; background: color-mix(in srgb, #e0952a 9%, var(--surface, #fff)); border: 1px solid color-mix(in srgb, #e0952a 35%, transparent); border-radius: 8px; padding: 8px 10px; }
.gcx-done { font-size: 13px; color: #1f7a4c; background: color-mix(in srgb, #1f7a4c 8%, var(--surface, #fff)); border-radius: 8px; padding: 8px 10px; }
.gcx-team, .gcx-overlap { display: grid; gap: 6px; margin-top: 10px; }
.gcx-orow { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-top: 1px solid var(--border-soft); font-size: 13.5px; }
.gcx-ndachk { display: inline-flex; gap: 4px; align-items: center; font-size: 12px; white-space: nowrap; cursor: pointer; }

/* r12.3 – Provider search → Research with AI */
.rc { display: grid; grid-template-columns: minmax(300px, 400px) minmax(0, 1fr); gap: 16px; align-items: start; }
.rc-chat { display: grid; gap: 10px; position: sticky; top: 0; }
.rc-msgs { display: grid; gap: 10px; align-content: start; max-height: min(60vh, 560px); min-height: 220px; overflow: auto; padding-right: 4px; }
.rc-msg { display: grid; gap: 6px; justify-items: start; }
.rc-msg.user { justify-items: end; }
.rc-bubble { max-width: 92%; padding: 9px 12px; border-radius: 12px; font-size: 13.5px; line-height: 1.45; background: var(--bg); border: 1px solid var(--border-soft); }
.rc-msg.user .rc-bubble { background: var(--primary-soft, #e8eefb); border-color: transparent; }
.rc-acts { display: flex; gap: 6px; flex-wrap: wrap; }
.rc-job { display: grid; gap: 4px; padding: 8px 10px; border: 1px dashed var(--border-soft); border-radius: 10px; justify-items: start; }
.rc-job .ms-bar { width: 100%; }
.rc-examples { display: flex; gap: 6px; flex-wrap: wrap; }
.rc-examples .chip { height: auto; min-height: 28px; padding: 4px 10px; white-space: normal; text-align: left; font-size: 12px; }
.rc-compose { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; align-items: end; }
.rc-input { resize: vertical; min-height: 44px; }
.rc-results { min-width: 0; }
.rc-scroll { max-height: 66vh; overflow: auto; }
.rc-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.rc-table th { position: sticky; top: 0; background: var(--surface, #fff); text-align: left; font-weight: 600; padding: 6px 8px; border-bottom: 1px solid var(--border-soft); white-space: nowrap; text-transform: capitalize; }
.rc-table td { padding: 6px 8px; border-bottom: 1px solid var(--border-soft); vertical-align: top; }
.rc-table td.c-company_name { min-width: 220px; }
.rc-table td.c-website { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-tier { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; color: #fff; font-weight: 700; font-size: 12px; background: var(--c); }
@media (max-width: 900px) { .rc { grid-template-columns: minmax(0, 1fr); } .rc-chat { position: static; } .rc-msgs { max-height: 50vh; } }
.rc > *, .rc-chat > *, .rc-chat .ms-row > b { min-width: 0; }
/* r12.3 – phone: a long tab row (Leads · Dashboard · Provider search) scrolls instead of widening the page */
body.mobile .main-wrap { min-width: 0; }
body.mobile .shell { grid-template-columns: minmax(0, 1fr); }
body.mobile .page > .tabs, body.mobile .board-head .tabs { overflow-x: auto; scrollbar-width: none; }

/* r13 – checklist steps that wait for each other; transcripts waiting */
.chk-wait { font-size: 11.5px; color: var(--muted, #6b7385); white-space: nowrap; display: inline-flex; gap: 3px; align-items: center; }
.chk-waits { font-size: 12px; max-width: 190px; border: 1px solid var(--border-soft); border-radius: 6px; padding: 2px 4px; background: transparent; color: inherit; }
.chk-line-w { flex-wrap: wrap; }
.tr-card { border-left: 3px solid var(--primary); }
.tr-acts { display: grid; gap: 4px; max-height: 260px; overflow: auto; }
/* r13 – email domain setup */
.ea-steps { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 10px; font-size: 13px; }
.ea-step { display: inline-flex; gap: 6px; align-items: center; color: var(--muted, #6b7385); }
.ea-step.done { color: #1f7a4c; }
.ea-n { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; border: 1px solid currentColor; font-size: 11px; }
.ea-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ea-table th, .ea-table td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--border-soft); vertical-align: top; }
.ea-table code { font-size: 12px; word-break: break-all; }
.ea-val { max-width: 360px; }
.company-perms { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-bottom: 6px; }

/* r13 – Finance */
.fin-body { display: grid; gap: 16px; align-content: start; padding-top: 16px; grid-template-columns: minmax(0, 1fr); }
.fin-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.fin-grid.inv { grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.6fr); }
.fin-bars { width: 100%; height: auto; } .fin-bars .b-in { fill: #1f7a4c; } .fin-bars .b-out { fill: #c9763a; } .fin-bars .b-lab { font-size: 12px; fill: var(--muted, #6b7385); } .fin-bars .b-axis { stroke: var(--border-soft); }
.fin-key { font-size: 12px; color: var(--muted, #6b7385); display: inline-flex; gap: 6px; align-items: center; } .fin-key i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; } .fin-key .k-in { background: #1f7a4c; } .fin-key .k-out { background: #c9763a; margin-left: 8px; }
.fin-aging { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; } .fin-aging > b { grid-column: 1 / -1; font-size: 13px; }
.fin-age { border: 1px solid var(--border-soft); border-radius: 8px; padding: 6px 8px; display: grid; font-size: 12px; } .fin-age span { color: var(--muted, #6b7385); } .fin-age b { font-size: 14px; } .fin-age.late b { color: #c62f45; }
.fin-row { display: flex; gap: 10px; align-items: center; width: 100%; background: none; border: 0; border-bottom: 1px solid var(--border-soft); padding: 8px 2px; font: inherit; color: inherit; cursor: pointer; text-align: left; }
.fin-table { width: 100%; border-collapse: collapse; font-size: 13.5px; } .fin-table th { text-align: left; font-size: 12px; color: var(--muted, #6b7385); font-weight: 600; padding: 7px 8px; border-bottom: 1px solid var(--border-soft); white-space: nowrap; }
.fin-table td { padding: 8px; border-bottom: 1px solid var(--border-soft); vertical-align: middle; } .fin-table .n { text-align: right; white-space: nowrap; } .fin-table tr.click { cursor: pointer; } .fin-table tr.click:hover { background: var(--bg); }
.fin-table.lines td { padding: 4px; } .gcx-cell.n { text-align: right; }
.fin-tot { margin-left: auto; margin-top: 8px; font-size: 14px; } .fin-tot td { padding: 3px 8px; } .fin-tot .big td { font-weight: 700; } .fin-tot .n { text-align: right; min-width: 110px; }
.fin-accts { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; } .fin-acct { border: 1px solid var(--border-soft); border-radius: 10px; padding: 10px 14px; min-width: 170px; } .fin-acct b { font-size: 20px; }
.fin-pl-h { font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted, #6b7385); margin-bottom: 4px; }
.fin-pl { display: flex; justify-content: space-between; padding: 4px 0; border-bottom: 1px dashed var(--border-soft); font-size: 14px; } .fin-pl.total { font-weight: 700; border-bottom: 1px solid var(--border-soft); } .fin-pl.net { font-size: 17px; font-weight: 700; border: 0; margin-top: 10px; } .fin-pl.net.neg span:last-child { color: #c62f45; }
.fin-people { display: flex; flex-wrap: wrap; gap: 4px 16px; }
@media (max-width: 900px) { .fin-grid, .fin-grid.inv { grid-template-columns: minmax(0, 1fr); } .fin-aging { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* r13.1 – overnight SAM.gov change flag on a gov opportunity */
.sam-flag { flex: none; border: 0; border-radius: 999px; padding: 1px 8px; margin-left: 4px; font-size: 11px; font-weight: 600; cursor: pointer; background: color-mix(in srgb, #e0952a 18%, transparent); color: #a8650f; white-space: nowrap; }
.sam-flag:hover { background: color-mix(in srgb, #e0952a 30%, transparent); }

/* r13.1 – Feature usage */
.fu-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.fu-bar { display: inline-block; width: 90px; height: 8px; border-radius: 4px; background: var(--border-soft, #e6e9f0); margin-right: 8px; vertical-align: middle; overflow: hidden; }
.fu-bar i { display: block; height: 100%; background: var(--primary); border-radius: 4px; }
.fu-table td { vertical-align: middle; }

/* r13.1 usability: the floating "Powered by" badge shrinks to the logo so it no longer covers table cells and buttons; it opens on hover */
.platform-badge { padding: 4px; gap: 0; opacity: .92; }
.platform-badge span { max-width: 0; overflow: hidden; white-space: nowrap; transition: max-width .2s ease, margin .2s ease; }
.platform-badge:hover span, .platform-badge:focus-visible span { max-width: 200px; margin: 0 6px 0 8px; }

/* r14 – My card & calendar (mobile first) */
.mc-body { padding: 16px; overflow: auto; }
.mc-col { display: grid; gap: 14px; max-width: 640px; margin: 0 auto; align-content: start; }
.mc-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.mc-card { background: var(--surface, #fff); border-radius: 18px; overflow: hidden; box-shadow: 0 4px 18px rgba(20, 30, 60, .10); text-align: center; padding-bottom: 14px; }
.mc-band { height: 72px; background: linear-gradient(135deg, var(--mc, #305090), color-mix(in srgb, var(--mc, #305090) 60%, #000)); }
.mc-face { border-radius: 50%; object-fit: cover; background: #dde3ee; display: block; flex: none; }
.mc-card .mc-face { margin: -52px auto 0; border: 4px solid var(--surface, #fff); position: relative; }
.mc-initials { display: flex; align-items: center; justify-content: center; font-weight: 700; color: var(--primary, #305090); }
.mc-card .mc-initials { display: flex; }
.mc-who { padding: 8px 16px 2px; line-height: 1.35; } .mc-who b { font-size: 20px; display: block; }
.mc-off { margin: 8px 16px 0; padding: 8px; border-radius: 8px; background: #fff4e0; color: #8a5a00; font-size: 13px; }
.mc-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; padding: 12px 12px 0; }
.mc-actions .btn { min-height: 40px; }
.mc-form { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; } .mc-form .field:last-child { grid-column: 1 / -1; }
.mc-toggle { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; cursor: pointer; } .mc-toggle input { margin-top: 3px; width: 18px; height: 18px; }
.mc-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mc-mode { display: grid; gap: 2px; padding: 10px; border: 1.5px solid var(--border, #e3e7ef); border-radius: 10px; cursor: pointer; } .mc-mode.on { border-color: var(--primary, #305090); background: color-mix(in srgb, var(--primary, #305090) 6%, transparent); } .mc-mode input { display: none; }
.mc-days { display: flex; flex-wrap: wrap; gap: 6px; } .mc-days .chip { cursor: pointer; gap: 4px; }
.mc-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; } .mc-three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mc-url { font-family: ui-monospace, Menlo, monospace; font-size: 12px; background: var(--surface-2, #f4f6fa); padding: 6px 8px; border-radius: 6px; margin: 8px 0 0; overflow-wrap: anywhere; }
.mc-st-booked { background: #e3f4ea; color: #1f7a4c; } .mc-st-requested { background: #fff4e0; color: #8a5a00; } .mc-st-declined, .mc-st-failed { background: #fde8eb; color: #c62f45; }
.mc-times { display: flex; flex-wrap: wrap; gap: 6px; } .mc-slots { max-height: 50vh; overflow: auto; }
.mc-qr { display: grid; justify-items: center; gap: 4px; text-align: center; }
.mc-qr-img { width: min(300px, 78vw); height: auto; margin: 14px 0 6px; background: #fff; padding: 8px; border-radius: 12px; }
.mc-tabs .badge-count { margin-left: 6px; background: var(--danger, #c62f45); color: #fff; border-radius: 10px; padding: 0 6px; font-size: 11px; }
@media (max-width: 760px) {
  .mc-body { padding: 12px; } .mc-form, .mc-two, .mc-modes { grid-template-columns: 1fr; } .mc-three { grid-template-columns: 1fr 1fr 1fr; }
  .mc-tabs { overflow-x: auto; flex-wrap: nowrap; } .mc-tabs .tab { white-space: nowrap; }
  .mc-qr-modal { width: 100vw; max-width: 100vw; min-height: 100dvh; border-radius: 0; display: flex; align-items: center; justify-content: center; }
}
.widget .mc-actions { padding: 8px 0 0; justify-content: flex-start; }
/* r14 company › workspace breadcrumb + platform section fold */
.ws-select .name { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; } .ws-select .ws-co { font-size: 11px; color: var(--text-2); font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sel-tick { color: var(--primary, #305090); font-weight: 700; margin-left: 8px; }
.plat-toggle { width: 100%; display: flex; justify-content: space-between; align-items: center; background: none; border: 0; cursor: pointer; font: inherit; text-align: left; }
.plat-side.folded > :not(.plat-toggle) { display: none; }
.mk-testmode { display: flex; gap: 8px; align-items: flex-start; margin: 0 24px; padding: 10px 12px; border-radius: 8px; background: #fff4e0; color: #7a5200; font-size: 13px; }
.kpi.note { border-color: #b9cdf0; box-shadow: inset 3px 0 0 var(--primary, #305090); }
.kpi-link { text-align: left; cursor: pointer; font: inherit; color: inherit; } .kpi-link:hover { border-color: var(--primary, #305090); }
.grid .hcell.name { position: sticky; } .name-resize { position: absolute; right: -3px; top: 0; bottom: 0; width: 8px; cursor: col-resize; z-index: 3; }
.name-resize:hover, .name-resize:active { background: color-mix(in srgb, var(--primary, #305090) 35%, transparent); }
.grid .cell.name { box-shadow: 6px 0 6px -6px rgba(20, 30, 60, .18); } /* scroll fade: shows the pinned column edge */
.cell-status.empty { background: transparent; } .cell-status.empty:hover { background: var(--surface-2, #f4f6fa); }
.cap-over { display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 10px; background: var(--danger, #c93d50); color: #fff; font-size: 12px; font-weight: 600; } .cap-near { display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 10px; background: #fff4e0; color: #8a5a00; font-size: 12px; }
.toast-act { margin-left: 12px; background: none; border: 1px solid currentColor; color: inherit; border-radius: 6px; padding: 2px 10px; font: inherit; font-weight: 600; cursor: pointer; }
.gcx-prereq { flex-basis: 100%; display: grid; gap: 2px; font-size: 13px; padding: 8px 10px; border-radius: 8px; background: var(--surface-2, #f4f6fa); margin-bottom: 4px; }
.fin-task { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; border-left: 3px solid #e08a1e; } .fin-table tr.click:hover td { background: var(--surface-2, #f4f6fa); cursor: pointer; }
.gl-list { display: grid; gap: 8px; } .gl-row { display: flex; gap: 10px; align-items: flex-start; } .gl-n { flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--primary, #305090); color: #fff; font-size: 12px; display: flex; align-items: center; justify-content: center; } .gl-btn { font-size: 12px; margin-left: 8px; }
.gcx-link { display: flex; gap: 8px; align-items: center; padding: 8px 10px; border: 1px solid var(--border-soft, #e3e7ef); border-radius: 8px; }
.set-tabs { flex-wrap: wrap; row-gap: 4px; overflow: visible; } .set-group { display: flex; align-items: center; gap: 2px; padding-right: 12px; margin-right: 8px; border-right: 1px solid var(--border-soft, #e3e7ef); } .set-group:last-child { border-right: 0; } .set-glabel { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-2); margin-right: 4px; }
@media (max-width: 760px) { /* r14: tabs that scroll sideways show a fade so people know there is more */
  .board-head .tabs { -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); padding-right: 24px; }
}
.sticky-actions { position: sticky; bottom: -1px; background: var(--surface, #fff); padding: 10px 0 2px; margin-bottom: -2px; border-top: 1px solid var(--border-soft, #e3e7ef); z-index: 2; } .tpl { align-content: start; min-height: 92px; }
.assist-panel summary { cursor: pointer; list-style: revert; }
.search-results { grid-template-columns: minmax(0, 1fr); overflow-x: hidden; } .search-hit { min-width: 0; overflow: hidden; } .search-modal { width: min(680px, 92vw); max-width: 100%; overflow: hidden; }

/* r14.2 – Ask the guide + on-screen walkthrough */
.gd-box { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--border-soft, #e3e7ef); border-radius: 12px; background: var(--surface, #fff); }
.gd-head { display: flex; gap: 8px; align-items: center; color: var(--primary, #305090); }
.gd-msgs { display: grid; gap: 8px; max-height: 46vh; overflow: auto; padding-right: 2px; }
.gd-msg { padding: 8px 10px; border-radius: 10px; font-size: 14px; line-height: 1.45; }
.gd-msg.user { background: var(--primary-soft, #e8eef9); justify-self: end; max-width: 88%; }
.gd-msg.guide { background: var(--surface-2, #f4f6fa); }
.gd-opts, .gd-sugg { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; } .gd-sugg .muted { flex-basis: 100%; }
.gd-opts .chip, .gd-sugg .chip { cursor: pointer; height: auto; padding: 4px 10px; white-space: normal; text-align: left; }
.gd-steps { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 4px; }
.gd-offer { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border-soft, #e3e7ef); font-size: 13px; } .gd-offer span { flex-basis: 100%; font-weight: 600; }
.gd-ask { display: flex; gap: 6px; } .gd-input { flex: 1; }
.gw-ring { position: fixed; z-index: 10000; pointer-events: none; border: 3px solid #e3a71c; border-radius: 10px; box-shadow: 0 0 0 4px rgba(227, 167, 28, .35), 0 0 0 9999px rgba(15, 22, 40, .18); transition: all .15s ease; animation: gw-pulse 1.4s ease-in-out infinite; }
@keyframes gw-pulse { 50% { box-shadow: 0 0 0 9px rgba(227, 167, 28, .15), 0 0 0 9999px rgba(15, 22, 40, .18); } }
.gw-tip { position: fixed; z-index: 10001; background: var(--surface, #fff); color: var(--text, #1d2433); border-radius: 12px; padding: 12px 14px; box-shadow: 0 10px 30px rgba(15, 22, 40, .25); border: 1px solid var(--border-soft, #e3e7ef); max-width: calc(100vw - 24px); }
.gw-tip.gw-center { left: 50% !important; top: auto !important; bottom: 90px; transform: translateX(-50%); width: min(360px, calc(100vw - 24px)) !important; }
.gw-text { font-size: 15px; margin: 4px 0 2px; font-weight: 500; }
.gw-btns { display: flex; gap: 6px; align-items: center; margin-top: 10px; }
/* r14.3 – Email the Government */
.gm-box { display: grid; gap: 8px; border: 1px solid var(--border-soft); border-radius: 8px; padding: 12px; }
.gm-row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.gm-head { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; margin-top: 4px; }
.gm-qs { display: grid; gap: 4px; }
.gm-q { display: flex; gap: 8px; align-items: flex-start; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--border-soft); font-size: 13px; cursor: pointer; line-height: 1.4; }
.gm-q.on { border-color: var(--primary, #305090); background: var(--primary-soft, #e8eef9); } .gm-q input { margin-top: 2px; }
.gm-warn { font-size: 12px; padding: 6px 8px; border-radius: 6px; background: #fff4e0; color: #7a5200; }

/* r14.4 contact finder */
.cf-list { display: grid; gap: 6px; }
.cf-row { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--border, #e3e6ee); border-radius: 8px; padding: 8px 10px; }
.cf-row.cf-saved { background: rgba(46,125,50,.05); }
.cf-main { flex: 1; min-width: 0; }
.cf-top { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.cf-label { font-size: 12px; font-weight: 600; color: var(--muted, #667); text-transform: uppercase; letter-spacing: .03em; }
.cf-conf { font-size: 11px; color: var(--c); border: 1px solid var(--c); border-radius: 10px; padding: 0 6px; line-height: 16px; }
.cf-val { font-size: 14px; word-break: break-all; margin: 2px 0; }
.cf-src { font-size: 11px; }
.cf-act { display: flex; gap: 4px; align-items: center; flex-shrink: 0; }
.cf-ok { font-size: 12px; color: #2e7d32; font-weight: 600; }
.cf-invite { display: flex; gap: 8px; align-items: center; margin-top: 10px; padding: 8px 10px; border-radius: 8px; background: rgba(10,102,194,.07); font-size: 13px; }
.cf-setpage { margin-top: 10px; }
@media (max-width: 600px) { .cf-row { flex-wrap: wrap; } .cf-act { width: 100%; justify-content: flex-end; } }

/* r14.5: keep content from shifting sideways when a scrollbar appears or goes */
.sidebar, .page, .content, .drawer-body, .board-wrap { scrollbar-gutter: stable; }

/* r14.5 Gap Cap: pages scroll, footer, send list groups, our answers */
.ms-page { overflow-y: auto; }
.gcx-foot { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; border-top: 1px solid var(--border-soft); padding: 12px 0 4px; margin-top: 4px; }
.gcx-psrc { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-2); padding: 8px 6px 2px; }
.gcx-pmail { margin-top: 4px; height: 30px; font-size: 13px; }
.gcx-done-row { opacity: .55; cursor: default; }
.gcx-lrow { cursor: pointer; }
.gcx-lrow .icon-btn { flex: none; }
.gcx-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--text-2); margin-bottom: 8px; }
.gcx-osec { font-size: 14px; margin: 14px 0 6px; }
.gcx-ocard { border: 1px solid var(--border-soft); border-radius: 10px; padding: 12px; display: grid; gap: 8px; margin-bottom: 8px; }
.gcx-otext { font-weight: 600; }
.gcx-rates { display: flex; flex-wrap: wrap; gap: 6px; }
.gcx-rate { display: flex; gap: 6px; align-items: center; border: 1px solid var(--border); background: var(--surface); border-radius: 8px; padding: 5px 9px; font: inherit; font-size: 12px; cursor: pointer; color: var(--text); }
.gcx-rate b { font-size: 14px; }
.gcx-rate.on { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 12%, var(--surface)); }
.gcx-ogrid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 8px; }
.gcx-sugg { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.gcx-sugg .chip-btn { border: 1px dashed var(--border); background: var(--bg); border-radius: 14px; padding: 3px 10px; font: inherit; font-size: 12px; cursor: pointer; color: var(--text); }
.gcx-exp { display: grid; gap: 6px; max-height: 60vh; overflow: auto; }
.gcx-exprow { display: flex; gap: 8px; align-items: flex-start; border: 1px solid var(--border-soft); border-radius: 8px; padding: 8px 10px; }
@media (max-width: 700px) { .gcx-ogrid { grid-template-columns: 1fr; } }

/* r14.5 leads: contact icons, contact on file */
.rch-row { display: inline-flex; gap: 3px; flex-wrap: nowrap; }
.rch { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 4px; border-radius: 6px; border: 1px dashed var(--border); background: none; color: var(--text-2); font: 600 11px/1 inherit; cursor: pointer; text-decoration: none; opacity: .55; }
.rch.on { border: 1px solid color-mix(in srgb, var(--primary) 40%, transparent); background: color-mix(in srgb, var(--primary) 10%, transparent); color: var(--primary); opacity: 1; }
.rch svg { width: 12px; height: 12px; }
.lc-reach { white-space: nowrap; }
.cf-onfile { display: grid; gap: 4px; margin-top: 8px; }
.cf-of { display: flex; gap: 8px; align-items: center; font-size: 13px; min-width: 0; }
.cf-of .cf-label { width: 84px; flex: none; }
.cf-of a, .cf-of span:not(.cf-label) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cf-missing { font-size: 12px; color: #a8650f; font-weight: 600; }

/* r14.6 */
.spinner { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--border, #d6dbe6); border-top-color: var(--primary, #305090); display: inline-block; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.area-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-height: 40px; height: auto; padding: 5px 8px; cursor: text; }
.area-chip { display: inline-flex; align-items: center; gap: 4px; background: var(--surface-2, #eef1f7); border: 1px solid var(--border, #d6dbe6); border-radius: 14px; padding: 2px 4px 2px 10px; font-size: 13px; }
.area-chip button { border: 0; background: transparent; cursor: pointer; font-size: 15px; line-height: 1; color: var(--text-2, #667); padding: 0 4px; }
.area-in { flex: 1; min-width: 180px; border: 0; outline: none; background: transparent; font: inherit; color: inherit; padding: 4px 2px; }
.ba-box { display: grid; gap: 10px; margin-top: 10px; padding: 12px 14px; border: 1px solid var(--border, #d6dbe6); border-radius: 10px; background: var(--surface, #fff); }
.ba-dates td, .ba-dates th { padding: 4px 8px; font-size: 13px; text-align: left; border-bottom: 1px solid var(--border, #e3e6ee); }
.ba-dates tr.due td { font-weight: 700; color: #b4232f; }
.ba-docs a { display: inline-flex; gap: 4px; align-items: center; margin: 0 10px 4px 0; font-size: 13px; }
.ba-list { margin: 0; padding-left: 18px; font-size: 13px; }
/* r14.6.3 – map area search */
.lb-map { height: 400px; border: 1px solid var(--border, #d6dbe6); border-radius: 10px; overflow: hidden; background: #eef1f5; z-index: 0; position: relative; }
.lb-map.drawing, .lb-map.drawing .leaflet-container { cursor: crosshair !important; }
.lb-map-tools { gap: 8px; flex-wrap: wrap; }
.lb-map-sq.over { color: #c0392b; font-weight: 600; }
.lb-area-sum { font-size: 13px; padding: 8px 10px; border: 1px solid var(--border, #d6dbe6); border-radius: 8px; background: var(--surface-2, #f6f8fb); }
.lb-area-sum .rc-flags { max-height: 120px; overflow: auto; }
.area-chips.disabled { pointer-events: none; }
@media (max-width: 760px) { .lb-map { height: 300px; } }
/* r14.6.3 – AI reviewer */
.ai-verdict { font-size: 13px; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--border, #d6dbe6); background: var(--surface-2, #f6f8fb); margin: 6px 0; }
.ai-verdict.approve { border-color: #9fd3b4; background: #effaf3; }
.ai-verdict.dismiss { border-color: #e3b4b4; background: #fdf3f3; }
.ai-verdict.unsure { border-color: #ecd08a; background: #fffaeb; }
:root[data-theme="dark"] .ai-verdict.approve, :root[data-theme="dark"] .ai-verdict.dismiss, :root[data-theme="dark"] .ai-verdict.unsure { background: transparent; }
.ai-panel .rc-flag { margin-left: 4px; }
.sa-chip { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 10px; white-space: nowrap; border: 1px solid var(--border, #d6dbe6); }
.sa-chip.full { background: var(--surface-2, #f1f3f7); }
.sa-chip.set { background: #eaf2ff; border-color: #b8cff5; color: #1f4b99; }
:root[data-theme="dark"] .sa-chip.set { background: transparent; color: inherit; }
/* r14.6.4 – map on/off switch */
.lb-switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; user-select: none; }
.lb-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.lb-switch-track { width: 34px; height: 20px; border-radius: 10px; background: var(--border, #c9cfdb); position: relative; transition: background .15s; flex: none; }
.lb-switch-track::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: left .15s; }
.lb-switch input:checked + .lb-switch-track { background: #3b5ba9; }
.lb-switch input:checked + .lb-switch-track::after { left: 16px; }
.lb-switch input:focus-visible + .lb-switch-track { outline: 2px solid #3b5ba9; outline-offset: 2px; }
/* r14.6.7 – invitations */
.inv-preview { display: grid; gap: 4px; font-size: 13px; }
.inv-row { display: flex; justify-content: space-between; gap: 12px; padding: 4px 8px; border-radius: 6px; background: var(--surface-2, #f6f8fb); }
.inv-row .inv-how { color: var(--text-2, #556); white-space: nowrap; }
.inv-row.microsoft .inv-how { color: #1f4b99; }
.inv-row.invalid, .inv-row.bad { background: #fdf3f3; }
.inv-row.member .inv-how { color: #8a6d1f; }
:root[data-theme="dark"] .inv-row.invalid, :root[data-theme="dark"] .inv-row.bad { background: transparent; }
/* r14.6.10 – Get set up bar above boards */
.ms-setup-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 6px 0 10px; padding: 8px 12px; border: 1px solid var(--border, #d6dbe6); border-radius: 10px; background: var(--surface-2, #f6f8fb); font-size: 13px; }
.ms-setup { margin-bottom: 12px; }

/* r14.6.13 – board focus (collapsed header) */
.board-head.focus { padding: 6px 24px 0; border-bottom: 1px solid var(--border-soft); }
.board-head.focus .board-title { font-size: 16px; padding: 1px 6px; }
.board-head.focus .board-title-row { flex-wrap: nowrap; min-width: 0; }
.board-head.focus .tabs-inline { margin: 0; border-bottom: 0; flex: 1 1 auto; min-width: 0; }
.board-head.focus .tabs-inline .tab { padding: 6px 10px; }
.board-focus-btn { gap: 4px; }
.board-head.focus + .toolbar { padding-top: 6px; padding-bottom: 6px; }
.main-wrap.no-side { grid-template-columns: minmax(0, 1fr); padding-left: 8px; } /* r14.6.13: the board takes the full width when the sidebar is hidden */
body.mobile .main-wrap.no-side { padding-left: 0; }
/* r14.6.14 – skeleton loading */
.skel { display: grid; gap: 10px; padding: 4px 0; }
.skel-row { display: flex; gap: 12px; align-items: center; }
.skel-row i { display: block; height: 14px; border-radius: 6px; background: linear-gradient(90deg, var(--border-soft) 0%, var(--hover, #eef0f4) 40%, var(--border-soft) 80%); background-size: 300% 100%; animation: skel 1.4s ease-in-out infinite; }
.skel-table .skel-row { padding: 10px 12px; border-bottom: 1px solid var(--border-soft); background: var(--surface); }
.skel-table .skel-row i { height: 12px; }
@keyframes skel { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
@media (prefers-reduced-motion: reduce) { .skel-row i { animation: none; } }
/* keyboard cursor on rows */
.grid .row.kb-focus > .cell { background: var(--primary-soft); }
.grid .row.kb-focus > .cell.name { box-shadow: inset 2px 0 0 var(--primary); }
.grid .row.kb-focus .row-menu, .grid .row.kb-focus .drag { opacity: 1; }
/* hover row actions: reveal on hover or keyboard focus, keep the row calm otherwise */
.grid .row:hover > .cell { background-color: var(--hover); }
.grid .cell.name:focus-within .row-menu { opacity: 1; }
/* filter chips */
.filter-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 0 24px 8px; font-size: 13px; }
.fchip { display: inline-flex; align-items: center; gap: 4px; background: var(--primary-soft); color: var(--primary); border: 1px solid color-mix(in srgb, var(--primary) 30%, transparent); border-radius: 14px; padding: 3px 4px 3px 10px; font-weight: 600; max-width: 320px; }
.fchip-x { border: 0; background: transparent; color: inherit; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; cursor: pointer; padding: 0; }
.fchip-x:hover { background: color-mix(in srgb, var(--primary) 18%, transparent); }
.fchip-count { color: var(--text-2); margin-left: 4px; }
.no-results { padding: 48px 16px; }
.first-item-hint { display: flex; align-items: center; gap: 6px; margin: 4px 0 14px; padding: 10px 14px; border: 1px dashed var(--border); border-radius: 8px; color: var(--text-2); font-size: 13px; width: max-content; max-width: 100%; position: sticky; left: 0; }
.first-item-hint kbd, .kbd-row kbd, .search-hit kbd { font: 600 11px/1 inherit; border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 4px; padding: 2px 6px; background: var(--surface); color: var(--text-2); }
.vgroup-name { font-weight: 600; font-size: 16px; color: var(--gc); padding: 0 6px; }
.vgroup-note { position: sticky; left: 0; font-size: 13px; padding: 4px 0 16px; }
/* command palette */
.search-hit.is-action b { font-weight: 600; }
.search-hit kbd { margin-left: auto; }
.act-swatch { width: 14px; height: 14px; border-radius: 4px; flex: none; }
.kbd-grid { display: grid; gap: 6px; }
.kbd-row { display: flex; justify-content: space-between; gap: 16px; font-size: 14px; }
.kbd-row > span:first-child { display: inline-flex; gap: 4px; }
/* r14.6.15 – List + detail */
.board-body.ld-body { padding: 0; overflow: hidden; display: flex; }
.ld { flex: 1; display: grid; grid-template-columns: var(--ldw, 400px) 6px minmax(0, 1fr); min-height: 0; height: 100%; }
.ld-mobile { grid-template-columns: minmax(0, 1fr); }
.ld-list { overflow: auto; border-right: 1px solid var(--border-soft); background: var(--surface); padding-bottom: 24px; }
.ld-sec-head { position: sticky; top: 0; z-index: 1; display: flex; justify-content: space-between; align-items: center; padding: 10px 16px 6px; font-size: 12px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--gc); background: var(--surface); }
.ld-row { display: flex; flex-direction: column; gap: 4px; width: 100%; text-align: left; border: 0; border-left: 3px solid transparent; border-bottom: 1px solid var(--border-soft); background: transparent; color: var(--text); padding: 10px 14px 10px 13px; cursor: pointer; font: inherit; }
.ld-row:hover { background: var(--hover); }
.ld-row.sel { background: var(--primary-soft); border-left-color: var(--primary); }
.ld-row.kb-focus:not(.sel) { box-shadow: inset 0 0 0 2px var(--primary-soft); }
.ld-row:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.ld-top { display: flex; justify-content: space-between; gap: 10px; font-weight: 600; font-size: 14px; }
.ld-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ld-num { font-variant-numeric: tabular-nums; flex: none; }
.ld-meta { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-2); flex-wrap: wrap; }
.ld-pill { color: #fff; border-radius: 10px; padding: 1px 8px; font-weight: 600; }
.ld-due.late { color: var(--danger, #c62f45); font-weight: 600; }
.ld-upd { display: inline-flex; align-items: center; gap: 3px; }
.ld-hint { font-size: 12px; padding: 12px 16px; }
.ld-divider { cursor: col-resize; background: var(--border-soft); position: relative; }
.ld-divider::after { content: ''; position: absolute; left: 2px; top: 50%; width: 2px; height: 28px; margin-top: -14px; border-radius: 2px; background: var(--text-2); opacity: .5; }
.ld-divider:hover { background: var(--primary-soft); }
.detail-pane { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--surface); overflow: hidden; }
.ld-empty { display: grid; place-content: center; text-align: center; color: var(--text-2); gap: 2px; }
/* r14.6.15 – My work */
.mw-body { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 24px; padding-top: 12px; align-items: start; }
@media (max-width: 760px) { .mw-body { grid-template-columns: minmax(0, 1fr); gap: 12px; } .mw-side { display: flex; flex-wrap: wrap; gap: 6px; } .mw-boards { display: none; } }
.mw-side { display: grid; gap: 4px; position: sticky; top: 0; }
.mw-tab { display: flex; justify-content: space-between; align-items: center; border: 0; background: transparent; color: var(--text); padding: 8px 10px; border-radius: 8px; font: inherit; font-size: 14px; cursor: pointer; text-align: left; }
.mw-tab:hover { background: var(--hover); } .mw-tab.on { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.mw-count { font-size: 12px; color: var(--text-2); } .mw-count.alert { background: var(--danger); color: #fff; border-radius: 9px; padding: 0 7px; font-weight: 700; }
.mw-board { display: flex; gap: 8px; align-items: center; font-size: 13px; padding: 3px 10px; }
.mw-group { margin-bottom: 18px; } .mw-group-head { display: flex; gap: 8px; font-size: 13px; font-weight: 700; margin-bottom: 6px; } .mw-group-head.late { color: var(--danger); }
.mw-card { background: var(--surface); border: 1px solid var(--border-soft); border-radius: 12px; overflow: hidden; }
.mw-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--border-soft); color: inherit; text-decoration: none; }
.mw-row:last-child { border-bottom: 0; } .mw-row:hover { background: var(--hover); } .mw-row.kb { background: var(--primary-soft); box-shadow: inset 3px 0 0 var(--primary); }
.mw-check { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--border); background: var(--surface); color: transparent; display: grid; place-items: center; cursor: pointer; flex: none; padding: 0; }
.mw-check:hover:not(:disabled) { border-color: #2e9e6b; color: #2e9e6b; } .mw-check:disabled { opacity: .35; cursor: default; }
.mw-main { flex: 1; min-width: 0; color: inherit; text-decoration: none; }
.mw-name { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mw-meta { display: flex; gap: 6px; align-items: center; font-size: 12px; color: var(--text-2); flex-wrap: wrap; margin-top: 2px; }
.mw-pill { color: #fff; border-radius: 9px; padding: 0 7px; font-weight: 600; }
.mw-due { font-size: 12px; font-weight: 600; color: var(--text-2); white-space: nowrap; } .mw-due.late { color: var(--danger); }
.mw-quote { font-size: 13px; color: var(--text); margin-top: 4px; white-space: pre-wrap; }
.mw-page a.btn { text-decoration: none; }
.view-opt-card { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; cursor: pointer; }
.view-opt-card.on { border-color: var(--primary); background: var(--primary-soft); }
.view-opt-card input { margin-top: 3px; }
/* r14.6.15 – gov search: sites searched */
.lb-st { display: inline-block; font-size: 11px; font-weight: 700; border-radius: 9px; padding: 1px 8px; white-space: nowrap; }
.lb-st-ok { background: #e3f4ea; color: #1f7a4c; } .lb-st-new { background: #eceef3; color: #5e6473; } .lb-st-bad { background: #fbe6e9; color: #a3283b; } .lb-st-warn { background: #fdf0dc; color: #8a5300; }
.lb-sites td { vertical-align: top; } .lb-sites a.rc-sub { display: block; text-decoration: none; }
.lb-add { border-top: 1px solid var(--border-soft); padding-top: 10px; } .lb-add .input { flex: 1; }
.lb-check { margin-top: 8px; padding: 10px 12px; border-radius: 8px; font-size: 13px; display: grid; gap: 4px; }
.lb-check.ok { background: #e3f4ea; } .lb-check.new { background: var(--primary-soft); }
.modal.modal-wide { width: min(920px, 100%); }
.lb-sites-modal { min-width: 0; } .lb-sites-modal .lb-sites td:first-child { overflow-wrap: anywhere; }
/* r14.6.19 – free trial */
.trial-pill { position: fixed; left: 16px; bottom: 16px; z-index: 40; display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 20px; padding: 7px 8px 7px 12px; font: inherit; font-size: 13px; font-weight: 600; box-shadow: 0 4px 14px rgba(0,0,0,.12); cursor: pointer; }
.trial-pill.soon { border-color: #e3a71c; } .trial-pill.over { border-color: var(--danger); color: var(--danger); }
.trial-pill-cta { background: var(--primary); color: #fff; border-radius: 14px; padding: 2px 10px; font-size: 12px; }
body.mobile .trial-pill { bottom: calc(66px + env(safe-area-inset-bottom)); }
.trial-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 12px; margin: 4px 0; }
.chip.trial-on { background: #fdf0dc; color: #8a5300; } .chip.trial-over { background: #fbe6e9; color: #a3283b; } .chip.trial-ask { background: var(--primary-soft); color: var(--primary); }

/* r14.6.21 – bulk "Find contact info": which leads, and how each went */
.modal.cf-bulk-modal { width: min(680px, 100%); }
.cf-bulk-list { list-style: decimal; margin: 0; padding: 0 0 0 28px; max-height: min(46vh, 380px); overflow: auto; border: 1px solid var(--border-soft); border-radius: 8px; }
.cf-bulk-row { padding: 6px 10px 6px 4px; border-bottom: 1px solid var(--border-soft); font-size: 13px; }
.cf-bulk-row:last-child { border-bottom: 0; }
.cf-bulk-row > * { vertical-align: middle; }
.cf-bulk-row.on { background: color-mix(in srgb, var(--primary, #305090) 10%, transparent); }
.cf-bulk-nm { text-align: left; max-width: calc(100% - 190px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; }
.cf-bulk-st { float: right; font-size: 12px; }
.cf-bulk-st.ok { color: #1f7a4c; font-weight: 600; }
.cf-bulk-st.bad { color: #b4233a; }
.cf-warn { display: flex; gap: 8px; align-items: flex-start; background: color-mix(in srgb, #b4233a 10%, transparent); color: #9b1c31; border-radius: 8px; padding: 8px 10px; font-size: 12.5px; margin: 6px 0; }
.cf-warn svg { flex: none; margin-top: 1px; }

/* r14.6.24 – call campaigns */
.cc-page { display: grid; gap: 14px; }
.cc-bar { width: 100%; height: 6px; }
.cc-new { display: grid; gap: 10px; }
.cc-sec { font-weight: 700; margin-top: 6px; border-top: 1px solid var(--border-soft); padding-top: 10px; }
.cc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.cc-grid2 { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 10px; }
@media (max-width: 640px) { .cc-grid2 { grid-template-columns: minmax(0, 1fr); } }
.cc-field { display: grid; gap: 4px; font-size: 12.5px; min-width: 0; }
.cc-field > span { font-weight: 600; }
.cc-field .input { width: 100%; }
.cc-check { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; }
.cc-check .input { display: inline-block; width: 80px; height: 26px; padding: 2px 6px; margin: 0 4px; }
.cc-reps { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.cc-rep { display: flex; gap: 6px; align-items: center; font-size: 13px; }
.cc-card { display: grid; gap: 8px; }
.cc-mine { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.cc-mine-card { display: grid; gap: 8px; text-decoration: none; color: inherit; }
.cc-progress { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) auto; gap: 14px; align-items: end; }
@media (max-width: 760px) { .cc-progress { grid-template-columns: minmax(0, 1fr); } }
.cc-play { white-space: pre-wrap; font: inherit; font-size: 13px; line-height: 1.55; margin: 0; }
.cc-how { background: color-mix(in srgb, var(--primary, #305090) 6%, var(--surface, #fff)); }
.cc-call { display: grid; gap: 12px; }
.cc-call-top { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.cc-dial { display: grid; gap: 6px; justify-items: end; }
.cc-tel { font-size: 16px; padding: 10px 16px; height: auto; }
.cc-noemail { font-size: 12px; color: #9a6b00; background: color-mix(in srgb, #e3a71c 16%, transparent); border-radius: 6px; padding: 2px 8px; }
.cc-last { font-size: 12.5px; background: var(--hover, rgba(0,0,0,.04)); border-radius: 8px; padding: 8px 10px; }
.cc-script { font-size: 13px; border-left: 3px solid var(--primary, #305090); padding: 6px 10px; background: color-mix(in srgb, var(--primary, #305090) 5%, transparent); border-radius: 0 8px 8px 0; }
.cc-outcomes { display: flex; flex-wrap: wrap; gap: 8px; }
.cc-out-not_interested, .cc-out-wrong_number, .cc-out-dnc { color: #9b1c31; }
.cc-after { display: grid; gap: 8px; background: color-mix(in srgb, #2e9e6b 10%, transparent); border-radius: 8px; padding: 10px 12px; font-size: 13.5px; }
.cc-rep-row { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 4px 12px; align-items: center; padding: 6px 0; }
.cc-rep-row .cc-bar { grid-column: 2; }
.cc-outs { display: flex; flex-wrap: wrap; gap: 6px; }
.cc-today { display: flex; gap: 12px; align-items: center; }
.cc-settings { display: grid; gap: 12px; }
.cc-done { display: grid; gap: 8px; }
.cc-today a.btn, .cc-mine-card .btn, .cc-call a.btn, .cc-page .page-head a.btn { text-decoration: none; }
@media (max-width: 700px) { .co-switch span { display: none; } .co-switch { padding: 0 8px; } } /* r14.6.28 company switcher: icon only on phones */
/* r14.6.28 lead finder: step-by-step path */
.lf-steps { list-style: none; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; margin: 4px 0 0; padding: 0; counter-reset: s; }
.lf-step { display: flex; gap: 6px; align-items: center; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; font-size: 12.5px; color: var(--text-2); min-width: 0; }
.lf-step .lf-dot { flex: none; width: 20px; height: 20px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 11px; font-weight: 700; background: var(--border); color: var(--text-2); }
.lf-step .lf-step-l { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lf-step.done .lf-dot { background: #2e9e6b; color: #fff; }
.lf-step.cur { border-color: var(--primary); background: var(--primary-soft); color: var(--text); font-weight: 600; }
.lf-step.cur .lf-dot { background: var(--primary); color: #fff; }
.lf-next { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--primary); background: var(--primary-soft); }
.lf-next-t { flex: 1; min-width: 240px; font-size: 13.5px; }
.lf-next-b { display: flex; gap: 6px; flex-wrap: wrap; }
@media (max-width: 800px) { .lf-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* r14.6.29 lead checks */
.v-badge { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; font-size: 10px; font-weight: 700; margin-left: 6px; vertical-align: middle; cursor: help; color: #fff; }
.v-badge.v-ok { background: #2e9e6b; } .v-badge.v-warn { background: #e08a1e; } .v-badge.v-bad { background: #c93d50; }
