/* ============================================================
   Evolute CRM — investor outreach funnel. Layers on pm.css
   tokens (--accent, --panel, --border, --text*, --radius*…).
   ============================================================ */
.crm { --lost: var(--blocked); --won: var(--done); }

.crm-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.crm-views { display: inline-flex; gap: 4px; background: var(--panel-hi); border: 1px solid var(--border); border-radius: var(--radius); padding: 4px; }
.crm-views button { appearance: none; border: 0; background: transparent; color: var(--text-3); font-family: var(--font-head); font-size: 12.5px; font-weight: 500; padding: 7px 15px; border-radius: var(--radius-sm); cursor: pointer; transition: background .14s, color .14s; }
.crm-views button:hover { color: var(--text-2); }
.crm-views button.on { background: var(--panel); color: var(--text); box-shadow: var(--shadow); }
.crm-views.single { background: transparent; border: 0; padding: 0; }
.crm-view-title { font-family: var(--font-head); font-size: 13px; font-weight: 600; color: var(--text); letter-spacing: -.01em; }
.crm-scope { font-family: var(--font-head); font-size: 10.5px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); }

/* ---------- add bar + inputs ---------- */
.crm-add-bar { display: flex; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; align-items: center; }
.crm-add-bar > input, .crm-add-bar select, .crm-typeahead input, .crm-in {
  font-family: var(--font-body); font-size: 13px; color: var(--text);
  padding: 10px 13px; border: 1px solid var(--border-md); border-radius: var(--radius); background: var(--panel);
  transition: border-color .14s, box-shadow .14s;
}
.crm-add-bar > input:focus, .crm-add-bar select:focus, .crm-typeahead input:focus, .crm-in:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }
.crm-add-bar > input#crm-new-title, .crm-add-bar > input#rc-name, .crm-add-bar > input#rt-name { flex: 1 1 240px; }
.crm-add-bar select { flex: 0 0 auto; }

.crm-btn { appearance: none; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink); font-family: var(--font-head); font-size: 13px; font-weight: 500; padding: 10px 18px; border-radius: var(--radius); cursor: pointer; transition: background .15s, transform .15s, color .15s, border-color .15s; }
.crm-btn:hover { background: var(--accent-hi); }
.crm-btn:disabled { opacity: .55; cursor: default; }
.crm-btn.sm { padding: 8px 14px; font-size: 12px; }
.crm-btn.ghost { background: transparent; color: var(--text-2); border-color: var(--border-md); }
.crm-btn.ghost:hover { background: var(--panel-hover); color: var(--text); }
.crm-btn.danger.ghost:hover { color: var(--blocked); border-color: var(--blocked); background: var(--blocked-dim); }

.crm-btn.sm.on { background: var(--accent-dim); color: var(--accent); border-color: var(--accent); }

/* ---------- expandable add-deal details ---------- */
.crm-add-more { margin: -8px 0 20px; }
.crm-add-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; padding: 16px; background: var(--panel-hi); border: 1px solid var(--border); border-radius: var(--radius); }
.crm-af { display: flex; flex-direction: column; gap: 6px; }
.crm-af > label { font-family: var(--font-head); font-size: 9.5px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--text-3); }
.crm-af input, .crm-af select { width: 100%; font-family: var(--font-body); font-size: 13px; padding: 9px 12px; border: 1px solid var(--border-md); border-radius: var(--radius); background: var(--panel); color: var(--text); }
.crm-af input:focus, .crm-af select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }
.crm-af .crm-typeahead { flex: none; width: 100%; }
@media (max-width: 720px) { .crm-add-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .crm-add-grid { grid-template-columns: 1fr; } }

/* ---------- type-ahead ---------- */
.crm-typeahead { position: relative; display: inline-flex; flex: 0 1 220px; }
.crm-typeahead input { width: 100%; }
.crm-ta-menu { position: absolute; top: calc(100% + 5px); left: 0; right: 0; z-index: 40; background: var(--panel); border: 1px solid var(--border-md); border-radius: var(--radius); box-shadow: 0 20px 50px -24px rgba(16,24,40,.4); overflow: hidden; max-height: 260px; overflow-y: auto; }
.crm-ta-item { display: flex; align-items: baseline; gap: 8px; width: 100%; text-align: left; appearance: none; border: 0; background: transparent; padding: 9px 13px; cursor: pointer; font-size: 13px; color: var(--text); border-bottom: 1px solid var(--border); }
.crm-ta-item:last-child { border-bottom: 0; }
.crm-ta-item:hover { background: var(--panel-hover); }
.crm-ta-item small { color: var(--text-3); font-size: 11.5px; margin-left: auto; }
.crm-ta-item.create { color: var(--accent); font-family: var(--font-head); font-weight: 500; font-size: 12.5px; }

