/* ==========================================================================
   Panel Tables — общие стили таблиц, фильтров и пагинации для скринеров:
   /panel/correlation-matrix, /panel/screener-correlation,
   /panel/arbitrage-opportunities, /panel/screener-cluster-ai,
   а также их встраиваемых версий на публичной странице /ru/screener
   ========================================================================== */

*, *::before, *::after {
    box-sizing: border-box;
}

:root{
    --bg: #0b0e14;
    --surface: #131720;
    --surface2: #1a1f2e;
    --surface3: #222838;
    --border: #2a3042;
    --border2: #363e54;
    --text: #e2e8f0;
    --text2: #94a3b8;
    --text3: #64748b;
    --accent: #3b82f6;
    --accent2: #60a5fa;
    --green: #22c55e;
    --red: #ef4444;
    --yellow: #eab308;
    --orange: #f97316;
    --purple: #a855f7;
    --cyan: #06b6d4;
    --shadow: rgba(0, 0, 0, .35);
    --scrollbar: #363e54;
    --table-head: #0d1017;
    --table-sub: #111521;
}

[data-theme="dark"] {
    --bg: #0b0e14;
    --surface: #131720;
    --surface2: #1a1f2e;
    --surface3: #222838;
    --border: #2a3042;
    --border2: #363e54;
    --text: #e2e8f0;
    --text2: #94a3b8;
    --text3: #64748b;
    --accent: #3b82f6;
    --accent2: #60a5fa;
    --green: #22c55e;
    --red: #ef4444;
    --yellow: #eab308;
    --orange: #f97316;
    --purple: #a855f7;
    --cyan: #06b6d4;
    --shadow: rgba(0, 0, 0, .35);
    --scrollbar: #363e54;
    --table-head: #0d1017;
    --table-sub: #111521;
}

[data-theme="light"] {
    --bg: #f0f2f5;
    --surface: #ffffff;
    --surface2: #fbfbfb;
    --surface3: #eef0f4;
    --border: #d5d9e2;
    --border2: #c1c7d4;
    --text: #1e293b;
    --text2: #475569;
    --text3: #94a3b8;
    --accent: #2563eb;
    --accent2: #3b82f6;
    --green: #16a34a;
    --red: #dc2626;
    --yellow: #ca8a04;
    --orange: #ea580c;
    --purple: #9333ea;
    --cyan: #0891b2;
    --shadow: rgba(0, 0, 0, .08);
    --scrollbar: #c1c7d4;
    --table-head: #fbfbfb;
    --table-sub: #fbfbfb;
}

:root {
    --radius: 10px;
    --radius-sm: 6px;
}

/* ── List tables (arbitrage, screener-correlation, screener-cluster-ai) ── */

.table-wrap,
.arb-table-wrap {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow-x: auto;
    box-shadow: 0 1px 4px var(--shadow);
}

.table-wrap::-webkit-scrollbar,
.arb-table-wrap::-webkit-scrollbar,
.cm-table-scroll::-webkit-scrollbar { height: 8px; }
.table-wrap::-webkit-scrollbar-track,
.arb-table-wrap::-webkit-scrollbar-track,
.cm-table-scroll::-webkit-scrollbar-track { background: var(--surface2); }
.table-wrap::-webkit-scrollbar-thumb,
.arb-table-wrap::-webkit-scrollbar-thumb,
.cm-table-scroll::-webkit-scrollbar-thumb { background: var(--scrollbar); border-radius: 4px; }

.pairs-table,
.arb-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .78rem;
    white-space: nowrap;
}

.pairs-table thead,
.arb-table thead {
    position: sticky;
    top: 0;
    z-index: 10;
}

.col-group-header th {
    background: var(--table-head);
    color: var(--text3);
    font-size: .7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    padding: 6px 8px;
    border-bottom: 1px solid var(--border);
    text-align: center;
}

.col-group-header .cg-main     { color: var(--accent2); }
.col-group-header .cg-pair     { color: var(--accent2); }
.col-group-header .cg-buy      { color: var(--green); }
.col-group-header .cg-sell     { color: var(--red); }
.col-group-header .cg-result   { color: var(--yellow); }
.col-group-header .cg-current  { color: var(--yellow); }
.col-group-header .cg-rolling  { color: var(--cyan); }
.col-group-header .cg-multi    { color: var(--purple); }
.col-group-header .cg-dynamics { color: var(--orange); }
.col-group-header .cg-quality  { color: var(--green); }
.col-group-header .cg-spread   { color: var(--purple); }
.col-group-header .cg-corr     { color: var(--yellow); }
.col-group-header .cg-backtest { color: var(--green); }

