/* ═══════════════════════════════════════════════════════════════
   BUMAGA RED FLAG LIST — Public Page Styles v1.0
   Location: /assets/css/redflag.css

   CLEAN FLAT DARK — matches scam.css / disputes.css / methods.css
   No gradients. No glow. No glassmorphism.
   Hover = border-color only.

   Namespace: rf-*   (rf-adm-* уже занят admin панелью)
   Dependencies: tokens.css (--bp-* variables)

   Отличия от scam.css:
   - Hero акцент: --bp-accent (синий)
   - Нет damage column → reason badge column
   - rf-reason-badge: ignore(orange) / deadline(red) / behavior(purple)
   - rf-exit-section: блок "Как выйти из списка" (уникально)
   - Grouped tabs: по причине / по частоте (не по ущербу)
   ═══════════════════════════════════════════════════════════════ */

/* ── Page Layout ── */
.rf-page {
    max-width: clamp(900px, 86vw, 1280px);
    margin: 0 auto;
    padding: 0 20px 80px;
}

/* ══════════════════════════════════════════════════════════
   HERO
   ══════════════════════════════════════════════════════════ */
.rf-hero {
    text-align: center;
    padding: 52px 0 40px;
}

.rf-hero-title {
    font-size: 42px;
    font-weight: 900;
    color: var(--bp-text);
    margin: 0 0 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    line-height: 1.1;
}

/* Иконка — синий градиент, идентично scam.css */
.rf-hero-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--bp-accent, #4a9eff) 0%, #2d7cd6 100%);
    border-radius: var(--bp-radius);
    box-shadow: 0 8px 25px rgba(74, 158, 255, 0.3);
    flex-shrink: 0;
}

.rf-hero-icon svg {
    width: 30px;
    height: 30px;
    color: #fff;
}

.rf-hero-sub {
    font-size: 16px;
    color: var(--bp-text-secondary);
    line-height: 1.6;
    max-width: 520px;
    margin: 0 auto 24px;
}

/* ── Metrics bar ── */
.rf-hero-metrics {
    display: inline-flex;
    align-items: center;
    background: var(--bp-card);
    border: 1px solid var(--bp-border);
    border-radius: var(--bp-radius);
    margin-bottom: 14px;
    overflow: visible;
}

.rf-hero-metric {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 18px 32px;
    position: relative;
}

.rf-hero-metric-sep {
    width: 1px;
    height: 36px;
    background: var(--bp-border);
    flex-shrink: 0;
}

.rf-hero-metric-val {
    font-size: 24px;
    font-weight: 800;
    color: var(--bp-text);
    font-family: var(--bp-mono);
    line-height: 1;
}

/* Метрика 1 — всего кейсов: белый как в scam */
.rf-hero-metric-val--total {
    color: var(--bp-text);
}

/* Метрика 2 — топ причина: синий акцент платформы */
.rf-hero-metric-val--reason {
    color: #4a9eff;
    font-size: 20px; /* чуть меньше если текст длинный */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
}

/* Метрика 3 — уникальные акторы: синий */
.rf-hero-metric-val--actors {
    color: #4a9eff;
}

/* Метрика 4 — медиа: приглушённый */
.rf-hero-metric-val--media {
    color: #888888;
}

.rf-hero-metric-lbl {
    font-size: 11px;
    color: var(--bp-text-muted);
    text-transform: uppercase;
    letter-spacing: .5px;
    font-weight: 500;
    white-space: nowrap;
}

/* ── Metric tooltip ── */
.rf-metric-info {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 12px;
    height: 12px;
    margin-left: 4px;
    color: var(--bp-text-muted);
    cursor: help;
    font-size: 10px;
    font-style: normal;
    opacity: .3;
    vertical-align: middle;
    line-height: 1;
    flex-shrink: 0;
    transition: opacity .1s;
}

.rf-hero-metric:hover .rf-metric-info {
    opacity: .7;
}

.rf-metric-tooltip {
    position: absolute;
    top: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--bp-card);
    border: 1px solid var(--bp-border);
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 11px;
    color: var(--bp-text-muted);
    white-space: nowrap;
    z-index: 20;
    pointer-events: none;
    opacity: 0;
    transition: opacity .12s;
    text-transform: none;
    letter-spacing: 0;
    font-weight: 400;
}

.rf-metric-tooltip::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-bottom-color: var(--bp-border);
}

.rf-hero-metric:hover .rf-metric-tooltip {
    opacity: 1;
}

/* ── Trust note ── */
.rf-hero-trust {
    font-size: 12px;
    color: var(--bp-text-muted);
    margin: 0 auto 20px;
    max-width: 440px;
    line-height: 1.5;
}

/* ── CTA buttons ── */
.rf-hero-actions {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    justify-content: center;
}

/* CTA — синий акцент, идентично scam.css */
.rf-hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 28px;
    background: var(--bp-accent, #4a9eff);
    color: #fff;
    border-radius: var(--bp-radius-xs);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background var(--bp-transition-fast);
}

