.research { max-width: 1500px; margin: 0 auto; }
.research h2 { font-size: 21px; margin: 0 0 6px; }
.research h3 { font-size: 16px; margin: 0 0 12px; }
.research p { color: var(--muted); font-size: 13px; line-height: 1.5; }
.research-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.research-period, .research-add { display: flex; align-items: end; gap: 14px; flex-wrap: wrap; padding: 16px 0; }
.research-add { padding: 20px; }
.research [hidden] { display: none !important; }
.research label { display: flex; flex-direction: column; gap: 7px; font-size: 12px; color: var(--muted); }
.research input, .research select, .research textarea { background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: 7px; padding: 9px 11px; font: inherit; }
.research-add label:first-child { flex: 1; min-width: 260px; }
.research .table-wrap { overflow-x: auto; }
.research-average { padding: 10px 0 18px; color: var(--muted); }
.research-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 18px 0; }
.research-metric { padding: 18px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; }
.research-metric strong { display: block; font-size: 25px; margin: 9px 0; }
.research-status { padding: 14px 18px; border-radius: 8px; background: var(--accent-bg); margin-bottom: 16px; font-size: 13px; line-height: 1.7; }
.research-status.warning { background: rgba(220,150,30,.12); }
.research-section { margin: 18px 0; padding: 20px; }
.research-buttons { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0; }
.research-filters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.research textarea { width: 100%; min-height: 100px; box-sizing: border-box; }
.research .positive { color: #37aa70; }
.research .negative { color: #d16666; }
.research td { font-size: 12px; vertical-align: top; }
.research .clickable { cursor: pointer; }
.research .clickable:hover { background: var(--accent-bg); }
.research details { margin: 12px 0; }
.research summary { cursor: pointer; padding: 7px 0; }
.research .research-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.research .research-chips button { text-align: left; }
.research small { color: var(--muted); }
@media(max-width: 800px) { .research-filters { grid-template-columns: repeat(2,minmax(0,1fr)); } .research-summary { grid-template-columns: 1fr; } .research-toolbar { align-items: start; flex-direction: column; } }

.research-filters label { min-width: 0; }
.research-filters input, .research-filters select { width: 100%; min-width: 0; box-sizing: border-box; }

/* Телефон: строка таблицы — карточка с подписями, сортировка — ряд кнопок над списком. */
@media(max-width: 700px) {
  .rs-leaderboard, .rs-leaderboard tbody { display: block; }
  .rs-leaderboard thead tr { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px; }
  .rs-leaderboard thead th { display: none; padding: 0; border: 0; }
  .rs-leaderboard thead th:has(.research-sort) { display: block; }
  .rs-leaderboard thead .research-sort { border: 1px solid var(--border); border-radius: 14px; padding: 5px 10px; }
  .rs-leaderboard tbody tr { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px 12px; padding: 12px; border-bottom: 1px solid var(--border); }
  .rs-leaderboard tbody td { display: block; padding: 0; border: 0; font-size: 13px; white-space: normal; overflow-wrap: anywhere; min-width: 0; }
  .rs-leaderboard tbody td[data-label]:not([data-label=""])::before { content: attr(data-label); display: block; font-size: 11px; color: var(--muted); }
  .rs-leaderboard tbody td.rs-name { grid-column: 1 / 3; font-size: 15px; }
  .rs-leaderboard tbody td.rs-remove { grid-row: 1; grid-column: 3; text-align: right; }
  .rs-leaderboard tbody td.rs-source, .rs-leaderboard tbody td.rs-wide { grid-column: 1 / -1; }
  .rs-leaderboard tbody td.rs-wide small { line-height: 1.5; }
  .rs-leaderboard tbody td.rs-roi { font-weight: 600; }
}

/* Карточка каппера в стиле статистики BetHub */
.rs-strip { padding: 18px 22px; margin-bottom: 16px; }
.rs-big-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.rs-big > span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.rs-big strong { font-size: 30px; font-weight: 700; }
.rs-small-row { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 14px; font-size: 13px; color: var(--muted); }
.rs-small-row b { color: var(--text); }
.rs-grid { padding: 0; margin-bottom: 16px; overflow: hidden; }
.rs-grid-head { display: flex; align-items: baseline; gap: 14px; padding: 14px 18px; background: var(--accent-bg); }
.rs-grid-head h3 { margin: 0 !important; }
.rs-grid table { width: 100%; }
.rs-grid td, .rs-grid th { padding: 10px 14px; }
.rs-grid td { font-size: 14px; }
.rs-grid tr.clickable td:first-child b { color: var(--accent, #2563eb); }
.rs-sub > td { background: var(--bg); padding: 6px 14px 14px 34px !important; }
.rs-subtable { width: 100%; }
.rs-subtable td, .rs-subtable th { padding: 6px 10px; font-size: 13px; }
.rs-pager { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 10px 14px; }
.rs-picks td { vertical-align: middle; }
.rs-picks .rs-event { text-align: center; min-width: 180px; }
.rs-picks td.rs-win { background: rgba(55,170,112,.12); color: #2e9461; font-weight: 600; }
.rs-picks td.rs-loss { background: rgba(209,102,102,.12); color: #c25555; font-weight: 600; }
.rs-picks td.rs-push { background: var(--bg); }
.research-more > summary { font-weight: 600; }
@media(max-width: 700px) {
  .rs-big-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rs-big strong { font-size: 24px; }
  .rs-grid td, .rs-grid th { padding: 8px 8px; font-size: 12px; }
  .rs-picks .rs-event { min-width: 140px; }
}
.rs-rules { font-size: 14px; line-height: 1.6; }
.rs-rules ul { margin: 2px 0 10px 18px; padding: 0; }
.rs-filter-summary, .rs-filter-summary * { box-sizing: border-box; min-width: 0; overflow-wrap: anywhere; white-space: normal; }
.rs-filter-summary { max-width: 100%; }
.rs-filter-sport { margin: 18px 0; border: 1px solid var(--border); border-radius: 9px; overflow: hidden; }
.rs-filter-sport h4 { margin: 0; padding: 12px 16px; background: var(--accent-bg); font-size: 16px; }
.rs-filter-profile { padding: 14px 16px; border-top: 1px solid var(--border); }
.rs-filter-profile h5 { margin: 0 0 10px; font-size: 14px; }
.rs-filter-facts { margin: 0; padding: 10px 16px; }
.rs-filter-profile .rs-filter-facts { padding: 0 0 10px; }
.rs-filter-facts > div { display: grid; grid-template-columns: minmax(110px, 180px) minmax(0, 1fr); gap: 8px 16px; padding: 5px 0; }
.rs-filter-facts dt { color: var(--muted); font-size: 13px; }
.rs-filter-facts dd { margin: 0; font-size: 14px; }
.rs-filter-table { table-layout: fixed; width: 100%; border-collapse: collapse; }
.rs-filter-table th, .rs-filter-table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--border); font-size: 13px; vertical-align: top; }
.rs-filter-table th { font-size: 12px; color: var(--muted); }
.rs-filter-table th:first-child { width: 90px; }
.rs-filter-table th:nth-child(3) { width: 22%; }
.rs-filter-table th:last-child { width: 18%; }
.rs-filter-table td span { display: block; margin-top: 3px; }
.rs-filter-action { display: inline-block; }
.rs-filter-allow { color: #278253; }
.rs-filter-deny { color: #b14444; }
.rs-filter-fallback { margin: 10px 0 0; }
.rs-filter-note, .rs-filter-context { margin: 10px 0; }
.rs-filter-sport > .rs-filter-note, .rs-filter-sport > p { padding: 0 16px; }
.rs-filter-order summary { font-size: 13px; color: var(--muted); }
@media(max-width: 700px) {
  .rs-filter-profile { padding: 12px; }
  .rs-filter-facts { padding: 10px 12px; }
  .rs-filter-facts > div { grid-template-columns: minmax(0, 32%) minmax(0, 1fr); gap: 8px; padding: 5px 0; }
  .rs-filter-table, .rs-filter-table tbody, .rs-filter-table tr, .rs-filter-table td { display: block; width: 100%; }
  .rs-filter-table thead { display: none; }
  .rs-filter-table tr { border-top: 1px solid var(--border); padding: 8px 0; }
  .rs-filter-table td { padding: 4px 0; border: 0; }
  .rs-filter-table td:nth-child(n+3) { display: grid; grid-template-columns: minmax(0, 38%) minmax(0, 1fr); gap: 8px; }
  .rs-filter-table td:nth-child(n+3)::before { content: attr(data-label); font-size: 11px; color: var(--muted); }
  #rs-saved-filters { padding: 14px; }
  #rs-saved-filters .research-buttons { flex-direction: column; }
  #rs-saved-filters .btn { white-space: normal; overflow-wrap: anywhere; }
}
.rs-advanced { margin-top: 18px; }
.rs-flat { flex-direction: row !important; align-items: center; gap: 8px !important; font-size: 13px !important; }
.rs-flat input { width: 90px; padding: 4px 8px !important; }
@media(max-width: 700px) { .rs-grid table { min-width: 560px; } .rs-grid .table-wrap { overflow-x: auto; } }
.rs-spinner { display: inline-block; width: 14px; height: 14px; border: 2px solid var(--border); border-top-color: var(--accent, #2563eb); border-radius: 50%; animation: rs-spin .8s linear infinite; vertical-align: -2px; }
@keyframes rs-spin { to { transform: rotate(360deg); } }
.rs-loading { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); align-self: center; }
.rs-card-loading { padding: 16px; font-size: 14px; color: var(--muted); }
@media(max-width: 700px) {
  .rs-picks th:nth-child(5), .rs-picks td:nth-child(5), .rs-picks th:nth-child(7), .rs-picks td:nth-child(7) { display: none; }
  .rs-picks .rs-event { text-align: left; min-width: 0; white-space: normal; }
  .rs-picks td, .rs-picks th { padding: 6px 6px !important; }
  .rs-sub > td { padding: 4px 4px 10px 4px !important; }
  .rs-sub .table-wrap { position: sticky; left: 0; width: calc(100vw - 70px); overflow-x: visible; }
  .rs-sub .rs-picks { min-width: 0 !important; width: 100%; }
}
@media(max-width: 420px) {
  .rs-picks th:nth-child(1), .rs-picks td:nth-child(1) { display: none; }
  .rs-picks td, .rs-picks th { font-size: 12px !important; }
}
@media(max-width: 360px) {
  .rs-picks td, .rs-picks th { font-size: 11px !important; padding: 5px 3px !important; }
}

.rs-leaderboard { width: 100%; }
.rs-leaderboard td small { line-height: 1.45; }
.rs-leaderboard .rs-subsort { display: flex; gap: 6px; margin-top: 2px; }
.rs-leaderboard .rs-mini { font-size: 11px; color: var(--muted); padding: 0; }
.rs-leaderboard .rs-chip { font-size: 11px; padding: 1px 7px; margin: 3px 3px 0 0; border: 1px solid var(--border); border-radius: 10px; background: none; color: var(--text); cursor: pointer; white-space: nowrap; }
.rs-leaderboard .rs-del { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 14px; padding: 2px 4px; }
.rs-leaderboard .rs-del:hover { color: #d16666; }
.rs-leaderboard .rs-warn { color: #d08a1e; }
#rs-subscription small { line-height: 1.6; }
@media(max-width:700px) {
  .rs-leaderboard .rs-subsort { display: contents; }
}

.rs-unreviewed-section { border-top: 2px solid var(--border); margin-top: 28px; padding-top: 20px; }
.research .rs-review-toggle { flex-direction: row; align-items: center; gap: 10px; color: var(--text); font-size: 14px; cursor: pointer; }
.rs-review-toggle input { appearance: none; width: 42px; height: 24px; border-radius: 12px; padding: 0; background: var(--muted, #94a3b8); position: relative; cursor: pointer; flex-shrink: 0; }
.rs-review-toggle input::before { content: ''; position: absolute; width: 18px; height: 18px; top: 2px; left: 2px; border-radius: 50%; background: white; }
.rs-review-toggle input:checked { background: var(--primary, #2563eb); }
.rs-review-toggle input:checked::before { left: 20px; }
.rs-review-toggle input:focus-visible { outline: 2px solid var(--primary, #2563eb); outline-offset: 3px; }
.rs-review-toggle input:disabled { opacity: .5; cursor: wait; }

.rs-filter-archive {border:1px solid var(--border);border-radius:8px;padding:14px;margin:12px 0}
.rs-filter-archive input {width:100%;box-sizing:border-box;margin-bottom:8px}
.rs-filter-archive small {display:block}

/* 19.10: компактный вид фильтров каппера (статистика и Автоставки) */
.rs-compact { font-size: 14px; line-height: 1.5; }
.rs-compact .rs-c-general { margin: 0 0 10px; }
.rs-compact .rs-c-sport { margin: 0 0 8px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 9px; }
.rs-compact .rs-c-head { font-size: 15px; }
.rs-compact .rs-c-profile { margin: 6px 0 0 6px; padding-left: 10px; border-left: 2px solid var(--border); }
.rs-compact .rs-c-sport > .rs-c-what, .rs-compact .rs-c-profile > .rs-c-what { margin-left: 10px; }
.rs-compact .rs-c-list { margin: 2px 0 2px 4px; padding-left: 16px; }
.rs-compact .rs-c-list li { margin: 0; }
.rs-compact .rs-c-name { font-weight: 600; }
.rs-compact .rs-c-name small { font-weight: 400; color: var(--muted); }
.rs-compact .rs-c-take { color: #1a7f37; }
.rs-compact .rs-c-skip { color: #c62828; }
.rs-compact .rs-c-rest { color: var(--muted); font-size: 13px; }
.rs-compact .rs-c-mult { font-size: 12px; padding: 0 6px; border-radius: 8px; background: var(--accent-bg); font-weight: 600; }
.rs-compact .rs-c-sep { color: var(--muted); }
.rs-compact .rs-c-order { margin: 2px 0; padding-left: 20px; }

/* 19.10: покрытие БК по видам спорта */
.rs-cov-book { margin: 8px 0; padding: 8px 12px; border: 1px solid var(--border); border-radius: 9px; }
.rs-cov-book > summary { cursor: pointer; }
.rs-cov-sport { margin: 8px 0 0 6px; padding-left: 10px; border-left: 2px solid var(--border); }
.rs-cov-sport ul { margin: 4px 0; padding-left: 18px; }
.rs-pl { margin: 2px 0 4px; font-size: 12px; color: var(--text2); }
.rs-pl-row { margin: 2px 0; font-size: 12px; overflow-wrap: anywhere; }
.rs-pl-league { margin: 6px 0; padding-bottom: 4px; border-bottom: 1px dashed var(--border); }
.rs-pl-confirmed { color: var(--green, #1a7f37); white-space: nowrap; }
.rs-pl-once { color: var(--text2); white-space: nowrap; }
.rs-pl-block > summary { cursor: pointer; }
.rs-compact .rs-c-exp { margin: 2px 0 0 10px; font-size: 13px; }
.rs-check-month { margin: 4px 0; padding: 6px 10px; border: 1px solid var(--border); border-radius: 8px; }
.rs-check-month > summary { cursor: pointer; }
/* Competition controls fit the card on mobile; no horizontal table scrolling. */
.rs-competition-filter details {margin:10px 0;min-width:0}
.rs-competition-filter summary {font-weight:600;cursor:pointer}
.rs-comp-row {padding:10px 0;border-bottom:1px solid var(--border,#dde2e8);min-width:0}
.rs-comp-row label {display:flex;flex-direction:row;align-items:center;gap:8px;font-weight:500;overflow-wrap:anywhere}
.rs-comp-row input[type=checkbox] {width:auto;flex:none;margin:0}
.rs-comp-numbers {display:flex;flex-wrap:wrap;gap:5px 18px;margin:5px 0 0 24px;font-size:13px}

/* Read-only comparison tables and admission controls in the Auto-bets modal. */
#rs-grid-competitions .table-wrap,#rs-grid-phases .table-wrap {overflow:visible}
#rs-grid-competitions table,#rs-grid-phases table {table-layout:fixed;width:100%;min-width:0}
#rs-grid-competitions th:first-child,#rs-grid-phases th:first-child {width:43%}
#rs-grid-competitions td,#rs-grid-phases td {white-space:normal;overflow-wrap:anywhere}
#rs-grid-competitions .research-sort,#rs-grid-phases .research-sort {white-space:normal}
.rs-autobets-competitions details {margin:8px 0;min-width:0}
.rs-autobets-competitions summary {cursor:pointer;font-weight:600}
.rs-autobets-competitions label {display:flex!important;flex-direction:row;align-items:center;gap:8px;font-weight:400!important;margin:8px 0}
.rs-autobets-competitions input {width:auto!important;margin:0}

#rs-grid-competitions .rs-grid-head,#rs-grid-phases .rs-grid-head {flex-wrap:wrap}

#rs-grid-competitions .rs-comparison-sub th,#rs-grid-phases .rs-comparison-sub th {white-space:normal;overflow-wrap:anywhere;padding:6px 4px;font-size:11px}
.rs-quality-counts {display:flex;flex-wrap:wrap;gap:8px}
.rs-quality-counts .btn {white-space:normal;text-align:left;max-width:100%}
.rs-quality,.rs-quality-item,.rs-funnel {min-width:0;overflow-wrap:anywhere}
.rs-quality-item {padding:12px 0;border-bottom:1px solid var(--border)}
.rs-quality-item p {margin:5px 0}
.rs-funnel-steps {display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px}
.rs-funnel-steps div {border:1px solid var(--border);border-radius:8px;padding:10px;min-width:0}
.rs-funnel-steps b {display:block;font-size:24px}

/* 10.11: таблицы сборов — сравнение по странам, Pro365, Казахстан, турниры каппера */
.col-card { padding: 14px 16px; }
.col-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.col-chip { border: 1px solid var(--border); background: var(--surface, #fff); color: var(--text2); border-radius: 16px; padding: 6px 12px; font-size: 13px; cursor: pointer; }
.col-chip.active { background: var(--accent-bg); color: var(--accent); border-color: var(--accent); font-weight: 600; }
.col-note { color: var(--text2); font-size: 13px; margin: 0 0 10px; }
.col-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 0 0 8px; font-size: 13px; color: var(--text2); }
.col-tools input[type=search] { padding: 6px 10px; border: 1px solid var(--border); border-radius: 8px; min-width: 160px; }
.col-wrap { overflow: auto; max-height: 70vh; border: 1px solid var(--border); border-radius: 9px; }
.col-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.col-table th { position: sticky; top: 0; background: var(--accent-bg); text-align: center; padding: 8px 10px; white-space: nowrap; z-index: 1; }
.col-table th small { display: block; font-weight: 400; color: var(--text2); font-size: 11px; }
.col-table th:first-child, .col-table td:first-child { text-align: left; position: sticky; left: 0; background: var(--surface, #fff); min-width: 170px; max-width: 46vw; overflow-wrap: break-word; }
.col-table th:first-child { background: var(--accent-bg); z-index: 2; }
.col-table td { padding: 6px 10px; border-top: 1px solid var(--border); text-align: center; }
.col-table td small { color: var(--text2); font-size: 11px; }
.col-table tr.col-diff td:first-child { box-shadow: inset 3px 0 0 #f59e0b; }
.col-yes { color: var(--green); font-weight: 700; }
.col-no { color: var(--red); font-weight: 700; }
.col-na { color: var(--text3); font-size: 12px; }
.col-date { display: block; }
.col-sub { display: block; color: var(--text2); font-size: 11px; }
.rs-tour-table { margin: 10px 0; }
.rs-tour-table td.rs-tour-name small { color: var(--text2); }
.col-table th { text-transform: none; letter-spacing: 0; }
.col-table td:first-child { white-space: normal; }
.col-cell { white-space: nowrap; }
@media(max-width: 700px) {
  .col-table { font-size: 12px; table-layout: auto; }
  .col-table th { white-space: normal; padding: 6px 4px; font-size: 11px; }
  .col-table th small { font-size: 10px; }
  .col-table td { padding: 6px 4px; white-space: normal; overflow-wrap: break-word; }
  .rs-tour-table .col-table th:nth-child(2), .rs-tour-table .col-table td:nth-child(2) { width: 34px; font-size: 11px; }
  .rs-tour-table .col-table th:first-child, .rs-tour-table .col-table td:first-child { min-width: 30vw; max-width: 30vw; }
  .col-table th:first-child, .col-table td:first-child { min-width: 36vw; max-width: 36vw; }
  .col-table td small { display: block; }
  .col-table .col-date { display: none; }
}