.col-sub-header th {
    background: var(--table-sub);
    color: var(--text2);
    font-size: .72rem;
    font-weight: 600;
    padding: 7px 8px;
    border-bottom: 2px solid var(--border2);
    text-align: center;
}

.col-sub-header th.al { text-align: left; }

.pairs-table tbody tr,
.arb-table tbody tr {
    border-bottom: 1px solid var(--border);
    transition: background .15s;
}

.pairs-table tbody tr:hover,
.arb-table tbody tr:hover {
    background: var(--surface3);
}

.pairs-table td,
.arb-table td {
    padding: 8px;
    text-align: center;
    vertical-align: middle;
}

.pairs-table td.al,
.arb-table td.al { text-align: left; }

.pairs-table td.al{
    color: var(--text);
}

.loading-indicator {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: panelTableSpin .6s linear infinite;
    margin-left: 8px;
    vertical-align: middle;
}

@keyframes panelTableSpin { to { transform: rotate(360deg); } }

.table-empty,
.arb-empty,
.empty-slot {
    text-align: center;
    padding: 40px 20px;
    color: var(--text3);
}

.arb-empty .icon,
.empty-slot .es-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.arb-empty .text,
.empty-slot .es-text {
    font-size: .9rem;
}

/* ── Value helpers ── */

.val-good   { color: var(--green); }
.val-warn   { color: var(--yellow); }
.val-bad    { color: var(--red); }
.val-muted  { color: var(--text3); }
.val-accent { color: var(--cyan); }
.val-bold   { font-weight: 700; }

.delta-positive { color: var(--green); font-weight: 600; }
.delta-negative { color: var(--red); font-weight: 600; }

.pnl-positive { color: var(--green); font-weight: 700; }
.pnl-strong   { color: #4ade80; font-weight: 800; }
.pnl-mild     { color: var(--cyan); }
.pnl-negative { color: var(--red); font-weight: 700; }

.profit-cell { font-weight: 700; }

/* ── Badges & tags ── */

.diff-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: .72rem;
    font-weight: 700;
}
.diff-badge.high { background: rgba(34, 197, 94, .15); color: var(--green); border: 1px solid rgba(34, 197, 94, .3); }
.diff-badge.mid  { background: rgba(234, 179, 8, .12); color: var(--yellow); border: 1px solid rgba(234, 179, 8, .3); }
.diff-badge.low  { background: var(--surface3); color: var(--text3); border: 1px solid var(--border); }

.signal-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 20px;
    /*font-size: .72rem;*/
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
}
.signal-badge.short-spread        { background: rgba(239, 68, 68, .15); color: var(--red); border: 1px solid rgba(239, 68, 68, .3); }
.signal-badge.strong-short-spread { background: rgba(239, 68, 68, .25); color: #b10000; border: 1px solid rgba(239, 68, 68, .5); }
.signal-badge.long-spread         { background: rgba(34, 197, 94, .15); color: var(--green); border: 1px solid rgba(34, 197, 94, .3); }
.signal-badge.strong-long-spread  { background: rgba(34, 197, 94, .15); color: var(--green); border: 1px solid rgba(34, 197, 94, .3); }
.signal-badge.close-signal        { background: rgba(168, 85, 247, .15); color: var(--purple); border: 1px solid rgba(168, 85, 247, .3); }
.signal-badge.watch               { background: rgba(234, 179, 8, .12); color: var(--yellow); border: 1px solid rgba(234, 179, 8, .3); }
.signal-badge.neutral             { background: var(--surface3); color: var(--text3); border: 1px solid var(--border); }
.signal-badge.no-signal           { background: transparent; color: var(--text3); border: 1px solid var(--border); }

.stab-tag {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 20px;
    font-size: .7rem;
    font-weight: 600;
    white-space: nowrap;
}
.stab-tag.stable   { background: rgba(34, 197, 94, .12); color: var(--green); }
.stab-tag.moderate { background: rgba(234, 179, 8, .12); color: var(--yellow); }
.stab-tag.weak     { background: rgba(239, 68, 68, .1); color: var(--red); }

.trend-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: .68rem;
    font-weight: 700;
}
.trend-tag.rising  { background: rgba(34, 197, 94, .12); color: var(--green); }
.trend-tag.falling { background: rgba(239, 68, 68, .1); color: var(--red); }
.trend-tag.flat    { background: rgba(234, 179, 8, .12); color: var(--yellow); }