/* ---------- funnel (horizontal scroll) ---------- */
.crm-funnel-wrap { overflow-x: auto; overflow-y: visible; padding-bottom: 14px; margin: 0 -4px; scrollbar-width: thin; }
.crm-funnel-wrap::-webkit-scrollbar { height: 10px; }
.crm-funnel-wrap::-webkit-scrollbar-thumb { background: var(--border-md); border-radius: 6px; }
.crm-funnel { display: flex; gap: 14px; align-items: flex-start; padding: 0 4px; min-width: min-content; }
.crm-col { flex: 0 0 268px; width: 268px; background: var(--panel-hi); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; min-height: 120px; }
.crm-col.term-won { background: var(--done-dim); border-color: rgba(47,143,99,.3); }
.crm-col.term-lost { background: var(--blocked-dim); border-color: rgba(199,91,69,.3); }
.crm-col-head { display: flex; align-items: center; gap: 8px; font-family: var(--font-head); font-size: 11px; font-weight: 500; letter-spacing: .05em; text-transform: uppercase; color: var(--text-2); padding: 4px 6px 12px; }
.crm-col-head b { margin-left: auto; font-weight: 600; color: var(--text-3); background: var(--panel); border: 1px solid var(--border); border-radius: 20px; padding: 1px 9px; font-size: 10.5px; }
.crm-col-cards { display: flex; flex-direction: column; gap: 9px; min-height: 20px; max-height: min(66vh, 760px); overflow-y: auto; overflow-x: hidden; padding-right: 3px; margin-right: -3px; scrollbar-width: thin; scrollbar-color: var(--border-md) transparent; }
.crm-col-cards::-webkit-scrollbar { width: 8px; }
.crm-col-cards::-webkit-scrollbar-thumb { background: var(--border-md); border-radius: 6px; }
.crm-col-cards::-webkit-scrollbar-track { background: transparent; }
.crm-col-empty { text-align: center; color: var(--text-3); font-size: 12px; padding: 14px 0; opacity: .6; }

.crm-card { position: relative; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 12px 11px 26px; box-shadow: var(--shadow); cursor: pointer; transition: border-color .14s, box-shadow .14s, transform .12s; }
.crm-card:hover { border-color: var(--border-hi); box-shadow: 0 8px 22px -14px rgba(16,24,40,.34); }
.crm-card.dragging { opacity: .55; }
.crm-card.won { border-left: 3px solid var(--done); }
.crm-card.lost { border-left: 3px solid var(--blocked); }
.crm-grip { position: absolute; left: 5px; top: 11px; color: var(--text-3); cursor: grab; padding: 2px; line-height: 0; border-radius: 4px; }
.crm-grip:hover { color: var(--text-2); background: var(--panel-hover); }
.crm-grip:active { cursor: grabbing; }
.crm-card-del { position: absolute; top: 6px; right: 6px; z-index: 2; appearance: none; border: 1px solid transparent; background: transparent; color: var(--text-3); width: 20px; height: 20px; border-radius: 5px; font-size: 11px; line-height: 1; cursor: pointer; opacity: 0; transition: opacity .12s, background .12s, color .12s; }
.crm-card:hover .crm-card-del, .crm-card-del:focus-visible { opacity: 1; }
.crm-card-del:hover { background: var(--blocked-dim); color: var(--blocked); border-color: var(--blocked); }
.crm-card-title { font-family: var(--font-head); font-size: 13.5px; font-weight: 500; color: var(--text); line-height: 1.3; }
.crm-card-co { font-size: 12px; color: var(--text-2); margin-top: 3px; }
.crm-card-co.none { color: var(--text-3); font-style: italic; }
.crm-card-meta { display: flex; flex-wrap: wrap; gap: 6px 10px; margin-top: 8px; font-size: 11px; color: var(--text-3); }
.crm-card-meta .dc-amt { font-family: var(--font-head); font-weight: 500; color: var(--accent); }
.crm-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
.crm-card .dc-since { font-family: var(--font-head); font-size: 10px; font-weight: 500; letter-spacing: .02em; color: var(--text-3); }
.crm-card .dc-proj { font-family: var(--font-head); font-size: 9.5px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); background: var(--accent-dim); padding: 2px 7px; border-radius: 5px; }
.crm-card .dc-proj.firm { color: var(--text-3); background: var(--todo-dim); }
.crm-card-lost { margin-top: 8px; font-size: 11px; color: var(--blocked); }

