/* ---------- Потоки ---------- */
.flows-toolbar { margin-bottom: 12px; }
.flows-toolbar .toolbar { margin-bottom: 6px; }
.flows-inline { display: inline-flex; align-items: center; gap: 6px; }
.flows-seg { display: inline-flex; }
.flows-seg .btn { border-radius: 0; }
.flows-seg .btn:first-child { border-radius: 8px 0 0 8px; }
.flows-seg .btn:last-child { border-radius: 0 8px 8px 0; margin-left: -1px; }
.btn.flows-on { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); position: relative; }
.flows-draft { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.flows-summary { font-size: 13px; color: var(--muted); }

.flows-empty {
  background: var(--surface); border: 1px dashed var(--border); border-radius: var(--radius);
  padding: 28px 20px; text-align: center; display: flex; flex-direction: column; gap: 6px;
}

.flows-sankey {
  position: relative; overflow-x: auto; overflow-y: hidden;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
  margin-bottom: 20px;
}
.flows-svg { display: block; }
.flows-col-head { font-size: 12px; font-weight: 600; fill: var(--muted); cursor: pointer; }
.flows-col-head:hover { fill: var(--accent); text-decoration: underline; }
.flows-link-path { fill-opacity: .42; cursor: pointer; transition: fill-opacity .12s; }
.flows-link-path.stay { fill-opacity: .16; }
.flows-hovering .flows-link-path { fill-opacity: .08; }
.flows-hovering .flows-link-path.active { fill-opacity: .8; }
.flows-node { cursor: pointer; }
.flows-node rect { stroke: var(--surface); stroke-width: 1; }
.flows-node:hover rect { stroke: var(--text); }
.flows-node-label { font-size: 12px; fill: var(--text); }
.flows-node-count { font-weight: 700; fill: var(--muted); }

.flows-tip {
  position: absolute; z-index: 5; pointer-events: none; max-width: 300px;
  background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 8px;
  box-shadow: var(--shadow); padding: 8px 10px; font-size: 12px;
}
.flows-tip ul { margin: 6px 0 0; padding-left: 16px; }
.flows-tip li { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.flows-section { margin-bottom: 20px; }
.flows-section h3 { font-size: 15px; margin: 0 0 10px; }
.flows-section-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.flows-section-head h3 { margin: 0; }
.flows-list-tools { margin-bottom: 8px; }

.flows-matrix-wrap { overflow-x: auto; }
.flows-matrix { width: auto; min-width: 100%; font-size: 13px; }
.flows-matrix th { white-space: nowrap; }
.flows-matrix tbody th { background: var(--surface-2); text-align: left; }
.flows-matrix thead th:not(.flows-corner) { text-align: center; }
.flows-cell { text-align: center !important; cursor: pointer; font-weight: 600; min-width: 44px; }
.flows-cell:hover { background: var(--accent-soft); color: var(--accent); }
.flows-cell.empty { cursor: default; }
.flows-cell.empty:hover { background: none; }
.flows-cell.diag { color: var(--muted); font-weight: 400; background: var(--surface-2); }
.flows-total { text-align: center !important; color: var(--muted); font-weight: 600; }
.flows-total-row th, .flows-total-row td { background: var(--surface-2); }
.flows-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: 0; }

.flows-list { font-size: 13px; }
.flows-list .flows-sub { font-size: 11px; }
.flows-arrow { width: 20px; text-align: center !important; }
.flows-link { color: var(--accent); text-decoration: none; cursor: pointer; }
.flows-link:hover { text-decoration: underline; }
.flows-modal-table { font-size: 13px; }