.rf-hero-cta:hover {
    background: var(--bp-accent-hover, #3a8eef);
}

.rf-hero-ghost {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    background: transparent;
    color: var(--bp-text-secondary);
    border: 1px solid var(--bp-border);
    border-radius: var(--bp-radius-xs);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: border-color var(--bp-transition-fast), color var(--bp-transition-fast);
}

.rf-hero-ghost:hover {
    border-color: var(--bp-accent, #4a9eff);
    color: var(--bp-text);
}

/* ══════════════════════════════════════════════════════════
   INFO STRIP — дисклеймер + шаги
   ══════════════════════════════════════════════════════════ */
.rf-info-strip {
    width: min(860px, 100%);
    margin: 0 auto 20px;
    background: var(--bp-card, #1f1f1f);
    border: 1px solid var(--bp-border, #2a2a2a);
    border-radius: 16px;
    overflow: hidden;
}

.rf-info-top {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    border-bottom: 1px solid #222;
}

/* Иконка strip — синий акцент как в scam.css */
.rf-info-icon {
    width: 32px;
    height: 32px;
    background: rgba(74, 158, 255, 0.10);
    border: 1px solid rgba(74, 158, 255, 0.20);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #4a9eff;
}

.rf-info-disclaimer {
    flex: 1;
    font-size: 13px;
    color: var(--bp-text-secondary, #888);
    line-height: 1.5;
    margin: 0;
    min-width: 0;
}

.rf-info-steps {
    display: flex;
    background: #111;
}

.rf-info-step {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 10px 6px;
    text-align: center;
    border-right: 1px solid #1e1e1e;
    min-width: 0;
}

.rf-info-step:last-child { border-right: none; }

/* Номер шага — оранжевый акцент */
.rf-info-step-num {
    width: 20px;
    height: 20px;
    background: rgba(251, 146, 60, 0.10);
    border: 1px solid rgba(251, 146, 60, 0.18);
    border-radius: 5px;
    color: var(--bp-accent, #4a9eff);
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.rf-info-step-lbl {
    font-size: 11px;
    color: #666;
    font-weight: 400;
    line-height: 1.3;
    letter-spacing: 0.1px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

/* ══════════════════════════════════════════════════════════
   RF INFOBLOCK — Причины + Как выйти
   ══════════════════════════════════════════════════════════ */
.rf-infoblock {
    width: min(860px, 100%);
    margin: 0 auto 20px;
    background: var(--bp-card, #1f1f1f);
    border: 1px solid var(--bp-border, #2a2a2a);
    border-radius: 16px;
    overflow: hidden;
}

.rf-infoblock-sep {
    height: 1px;
    background: #222;
}

/* ── Section ── */
.rf-infoblock-section {}

.rf-infoblock-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: #111;
    border-bottom: 1px solid #222;
}

.rf-infoblock-head-icon {
    width: 26px;
    height: 26px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
}

.rf-infoblock-head-icon--warn {
    background: rgba(74,158,255,.10);
    border: 1px solid rgba(74,158,255,.20);
    color: var(--bp-accent, #4a9eff);
}

.rf-infoblock-head-icon--green {
    background: rgba(52,211,153,.10);
    border: 1px solid rgba(52,211,153,.20);
    color: var(--bp-green, #34d399);
}

.rf-infoblock-head-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--bp-text, #f0f0f0);
}

.rf-infoblock-body {
    padding: 16px 20px;
}

.rf-infoblock-body--two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

/* ── Reasons ── */
.rf-infoblock-reasons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.rf-infoblock-reason {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid transparent;
}

.rf-infoblock-reason--ignore  { background: rgba(74,158,255,.05); border-color: rgba(74,158,255,.12); }
.rf-infoblock-reason--deadline { background: rgba(248,113,113,.05); border-color: rgba(248,113,113,.12); }
.rf-infoblock-reason--behavior { background: rgba(168,85,247,.05);  border-color: rgba(168,85,247,.12); }

.rf-infoblock-reason-num {
    width: 20px;
    height: 20px;
    border-radius: 5px;
    background: rgba(255,255,255,.05);
    border: 1px solid #2a2a2a;
    color: #555;
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
    font-family: var(--bp-mono);
}

.rf-infoblock-reason-content {
    flex: 1;
    min-width: 0;
}

.rf-infoblock-reason-title {
    margin-bottom: 5px;
}

.rf-infoblock-reason-text {
    font-size: 12px;
    color: var(--bp-text-muted, #555);
    line-height: 1.55;
    margin: 0;
}

/* ── Exit steps ── */
.rf-infoblock-exit-steps {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rf-infoblock-exit-step {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.rf-infoblock-exit-num {
    width: 20px;
    height: 20px;
    border-radius: 5px;
    background: rgba(52,211,153,.10);
    border: 1px solid rgba(52,211,153,.20);
    color: var(--bp-green, #34d399);
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
}

.rf-infoblock-exit-text {
    font-size: 12px;
    color: var(--bp-text-secondary, #888);
    line-height: 1.55;
}

.rf-infoblock-exit-note {
    font-size: 11px;
    color: var(--bp-text-muted, #555);
    margin: 10px 0 0;
    padding-top: 10px;
    border-top: 1px solid #222;
    line-height: 1.5;
}

/* ── Form info ── */
.rf-infoblock-form-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.rf-infoblock-form-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #444;
    margin-bottom: 4px;
}

.rf-infoblock-form-fields {
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: #111;
    border: 1px solid #222;
    border-radius: 10px;
    padding: 12px 14px;
}

.rf-infoblock-form-field {
    display: flex;
    align-items: center;
    gap: 10px;
}

.rf-infoblock-form-num {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    background: rgba(74,158,255,.10);
    border: 1px solid rgba(74,158,255,.20);
    color: #4a9eff;
    font-size: 9px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-family: var(--bp-mono);
}

.rf-infoblock-form-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--bp-text-secondary, #888);
    font-family: var(--bp-mono);
}

.rf-infoblock-form-hint {
    display: block;
    font-size: 10px;
    color: #444;
    margin-top: 1px;
}

.rf-infoblock-form-cta {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 16px;
    background: rgba(74,158,255,.08);
    border: 1px solid rgba(74,158,255,.2);
    border-radius: 8px;
    color: #4a9eff;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: background .15s, border-color .15s;
    margin-top: 4px;
}

.rf-infoblock-form-cta:hover {
    background: rgba(74,158,255,.14);
    border-color: rgba(74,158,255,.4);
}

/* Mobile */
@media (max-width: 768px) {
    .rf-infoblock-body--two-col {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .rf-infoblock { border-radius: 14px; margin-bottom: 16px; }
    .rf-infoblock-body { padding: 14px; }
}

/* ══════════════════════════════════════════════════════════
   BODY LAYOUT
   ══════════════════════════════════════════════════════════ */
.rf-layout {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* ══════════════════════════════════════════════════════════
   REASON BADGES — семантические цвета (используются везде)
   ══════════════════════════════════════════════════════════ */
.rf-reason-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    line-height: 1.5;
    letter-spacing: .2px;
}

.rf-reason-badge--ignore {
    background: rgba(154, 140, 122, 0.15);
    color: #9a8c7a;
    border: 1px solid rgba(154, 140, 122, 0.2);
}

.rf-reason-badge--deadline {
    background: rgba(180, 70, 70, 0.15);
    color: #c47070;
    border: 1px solid rgba(180, 70, 70, 0.2);
}

.rf-reason-badge--behavior {
    background: rgba(110, 80, 170, 0.15);
    color: #9b7ec8;
    border: 1px solid rgba(110, 80, 170, 0.2);
}

/* ══════════════════════════════════════════════════════════
   CONTENT CARD
   ══════════════════════════════════════════════════════════ */
.rf-content-card {
    width: min(860px, 100%);
    margin-left: auto;
    margin-right: auto;
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 16px;
    overflow: clip;
}

/* ══════════════════════════════════════════════════════════
   CONTROL BAR — title + tabs + search
   ══════════════════════════════════════════════════════════ */
.rf-control-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px 16px;
    flex-wrap: wrap;
    border-bottom: 1px solid #222;
}

.rf-section-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--bp-text);
    margin: 0;
    white-space: nowrap;
    flex-shrink: 0;
}

.rf-control-bar-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    justify-content: flex-end;
    min-width: 0;
}

/* ── Segmented tabs ── */
.rf-tabs {
    display: inline-flex;
    background: #111;
    border: 1px solid #2a2a2a;
    border-radius: 10px;
    padding: 4px;
    gap: 2px;
    flex-shrink: 0;
}

.rf-tab {
    padding: 6px 14px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    color: #888;
    font-size: 13px;
    font-weight: 400;
    cursor: pointer;
    transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
    white-space: nowrap;
    line-height: 1.4;
}

.rf-tab:hover { color: var(--bp-text); }

.rf-tab.active {
    background: #1a1a1a;
    border-color: var(--bp-accent, #4a9eff);
    color: var(--bp-accent, #4a9eff);
    font-weight: 500;
}

/* ── Control slot ── */
.rf-control-slot {
    position: relative;
    flex: 1;
    min-width: 140px;
    max-width: 240px;
    height: 34px;
    flex-shrink: 1;
}

.rf-search-wrap {
    position: absolute;
    inset: 0;
    transition: opacity 0.18s ease;
}

.rf-search-wrap--hidden {
    opacity: 0;
    pointer-events: none;
}

/* Sort badge (visible on grouped tabs) */
.rf-sort-badge {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: #111;
    border: 1px solid #2a2a2a;
    border-radius: var(--bp-radius-xs);
    color: #555;
    font-size: 12px;
    font-weight: 500;
    font-family: var(--bp-mono);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease;
}

.rf-sort-badge--visible { opacity: 1; }

.rf-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--bp-text-muted);
    pointer-events: none;
}

.rf-search-input {
    width: 100%;
    height: 100%;
    padding: 0 36px 0 38px;
    background: var(--bp-card);
    border: 1px solid var(--bp-border);
    border-radius: var(--bp-radius-xs);
    color: var(--bp-text);
    font-size: 13px;
    transition: border-color var(--bp-transition-fast);
    outline: none;
    box-sizing: border-box;
}

.rf-search-input::placeholder { color: var(--bp-text-muted); }
.rf-search-input:focus { border-color: var(--bp-accent, #4a9eff); }

.rf-search-clear {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--bp-text-muted);
    cursor: pointer;
    font-size: 13px;
    padding: 4px;
    line-height: 1;
    border-radius: 3px;
    transition: color var(--bp-transition-fast);
}

.rf-search-clear:hover { color: var(--bp-text); }

/* ── Filter button ── */
.rf-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 34px;
    padding: 0 14px;
    background: #111;
    border: 1px solid #2a2a2a;
    border-radius: var(--bp-radius-xs);
    color: #666;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: border-color .15s, color .15s;
    flex-shrink: 0;
    white-space: nowrap;
}

.rf-filter-btn:hover,
.rf-filter-btn.active {
    border-color: rgba(74,158,255,.4);
    color: var(--bp-accent, #4a9eff);
}

/* ── Filter panel ── */
.rf-filter-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height .25s ease, opacity .2s ease;
    opacity: 0;
}

.rf-filter-panel--open {
    max-height: 160px;
    opacity: 1;
    border-bottom: 1px solid #222;
}

.rf-filter-panel-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 10px 20px 12px;
    background: #111;
}

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

.rf-filter-group-label {
    font-size: 10px;
    font-weight: 700;
    color: #444;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    white-space: nowrap;
    flex-shrink: 0;
}

.rf-filter-group-sep {
    width: 1px;
    height: 18px;
    background: #2a2a2a;
    flex-shrink: 0;
    align-self: center;
}

.rf-filter-reset {
    margin-left: auto;
    padding: 3px 10px;
    background: transparent;
    border: 1px solid #2a2a2a;
    border-radius: 6px;
    color: #555;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: border-color .15s, color .15s;
    white-space: nowrap;
}

.rf-filter-reset:hover {
    border-color: #ef4444;
    color: #ef4444;
}

/* ── Reason chips — оранжевый акцент (отличие от scam.css) ── */
.rf-reason-chips {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.rf-reason-chip {
    padding: 3px 11px;
    background: transparent;
    border: 1px solid #2a2a2a;
    border-radius: 20px;
    color: #666;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: color .15s, border-color .15s, background .15s;
    white-space: nowrap;
    line-height: 1.6;
}

.rf-reason-chip:hover {
    color: var(--bp-text);
    border-color: #444;
}

/* Ignore — оранжевый */
.rf-reason-chip--ignore.active {
    background: rgba(74,158,255,.1);
    border-color: rgba(74,158,255,.4);
    color: var(--bp-accent, #4a9eff);
    font-weight: 600;
}
.rf-reason-chip--ignore:hover {
    border-color: rgba(74,158,255,.3);
    color: var(--bp-accent, #4a9eff);
}

/* Deadline — красный */
.rf-reason-chip--deadline.active {
    background: rgba(248,113,113,.1);
    border-color: rgba(248,113,113,.4);
    color: var(--bp-red, #f87171);
    font-weight: 600;
}
.rf-reason-chip--deadline:hover {
    border-color: rgba(248,113,113,.3);
    color: var(--bp-red, #f87171);
}

/* Behavior — фиолетовый */
.rf-reason-chip--behavior.active {
    background: rgba(168,85,247,.1);
    border-color: rgba(168,85,247,.4);
    color: #a855f7;
    font-weight: 600;
}
.rf-reason-chip--behavior:hover {
    border-color: rgba(168,85,247,.3);
    color: #a855f7;
}

/* Period chips — обычные синие (как в scam.css) */
.rf-period-chip {
    padding: 3px 11px;
    background: transparent;
    border: 1px solid #2a2a2a;
    border-radius: 20px;
    color: #666;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: color .15s, border-color .15s, background .15s;
    white-space: nowrap;
    line-height: 1.6;
}

.rf-period-chip:hover {
    color: var(--bp-text);
    border-color: #444;
}

.rf-period-chip.active {
    background: rgba(74,158,255,.1);
    border-color: rgba(74,158,255,.4);
    color: #4a9eff;
    font-weight: 600;
}

/* ── Search count bar ── */
.rf-search-count {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    padding: 6px 20px;
    font-size: 12px;
    color: var(--bp-text-muted);
    background: #111;
    border-bottom: 1px solid #222;
    line-height: 1.5;
}

.rf-search-count strong {
    color: var(--bp-accent, #4a9eff);
    font-weight: 700;
}

.rf-count-tag {
    display: inline-flex;
    align-items: center;
    padding: 1px 7px;
    background: rgba(74,158,255,.08);
    border: 1px solid rgba(74,158,255,.2);
    border-radius: 10px;
    font-size: 11px;
    color: var(--bp-accent, #4a9eff);
    font-weight: 500;
}

/* ══════════════════════════════════════════════════════════
   PANELS
   ══════════════════════════════════════════════════════════ */
.rf-panel { display: block; }
.rf-panel--hidden { display: none; }

.rf-panel-inner {
    padding: 18px 22px 22px;
}

/* ══════════════════════════════════════════════════════════
   ACTOR GROUP — grouped view (по причине / по частоте)
   ══════════════════════════════════════════════════════════ */
.rf-actor-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

@keyframes rfActorGroupIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.rf-actor-group {
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.2s ease;
    animation: rfActorGroupIn 0.22s ease both;
}

.rf-actor-group:nth-child(1)  { animation-delay: 0.00s; }
.rf-actor-group:nth-child(2)  { animation-delay: 0.04s; }
.rf-actor-group:nth-child(3)  { animation-delay: 0.08s; }
.rf-actor-group:nth-child(4)  { animation-delay: 0.12s; }
.rf-actor-group:nth-child(5)  { animation-delay: 0.16s; }
.rf-actor-group:nth-child(6)  { animation-delay: 0.20s; }
.rf-actor-group:nth-child(7)  { animation-delay: 0.24s; }
.rf-actor-group:nth-child(8)  { animation-delay: 0.28s; }
.rf-actor-group:nth-child(9)  { animation-delay: 0.32s; }
.rf-actor-group:nth-child(10) { animation-delay: 0.36s; }

.rf-actor-group:hover { border-color: rgba(74,158,255,.25); }

.rf-actor-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: #252525;
    border-bottom: 1px solid #2a2a2a;
}

/* Rank badge — идентично scam.css */
.rf-actor-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 20px;
    padding: 0 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 800;
    font-family: var(--bp-mono);
    flex-shrink: 0;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    color: #555;
}

.rf-actor-rank--1 {
    background: rgba(255,215,0,.12);
    border-color: rgba(255,215,0,.3);
    color: #FFD700;
}

.rf-actor-rank--2 {
    background: rgba(180,180,180,.08);
    border-color: rgba(180,180,180,.2);
    color: #aaaaaa;
}

.rf-actor-rank--3 {
    background: rgba(205,127,50,.1);
    border-color: rgba(205,127,50,.25);
    color: #cd7f32;
}

.rf-actor-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.rf-actor-handle {
    font-size: 14px;
    font-weight: 700;
    color: var(--bp-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rf-actor-group[data-rank="1"] .rf-actor-handle { font-size: 15px; }

.rf-actor-meta {
    font-size: 11px;
    color: var(--bp-text-muted);
    font-family: var(--bp-mono);
}

/* Итог группы — оранжевый (частота / количество кейсов) */
.rf-actor-total {
    font-size: 14px;
    font-weight: 700;
    color: var(--bp-accent, #4a9eff);
    font-family: var(--bp-mono);
    flex-shrink: 0;
    white-space: nowrap;
}

.rf-actor-group[data-rank="1"] .rf-actor-total { font-size: 15px; }

/* Reason badge в header группы */
.rf-actor-header .rf-reason-badge {
    flex-shrink: 0;
}

/* ── Actor cases list ── */
.rf-actor-cases {
    display: flex;
    flex-direction: column;
    background: #141414;
}

/* Заголовок колонок: дата + причина + детали + шеврон */
.rf-actor-cases-head {
    display: grid;
    grid-template-columns: 52px 100px 1fr 20px;
    gap: 8px;
    padding: 6px 16px 6px 48px;
    border-top: 1px solid #222;
    border-bottom: 1px solid #1e1e1e;
    background: #111;
}

.rf-actor-cases-col {
    font-size: 10px;
    font-weight: 700;
    color: #444;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    white-space: nowrap;
}

.rf-actor-case-row {
    display: grid;
    grid-template-columns: 52px 100px 1fr 20px;
    gap: 8px;
    padding: 10px 16px 10px 48px;
    align-items: center;
    border-top: 1px solid #222;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
    user-select: none;
}

.rf-actor-case-row:hover {
    background: rgba(74,158,255,.05);
    border-color: rgba(74,158,255,.1);
}

.rf-actor-case-row--open {
    background: rgba(74,158,255,.07);
    border-left: 2px solid var(--bp-accent, #4a9eff);
    padding-left: 46px;
}

.rf-actor-case-row--open .rf-actor-case-arrow {
    color: var(--bp-accent, #4a9eff);
    transform: rotate(90deg);
}

.rf-actor-case-num {
    font-size: 12px;
    font-weight: 700;
    color: var(--bp-text-muted);
    font-family: var(--bp-mono);
    white-space: nowrap;
}

.rf-actor-case-date {
    font-size: 11px;
    color: var(--bp-text-muted);
    font-family: var(--bp-mono);
}

.rf-actor-case-detail {
    font-size: 12px;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rf-actor-case-arrow {
    font-size: 14px;
    color: var(--bp-text-muted);
    text-align: right;
    transition: color 0.15s, transform 0.15s;
}

.rf-actor-case-row:hover .rf-actor-case-arrow {
    color: var(--bp-accent, #4a9eff);
    transform: translateX(2px);
}

/* ── Grouped expand ── */
.rf-grouped-expand {
    border-top: 1px solid #2a2a2a;
    background: #1a1a1a;
    animation: rfExpandIn .18s ease;
}

/* ══════════════════════════════════════════════════════════
   REGISTRY TABLE
   ══════════════════════════════════════════════════════════ */
.rf-registry {
    background: transparent;
    border: none;
    border-top: 1px solid #2a2a2a;
    border-radius: 0;
    overflow: hidden;
    margin-bottom: 0;
}

.rf-row-expand { overflow: hidden; }

/* Заголовок: thumb | # | actors | reason | status | link | chevron */
.rf-registry-head {
    display: grid;
    grid-template-columns: 64px 40px 1fr 160px 36px 24px;
    gap: 8px;
    padding: 8px 16px;
    background: #111;
    border-bottom: 1px solid #2a2a2a;
}

.rf-registry-col {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .8px;
    text-transform: uppercase;
    color: #555;
}

.rf-registry-col--badges { text-align: right; }

/* Ячейка badges (reason) — паттерн scm-row-damage-cell, правое выравнивание */
.rf-row-badges-cell {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
}

/* ── Row ── */
.rf-row {
    display: block;
    border-bottom: 1px solid #222;
}

.rf-row:last-child { border-bottom: none; }

.rf-row-inner {
    display: grid;
    grid-template-columns: 64px 40px 1fr 160px 36px 24px;
    gap: 8px;
    padding: 12px 16px;
    align-items: center;
    cursor: pointer;
    transition: background 0.15s ease;
    user-select: none;
}

.rf-row-inner:hover { background: rgba(74,158,255,0.06); }

.rf-row--open > .rf-row-inner {
    background: rgba(74,158,255,0.10);
    border-left: 3px solid #4a9eff;
    padding-left: 13px;
}

/* Превью */
.rf-row-thumb {
    width: 56px;
    height: 38px;
    border-radius: 6px;
    overflow: hidden;
    background: #222;
    position: relative;
    flex-shrink: 0;
    border: 1px solid #2a2a2a;
}

.rf-row-thumb picture,
.rf-row-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.rf-row-thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #444;
}

.rf-row-thumb-hover {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.65);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    opacity: 0;
    transition: opacity .13s;
    border-radius: 5px;
}

.rf-row-inner:hover .rf-row-thumb-hover { opacity: 1; }

.rf-row-num {
    font-size: 12px;
    font-weight: 700;
    color: #444;
    font-family: var(--bp-mono);
    white-space: nowrap;
}

.rf-row-actor-cell {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.rf-row-actor {
    font-size: 13px;
    font-weight: 600;
    color: #e0e0e0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rf-row-date {
    font-size: 11px;
    color: #555;
    font-family: var(--bp-mono);
}

.rf-row-link-btn {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: 1px solid #2a2a2a;
    background: #111;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #444;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
    flex-shrink: 0;
}

.rf-row-link-btn:hover {
    border-color: rgba(74,158,255,.5);
    color: var(--bp-accent, #4a9eff);
    background: rgba(74,158,255,.06);
}

.rf-row-chevron {
    font-size: 15px;
    color: #444;
    transition: transform 0.2s ease, color 0.2s ease;
    text-align: center;
    line-height: 1;
    display: block;
    width: 16px;
}

.rf-row--open .rf-row-chevron,
.rf-row-chevron.open {
    transform: rotate(90deg);
    color: var(--bp-accent, #4a9eff);
}

/* ══════════════════════════════════════════════════════════
   EXPAND — inline case detail
   ══════════════════════════════════════════════════════════ */
.rf-row-expand {
    border-top: 1px solid #2a2a2a;
    background: #1a1a1a;
    animation: rfExpandIn .18s ease;
}

@keyframes rfExpandIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: none; }
}

.rf-expand-inner {
    display: grid;
    grid-template-columns: 300px 1fr;
    min-height: 260px;
}

.rf-exp-gallery {
    padding: 16px;
    border-right: 1px solid #2a2a2a;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #111;
}

.rf-exp-gallery-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #666;
    margin-bottom: 2px;
}

.rf-exp-gallery--empty {
    padding: 48px 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 10px;
    color: #444;
    font-size: 11px;
    background: #111;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.rf-exp-slides {
    position: relative;
    height: 280px;
    background: #111;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #333;
    cursor: zoom-in;
}

.rf-exp-slides-hover {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.55);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .5px;
    opacity: 0;
    transition: opacity .18s;
    z-index: 3;
    pointer-events: none;
    border-radius: 7px;
}

.rf-exp-slides:hover .rf-exp-slides-hover { opacity: 1; }

.rf-exp-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #111;
    display: none;
}

picture.rf-exp-slide {
    display: none;
    align-items: center;
    justify-content: center;
}

picture.rf-exp-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.rf-exp-slide--active { display: block; }
picture.rf-exp-slide--active { display: flex; }

.rf-exp-gallery-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 4px 8px;
}

.rf-exp-nav-btn {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    border: none;
    background: transparent;
    color: #666;
    font-size: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s;
    line-height: 1;
    font-family: inherit;
}

.rf-exp-nav-btn:hover:not(:disabled) { color: var(--bp-accent, #4a9eff); }
.rf-exp-nav-btn:disabled { opacity: .2; cursor: default; }

.rf-exp-gallery-counter {
    font-size: 12px;
    color: #888;
    font-family: var(--bp-mono);
}

.rf-exp-strip {
    display: flex;
    gap: 5px;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 2px;
    scrollbar-width: thin;
    scrollbar-color: #333 transparent;
}

.rf-exp-strip::-webkit-scrollbar { height: 3px; }
.rf-exp-strip::-webkit-scrollbar-track { background: transparent; }
.rf-exp-strip::-webkit-scrollbar-thumb { background: #333; border-radius: 2px; }

.rf-exp-strip-thumb {
    width: 42px;
    height: 30px;
    border-radius: 5px;
    background-color: #1f1f1f;
    background-size: cover;
    background-position: center;
    border: 1px solid #333;
    cursor: pointer;
    opacity: .45;
    transition: opacity .15s, border-color .15s;
    flex: 0 0 auto;
}

.rf-exp-strip-thumb:hover { opacity: .75; }

.rf-exp-strip-thumb--active {
    opacity: 1;
    border-color: var(--bp-accent, #4a9eff);
    box-shadow: 0 0 0 1px rgba(74,158,255,.3);
}

/* ── Meta panel ── */
.rf-exp-meta {
    padding: 20px 22px;
    display: flex;
    flex-direction: column;
    gap: 0;
    background: #1a1a1a;
    min-width: 0;
    overflow: visible;
}

.rf-exp-section {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px 0;
    border-bottom: 1px solid #2a2a2a;
    min-width: 0;
}

.rf-exp-section:first-child { padding-top: 0; }
.rf-exp-section:last-child  { border-bottom: none; padding-bottom: 0; }

.rf-exp-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #666;
}

.rf-exp-value {
    font-size: 13px;
    color: #ccc;
    line-height: 1.65;
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    min-width: 0;
}

.rf-exp-muted { color: #444; }

/* Акторы */
.rf-exp-actors {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 3px;
    min-width: 0;
}

.rf-exp-actor {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    background: rgba(74,158,255,.06);
    border: 1px solid rgba(74,158,255,.12);
    border-radius: 20px;
    font-size: 12px;
    color: #777;
    font-weight: 500;
}

.rf-exp-actor--primary {
    background: rgba(74,158,255,.12);
    border-color: rgba(74,158,255,.35);
    color: var(--bp-accent, #4a9eff);
    font-weight: 600;
}

.rf-exp-actor-id {
    font-size: 11px;
    color: #444;
    font-family: var(--bp-mono);
    margin-left: 5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 120px;
}

/* Skeleton */
.rf-exp-gallery--skeleton { background: #111; }

.rf-exp-skeleton-main {
    height: 180px;
    background: #1f1f1f;
    border-radius: 6px;
    border: 1px solid #333;
    animation: rfPulse 1.4s ease-in-out infinite;
}

.rf-exp-skeleton-strip {
    height: 28px;
    background: #1f1f1f;
    border-radius: 4px;
    animation: rfPulse 1.4s ease-in-out infinite .2s;
}

.rf-exp-skeleton-line {
    height: 10px;
    border-radius: 4px;
    background: #1f1f1f;
    margin-bottom: 10px;
    animation: rfPulse 1.4s ease-in-out infinite;
}

@keyframes rfPulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: .4; }
}

.rf-expand-error {
    padding: 28px;
    text-align: center;
    color: #444;
    font-size: 13px;
}

/* ══════════════════════════════════════════════════════════
   TOAST
   ══════════════════════════════════════════════════════════ */
.rf-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    background: #1f1f1f;
    border: 1px solid rgba(74,158,255,.25);
    border-radius: 8px;
    padding: 8px 18px;
    font-size: 13px;
    color: var(--bp-accent, #4a9eff);
    pointer-events: none;
    opacity: 0;
    transition: opacity .18s, transform .18s;
    z-index: 500;
    white-space: nowrap;
    font-weight: 500;
}

.rf-toast--visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ══════════════════════════════════════════════════════════
   EMPTY STATE
   ══════════════════════════════════════════════════════════ */
.rf-empty {
    padding: 48px 20px;
    text-align: center;
    color: var(--bp-text-muted);
    font-size: 14px;
    display: none;
}

.rf-empty.is-visible { display: block; }

/* ══════════════════════════════════════════════════════════
   LOAD MORE
   ══════════════════════════════════════════════════════════ */
.rf-load-more-wrap {
    padding: 16px 20px;
    text-align: center;
    border-top: 1px solid #222;
}

.rf-load-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 28px;
    background: var(--bp-card);
    border: 1px solid var(--bp-border);
    border-radius: var(--bp-radius-xs);
    color: var(--bp-text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: border-color var(--bp-transition-fast), color var(--bp-transition-fast);
}

.rf-load-more-btn:hover:not(:disabled) {
    border-color: var(--bp-accent, #4a9eff);
    color: var(--bp-text);
}

.rf-load-more-btn:disabled { opacity: .5; cursor: default; }

/* ══════════════════════════════════════════════════════════
   LIGHTBOX
   ══════════════════════════════════════════════════════════ */
.rf-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.92);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(6px);
    cursor: zoom-out;
}

.rf-lightbox.is-open { display: flex; }

.rf-lightbox-inner {
    position: relative;
    max-width: 92vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rf-lightbox-img {
    max-width: 92vw;
    max-height: 88vh;
    object-fit: contain;
    border-radius: 8px;
    display: block;
    cursor: default;
}

.rf-lightbox-close {
    position: fixed;
    top: 20px;
    right: 24px;
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 50%;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s;
    z-index: 2001;
}

.rf-lightbox-close:hover { background: rgba(255,255,255,.18); }

.rf-lightbox-btn {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 50%;
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s;
    z-index: 2001;
    line-height: 1;
}

.rf-lightbox-btn:hover { background: rgba(255,255,255,.18); }
.rf-lightbox-btn:disabled { opacity: .2; cursor: default; }
.rf-lightbox-btn--prev { left: 20px; }
.rf-lightbox-btn--next { right: 20px; }

.rf-lightbox-counter {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,.55);
    color: #fff;
    font-size: 13px;
    font-family: var(--bp-mono);
    padding: 4px 12px;
    border-radius: 20px;
    z-index: 2001;
    pointer-events: none;
}

/* ══════════════════════════════════════════════════════════
   REASON STRIP — компактная полоска вместо infoblock
   ══════════════════════════════════════════════════════════ */
.rf-reason-strip {
    width: min(860px, 100%);
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    background: var(--bp-card, #1f1f1f);
    border: 1px solid var(--bp-border, #2a2a2a);
    border-radius: 12px;
    padding: 10px 16px;
}

.rf-reason-strip-label {
    font-size: 11px;
    font-weight: 600;
    color: #555;
    text-transform: uppercase;
    letter-spacing: .8px;
    white-space: nowrap;
    flex-shrink: 0;
}

.rf-reason-strip-chips {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    flex: 1;
}

.rf-reason-strip-chip {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all .15s;
    border: 1px solid transparent;
    background: transparent;
    white-space: nowrap;
}

.rf-reason-strip-chip--ignore {
    color: var(--bp-accent, #4a9eff);
    border-color: rgba(74,158,255,.25);
    background: rgba(74,158,255,.06);
}
.rf-reason-strip-chip--ignore:hover {
    background: rgba(74,158,255,.14);
    border-color: rgba(74,158,255,.5);
}

.rf-reason-strip-chip--deadline {
    color: var(--bp-red, #f87171);
    border-color: rgba(248,113,113,.25);
    background: rgba(248,113,113,.06);
}
.rf-reason-strip-chip--deadline:hover {
    background: rgba(248,113,113,.14);
    border-color: rgba(248,113,113,.5);
}

.rf-reason-strip-chip--behavior {
    color: #a855f7;
    border-color: rgba(168,85,247,.25);
    background: rgba(168,85,247,.06);
}
.rf-reason-strip-chip--behavior:hover {
    background: rgba(168,85,247,.14);
    border-color: rgba(168,85,247,.5);
}

.rf-reason-strip-exit {
    font-size: 12px;
    color: #555;
    text-decoration: none;
    white-space: nowrap;
    margin-left: auto;
    transition: color .15s;
    flex-shrink: 0;
}

.rf-reason-strip-exit:hover { color: var(--bp-text-secondary, #888); }

@media (max-width: 768px) {
    .rf-reason-strip { padding: 10px 12px; gap: 8px; }
    .rf-reason-strip-label { display: none; }
    .rf-reason-strip-exit { margin-left: 0; }
}

/* ══════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
    .rf-expand-inner {
        grid-template-columns: 220px 1fr;
    }
}

@media (max-width: 768px) {
    .rf-page {
        max-width: 100%;
        width: 100%;
        overflow-x: hidden;
        padding: 0 12px 60px;
    }

    .rf-hero { padding: 32px 0 24px; }

    .rf-hero-title {
        font-size: 28px;
        gap: 10px;
    }

    .rf-hero-icon {
        width: 42px;
        height: 42px;
    }

    .rf-hero-icon svg {
        width: 22px;
        height: 22px;
    }

    .rf-hero-sub {
        font-size: 14px;
        padding: 0 8px;
    }

    /* Метрики — 2x2 */
    .rf-hero-metrics {
        display: grid;
        grid-template-columns: 1fr 1fr;
        width: 100%;
    }

    .rf-hero-metric-sep { display: none; }

    .rf-hero-metric {
        padding: 14px 12px;
        border-right: 1px solid var(--bp-border);
        border-bottom: 1px solid var(--bp-border);
    }

    .rf-hero-metric:nth-child(2n)     { border-right: none; }
    .rf-hero-metric:nth-last-child(-n+2) { border-bottom: none; }

    .rf-hero-metric-val { font-size: 20px; }

    .rf-hero-metric-lbl {
        font-size: 10px;
        letter-spacing: .3px;
    }

    .rf-hero-actions {
        flex-direction: column;
        width: 100%;
        gap: 10px;
    }

    .rf-hero-cta,
    .rf-hero-ghost {
        width: 100%;
        justify-content: center;
        padding: 13px 20px;
        font-size: 15px;
    }

    .rf-content-card { border-radius: 14px; }

    .rf-info-strip {
        border-radius: 14px;
        margin-bottom: 16px;
    }

    .rf-info-top {
        flex-wrap: wrap;
        gap: 10px;
        padding: 12px 14px;
    }

    .rf-info-icon { display: none; }

    .rf-info-disclaimer {
        font-size: 12px;
        flex-basis: 100%;
    }

    .rf-info-step-lbl {
        font-size: 10px;
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
    }

    /* Exit section mobile */
    .rf-exit-section {
        border-radius: 14px;
        margin-bottom: 16px;
    }

    .rf-exit-body { padding: 14px; }

    /* Control bar */
    .rf-control-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 14px 14px 12px;
    }

    .rf-section-title { font-size: 16px; }

    .rf-control-bar-right {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .rf-tabs {
        display: flex;
        width: 100%;
        overflow: visible;
    }

    .rf-tab {
        flex: 1;
        text-align: center;
        font-size: 12px;
        padding: 7px 6px;
        white-space: nowrap;
    }

    .rf-control-slot {
        width: 100%;
        max-width: 100%;
        flex: 1;
        height: 38px;
    }

    /* Registry */
    .rf-registry-head { display: none; }

    .rf-row-inner {
        grid-template-columns: 54px 1fr auto 26px;
        gap: 8px;
        padding: 10px 12px;
    }

    .rf-row-inner .rf-row-num { display: none; }

    .rf-row-thumb {
        width: 46px;
        height: 32px;
    }

    .rf-row-actor-cell { min-width: 0; }

    .rf-row-actor {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        display: block;
    }

    /* Expand */
    .rf-row-expand,
    .rf-grouped-expand {
        max-width: 100%;
        box-sizing: border-box;
        overflow: hidden;
    }

    .rf-expand-inner,
    .rf-grouped-expand .rf-expand-inner {
        display: block;
        width: 100%;
        box-sizing: border-box;
        overflow: hidden;
    }

    .rf-exp-gallery,
    .rf-grouped-expand .rf-exp-gallery {
        width: 100%;
        box-sizing: border-box;
        border-right: none;
        border-bottom: 1px solid var(--bp-border);
    }

    .rf-exp-slides { height: 240px; }

    .rf-exp-meta {
        display: block;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        overflow: hidden;
        padding: 16px 14px;
        min-width: 0;
    }

    .rf-exp-section {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        min-width: 0;
    }

    .rf-exp-value {
        width: 100%;
        max-width: 100%;
        word-break: break-word;
        overflow-wrap: anywhere;
        white-space: normal;
    }

    .rf-exp-actor-id { display: none; }

    .rf-actor-header { padding: 12px 14px; }

    .rf-actor-cases-head {
        grid-template-columns: 44px 80px 1fr 16px;
        padding-left: 38px;
    }

    .rf-actor-case-row {
        grid-template-columns: 44px 80px 1fr 16px;
        padding: 9px 12px 9px 38px;
    }

    .rf-panel-inner { padding: 12px 12px 16px; }

    .rf-filter-btn { height: 36px; font-size: 12px; }
    .rf-filter-panel--open { max-height: 220px; }
    .rf-filter-panel-inner { padding: 10px 12px 12px; gap: 8px; }
    .rf-filter-group-label { display: none; }
    .rf-filter-group-sep   { display: none; }
    .rf-filter-reset       { margin-left: 0; }
    .rf-reason-chip        { font-size: 11px; padding: 3px 9px; }
    .rf-period-chip        { font-size: 11px; padding: 3px 9px; }
}

@media (max-width: 480px) {
    .rf-page {
        max-width: 100%;
        width: 100%;
        overflow-x: hidden;
        padding: 0 8px 60px;
    }

    .rf-hero-title { font-size: 24px; }

    .rf-hero-metric-val { font-size: 18px; }

    .rf-row-inner {
        grid-template-columns: 44px 1fr auto 24px;
        padding: 9px 10px;
    }

    .rf-row-link-btn { display: none; }

    .rf-tab { font-size: 11px; padding: 6px 4px; }

    .rf-actor-cases-head,
    .rf-actor-case-row {
        grid-template-columns: 40px 75px 1fr;
        padding-left: 32px;
    }

    .rf-actor-case-arrow { display: none; }
}