/* ---------- records list ---------- */
.crm-records { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.crm-rec { border: 1px solid var(--border); background: var(--panel); border-radius: var(--radius); padding: 15px 16px; cursor: pointer; box-shadow: var(--shadow); transition: border-color .14s, transform .12s; }
.crm-rec:hover { border-color: var(--border-hi); transform: translateY(-1px); }
.crm-rec-name { font-family: var(--font-head); font-size: 15px; font-weight: 500; color: var(--text); display: flex; align-items: center; gap: 8px; }
.crm-rec-tag { font-family: var(--font-head); font-size: 9.5px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); background: var(--panel-hi); border: 1px solid var(--border); padding: 2px 7px; border-radius: 5px; }
.crm-rec-sub { font-size: 12px; color: var(--text-3); margin-top: 6px; }

.crm-muted { color: var(--text-3); font-size: 13px; }
.crm-muted.pad { padding: 24px 4px; }

/* ---------- drawer ---------- */
.crm-drawer-bg { position: fixed; inset: 0; z-index: 10000; background: rgba(16,24,40,.30); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); display: flex; justify-content: flex-end; opacity: 0; transition: opacity .2s; }
.crm-drawer-bg.open { opacity: 1; }
.crm-drawer { width: 460px; max-width: 94vw; height: 100%; background: var(--panel); border-left: 1px solid var(--border-md); box-shadow: -30px 0 80px -40px rgba(16,24,40,.5); overflow-y: auto; transform: translateX(24px); transition: transform .24s ease; position: relative; }
.crm-drawer-bg.open .crm-drawer { transform: translateX(0); }
.crm-drawer-x { position: absolute; top: 16px; right: 16px; z-index: 2; appearance: none; border: 1px solid var(--border-md); background: var(--panel); color: var(--text-3); width: 30px; height: 30px; border-radius: 8px; cursor: pointer; font-size: 13px; transition: background .14s, color .14s; }
.crm-drawer-x:hover { background: var(--panel-hover); color: var(--text); }
.crm-drawer-body { padding: 30px 28px 40px; }
.crm-drawer-loading { color: var(--text-3); font-size: 13px; }

.crm-field { margin-bottom: 18px; }
.crm-field > label { display: block; font-family: var(--font-head); font-size: 9.5px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: var(--text-3); margin-bottom: 8px; }
.crm-in { width: 100%; }
.crm-since { font-size: 12px; color: var(--text-3); margin: -8px 0 16px; }
.crm-since b { color: var(--text-2); font-weight: 600; }
.crm-linkish { appearance: none; border: 0; background: transparent; color: var(--accent); font-family: var(--font-head); font-size: 10px; font-weight: 500; cursor: pointer; padding: 0; margin-left: 8px; text-transform: none; letter-spacing: 0; }
.crm-linkish:hover { text-decoration: underline; }
.crm-co-links { display: flex; gap: 14px; margin-top: 9px; }
.crm-co-links a { font-size: 12px; color: var(--accent); }
.crm-co-links a:hover { text-decoration: underline; }
.crm-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.crm-2col .crm-field { margin-bottom: 18px; }

.crm-stage-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.crm-spill { appearance: none; border: 1px solid var(--border-md); background: var(--panel); color: var(--text-2); font-family: var(--font-head); font-size: 11.5px; font-weight: 500; padding: 6px 11px; border-radius: 20px; cursor: pointer; transition: all .14s; }
.crm-spill:hover { border-color: var(--accent); color: var(--text); }
.crm-spill.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.crm-spill.term-won.on { background: var(--done); border-color: var(--done); }
.crm-spill.term-lost.on { background: var(--blocked); border-color: var(--blocked); }
.crm-lost-note { font-size: 12px; color: var(--blocked); background: var(--blocked-dim); border: 1px solid rgba(199,91,69,.25); border-radius: var(--radius-sm); padding: 9px 12px; margin: -6px 0 18px; }