.strength-badge {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 20px;
    font-size: .68rem;
    font-weight: 700;
}
.strength-badge.very-strong { background: rgba(34, 197, 94, .2); color: var(--green); }
.strength-badge.strong      { background: rgba(34, 197, 94, .12); color: var(--green); }
.strength-badge.moderate    { background: rgba(234, 179, 8, .12); color: var(--yellow); }
.strength-badge.weak        { background: rgba(239, 68, 68, .1); color: var(--red); }

.ci-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: .66rem;
    font-weight: 700;
    white-space: nowrap;
}
.ci-tag.ci { background: rgba(34, 197, 94, .15); color: var(--green); border: 1px solid rgba(34, 197, 94, .3); }
.ci-tag.nc { background: rgba(239, 68, 68, .1); color: var(--red); border: 1px solid rgba(239, 68, 68, .2); }

/* ── Cell components ── */

.exchange-cell { display: flex; align-items: center; gap: 7px; }
.exchange-cell img { width: 20px; height: 20px; border-radius: 4px; flex-shrink: 0; }
.exchange-cell span { color: var(--text); font-weight: 600; font-size: .8rem; }

.pair-cell .sym { color: var(--text); font-weight: 600; }

.formula-cell {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: .78rem;
    color: var(--text);
    text-align: left !important;
    white-space: nowrap;
}
.formula-cell .sym      { color: var(--text); font-weight: 600; }
.formula-cell .beta-val { color: var(--text2); font-weight: 600; }
.formula-cell .op       { color: var(--text3); }

.action-cell {
    text-align: left !important;
    white-space: nowrap;
    font-size: .76rem;
    line-height: 1.6;
}
.action-cell .act-line      { color: var(--text); }
.action-cell .act-dir-short { color: var(--red); font-weight: 700; }
.action-cell .act-dir-long  { color: var(--green); font-weight: 700; }
.action-cell .act-sym       { color: var(--text); font-weight: 600; }
.action-cell .act-pct       { color: var(--text3); }
.action-cell .act-wait      { color: var(--text3); font-style: italic; }

.corr-bar-wrap { display: flex; align-items: center; gap: 6px; }
.corr-bar-wrap > span { color: var(--text) }
.corr-bar { width: 70px; height: 5px; background: var(--surface3); border-radius: 3px; position: relative; overflow: hidden; }
.corr-fill { position: absolute; height: 100%; border-radius: 3px; }

.health-wrap { display: flex; align-items: center; gap: 6px; justify-content: center; }

.pctl-wrap { display: flex; align-items: center; gap: 4px; justify-content: center; }
.pctl-bar { width: 50px; height: 4px; background: var(--surface3); border-radius: 2px; overflow: hidden; }

.z-cell { min-width: 130px; }
.z-bar-wrap { display: flex; align-items: center; gap: 6px; }
.z-bar { width: 80px; height: 6px; background: var(--surface3); border-radius: 3px; position: relative; overflow: hidden; }
.z-bar .z-fill { position: absolute; top: 0; height: 100%; border-radius: 3px; transition: width .3s; }
.z-bar .z-center { position: absolute; left: 50%; top: -1px; bottom: -1px; width: 1px; background: var(--text3); opacity: .5; }
.z-val { font-weight: 700; font-size: .82rem; min-width: 42px; text-align: right; }
.z-val.pos  { color: var(--red); }
.z-val.neg  { color: var(--green); }
.z-val.zero { color: var(--text3); }
.max-z-cell { white-space: nowrap; }
.max-z-cell .z-up  { color: var(--red); font-weight: 600; }
.max-z-cell .z-dn  { color: var(--green); font-weight: 600; }
.max-z-cell .z-sep { color: var(--text3); margin: 0 2px; }

/* ── Subscription blur ── */

.blur-cell { filter: blur(5px); user-select: none; pointer-events: none; color: var(--text) }
.blur-wrap { position: relative; display: inline-block; }

/* Tooltip trigger lives on a non-blurred wrapper — putting data-tooltip
   directly on .blur-cell would blur the tooltip too, since `filter`
   applies to an element's own generated content (::after) as well. */
.blur-wrap[data-tooltip],
.blur-td[data-tooltip] {
    position: relative;
    cursor: help;
}

