/* ============================================================
   НАЙДЕНО — страницы: аналитика, воронка, мониторинг, контрагенты
   ============================================================ */

/* ---------- Общие подтабы и таблицы ---------- */
.sub-tabs { display: flex; align-items: center; gap: 4px; padding: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; width: max-content; max-width: 100%; overflow-x: auto; }
.sub-tab { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 11px; border-radius: 8px; color: var(--muted); font-size: 14.5px; font-weight: 650; white-space: nowrap; transition: all .16s ease; }
.sub-tab .icon { width: 14px; height: 14px; }
.sub-tab:hover { color: var(--ink); background: var(--surface-2); }
.sub-tab.is-active { background: var(--brand-soft); color: var(--brand); font-weight: 800; }
.sub-tab span { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 17px; padding: 0 5px; border-radius: 5px; background: rgba(255, 255, 255, .7); font-size: 12px; }
.analytics-tabs-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.analytics-updated { display: inline-flex; align-items: center; gap: 5px; color: var(--muted-2); font-size: 13px; }
.analytics-updated .icon { width: 12px; height: 12px; }
.analytics-table-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 20px 0 12px; }
.analytics-table-head h2 { font-size: 21.5px; letter-spacing: -.03em; }
.analytics-table-head p { font-size: 14.5px; color: var(--muted); margin-top: 3px; }
.table-card { background: var(--surface); border: 1px solid var(--line); border-radius: 15px; overflow: auto; margin-bottom: 16px; box-shadow: 0 1px 2px rgba(21,34,31,.02); }
.data-table { width: 100%; min-width: 780px; border-collapse: collapse; }
.data-table th { padding: 11px 13px; background: var(--surface-2); border-bottom: 1px solid var(--line); text-align: left; font-size: 12.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted-2); font-weight: 800; white-space: nowrap; }
.data-table td { padding: 11px 13px; border-bottom: 1px solid #eef0ea; font-size: 14.5px; color: var(--ink-2); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tbody tr { transition: background .15s ease; }
.data-table tbody tr[data-action] { cursor: pointer; }
.data-table tbody tr:hover { background: var(--brand-tint); }
.table-name { display: flex; align-items: center; gap: 9px; min-width: 205px; }
.table-name > span:last-child { display: flex; flex-direction: column; gap: 1px; }
.table-name b { font-size: 14.5px; font-weight: 700; color: var(--ink); line-height: 1.35; }
.table-name small { font-size: 12.5px; color: var(--muted-2); }
.table-avatar { width: 31px; height: 31px; border-radius: 9px; display: inline-grid; place-items: center; background: var(--brand-soft); color: var(--brand); font-size: 13px; font-weight: 800; flex: none; }
.table-avatar--blue { background: var(--blue-soft); color: var(--blue); }
.table-avatar--lg { width: 40px; height: 40px; border-radius: 11px; font-size: 15px; }
.table-avatar--xl { width: 54px; height: 54px; border-radius: 15px; font-size: 18.5px; }
.table-bar { display: flex; flex-direction: column; gap: 3px; min-width: 110px; }
.table-bar b { font-size: 14px; font-weight: 800; white-space: nowrap; }
.table-bar > span { display: block; width: 100%; height: 4px; background: var(--surface-3); border-radius: 99px; overflow: hidden; }
.table-bar > span i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--brand-2), var(--brand)); }
.data-table .icon-btn { width: 29px; height: 29px; }
.methodology-note { display: flex; align-items: flex-start; gap: 6px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted-2); font-size: 12.5px; }
.methodology-note .icon { width: 12px; height: 12px; margin-top: 1px; }