.crm-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 10px; }
.crm-chip { display: inline-flex; align-items: center; gap: 7px; background: var(--panel-hi); border: 1px solid var(--border); border-radius: 20px; padding: 5px 6px 5px 12px; font-size: 12.5px; color: var(--text); cursor: pointer; }
.crm-chip b { font-weight: 500; }
.crm-chip small { color: var(--text-3); font-size: 11px; }
.crm-chip-x { appearance: none; border: 0; background: transparent; color: var(--text-3); cursor: pointer; width: 18px; height: 18px; border-radius: 50%; font-size: 11px; line-height: 1; }
.crm-chip-x:hover { color: var(--blocked); background: var(--blocked-dim); }

/* ---------- stage-history timeline ---------- */
.crm-timeline { border-left: 2px solid var(--border); padding-left: 14px; display: flex; flex-direction: column; gap: 11px; }
.crm-tl-row { position: relative; display: flex; align-items: baseline; gap: 8px; font-size: 12.5px; color: var(--text-2); }
.crm-tl-dot { position: absolute; left: -21px; top: 4px; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); border: 2px solid var(--panel); }
.crm-tl-dot.won { background: var(--done); } .crm-tl-dot.lost { background: var(--blocked); }
.crm-tl-txt { flex: 1; } .crm-tl-txt b { font-weight: 600; color: var(--text); }
.crm-tl-when { color: var(--text-3); font-size: 11px; white-space: nowrap; }

/* ---------- notes ---------- */
.crm-notes textarea, .crm-note-add textarea { width: 100%; min-height: 60px; resize: vertical; font-family: var(--font-body); font-size: 13px; color: var(--text); padding: 10px 12px; border: 1px solid var(--border-md); border-radius: var(--radius); background: var(--panel); }
.crm-note-add textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }
.crm-note-add { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; margin-bottom: 14px; }
.crm-note-list { display: flex; flex-direction: column; gap: 9px; }
.crm-note { border: 1px solid var(--border); background: var(--panel-hi); border-radius: var(--radius-sm); padding: 11px 12px; }
.crm-note-body { font-size: 13px; color: var(--text); line-height: 1.5; white-space: pre-wrap; }
.crm-note-meta { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--text-3); margin-top: 7px; }
.crm-note-del { margin-left: auto; appearance: none; border: 0; background: transparent; color: var(--text-3); cursor: pointer; font-size: 11px; }
.crm-note-del:hover { color: var(--blocked); }
.crm-drawer-foot { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--border); }