.blur-wrap[data-tooltip]::after,
.blur-td[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    background: var(--surface3);
    color: var(--text);
    border: 1px solid var(--border2);
    border-radius: var(--radius-sm);
    padding: 6px 10px;
    font-size: .72rem;
    font-weight: 500;
    white-space: normal;
    width: max-content;
    max-width: 220px;
    text-align: center;
    line-height: 1.4;
    box-shadow: 0 4px 16px var(--shadow);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .15s ease, transform .15s ease;
    z-index: 50;
}

.blur-wrap[data-tooltip]:hover::after,
.blur-wrap[data-tooltip]:focus-visible::after,
.blur-td[data-tooltip]:hover::after,
.blur-td[data-tooltip]:focus-visible::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* ── Matrix / pivot table (correlation matrix) ── */

.cm-table-scroll {
    overflow-x: auto;
    overflow-y: auto;
    max-height: 70vh;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.cm-table {
    border-collapse: collapse;
    width: 100%;
    min-width: max-content;
    font-size: .78rem;
    white-space: nowrap;
}

.cm-table thead th {
    background: var(--table-head);
    color: var(--text3);
    font-size: .7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    padding: 8px 10px;
    border-bottom: 1px solid var(--border2);
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 3;
}

.cm-table thead th:first-child {
    text-align: left;
    position: sticky;
    left: 0;
    z-index: 4;
    background: var(--table-head);
    width: 130px;
}

.cm-th-tools-inner { display: flex; align-items: center; gap: 8px; }

#colSelectorBtn {
    background: transparent;
    border: 1px solid var(--border2);
    border-radius: 4px;
    padding: 2px 7px;
    font-size: .7rem;
    font-weight: 600;
    color: var(--text3);
    cursor: pointer;
    white-space: nowrap;
    line-height: 1.6;
    transition: border-color .15s, color .15s;
    flex-shrink: 0;
}
#colSelectorBtn:hover { border-color: var(--accent); color: var(--accent); }

.cm-table tbody td {
    padding: 7px 10px;
    text-align: center;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    transition: background .15s;
}

.cm-table tbody tr:hover td { background: var(--surface3); }

.cm-table tbody td:first-child {
    text-align: left;
    position: sticky;
    left: 0;
    z-index: 1;
    background: var(--surface2);
    color: var(--text);
    max-width: 150px;
}

.cm-table tbody tr:not(.cm-group-row) td:first-child {
    text-align: center;
    font-size: 12px;
}

.cm-table tbody tr:hover td:first-child { background: var(--surface3); }

.cm-group-row td {
    background: var(--surface3);
    color: var(--text2);
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    padding: 6px 12px;
    cursor: pointer;
    border-bottom: 1px solid var(--border2);
    user-select: none;
}
.cm-group-row:hover td { background: var(--border); }
.cm-group-row td::before { content: '▾ '; font-size: 1.2rem; transition: transform .2s; display: inline-block; padding-right: 5px; }
.cm-group-row.collapsed td::before { content: '▸ '; }

.cm-grid-wrap { position: relative; border-radius: var(--radius); }

.cm-loader-overlay {
    position: absolute;
    inset: 0;
    background: var(--surface);
    opacity: .6;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: var(--radius);
}
.cm-loader-overlay.show { display: flex; }

.cm-spinner {
    width: 34px;
    height: 34px;
    border: 3px solid var(--border2);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: cmSpin .7s linear infinite;
}
@keyframes cmSpin { to { transform: rotate(360deg); } }

/* ── Generic filter bar (screener-correlation, screener-cluster-ai; также используется для пагинации) ── */

.filters-bar {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 10px 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 14px;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 5px;
}

.filter-group label {
    font-size: .78rem;
    color: var(--text3);
    white-space: nowrap;
}

.filter-group.loading {
    opacity: 0.7;
    pointer-events: none;
}

.filter-input {
    background: var(--surface3);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 5px 9px;
    color: var(--text);
    font-size: .78rem;
    outline: none;
}

.filter-input:focus { border-color: var(--accent); }
.filter-input::placeholder { color: var(--text3); }
select.filter-input { cursor: pointer; }

.reset-filters-btn {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 5px 12px;
    font-size: .78rem;
    font-weight: 600;
    cursor: pointer;
    color: var(--text2);
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all .2s;
}

.reset-filters-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--surface3);
}

/* ── Arbitrage filter bar ── */

.arb-filters {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 10px 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 14px;
}

.arb-filter-group {
    display: flex;
    align-items: center;
    gap: 5px;
}

