.nav-group { display: grid; gap: 6px; }
/* CRM prototype: Дзвінки, Угоди, Клієнти. Uses Agrotool tokens from styles.css. */
.nav-group-label { margin: 16px 14px 4px; color: rgba(255,255,255,.45); font-size: 10.5px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.nav-badge { margin-left: auto; min-width: 22px; padding: 0 7px; border-radius: 99px; background: var(--lime); color: var(--forest); font-size: 11px; font-weight: 800; line-height: 20px; text-align: center; }

.crm-root { --crm-warn: #b7791f; --crm-ok: #2f7a4f; --crm-info: #2c5d8f; max-width: 1320px; margin: 0 auto; font-size: 14px; }
.crm-proto-note { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; margin-bottom: 16px; padding: 9px 14px; border: 1px dashed #c9cfa0; border-radius: 8px; background: #fbfde9; color: #4d5a25; font-size: 12.5px; }
.crm-proto-note b { color: var(--forest); }
.crm-proto-note label { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--forest); }
.crm-proto-note select { width: auto; min-height: 32px; padding: 0 10px; font-size: 13px; }
.crm-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.crm-head h2 { margin: 0; font-size: 26px; font-weight: 750; letter-spacing: -.03em; line-height: 1.15; text-wrap: balance; }
.crm-head .eyebrow { margin-bottom: 4px; }
.crm-root h3 { margin: 0 0 10px; color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.crm-small { font-size: 12.5px; }

.crm-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 38px; padding: 0 15px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--forest); cursor: pointer; font-weight: 750; white-space: nowrap; text-decoration: none; }
.crm-btn:hover { border-color: #c6cdc4; }
.crm-btn.primary { border-color: var(--forest); background: var(--forest); color: #fff; }
.crm-btn.accent { border-color: var(--lime); background: var(--lime); color: var(--forest); }
.crm-btn.ghost { border-color: transparent; background: transparent; }
.crm-btn.sm { min-height: 30px; padding: 0 10px; font-size: 12.5px; }

.crm-toolbar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.crm-toolbar input, .crm-toolbar select { width: auto; min-height: 40px; padding: 0 12px; }
.crm-toolbar input[type="search"] { flex: 1 1 240px; min-width: 0; }
.crm-seg { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.crm-seg button { min-height: 32px; padding: 0 12px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); cursor: pointer; font-size: 13px; font-weight: 700; }
.crm-seg button.on { background: var(--forest); color: #fff; }

.crm-kpis { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; margin-bottom: 16px; }
.crm-kpi { padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); }
.crm-kpi span { display: block; color: var(--muted); font-size: 12px; font-weight: 700; }
.crm-kpi strong { display: block; margin-top: 2px; font-size: 24px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.crm-kpi strong.bad { color: var(--danger); }
.crm-kpi em { font-style: normal; font-size: 12px; color: var(--muted); }

.crm-card { border: 1px solid var(--line); border-radius: 10px; background: var(--paper); }
.crm-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); }
.crm-table { width: 100%; border-collapse: collapse; }
.crm-table th { padding: 10px 12px; border-bottom: 1px solid var(--line); background: #f8f6f0; color: var(--muted); font-size: 11.5px; font-weight: 800; letter-spacing: .05em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.crm-table td { padding: 11px 12px; border-bottom: 1px solid #ecefe9; vertical-align: top; }
.crm-table tbody tr { cursor: pointer; }
.crm-table tbody tr:hover td { background: #f7f8f2; }
.crm-table tbody tr:last-child td { border-bottom: 0; }
.crm-num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.crm-who { font-weight: 700; }
.crm-sub { display: block; color: var(--muted); font-size: 12px; }
.crm-sub.ink { color: var(--ink); font-size: 13px; }
.crm-empty { padding: 28px; text-align: center; color: var(--muted); }

.crm-dir { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; font-size: 14px; font-weight: 800; flex: none; }
.crm-dir.in { background: #e3f0e7; color: var(--crm-ok); }
.crm-dir.out { background: #e3ebf4; color: var(--crm-info); }
.crm-dir.missed { background: #f6e3df; color: var(--danger); }
.crm-pill { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 99px; background: #eef0ea; color: #3a4841; font-size: 11.5px; font-weight: 750; white-space: nowrap; }
.crm-pill.hot { background: #f8e1da; color: var(--danger); }
.crm-pill.warm { background: #f8ecd4; color: var(--crm-warn); }
.crm-pill.cold { background: #e3ebf4; color: var(--crm-info); }
.crm-pill.won { background: #dcefe2; color: var(--crm-ok); }
.crm-pill.lost { background: #ececec; color: #666; }
.crm-pill.lime { background: var(--lime); color: var(--forest); }
.crm-pill.link { background: #eaf1e2; color: var(--forest-2); }
.crm-mgr { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.crm-avatar { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; color: #fff; font-size: 10.5px; font-weight: 800; flex: none; }

.crm-board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(240px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.crm-col { display: flex; flex-direction: column; min-height: 320px; border-radius: 10px; background: #ebe8de; }
.crm-col-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 11px 12px 2px; }
.crm-col-head b { font-size: 13px; }
.crm-col-head span, .crm-col-sum { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.crm-col-sum { padding: 0 12px 8px; }
.crm-col-body { display: grid; align-content: start; gap: 8px; padding: 0 8px 10px; flex: 1; }
.crm-col.drop .crm-col-body { outline: 2px dashed var(--forest-2); outline-offset: -4px; border-radius: 8px; }
.crm-deal { display: grid; gap: 7px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 9px; background: #fff; cursor: grab; text-align: left; }
.crm-deal:hover { border-color: #b9c2b6; }
.crm-deal-title { font-weight: 750; line-height: 1.3; }
.crm-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; }
.crm-money { font-weight: 800; font-variant-numeric: tabular-nums; }
.crm-next { color: var(--muted); font-size: 12px; }
.crm-next.overdue { color: var(--danger); font-weight: 700; }

.crm-scrim { position: fixed; inset: 0; z-index: 40; background: rgba(23,34,29,.32); }
.crm-drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 41; display: flex; flex-direction: column; width: min(640px, 100%); background: var(--paper); box-shadow: var(--shadow); font-size: 14px; }
.crm-drawer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 22px 14px; border-bottom: 1px solid var(--line); }
.crm-drawer-head h2 { margin: 0; font-size: 20px; letter-spacing: -.015em; }
.crm-drawer-head .eyebrow { margin-bottom: 4px; }
.crm-drawer-body { flex: 1; overflow-y: auto; padding: 18px 22px 30px; display: grid; align-content: start; gap: 22px; }
.crm-drawer h3 { margin: 0 0 10px; color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.crm-close { width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer; font-size: 18px; line-height: 1; flex: none; }
.crm-facts { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px 18px; }
.crm-fact > span { display: block; color: var(--muted); font-size: 11.5px; font-weight: 700; }
.crm-fact > b { display: block; font-weight: 650; }
.crm-fact select, .crm-fact input { min-height: 36px; padding: 0 10px; font-weight: 650; }
.crm-summary { padding: 12px 14px; border: 1px solid #e0e7c4; border-radius: 9px; background: #f1f4e6; }
.crm-summary.warn { border-color: #ecd9ae; background: #f8ecd4; }
.crm-summary p { margin: 0; }
.crm-summary ul { margin: 8px 0 0; padding-left: 18px; }
.crm-player { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.crm-play { width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--forest); color: var(--lime); cursor: pointer; font-size: 13px; flex: none; }
.crm-wave { flex: 1; height: 30px; display: flex; align-items: center; gap: 2px; min-width: 0; overflow: hidden; }
.crm-wave i { flex: 1; min-width: 2px; border-radius: 2px; background: #c9d1c5; }
.crm-wave i.done { background: var(--forest-2); }
.crm-transcript { display: grid; gap: 10px; }
.crm-turn { display: grid; grid-template-columns: 42px minmax(0,1fr); gap: 10px; }
.crm-turn time { padding-top: 8px; color: var(--muted); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.crm-bubble { padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.crm-bubble b { display: block; color: var(--muted); font-size: 11.5px; }
.crm-turn.mine .crm-bubble { border-color: #dbe5d4; background: #eef3ea; }
.crm-hl { padding: 0 2px; border-radius: 3px; background: var(--lime); }
.crm-req { display: grid; grid-template-columns: 56px minmax(0,1fr) auto; gap: 4px 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.crm-req img { grid-row: span 2; width: 56px; height: 44px; border-radius: 6px; object-fit: cover; background: #eef0ea; }
.crm-req-title { font-weight: 750; }
.crm-req-meta { color: var(--muted); font-size: 12px; }
.crm-list { display: grid; gap: 8px; }
.crm-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; background: #fff; cursor: pointer; text-align: left; color: var(--ink); }
.crm-item .grow { flex: 1; min-width: 0; }
.crm-picker { display: grid; gap: 8px; margin-top: 10px; padding: 12px; border: 1px dashed #b8c3b2; border-radius: 9px; background: #f8faf4; }
.crm-picker input { min-height: 38px; }
.crm-form { display: grid; gap: 8px; }
.crm-form textarea { min-height: 70px; }

.crm-client-grid { display: grid; grid-template-columns: 320px minmax(0,1fr); gap: 16px; align-items: start; }
.crm-client-card { display: grid; gap: 16px; padding: 18px; }
.crm-line { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px solid #ecefe9; }
.crm-line:last-child { border-bottom: 0; }
.crm-msgs { display: inline-flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.crm-msg { padding: 3px 9px; border: 1px solid #dfe4da; border-radius: 999px; font-size: 12px; font-weight: 600; color: var(--forest-2); text-decoration: none; }
.crm-msg:hover, .crm-msg:focus-visible { background: #eef2ea; }
.crm-timeline { display: grid; gap: 4px; padding: 16px 18px; }
.crm-tl-day { margin: 12px 0 4px; color: var(--muted); font-size: 11.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.crm-tl-day:first-child { margin-top: 0; }
.crm-tl { display: grid; grid-template-columns: 50px 28px minmax(0,1fr); gap: 10px; padding: 10px 8px; border-radius: 9px; cursor: pointer; }
.crm-tl:hover { background: #f4f6ef; }
.crm-tl time { padding-top: 4px; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.crm-tl-icon { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #eef0ea; font-size: 13px; }
.crm-tl p { margin: 3px 0 0; color: #3a4841; }
.crm-back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 10px; padding: 0; border: 0; background: none; color: var(--forest-2); cursor: pointer; font-weight: 750; }

@media (max-width: 1000px) {
  .crm-kpis { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .crm-client-grid { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 700px) {
  .crm-facts { grid-template-columns: minmax(0,1fr); }
  .crm-head h2 { font-size: 22px; }
  .crm-hide-sm { display: none; }
  .crm-drawer-head, .crm-drawer-body { padding-left: 16px; padding-right: 16px; }
}

/* Utilities and dynamic values as classes: the site CSP blocks inline style attributes. */
.crm-u-center { align-self: center; }
.crm-u-note { display: grid; cursor: default; }
.crm-u-avs { display: inline-flex; gap: 3px; }
.crm-u-inline { display: inline; margin: 0; }
.crm-u-end { justify-content: flex-end; }
.crm-u-start { justify-content: flex-start; }
.crm-u-self-start { justify-self: start; }
.crm-u-mb10 { margin-bottom: 10px; }
.crm-u-mb12 { margin-bottom: 12px; }
.crm-u-hint { margin: -4px 0 8px; }
.crm-u-m0 { margin: 0; }
.crm-u-h18 { margin: 0; font-size: 18px; }
.crm-u-mt2 { margin: 2px 0 0; }
.crm-u-w170 { min-width: 170px; }
.crm-u-w260 { min-width: 260px; }
.crm-u-pad { padding: 14px 18px 0; }
.crm-u-right { text-align: right; }
.crm-u-full { width: 100%; }
.crm-av0 { background: #245443; } .crm-av1 { background: #2c5d8f; } .crm-av2 { background: #8a5a1c; } .crm-av3 { background: #6b3f8f; }
.crm-av4 { background: #2f7a6b; } .crm-av5 { background: #9a3b3b; } .crm-av6 { background: #4d5a25; } .crm-av7 { background: #5b6470; }
.crm-h2 { height: 20%; } .crm-h3 { height: 30%; } .crm-h4 { height: 40%; } .crm-h5 { height: 50%; } .crm-h6 { height: 60%; }
.crm-h7 { height: 70%; } .crm-h8 { height: 80%; } .crm-h9 { height: 90%; } .crm-h10 { height: 100%; }

/* Pop-up for live Phonet calls, shown on any Agrotool page */
.crm-pop { position: fixed; right: 18px; bottom: 18px; z-index: 60; display: grid; gap: 10px; width: min(360px, calc(100vw - 32px)); }
.crm-pop-card { display: grid; gap: 6px; padding: 14px 16px; border: 1px solid var(--line); border-left: 4px solid var(--forest-2); border-radius: 12px; background: var(--paper); box-shadow: var(--shadow); font-size: 14px; }
.crm-pop-ringing { animation: crm-pop-in .25s ease-out; }
.crm-pop-ended { border-left-color: var(--muted); }
.crm-pop-card header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.crm-pop-state { color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.crm-pop-x { border: 0; background: transparent; color: var(--muted); font-size: 20px; line-height: 1; cursor: pointer; padding: 2px 6px; }
.crm-pop-who { font-size: 17px; }
.crm-pop-phone { color: var(--muted); font-variant-numeric: tabular-nums; }
.crm-pop-deals { margin: 0; padding-left: 18px; }
.crm-pop-last { margin: 0; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.crm-pop-actions { display: flex; flex-wrap: wrap; gap: 8px; }
@keyframes crm-pop-in { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (max-width: 640px) { .crm-pop { right: 16px; left: 16px; bottom: 16px; width: auto; } }
@media (prefers-reduced-motion: reduce) { .crm-pop-ringing { animation: none; } }
/* A colleague talked to the client of this deal (deal stays with its manager). */
.crm-alert { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 10px 12px; border-radius: 10px; background: #f8e1da; color: var(--danger); font-size: 13px; }
.crm-alert b { color: inherit; }

/* ---------- CRM pages after the 15.11 redesign (deal card, board, calls, clients) ---------- */
.crm-root { max-width: 1480px; }
.crm-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.crm-label { display: block; color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.crm-strong { color: var(--forest); }
.crm-panel { display: grid; align-content: start; gap: 12px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: #fff; min-width: 0; }
.crm-panel h3 { margin: 0; color: var(--ink); font-size: 16px; font-weight: 800; letter-spacing: -.01em; text-transform: none; }
.crm-panel-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 14px; }
.crm-pagehead { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 14px; margin-bottom: 14px; }
.crm-pagehead h2, .crm-dealhead h2 { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
.crm-titleline { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; }
.crm-titleline .crm-small { color: #3d4741; font-size: 14.5px; }
.crm-pagehead select { width: auto; min-height: 42px; padding: 0 12px; }
.crm-searchbox { position: relative; display: flex; align-items: center; flex: 1 1 280px; min-width: 0; }
.crm-searchbox svg { position: absolute; left: 12px; color: var(--forest); pointer-events: none; }
.crm-searchbox input { min-height: 42px; padding-left: 40px; }
.crm-searchbox.wide { flex-basis: 360px; max-width: 560px; }
.crm-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; }
.crm-filters select { width: auto; min-height: 42px; padding: 0 12px; }
.crm-toggle { min-height: 40px; padding: 0 14px; border: 1px dashed #b9c1b6; border-radius: 99px; background: transparent; color: #3d4741; cursor: pointer; font-weight: 700; font-size: 13.5px; white-space: nowrap; }
.crm-toggle[aria-pressed="true"] { border: 1px solid var(--forest); background: var(--forest); color: #fff; }
#crm-deal-gap.on { border-color: var(--forest); background: #eaf3ec; color: var(--forest); font-weight: 700; }
.crm-toggle.danger { border: 1px solid #f3cfcf; background: #fde2e2; color: #9b1c1c; }
.crm-toggle.danger[aria-pressed="true"] { border-color: #9b1c1c; background: #9b1c1c; color: #fff; }
.crm-btn svg { flex: none; }
.crm-btn:disabled { opacity: .55; cursor: wait; }
.crm-btn.won { border-color: #bcdcc6; background: #dcefe2; color: #1f5c38; }
.crm-iconbtn { display: inline-grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 99px; background: #fff; color: var(--forest); cursor: pointer; }
.crm-btn.crm-msg { padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); font-size: 13.5px; font-weight: 700; }
.crm-btn.crm-msg i { width: 9px; height: 9px; border-radius: 99px; flex: none; }
.crm-msg.vb i { background: #7360f2; } .crm-msg.tg i { background: #229ed9; } .crm-msg.wa i { background: #25d366; }
.crm-link-strong { padding: 0; border: 0; background: none; color: var(--forest-2); cursor: pointer; font: inherit; font-weight: 800; text-align: left; text-decoration: underline; text-decoration-color: #c6d3c9; text-underline-offset: 3px; }
.crm-link-strong:hover { color: var(--forest); text-decoration-color: currentColor; }
.crm-chip { padding: 4px 10px; border: 0; border-radius: 8px; background: #eef0ea; color: var(--forest); cursor: pointer; font-size: 12.5px; font-weight: 700; white-space: nowrap; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.crm-ini { display: inline-grid; place-items: center; width: 26px; height: 26px; flex: none; border-radius: 99px; background: #eef0ea; color: #3d4741; font-size: 11px; font-weight: 800; }
.crm-avs { display: inline-flex; gap: 3px; }
.crm-pill.stage { background: #183c2f; color: #fff; }
.crm-alert.warn { background: #fdf1c7; color: #4a3a00; }
.crm-alert { margin-bottom: 14px; }
.crm-root .crm-only-sm { display: none; }
.crm-tab-off { }

/* Calls */
.crm-calls-page { display: grid; gap: 16px; min-width: 0; }
.crm-missed { display: grid; grid-template-columns: 92px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid #f3d6d6; border-radius: 10px; background: #fffafa; }
.crm-missed-when { display: grid; gap: 2px; }
.crm-missed-when b { font-size: 15px; }
.crm-missed-when span { color: #9b1c1c; font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.crm-missed-who { display: grid; gap: 1px; min-width: 0; padding: 0; border: 0; background: none; color: var(--ink); cursor: pointer; text-align: left; font: inherit; }
.crm-missed-who b { font-size: 14.5px; }
.crm-missed-who.static { cursor: default; }
.crm-missed-who > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crm-missed-who .crm-num { color: #3d4741; font-size: 13px; }
.crm-missed-act { display: flex; align-items: center; gap: 6px; flex: none; }
.crm-menu-wrap { position: relative; }
.crm-menu { position: absolute; top: calc(100% + 4px); right: 0; z-index: 5; display: grid; min-width: 230px; padding: 6px; border: 1px solid var(--line); border-radius: 10px; background: #fff; box-shadow: 0 12px 30px rgba(24, 60, 47, .16); }
.crm-menu button { min-height: 40px; padding: 0 12px; border: 0; border-radius: 7px; background: none; color: var(--ink); cursor: pointer; text-align: left; font-weight: 650; }
.crm-menu button:hover, .crm-menu button:focus-visible { background: #f1f4ee; }
.crm-closed summary { cursor: pointer; color: var(--muted); font-size: 13px; font-weight: 700; }
.crm-closed-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 0; color: #3d4741; font-size: 13px; }
/* Call records: Phonet-like strips, one short line per call; the open one unfolds below. */
.crm-recs { display: grid; min-width: 0; }
.crm-rec-head, .crm-rec-row { display: grid; grid-template-columns: 64px 34px minmax(220px, 2.4fr) minmax(200px, 1.9fr) 44px minmax(90px, 1fr); gap: 12px; align-items: center; }
.crm-rec-head { padding: 6px 10px; border-block: 1px solid var(--line); background: #f6f7f3; color: var(--muted); font-size: 11.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.crm-rec-head > span:nth-child(5) { text-align: right; }
.crm-rec { border-bottom: 1px solid #eef0ea; min-width: 0; }
.crm-rec-row { min-height: 44px; padding: 3px 10px; cursor: pointer; font-size: 13.5px; }
.crm-rec-row:hover { background: #f8f9f5; }
.crm-rec-row:focus-visible { outline: 2px solid var(--forest); outline-offset: -2px; }
.crm-rec.on { margin: 4px 0; border: 2px solid var(--forest); border-radius: 10px; background: #fbfcf9; }
.crm-rec.on .crm-rec-row:hover { background: none; }
.crm-rec-play { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 99px; background: #eef0ea; color: var(--forest); }
.crm-rec.on .crm-rec-play { background: var(--forest); color: var(--lime); }
.crm-rec-title { display: flex; align-items: center; gap: 8px; min-width: 0; }
.crm-rec-title .crm-dir { width: 22px; height: 22px; border-radius: 6px; font-size: 13px; }
/* The name of a call is one sentence up to 60 letters: two lines keep it whole. */
.crm-rec-title b { display: -webkit-box; overflow: hidden; line-height: 1.25; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }
.crm-rec-who { display: grid; min-width: 0; line-height: 1.25; }
.crm-rec-who > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crm-rec-who .crm-num { color: var(--muted); font-size: 12px; }
.crm-rec-when { overflow: hidden; color: #3d4741; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.crm-rec-dur { font-weight: 700; text-align: right; }
.crm-rec-deal { justify-self: start; max-width: 100%; padding: 3px 9px; border-radius: 7px; background: #eef0ea; color: var(--forest); font-size: 12.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crm-rec-more { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 20px; padding: 6px 12px 14px 56px; }
.crm-rec-col { display: grid; gap: 12px; align-content: start; min-width: 0; }
.crm-rec-col .crm-row { gap: 6px; }
.crm-rec-col .crm-btn.crm-msg, .crm-rec-col .crm-row .crm-btn { min-height: 34px; padding: 0 10px; font-size: 13px; }
.crm-rec-deal.none { border: 1px dashed #b9c1b6; background: #fff; color: var(--muted); }
.crm-recs.nodeal .crm-rec-head, .crm-recs.nodeal .crm-rec-row { grid-template-columns: 64px 34px minmax(0, 1fr) minmax(110px, 160px) 44px; }
.crm-rec-row.static { cursor: default; }
.crm-rec-row.static:hover { background: none; }
.crm-rec-play.missed { background: #fde2e2; color: #9b1c1c; font-size: 12px; font-weight: 800; }
.crm-rec-play.note { background: #eef0ea; color: #3d4741; font-size: 12.5px; font-weight: 800; }
.crm-rec.note .crm-rec-row { align-items: start; padding-block: 8px; }
.crm-rec.note .crm-rec-title b { overflow-wrap: anywhere; white-space: normal; font-weight: 650; line-height: 1.35; }
.crm-rec.colleague:not(.on) { background: #f1f6fc; }
.crm-rec-flag { color: #1e4e79; font-size: 12px; font-weight: 700; }
button.crm-rec-deal { border: 0; cursor: pointer; font-family: inherit; text-align: left; }
button.crm-rec-deal:hover { background: #dfe5da; }
.crm-rec-more.one { grid-template-columns: minmax(0, 1fr); max-width: 780px; }
.crm-rec-note { margin: 0; padding: 8px 10px; border-radius: 8px; background: #e3edf8; color: #1e4e79; font-size: 13px; font-weight: 600; }
.crm-ai-title { font-size: 15px; line-height: 1.3; }
.crm-weight { flex: none; font-size: 14px; line-height: 1; cursor: help; }
.crm-hist-row .crm-weight { margin-right: 5px; font-size: 12px; }
.crm-weight-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; color: var(--muted); font-size: 12.5px; line-height: 1.35; }
.crm-ai-facts { display: grid; margin: 0; }
.crm-ai-facts > div { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 10px; padding: 5px 0; border-top: 1px solid #e2e6d3; font-size: 13.5px; line-height: 1.4; }
.crm-ai-facts dt { color: var(--muted); }
.crm-ai-facts dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.crm-ai-facts > div:first-child dd { font-weight: 800; }
/* Deal and client cards (Mark 2026-11-17): the facts on top, the talks under them at full width. */
.crm-dealstack { display: grid; gap: 16px; min-width: 0; }
.crm-dealtop { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: stretch; }
.crm-talks-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px 16px; border-bottom: 1px solid var(--line); }
.crm-talks-head h3 { margin: 0 0 8px; }
.crm-talks-head .crm-seg { margin-bottom: 6px; }
.crm-dl.wide { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); column-gap: 20px; }
.crm-dealcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
/* Client card: «Про клієнта» typed in place, and one block of everything the client did with us. */
.crm-panel-head h3 .crm-small { margin-left: 6px; font-weight: 500; }
.crm-profile-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.crm-profile-head h3 { margin: 0; }
.crm-saved { margin-left: auto; color: #1f5c38; font-size: 13px; font-weight: 700; }
.crm-profile-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 14px; }
/* AI suggestions: a dashed, tinted field is "heard, not saved yet"; solid white is saved. */
.crm-aimark { display: inline-flex; align-items: center; flex: none; padding: 1px 6px; border-radius: 99px; background: var(--forest); color: var(--lime); font-size: 10.5px; font-weight: 800; letter-spacing: .04em; line-height: 1.5; }
/* Mark 2026-11-29: one AI note per deal, read at a glance. */
.crm-ainote { display: grid; gap: 6px; padding: 10px 14px 12px; border-radius: 12px; background: #f1f4e6; }
.crm-ainote-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.crm-ainote-head b { font-size: 15px; }
.crm-ainote-head .crm-btn { margin-left: auto; }
.crm-ainote-wait { background: #f6f6f1; }
.crm-ainote-wait p { margin: 0; color: #5b6158; }
.crm-ainote-list { display: grid; gap: 4px; margin: 0; }
.crm-ainote-list > div { display: grid; grid-template-columns: 118px minmax(0, 1fr); gap: 12px; padding: 3px 0; }
.crm-ainote-list dt { color: var(--muted); font-size: 12.5px; font-weight: 800; line-height: 1.45; }
.crm-ainote-list dd { margin: 0; color: var(--ink); font-size: 14px; line-height: 1.45; }
.crm-ainote-list .miss dt, .crm-ainote-list .miss dd { color: #8a5a00; }
/* «Виправити»: the five sections as text boxes, label on the left like the note itself. */
.crm-ainote-form { gap: 8px; }
.crm-ainote-field { display: grid; grid-template-columns: 118px minmax(0, 1fr); gap: 12px; align-items: start; }
.crm-ainote-field > span { padding-top: 7px; color: var(--muted); font-size: 12.5px; font-weight: 800; }
.crm-ainote-field textarea { width: 100%; min-height: 44px; box-sizing: border-box; padding: 7px 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); font: inherit; font-size: 14px; line-height: 1.45; resize: vertical; }
.crm-ainote-field textarea:focus { outline: 2px solid var(--forest, #1f4d3a); outline-offset: 1px; }
.crm-ainote-form .crm-row { justify-content: flex-end; gap: 8px; }
.crm-fields-fold { border-top: 1px solid var(--line); }
.crm-fields-fold > summary { display: flex; align-items: center; gap: 12px; padding: 12px 0 2px; cursor: pointer; list-style: none; }
.crm-fold-txt { display: flex; flex: 1; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; min-width: 0; }
.crm-fields-fold > summary::-webkit-details-marker { display: none; }
.crm-fields-fold > summary b { font-size: 14.5px; }
.crm-fields-fold > summary::after { content: "Показати"; margin-left: auto; color: var(--forest); font-size: 13px; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
.crm-fields-fold[open] > summary::after { content: "Згорнути"; }
.crm-fields-fold[open] > summary { padding-bottom: 12px; }
.crm-pf-lab { display: flex; align-items: center; gap: 6px; }
.crm-aitag { display: inline-flex; margin-left: 0; padding: 0 5px; border-radius: 99px; background: #e3ead0; color: var(--forest); font-size: 10px; font-weight: 800; letter-spacing: .04em; line-height: 1.6; vertical-align: 1px; }
@media (max-width: 760px) { .crm-ainote-list > div, .crm-ainote-field { grid-template-columns: minmax(0, 1fr); gap: 0; } .crm-ainote-field > span { padding: 0 0 4px; } .crm-ainote-head > .crm-small { order: 3; flex-basis: 100%; } }
/* The AI's list: one row per suggestion, the same four columns in every row. */
.crm-aibox { display: grid; padding: 4px 12px; border-radius: 12px; background: #f1f4e6; }
.crm-aibox-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 6px 0; }
.crm-airow { display: grid; grid-template-columns: 150px minmax(0, 1fr) minmax(0, 1.35fr) auto; align-items: center; gap: 4px 14px; padding: 7px 0; border-top: 1px solid #dde4c9; }
.crm-aibox > .crm-airow:first-child { border-top: 0; }
.crm-airow > label { display: grid; color: #3d4741; font-size: 13px; font-weight: 700; line-height: 1.3; }
.crm-airow-of { color: var(--muted); font-size: 12px; font-weight: 500; }
.crm-airow input, .crm-airow select { width: 100%; min-height: 38px; padding: 0 10px; border: 1.5px dashed #8fae7c; border-radius: 9px; background: #fff; color: var(--ink); font: inherit; font-size: 14.5px; font-weight: 700; }
/* The heard value wraps onto as many lines as it needs (Mark 2026-11-27: long text was cut). */
.crm-airow textarea { display: block; width: 100%; min-height: 38px; padding: 8px 10px; border: 1.5px dashed #8fae7c; border-radius: 9px; background: #fff; color: var(--ink); font: inherit; font-size: 14.5px; font-weight: 700; line-height: 1.35; resize: none; overflow: hidden; }
.crm-airow textarea:focus { border-style: solid; border-color: var(--forest-2); outline: 2px solid #cfe0d4; outline-offset: 0; }
.crm-airow input:focus, .crm-airow select:focus { border-style: solid; border-color: var(--forest-2); outline: 2px solid #cfe0d4; outline-offset: 0; }
.crm-airow .crm-money-in { grid-template-columns: minmax(0, 1fr) 76px; gap: 6px; }
.crm-airow .crm-ai-why { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.crm-airow .crm-ai-acts { flex-wrap: nowrap; justify-content: flex-end; }
.crm-airow-text { display: flex; align-items: flex-start; gap: 8px; grid-column: 1 / 3; min-width: 0; font-size: 14.5px; line-height: 1.35; overflow-wrap: anywhere; }
.crm-airow-text .crm-aimark { margin-top: 2px; }
@media (max-width: 1000px) {
  .crm-airow { grid-template-columns: 130px minmax(0, 1fr) auto; }
  .crm-airow .crm-ai-why { grid-column: 2 / -1; grid-row: 2; }
  .crm-airow.note { grid-template-columns: minmax(0, 1fr) auto; }
  .crm-airow.note .crm-airow-text { grid-column: 1; }
  .crm-airow.note .crm-ai-why { grid-column: 1 / -1; padding-left: 34px; }
  .crm-profile-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .crm-airow, .crm-airow.note { grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 10px 0; }
  .crm-airow > label { display: flex; align-items: baseline; gap: 6px; }
  .crm-airow .crm-ai-why, .crm-airow.note .crm-ai-why { grid-column: 1; grid-row: auto; padding-left: 0; -webkit-line-clamp: 3; }
  .crm-airow .crm-ai-acts .crm-btn { flex: 1 1 0; min-height: 44px; }
  .crm-aibox-head .crm-btn { flex: 1 1 100%; min-height: 44px; }
}
.crm-aibar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 9px 10px 9px 12px; border-radius: 10px; background: #f1f4e6; }
.crm-aibar-text { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; min-width: 0; font-size: 14px; }
.crm-aibar-text .crm-aimark { align-self: center; }
.crm-aibar-text .crm-small { color: #55605a; }
.crm-profile-grid { align-items: start; }
.crm-ai-why { display: block; color: #55605a; font-size: 12.5px; font-weight: 500; line-height: 1.35; overflow-wrap: anywhere; }
.crm-ai-why q { font-style: italic; }
.crm-ai-when { margin-left: 6px; color: var(--muted); white-space: nowrap; }
.crm-ai-when.solo { margin-left: 0; }
.crm-ai-acts { display: flex; flex-wrap: wrap; gap: 6px; }
.crm-btn.take { border-color: #c5d6ae; background: #e3ecd3; color: var(--forest); font-weight: 800; }
.crm-btn.take:hover { border-color: var(--forest-2); background: #d7e4c2; }
.crm-about { display: grid; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.crm-about-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.crm-about-head h4 { margin: 0; font-size: 14.5px; font-weight: 800; }
.crm-about-offer { display: flex; align-items: flex-start; gap: 10px; padding: 9px 10px 9px 12px; border: 1.5px dashed #8fae7c; border-radius: 10px; background: #f6f9ea; }
.crm-about-offer > .crm-aimark { margin-top: 2px; }
.crm-about-text { display: grid; gap: 2px; flex: 1 1 auto; min-width: 0; font-size: 14px; line-height: 1.4; }
.crm-about-offer .crm-ai-acts { flex: none; }
.crm-about-list { display: grid; margin: 0; padding: 0; list-style: none; }
.crm-about-list li { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 7px 0; border-top: 1px solid #edf0ea; font-size: 14px; font-weight: 600; line-height: 1.4; }
.crm-about-list li:first-child { border-top: 0; }
.crm-about-list li > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.crm-about-list .crm-sub { flex: none; font-weight: 500; }
.crm-about-form { display: flex; gap: 8px; }
.crm-about-form input { flex: 1 1 auto; min-width: 0; min-height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink); font: inherit; font-size: 14px; }
.crm-about-form input:focus { border-color: var(--forest-2); outline: 2px solid #cfe0d4; outline-offset: 0; }
.crm-about-form .crm-btn { min-height: 36px; }
@media (max-width: 640px) {
  .crm-aibar .crm-btn, .crm-ai-acts .crm-btn, .crm-about-form .crm-btn { min-height: 44px; }
  .crm-aibar .crm-btn { flex: 1 1 100%; }
  .crm-profile-field.wide, .crm-profile-field.wide-sm { grid-column: 1 / -1; }
  .crm-about-offer { flex-wrap: wrap; }
  .crm-about-offer .crm-ai-acts { flex: 1 1 100%; }
  .crm-about-offer .crm-ai-acts .crm-btn { flex: 1 1 0; }
  .crm-about-form input { min-height: 44px; }
}
.crm-profile-field { display: grid; gap: 5px; min-width: 0; color: #3d4741; font-size: 13px; font-weight: 600; }
/* The deal's «Деталі» and «Що далі» are built from the client card's fields and AI rows (Mark 2026-11-19). */
.crm-profile-field select { width: 100%; min-height: 40px; padding: 0 8px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink); font: inherit; font-size: 14.5px; font-weight: 700; }
.crm-profile-field select:focus { border-color: var(--forest-2); outline: 2px solid #cfe0d4; outline-offset: 0; }
.crm-profile-field.wide { grid-column: span 2; }
.crm-profile-field .crm-money-in { grid-template-columns: minmax(0, 1fr) 76px; gap: 6px; }
.crm-profile-field .crm-money-in select { border-color: var(--line); background: #fff; }
.crm-about-go { margin-left: auto; }
.crm-plan-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px 24px; align-items: start; }
.crm-plan-col { display: grid; gap: 8px; min-width: 0; }
.crm-plan-col + .crm-plan-col { padding-left: 24px; border-left: 1px solid var(--line); }
.crm-plan-col .crm-about-offer { flex-wrap: wrap; }
.crm-plan-col .crm-about-text { flex: 1 1 0; }
.crm-plan-col .crm-about-offer .crm-ai-acts { flex: 1 1 100%; padding-left: 36px; }
.crm-rems { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.crm-rem { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2px 12px; padding: 9px 10px 9px 12px; border: 1px solid #cfe0d4; border-radius: 10px; background: #eef5ef; }
.crm-rem-when { grid-column: 1; color: #1f5c38; font-size: 12.5px; font-weight: 800; }
.crm-rem b { grid-column: 1; font-size: 14.5px; line-height: 1.35; overflow-wrap: anywhere; }
.crm-rem .crm-ai-acts { grid-column: 2; grid-row: 1 / span 2; align-items: center; }
.crm-rem.today { border-color: #ecd27a; background: #fdf1c7; }
.crm-rem.today .crm-rem-when { color: #6f5300; }
.crm-rem.late { border-color: #f0b7b7; background: #fdecec; }
.crm-rem.late .crm-rem-when { color: #9b1c1c; }
.crm-rem-form { display: grid; gap: 8px; }
.crm-rem-form input { min-height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink); font: inherit; font-size: 14px; }
.crm-rem-form input:focus { border-color: var(--forest-2); outline: 2px solid #cfe0d4; outline-offset: 0; }
.crm-rem-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.crm-rem-pick .crm-chip { min-height: 32px; padding: 0 12px; border-radius: 99px; }
.crm-rem-pick .crm-chip.on { background: var(--forest); color: #fff; }
.crm-rem-pick input, .crm-rem input[type="date"] { flex: 0 0 auto; width: auto; min-height: 32px; padding: 0 8px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink); font: inherit; font-size: 13.5px; }
.crm-rem-pick .crm-btn { min-height: 36px; margin-left: auto; }
.crm-plan .crm-ask { background: #f6f7f3; }
.crm-plan-result { margin: 0; padding: 10px 12px; border-radius: 10px; background: #f6f7f3; font-size: 14.5px; }
.crm-plan-result.won { background: #dcefe2; }
.crm-plan-result.lost { background: #f3e7e5; }
@media (max-width: 900px) {
  .crm-plan-cols { grid-template-columns: minmax(0, 1fr); }
  .crm-plan-col + .crm-plan-col { padding: 12px 0 0; border-left: 0; border-top: 1px solid var(--line); }
}
@media (max-width: 640px) {
  .crm-rem { grid-template-columns: minmax(0, 1fr); }
  .crm-rem .crm-ai-acts { grid-column: 1; grid-row: auto; margin-top: 4px; }
  .crm-rem .crm-btn { flex: 1 1 0; min-height: 44px; }
  .crm-rem-form input { min-height: 44px; }
  .crm-rem-pick .crm-chip { min-height: 40px; }
  .crm-rem-pick .crm-btn { flex: 1 1 100%; min-height: 44px; margin-left: 0; }
  .crm-plan-col .crm-about-offer .crm-ai-acts { padding-left: 0; }
}

.crm-profile-field input { width: 100%; min-height: 40px; padding: 0 10px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink); font: inherit; font-size: 14.5px; font-weight: 700; }
.crm-profile-field input::placeholder { color: #8a938c; font-weight: 500; }
.crm-profile-field input:focus { border-color: var(--forest-2); outline: 2px solid #cfe0d4; outline-offset: 0; }
.crm-profile-field input:disabled { background: #f6f7f2; }
.crm-profile-phones { margin: 0; }
.crm-cdeal { display: grid; gap: 6px; align-content: start; min-width: 0; padding: 12px; border: 1px solid #e3e6df; border-radius: 10px; background: #fff; }
.crm-cdeal.open { border-color: var(--forest); box-shadow: inset 0 0 0 1px var(--forest); }
.crm-cdeal-top, .crm-cdeal-mid, .crm-cdeal-foot { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; min-width: 0; }
.crm-cdeal-top .crm-pill, .crm-cdeal-mid b, .crm-cdeal-foot .crm-btn { flex: none; }
.crm-cdeal-title { min-width: 0; padding: 0; border: 0; background: none; color: var(--ink); font: inherit; font-size: 15px; font-weight: 800; line-height: 1.3; text-align: left; overflow-wrap: anywhere; }
button.crm-cdeal-title { cursor: pointer; text-decoration: underline; text-decoration-color: #b9c2b6; text-underline-offset: 3px; }
button.crm-cdeal-title:hover { text-decoration-color: var(--forest); }
.crm-cdeal-mid > span, .crm-cdeal-foot > span { min-width: 0; overflow-wrap: anywhere; }
.crm-cdeal-foot { align-items: center; margin-top: auto; }
.crm-more { justify-self: start; }
@media (max-width: 640px) { .crm-profile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .crm-saved { margin-left: 0; } }
.crm-pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding-top: 4px; }
.crm-pages, .crm-sizes { display: flex; align-items: center; gap: 4px; }
.crm-pages button, .crm-sizes button { min-width: 36px; height: 36px; padding: 0 8px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); cursor: pointer; font-weight: 700; font-variant-numeric: tabular-nums; }
.crm-pages button[aria-current="page"] { border-color: var(--forest); background: var(--forest); color: #fff; }
.crm-pages button:disabled { color: #b9c1b6; cursor: default; }
.crm-sizes button[aria-pressed="true"] { background: #eef0ea; box-shadow: inset 0 0 0 2px var(--forest); color: var(--forest); }
.crm-gap { padding: 0 4px; color: var(--muted); }
.crm-callpanel-deal { display: grid; gap: 8px; }
.crm-player { display: grid; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: #f8f7f2; }
.crm-player audio { width: 100%; height: 40px; }
.crm-player-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.crm-skip { display: flex; align-items: center; gap: 6px; }
.crm-skip button { min-width: 64px; height: 32px; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: #3d4741; cursor: pointer; font-weight: 700; font-size: 13px; }
.crm-skip button:hover, .crm-speed button:hover { border-color: var(--forest); }
.crm-speed { display: flex; align-items: center; gap: 6px; }
.crm-speed button { min-width: 48px; height: 32px; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: #3d4741; cursor: pointer; font-weight: 700; font-size: 13px; }
.crm-speed button[aria-pressed="true"] { border-color: var(--forest); background: var(--forest); color: #fff; }
@media (max-width: 480px) { .crm-skip, .crm-speed { gap: 4px; } .crm-skip button { min-width: 52px; padding: 0 6px; } .crm-speed button { min-width: 40px; padding: 0 4px; } }
.crm-ai { display: grid; gap: 6px; padding: 12px 14px; border-radius: 10px; background: #f1f4e6; }
.crm-ai p { margin: 0; font-weight: 600; line-height: 1.45; }
.crm-ai ul { margin: 0; padding-left: 18px; color: #3d4741; font-size: 13.5px; }
.crm-transcript-box summary { cursor: pointer; color: var(--forest-2); font-weight: 750; }
.crm-transcript-box .crm-transcript { margin-top: 10px; max-height: 360px; overflow-y: auto; }
.crm-hist { display: grid; gap: 4px; }
.crm-hist-row { display: grid; grid-template-columns: 100px minmax(0, 1fr) auto; gap: 8px; align-items: start; padding: 7px 8px; border: 0; border-radius: 8px; background: none; color: var(--ink); cursor: pointer; text-align: left; font-size: 13px; }
.crm-hist-row:hover, .crm-hist-row.on { background: #eef0ea; }
.crm-hist-row:disabled { cursor: default; }
.crm-hist-row:disabled:not(.on):hover { background: none; }
.crm-hist-row > span:nth-child(2) { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Board */
/* Kanban (Mark 2026-11-29): columns wide enough for a card to breathe; the board scrolls
   sideways instead of squeezing six stages into 166px, and nothing in a card can push it wider. */
.crm-board { grid-auto-columns: minmax(224px, 1fr); scroll-snap-type: x proximity; }
.crm-board .crm-col { min-width: 0; scroll-snap-align: start; }
.crm-board .crm-col-body, .crm-mlist { grid-template-columns: minmax(0, 1fr); }
.crm-col { min-height: 420px; border-radius: 12px; background: #ebe8df; }
.crm-col.closed { background: #f1efe8; }
.crm-col-head { display: grid; gap: 1px; padding: 10px 12px 6px; }
.crm-col-head b { color: var(--forest); font-size: 14px; }
.crm-col-head span { color: #3d4741; font-size: 12.5px; }
.crm-deal { gap: 6px; padding: 12px; border-radius: 10px; }
.crm-deal-title { font-size: 14px; font-weight: 750; line-height: 1.3; }
.crm-deal-client { color: #3d4741; font-size: 13px; }
.crm-deal-line { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-height: 22px; }
.crm-deal-step { color: #3d4741; font-size: 13px; }
.crm-deal-step.late { color: #9b1c1c; font-weight: 800; }
.crm-deal-step.none { color: var(--muted); font-style: italic; }
.crm-deal-flag { color: #1e4e79; font-size: 12.5px; font-weight: 700; }
.crm-newdeal { display: grid; grid-template-columns: minmax(160px, 220px) minmax(220px, 1fr) auto; gap: 10px; align-items: end; margin-bottom: 14px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.crm-newdeal label { display: grid; gap: 6px; color: #3a4841; font-size: 13px; font-weight: 700; }
.crm-newdeal input { min-height: 42px; }
.crm-tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.crm-tabs.scroll { overflow-x: auto; padding-bottom: 2px; }
.crm-tabs button { flex: none; min-height: 42px; padding: 0 14px; border: 1px solid var(--line); border-radius: 99px; background: #fff; color: #3d4741; cursor: pointer; font-weight: 700; font-size: 14px; white-space: nowrap; }
.crm-tabs button[aria-selected="true"] { border-color: var(--forest); background: var(--forest); color: #fff; }
.crm-tabs button b { margin-left: 4px; }
.crm-mlist { display: grid; gap: 10px; }

/* Deal page */
.crm-dealhead { display: grid; gap: 12px; margin: -4px 0 16px; padding: 14px 18px 16px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.crm-dealhead .crm-back { margin: 0; justify-self: start; }
.crm-dealhead-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.crm-dealhead-main { display: grid; gap: 6px; min-width: 0; flex: 1 1 700px; }
/* 700px (here and in .crm-clienthead): on a laptop the buttons stay under the client line, and the name and the line keep one row each. */
.crm-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; color: #3d4741; font-size: 14px; }
.crm-dealhead-act { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.crm-dealhead-act .crm-btn { min-height: 42px; }
/* Phone: call and messengers in a bar over the tab bar. It sits after the head, outside the white
   band: the band's clip-path cut it off when it was inside (no call bar on phones since 17.11). */
.crm-callbar { display: none; }
@media (max-width: 760px) { .crm-callbar { display: grid; } .crm-dealhead-act .crm-btn.primary, .crm-dealhead-act .crm-msg { display: none; } .crm-dealhead-act:not(:has(.crm-btn:not(.primary):not(.crm-msg):not(.crm-hide-sm))) { display: none; } }
.crm-stagebar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.crm-stagebar ol { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; flex: 1 1 600px; margin: 0; padding: 0; list-style: none; }
.crm-stagebar ol button { width: 100%; min-height: 40px; padding: 0 8px; border: 0; border-radius: 8px; background: #f1f2ee; color: #3d4741; cursor: pointer; font-weight: 700; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crm-stagebar ol button.done { background: #dbe7df; color: var(--forest); }
.crm-stagebar ol button.cur { background: var(--forest); color: #fff; }
.crm-stage-end { display: flex; gap: 6px; }
.crm-closedbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 10px 14px; border-radius: 10px; background: #f1f2ee; }
.crm-closedbar.won { background: #dcefe2; color: #1f5c38; }
.crm-closedbar.lost { background: #f3e7e5; color: #7a2a20; }
.crm-stepform { display: flex; flex-wrap: wrap; align-items: end; gap: 8px; }
.crm-stepform label { display: grid; gap: 4px; flex: 1 1 200px; color: #3a4841; font-size: 13px; font-weight: 700; }
.crm-stepform input { min-height: 40px; }
.crm-stepform input[type="date"] { max-width: 190px; }
/* Talks are where the manager acts (listen, note, chat): the wider column. Facts on the left stay compact. */
.crm-step { grid-template-columns: minmax(0, 1fr) auto; align-items: center; border-color: #ecd27a; background: #fdf8e4; }
.crm-step .crm-stepform { grid-column: 1 / -1; }
.crm-step-body { display: grid; gap: 3px; min-width: 0; }
.crm-step .crm-label { color: #6f5300; }
.crm-step-text { font-size: 16px; line-height: 1.35; }
.crm-step-text.late { color: #9b1c1c; }
.crm-step-text.none { color: #6f5300; font-weight: 650; }
.crm-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 18px; }
.crm-field { display: grid; grid-template-columns: 120px minmax(0, 1fr); align-items: center; gap: 10px; padding: 4px 0; border-bottom: 1px solid #eef0ea; }
.crm-field label { color: var(--muted); font-size: 13px; font-weight: 650; }
.crm-field input, .crm-field select, .crm-money-in select { min-height: 38px; padding: 0 8px; border-color: transparent; background: transparent; font-weight: 700; font-size: 14.5px; }
.crm-field input:hover, .crm-field select:hover { border-color: var(--line); background: #fff; }
.crm-field input:focus, .crm-field select:focus { border-color: var(--forest-2); background: #fff; }
.crm-field input::placeholder { color: #a2aaa3; font-weight: 500; }
.crm-field:first-child { grid-column: 1 / -1; }
.crm-money-in { display: grid; grid-template-columns: minmax(0, 1fr) 70px; gap: 4px; }
.crm-req { grid-template-columns: 56px minmax(0, 1fr) auto; }
.crm-req img { grid-row: auto; }
.crm-req-main { display: grid; gap: 2px; min-width: 0; }
.crm-table-wrap.flat { border: 0; border-radius: 0; background: none; }
.crm-table.static tbody tr { cursor: default; }
.crm-table.static tbody tr:hover td { background: none; }
.crm-note { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: end; }
.crm-note textarea { min-height: 40px; resize: vertical; }

/* Clients */
.crm-clients { display: grid; gap: 6px; }
.crm-clients-head, .crm-client-row { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, .9fr) 120px 96px minmax(0, 1.3fr) 140px 44px; gap: 12px; align-items: center; }
.crm-clients-head { padding: 0 14px 4px; color: var(--muted); font-size: 13px; font-weight: 700; }
.crm-client-row { padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.crm-client-who { display: grid; gap: 2px; min-width: 0; padding: 0; border: 0; background: none; color: var(--ink); cursor: pointer; text-align: left; font: inherit; }
.crm-client-who b { color: var(--forest-2); }
.crm-client-who .crm-sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crm-clienthead { display: flex; align-items: center; gap: 14px; min-width: 0; flex: 1 1 700px; }
.crm-clienthead > div { display: grid; gap: 5px; min-width: 0; }
.crm-bigav { display: grid; place-items: center; width: 56px; height: 56px; flex: none; border-radius: 16px; background: var(--forest); color: var(--lime); font-size: 20px; font-weight: 800; }
.crm-dl { display: grid; margin: 0; }
.crm-dl div { display: grid; gap: 2px; padding: 9px 0; border-bottom: 1px solid #eef0ea; }
.crm-dl dt { color: var(--muted); font-size: 13px; }
.crm-dl dd { margin: 0; font-size: 14.5px; font-weight: 700; overflow-wrap: anywhere; }

/* Phones: bottom bar with the CRM sections */
.crm-tabbar { display: none; }
@media (max-width: 1100px) {
  .crm-dealtop { grid-template-columns: minmax(0, 1fr); }
  .crm-fields { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .crm-clients-head { display: none; }
  .crm-client-row { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; }
  .crm-client-row .crm-cell { display: none; }
  .crm-client-row .crm-cell:last-child { display: block; grid-row: 1; grid-column: 2; }
  .crm-rec-more { grid-template-columns: minmax(0, 1fr); padding-left: 12px; }
  .crm-root .crm-only-sm { display: flex; }
  .crm-root .crm-back.crm-only-sm { display: inline-flex; }
}
@media (max-width: 760px) {
  .crm-tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); border-top: 1px solid var(--line); background: #fff; padding-bottom: env(safe-area-inset-bottom); }
  .crm-tabbar button { display: flex; align-items: center; justify-content: center; gap: 4px; min-width: 0; min-height: 56px; padding: 0 2px; border: 0; background: none; color: #3d4741; cursor: pointer; font-size: 13px; font-weight: 700; }
  .crm-tabbar button[aria-current="true"] { color: var(--forest); font-weight: 800; box-shadow: inset 0 3px 0 var(--forest); }
  .crm-tabbar [data-tab-badge] { padding: 0 6px; border-radius: 99px; background: #9b1c1c; color: #fff; font-size: 11.5px; }
  body.has-crm-tabbar .workspace { padding-bottom: 64px; }
  body.has-crm-tabbar .crm-pop { bottom: 72px; }
  .crm-tab-off { display: none; }
  .crm-pagehead h2, .crm-dealhead h2 { font-size: 22px; }
  .crm-pagehead select, .crm-filters select { flex: 1 1 140px; }
  .crm-hide-sm { display: none; }
  .crm-missed { grid-template-columns: minmax(0, 1fr) auto; }
  .crm-missed-when { grid-column: 1 / -1; display: flex; gap: 8px; }
  .crm-missed-act .crm-btn span { display: none; }
  .crm-rec-head, .crm-rec-deal, .crm-rec-who.mg, .crm-rec-who .crm-num { display: none; }
  .crm-rec-row, .crm-recs.nodeal .crm-rec-row { grid-template-columns: 34px minmax(0, 1fr) auto auto; grid-template-areas: "play title title title" "play who when dur"; gap: 2px 10px; padding: 6px 8px; }
  .crm-rec-play { grid-area: play; }
  .crm-rec-title { grid-area: title; }
  .crm-rec-dur { grid-area: dur; }
  .crm-rec-who.cl { grid-area: who; color: #3d4741; font-size: 12.5px; }
  .crm-rec-who.cl b { font-weight: 600; }
  .crm-rec-when { grid-area: when; font-size: 12px; }
  .crm-pager { justify-content: center; }
  .crm-sizes { display: none; }
  .crm-newdeal { grid-template-columns: minmax(0, 1fr); }
  .crm-dealhead { padding: 12px 14px; }
  .crm-callbar { position: fixed; left: 0; right: 0; bottom: 56px; z-index: 29; display: grid; grid-template-columns: minmax(0, 1.25fr) repeat(3, minmax(0, 1fr)); gap: 6px; padding: 8px 10px; border-top: 1px solid var(--line); background: #fff; }
  .crm-callbar .crm-btn { min-height: 44px; padding: 0 6px; gap: 5px; font-size: 13px; overflow: hidden; text-overflow: ellipsis; }
  .crm-callbar .crm-btn.crm-msg { font-size: 12.5px; }
  .crm-callbar .crm-btn.primary { grid-column: 1; grid-row: 1; }
  .crm-stagebar ol { grid-template-columns: repeat(6, minmax(96px, 1fr)); overflow-x: auto; }
  .crm-field { grid-template-columns: 100px minmax(0, 1fr); }
  .crm-step { grid-template-columns: minmax(0, 1fr); }
  .crm-dealstack { padding-bottom: 64px; }
  .crm-note { grid-template-columns: minmax(0, 1fr); }
  .crm-talks-head .crm-seg { display: flex; flex: 1 1 100%; }
  .crm-talks-head .crm-seg button { flex: 1; }
  .crm-sidetabs { flex: 1 1 100%; }
  .crm-sidetabs button { flex: 1; }
}
.crm-histitem { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 10px 12px; border: 1px solid #eef0ea; border-radius: 10px; }
.crm-histitem > span:first-child { min-width: 0; }
.crm-stagebar ol { min-width: 0; }
.crm-dealhead h2 { overflow-wrap: anywhere; }
.crm-root .crm-stage-select { display: none; }
@media (max-width: 760px) {
  .crm-dealhead-main, .crm-clienthead { flex-basis: 100%; }
  .crm-root .crm-stage-select { display: flex; align-items: center; gap: 8px; flex: 1 1 100%; font-weight: 700; color: #3a4841; }
  .crm-stage-select select { min-height: 44px; font-weight: 800; }
  .crm-stagebar ol { display: none; }
  .crm-stage-end { flex: 1 1 100%; }
  .crm-stage-end .crm-btn { flex: 1; min-height: 40px; }
}

/* Quiet deals: monthly review banner */
.crm-alert.info { background: #e6efe9; color: var(--ink, #183b2b); }
.crm-root .crm-alert.info { margin: 0 0 14px; }
.crm-root .crm-deal-flag.closing { color: #8a5a00; }

/* ---------- Закупівля: the buyers' shared queue (buy.js) and machines on a deal ---------- */
.crm-pill.buy-violet { background: #ece6f7; color: #4b2f86; }
.crm-pill.buy-violet.due { background: #fde2e2; color: var(--danger); }
.crm-pill.buy-wait { background: #eef0ea; color: #3d4741; }
.buy-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.buy-head h2 { margin: 0; font-size: 18px; }
.buy-root a { color: var(--forest-2); font-weight: 650; }
.buy-head h2 .muted { font-weight: 600; font-size: 14px; }
.buy-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, 460px); gap: 16px; align-items: start; }
.buy-list { display: grid; gap: 14px; min-width: 0; }
.buy-group { display: grid; gap: 8px; }
.buy-group h3 { margin: 0; font-size: 14px; color: #3d4741; }
.buy-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; }
.buy-row.on { border-color: #4b2f86; box-shadow: inset 0 0 0 1px #4b2f86; }
.buy-row-main { display: grid; gap: 3px; min-width: 0; }
.buy-row-main b { font-size: 14.5px; }
.buy-row-side { display: grid; justify-items: end; align-content: start; gap: 6px; }
.buy-ask { color: #3d4741; font-size: 13px; }
.buy-ask.big { padding: 10px 12px; border-radius: 8px; background: #f6f7f2; font-size: 13.5px; }
.buy-card { position: sticky; top: 12px; }
.buy-card.empty { min-height: 160px; place-content: center; text-align: center; }
.buy-card-head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: start; }
.buy-card-head > div { display: grid; gap: 3px; min-width: 0; justify-items: start; }
.buy-card-who { display: block; }
.buy-card-head h2 { margin: 2px 0 4px; font-size: 19px; }
.buy-card-head a { font-size: 13px; font-weight: 700; }
.buy-price { font-size: 17px; }
.buy-seller { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; align-items: end; }
.buy-seller .buy-field:first-child { grid-column: 1 / -1; }
.buy-contacts, .buy-chat { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; }
.buy-contacts > p, .buy-chat > p { margin: 0; }
.buy-contact-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.buy-contact-acts .crm-btn { flex: 1 1 180px; justify-content: center; text-align: center; }
.buy-chat-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; }
.buy-chat-list { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.buy-chat-list li { display: grid; gap: 2px; max-width: 92%; padding: 8px 10px; border-radius: 10px; background: #f6f7f2; font-size: 13.5px; line-height: 1.4; overflow-wrap: anywhere; justify-self: start; }
.buy-chat-list li.mine { justify-self: end; background: #e3efe6; }
.buy-reply { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: end; }
.buy-reply .wide { grid-column: 1 / -1; }
.buy-cur { display: grid; place-items: center; color: var(--ink); font-size: 14px; font-weight: 800; }
.buy-more { border-top: 1px solid #eef0ea; padding-top: 10px; }
.buy-more > summary { cursor: pointer; color: var(--forest-2); font-size: 13.5px; font-weight: 700; }
.buy-more[open] > summary { margin-bottom: 10px; }
.buy-more > .buy-fields { margin-top: 10px; }
.buy-deal { color: #3d4741; }
.buy-seller .crm-row { grid-column: 1 / -1; justify-content: flex-start; }
.buy-checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 12px; margin: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; }
.buy-checks legend { padding: 0 4px; color: var(--muted); font-size: 12px; font-weight: 700; }
.buy-checks label { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
.buy-checks input { flex: none; width: 18px; height: 18px; min-height: 0; margin: 0; padding: 0; accent-color: var(--forest); }
.buy-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.buy-field { display: grid; gap: 4px; color: var(--muted); font-size: 12px; font-weight: 700; }
.buy-field.wide { grid-column: 1 / -1; }
.buy-field input, .buy-field select, .buy-field textarea { min-height: 38px; padding: 6px 8px; color: var(--ink); font: inherit; font-size: 14px; font-weight: 600; }
.buy-money { display: grid; grid-template-columns: minmax(0, 1fr) 64px; gap: 4px; }
.buy-actions { display: flex; flex-wrap: wrap; gap: 8px; }
/* Action buttons of a request: one row of equal buttons, each says underneath what it does. */
.buy-acts { display: grid; gap: 8px; }
.buy-acts > b { color: var(--ink); font-size: 13.5px; }
.buy-acts-grid { display: grid; grid-template-rows: auto auto; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px 8px; }
.buy-act { display: grid; grid-row: span 2; grid-template-rows: subgrid; gap: 4px; min-width: 0; }
.buy-act .crm-btn { width: 100%; min-width: 0; min-height: 44px; padding: 4px 8px; justify-content: center; line-height: 1.2; text-align: center; white-space: normal; }
.buy-act > span { color: #6b746d; font-size: 12px; line-height: 1.3; text-align: center; }
.buy-actions .crm-btn.primary, .buy-actions .crm-btn.won { flex: 1 1 220px; justify-content: center; }
.buy-log { display: grid; gap: 0; padding-top: 10px; border-top: 1px solid #eef0ea; color: #3d4741; font-size: 13px; }
.buy-log > b { color: var(--ink); font-size: 13.5px; }
.buy-log > .crm-small { padding: 2px 0 6px; }
.buy-log-row { display: grid; grid-template-columns: 92px minmax(0, 1fr) auto; gap: 8px; align-items: baseline; padding: 6px 0; border-top: 1px solid #eef0ea; line-height: 1.35; overflow-wrap: anywhere; }
.buy-tag { color: #6b746d; font-size: 11.5px; white-space: nowrap; }
.buy-tag.sent { padding: 1px 7px; border-radius: 99px; background: #dcefe2; color: #1f5c38; font-weight: 800; }
.buy-slot { display: contents; }
/* «Збережено в журнал» + «Повідомити в чат угоди»: only the employee's words reach the chat. */
.buy-tell { display: grid; gap: 8px; padding: 12px; border: 1px solid #cfdf8f; border-radius: 10px; background: #eef5d0; }
.buy-tell-head { color: var(--ink); font-size: 13.5px; line-height: 1.4; overflow-wrap: anywhere; }
.buy-tell .buy-field { color: #3d4741; }
.buy-tell textarea { border: 1px solid #cfdf8f; border-radius: 8px; background: #fff; resize: vertical; }
.buy-tell > .crm-small { color: #3d4741; }
.buy-tell-acts { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px; }
.buy-tell-acts .crm-btn { justify-content: center; }
.buy-tell-acts .crm-btn:not(.primary) { border-color: #cfdf8f; background: transparent; }
/* «Цього продавця зараз веде …»: two buyers do not ask one seller without agreeing. */
.buy-clash { display: grid; gap: 4px; padding: 10px 12px; border: 1px solid #e8c766; border-radius: 9px; background: #fff4d6; color: #4a3a00; font-size: 13.5px; line-height: 1.4; }
.buy-clash-links { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.buy-clash .crm-link-strong { color: #4a3a00; font-weight: 800; }
.buy-clash-pill { justify-self: start; padding: 2px 8px; border: 1px solid #e8c766; border-radius: 99px; background: #fff4d6; color: #4a3a00; font-size: 12.5px; font-weight: 800; }
/* «Усі оброблені»: the buyers' base of answered requests. */
.crm-pill.buy-bought { background: var(--forest); color: #dff35b; }
.buy-grid.buy-base { grid-template-columns: minmax(0, 1fr); }
.buy-base .buy-card { position: static; width: 100%; max-width: 760px; }
.done-filters { display: grid; grid-template-columns: minmax(0, 1fr) repeat(4, auto); gap: 10px; }
.done-filters select { min-height: 42px; max-width: 220px; padding: 0 10px; border: 1px solid var(--line); border-radius: 9px; background: #fff; font: inherit; font-size: 14px; }
.done-totals { display: flex; flex-wrap: wrap; gap: 4px 18px; padding: 10px 14px; border-radius: 10px; background: #f6f7f2; color: #3d4741; font-size: 13.5px; }
.done-totals b { color: var(--ink); }
.done-list { display: grid; gap: 0; min-width: 0; padding: 12px 14px; }
.done-row { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, .9fr) minmax(0, 1.5fr) 132px minmax(0, 1.1fr); gap: 12px; align-items: center; min-height: 64px; padding: 8px 10px; border-bottom: 1px solid #eef0ea; font-size: 13px; cursor: pointer; }
.done-row:hover { background: #fafaf7; }
.done-row > div { display: grid; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.done-row > .done-machine { grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: center; }
.done-machine > div { display: grid; gap: 2px; min-width: 0; }
.done-found .crm-pill { justify-self: start; }
.done-headrow { min-height: 34px; background: #f6f7f2; color: #5c665f; font-size: 11.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; cursor: default; }
.done-headrow:hover { background: #f6f7f2; }
.done-foot { margin: 0; padding: 10px 10px 0; }
.buy-tabs { overflow-x: auto; padding-bottom: 2px; }
/* «Продавці техніки»: the sellers the buyers asked machines from. */
.sell-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; }
.sell-filters .sell-search { flex: 1 1 100%; }
.sell-filters select.on { border-color: #4b2f86; background: #faf8fd; color: #4b2f86; font-weight: 700; }
.sell-totals { margin-bottom: 12px; }
.sell-totals .bad b { color: #a4361b; }
.sell-totals .good b { color: #1f5c38; }
.sell-search input { width: 100%; min-height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: 9px; background: #fff; font: inherit; font-size: 14px; }
.sell-grid { grid-template-columns: minmax(0, 1fr) minmax(320px, 400px); }
.sell-filters select { flex: 0 1 auto; width: auto; max-width: 100%; min-height: 40px; padding: 0 10px; border: 1px solid var(--line); border-radius: 9px; background: #fff; font: inherit; font-size: 14px; }
.sell-list { display: grid; gap: 0; align-content: start; min-width: 0; padding: 12px 14px; }
.sell-row { display: grid; grid-template-columns: minmax(0, 1fr) 268px 132px; gap: 10px; align-items: center; min-height: 58px; padding: 8px 10px; border: 2px solid transparent; border-bottom: 1px solid #eef0ea; font-size: 13px; cursor: pointer; }
.sell-row:hover { background: #fafaf7; }
.sell-row.on { margin: 4px 0; border-color: #4b2f86; border-radius: 10px; background: #faf8fd; }
.sell-headrow { min-height: 34px; background: #f6f7f2; color: #5c665f; font-size: 11.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; cursor: default; }
.sell-headrow:hover { background: #f6f7f2; }
.sell-who, .sell-asked, .sell-last { display: grid; gap: 2px; min-width: 0; }
.sell-who > b, .sell-asked > b { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; font-size: 14px; line-height: 1.25; overflow-wrap: anywhere; }
.sell-who .crm-sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sell-asked .crm-sub { overflow-wrap: anywhere; }
.sell-who .crm-sub b { font-size: inherit; color: var(--ink); }
.sell-last { justify-items: start; }
.sell-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 3px; }
.sell-chips .sell-chip { padding: 1px 7px; font-size: 11.5px; }
.sell-nums { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; text-align: center; }
.sell-num.deal { background: #e8eef9; color: #2a4a86; }
.buy-facts { display: grid; gap: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fbfcf8; }
.buy-facts > b { padding-bottom: 6px; }
.buy-fact { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 10px; padding: 6px 0; border-top: 1px solid #eef0ea; font-size: 13.5px; }
.buy-fact > span { color: #5c665f; }
.buy-fact > b { font-weight: 600; overflow-wrap: anywhere; }
@media (max-width: 700px) { .buy-fact { grid-template-columns: 1fr; gap: 2px; } }
.sell-item.sell-req { cursor: default; grid-template-columns: 96px minmax(0, 1fr); align-items: start; gap: 12px; padding: 11px 0; }
.sell-req-body { display: grid; gap: 3px; min-width: 0; }
.sell-req .sell-item-top { flex-wrap: wrap; gap: 4px 10px; }
.sell-req .sell-item-top b { flex: 1 1 170px; }
.sell-req-pic { display: block; padding: 0; border: 0; background: none; cursor: default; }
button.sell-req-pic { cursor: pointer; }
button.sell-req-pic:hover .crm-photo { outline: 2px solid #2a4a86; outline-offset: 1px; }
.sell-req .crm-photo.md { width: 96px; height: 72px; border-radius: 9px; }
@media (max-width: 700px) {
  .sell-item.sell-req { grid-template-columns: 88px minmax(0, 1fr); gap: 10px; }
  .sell-req .crm-photo.md { width: 88px; height: 66px; }
}
.sell-req:hover b { text-decoration: none; }
.sell-req .crm-sub b { color: var(--ink); font-weight: 700; }
.sell-req-acts { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 2px; }
.sell-req-acts .crm-link { padding: 0; border: 0; background: none; color: #2a4a86; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.sell-req-acts .crm-link:hover { text-decoration: underline; }
.sell-contacts-head { margin-top: 6px; }
.sell-last > b { font-size: 13.5px; }
.sell-headrow > span { overflow-wrap: anywhere; }
.sell-headrow .sell-nums { font-size: 10.5px; letter-spacing: 0; }
.sell-num { display: grid; justify-items: center; gap: 0; padding: 4px 2px; border-radius: 8px; background: #f3f5ef; line-height: 1.1; }
.sell-num b { font-size: 18px; font-variant-numeric: tabular-nums; }
.sell-num i { color: #5c665f; font-size: 11px; font-style: normal; }
.sell-num small { color: #1f5c38; font-size: 10.5px; font-weight: 700; }
.sell-num.zero { background: none; color: #a3aaa4; }
.sell-num.zero i { color: #a3aaa4; }
.sell-num.bad { background: #fbe9e3; color: #a4361b; }
.sell-num.good { background: #dcefe2; color: #1f5c38; }
.sell-headrow .sell-nums span { display: block; }
.sell-row:not(.sell-headrow) .sell-num i { display: none; }
.sell-chip { padding: 2px 8px; border: 1px dashed #d9a074; border-radius: 99px; background: #fff; color: #9a3a05; font-size: 12px; font-weight: 700; text-decoration: line-through; }
.sell-chip.has { border: 1px solid transparent; background: #dcefe2; color: #1f5c38; font-weight: 800; text-decoration: none; }
.sell-foot { margin: 0; padding: 10px 10px 2px; }
.sell-card h2 { margin: 0 0 2px; font-size: 19px; }
.sell-fields .wide { grid-column: 1 / -1; }
.sell-items { display: grid; gap: 0; }
.sell-items-head { padding-bottom: 6px; color: #5c665f; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; }
.sell-item { display: grid; gap: 2px; width: 100%; padding: 9px 0; border: 0; border-top: 1px solid #eef0ea; background: none; color: var(--ink); font: inherit; font-size: 13.5px; text-align: left; cursor: pointer; }
.sell-item:hover b { text-decoration: underline; }
div.sell-item { cursor: default; }
div.sell-item:hover b { text-decoration: none; }
.sell-item-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.sell-item-top b { min-width: 0; overflow-wrap: anywhere; }
.sell-item-top b span { white-space: nowrap; }
.sell-item-top .crm-pill { flex: none; }

/* «Пропозиції клієнту»: machines offered on a deal, one card each (Mark 2026-11-17). */
.crm-photo { position: relative; display: grid; flex: none; width: 84px; height: 64px; place-items: center; overflow: hidden; border-radius: 8px; background: #e8ebe4; color: #6b746d; font-size: 11.5px; font-weight: 700; }
.crm-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.crm-photo.sm { width: 60px; height: 46px; border-radius: 7px; font-size: 10.5px; }
.crm-photo.lg { width: 132px; height: 100px; border-radius: 10px; }
.crm-offer-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr)); gap: 12px; align-items: start; }
.crm-offer { display: grid; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.crm-offer.off { background: #fafaf7; }
.crm-offer a { color: var(--forest-2); font-weight: 700; }
.crm-offer-top { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: start; }
.crm-offer-main { display: grid; gap: 3px; min-width: 0; }
.crm-offer-main > b { font-size: 15px; line-height: 1.3; overflow-wrap: anywhere; }
.crm-offer-status { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 2px; }
.crm-offer-prices { display: grid; gap: 1px; justify-items: end; text-align: right; }
.crm-offer-prices > b { font-size: 15px; white-space: nowrap; }
.crm-offer-prices > s { white-space: nowrap; color: #8a938c; }
.crm-offer-prices label { display: grid; gap: 3px; justify-items: end; margin-top: 5px; }
.crm-offer-price { display: inline-flex; align-items: center; gap: 5px; color: var(--ink); font-size: 14.5px; font-weight: 800; }
.crm-offer-price input { width: 112px; min-height: 36px; padding: 0 8px; border: 1px solid #b9c1b6; border-radius: 8px; font: inherit; text-align: right; }
.crm-offer-price input::placeholder { font-weight: 600; }
.crm-offer-answer, .crm-offer-ask { margin: 0; padding: 8px 10px; border-radius: 8px; font-size: 13.5px; line-height: 1.4; overflow-wrap: anywhere; }
.crm-offer-answer { background: #f1f6ee; }
.crm-offer-ask { background: #f6f7f3; }
.crm-offer-note { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 8px 10px; border: 1px solid #eef0ea; border-radius: 8px; font-size: 13.5px; line-height: 1.4; }
.crm-offer-note > span { min-width: 0; overflow-wrap: anywhere; }
.crm-offer-note .crm-link-strong { flex: none; font-size: 13px; }
.crm-offer-form { display: grid; gap: 8px; padding: 10px; border-radius: 8px; background: #f6f7f3; }
.crm-offer-form label { display: grid; gap: 4px; color: #3a4841; font-size: 13px; font-weight: 700; }
.crm-offer-form input { min-height: 38px; padding: 0 10px; font: inherit; font-size: 14px; font-weight: 400; }
.crm-offer-acts { flex-wrap: wrap; justify-content: flex-start; gap: 6px; }
.crm-btn.on { border-color: var(--forest); background: #dbe7df; color: var(--forest); font-weight: 800; }
.crm-btn.danger-text { border-color: transparent; background: transparent; color: #9b1c1c; }
.crm-btn.danger-text:hover { background: #fbeceb; }
/* A request to the buyers on «Головна»: photo, country, seller, then what the buyer said. */
.crm-buyreq { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: start; padding: 10px 0; border-top: 1px solid #eef0ea; }
.crm-buyreq-main { display: grid; gap: 2px; min-width: 0; }
.crm-buyreq-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; min-width: 0; }
.crm-buyreq-top .crm-home-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crm-buyreq-top .crm-num { flex: none; font-size: 13.5px; white-space: nowrap; }
.crm-buyreq-place, .buy-place { color: #3d4741; font-size: 13px; line-height: 1.35; overflow-wrap: anywhere; }
.crm-buyreq-place b, .buy-place b { color: var(--ink); }
.crm-buyreq-note { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 700; }
.crm-buyreq-note.green { color: #1f5c38; }
.crm-buyreq-note.red { color: #9b1c1c; }
.crm-buyreq-note.violet { color: #4b2f86; }
.crm-buyreq-note.amber { color: #7a5a00; }
.crm-buyreq-note.grey { color: #3d4741; }
.crm-buyreq-acts { justify-content: flex-start; gap: 6px; margin-top: 5px; }
.crm-offers-status { margin: 0; color: #4f5b55; }
.crm-offer-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px 12px; }
@media (max-width: 560px) {
  .crm-offer-top { grid-template-columns: auto minmax(0, 1fr); }
  .crm-buyreq-top { align-items: start; }
  .crm-buyreq-top .crm-home-title { white-space: normal; overflow-wrap: anywhere; }
  .crm-offer-prices { grid-column: 1 / -1; grid-template-columns: auto auto; justify-content: space-between; align-items: center; justify-items: start; text-align: left; gap: 4px 10px; }
  .crm-offer-prices label { grid-column: 1 / -1; grid-template-columns: auto auto; align-items: center; justify-content: space-between; justify-items: start; margin-top: 0; }
}
.crm-itemform { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 2fr) 110px 72px; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #f6f7f2; }
.crm-itemform input, .crm-itemform select, .crm-itemform textarea { min-height: 38px; padding: 6px 8px; font: inherit; font-size: 14px; }
.crm-itemform .wide { grid-column: 1 / -1; }
.crm-itemform input[name="supplier"] { grid-column: 2 / -1; }
.crm-itemform .crm-row { grid-column: 1 / -1; justify-content: flex-end; }

@media (max-width: 900px) {
  .buy-grid { grid-template-columns: minmax(0, 1fr); }
  .buy-card { position: static; }
  .buy-row { grid-template-columns: auto minmax(0, 1fr); }
  .sell-filters select { flex: 1 1 calc(50% - 8px); min-width: 0; }
  .sell-row.sell-headrow { display: none; }
  .sell-grid { grid-template-columns: minmax(0, 1fr); }
  .sell-row { grid-template-columns: minmax(0, 1fr); gap: 6px 10px; }
  .sell-row .sell-asked, .sell-row .sell-nums { grid-column: 1 / -1; }
  .sell-row:not(.sell-headrow) .sell-num i { display: block; }
  .sell-row .sell-last { grid-column: 1 / -1; grid-auto-flow: column; justify-content: space-between; align-items: center; }
  .buy-row-side { grid-column: 1 / -1; }
  .buy-row-side { grid-auto-flow: column; justify-content: space-between; align-items: center; justify-items: start; }
  .buy-seller, .buy-checks, .buy-fields, .buy-reply { grid-template-columns: minmax(0, 1fr); }
  .buy-acts-grid { grid-template-rows: none; grid-auto-flow: row; gap: 4px; }
  .buy-act > span { padding-bottom: 6px; }
  .buy-log-row { grid-template-columns: minmax(0, 1fr) auto; }
  .buy-log-row > .crm-sub { grid-column: 1 / -1; }
  .buy-tell-acts { grid-template-columns: minmax(0, 1fr); }
  .buy-tell-acts .crm-btn.primary { order: -1; }
  .done-filters { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .done-filters .sell-search { grid-column: 1 / -1; }
  .done-filters select { max-width: none; min-width: 0; }
  .done-row.done-headrow { display: none; }
  .done-row { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; align-items: start; }
  .done-row .done-machine, .done-row .done-found, .done-row .done-deal { grid-column: 1 / -1; }
  .done-row .done-machine { grid-row: 1; }
  .done-row .done-seller { grid-row: 2; grid-column: 1; }
  .done-row .done-who { grid-row: 2; grid-column: 2; justify-items: end; text-align: right; }
  .done-row .done-found { grid-row: 3; }
  .done-row .done-deal { grid-row: 4; }
  .crm-photo.lg { width: 104px; height: 80px; }
  .crm-itemform { grid-template-columns: minmax(0, 1fr) 80px; }
  .crm-itemform > input:first-child, .crm-itemform > input[name="url"], .crm-itemform > select[name="country"], .crm-itemform > input[name="supplier"] { grid-column: 1 / -1; }
}
/* Deal page: the facts column is the narrow one, so rows stack the way they do on a phone. */

/* Deal fields still empty, auto notes folded, calls that are not equipment sales (2026-11-16) */
.crm-missing { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.crm-chip.warn { background: #fdf1c7; color: #4a3a00; }
.crm-chip.warn:hover, .crm-chip.warn:focus-visible { background: #f8e3a0; }
.crm-ok-text { color: var(--crm-ok); font-weight: 700; }
.crm-rec-deal.cat-grain { background: #f8ecd4; color: #7a4d0b; }
.crm-rec-deal.cat-internal { background: #eef0ea; color: var(--muted); }

/* Головна: «Мій день» (manager) and «Що горить» (head). */
.crm-home-head { align-items: flex-end; }
.crm-home-head > div { min-width: 0; }
.crm-home-all { font-size: 13.5px; white-space: nowrap; }
.crm-home-under { display: flex; margin-top: -4px; }
.crm-home-who { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; font-weight: 700; }
.crm-home-who select { width: auto; min-height: 38px; padding: 0 10px; font-size: 13.5px; font-weight: 650; }
.crm-home-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 400px); gap: 16px; align-items: start; }
.crm-home-col { display: grid; gap: 16px; min-width: 0; }
.crm-home-block { display: grid; gap: 2px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); min-width: 0; }
.crm-home-block-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; margin-bottom: 4px; }
.crm-home-block-head h3 { margin: 0; color: var(--ink); font-size: 16px; font-weight: 800; letter-spacing: 0; text-transform: none; }
.crm-home-empty { margin: 4px 0; }
.crm-home-row { display: grid; grid-template-columns: 116px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 9px 0; border-top: 1px solid #eef0ea; }
.crm-home-tag { justify-self: start; max-width: 100%; padding: 3px 9px; border-radius: 99px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 800; }
.crm-home-tag.red { background: #fde2e2; color: #9b1c1c; }
.crm-home-tag.amber { background: #fdf1c7; color: #6f5300; }
.crm-home-tag.blue { background: #e3edf8; color: #1e4e79; }
.crm-home-tag.green { background: #dcefe2; color: #1f5c38; }
.crm-home-tag.violet { background: #ece6f7; color: #4b2f86; }
.crm-home-tag.grey { background: #eef0ea; color: #3d4741; }
.crm-home-main { display: grid; gap: 2px; min-width: 0; }
.crm-home-title { overflow: hidden; padding: 0; border: 0; background: none; color: var(--ink); text-align: left; text-overflow: ellipsis; white-space: nowrap; font: inherit; font-size: 14.5px; font-weight: 750; }
button.crm-home-title { cursor: pointer; }
button.crm-home-title:hover { color: var(--forest); text-decoration: underline; }
.crm-home-main .crm-sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; }
.crm-home-act { display: flex; align-items: center; gap: 6px; }
.crm-home-block > .crm-btn.ghost { justify-self: start; margin-top: 4px; }
.crm-home-gap { display: flex; justify-content: space-between; gap: 8px; padding: 7px 0; border-top: 1px solid #eef0ea; }
.crm-home-block > p.crm-small:last-child { margin: 8px 0 0; }
.crm-home-mgr { display: grid; grid-template-columns: minmax(0, 1fr) 56px 72px 60px; gap: 8px; align-items: center; width: 100%; padding: 8px 0; border: 0; border-top: 1px solid #eef0ea; background: none; color: var(--ink); text-align: left; font: inherit; font-size: 13.5px; }
.crm-home-mgr > :not(:first-child) { text-align: right; }
.crm-home-mgr > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
button.crm-home-mgr:not(:disabled) { cursor: pointer; }
button.crm-home-mgr:not(:disabled):hover > span:first-child { color: var(--forest); text-decoration: underline; }
.crm-home-mgr.head { border-top: 0; color: var(--muted); font-size: 11.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.crm-home-mgr .bad { color: var(--danger); }
.crm-home-mgr .muted { color: var(--muted); }
.crm-home-head { flex-wrap: nowrap; align-items: flex-start; }
.crm-home-head .crm-home-who { flex: none; margin-top: 22px; }
.crm-home-side .crm-home-row { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; }
.crm-home-side .crm-home-tag { grid-column: 1 / -1; }
@media (max-width: 1100px) { .crm-home-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) {
  .crm-home-head { flex-wrap: wrap; }
  .crm-home-head .crm-home-who { width: 100%; margin-top: 0; }
  .crm-home-main .crm-sub { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; white-space: normal; }
  .crm-home-who select { flex: 1; min-width: 0; }
  .crm-home-block { padding: 12px; }
  .crm-home-row { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; }
  .crm-home-tag { grid-column: 1 / -1; }
  .crm-home-act .crm-btn { min-height: 44px; }
  .crm-home-mgr { grid-template-columns: minmax(0, 1fr) 44px 64px 52px; }
}
.crm-tabbar.six button { font-size: 12px; }

/* «Мій день» (Mark 2026-11-17): deal names read as links in every block. */
button.crm-home-title { color: var(--forest); text-decoration: underline; text-decoration-color: #b5cdc1; text-underline-offset: 3px; }
button.crm-home-title:hover { text-decoration-color: currentColor; }
.crm-home-group { margin: 8px 0 2px; color: var(--muted); font-size: 11.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
/* «Продажі компанії»: what the whole company agreed, is delivering and sold this month. */
.crm-sales { gap: 10px; }
.crm-sales-sum { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.crm-sales-tile { display: grid; gap: 1px; padding: 9px 12px; border-radius: 10px; min-width: 0; }
.crm-sales-tile span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.crm-sales-tile b { font-size: 17px; }
.crm-sales-tile em { font-size: 12.5px; font-style: normal; }
.crm-sales-tile.amber { background: #fdf1c7; color: #6f5300; }
.crm-sales-tile.blue { background: #e3edf8; color: #1e4e79; }
.crm-sales-tile.violet { background: #ece6f7; color: #4b2f86; }
.crm-sales-tile.green { background: #dcefe2; color: #1f5c38; }
.crm-sales-table { display: grid; min-width: 0; }
.crm-sales-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 190px) 110px 190px 100px; gap: 12px; align-items: center; padding: 8px 10px; border-top: 1px solid #eef0ea; min-width: 0; }
.crm-sales-row.head { border-top: 0; padding-block: 2px 4px; color: var(--muted); font-size: 11.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.crm-sales-row.mine { background: #f1f6ee; }
.crm-sales-row > b.crm-num, .crm-sales-row.head > :nth-child(3) { text-align: right; }
.crm-sales-mgr { overflow: hidden; color: #3d4741; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; }
.crm-sales > .crm-btn.ghost { justify-self: start; }
/* «Якість моїх угод»: what to ask in the next talk. */
.crm-quality { gap: 10px; }
.crm-quality-hot { margin: 0; padding: 10px 12px; border-radius: 10px; background: #f1f6ee; color: var(--ink); font-size: 14px; line-height: 1.45; }
.crm-quality-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.crm-quality-tile { display: grid; align-content: start; gap: 5px; min-width: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; }
.crm-quality-name { color: var(--ink); font-size: 13px; font-weight: 800; }
.crm-quality-have { color: var(--muted); font-size: 12.5px; }
.crm-quality-have b { margin-right: 3px; color: var(--ink); font-size: 19px; }
.crm-quality-bar { width: 100%; height: 6px; overflow: hidden; border: 0; border-radius: 99px; background: #eef0ea; appearance: none; }
.crm-quality-bar::-webkit-progress-bar { border-radius: 99px; background: #eef0ea; }
.crm-quality-bar::-webkit-progress-value { border-radius: 99px; background: #2f7d4f; }
.crm-quality-bar::-moz-progress-bar { border-radius: 99px; background: #2f7d4f; }
.crm-quality-bar.mid::-webkit-progress-value { background: #b58900; }
.crm-quality-bar.mid::-moz-progress-bar { background: #b58900; }
.crm-quality-bar.low::-webkit-progress-value { background: #c2410c; }
.crm-quality-bar.low::-moz-progress-bar { background: #c2410c; }
.crm-quality-ask { display: grid; gap: 2px; min-width: 0; }
.crm-quality-ask .crm-home-title { font-size: 12.5px; }
/* «Відкрити N угод без цього →»: the board with the quality filter (Mark 2026-11-20, «24А»). */
.crm-quality-go { justify-self: start; min-height: 30px; padding: 2px 0; border: 0; background: none; color: var(--forest); font: inherit; font-size: 13px; font-weight: 800; text-align: left; cursor: pointer; }
.crm-quality-go:hover, .crm-quality-go:focus-visible { text-decoration: underline; }
.crm-quality-all { justify-self: start; }
/* Colleagues who talked to the manager's client. */
.crm-home-others { border-color: #cfdcec; background: #e9f0f8; }
.crm-home-other { display: grid; gap: 4px; padding: 9px 0; border-top: 1px solid #cfdcec; min-width: 0; }
.crm-home-other-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; }
.crm-home-talk { display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 4px 8px; border: 0; border-radius: 8px; background: #fff; color: var(--ink); text-align: left; font: inherit; font-size: 13.5px; }
button.crm-home-talk { cursor: pointer; }
button.crm-home-talk:hover, button.crm-home-talk:focus-visible { box-shadow: inset 0 0 0 1px #1e4e79; }
.crm-home-talk .crm-rec-play { flex: none; width: 24px; height: 24px; background: #1e4e79; color: #fff; }
.crm-home-talk .crm-rec-play svg { width: 11px; height: 11px; }
/* What the manager still has to ask the client, next to «Що далі?». */
.crm-ask { margin: 0; padding: 7px 10px; border-radius: 8px; background: rgba(255, 255, 255, .7); color: #3d4741; font-size: 13px; line-height: 1.45; }
.crm-ask b { color: var(--ink); font-size: inherit; }
@media (max-width: 1100px) {
  .crm-sales-row { grid-template-columns: minmax(0, 1fr) minmax(0, 150px) 100px 170px; }
  .crm-sales-row > :nth-child(5) { display: none; }
}
@media (max-width: 760px) {
  .crm-sales-sum, .crm-quality-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .crm-sales-row { grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; padding-inline: 0; }
  .crm-sales-row.head { display: none; }
  .crm-sales-row.mine { padding-inline: 8px; border-radius: 8px; }
  .crm-sales-row > :nth-child(1) { grid-column: 1; grid-row: 1; }
  .crm-sales-row > :nth-child(3) { grid-column: 2; grid-row: 1; }
  .crm-sales-row > :nth-child(2) { grid-column: 1; grid-row: 2; }
  .crm-sales-row > :nth-child(4) { grid-column: 2; grid-row: 2; justify-self: end; }
  .crm-home-talk { min-height: 44px; }
  /* On a phone the manager's own list comes first; the company's sales follow it. */
  .crm-home { display: flex; flex-direction: column; }
  .crm-home > * { min-width: 0; }
  .crm-home > .crm-sales { order: 1; }
}

/* «Що далі?» after a conversation: the step the call promised, one tap to save. */
.crm-next { gap: 10px; border-color: #ecd27a; background: #fdf8e4; }
.crm-next-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.crm-next-head .crm-label { color: #6f5300; }
.crm-next-x { width: 32px; height: 32px; flex: 0 0 auto; border: 0; border-radius: 8px; background: transparent; color: #6f5300; font-size: 20px; line-height: 1; cursor: pointer; }
.crm-next-x:hover, .crm-next-x:focus-visible { background: #f5e8bd; }
.crm-next-body { display: grid; gap: 4px; min-width: 0; }
.crm-next-src { justify-self: start; padding: 2px 8px; border-radius: 999px; background: #f1f2ee; color: #4b5650; font-size: 12px; font-weight: 750; }
.crm-next-src.ai { background: #ece6f7; color: #4b2f86; }
.crm-next-step { color: var(--ink); font-size: 17px; line-height: 1.35; overflow-wrap: anywhere; }
.crm-next .crm-row { justify-content: flex-start; flex-wrap: wrap; gap: 8px; }
.crm-next-due { color: #6f5300; font-weight: 750; }
.crm-next-more { margin: 0; padding-left: 18px; color: #3a4841; font-size: 13px; }
.crm-next .crm-small { margin: 0; }
@media (max-width: 760px) {
  .crm-next .crm-row .crm-btn { flex: 1 1 auto; min-height: 44px; }
  .crm-next-step { font-size: 16px; }
}
.crm-stepform label:first-of-type { flex: 2 1 280px; }
/* On phones the CRM tab bar (and a deal's call bar) sit at the bottom: keep messages above them. */
@media (max-width: 760px) {
  body:has(#crm-tabbar) .toast { left: 16px; right: 16px; bottom: calc(72px + env(safe-area-inset-bottom)); max-width: none; z-index: 50; }
  body:has(#crm-tabbar):has(.crm-callbar) .toast { bottom: calc(130px + env(safe-area-inset-bottom)); }
}

/* ---------- «Чати»: the team chat inside each deal (2026-11-17) ---------- */
.crm-chatpeek { display: grid; gap: 6px; }
.crm-chatpeek p { margin: 0; }
.crm-chatpeek .crm-sub { display: inline; }
.crm-pill.violet { background: #ece6f7; color: #4b2f86; }
.crm-tabbar [data-tab-chat] { padding: 0 6px; border-radius: 99px; background: #4b2f86; color: #fff; font-size: 11.5px; }
.chat-page { display: grid; grid-template-columns: minmax(250px, 320px) minmax(0, 1fr) minmax(220px, 280px); height: calc(100vh - 150px); min-height: 460px; border: 1px solid var(--line); border-radius: 14px; background: #fff; overflow: hidden; }
.chat-list { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--line); background: #fbfcfa; }
.chat-list-head { display: grid; gap: 8px; padding: 14px 14px 10px; border-bottom: 1px solid var(--line); }
.chat-list-head h2 { margin: 0; font-size: 18px; }
.chat-list-head input { width: 100%; min-height: 38px; padding: 0 10px; border: 1px solid var(--line); border-radius: 9px; background: #fff; font: inherit; }
.chat-rows { flex: 1; overflow-y: auto; }
.chat-empty { padding: 14px; }
.chat-row { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 10px; align-items: center; width: 100%; padding: 10px 14px; border: 0; border-bottom: 1px solid #edf0ea; background: none; color: var(--ink); cursor: pointer; text-align: left; font: inherit; }
.chat-row:hover, .chat-row:focus-visible { background: #f1f4ee; }
.chat-row.on { background: #e8efe6; box-shadow: inset 3px 0 0 var(--forest); }
.chat-row-main { min-width: 0; }
.chat-row-main b, .chat-row-main .crm-sub { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.chat-row-main b { display: block; font-size: 13.5px; }
.chat-row-side { display: grid; justify-items: end; gap: 4px; }
.chat-ava { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: #e3ebe0; color: var(--forest); font-size: 12.5px; font-weight: 800; }
.chat-badge { min-width: 20px; padding: 1px 6px; border-radius: 99px; background: var(--forest); color: #fff; font-size: 11.5px; font-weight: 800; text-align: center; }
.chat-badge.at { background: #4b2f86; }
.chat-thread { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.chat-thread.empty { align-items: center; justify-content: center; padding: 24px; }
.chat-thread-head { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.chat-thread-head > div { flex: 1; min-width: 0; }
.chat-thread-head b { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.chat-thread-head .crm-back { margin: 0; }
.chat-msgs { flex: 1; display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 16px; overflow-y: auto; list-style: none; background: #f6f8f4; }
.chat-msg { align-self: flex-start; display: grid; gap: 3px; max-width: min(560px, 82%); padding: 8px 12px; border: 1px solid var(--line); border-radius: 4px 14px 14px 14px; background: #fff; }
.chat-line { display: flex; align-items: flex-end; gap: 8px; max-width: min(600px, 88%); }
.chat-line.mine { align-self: flex-end; }
.chat-line > .chat-msg { max-width: 100%; }
.chat-msg-ava { width: 30px; height: 30px; font-size: 11px; }
.chat-person { display: flex; align-items: center; gap: 8px; }
.chat-person .chat-msg-ava { width: 26px; height: 26px; font-size: 10px; }
.chat-msg.mine { align-self: flex-end; border-color: #cfe0cf; border-radius: 14px 4px 14px 14px; background: #e3efe1; }
.chat-who { color: var(--muted); font-size: 11.5px; font-weight: 700; }
.chat-text { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.45; }
.chat-at { color: #4b2f86; }
.chat-ref { display: inline-flex; align-items: center; gap: 4px; width: fit-content; padding: 1px 8px; border-radius: 99px; background: #eef2fb; color: var(--crm-info, #2c5d8f); font-size: 12px; font-weight: 700; }
.chat-event { align-self: center; max-width: 90%; padding: 3px 10px; border-radius: 99px; background: #eceee9; color: #4f5a53; font-size: 12px; text-align: center; }
.chat-verdict { align-self: center; box-sizing: border-box; display: grid; gap: 4px; width: min(620px, 100%); margin: 2px auto; padding: 10px 14px; border: 1px solid var(--line); border-left: 5px solid #8a948d; border-radius: 10px; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.chat-verdict.bad { border-left-color: #c0392b; background: #fdf1ef; }
.chat-verdict.ok { border-left-color: #2e7d32; background: #eef7ec; }
.chat-verdict.wait { border-left-color: #c98a00; background: #fdf6e3; }
.chat-verdict-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.chat-verdict-head b { font-size: 14.5px; }
.chat-verdict.bad .chat-verdict-head b { color: #a3271a; }
.chat-verdict.ok .chat-verdict-head b { color: #1f6324; }
.chat-verdict.wait .chat-verdict-head b { color: #7a5400; }
.chat-verdict-item { font-weight: 700; color: var(--ink); }
.chat-verdict-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; line-height: 1.45; }
.chat-compose { display: grid; gap: 8px; padding: 10px 16px 14px; border-top: 1px solid var(--line); background: #fff; }
.chat-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.chat-menu { top: auto; bottom: calc(100% + 4px); left: 0; right: auto; max-height: 280px; overflow-y: auto; }
.chat-menu { min-width: 270px; }
.chat-menu button { white-space: nowrap; }
.chat-menu .crm-sub { display: inline; margin-left: 4px; }
.chat-x { padding: 0 2px; border: 0; background: none; color: inherit; cursor: pointer; font-size: 15px; line-height: 1; }
.chat-input { display: flex; align-items: flex-end; gap: 8px; }
.chat-input textarea { flex: 1; min-height: 44px; max-height: 160px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; resize: vertical; }
.chat-only-sm { display: none; }
.chat-group { margin: 0; padding: 10px 14px 4px; color: var(--muted); font-size: 11.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.chat-hash { background: #e8efe6; color: var(--forest); font-weight: 800; font-size: 17px; }
.chat-add { margin: 6px 0 8px; }
.chat-add-menu { display: grid; gap: 2px; box-sizing: border-box; max-width: 100%; margin: 6px 0 8px; padding: 6px; border: 1px solid var(--line); border-radius: 10px; background: #fbfcfa; }
.chat-add-menu > .crm-sub { padding: 2px 6px 4px; }
.chat-add-menu button { display: flex; align-items: center; gap: 8px; padding: 6px; border: 0; border-radius: 8px; background: none; color: var(--ink); cursor: pointer; text-align: left; font: inherit; font-size: 13px; }
.chat-add-menu button:hover, .chat-add-menu button:focus-visible { background: #eef2ea; }
.chat-add-tool { display: none; }
.chat-add-tool .chat-menu { left: auto; right: 0; min-width: 230px; }
.chat-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.chat-info { display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: 6px; padding: 14px 16px; border-left: 1px solid var(--line); overflow-y: auto; }
.chat-info h3 { margin: 8px 0 2px; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.chat-info h3:first-child { margin-top: 0; }
.chat-info dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; margin: 0; font-size: 13px; }
.chat-info dt { color: var(--muted); }
.chat-info dd { margin: 0; }
.chat-info p { margin: 0; }
.chat-row .crm-photo.chat-pic { width: 44px; height: 36px; border-radius: 7px; font-size: 0; }
.chat-row:has(.chat-pic) { grid-template-columns: 44px minmax(0, 1fr) auto; }
.chat-imp { display: grid; gap: 6px; margin: 6px 0 2px; padding: 10px 12px; border: 1px solid #ecd27a; border-radius: 10px; background: #fdf6d8; }
.chat-imp.none { border-color: var(--line); background: #f6f7f3; }
.chat-imp-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.chat-imp h3, .chat-info .chat-imp h3 { margin: 0; color: #6f5300; font-size: 12px; }
.chat-imp.none h3 { color: var(--muted); }
.chat-imp p { font-size: 13.5px; line-height: 1.45; overflow-wrap: anywhere; }
.chat-imp .crm-link-strong { font-size: 12.5px; }
.chat-imp textarea { width: 100%; padding: 8px 10px; border: 1px solid #dcc56a; border-radius: 8px; background: #fff; font: inherit; font-size: 13.5px; resize: vertical; }
.chat-imp .crm-row { justify-content: flex-start; }
.chat-imp-strip { display: none; margin: 0; padding: 8px 16px; border-bottom: 1px solid #ecd27a; background: #fdf6d8; color: #4d3b00; font-size: 13px; line-height: 1.4; overflow-wrap: anywhere; }
.chat-tech { display: grid; grid-template-columns: 60px minmax(0, 1fr); gap: 10px; align-items: start; padding: 8px 0; border-bottom: 1px solid #edf0ea; }
.chat-tech:last-of-type { border-bottom: 0; }
.chat-tech > div { display: grid; gap: 2px; min-width: 0; }
.chat-tech b { font-size: 13.5px; line-height: 1.3; overflow-wrap: anywhere; }
.chat-tech .crm-sub b { font-size: inherit; }
@media (max-width: 1100px) {
  .chat-page { grid-template-columns: minmax(230px, 290px) minmax(0, 1fr); }
  .chat-info { display: none; }
  .chat-imp-strip { display: block; }
  .chat-add-tool { display: inline-block; }
}
@media (max-width: 760px) {
  .chat-page { grid-template-columns: minmax(0, 1fr); height: calc(100dvh - 190px); min-height: 380px; border-radius: 12px; }
  .chat-thread-head { gap: 8px; padding: 10px 12px; }
  .chat-imp-strip { padding: 8px 12px; }
  .chat-thread-head .crm-sub { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .chat-hide-sm { display: none; }
  .chat-only-sm { display: inline; }
  .chat-list { border-right: 0; }
  .chat-msg { max-width: 88%; }
  .chat-line { max-width: 94%; }
  .chat-msg-ava { width: 26px; height: 26px; }
  .chat-compose { padding: 8px 10px 10px; }
  .chat-input textarea { font-size: 16px; }
}

/* Deal page as on the design canvas (Mark 17.11): header band, three summary tiles, details,
   machines with the linked requests, conversations or team chat on the right. */
.crm-root .crm-band { margin: -24px 0 20px; padding: 14px 0 16px; border: 0; border-radius: 0; background: #fff; box-shadow: 0 0 0 100vmax #fff, 0 1px 0 100vmax var(--line); clip-path: inset(0 -100vmax -1px); }
.crm-pill.info { background: #e3edf8; color: #1e4e79; }
.crm-stagebar ol { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.crm-stagebar ol button.won:not(.cur) { background: #f1f2ee; }
.crm-stagebar ol button { padding: 4px 8px; white-space: normal; line-height: 1.15; }
.crm-btn.danger { border-color: #c98a8a; color: #9b1c1c; }
.crm-btn.danger:hover { border-color: #9b1c1c; }
.crm-stagebar .crm-btn.danger { min-height: 40px; padding: 0 16px; font-size: 13.5px; }
.crm-sum { gap: 12px; }
.crm-sum-tiles { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.3fr); gap: 12px; }
.crm-sum-tile { display: flex; flex-direction: column; gap: 5px; min-width: 0; padding: 12px 14px; border: 1px solid transparent; border-radius: 10px; background: #f6f7f3; }
.crm-sum-tile b { font-size: 16px; line-height: 1.3; overflow-wrap: anywhere; }
.crm-sum-tile .crm-small { color: #3d4741; }
.crm-sum-none { color: var(--muted); font-weight: 650; }
.crm-sum-tile.next { border-color: #ecd27a; background: #fdf1c7; }
.crm-sum-tile.next .crm-label, .crm-sum-tile.next .crm-small { color: #6f5300; }
.crm-sum-tile.late { border-color: #f0b7b7; background: #fdecec; }
.crm-sum-tile.late .crm-label, .crm-sum-tile.late b { color: #9b1c1c; }
.crm-sum-tile.set { border-color: #cfe0d4; background: #eef5ef; }
.crm-sum-tile.won { background: #dcefe2; }
.crm-sum-tile.lost { background: #f3e7e5; }
.crm-sum-tile .crm-row { justify-content: flex-start; margin-top: 4px; }
.crm-sum-tile .crm-stepform { margin-top: 4px; }
.crm-sum-tile .crm-stepform label { flex-basis: 100%; }
.crm-sum-tile .crm-next-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: -4px -6px 0 0; }
.crm-sum-ai { color: #4a3a00; font-size: 14.5px; line-height: 1.35; overflow-wrap: anywhere; }
.crm-important { display: grid; gap: 5px; padding: 10px 14px; border: 1px solid #ecd27a; border-radius: 10px; background: #fdf6d8; }
.crm-important .crm-label { color: #6f5300; }
.crm-important .crm-sub { display: inline; font-weight: 600; letter-spacing: 0; text-transform: none; }
.crm-important textarea { width: 100%; min-height: 38px; padding: 8px 10px; border: 1px solid #dcc56a; border-radius: 8px; background: #fff; font: inherit; font-size: 14px; line-height: 1.4; resize: vertical; }
.crm-important textarea { field-sizing: content; }
.crm-important p { margin: 0; font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }
.buy-important { padding: 9px 12px; border: 1px solid #ecd27a; border-radius: 9px; background: #fdf6d8; color: #4d3b00; font-size: 13.5px; line-height: 1.4; overflow-wrap: anywhere; }
.crm-sum-other { display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; padding: 10px 14px; border-radius: 10px; background: #e3edf8; color: #1e4e79; font-size: 14px; }
.crm-sum-other .crm-row { flex: none; }
.crm-sum-other .crm-btn { color: #1e4e79; }
.crm-details { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 24px; margin: 0; }
.crm-details > div { display: grid; gap: 2px; min-width: 0; padding: 9px 0; border-bottom: 1px solid #eef0ea; }
.crm-details dt { color: var(--muted); font-size: 13px; }
.crm-details dd { margin: 0; font-size: 14.5px; font-weight: 700; overflow-wrap: anywhere; }
.crm-missing-label { margin-right: 4px; color: #3d4741; font-size: 13.5px; font-weight: 700; }
.crm-chip.add { min-height: 34px; padding: 0 12px; border: 1px dashed #b9c1b6; border-radius: 99px; background: transparent; color: var(--forest); }
.crm-chip.add:hover, .crm-chip.add:focus-visible { border-style: solid; background: #f6f7f3; }
.crm-panel-title { display: grid; gap: 3px; }
.crm-panel-head .crm-row { justify-content: flex-end; }
.crm-reqblock { display: grid; gap: 8px; padding-top: 10px; border-top: 1px solid #eef0ea; }
.crm-reqblock > p { margin: 0; }
.crm-sidetabs { display: flex; gap: 20px; }
.crm-sidetabs button { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; border: 0; border-bottom: 3px solid transparent; background: transparent; color: #3d4741; cursor: pointer; font: inherit; font-size: 14.5px; font-weight: 700; }
.crm-sidetabs button[aria-selected="true"] { border-bottom-color: var(--forest); color: var(--forest); font-weight: 800; }
.crm-sidetabs .nav-badge { margin-left: 0; }
.crm-note .crm-btn { min-height: 40px; }
.crm-chatlist { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.crm-chatlist li { display: grid; gap: 2px; padding: 8px 10px; border-radius: 10px; background: #f6f7f3; overflow-wrap: anywhere; }
.crm-chatlist li.mine { background: #eef5d0; }
@media (max-width: 1100px) {
  .crm-details { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .crm-root .crm-band { margin-top: -16px; padding: 12px 0 14px; }
  .crm-sum-tiles { grid-template-columns: minmax(0, 1fr); }
  .crm-sum-other { flex-direction: column; align-items: flex-start; }
  .crm-sum-tile .crm-row .crm-btn { flex: 1 1 auto; min-height: 44px; }
  .crm-panel-head .crm-row { justify-content: flex-start; }
  /* «Пропозиції клієнту»: the three ways to add (from requests, new request, a link) sit in
     one even row on a phone instead of wrapping onto a second line. */
  .crm-offers .crm-panel-head > .crm-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; width: 100%; }
  .crm-offers .crm-panel-head > .crm-row .crm-btn { min-height: 40px; padding: 0 6px; white-space: nowrap; }
}
.crm-meta .muted { color: #8a938c; }
.crm-dl dd.muted { color: #a2aaa3; font-weight: 600; }

/* ---------- Lists (Угоди, Дзвінки, Клієнти) as on the design canvas ---------- */
.crm-root .crm-listband > :last-child { margin-bottom: 0; }
.crm-root .crm-listband .crm-pagehead { margin-bottom: 12px; }
.crm-root .crm-listband .crm-alert { margin: 12px 0 0; }
.crm-root .crm-call-kpis { margin-bottom: 14px; }
.crm-root button.crm-kpi { display: block; width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.crm-root .crm-kpi.bad { border-color: #f3c9bd; background: #fcebe4; }
.crm-root .crm-kpi.bad span, .crm-root .crm-kpi.bad strong { color: #9b2c12; }
.crm-root .crm-kpi.good { border-color: #cfe5d6; background: #e3f1e7; }
.crm-root .crm-kpi.good span, .crm-root .crm-kpi.good strong { color: #1d5a33; }
.crm-root .crm-deal-flags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; }
.crm-root .crm-nostep { padding: 2px 8px; border-radius: 999px; background: #fdf3c4; color: #6b4e00; font-size: 12px; font-weight: 800; white-space: nowrap; }
.crm-root .crm-fold { display: grid; gap: 2px; width: 100%; padding: 10px 12px; border: 1px dashed #b9bfb5; border-radius: 10px; background: transparent; color: var(--forest); font: inherit; text-align: left; cursor: pointer; }
.crm-root .crm-fold b { font-size: 13.5px; }
.crm-root .crm-fold span { color: var(--muted); font-size: 12.5px; }
.crm-root .crm-fold:hover { background: #fff; }
@media (max-width: 760px) {
  .crm-root .crm-call-kpis .crm-kpi { padding: 10px 12px; }
  .crm-root .crm-call-kpis .crm-kpi strong { font-size: 20px; }
}
.crm-root .crm-titleline button.link { padding: 0; border: 0; background: none; color: var(--forest); font: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; }
@media (max-width: 760px) { .crm-root .crm-call-kpis { display: none; } }

/* Buyer «Головна» (canvas «Мій день» закупщика, 2026-11-17) */
.buy-home-kpis { grid-template-columns: repeat(5, minmax(0,1fr)); }
.buy-home-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
.buy-home-grid .crm-home-row { grid-template-columns: 136px minmax(0, 1fr) auto; }
@media (max-width: 1100px) { .buy-home-kpis { grid-template-columns: repeat(3, minmax(0,1fr)); } .buy-home-grid { grid-template-columns: minmax(0,1fr); } }
@media (max-width: 760px) {
  .buy-home-kpis { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .buy-home-grid .crm-home-row { grid-template-columns: minmax(0, 1fr) auto; }
}

/* «Логістика»: transport requests (canvas «Логістика», «Головна — логіст») */
.log-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin: 0 0 12px; padding: 0; list-style: none; }
.log-week li { display: grid; gap: 2px; padding: 8px 10px; border-radius: 9px; background: #f6f7f3; color: var(--ink); min-width: 0; }
.log-week li b { font-size: 13px; }
.log-week li span { overflow: hidden; color: #3d4741; font-size: 12.5px; text-overflow: ellipsis; white-space: nowrap; }
.log-week li.today { background: var(--forest); color: #fff; }
.log-week li.today span { color: #fff; }
.log-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.log-filters .crm-tabs { margin-bottom: 0; }
.log-filters select { flex: none; width: auto; min-height: 42px; padding: 0 30px 0 10px; border: 1px solid var(--line); border-radius: 9px; background: #fff; font: inherit; font-size: 14px; }
.log-grid { grid-template-columns: minmax(0, 1fr) minmax(360px, 440px); }
.log-list { display: grid; gap: 6px; min-width: 0; align-content: start; }
.log-row { display: grid; grid-template-columns: minmax(0, 2.1fr) minmax(0, .8fr) minmax(0, 1.5fr) minmax(0, 1.1fr) minmax(0, 1fr); gap: 12px; align-items: start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; font-size: 13.5px; }
.log-row.on { border-color: #1e4e79; box-shadow: inset 0 0 0 1px #1e4e79; }
.log-row.log-headrow { padding: 0 12px; border: 0; background: none; color: var(--muted); cursor: default; font-size: 12.5px; font-weight: 700; }
.log-cell { display: grid; gap: 3px; min-width: 0; overflow-wrap: anywhere; }
.log-cell .crm-pill { justify-self: start; white-space: normal; }
.log-what { grid-template-columns: auto minmax(0, 1fr); gap: 10px; }
.log-what > div { display: grid; gap: 3px; min-width: 0; }
.log-title { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.log-late { color: #9b1c1c; }
.log-quick { display: flex; flex-wrap: wrap; gap: 8px; grid-column: 1 / -1; }
.log-quick .crm-btn { flex: 1 1 150px; min-height: 44px; }
.log-card { border-color: #1e4e79; }
.log-card.empty { border-color: var(--line); }
.log-card h2 { margin: 2px 0 4px; font-size: 19px; }
.log-code { color: #1e4e79; font-size: 13px; font-weight: 800; }
.log-dl { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 6px 10px; margin: 0; font-size: 13.5px; }
.log-dl dt { color: var(--muted); }
.log-dl dd { margin: 0; overflow-wrap: anywhere; }
.log-steps { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; margin: 0; padding: 0; list-style: none; text-align: center; font-size: 12px; font-weight: 700; }
.log-steps li { overflow: hidden; padding: 7px 2px; border-radius: 7px; background: #f1f2ee; color: #3d4741; text-overflow: ellipsis; white-space: nowrap; }
.log-steps li.done { background: #dcefe2; color: #1f5c38; }
.log-steps li.cur { background: #ece6f7; color: #4b2f86; }
.log-plan { padding: 12px; border: 1px solid var(--line); border-radius: 10px; }
.log-card .buy-actions .crm-btn.danger-text { flex: none; }
.log-home-row { grid-template-columns: minmax(0, 1fr) auto; }
.buy-home-grid .crm-home-row.log-home-row { grid-template-columns: minmax(0, 1fr) auto; }
.crm-deal-log { display: grid; gap: 8px; }
.crm-deal-log-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 10px; align-items: center; padding: 8px 0; border-top: 1px solid #eef0ea; }
.crm-deal-log-row .crm-sub { grid-column: 2 / -1; }
.crm-home-ship { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; align-items: center; padding: 9px 0; border-top: 1px solid #eef0ea; }
.crm-home-ship .crm-sub { grid-column: 1 / -1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; }
@media (max-width: 1560px) { .log-row { grid-template-columns: minmax(0, 2.3fr) minmax(0, .8fr) minmax(0, 1.4fr) minmax(0, 1.1fr); } .log-row > .log-cell:nth-child(5), .log-headrow > span:nth-child(5) { display: none; } }
@media (max-width: 1250px) { .log-grid { grid-template-columns: minmax(0, 1fr) minmax(320px, 400px); } }
@media (max-width: 900px) {
  .log-grid { grid-template-columns: minmax(0, 1fr); }
  .log-week { grid-auto-flow: column; grid-auto-columns: 132px; grid-template-columns: none; overflow-x: auto; padding-bottom: 2px; }
  .log-headrow { display: none; }
  .log-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px 12px; }
  .log-row > .log-cell:nth-child(5) { display: grid; }
  .log-what { grid-column: 1 / -1; }
  .log-cell[data-label]::before { content: attr(data-label); color: var(--muted); font-size: 11.5px; font-weight: 700; }
  .log-tabs { overflow-x: auto; max-width: 100%; padding-bottom: 2px; }
  .log-filters select { flex: 1 1 150px; width: auto; min-height: 44px; }
  .log-dl { grid-template-columns: 92px minmax(0, 1fr); }
  .log-steps { font-size: 11.5px; }
}

/* «Передати угоду?» on the head's home (Mark, 2026-11-19, «13Б»). */
.crm-home-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }

/* «Скоро в запитах» (Mark, 2026-11-19, «8А 9А»): machines still waiting in managers' deals. */
.buy-soon { display: grid; gap: 6px; padding: 10px 12px; border: 1px solid #cfdcec; border-radius: 10px; background: #f4f8fd; }
.buy-soon-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 0; border-top: 1px solid #dfe8f3; }
.buy-soon-row:first-of-type { border-top: 0; }
.buy-soon-row > span { display: grid; gap: 2px; min-width: 0; }
.buy-row.soon { cursor: default; }
@media (max-width: 640px) { .buy-soon-row { flex-wrap: wrap; } .buy-soon-row .crm-btn { width: 100%; min-height: 44px; } }

/* ---------- Bell, reminders, «Мої нагадування» (Mark 2026-11-19, «18А 20А 21А 22АБ») ---------- */
.ntf-bellwrap { position: relative; }
.ntf-bell { position: relative; display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 50%; background: #fff; color: var(--forest); cursor: pointer; }
.ntf-bell:hover, .ntf-bell[aria-expanded="true"] { border-color: var(--forest-2); background: #f3f6ef; }
.ntf-bell:focus-visible { outline: 3px solid var(--lime); outline-offset: 2px; }
.ntf-count { position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px; border: 2px solid var(--paper); border-radius: 10px; background: #c0392b; color: #fff; font-size: 11px; font-weight: 850; line-height: 16px; text-align: center; }
.ntf-panel { position: absolute; top: calc(100% + 10px); right: -60px; z-index: 40; width: min(420px, calc(100vw - 24px)); max-height: min(70vh, 640px); overflow: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); box-shadow: var(--shadow); }
.ntf-head { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--paper); }
.ntf-head b { font-size: 15px; }
.ntf-list { margin: 0; padding: 4px 0; list-style: none; }
.ntf-item { display: grid; gap: 6px; padding: 8px 16px 10px; border-bottom: 1px solid #eef0ea; }
.ntf-item.new { background: #f6f9ec; }
.ntf-open { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 10px; align-items: start; width: 100%; padding: 0; border: 0; background: transparent; color: inherit; text-align: left; cursor: pointer; }
.ntf-open:focus-visible { outline: 2px solid var(--forest-2); outline-offset: 2px; border-radius: 6px; }
.ntf-ico { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #eef0ea; color: var(--forest); font-size: 14px; font-weight: 800; }
.ntf-reminder .ntf-ico, .ntf-step .ntf-ico { background: #fdf1c7; color: #6b4e00; }
.ntf-missed .ntf-ico, .ntf-closing .ntf-ico { background: #fbe4e1; color: #9b1c1c; }
.ntf-chat .ntf-ico { background: #e3eefb; color: #1d4f91; }
.ntf-handover .ntf-ico, .ntf-answer .ntf-ico { background: #e4f3e8; color: #1f6b3a; }
.ntf-body { display: grid; gap: 1px; min-width: 0; }
.ntf-kind { color: var(--muted); font-size: 11.5px; font-weight: 700; }
.ntf-body b { font-size: 14px; line-height: 1.3; overflow-wrap: anywhere; }
.ntf-text { color: #3d4741; font-size: 13px; line-height: 1.35; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ntf-acts { display: flex; flex-wrap: wrap; gap: 6px; }
.ntf-item .ntf-acts { padding-left: 40px; }
.ntf-empty { margin: 0; padding: 22px 18px; color: var(--muted); font-size: 14px; }
.ntf-foot { position: sticky; bottom: 0; padding: 10px 16px 12px; border-top: 1px solid var(--line); background: #f7f6f0; font-size: 13px; }
.ntf-foot:empty { display: none; }
.ntf-push { color: #3d4741; }
.ntf-push.on { color: #1f6b3a; font-weight: 700; }

.ntf-block { display: grid; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); }
.ntf-panelwrap .ntf-block { margin-top: 0; padding-top: 0; border-top: 0; }
.ntf-block-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ntf-rems, .ntf-plist { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.ntf-rem, .ntf-prow { display: grid; grid-template-columns: 118px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid #eef0ea; font-size: 14px; }
.ntf-rem:last-child, .ntf-prow:last-child { border-bottom: 0; }
.ntf-rem-when { color: #3d4741; font-size: 13px; font-weight: 750; font-variant-numeric: tabular-nums; }
.ntf-rem.due .ntf-rem-when, .ntf-group.late .ntf-rem-when { color: #9b1c1c; }
.ntf-rem-body { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; min-width: 0; overflow-wrap: anywhere; }
.ntf-target { padding: 0; border: 0; background: transparent; color: var(--forest-2); font-size: 13px; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; text-align: left; }
.ntf-prow.done .ntf-rem-body { color: var(--muted); text-decoration: line-through; }
.ntf-prow.step .crm-pill { font-size: 11px; }

.ntf-modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px; background: rgba(23, 34, 29, .38); }
.ntf-dialog { display: grid; gap: 12px; width: min(460px, 100%); padding: 20px 20px 18px; border-radius: 14px; background: var(--paper); box-shadow: var(--shadow); }
.ntf-dialog h3 { margin: 0; font-size: 18px; }
.ntf-dialog p { margin: -6px 0 0; }
.ntf-dialog label { display: grid; gap: 4px; color: #3d4741; font-size: 13px; font-weight: 700; }
.ntf-dialog input { min-height: 42px; padding: 8px 11px; border: 1px solid #cfd5cc; border-radius: 9px; background: #fff; color: var(--ink); font-size: 15px; font-weight: 500; }
.ntf-quick { display: flex; flex-wrap: wrap; gap: 6px; }
.ntf-quick .crm-chip { padding: 7px 11px; font-size: 13px; }
.ntf-quick .crm-chip.on { background: var(--forest); color: #fff; }
.ntf-when { display: grid; grid-template-columns: minmax(0, 1fr) 130px; gap: 10px; }

.ntf-pop { position: fixed; right: 18px; top: 84px; z-index: 61; display: grid; gap: 10px; width: min(360px, calc(100vw - 32px)); }
.ntf-popcard { display: grid; gap: 6px; padding: 14px 16px; border: 1px solid var(--line); border-left: 4px solid #d4a017; border-radius: 12px; background: var(--paper); box-shadow: var(--shadow); font-size: 14px; animation: crm-pop-in .25s ease-out; }
.ntf-popcard header { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: #6b4e00; font-size: 12px; font-weight: 750; letter-spacing: .04em; text-transform: uppercase; }
.ntf-popcard strong { font-size: 16px; line-height: 1.3; }
.ntf-poptitle { color: var(--muted); font-size: 13px; }
.ntf-popcard .crm-row { justify-content: flex-start; flex-wrap: wrap; gap: 8px; }
.ntf-when input { width: 100%; min-width: 0; box-sizing: border-box; }

.ntf-page .ntf-pagehead h2 { margin: 0 0 4px; }
.ntf-pagebody { display: grid; gap: 14px; padding: 16px 0 40px; max-width: 980px; }
.ntf-group h3 { margin: 0 0 6px; font-size: 15px; }
.ntf-group.late { border-left: 4px solid #c0392b; }
.ntf-group.today { border-left: 4px solid #d4a017; }
.ntf-group.push .crm-btn { justify-self: start; align-self: flex-start; width: auto; }
.ntf-home .ntf-rem { grid-template-columns: 100px minmax(0, 1fr); }
.ntf-home .ntf-rem .ntf-acts { grid-column: 2; }

.crm-deal-wrap { position: relative; display: grid; }
.crm-deal-remind { position: absolute; top: 7px; right: 7px; z-index: 1; display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid transparent; border-radius: 50%; background: transparent; font-size: 14px; cursor: pointer; opacity: .55; }
.crm-deal-wrap:hover .crm-deal-remind, .crm-deal-remind:focus-visible { border-color: var(--line); background: #fff; opacity: 1; }
.crm-deal-wrap .crm-deal-title { padding-right: 26px; }
.crm-deal-rem { color: #6b4e00; font-size: 12.5px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crm-deal-rem.due { color: #9b1c1c; }
/* With the quality filter on, a card says what to ask; the filtered point is bold. */
.crm-deal-gaps { color: #6b4e00; font-size: 12.5px; line-height: 1.35; }
.crm-deal-gaps > span { color: var(--muted); }
.crm-deal-gaps b { font-weight: 600; }
.crm-deal-gaps b.on { font-weight: 800; color: #8a3b00; }

@media (max-width: 650px) {
  /* Mark 2026-11-20 («19Б»): on a phone «Що далі» comes first, «Деталі» is long. */
  .crm-dealstack > .crm-plan { order: -1; }
  .ntf-bellwrap { order: 3; }
  .ntf-bell { width: 38px; height: 38px; }
  .ntf-panel { position: fixed; top: 64px; right: 8px; left: 8px; width: auto; max-height: calc(100dvh - 80px); }
  .ntf-rem, .ntf-prow { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .ntf-item .ntf-acts { padding-left: 40px; }
  .ntf-when { grid-template-columns: minmax(0, 1fr) minmax(0, 132px); }
  .ntf-dialog { align-self: end; border-radius: 14px 14px 0 0; padding-bottom: calc(18px + env(safe-area-inset-bottom)); }
  .ntf-modal { padding: 0; }
  .ntf-pop { left: 8px; right: 8px; top: 64px; width: auto; }
  .crm-deal-remind { opacity: 1; }
}
/* «Пропозиції клієнту», empty: the three ways to add a machine (Mark, 2026-11-20). */
.crm-offer-how { display: grid; gap: 6px; padding: 10px 12px; border: 1px dashed #dfe3d8; border-radius: 10px; background: #fbfcf8; }
.crm-offer-how p, .crm-offer-how ul { margin: 0; }
.crm-offer-how ul { padding-left: 18px; display: grid; gap: 4px; line-height: 1.45; }

/* Кошик угод and «Не клієнт» (Mark 2026-11-20, «26А 27А 28Б 29А»): the administrator's tools. */
.crm-pagehead-act { justify-content: flex-end; gap: 8px; }
.crm-pagehead-act .crm-btn[aria-pressed="true"] { border-color: var(--forest); background: var(--forest); color: #fff; }
.crm-pickbar { position: sticky; top: 8px; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 0 0 14px; padding: 10px 12px; border: 1px solid #c98a8a; border-radius: 10px; background: #fff; box-shadow: 0 6px 18px rgba(24, 59, 43, .08); font-size: 13px; }
.crm-pickbar > span { margin-right: auto; }
.crm-pickbar.crm-alert { border-color: transparent; }
.crm-deal-pick { position: absolute; top: 9px; right: 9px; z-index: 1; display: grid; place-items: center; width: 26px; height: 26px; cursor: pointer; }
.crm-deal-pick input { width: 18px; height: 18px; margin: 0; accent-color: #9b1c1c; cursor: pointer; }
.crm-deal-wrap.picked .crm-deal { border-color: #c98a8a; background: #fbeceb; box-shadow: inset 3px 0 0 #9b1c1c; }
.crm-dealtrash { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; margin: 4px 0 0; }
.crm-dealtrash.crm-alert { justify-content: space-between; }
.crm-btn.ghost.danger { border-color: transparent; color: #9b1c1c; }
.crm-btn.ghost.danger:hover { background: #fbeceb; }
.crm-trash { display: grid; gap: 0; padding: 4px 16px; }
.crm-trash-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 6px 16px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.crm-trash-row:first-child { border-top: 0; }
.crm-trash-main { display: grid; gap: 3px; min-width: 0; }
.crm-trash-main .crm-sub { color: #3a4841; font-size: 13px; }
.crm-trash-when { color: #6b5a1f; white-space: nowrap; }
.crm-pill.crm-notclient, .crm-rec-deal.crm-notclient { background: #ece6f7; color: #4b2f86; }
.crm-ncpanel { align-items: flex-start; flex-wrap: wrap; margin: 12px 0 0; }
.crm-ncpanel > div { flex: 1 1 320px; display: grid; gap: 8px; }
.crm-ncpanel p { margin: 0; }
.crm-nc-kinds { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.crm-nc-kinds label { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; cursor: pointer; }
.crm-nc-kept { display: flex; flex-wrap: wrap; gap: 6px; }
@media (max-width: 720px) {
  .crm-trash-row { grid-template-columns: minmax(0, 1fr) auto; }
  .crm-trash-when { grid-column: 1; }
  .crm-pickbar > span { flex: 1 1 100%; }
}
.crm-nc-kinds input[type="radio"] { flex: none; width: 16px; height: 16px; min-height: 0; margin: 0; padding: 0; accent-color: var(--forest); }

/* «Скопіювати посилання» in the deal and client cards (Mark 2026-11-21, «30А»). */
/* «Запит ↔ угода» (Mark, 2026-11-24, «11Б»): the block to fill gets a frame that breathes; nothing dims the page. */
.crm-offers-nudge { border-color: #5fae7f; animation: crm-nudge-breathe 2.6s ease-in-out infinite; }
@keyframes crm-nudge-breathe { 0%, 100% { box-shadow: 0 0 0 2px rgba(47,122,79,.16); } 50% { box-shadow: 0 0 0 2px rgba(47,122,79,.34), 0 0 0 8px rgba(47,122,79,.08); } }
@media (prefers-reduced-motion: reduce) { .crm-offers-nudge { animation: none; box-shadow: 0 0 0 2px rgba(47,122,79,.28); } }
.crm-nudge { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 10px 14px; border-radius: 10px; background: #eaf6ee; color: var(--forest); }
.crm-nudge-text { display: grid; gap: 2px; flex: 1 1 320px; min-width: 0; }
.crm-nudge-text b { font-size: 14.5px; }
.crm-nudge-text .crm-small { color: #3d4741; }
.crm-nudge-lens { position: relative; display: inline-block; flex: none; width: 28px; height: 28px; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 1.5px #2f7a4f; }
.crm-nudge-lens::before { content: ""; position: absolute; left: 7px; top: 7px; width: 10px; height: 10px; border: 2px solid var(--forest); border-radius: 50%; box-sizing: border-box; }
.crm-nudge-lens::after { content: ""; position: absolute; left: 15.5px; top: 16px; width: 7px; height: 2px; border-radius: 2px; background: var(--forest); transform: rotate(45deg); transform-origin: left center; }
.crm-nudge-pearls { display: inline-flex; align-items: center; padding: 2px 9px 2px 7px; border-radius: 99px; background: #f3ecff; color: #4a3a7a; font-size: 12.5px; font-weight: 800; white-space: nowrap; vertical-align: middle; }
.crm-noreq { border-color: #9fc7ae; }
.crm-noreq .crm-home-block-head h3 { display: flex; align-items: center; gap: 8px; }
.crm-noreq .crm-nudge-lens { width: 24px; height: 24px; }
.crm-noreq .crm-nudge-lens::before { left: 5.5px; top: 5.5px; width: 9px; height: 9px; }
.crm-noreq .crm-nudge-lens::after { left: 13px; top: 14px; width: 6px; }
.crm-noreq-foot { margin: 8px 0 0; line-height: 1.9; }

.market-root .buy-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
/* «Агроринок» (Mark «6А» 2026-11-26): offers and requests from Telegram market groups.
   Mark 2026-12-02: own filters bar in every tab, icons, big numbers, small details. */
.mk-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 12px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.mk-f { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 4px 0 10px; border: 1px solid var(--line); border-radius: 9px; background: #fbfbf8; }
.mk-f > span { font-size: 15px; line-height: 1; }
.mk-f select, .mk-f input { min-height: 38px; padding: 0 6px; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 14px; outline: none; }
.mk-f select { max-width: 210px; cursor: pointer; }
.mk-f:focus-within { border-color: var(--forest); box-shadow: 0 0 0 2px #dcefe2; }
.mk-f-q { flex: 1 1 220px; }
.mk-f-q input { width: 100%; }
.mk-busy { margin-left: auto; }
.mk-main { display: grid; gap: 12px; align-content: start; min-width: 0; }
.mk-list { display: grid; gap: 0; align-content: start; min-width: 0; padding: 8px 12px; }
.mk-row { display: grid; gap: 14px; align-items: center; min-height: 62px; padding: 10px; border: 2px solid transparent; border-bottom: 1px solid #eef0ea; font-size: 13px; }
.mk-row > div { display: grid; gap: 3px; min-width: 0; overflow-wrap: anywhere; }
.mk-sum { grid-template-columns: minmax(180px, 1fr) minmax(0, 1.2fr) minmax(0, 1.2fr) 150px; }
.mk-offer { grid-template-columns: minmax(200px, 1.3fr) 160px minmax(0, 1.1fr) minmax(0, 1.2fr); cursor: pointer; }
.mk-has-geo .mk-offer { grid-template-columns: minmax(200px, 1.3fr) 160px minmax(0, 1fr) 120px minmax(0, 1.1fr); }
.mk-match { grid-template-columns: minmax(170px, .9fr) minmax(0, 1.2fr) 110px minmax(0, 1.2fr) 140px; }
.mk-group { grid-template-columns: minmax(0, 1.4fr) 200px minmax(0, 1.2fr) 200px; }
.mk-what { display: flex !important; align-items: center; gap: 10px; }
.mk-what > div { display: grid; gap: 2px; min-width: 0; }
.mk-what b { font-size: 14px; line-height: 1.25; }
.mk-what .crm-pill { justify-self: start; }
.mk-ico { display: inline-grid; flex: none; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: #f3f1e6; font-size: 15px; line-height: 1; }
.mk-ico.big { width: 38px; height: 38px; border-radius: 11px; font-size: 21px; }
.mk-big { color: var(--ink); font-size: 16px; font-weight: 850; line-height: 1.2; white-space: nowrap; }
.mk-meta { color: #3d4741; font-size: 12.5px; }
.mk-geo { display: block; white-space: nowrap; color: #3d4741; text-decoration: none; }
a.mk-geo:hover { color: #4b2f86; text-decoration: underline; }
.mk-maplink { color: inherit; font-weight: inherit; text-decoration: underline dotted #9aa39d; text-underline-offset: 3px; }
.mk-maplink:hover { color: #4b2f86; text-decoration: underline; }
.mk-front-dot { font-size: 13px; }
.mk-front-dot.red { color: #d0362b; }
.mk-front-dot.amber { color: #e69b00; }
.mk-front-dot.green { color: #2f9a4f; }
.mk-front-dot.old { opacity: .45; }
.mk-clip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.mk-chip { display: inline-flex; align-items: center; padding: 1px 7px; border-radius: 6px; background: #f1f2ec; color: #4b564f; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.mk-kind { display: inline-flex; align-items: center; padding: 1px 8px; border-radius: 99px; font-size: 11.5px; font-weight: 800; white-space: nowrap; }
.mk-kind.sell { background: #f8ecd4; color: #7a4b05; }
.mk-kind.buy { background: #e3ebf4; color: #1f4f7a; }
.mk-who { display: flex !important; align-items: center; gap: 9px; }
.mk-who > div { display: grid; gap: 2px; min-width: 0; }
.mk-ava { display: inline-grid; flex: none; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #e9efe4; color: var(--forest); font-size: 11.5px; font-weight: 850; }
.mk-ava.big { width: 46px; height: 46px; font-size: 16px; }
.mk-place > span:first-child { font-weight: 650; }
.mk-sumside { gap: 3px !important; }
.mk-sumside.sell { box-shadow: inset 3px 0 0 #efd7a7; }
.mk-sumside.buy { box-shadow: inset 3px 0 0 #b9cde3; }
.mk-count { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; }
.mk-none { color: #9aa29c; }
.mk-pairs { display: inline-flex; align-items: baseline; gap: 5px; padding: 6px 12px; border: 0; border-radius: 99px; background: #dcefe2; color: var(--crm-ok); font: inherit; font-size: 13px; font-weight: 750; cursor: pointer; }
.mk-pairs b { font-size: 16px; }
.mk-pairs:hover { background: #cde8d6; }
.mk-sidebox { display: grid; gap: 4px; min-width: 0; }
.mk-party { gap: 3px !important; }
.mk-party.sell { border-left: 3px solid #efd7a7 !important; border-radius: 4px 8px 8px 4px; }
.mk-party.buy { border-left: 3px solid #b9cde3 !important; border-radius: 4px 8px 8px 4px; }
.mk-gap { justify-items: center; text-align: center; }
.mk-arrow { color: #9aa29c; font-size: 20px; line-height: 1; }
.mk-margin { padding: 3px 10px; border-radius: 99px; background: #dcefe2; color: var(--crm-ok); font-size: 14px; white-space: nowrap; }
.mk-act { justify-items: stretch; }
.mk-more { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 14px 10px 4px; }
.mk-deal-one { width: 100%; margin-top: 8px; }
.mk-group-acts { display: flex; flex-direction: column; gap: 6px; align-items: stretch; }
.mk-group-acts select { min-height: 34px; font-size: 13px; }
.mk-group .crm-pill { justify-self: start; }
.mk-groups-add { display: grid; gap: 10px; padding: 16px 18px; }
.mk-groups-add h3 { margin: 0; font-size: 16px; }
.mk-groups-add p { margin: 0; }
.mk-groups-add textarea { width: 100%; min-height: 76px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; font: inherit; font-size: 14px; resize: vertical; }
.mk-groups-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.mk-offer:hover { background: #fafaf7; }
.mk-offer.on { margin: 4px 0; border-color: #4b2f86; border-radius: 10px; background: #faf8fd; }
.mk-headrow { min-height: 34px; background: #f6f7f2; color: #5c665f; font-size: 11.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; cursor: default; }
.mk-headrow:hover { background: #f6f7f2; }
.mk-side { display: grid; gap: 2px; min-width: 0; padding: 6px 9px; border: 1px solid transparent; border-radius: 8px; background: none; color: var(--ink); font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.mk-side:hover { border-color: var(--line); background: #fafaf7; }
.mk-foot { margin: 0; padding: 10px 10px 2px; }
.mk-card-head { display: flex; align-items: center; gap: 12px; }
.mk-card-head > div { display: grid; gap: 5px; min-width: 0; }
.mk-card h2 { margin: 0; font-size: 19px; }
.mk-card .crm-back { justify-self: end; }
.mk-msg { display: grid; gap: 3px; padding: 10px 0; border-top: 1px solid #eef0ea; font-size: 13.5px; }
.mk-msg.on { margin: 0 -8px; padding: 10px 8px; border-radius: 8px; background: #faf8fd; }
.mk-msg-what { display: inline-flex; align-items: center; gap: 7px; }
.mk-map-modal { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 24px; background: rgba(23, 34, 29, .45); }
.mk-map-dialog { display: grid; grid-template-rows: auto 1fr; width: min(1100px, 100%); height: min(760px, 100%); border-radius: 14px; overflow: hidden; background: var(--paper); box-shadow: var(--shadow); }
.mk-map-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid #e3e6df; }
.mk-map-head b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.mk-map-frame { width: 100%; height: 100%; border: 0; background: #eef0ea; }
@media (max-width: 700px) {
  .mk-map-modal { padding: 0; }
  .mk-map-dialog { width: 100%; height: 100%; border-radius: 0; }
  .mk-map-head { flex-wrap: wrap; padding-top: calc(10px + env(safe-area-inset-top)); }
  .mk-map-head b { flex-basis: calc(100% - 52px); }
}
.mk-thumb { width: 44px; height: 44px; flex: 0 0 44px; border-radius: 8px; object-fit: cover; border: 1px solid #e3e6df; background: #f4f5f1; }
.mk-photo { display: block; margin: 6px 0 2px; border-radius: 10px; overflow: hidden; border: 1px solid #e3e6df; background: #f4f5f1; }
.mk-photo img { display: block; width: 100%; max-height: 420px; object-fit: contain; }
.mk-facts { margin-top: 2px; }
.mk-tg { justify-self: start; font-size: 13px; }
.mk-text { margin: 4px 0 0; color: #3d4741; white-space: pre-line; overflow-wrap: anywhere; }
.mk-plus { display: inline-block; justify-self: start; padding: 1px 7px; border-radius: 99px; background: #e7f3ea; color: #1f5f3a; font-size: 11.5px; font-weight: 800; white-space: nowrap; }
.mk-row.mk-new { box-shadow: inset 3px 0 0 #2f7a4f; background: #f6fbf7; }
.mk-row.mk-hot { background: #fff8ec; }
.mk-trends { display: grid; gap: 10px; margin: 0 0 12px; padding: 14px 16px; }
.mk-trends h3 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; margin: 0; font-size: 16px; }
.mk-insight { margin: 0; color: #2f3a33; font-size: 14px; line-height: 1.5; }
.mk-trend-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.mk-trend { display: grid; gap: 4px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.mk-trend b { display: inline-flex; align-items: center; gap: 6px; }
.mk-trend:hover { background: #fafaf7; }
.mk-trend-price { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.mk-grid .mk-offer, .mk-has-geo .mk-grid .mk-offer { grid-template-columns: minmax(0, 1.3fr) 140px minmax(0, 1fr); }
.mk-grid .mk-offer .mk-dist { grid-column: 3; }
.mk-grid .mk-offer.mk-headrow > span:nth-child(4) { display: none; }
.mk-grid .mk-offer .mk-who { grid-column: 1 / -1; padding-left: 48px; }
.mk-grid .mk-offer.mk-headrow > span:last-child { display: none; }
.mk-grid .mk-match { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.mk-grid .mk-match .mk-what, .mk-grid .mk-match .mk-act { grid-column: 1 / -1; }
.mk-grid .mk-match .mk-gap { display: none; }
.mk-grid .mk-match.mk-headrow { display: none; }
@media (max-width: 900px) {
  .mk-bar { padding: 8px; }
  .mk-f { flex: 1 1 calc(50% - 8px); }
  .mk-f select { max-width: none; width: 100%; }
  .mk-f-q { flex-basis: 100%; }
  .mk-headrow { display: none !important; }
  .mk-row { gap: 8px 12px; }
  .mk-sum, .mk-offer, .mk-match, .mk-group { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .mk-what, .mk-who, .mk-place, .mk-act, .mk-sum > div:last-child { grid-column: 1 / -1; }
  .mk-match .mk-gap { grid-column: 1 / -1; order: -1; display: flex !important; justify-content: flex-start; gap: 8px; align-items: center; }
  .mk-match .mk-what { order: -2; }
  .mk-match .mk-arrow { display: none; }
  .mk-group > div:nth-child(3) { grid-column: 1 / -1; order: 3; }
  .mk-group > div:nth-child(4) { order: 2; justify-items: end; }
}

/* Mark 2026-11-29: deal head as a client card, messenger icons by the phone, section tabs. */
.crm-dh-title { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; }
.crm-dh-title h2 { min-width: 0; }
.crm-dh-edit { flex: none; gap: 6px; }
.crm-dh-title .crm-dealhead-act { margin-left: auto; }
/* «Зв'язався в месенджері» in the deal head, always at hand (Mark, 2026-12-02). */
.crm-dh-contact { white-space: nowrap; }
.crm-dh-contact svg { color: #229ed9; }
/* Mark 03.12: the phone number itself calls; chat and «Написав» sit with the facts, so the name
   keeps its whole line. */
.crm-dh-dial { display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: none; color: var(--ink); font: inherit; font-weight: 800; cursor: pointer; white-space: nowrap; text-decoration: underline; text-decoration-color: #b9c4b5; text-underline-offset: 4px; }
.crm-dh-dial svg { flex: none; width: 15px; height: 15px; color: var(--forest); }
.crm-dh-dial:hover { color: var(--forest); text-decoration-color: currentColor; }
.crm-dh-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-height: 0; }
.crm-dh-acts { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-left: auto; }
.crm-dh-acts .crm-btn { min-height: 30px; padding: 0 10px; font-size: 13px; }

.crm-dh-facts { display: flex; flex-wrap: wrap; gap: 10px 36px; margin: 0; padding: 12px 0 2px; border-top: 1px solid var(--line); }
.crm-dh-facts > div { display: grid; gap: 2px; min-width: 0; }
.crm-dh-facts dt { color: #6b746d; font-size: 12px; font-weight: 700; }
.crm-dh-facts dd { display: flex; align-items: center; gap: 8px; min-height: 28px; margin: 0; color: var(--ink); font-size: 15.5px; font-weight: 800; }
.crm-dealhead .crm-dh-facts dd .crm-link-strong { color: var(--ink); font-size: 15.5px; font-weight: 800; text-decoration: underline; text-decoration-color: #b9c4b5; text-underline-offset: 4px; }
.crm-dh-phone, .crm-dh-mgr { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.crm-dh-add { padding: 0; border: 0; background: none; color: var(--forest); font: inherit; font-size: 14px; font-weight: 800; text-decoration: underline dotted; text-underline-offset: 3px; cursor: pointer; }
.crm-dh-other { justify-self: start; }
.crm-mis { display: inline-flex; gap: 4px; }
.crm-mi { display: inline-grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 99px; color: #fff; cursor: pointer; }
.crm-mi.vb { background: #7360f2; } .crm-mi.tg { background: #229ed9; } .crm-mi.wa { background: #25d366; }
.crm-mi:hover, .crm-mi:focus-visible { filter: brightness(.92); outline: 2px solid #cfe0d4; outline-offset: 1px; }
.crm-dh-form { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px 12px; align-items: end; }
.crm-dh-form label { display: grid; gap: 5px; color: #3d4741; font-size: 13px; font-weight: 600; }
.crm-dh-form input { min-height: 40px; padding: 0 10px; border: 1px solid var(--line); border-radius: 9px; font: inherit; font-size: 14.5px; font-weight: 700; color: var(--ink); }
.crm-dh-form p { grid-column: 1 / 4; margin: 0; }
.crm-dh-form .crm-row { justify-content: flex-end; }
/* The client card head (Mark 2026-12-03): three fields, the note and the buttons under them. */
.crm-ch-form { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 12px; }
.crm-ch-form p { grid-column: 1 / 3; }
.crm-dealnav { position: sticky; top: 0; z-index: 20; display: flex; gap: 4px; margin: -8px 0 14px; padding: 6px; overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 255, 255, .96); backdrop-filter: blur(6px); scrollbar-width: none; }
.crm-dealnav button { flex: none; min-height: 34px; padding: 0 14px; border: 0; border-radius: 8px; background: none; color: #3d4741; font: inherit; font-size: 13.5px; font-weight: 800; cursor: pointer; }
.crm-dealnav button span { color: #8a938c; font-weight: 700; }
.crm-dealnav button:hover { background: #f1f4ec; }
.crm-dealnav button[aria-current] { background: var(--forest); color: #fff; }
.crm-dealnav button[aria-current] span { color: #cfe0b8; }
.crm-dealstack > [data-ux] { scroll-margin-top: var(--dealnav-offset, 150px); }
@media (max-width: 760px) {
  .crm-dh-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; }
  .crm-dh-facts > div:nth-child(3) { grid-column: 1 / -1; }
  .crm-dh-facts { align-items: start; }
  .crm-dh-facts dd { font-size: 14.5px; flex-wrap: wrap; gap: 4px 8px; min-height: 0; }
  .crm-dh-title { flex-wrap: nowrap; align-items: flex-start; }
  .crm-dh-title h2 { flex: 1; }
  .crm-dh-edit { min-width: 36px; padding: 0; justify-content: center; }
  .crm-dh-phone { white-space: normal; flex-wrap: wrap; }
  .crm-dh-edit span { display: none; }
  .crm-dh-form { grid-template-columns: minmax(0, 1fr); }
  .crm-dh-form p { grid-column: auto; }
  .crm-ch-form p { grid-column: auto; }
  .crm-dealnav { margin: -6px -2px 12px; border-radius: 10px; }
  .crm-dealnav-plan { order: -1; }
  .crm-callbar.solo { grid-template-columns: minmax(0, 1fr); }
}

/* Mark 2026-11-29: the link field is always open in «Пропозиції клієнту». */
.crm-linkpaste { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 6px 10px; padding: 8px 8px 8px 14px; border: 1.5px dashed #b9c9b0; border-radius: 12px; background: #f7f9f2; color: var(--forest); }
.crm-linkpaste input { min-height: 40px; padding: 0 10px; border: 1px solid var(--line); border-radius: 9px; background: #fff; font: inherit; font-size: 14.5px; color: var(--ink); }
.crm-linkpaste input:focus { border-color: var(--forest-2); outline: 2px solid #cfe0d4; }
.crm-linkpaste .crm-small { grid-column: 2 / -1; }
.crm-offer-link { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; margin: 0; padding: 8px 12px; border-radius: 10px; font-size: 13.5px; }
.crm-offer-link { background: #f1f1ec; color: #5c6259; }
.crm-offer-link.ok { background: #eef5e6; color: #2f5d2a; }
.crm-offer-fill .crm-offer-price { display: flex; gap: 6px; max-width: 320px; }
.crm-offer-fill .crm-offer-price input { flex: 1 1 auto; width: auto; min-width: 0; text-align: left; }
.crm-offer-fill .crm-offer-price select { flex: 0 0 84px; width: 84px; }
.crm-offer-link.warn { background: #fdf3dc; color: #7a5200; }
@media (max-width: 760px) { .crm-linkpaste { grid-template-columns: auto minmax(0, 1fr); } .crm-linkpaste .crm-btn { grid-column: 1 / -1; } .crm-linkpaste .crm-small { grid-column: 1 / -1; } }

/* «Каталог техніки» (Mark 2026-11-29, «95А 96А 97А»): one card per machine buyers worked. */
.cat-filters { grid-template-columns: minmax(0, 1fr) auto auto auto; align-items: center; }
.cat-years { display: flex; gap: 6px; }
.cat-years input { width: 86px; min-height: 42px; padding: 0 10px; border: 1px solid var(--line); border-radius: 9px; background: #fff; font: inherit; font-size: 14px; }
.cat-check { display: flex; align-items: center; gap: 6px; font-size: 13.5px; white-space: nowrap; }
.cat-grid { grid-template-columns: minmax(0, 1fr) minmax(340px, 440px); }
.cat-row { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) 150px; }
.cat-who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cat-cover { flex: none; width: 64px; height: 46px; }
.cat-found { overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; font-size: 13px; line-height: 1.3; }
.cat-card { display: grid; gap: 12px; align-content: start; }
.cat-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.cat-card-head h2 { margin: 0 0 2px; font-size: 19px; overflow-wrap: anywhere; }
.cat-card-head .crm-pill { flex: none; }
.cat-answer { display: grid; gap: 2px; padding: 10px 12px; border-radius: 10px; background: #f3f8f2; font-size: 13.5px; }
.cat-block { display: grid; gap: 8px; }
.cat-block-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: #5c665f; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; }
.cat-block-head b { font-weight: 800; }
.cat-drop { display: grid; gap: 8px; justify-items: start; padding: 10px; border: 1.5px dashed #d6dbd0; border-radius: 10px; }
.cat-drop.on { border-color: #4b2f86; background: #faf8fd; }
.cat-media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; width: 100%; }
.cat-media { position: relative; display: grid; gap: 3px; margin: 0; }
.cat-media img, .cat-media video { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; background: #eef0ea; }
.cat-media-cap { overflow: hidden; color: #5c665f; font-size: 11.5px; text-overflow: ellipsis; white-space: nowrap; }
.cat-media-x { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border: 0; border-radius: 50%; background: rgba(23, 28, 25, .72); color: #fff; font-size: 16px; line-height: 1; cursor: pointer; }
.cat-add { position: relative; cursor: pointer; }
.cat-notes p { margin: 2px 0 0; white-space: pre-wrap; font-size: 13.5px; }
.cat-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cat-fields .wide { grid-column: 1 / -1; }
.cat-req { display: grid; gap: 3px; padding: 9px 0; border-top: 1px solid #eef0ea; font-size: 13.5px; }
.cat-req .crm-link { justify-self: start; }
.cat-journal summary { cursor: pointer; font-size: 13px; font-weight: 700; }
.cat-journal > div { padding: 3px 0; }
.cat-mark { display: block; margin-top: 3px; color: #3d4741; font-size: 12.5px; line-height: 1.4; }
.cat-mark b { color: #4b2f86; font-weight: 750; }
.cat-mark.maybe b { color: #8a5300; }
.cat-mark button { margin-left: 8px; padding: 0; border: 0; background: none; color: #1f5c38; font: inherit; font-weight: 750; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.chat-media { display: grid; grid-template-columns: repeat(auto-fill, 132px); gap: 6px; margin-top: 6px; }
.chat-media img, .chat-media video { display: block; width: 132px; height: 99px; object-fit: cover; border-radius: 8px; background: #eef0ea; }
.chat-attach { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 9px; background: #fff; font-size: 18px; cursor: pointer; }
.chat-drop-on { outline: 2px dashed #4b2f86; outline-offset: -6px; }
@media (max-width: 900px) {
  .cat-filters { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .cat-filters .sell-search { grid-column: 1 / -1; }
  .cat-grid { grid-template-columns: minmax(0, 1fr); }
  .cat-row { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .cat-row .sell-last { grid-auto-flow: column; justify-content: space-between; align-items: center; }
  .cat-row.sell-headrow { display: none; }
}
.chat-menu-ask { display: block; padding: 6px 10px 4px; color: #3a2468; }
.cat-link, .cat-req .crm-link { justify-self: start; padding: 0; border: 0; background: none; color: #1f5c38; font: inherit; font-size: 13px; font-weight: 750; text-align: left; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.cat-check input { width: 18px; height: 18px; min-height: 0; margin: 0; padding: 0; flex: none; }
/* Deal card on the board (Mark 2026-11-29): title, client, money, contacts, step, one flag. */
.crm-deal-wrap, .crm-deal { min-width: 0; }
.crm-deal { grid-template-columns: minmax(0, 1fr); overflow: hidden; }
.crm-deal-line { min-width: 0; }
.crm-deal-line .crm-pill { flex: none; }
.crm-deal-title { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.crm-deal-wrap .crm-deal-title { padding-right: 30px; }
.crm-deal-client { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.crm-deal-line .crm-num { overflow-wrap: anywhere; }
.crm-deal-meta { padding-top: 6px; border-top: 1px solid #eef0ea; }
.crm-deal-contact { display: inline-flex; align-items: center; gap: 5px; min-width: 0; color: #24302a; font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.crm-deal-contact svg { flex: none; width: 13px; height: 13px; color: var(--forest-2, #2f6b4f); }
.crm-deal-contact .crm-dot { color: var(--muted); font-weight: 400; }
.crm-deal-contact.old { color: #8a5a00; }
.crm-deal-contact.old svg { color: #8a5a00; }
.crm-deal-contact.none { color: var(--muted); font-weight: 600; }
.crm-deal-contact.none svg { color: var(--muted); }
.crm-deal-step { overflow-wrap: anywhere; line-height: 1.35; }
.crm-deal-step.none { font-style: normal; }
.crm-deal > .crm-deal-flag { font-size: 12px; line-height: 1.3; }

/* Deal stage as a progress line, not buttons (Mark 2026-11-29: the stages looked like the
   section tabs under them). Dots on a track: done = green tick, now = ringed dot and bold name,
   ahead = hollow dot. Clicking a stage still moves the deal there. */
.crm-root .crm-stagebar { gap: 10px 16px; padding: 12px 14px; border: 1px solid #e3e6df; border-radius: 12px; background: #fbfbf8; }
.crm-root .crm-steps-label { flex: none; align-self: flex-start; padding-top: 3px; color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.crm-root .crm-stagebar ol.crm-steps { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0; flex: 1 1 560px; }
.crm-root .crm-steps li { position: relative; min-width: 0; }
.crm-root .crm-steps li + li::before { content: ""; position: absolute; z-index: 0; top: 13px; right: 50%; left: -50%; height: 2px; background: #d9ddd5; }
.crm-root .crm-steps li.done + li::before { background: var(--forest-2); }
.crm-root .crm-stagebar ol.crm-steps button { position: relative; display: grid; justify-items: center; gap: 6px; width: 100%; min-height: 0; padding: 0 4px; border: 0; border-radius: 0; background: none; color: var(--muted); font-size: 12.5px; font-weight: 600; line-height: 1.2; white-space: normal; text-align: center; overflow: visible; cursor: pointer; z-index: 1; }
.crm-root .crm-steps i { box-sizing: border-box; display: grid; place-items: center; width: 28px; height: 28px; border: 2px solid #c9cfc5; border-radius: 50%; background: #fff; color: #6b756e; font-size: 12.5px; font-style: normal; font-weight: 800; line-height: 1; }
.crm-root .crm-steps li.done i { border-color: var(--forest-2); background: var(--forest-2); color: #fff; }
.crm-root .crm-steps li.done button { color: #3d4741; }
.crm-root .crm-steps li.cur i { border: 3px solid var(--forest); background: #e6f3a6; color: var(--forest); box-shadow: 0 0 0 4px rgba(31, 61, 46, .12); }
.crm-root .crm-steps li.cur button { color: var(--forest); font-weight: 800; }
.crm-root .crm-steps li.next button:hover i, .crm-root .crm-steps li.next button:focus-visible i { border-color: var(--forest-2); color: var(--forest-2); }
.crm-root .crm-steps li.next button:hover span, .crm-root .crm-steps li.next button:focus-visible span { color: var(--forest); text-decoration: underline; text-underline-offset: 3px; }
.crm-root .crm-steps li.won.next i { border-style: dashed; }
.crm-root .crm-stagebar .crm-stage-end { align-self: center; }
.crm-root .crm-stagebar .crm-btn.danger { min-height: 34px; padding: 0 12px; border-color: transparent; background: none; font-size: 13px; }
.crm-root .crm-stagebar .crm-btn.danger:hover { border-color: #e5b4b4; background: #fff5f5; }
.crm-headchat-n, .crm-headchat-c { display: inline-grid; place-items: center; min-width: 20px; height: 20px; margin-left: 4px; padding: 0 6px; border-radius: 99px; background: #eef0ea; color: #3d4741; font-size: 12px; font-weight: 800; }
.crm-headchat-n { background: #6d4bd8; color: #fff; }
.crm-btn.crm-headchat.off, .crm-btn.crm-headchat:disabled { opacity: 1; border-style: dashed; background: #f6f6f3; color: #5f6a63; cursor: not-allowed; font-weight: 600; }
/* «Етап змінено автоматично» under the progress line (Mark «109А»). */
.crm-root .crm-autostage { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; flex: 1 1 100%; margin: 2px 0 0; padding: 8px 10px; border-radius: 8px; background: #eef5e4; color: #24302a; font-size: 13px; }
.crm-autostage-tag { padding: 1px 7px; border-radius: 99px; background: var(--forest-2); color: #fff; font-size: 11px; font-weight: 800; letter-spacing: .02em; }
/* «Коротко про угоду» is the block's own title (Mark 2026-11-29: no «Деталі» above it). */
.crm-ainote-title { margin: 0; font-size: 16px; font-weight: 800; line-height: 1.25; }
.crm-profile-noted { position: relative; }
.crm-saved-corner { position: absolute; top: 10px; right: 14px; }
/* «Клієнти» filters and «Що шукав» (Mark's plan, 29.11). */
.crm-client-filters .crm-searchbox.wide { flex: 1 1 320px; }
.crm-sought-box { flex: 0 1 260px; }
.crm-sought-pre { position: absolute; left: 12px; color: var(--muted); font-size: 13px; font-weight: 700; pointer-events: none; }
.crm-sought-box input { padding-left: 62px; }
.crm-sought-box.on input, .crm-client-filters select.on { border-color: var(--forest-2); box-shadow: inset 0 0 0 1px var(--forest-2); }
.crm-client-sought { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crm-client-sought .crm-machine-line { display: block; overflow: hidden; text-overflow: ellipsis; }
.crm-machine-tag { display: inline-block; padding: 0 6px; border-radius: 99px; background: #e3ebf4; color: var(--crm-info); font-size: 11px; font-weight: 750; }
.crm-machine-tag.got { background: #dcefe2; color: var(--crm-ok); }
.crm-client-row > .crm-cell { min-width: 0; }
@media (max-width: 760px) {
  /* On a phone the filters fold under one button, the search stays. */
  .crm-client-filters .crm-searchbox.wide { flex: 1 1 0; }
  .crm-client-filters:not(.open) > :not(.crm-searchbox.wide):not(.crm-filters-btn) { display: none; }
  .crm-client-filters.open .crm-sought-box { flex: 1 1 100%; }
  .crm-filters-btn.on { border-color: var(--forest-2); box-shadow: inset 0 0 0 1px var(--forest-2); }
}
/* «Агропродукція» (Mark «22А», 28.11): the deals of the market traders. */
.crm-titleline .crm-kindseg { align-self: center; }
.crm-agro .crm-profile-head { align-items: center; }
.crm-agro-sum { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-left: auto; padding: 6px 12px; border-radius: 8px; background: #dcefe2; color: var(--crm-ok); font-size: 13px; }
.crm-agro-sum b { font-size: 16px; }
.crm-agro-sum.neg { background: #fbeceb; color: var(--danger); }
.crm-agro-sum.muted { background: #f3efe6; color: var(--muted); }
.crm-agro-sides { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.crm-agro-side { display: flex; flex-direction: column; gap: 3px; min-width: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.crm-agro-side.empty { border-style: dashed; background: transparent; }
.crm-agro-side h4, .crm-agro-leg h4 { margin: 0 0 4px; color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.crm-agro-side > b { color: var(--ink); font-size: 15px; }
.crm-agro-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.crm-agro-legs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 20px; margin-top: 10px; }
.crm-agro-leg-grid { display: grid; grid-template-columns: minmax(0, 1fr) 156px 92px; gap: 10px; align-items: start; }
.crm-agro-loss { margin: 10px 0 0; color: var(--muted); font-size: 13px; }
.crm-agro-loss.warn { color: var(--danger); font-weight: 700; }
.crm-agro-route .crm-deal-log-row:first-of-type { margin-top: 10px; }
.crm-deal-trip { display: block; min-width: 0; overflow-wrap: anywhere; }
.crm-agro-line > span:first-child { min-width: 0; }
.crm-agro-diff { color: var(--crm-ok); font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.crm-agro-diff.neg { color: var(--danger); }
@media (max-width: 760px) {
  .crm-agro-sum { margin-left: 0; }
  .crm-agro-sides, .crm-agro-legs { grid-template-columns: minmax(0, 1fr); }
  .crm-agro-leg-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .crm-agro-leg-grid > :first-child { grid-column: 1 / -1; }
}

/* «Розмова завершена · що далі?» after a call (Б4, 29.11). Laptop: a panel at the top right;
   phone: the whole screen with the buttons at the bottom, like the mockup boards AfterCall(Mobile). */
.crm-after { position: fixed; top: 70px; right: 24px; z-index: 70; width: min(500px, calc(100vw - 32px)); max-height: calc(100vh - 90px); display: flex; border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: 0 18px 44px rgba(24, 60, 47, .22); font-size: 14px; animation: crm-pop-in .25s ease-out; }
.crm-after-form { display: flex; flex-direction: column; width: 100%; min-height: 0; }
.crm-after-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 18px 0; }
.crm-after-head h2 { margin: 0 0 2px; font-size: 19px; font-weight: 800; letter-spacing: -.01em; }
.crm-after-x { width: 36px; height: 36px; flex: none; border: 0; border-radius: 8px; background: #f1f2ee; color: var(--muted); font-size: 20px; line-height: 1; cursor: pointer; }
.crm-after-body { display: flex; flex-direction: column; gap: 12px; padding: 12px 18px; overflow-y: auto; min-height: 0; }
.crm-after-ai { display: grid; gap: 4px; padding: 12px 14px; border-radius: 10px; background: #f6f7f3; }
.crm-after-ai p { margin: 0; line-height: 1.4; }
.crm-after-ai.wait p { color: var(--muted); }
.crm-after-field { display: flex; flex-direction: column; gap: 4px; margin: 0; }
.crm-after-field > span { color: var(--muted); font-size: 12.5px; font-weight: 700; }
.crm-after-field input, .crm-after-field select { min-height: 42px; font-size: 14.5px; }
.crm-after-next { font-weight: 700; border: 2px solid var(--forest) !important; }
.crm-after-tag { color: #6f5300; font-size: 12px; font-weight: 600; }
.crm-after-miss { color: var(--danger); font-weight: 600; }
.crm-after-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.crm-after-chips input[type="date"] { width: auto; min-height: 38px; }
.crm-after-chip { min-height: 38px; padding: 0 12px; border: 1px solid var(--line); border-radius: 99px; background: #fff; color: var(--forest); font: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer; }
.crm-after-chip[aria-pressed="true"] { border-color: var(--forest); background: var(--forest); color: #fff; font-weight: 800; }
.crm-after-money { display: grid; grid-template-columns: minmax(0, 1fr) 96px; gap: 8px; }
.crm-after-more { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.crm-after-more > span { font-size: 13px; font-weight: 700; color: #3d4741; }
.crm-after-add { min-height: 36px; padding: 0 12px; border: 1px dashed #b9c1b6; border-radius: 99px; background: transparent; color: var(--forest); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.crm-after-note { margin: 0; padding: 10px 12px; border-radius: 10px; background: #eef0ea; color: #3d4741; }
.crm-after-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 18px 16px; border-top: 1px solid #eef0ea; }
.crm-after-actions { display: flex; gap: 8px; flex: none; }
.crm-after-actions .crm-btn { min-height: 44px; }
@media (max-width: 640px) {
  .crm-after { inset: 0; width: auto; max-height: none; border: 0; border-radius: 0; background: var(--cream); animation: none; }
  .crm-after-head { padding: 14px 16px 12px; background: #fff; border-bottom: 1px solid var(--line); }
  .crm-after-head h2 { font-size: 20px; }
  .crm-after-body { flex: 1; padding: 12px 16px; }
  .crm-after-foot { padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--line); }
  .crm-after-foot > .crm-small { display: none; }
  .crm-after-actions { display: grid; grid-template-columns: 1fr 1.6fr; width: 100%; }
  .crm-after-actions .crm-btn { min-height: 52px; border-radius: 12px; font-size: 15px; }
  body.crm-after-open { overflow: hidden; }
}
@media (prefers-reduced-motion: reduce) { .crm-after { animation: none; } }
.crm-menu-label { padding: 6px 12px 4px; color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.crm-assign-menu { max-height: 320px; overflow-y: auto; }
.crm-tips { border-color: #ecd27a; background: #fdf8e4; }
.crm-tip { display: grid; gap: 8px; padding: 10px 0; border-top: 1px solid #f0e3b0; }
.crm-tip:first-of-type { border-top: 0; }
.crm-tip p { margin: 0; line-height: 1.4; }
.crm-tip .crm-btn { justify-self: start; }

/* Б4 «Закупівля після купівлі»: contract, invoice, payment and delivery marks. */
.buy-after { display: grid; gap: 6px; padding: 12px; border: 1px solid #eef0ea; border-radius: 10px; background: #fbfbf7; }
.buy-after > b { color: var(--ink); font-size: 13.5px; }
.buy-steps { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.buy-step { display: inline-flex; align-items: center; min-height: 30px; padding: 4px 10px; border: 1px solid #dfe3da; border-radius: 8px; background: #fff; color: #3d4741; font-size: 12.5px; font-weight: 700; }
button.buy-step { cursor: pointer; font-family: inherit; }
button.buy-step:hover { border-color: var(--forest); }
.buy-step.on { border-color: #bfdcc9; background: #dcefe2; color: var(--crm-ok); }
.buy-step.ship { border-color: #dcd2f1; background: #ece6f7; color: #4b2f86; }
.buy-step.none { border-style: dashed; color: #6b746d; font-weight: 600; }
@media (max-width: 640px) {
  .buy-after .buy-steps { display: grid; grid-template-columns: 1fr 1fr; }
  .buy-after .buy-step { min-height: 44px; justify-content: center; font-size: 14px; }
}
/* Б4 «Логістика»: CMR, invoice and other papers of a request. */
.log-files { display: grid; gap: 8px; padding-top: 10px; border-top: 1px solid #eef0ea; }
.log-file { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.log-file-pic { display: grid; place-items: center; width: 52px; height: 52px; overflow: hidden; border-radius: 8px; background: #eef0ea; color: #8a2f2f; font-size: 12px; font-weight: 800; text-decoration: none; }
.log-file-pic img { width: 100%; height: 100%; object-fit: cover; }
.log-file-pic.pdf { background: #fde2e2; }
.log-file-main { display: grid; min-width: 0; }
.log-file-main a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.log-file-add { display: flex; flex-wrap: wrap; gap: 6px; }
.log-file-add label { cursor: pointer; }
@media (max-width: 640px) { .log-file-add label { flex: 1 1 0; min-height: 44px; justify-content: center; } }
.log-week-day { display: grid; gap: 8px; }
.log-week-day h3 { margin: 6px 0 0; font-size: 15px; }

/* «Запропонувати нову техніку» in «Клієнти» (Mark, 2026-12-02, «Нагадати менеджеру») */
.crm-nmbar { display: grid; gap: 10px; margin-top: 14px; padding: 14px 16px; border: 1px solid var(--forest-2); border-radius: 12px; background: #fff; box-shadow: 0 6px 18px rgba(24, 59, 43, .08); }
.crm-nmbar-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.crm-nmbar-head b { color: var(--forest-2); font-size: 15px; }
.crm-nmbar-fields { display: flex; flex-wrap: wrap; gap: 10px 12px; }
.crm-nmbar-fields label { display: grid; gap: 4px; color: var(--muted); font-size: 13px; font-weight: 700; }
.crm-nmbar-fields label.grow { flex: 1 1 360px; }
.crm-nmbar-fields input { min-height: 40px; }
.crm-nmbar-act { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; font-size: 13px; }
.crm-nmbar-act > span { margin-right: auto; }
.crm-clients.picking .crm-clients-head, .crm-clients.picking .crm-client-row { grid-template-columns: 26px minmax(0, 1.5fr) minmax(0, .9fr) 120px 96px minmax(0, 1.3fr) 140px 44px; }
.crm-client-row.picked { border-color: var(--forest-2); box-shadow: inset 0 0 0 1px var(--forest-2); }
.crm-nm-pick { display: grid; place-items: center; align-self: center; width: 26px; height: 26px; line-height: 0; cursor: pointer; }
.crm-nm-pick input { display: block; width: 18px; height: 18px; margin: 0; accent-color: var(--forest-2); cursor: pointer; }
.crm-nm-pick input:disabled { cursor: not-allowed; opacity: .45; }
@media (max-width: 900px) {
  .crm-clients.picking .crm-client-row { grid-template-columns: 26px minmax(0, 1fr) auto; }
  .crm-clients.picking .crm-client-row .crm-cell:last-child { grid-column: 3; }
  .crm-nmbar-act > span { flex: 1 1 100%; }
  .crm-nmbar-act .crm-btn { flex: 1 1 auto; }
}
/* «Оплачено» і «Поставка» (Mark, 02.12, «Клієнт оплатив»): exact marks inside the wide stages. */
.crm-marks { display: flex; flex-wrap: wrap; gap: 10px 28px; align-items: center; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.crm-mark { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.crm-mark-label { color: var(--muted); font-size: 12.5px; font-weight: 700; }
.crm-mark .crm-seg button { min-height: 28px; padding: 0 10px; font-size: 12.5px; }
.crm-mark-ship { border: 0; cursor: pointer; font-size: 12.5px; padding: 4px 11px; }
.crm-deal-marks { display: flex; flex-wrap: wrap; gap: 4px; }
.crm-pill.log-unpaid { background: #f3f1ec; color: var(--muted); }
.log-paid-warn { margin: 8px 0; }
@media (max-width: 900px) {
  .crm-marks { gap: 10px; }
  .crm-mark { flex: 1 1 100%; }
  .crm-mark .crm-seg { display: flex; flex: 1 1 100%; }
  .crm-mark .crm-seg button { flex: 1; }
}
.crm-deal-marks .crm-pill { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }

/* «Каталог техніки» 02.12: filters by type, brand, freshness; the card leads with how current
   the machine is, the buyer's verdict and the chat comments. */
.cat-filters { grid-template-columns: repeat(auto-fit, minmax(150px, max-content)); }
.cat-filters .sell-search { grid-column: 1 / -1; }
.cat-row { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) 190px; }
.cat-state { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.cat-fresh { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.cat-fresh::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.cat-fresh.ok { background: #e3f2e7; color: #1f6b3a; }
.cat-fresh.mid { background: #fbf0d9; color: #8a5300; }
.cat-fresh.old { background: #eef0ea; color: #6a736c; }
.cat-fresh-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 9px 12px; border-left: 4px solid #b9c0b6; border-radius: 8px; background: #f6f7f3; font-size: 13.5px; }
.cat-fresh-line.ok { border-left-color: #2e8b4e; background: #eef7f0; }
.cat-fresh-line.mid { border-left-color: #d89a2b; background: #fdf6e8; }
.cat-fresh-line > span { color: #5c665f; }
.cat-ad { flex-basis: 100%; font-size: 12.5px; }
.cat-ad.on { color: #1f6b3a; }
.cat-ad.off { color: var(--danger); font-weight: 700; }
.cat-verdict { display: grid; gap: 8px; padding: 11px 12px; border: 1px solid #e2e6dd; border-radius: 10px; background: #fff; }
.cat-verdict.none { gap: 2px; background: #f6f7f3; font-size: 13.5px; }
.cat-verdict.rejected { border-color: #f1c8bd; background: #fdf3f0; }
.cat-verdict-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cat-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px 14px; margin: 0; }
.cat-facts div { min-width: 0; }
.cat-facts dt { color: #5c665f; font-size: 11.5px; }
.cat-facts dd { margin: 1px 0 0; font-size: 14.5px; font-weight: 750; overflow-wrap: anywhere; }
.cat-comment { display: grid; gap: 2px; padding: 8px 10px; border-radius: 9px; background: #f6f7f3; }
.cat-comment.first { background: #f1edf9; }
.cat-comment p { margin: 0; white-space: pre-wrap; font-size: 13.5px; line-height: 1.4; overflow-wrap: anywhere; }
@media (max-width: 900px) {
  .cat-filters { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .cat-filters .cat-years, .cat-filters .cat-check { grid-column: span 1; }
  .cat-row { grid-template-columns: minmax(0, 1fr); }
}

/* Calls table (Mark 2026-12-02): time over the day in the first column, one «client · manager» column, quick chips. */
.crm-rec-when { display: grid; line-height: 1.2; }
.crm-rec-when b { font-size: 14px; }
.crm-rec-when span { color: var(--muted); font-size: 11.5px; }
.crm-rec-sub { overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.crm-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px; }
.crm-chips .crm-chip { min-height: 32px; padding: 0 12px; border-radius: 99px; }
.crm-chips .crm-chip.on { background: var(--forest); color: #fff; }
@media (max-width: 760px) {
  .crm-rec-sub { display: none; }
  .crm-rec-when { display: flex; align-items: baseline; gap: 4px; grid-area: when; }
  .crm-chips { flex-wrap: nowrap; overflow-x: auto; }
}

/* ---------- Компактна картка угоди (Mark 2026-12-02) ----------
   Two columns on a wide screen: the work with machines and the talks on the left, the short
   facts (what next, the note, fields, logistics) on the right. Each column stacks on its own,
   so a short block never leaves a hole next to a tall one. Narrower than 1180px the columns
   dissolve into one list where «Що далі» goes first. */
.crm-dealgrid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, 400px); gap: 16px; align-items: start; }
.crm-dealcol { display: grid; gap: 16px; min-width: 0; align-content: start; }
.crm-dealgrid > .crm-trashbar, .crm-dealgrid > :not(.crm-dealcol) { grid-column: 1 / -1; }
/* Mark 03.12: «Коротко про угоду» first and on the whole width, then the machines on the whole
   width, then the talks with «Що далі» beside them. */
.crm-dealfirst { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; min-width: 0; }
.crm-dealfirst > [data-ux] { scroll-margin-top: var(--dealnav-offset, 150px); }
.crm-dealcol > [data-ux] { scroll-margin-top: var(--dealnav-offset, 150px); }
.crm-dealcol-side .crm-plan-cols { grid-template-columns: minmax(0, 1fr); gap: 14px; }
.crm-dealcol-side .crm-plan-col + .crm-plan-col { padding-left: 0; border-left: 0; padding-top: 12px; border-top: 1px solid var(--line); }
.crm-dealcol-side .crm-profile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.crm-dealcol-side .crm-profile-field.wide { grid-column: 1 / -1; }
.crm-dealcol-side .crm-about-head { flex-wrap: wrap; }
.crm-dealcol-side .crm-rem-pick { flex-wrap: wrap; }
.crm-dealcol-main .crm-offer-grid { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 1180px) {
  .crm-dealgrid { grid-template-columns: minmax(0, 1fr); }
  .crm-dealcol { display: contents; }
  .crm-dealgrid .crm-dealfirst { display: contents; }
  .crm-dealgrid [data-ux="details"] { order: 1; }
  .crm-dealgrid [data-ux="items"] { order: 2; }
  .crm-dealgrid [data-ux="plan"] { order: 3; }
  .crm-dealgrid [data-ux="talks"] { order: 4; }
  .crm-dealgrid [data-ux="ship"] { order: 5; }
  .crm-dealgrid [data-ux="history"] { order: 6; }
  .crm-dealgrid > :not(.crm-dealcol) { order: 9; }
  .crm-dealcol-side .crm-plan-cols { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
  .crm-dealcol-side .crm-plan-col + .crm-plan-col { padding-top: 0; border-top: 0; }
  .crm-dealcol-side .crm-profile-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); }
}
/* On a phone «Що далі» still goes first (Mark «19Б», 20.11). */
@media (max-width: 650px) { .crm-dealgrid [data-ux="plan"] { order: 0; } }

/* The head: facts in one even line, the stage line lower. */
.crm-root .crm-dealhead-v2 .crm-dh-facts { gap: 8px 20px; padding-top: 10px; }
.crm-root .crm-dealhead-v2 .crm-dh-facts dd, .crm-root .crm-dealhead .crm-dh-facts dd .crm-link-strong { font-size: 14.5px; }
.crm-root .crm-dealhead-v2 .crm-dh-facts dd { min-height: 24px; }
.crm-root .crm-dealhead-v2 .crm-stagebar { padding: 8px 14px; }
.crm-root .crm-dealhead-v2 .crm-steps i { width: 24px; height: 24px; font-size: 11.5px; }
.crm-root .crm-dealhead-v2 .crm-steps li + li::before { top: 11px; }
.crm-root .crm-dealhead-v2 .crm-stagebar ol.crm-steps button { gap: 4px; font-size: 12px; }

/* «Запити під угоду»: the requests as links in one row. */
.crm-reqstrip { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; background: #fbfbf8; }
.crm-reqstrip-label { color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.crm-reqstrip-act { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-left: auto; }
.crm-reqchip { display: inline-flex; align-items: stretch; max-width: 100%; border: 1px solid #cfdccb; border-radius: 10px; background: #fff; overflow: hidden; }
.crm-reqchip-go { display: inline-flex; align-items: center; gap: 8px; min-width: 0; padding: 5px 4px 5px 10px; border: 0; background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.crm-reqchip-go:hover { background: #f1f6ee; }
.crm-reqchip-go.off { cursor: default; }
.crm-reqchip-txt { display: grid; min-width: 0; line-height: 1.2; }
.crm-reqchip-txt b { overflow: hidden; font-size: 13.5px; text-overflow: ellipsis; white-space: nowrap; max-width: 280px; }
.crm-reqchip-txt .crm-sub { font-size: 11.5px; }
.crm-reqchip-arrow { color: var(--forest); font-size: 20px; font-weight: 800; line-height: 1; }
.crm-reqchip-x { padding: 0 9px; border: 0; border-left: 1px solid #e6ebe2; background: none; color: #8a938c; cursor: pointer; }
.crm-reqchip-x:hover { color: #b3261e; background: #fbefee; }

/* The link field: link, what to find out, «Закупщику». */
.crm-root .crm-linkpaste { grid-template-columns: auto minmax(0, 1.3fr) minmax(0, 1fr) auto; }
.crm-root .crm-linkpaste .crm-small { grid-column: 2 / -1; line-height: 1.45; }
.crm-root .crm-linkpaste .crm-link { padding: 0; border: 0; background: none; color: var(--forest); font: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.crm-offer-empty { margin: 0; }
@media (max-width: 760px) {
  .crm-root .crm-linkpaste { grid-template-columns: auto minmax(0, 1fr); }
  .crm-root .crm-linkpaste input[name="ask"], .crm-root .crm-linkpaste .crm-btn, .crm-root .crm-linkpaste .crm-small { grid-column: 1 / -1; }
  .crm-reqstrip-act { margin-left: 0; }
  .crm-reqchip-txt b { max-width: 210px; }
}
.crm-dealcol-side .crm-sum-other { display: grid; gap: 8px; }
.crm-dealcol-side .crm-rem-pick input[type="date"], .crm-dealcol-side .crm-rem-pick input[type="time"] { flex: 1 1 110px; }
.crm-dealcol-side .crm-rem-pick .crm-btn.primary { margin-left: auto; }
@media (max-width: 650px) {
  /* The stage select names the stage; the line under it keeps only the dots, the words overlapped. */
  .crm-root .crm-dealhead-v2 .crm-steps span { display: none; }
  .crm-root .crm-dealhead-v2 .crm-stagebar ol.crm-steps button { gap: 0; }
}

/* «Що далі» beside the talks: the reminder text gets the full width with its buttons under it,
   the day chips share one line and the date, time and «Нагадати» the next one. */
.crm-dealcol-side .crm-rem { grid-template-columns: minmax(0, 1fr); }
.crm-dealcol-side .crm-rem .crm-ai-acts { grid-column: 1; grid-row: auto; margin-top: 6px; }
.crm-dealcol-side .crm-rem-pick > .crm-small { display: none; }
.crm-dealcol-side .crm-rem-pick .crm-chip { flex: 1 1 auto; padding: 0 8px; font-size: 13px; }
.crm-dealcol-side .crm-rem-pick input[type="date"] { flex: 1 1 130px; }
.crm-dealcol-side .crm-rem-pick input[type="time"] { flex: 0 1 100px; }
.crm-dealcol-side .crm-rem-pick .crm-btn.primary { margin-left: 0; }

/* «Господарства» (Mark 2026-12-03): the base of farms from 1С next to the clients */
.crm-titleline .crm-client-tabs { align-self: center; }
.crm-farms .crm-clients-head, .crm-farm-row { grid-template-columns: minmax(0, 1.5fr) minmax(0, .8fr) minmax(0, .8fr) 56px 80px minmax(0, 1.5fr) 110px; }
.crm-list-pager { margin-top: 8px; }
.crm-farmav { background: #e8efdc; color: var(--forest); }
.crm-farm-people { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.crm-farm-person { display: grid; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); cursor: pointer; text-align: left; font: inherit; }
.crm-farm-person b { color: var(--forest-2); }
.crm-farm-person:hover { border-color: var(--forest); }
.crm-farm-buys { display: grid; }
.crm-farm-buy { display: grid; grid-template-columns: 92px minmax(0, 1fr) 140px 80px; gap: 12px; align-items: baseline; padding: 9px 0; border-bottom: 1px solid #eef0ea; }
.crm-farm-buy b { display: block; }
.crm-farm-buy.refused b { color: var(--muted); text-decoration: line-through; }
.crm-meta .crm-link-strong { padding: 0; font: inherit; font-weight: 700; }
@media (max-width: 900px) {
  .crm-farm-row { grid-template-columns: minmax(0, 1fr); }
  .crm-farm-buy { grid-template-columns: 80px minmax(0, 1fr); gap: 2px 10px; }
  .crm-farm-buy > span:nth-child(n+3) { grid-column: 2; }
  .crm-farm-buy > span:last-child:empty { display: none; }
}

/* Whose number it is (Mark 2026-12-03): a colleague's client and deals, read only. */
.crm-ownerband { align-items: flex-start; margin: 10px 0 0; }
.crm-owner-body { display: grid; gap: 6px; min-width: 0; }
.crm-owner-deals { list-style: none; margin: 2px 0 0; padding: 0; display: grid; gap: 4px; }
.crm-owner-deal { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; padding: 6px 8px; border-radius: 8px; background: rgba(255, 255, 255, 0.6); }
.crm-owner-deal.closed { opacity: 0.75; }
.crm-owner-title { min-width: 0; overflow-wrap: anywhere; }
.crm-ownerband > .crm-btn { flex: none; }
@media (max-width: 640px) { .crm-ownerband { flex-direction: column; } }

/* Call card: the client and the deal are two separate, differently coloured blocks (Mark 2026-12-03). */
.crm-link-tag { justify-self: start; padding: 2px 9px; border-radius: 99px; font-size: 11.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.crm-link-tag.client { background: #e3edf8; color: #1e4e79; }
.crm-link-tag.deal { background: #dcefd9; color: #1d5a2c; }
.crm-link-client, .crm-link-deal { padding: 8px; border-radius: 10px; }
.crm-link-client { background: #f2f7fc; }
.crm-link-deal { background: #f1f8ef; }
.crm-link-client .crm-item { border-left: 4px solid #3b82c4; }
.crm-link-deal .crm-item { border-left: 4px solid #3f9a4f; }
.crm-link-client .crm-item > .grow > b, .crm-link-deal .crm-item > .grow > b { font-weight: 700; }

/* Bottom «now playing» bar: stays on every page while a call recording plays or is paused (Mark 2026-12-03). */
.crm-np { position: fixed; left: 50%; bottom: 12px; z-index: 60; display: flex; flex-direction: column; gap: 6px; width: min(720px, calc(100vw - 24px)); padding: 10px 14px 10px; transform: translateX(-50%); border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: 0 8px 28px rgba(20, 40, 28, .22); font-size: 13px; }
.crm-np button { border: 0; font-family: inherit; cursor: pointer; }
.crm-np-top { display: flex; align-items: center; gap: 8px; }
.crm-np-play { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 99px; background: var(--forest); color: var(--lime); }
.crm-np-title { display: grid; flex: 1 1 auto; min-width: 0; padding: 0 4px; background: none; color: var(--ink); text-align: left; line-height: 1.3; }
.crm-np-title b, .crm-np-title span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crm-np-title b { font-size: 14px; }
.crm-np-title span { color: var(--muted); font-size: 12px; }
.crm-np-skip, .crm-np-rate { flex: none; min-height: 32px; padding: 0 10px; border-radius: 8px; background: #eef0ea; color: var(--forest); font-size: 12.5px; font-weight: 700; }
.crm-np-close { flex: none; width: 34px; height: 34px; border-radius: 99px; background: #eef0ea; color: #3d4741; font-size: 15px; }
.crm-np-close:hover { background: #fde2e2; color: #9b1c1c; }
.crm-np-line { display: flex; align-items: center; gap: 10px; padding: 0 2px; }
.crm-np-cur, .crm-np-dur { flex: none; min-width: 34px; color: #3d4741; font-size: 12px; white-space: nowrap; }
.crm-np-dur { text-align: right; }
.crm-np-seek { flex: 1 1 auto; border: 0; padding: 0; box-shadow: none; border-radius: 0; min-height: 0; min-width: 0; height: 18px; margin: 0; background: transparent; accent-color: var(--forest); -webkit-appearance: none; appearance: none; cursor: pointer; --p: 0%; }
.crm-np-seek::-webkit-slider-runnable-track { height: 6px; border-radius: 99px; background: linear-gradient(to right, var(--forest) var(--p), #dfe3d9 var(--p)); }
.crm-np-seek::-moz-range-track { height: 6px; border-radius: 99px; background: #dfe3d9; }
.crm-np-seek::-moz-range-progress { height: 6px; border-radius: 99px; background: var(--forest); }
.crm-np-seek::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; margin-top: -5px; border: 2px solid #fff; border-radius: 99px; background: var(--forest); box-shadow: 0 1px 4px rgba(0,0,0,.35); }
.crm-np-seek::-moz-range-thumb { width: 14px; height: 14px; border: 2px solid #fff; border-radius: 99px; background: var(--forest); }
body:has(.crm-np) { padding-bottom: 96px; }
@media (max-width: 760px) {
  .crm-np { bottom: 8px; padding: 8px 10px; }
  body:has(.crm-tabbar button) .crm-np { bottom: calc(60px + env(safe-area-inset-bottom)); }
  .crm-np-skip { padding: 0 7px; }
  body:has(.crm-np) { padding-bottom: 150px; }
}

/* «Змінити відповідального» in the client card (Mark 2026-12-04). */
.crm-ownerform { display: grid; gap: 8px; margin-top: 12px; padding: 12px; border-radius: 10px; background: #e6efe9; max-width: 640px; }
.crm-ownerform label { display: grid; gap: 4px; font-size: 13px; font-weight: 600; }
.crm-ownerform select { max-width: 360px; }
/* Давність контакту (Mark 2026-12-04): зелена до 30 днів, жовта до 90, червона від 90. */
.crm-age { display: inline-block; flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--crm-ok); margin-top: 4px; }
.crm-age.mid { background: #e0a526; }
.crm-age.bad { background: var(--danger); }
.crm-contact-cell { display: flex; align-items: flex-start; gap: 8px; }
.crm-age-text { display: flex; flex-direction: column; min-width: 0; }
.crm-age-text .crm-sub { font-size: 12px; }
.crm-recall-row { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 6px 10px; padding: 10px 0; border-top: 1px solid var(--line, #e6e8e2); }
.crm-recall-row:first-of-type { border-top: 0; }
.crm-recall-row.off .crm-recall-who { opacity: .6; }
.crm-recall-who { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.crm-recall-who .crm-home-title { text-align: left; }
.crm-recall-act { display: flex; flex-wrap: wrap; gap: 6px; width: 100%; padding-left: 20px; }
.crm-recall-act .crm-btn svg { width: 14px; height: 14px; }
/* Шлях угоди з 5 кроків (Mark 2026-12-04): контакт, техніка, запит, пропозиція, крок з датою. */
.crm-path { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 10px; padding: 8px 12px; border-radius: 12px; background: #f4f6f0; }
.crm-path .crm-btn svg { width: 14px; height: 14px; }
/* Квести «Розбуди клієнта» і «Уся п'ятірка» (Марк, 04.12). */
.crm-quest { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; width: 100%; padding-left: 20px; font-size: 12px; }
.crm-quest > i { color: var(--muted, #8a948e); font-style: normal; }
.crm-quest-step { display: inline-flex; align-items: center; gap: 3px; padding: 2px 8px; border-radius: 999px; border: 1px dashed #c9d2cc; color: #5d6a63; background: #fff; }
.crm-quest-step b { font-weight: 600; color: #8a6d1f; }
.crm-quest-step.done { border: 1px solid #9fcdb0; background: #e9f6ee; color: #1f5c38; }
.crm-quest-step.done b { color: #1f5c38; }
.crm-quest-prize { margin-left: auto; padding: 2px 8px; border-radius: 999px; background: #fff6dc; color: #8a6d1f; font-weight: 600; white-space: nowrap; }
.crm-quest-prize.done { background: #f3d77a; color: #4a3a0a; }
.crm-quest-five { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 2px 0 6px; padding: 8px 10px; border-radius: 10px; background: #fbf7ea; border: 1px solid #efe2b5; font-size: 13px; }
.crm-quest-five.done { background: #fdf1c7; border-color: #e6c95a; }
.crm-quest-carry { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line, #e6e8e2); }
.crm-quest-carry-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.crm-quest-carry-row .crm-quest { padding-left: 0; }

/* ---------- Лічильник перлин угорі (Марк, 04.12) ---------- */
.prl-wrap { position: relative; }
.prl-wrap[hidden] { display: none; }
.prl-btn { display: inline-flex; align-items: center; gap: 4px; height: 42px; padding: 0 14px; border: 1px solid #b9aee0; border-radius: 21px; background: #f4f0ff; color: #3d2f6b; font-size: 14px; cursor: pointer; }
.prl-btn:hover, .prl-btn[aria-expanded="true"] { border-color: #8d7fc4; background: #ebe4ff; }
.prl-btn:focus-visible { outline: 3px solid var(--lime); outline-offset: 2px; }
.prl-btn .crm-aqua-pearl { width: 16px; height: 16px; }
.prl-today { margin-left: 4px; padding: 1px 7px; border-radius: 10px; background: #e2f3e8; color: #1f5c38; font-size: 12px; font-weight: 700; }
.prl-pop { position: absolute; left: 50%; top: -6px; transform: translateX(-50%); color: #6a4fc0; font-weight: 850; font-size: 15px; pointer-events: none; }
.prl-pop.go { animation: prl-up 2s ease-out forwards; }
@keyframes prl-up { 0% { opacity: 0; transform: translate(-50%, 8px); } 15% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -26px); } }
.prl-panel { position: absolute; top: calc(100% + 10px); right: -20px; z-index: 40; width: min(380px, calc(100vw - 24px)); max-height: min(70vh, 640px); overflow: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); box-shadow: var(--shadow); font-size: 13px; }
.prl-head { display: flex; align-items: center; gap: 6px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: #f4f0ff; font-size: 14px; }
.prl-head .crm-aqua-pearl { width: 18px; height: 18px; }
.prl-panel section, .prl-quest { padding: 10px 16px; border-bottom: 1px solid #eef0ea; }
.prl-panel h4 { margin: 0 0 6px; font-size: 13px; }
.prl-panel ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.prl-panel li { display: flex; justify-content: space-between; gap: 10px; }
.prl-panel li b { color: #3d2f6b; white-space: nowrap; }
.prl-panel li small { color: var(--muted, #6b7a73); }
.prl-quest { display: grid; gap: 3px; background: #fbf7ea; }
.prl-empty { margin: 0; color: var(--muted, #6b7a73); }
.prl-panel footer { padding: 10px 16px; }
@media (max-width: 640px) { .prl-wrap { order: 3; } .prl-btn { height: 38px; padding: 0 10px; } .prl-today { display: none; } }
/* «Квести дня» в основній колонці Головної (Марк, 04.12): до п'яти завдань, перлини біля
   кожного, смуга прогресу й фініш. */
.crm-quests { display: grid; gap: 10px; margin: 0 0 16px; }
.crm-quests-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.crm-quests-head h3 { margin: 0; font-size: 18px; }
.crm-quests-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 12px; align-items: start; }
.crm-quests-grid > .crm-home-block { margin: 0; }
.crm-quest-card { border-color: #d9cdf3; background: linear-gradient(#faf7ff, #fff 90px); }
.crm-quest-card.is-won { border-color: #b7dfc9; background: linear-gradient(#eefaf3, #fff 120px); }
.crm-quest-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.crm-quest-head h3 { margin: 0 0 2px; }
.crm-quest-max { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 99px; background: #efe8ff; color: #4b3a86; font-size: 13px; font-weight: 800; white-space: nowrap; }
.crm-quest-bar { position: relative; height: 22px; margin: 8px 0 6px; border-radius: 99px; background: #eceff0; overflow: hidden; }
.crm-quest-bar i { position: absolute; inset: 0 auto 0 0; border-radius: 99px; background: linear-gradient(90deg, #8f7be0, #b39cf5); transition: width .4s; }
.crm-quest-bar.done i { background: linear-gradient(90deg, #2f9a68, #5cc48f); }
.crm-quest-bar b { position: relative; display: block; text-align: center; font-size: 12.5px; line-height: 22px; color: #22313a; }
.crm-quest-win { display: flex; align-items: center; gap: 10px; margin: 6px 0; padding: 10px 12px; border-radius: 10px; background: #e3f5ea; }
.crm-quest-win > div { display: grid; gap: 2px; flex: 1; }
.crm-quest-win-icon { font-size: 26px; }
.crm-quest-win-sum, .crm-quest-success b { white-space: nowrap; }
.crm-quest-win-sum { display: inline-flex; align-items: center; gap: 5px; font-size: 18px; font-weight: 800; color: #1f6b46; }
.crm-quest-success { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 14px; background: linear-gradient(100deg, #e3f5ea, #f3eeff); border: 1px solid #b7dfc9; }
.crm-quest-success > span { font-size: 34px; }
.crm-quest-success > div { display: grid; gap: 3px; flex: 1; }
.crm-quest-success > div > b { font-size: 18px; }
.crm-quest-deal { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line, #e6e8e2); }
.crm-quest-deal.done .crm-recall-who { opacity: .65; }
.crm-quest-check { display: grid; place-items: center; flex: none; width: 20px; height: 20px; border: 2px solid #c9bdf0; border-radius: 6px; color: #fff; font-size: 13px; font-weight: 800; }
.crm-quest-deal.done .crm-quest-check { border-color: #2f9a68; background: #2f9a68; }
.crm-pearl-sm { width: 11px; height: 11px; margin: 0 2px 0 1px; vertical-align: -1px; }