/* ---------- overlay modal (closed-lost reason) ---------- */
.crm-overlay { position: fixed; inset: 0; z-index: 10001; background: rgba(16,24,40,.34); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; padding: 24px; opacity: 0; transition: opacity .18s ease; }
.crm-overlay.open { opacity: 1; }
.crm-modal { width: 420px; max-width: 100%; background: var(--panel); border: 1px solid var(--border-md); border-radius: var(--radius-lg); padding: 26px; box-shadow: 0 30px 80px -34px rgba(16,24,40,.5); transform: translateY(10px) scale(.97); transition: transform .2s cubic-bezier(.22,1,.36,1); }
.crm-overlay.open .crm-modal { transform: none; }
.crm-btn.danger { background: var(--blocked); border-color: var(--blocked); color: #fff; }
.crm-btn.danger:hover { background: var(--blocked); filter: brightness(1.06); }
.crm-modal h3 { font-family: var(--font-head); font-size: 18px; font-weight: 600; margin-bottom: 6px; }
.crm-modal p { font-size: 12.5px; color: var(--text-3); line-height: 1.55; margin-bottom: 16px; }
.crm-reason-list { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 14px; }
.crm-reason { appearance: none; border: 1px solid var(--border-md); background: var(--panel); color: var(--text-2); font-size: 12.5px; padding: 7px 12px; border-radius: 20px; cursor: pointer; transition: all .14s; }
.crm-reason:hover { border-color: var(--blocked); color: var(--blocked); }
.crm-reason.on { background: var(--blocked); border-color: var(--blocked); color: #fff; }
.crm-modal textarea { width: 100%; min-height: 56px; resize: vertical; font-family: var(--font-body); font-size: 13px; padding: 10px 12px; border: 1px solid var(--border-md); border-radius: var(--radius); background: var(--panel); color: var(--text); }
.crm-modal textarea:focus { outline: none; border-color: var(--accent); }
.crm-modal-acts { display: flex; gap: 10px; margin-top: 18px; }
.crm-modal-acts .crm-btn { flex: 1; text-align: center; }

/* ---------- funnel toolbar (search / follow-ups / import) ---------- */
.crm-toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.crm-search { flex: 0 1 260px; font-size: 13px; padding: 9px 13px; border: 1px solid var(--border-md); border-radius: var(--radius); background: var(--panel); color: var(--text); }
.crm-search:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }
.crm-tb-spacer { flex: 1; }
.crm-chipbtn { display: inline-flex; align-items: center; gap: 7px; appearance: none; border: 1px solid var(--border-md); background: var(--panel); color: var(--text-2); font-family: var(--font-head); font-size: 12.5px; font-weight: 500; padding: 8px 13px; border-radius: 20px; cursor: pointer; transition: all .14s; }
.crm-chipbtn b { background: var(--panel-hi); border-radius: 20px; padding: 1px 8px; font-size: 11px; color: var(--text-3); }
.crm-chipbtn:hover:not(:disabled) { border-color: var(--accent); color: var(--text); }
.crm-chipbtn.on { background: var(--blocked); border-color: var(--blocked); color: #fff; }
.crm-chipbtn.on b { background: rgba(255,255,255,.22); color: #fff; }
.crm-chipbtn:disabled { opacity: .5; cursor: default; }

/* ---------- branded date field (reuses .cal-* from pm.css) ---------- */
.crm-datefield { position: relative; }
.crm-date-btn { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px; font-family: var(--font-body); font-size: 13px; color: var(--text); padding: 9px 12px; border: 1px solid var(--border-md); border-radius: var(--radius); background: var(--panel); cursor: pointer; text-align: left; transition: border-color .14s, box-shadow .14s; }
.crm-date-btn:hover { border-color: var(--border-hi); }
.crm-date-btn:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }
.crm-date-btn svg { color: var(--text-3); flex: none; }
.crm-date-val.empty { color: var(--text-3); }
.crm-datefield .cal-pop { left: auto; right: 0; }
.crm-datefield .cal-foot { justify-content: space-between; }
.cal-d.sel { background: var(--accent); color: #fff; }
.cal-d.sel:hover { background: var(--accent-hi); color: #fff; }
.cal-today { background: none; border: none; color: var(--accent); font-family: var(--font-head); font-size: 11px; font-weight: 500; cursor: pointer; padding: 4px 9px; border-radius: 6px; transition: background .14s; }
.cal-today:hover { background: var(--accent-dim); }

/* ---------- dropdown menu (export) ---------- */
.crm-menu { position: absolute; z-index: 10002; background: var(--panel); border: 1px solid var(--border-md); border-radius: var(--radius); box-shadow: 0 20px 50px -24px rgba(16,24,40,.4); overflow: hidden; min-width: 172px; }
.crm-menu button { display: block; width: 100%; text-align: left; appearance: none; border: 0; background: transparent; padding: 10px 14px; font-family: var(--font-body); font-size: 13px; color: var(--text); cursor: pointer; border-bottom: 1px solid var(--border); }
.crm-menu button:last-child { border-bottom: 0; }
.crm-menu button:hover { background: var(--panel-hover); }

/* ---------- investor-type chip ---------- */
.dc-cotype { display: inline-block; margin-left: 6px; font-family: var(--font-head); font-size: 9px; font-weight: 500; letter-spacing: .05em; text-transform: uppercase; color: var(--accent); background: var(--accent-dim); padding: 1px 6px; border-radius: 5px; vertical-align: middle; }
.crm-co-links .dc-cotype { margin-left: 0; }

/* ---------- momentum (time-in-stage) ---------- */
.crm-card.age-warn { border-left: 3px solid #d69b3e; }
.crm-card.age-stale { border-left: 3px solid var(--blocked); }
.dc-age { font-family: var(--font-head); font-size: 10px; font-weight: 500; padding: 1px 6px; border-radius: 20px; }
.dc-age.lvl-ok { color: var(--text-3); background: var(--panel-hi); }
.dc-age.lvl-warn { color: #a9722a; background: rgba(200,138,47,.13); }
.dc-age.lvl-stale { color: var(--blocked); background: var(--blocked-dim); }
.crm-inv { font-weight: 600; }
.crm-inv.lvl-ok { color: var(--text-2); } .crm-inv.lvl-warn { color: #a9722a; } .crm-inv.lvl-stale { color: var(--blocked); }

/* ---------- follow-up on cards ---------- */
.crm-card-fu { display: flex; gap: 5px; margin-top: 8px; font-size: 11.5px; color: var(--text-2); background: var(--panel-hi); border-radius: 6px; padding: 5px 8px; }
.crm-card-fu.overdue { color: var(--blocked); background: var(--blocked-dim); }
.crm-card-fu.soon { color: #a9722a; background: rgba(200,138,47,.13); }

/* ---------- stats ---------- */
.crm-stat-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 28px; }
.crm-stat { border: 1px solid var(--border); background: var(--panel); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); }
.crm-stat-val { font-family: var(--font-head); font-size: 30px; font-weight: 600; letter-spacing: -.03em; color: var(--text); line-height: 1; }
.crm-stat-lbl { font-size: 12px; color: var(--text-3); margin-top: 9px; }
.crm-stat-sub { font-size: 11px; color: var(--text-3); margin-top: 3px; opacity: .85; }
.crm-stat-sec { margin-bottom: 30px; }
.crm-stat-sec h3 { font-family: var(--font-head); font-size: 14px; font-weight: 600; margin-bottom: 14px; }
.crm-conv { display: flex; flex-direction: column; gap: 8px; }
.crm-conv-row { display: grid; grid-template-columns: 130px 1fr 74px; align-items: center; gap: 12px; }
.crm-conv-lbl { font-size: 12.5px; color: var(--text-2); }
.crm-conv-bar { height: 22px; background: var(--panel-hi); border-radius: 6px; overflow: hidden; }
.crm-conv-bar span { display: block; height: 100%; background: var(--accent); border-radius: 6px; transition: width .4s; }
.crm-conv-n { font-family: var(--font-head); font-size: 13px; font-weight: 600; color: var(--text); text-align: right; }
.crm-conv-n small { font-weight: 500; color: var(--text-3); font-size: 11px; }
.crm-conv-foot { margin-top: 12px; font-size: 12px; color: var(--text-3); }
.crm-lostbars { display: flex; flex-direction: column; gap: 8px; }
.crm-lostbar-row { display: grid; grid-template-columns: 190px 1fr 40px; align-items: center; gap: 12px; }
.crm-lostbar-lbl { font-size: 12.5px; color: var(--text-2); }
.crm-lostbar { height: 18px; background: var(--panel-hi); border-radius: 6px; overflow: hidden; }
.crm-lostbar span { display: block; height: 100%; background: var(--blocked); opacity: .72; border-radius: 6px; }
.crm-lostbar-n { font-family: var(--font-head); font-size: 12.5px; font-weight: 600; text-align: right; color: var(--text-2); }

/* ---------- import modal ---------- */
.crm-modal.wide { width: 600px; }
.crm-imp-text { width: 100%; min-height: 180px; resize: vertical; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; line-height: 1.55; padding: 12px; border: 1px solid var(--border-md); border-radius: var(--radius); background: var(--panel-hi); color: var(--text); white-space: pre; overflow: auto; }
.crm-imp-text:focus { outline: none; border-color: var(--accent); }
.crm-imp-preview { font-size: 12.5px; color: var(--text-3); margin-top: 10px; }
.crm-imp-preview b { color: var(--text); }
.crm-imp-warn { color: var(--blocked); }

@media (max-width: 720px) { .crm-stat-cards { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) {
  .crm-2col { grid-template-columns: 1fr; }
  .crm-drawer-body { padding: 26px 18px 36px; }
  .crm-conv-row { grid-template-columns: 96px 1fr 60px; }
  .crm-lostbar-row { grid-template-columns: 120px 1fr 34px; }
}