.arb-filter-group label {
    font-size: .78rem;
    color: var(--text3);
    white-space: nowrap;
}

.arb-filter-input {
    background: var(--surface3);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 5px 9px;
    color: var(--text);
    font-size: .78rem;
    outline: none;
    transition: border-color .2s;
}

.arb-filter-input:focus { border-color: var(--accent); }
.arb-filter-input::placeholder { color: var(--text3); }

.arb-search-btn {
    /*background: var(--accent);*/
    background: #e0f54a;
    color: #000;
    border: none;
    border-radius: var(--radius-sm);
    padding: 6px 16px;
    font-size: .82rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
}

.arb-search-btn:hover {
    /*background: var(--accent2); */
    background: #B5B5C3;
}

/* ── Correlation matrix filter bar ── */

.cm-filters {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 10px 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin: 14px 0;
}

.cm-filter-group {
    display: flex;
    align-items: center;
    gap: 5px;
}

.cm-filter-group label {
    font-size: .78rem;
    color: var(--text3);
    white-space: nowrap;
}

.cm-filter-input {
    background: var(--surface3);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 5px 9px;
    color: var(--text);
    font-size: .78rem;
    outline: none;
    transition: border-color .2s;
}

.cm-filter-input:focus { border-color: var(--accent); }
select.cm-filter-input { cursor: pointer; }

.cm-btn {
    background: var(--surface2);
    border: 1px solid var(--border2);
    border-radius: var(--radius-sm);
    padding: 6px 16px;
    font-size: .82rem;
    font-weight: 600;
    cursor: pointer;
    color: var(--text2);
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all .2s;
    white-space: nowrap;
}

.cm-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--surface3);
}

/* ── Column selector dropdown (correlation matrix) ── */

#correlation-matrix .val-bold{
    color: var(--text);
}

.cm-col-panel {
    position: absolute;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 8px 30px var(--shadow);
    width: 230px;
    z-index: 99;
    display: none;
    flex-direction: column;
}

.cm-col-panel.open { display: flex; }

.cm-col-toolbar {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.cm-col-actions {
    display: flex;
    gap: 6px;
}

.cm-col-action-btn {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 3px 10px;
    font-size: .72rem;
    color: var(--text3);
    cursor: pointer;
    transition: all .15s;
}

.cm-col-action-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.cm-col-list {
    overflow-y: auto;
    max-height: 290px;
    padding: 4px;
}

.cm-col-list::-webkit-scrollbar { width: 4px; }
.cm-col-list::-webkit-scrollbar-track { background: var(--surface2); }
.cm-col-list::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 2px; }

.cm-col-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: .78rem;
    color: var(--text2);
    transition: background .12s;
    user-select: none;
}

.cm-col-item:hover { background: var(--surface2); }

.cm-col-check {
    width: 14px;
    height: 14px;
    border: 2px solid var(--border2);
    border-radius: 3px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .55rem;
    color: transparent;
    transition: all .15s;
}

.cm-col-item.checked .cm-col-check {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.cm-col-item.checked { color: var(--text); }

.cm-col-group + .cm-col-group {
    border-top: 1px solid var(--border);
    margin-top: 2px;
    padding-top: 2px;
}

.cm-col-group-title {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 5px 8px;
    cursor: pointer;
    user-select: none;
    border-radius: 5px;
    transition: background .15s;
}

.cm-col-group-title:hover { background: var(--surface2); }

.cm-col-group-check {
    width: 14px;
    height: 14px;
    border: 1.5px solid var(--border2);
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: .55rem;
    color: transparent;
    transition: all .15s;
}

.cm-col-group.all-checked .cm-col-group-check {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.cm-col-group.some-checked .cm-col-group-check {
    background: rgba(59,130,246,.18);
    border-color: var(--accent);
    color: var(--accent);
}

.cm-col-group-name {
    flex: 1;
    font-size: .63rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--text3);
}

.cm-col-group-arrow {
    font-size: .62rem;
    color: var(--text3);
    transition: transform .2s;
    display: inline-block;
    line-height: 1;
}

.cm-col-group.collapsed .cm-col-group-arrow { transform: rotate(-90deg); }
.cm-col-group.collapsed .cm-col-group-items { display: none; }

/* ── Responsive ── */

@media (max-width: 768px) {
    .table-wrap,
    .arb-table-wrap { font-size: .74rem; }

    .filters-bar,
    .arb-filters,
    .cm-filters {
        flex-direction: column;
        align-items: flex-start;
    }
}