/* ---------- Charts ---------- */
.chart-wrap { width: 100%; margin: 4px 0 0; }
.line-chart { width: 100%; height: auto; overflow: visible; }
.chart-grid { stroke: #edf0e9; stroke-width: 1; stroke-dasharray: 3 4; }
.chart-label { fill: var(--muted-2); font-size: 13px; font-family: var(--font); font-weight: 600; }
.chart-dot { stroke: #fff; stroke-width: 2; }
.chart-legend { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 8px; border-top: 1px solid #eef0ea; margin-top: 4px; color: var(--muted); font-size: 13px; }
.chart-legend span { display: flex; align-items: center; gap: 5px; }
.chart-legend i { width: 7px; height: 7px; border-radius: 2px; }
.chart-legend__note { color: var(--muted-2); }
.sparkline { width: 100%; height: 34px; }

/* ---------- Analytics ---------- */
.analytics-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.analytics-kpis .kpi-card { min-height: 122px; }
.analytics-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, .85fr); gap: 14px; margin-bottom: 14px; align-items: stretch; }
.analytics-grid--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.analytics-grid--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.analytics-grid .panel { min-width: 0; }
.panel--chart-wide { min-height: 340px; }
.panel--chart-wide .line-chart { margin-top: 4px; }
.hbars { display: flex; flex-direction: column; gap: 3px; padding-top: 4px; }
.hbar { display: flex; align-items: center; gap: 8px; min-height: 30px; }
.hbar__label { width: 126px; flex: none; color: var(--ink-2); font-size: 13.5px; line-height: 1.2; }
.hbar__track { flex: 1; height: 7px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.hbar__track i { display: block; height: 100%; border-radius: 99px; }
.hbar__value { width: 58px; flex: none; text-align: right; font-size: 13px; font-weight: 800; color: var(--ink-2); white-space: nowrap; }
.hbars--compact .hbar__label { width: 98px; font-size: 13px; }
.hbars--compact .hbar__value { width: 48px; font-size: 12.5px; }
.price-dist { display: flex; flex-direction: column; gap: 9px; padding-top: 3px; }
.price-dist__row { display: grid; grid-template-columns: 74px 1fr 30px; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.price-dist__track { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.price-dist__track i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #9ad8c2, var(--brand-2)); }
.price-dist__row b { text-align: right; color: var(--ink-2); font-size: 13px; }
.panel--insights { background: linear-gradient(140deg, #fbfdf9 0%, #f5faf3 100%); border-color: #dce9db; }
.insight-list { display: flex; flex-direction: column; gap: 10px; }
.insight-item { display: flex; align-items: flex-start; gap: 8px; }
.insight-num { font-size: 12px; color: var(--brand); background: var(--brand-soft); border-radius: 5px; padding: 3px 4px; font-weight: 800; flex: none; margin-top: 1px; }
.insight-item p { font-size: 13.5px; line-height: 1.5; color: var(--muted); }
.insight-item p b { color: var(--ink-2); font-weight: 800; }
.panel--insights .btn { margin-top: 14px; }
.analytics-side { display: flex; flex-direction: column; gap: 14px; }

/* Network graph */
.network-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) 330px; gap: 14px; align-items: start; }
.panel--network { min-width: 0; }
.network-wrap { position: relative; background: radial-gradient(circle at 50% 45%, #fbfdf9, #f5f8f1); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.network { width: 100%; height: auto; }
.network-links line { transition: stroke-opacity .2s ease; }
.net-node { cursor: pointer; transition: opacity .18s ease, filter .18s ease; }
.net-node:hover { opacity: .75; filter: drop-shadow(0 4px 8px rgba(21, 34, 31, .14)); }
.net-initials { fill: #fff; font-family: var(--font); font-size: 13px; font-weight: 800; pointer-events: none; }
.net-label { fill: var(--muted); font-family: var(--font); font-size: 12px; font-weight: 600; pointer-events: none; }
.network-legend { position: absolute; left: 10px; bottom: 9px; display: flex; gap: 10px; background: rgba(255, 255, 255, .85); border: 1px solid var(--line); border-radius: 999px; padding: 5px 9px; backdrop-filter: blur(6px); }
.network-legend span { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); font-weight: 600; }
.network-legend i { width: 6px; height: 6px; border-radius: 50%; }
.concentration { display: flex; align-items: center; gap: 13px; }
.concentration b { display: block; font-size: 15px; }
.concentration p { margin-top: 3px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.connection-list { display: flex; flex-direction: column; gap: 1px; }
.connection-list > div { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; padding: 9px 0; border-bottom: 1px solid #eef0ea; font-size: 13px; color: var(--muted); }
.connection-list > div:last-child { border-bottom: 0; }
.connection-list b { color: var(--ink-2); font-weight: 700; }
.connection-list em { font-style: normal; color: var(--brand); font-weight: 700; white-space: nowrap; }
.connection-row { display: flex; align-items: center; gap: 8px; width: 100%; padding: 9px 0; border-bottom: 1px solid #eef0ea; text-align: left; }
.connection-row:last-child { border-bottom: 0; }
.connection-row:hover span { color: var(--brand); }
.connection-row span { flex: 1; color: var(--ink-2); font-size: 13.5px; font-weight: 650; }
.connection-row b { color: var(--muted); font-size: 12px; font-weight: 600; }
.connection-row em { color: var(--muted-2); font-style: normal; }
.connection-row em .icon { width: 12px; height: 12px; }
.winner-cards { display: flex; flex-direction: column; gap: 3px; }
.winner-card { display: flex; align-items: center; gap: 9px; width: 100%; padding: 8px 0; border-bottom: 1px solid #eef0ea; text-align: left; }
.winner-card:last-child { border-bottom: 0; }
.winner-card:hover b { color: var(--brand); }
.winner-card > span:nth-child(2) { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.winner-card b { font-size: 13.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.winner-card small { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.winner-card__stat { text-align: right; }
.winner-card__stat b { font-size: 17px; color: var(--brand); }
.winner-card__stat small { font-size: 11.5px; }

/* Donut */
.donut { --p: 50; --c: var(--brand); width: 94px; height: 94px; border-radius: 50%; background: conic-gradient(var(--c) calc(var(--p) * 1%), #e9eee5 0); display: flex; align-items: center; justify-content: center; flex: none; }
.donut::before { content: none; }
.donut__inner { display: flex; flex-direction: column; align-items: center; justify-content: center; width: calc(100% - 18px); height: calc(100% - 18px); background: #fff; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(21,34,31,.035); }
.donut__inner b { font-size: 22.5px; letter-spacing: -.04em; line-height: 1; }
.donut__inner span { font-size: 11.5px; color: var(--muted); margin-top: 3px; text-align: center; max-width: 58px; line-height: 1.2; }
.donut--sm { width: 70px; height: 70px; }
.donut--sm .donut__inner { width: calc(100% - 13px); height: calc(100% - 13px); }
.donut--sm .donut__inner b { font-size: 17.5px; }
.donut--sm .donut__inner span { font-size: 10.5px; margin-top: 2px; }
.donut--lg { width: 118px; height: 118px; }
.donut--lg .donut__inner b { font-size: 27.5px; }

/* ---------- Workspace ---------- */
.workspace-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.ws-stat { position: relative; display: flex; align-items: center; gap: 9px; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; min-width: 0; }
.ws-stat__icon { width: 31px; height: 31px; border-radius: 9px; background: var(--brand-tint); color: var(--brand); display: grid; place-items: center; flex: none; }
.ws-stat__icon .icon { width: 15px; height: 15px; }
.ws-stat > div { min-width: 0; display: flex; flex-direction: column; }
.ws-stat b { font-size: 19.5px; letter-spacing: -.035em; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ws-stat span { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ws-stat__trend { position: absolute; top: 8px; right: 8px; font-size: 11.5px; color: var(--brand); background: var(--brand-soft); border-radius: 5px; padding: 3px 4px; }
.workspace-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.workspace-filters { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.workspace-filter { display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 10px; border: 1px solid transparent; border-radius: 8px; color: var(--muted); font-size: 14px; font-weight: 600; white-space: nowrap; }
.workspace-filter:hover { background: var(--surface); color: var(--ink); }
.workspace-filter.is-active { background: var(--surface); border-color: var(--line); color: var(--ink); box-shadow: 0 1px 2px rgba(21,34,31,.03); font-weight: 800; }
.workspace-filter span { display: inline-flex; align-items: center; justify-content: center; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 5px; background: var(--surface-3); color: var(--muted); font-size: 12px; }
.workspace-filter.is-active span { background: var(--brand-soft); color: var(--brand); }
.workspace-filter .icon { width: 12px; height: 12px; }
.deadline-strip { display: flex; align-items: center; gap: 13px; margin-top: 14px; padding: 11px 13px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.deadline-strip__label { display: flex; flex-direction: column; gap: 2px; width: 130px; flex: none; }
.deadline-strip__label > .icon { width: 14px; height: 14px; color: var(--brand); }
.deadline-strip__label b { font-size: 13.5px; }
.deadline-strip__label span { font-size: 12px; color: var(--muted); }
.deadline-strip__items { display: flex; gap: 6px; flex: 1; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.deadline-strip__items::-webkit-scrollbar { display: none; }
.deadline-mini { display: flex; align-items: center; gap: 7px; min-width: 178px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 9px; text-align: left; background: var(--surface-2); }
.deadline-mini:hover { border-color: #c9e1d3; background: var(--brand-tint); }
.deadline-mini__date { width: 28px; height: 32px; border-radius: 7px; background: #fff; border: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; justify-content: center; flex: none; }
.deadline-mini__date b { font-size: 14px; line-height: 1; }
.deadline-mini__date small { font-size: 10.5px; color: var(--muted); text-transform: uppercase; }
.deadline-mini__date.is-urgent { background: var(--coral-soft); border-color: #f5d8d1; }
.deadline-mini__date.is-urgent b, .deadline-mini__date.is-urgent small { color: var(--coral); }
.deadline-mini > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.deadline-mini > span:last-child b { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.deadline-mini > span:last-child small { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.deadline-strip__all { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--brand); font-weight: 700; white-space: nowrap; }
.deadline-strip__all .icon { width: 11px; height: 11px; }
.workspace-layout { display: grid; grid-template-columns: minmax(0, 1fr) 295px; gap: 14px; align-items: start; margin-top: 14px; }
.workspace-main { min-width: 0; }
.workspace-filter-title { display: flex; align-items: center; justify-content: space-between; margin: 3px 0 10px; }
.workspace-filter-title h2 { font-size: 20.5px; letter-spacing: -.03em; }
.workspace-filter-title span { font-size: 13px; color: var(--muted); }
.workspace-aside { display: flex; flex-direction: column; gap: 12px; }
.kanban { display: flex; gap: 9px; overflow-x: auto; padding-bottom: 4px; align-items: flex-start; }
.kanban-col { flex: 1 0 215px; min-height: 430px; padding: 8px; background: #f7f8f3; border: 1px solid var(--line); border-radius: 14px; display: flex; flex-direction: column; transition: background .18s ease, border-color .18s ease; }
.kanban-col.is-drag-over { background: var(--brand-tint); border-color: var(--brand-3); border-style: dashed; }
.kanban-col__head { display: flex; align-items: center; justify-content: space-between; gap: 7px; padding: 4px 2px 9px; }
.kanban-col__title { display: flex; align-items: center; gap: 5px; font-size: 13.5px; font-weight: 800; white-space: nowrap; }
.kanban-col__title i { width: 6px; height: 6px; border-radius: 2px; }
.kanban-col__title span { display: inline-grid; place-items: center; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 5px; background: #fff; border: 1px solid var(--line); font-size: 11.5px; color: var(--muted); }
.kanban-col__sum { font-size: 12px; color: var(--muted-2); font-weight: 600; }
.kanban-col__body { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.kanban-card { background: #fff; border: 1px solid var(--line); border-radius: 11px; padding: 10px; cursor: grab; transition: box-shadow .16s ease, border-color .16s ease, transform .16s ease; }
.kanban-card:hover { border-color: #c9ddce; box-shadow: 0 5px 16px rgba(21,34,31,.055); transform: translateY(-1px); }
.kanban-card.is-dragging { opacity: .55; transform: rotate(1deg); }
.kanban-card__top { display: flex; align-items: center; gap: 5px; margin-bottom: 6px; }
.kanban-card__stage { display: inline-flex; align-items: center; gap: 3px; margin-left: auto; color: var(--stage); font-size: 11px; font-weight: 700; }
.kanban-card__stage i { width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.kanban-title { display: block; width: 100%; text-align: left; font-size: 13.5px; line-height: 1.42; font-weight: 700; color: var(--ink); }
.kanban-title:hover { color: var(--brand); }
.kanban-card__meta { display: flex; align-items: center; gap: 4px; margin-top: 5px; color: var(--muted); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kanban-card__meta .icon { width: 10px; height: 10px; flex: none; }
.kanban-card__price { display: flex; align-items: center; justify-content: space-between; gap: 5px; margin-top: 8px; flex-wrap: wrap; }
.kanban-card__price > b { font-size: 15.5px; letter-spacing: -.025em; }
.kanban-card__price .deadline { font-size: 11.5px; margin-top: 0; }
.kanban-card__price .deadline .icon { width: 10px; height: 10px; }
.kanban-card__footer { display: flex; align-items: center; gap: 5px; margin-top: 8px; padding-top: 7px; border-top: 1px solid #eef0ea; }
.match-mini { display: inline-flex; align-items: center; gap: 2px; color: var(--brand); font-size: 11.5px; font-weight: 800; }
.match-mini .icon { width: 9px; height: 9px; }
.doc-mini { display: inline-flex; align-items: center; gap: 2px; margin-left: auto; color: var(--muted-2); font-size: 11.5px; }
.doc-mini .icon { width: 10px; height: 10px; }
.kanban-remove { color: var(--muted-2); }
.kanban-remove:hover { color: var(--coral); background: var(--coral-soft); }
.kanban-card__footer .icon-btn { width: 21px; height: 21px; }
.kanban-card__footer .avatar-stack .avatar { width: 18px; height: 18px; font-size: 7.5px; border-width: 1px; margin-left: -4px; }
.kanban-empty { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 20px 8px; border: 1px dashed var(--line-strong); border-radius: 9px; color: var(--muted-2); font-size: 12px; text-align: center; }
.kanban-empty .icon { width: 16px; height: 16px; }
.kanban-add { display: flex; align-items: center; gap: 4px; margin-top: 6px; padding: 6px 4px; color: var(--muted); font-size: 12.5px; font-weight: 600; }
.kanban-add:hover { color: var(--brand); }
.kanban-add .icon { width: 11px; height: 11px; }

.team-list { display: flex; flex-direction: column; gap: 1px; }
.team-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; }
.team-row > span:nth-child(2) { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.team-row b { font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.team-row small { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.team-row .avatar { width: 25px; height: 25px; font-size: 12px; }
.online-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--brand-2); flex: none; }
.online-dot.is-offline { background: var(--line-strong); }
.team-stats { display: flex; gap: 8px; padding-top: 10px; margin-top: 8px; border-top: 1px solid var(--line); }
.team-stats span { flex: 1; font-size: 11.5px; color: var(--muted); line-height: 1.4; }
.team-stats b { display: block; font-size: 15px; color: var(--ink); }
.activity-list { display: flex; flex-direction: column; gap: 9px; }
.activity-item { display: flex; gap: 7px; align-items: flex-start; }
.activity-item .avatar { width: 22px; height: 22px; font-size: 11px; }
.activity-item p { font-size: 12px; line-height: 1.45; color: var(--muted); }
.activity-item p b { color: var(--ink-2); }
.activity-item p small { display: block; color: var(--muted-2); font-size: 11px; margin-top: 1px; }
.conversion-row { display: flex; align-items: center; gap: 11px; }
.conversion-row > div:last-child { display: flex; flex-direction: column; }
.conversion-row b { font-size: 16px; }
.conversion-row p { color: var(--muted); font-size: 12px; line-height: 1.45; margin-top: 2px; }
.conversion-bars { display: flex; flex-direction: column; gap: 7px; margin-top: 12px; }
.conversion-bars > div { position: relative; display: flex; align-items: center; justify-content: space-between; font-size: 11.5px; color: var(--muted); padding-bottom: 5px; }
.conversion-bars b { color: var(--ink-2); font-size: 12px; }
.conversion-bars i { position: absolute; left: 0; bottom: 0; height: 3px; border-radius: 99px; background: linear-gradient(90deg, var(--brand-2), var(--brand)); }

/* ---------- Monitoring ---------- */
.monitoring-kpis { margin-bottom: 16px; }
.monitoring-layout { display: grid; grid-template-columns: minmax(0, 1fr) 344px; gap: 14px; align-items: start; }
.monitoring-main { min-width: 0; }
.monitoring-side { display: flex; flex-direction: column; gap: 14px; }
.monitoring-list-head { display: flex; align-items: center; justify-content: space-between; margin: 0 0 10px; }
.monitoring-list-head h2 { font-size: 20.5px; letter-spacing: -.03em; }
.monitoring-list-head span { font-size: 13px; color: var(--muted); }
.monitor-list { display: flex; flex-direction: column; gap: 9px; margin-bottom: 16px; }
.monitor-card { padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 15px; transition: border-color .18s ease, opacity .18s ease; }
.monitor-card:hover { border-color: #cadcce; }
.monitor-card.is-paused { opacity: .64; }
.monitor-card__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.monitor-card__title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.monitor-card__title > div { min-width: 0; }
.monitor-card h3 { font-size: 17px; letter-spacing: -.02em; font-weight: 800; }
.monitor-query { display: inline-flex; align-items: center; gap: 4px; margin-top: 3px; font-size: 12.5px; color: var(--muted); }
.monitor-query .icon { width: 11px; height: 11px; }
.monitor-card__actions { display: flex; align-items: center; gap: 4px; flex: none; }
.monitor-card__actions .icon-btn { width: 27px; height: 27px; }
.monitor-toggle { width: 34px; height: 19px; border-radius: 99px; background: #dfe5dc; position: relative; flex: none; transition: background .18s ease; }
.monitor-toggle i { position: absolute; top: 2px; left: 2px; width: 15px; height: 15px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.12); transition: transform .18s ease; }
.monitor-toggle.is-on { background: var(--brand); }
.monitor-toggle.is-on i { transform: translateX(15px); }
.monitor-filters { display: flex; flex-wrap: wrap; gap: 4px; margin: 9px 0 10px; padding-left: 44px; font-size: 12.5px; color: var(--muted); }
.monitor-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; padding: 10px 0; margin-left: 44px; border-top: 1px solid #eef0ea; border-bottom: 1px solid #eef0ea; }
.monitor-stats > div { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.monitor-stats span { font-size: 11.5px; color: var(--muted-2); }
.monitor-stats b { font-size: 14px; color: var(--ink-2); font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.monitor-stats b.is-accent { color: var(--brand); }
.monitor-card__bottom { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 10px 0 0 44px; }
.monitor-channels { display: flex; gap: 4px; flex-wrap: wrap; }
.channel-badge { display: inline-flex; align-items: center; gap: 3px; height: 21px; padding: 0 6px; border-radius: 5px; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); font-size: 12px; font-weight: 600; }
.channel-badge .icon { width: 10px; height: 10px; }
.event-list { display: flex; flex-direction: column; }
.event-item { display: flex; align-items: flex-start; gap: 9px; width: 100%; padding: 9px 0; border-bottom: 1px solid #eef0ea; text-align: left; }
.event-item:last-child { border-bottom: 0; }
.event-item:hover .event-item__copy b { color: var(--brand); }
.event-item__copy { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.event-item__copy b { font-size: 13.5px; line-height: 1.4; font-weight: 700; }
.event-item__copy small { font-size: 12px; color: var(--muted); line-height: 1.4; }
.event-item__time { font-size: 11.5px; color: var(--muted-2); white-space: nowrap; }
.channel-list { display: flex; flex-direction: column; gap: 2px; }
.channel-row { display: flex; align-items: center; gap: 8px; padding: 8px 0; cursor: pointer; }
.channel-row > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.channel-row b { font-size: 13.5px; }
.channel-row small { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.channel-row input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.channel-icon { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; flex: none; }
.channel-icon .icon { width: 14px; height: 14px; }
.channel-icon--mail { background: var(--blue-soft); color: var(--blue); }
.channel-icon--tg { background: #e8f4fb; color: #2b87b8; }
.channel-icon--push { background: var(--violet-soft); color: var(--violet); }
.digest-schedule { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 10px; margin-top: 8px; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-2); }
.digest-schedule span { display: flex; align-items: center; gap: 5px; }
.digest-schedule .icon { width: 13px; height: 13px; color: var(--muted-2); }
.digest-schedule select { height: 26px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-2); padding: 0 5px; font-size: 12.5px; }
.digest-preview { background: var(--surface-2); border: 1px solid var(--line); border-radius: 11px; padding: 9px; }
.digest-mail { background: #fff; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; box-shadow: 0 5px 16px rgba(21,34,31,.035); }
.digest-mail__head { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px; border-bottom: 1px solid #eef0ea; }
.digest-logo { display: flex; align-items: center; gap: 4px; }
.digest-logo .brand-mark { width: 18px; height: 18px; border-radius: 5px; box-shadow: none; }
.digest-logo .brand-mark svg { width: 13px; height: 13px; }
.digest-logo b { font-size: 14px; letter-spacing: -.04em; }
.digest-logo b span { color: var(--brand-2); }
.digest-mail__head > span:last-child { font-size: 11px; color: var(--muted-2); }
.digest-mail__subject { padding: 9px 10px 6px; font-size: 13px; font-weight: 800; }
.digest-mail__body { padding: 0 10px 9px; }
.digest-tender { display: flex; align-items: center; gap: 6px; width: 100%; padding: 6px 0; border-bottom: 1px solid #f0f2ec; text-align: left; }
.digest-tender > span:first-child { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.digest-tender b { font-size: 11.5px; line-height: 1.3; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.digest-tender small { font-size: 10.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.digest-tender .match-pill { height: 18px; font-size: 11px; padding: 0 5px; }
.digest-mail__all { display: flex; align-items: center; justify-content: center; gap: 3px; width: 100%; margin-top: 7px; padding: 6px; border-radius: 5px; background: var(--brand-soft); color: var(--brand); font-size: 11.5px; font-weight: 700; }
.digest-mail__all .icon { width: 9px; height: 9px; }
.digest-mail__foot { padding: 7px 10px; background: #fbfcf9; border-top: 1px solid #eef0ea; color: var(--muted-2); font-size: 7.5px; line-height: 1.4; }
.digest-mail__foot u { cursor: pointer; }
.panel--tip { background: linear-gradient(135deg, #f8fbf2, #f4f8ef); }
.tip-icon { width: 32px; height: 32px; border-radius: 10px; background: var(--brand); color: #fff; display: grid; place-items: center; margin-bottom: 8px; }
.tip-icon .icon { width: 15px; height: 15px; }
.panel--tip h3 { font-size: 16px; }
.panel--tip p { font-size: 13px; color: var(--muted); line-height: 1.55; margin: 4px 0 8px; }

/* ---------- Counterparties ---------- */
.cp-search { display: grid; grid-template-columns: minmax(0, 1fr) minmax(330px, .85fr); gap: 20px; align-items: center; padding: 24px 26px; background: linear-gradient(135deg, #f7faf4 0%, #edf7f0 60%, #f8f3e8 100%); border: 1px solid #dfe8da; border-radius: 22px; margin-bottom: 14px; }
.cp-search__copy h2 { font-size: 25.5px; letter-spacing: -.04em; margin-top: 4px; }
.cp-search__copy p { color: var(--muted); font-size: 14.5px; line-height: 1.5; margin-top: 5px; max-width: 480px; }
.cp-search__form { display: flex; align-items: center; gap: 7px; background: #fff; border: 1px solid var(--line-strong); border-radius: 13px; padding: 5px 5px 5px 12px; box-shadow: 0 8px 24px rgba(21,34,31,.055); }
.cp-search__form > .icon { width: 18px; height: 18px; color: var(--muted-2); flex: none; }
.cp-search__form input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; padding: 9px 3px; font-size: 16px; }
.cp-search__form .btn { flex: none; }
.cp-popular { grid-column: 2; display: flex; flex-wrap: wrap; gap: 5px; align-items: center; margin-top: -8px; }
.cp-popular > span { font-size: 12px; color: var(--muted-2); }
.cp-popular button { font-size: 12px; color: var(--brand); background: rgba(255,255,255,.7); border: 1px solid #dbe8dd; border-radius: 6px; padding: 3px 6px; }
.cp-popular button:hover { background: #fff; }
.cp-summary { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; margin-bottom: 16px; overflow: hidden; }
.cp-summary > div { display: flex; flex-direction: column; padding: 12px 16px; border-left: 1px solid var(--line); }
.cp-summary > div:first-child { border-left: 0; }
.cp-summary b { font-size: 19.5px; letter-spacing: -.03em; }
.cp-summary span { font-size: 12px; color: var(--muted); }
.sub-tabs--cp { margin-bottom: 12px; width: 100%; }
.sub-tabs--cp .cp-sort { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; padding-right: 7px; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.sub-tabs--cp .cp-sort .icon { width: 11px; height: 11px; }
.counterparty-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.counterparty-card { display: flex; flex-direction: column; gap: 10px; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; text-align: left; transition: all .18s ease; }
.counterparty-card:hover { border-color: #c7ded0; box-shadow: 0 8px 26px rgba(21,34,31,.055); transform: translateY(-1px); }
.counterparty-card__head { display: flex; align-items: flex-start; gap: 8px; }
.counterparty-card__copy { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.counterparty-card__copy b { font-size: 14.5px; line-height: 1.35; font-weight: 800; }
.counterparty-card__copy small { font-size: 11.5px; color: var(--muted); }
.counterparty-card__metrics { display: grid; grid-template-columns: repeat(3, 1fr); padding: 9px 0; border-top: 1px solid #eef0ea; border-bottom: 1px solid #eef0ea; }
.counterparty-card__metrics > div { display: flex; flex-direction: column; gap: 2px; padding-left: 8px; border-left: 1px solid #eef0ea; min-width: 0; }
.counterparty-card__metrics > div:first-child { padding-left: 0; border-left: 0; }
.counterparty-card__metrics span { font-size: 11px; color: var(--muted-2); }
.counterparty-card__metrics b { font-size: 13.5px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.counterparty-card__metrics .rating { font-size: 13px; }
.counterparty-card__metrics .rating .icon { width: 10px; height: 10px; }
.counterparty-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.counterparty-card__foot > span:first-child { font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.checks-section { margin-top: 24px; }
.checks-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.check-card { padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 13px; }
.check-card > span { width: 28px; height: 28px; border-radius: 8px; background: var(--brand-tint); color: var(--brand); display: grid; place-items: center; margin-bottom: 8px; }
.check-card > span .icon { width: 14px; height: 14px; }
.check-card b { font-size: 13.5px; display: block; }
.check-card p { font-size: 12px; color: var(--muted); line-height: 1.5; margin-top: 2px; }
.recent-checks { margin-top: 24px; }
