/*
  report_analysis/css/report.css

  Дизайн-система сервиса «Анализ отчётов».
  Тёмная тема, единообразная с shotdetectstats и shotdetect_search.

  Префикс BEM: ra- (Report Analysis)
  Глобальные переменные: --bg, --panel, --border, --text, --muted, --up, --down
  (наследуются из theme.css shotdetectstats)
*/

/* === Локальные переменные === */
:root {
    --ra-accent: #2b6cb0;
    --ra-accent-hover: #2c5f9e;
    --ra-up: #22c55e;
    --ra-down: #ef4444;

    --ra-bg: #0b0c0f;
    --ra-bg2: #0e0f13;
    --ra-panel: #121318;
    --ra-border: rgba(255, 255, 255, 0.08);
    --ra-border2: rgba(255, 255, 255, 0.06);
    --ra-text: rgba(255, 255, 255, 0.92);
    --ra-muted: rgba(255, 255, 255, 0.60);

    --ra-radius: 12px;
    --ra-radius-sm: 8px;
    --ra-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
    --ra-transition: 0.25s ease;

    /* Единая максимальная высота контента half-виджетов (Стратегии, PNL по монетам) */
    --ra-widget-max-h: 650px;

    --ra-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
        "Liberation Mono", "Courier New", monospace;
    --ra-ui: ui-sans-serif, system-ui, -apple-system, "Segoe UI",
        Roboto, Helvetica, Arial, sans-serif;

    --ra-warning-bg: rgba(245, 158, 11, 0.08);
    --ra-warning-border: #f59e0b;
    --ra-error-bg: rgba(239, 68, 68, 0.08);
    --ra-error-border: #ef4444;
    --ra-info-bg: rgba(59, 130, 246, 0.08);
    --ra-info-border: #3b82f6;
}


/* ========================= PAGE ========================= */

.ra-page {
    min-height: 100%;
    padding: 0 0 28px;
    color: var(--ra-text);
    font-family: var(--ra-ui);
    background:
        radial-gradient(900px 520px at 10% 5%, rgba(43, 108, 176, 0.06), transparent 60%),
        linear-gradient(180deg, var(--ra-bg2), var(--ra-bg));
}


/* ========================= UPLOAD ========================= */

.ra-upload {
    max-width: 720px;
    margin: 0 auto;
    padding: 40px 16px;
    animation: raFadeIn 0.4s ease-out;
}

@keyframes raFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ra-upload__title {
    font-size: 20px;
    font-weight: 700;
    color: var(--ra-text);
    margin: 0 0 4px;
}

.ra-upload__subtitle {
    color: var(--ra-muted);
    font-size: 13px;
    margin: 0 0 20px;
}

.ra-upload__card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.02));
    border: 1px solid var(--ra-border);
    border-radius: var(--ra-radius);
    padding: 20px;
    box-shadow: var(--ra-shadow);
}

.ra-textarea {
    display: block;
    width: 100%;
    min-height: 100px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--ra-border);
    border-radius: var(--ra-radius-sm);
    color: var(--ra-text);
    font-family: var(--ra-mono);
    font-size: 12px;
    line-height: 1.5;
    resize: vertical;
    transition: border-color var(--ra-transition);
    box-sizing: border-box;
}

.ra-textarea:focus {
    outline: none;
    border-color: var(--ra-accent);
    box-shadow: 0 0 0 2px rgba(43, 108, 176, 0.2);
}

.ra-textarea::placeholder {
    color: var(--ra-muted);
}


/* === Drop Zone === */

.ra-dropzone {
    margin-top: 12px;
    padding: 16px;
    border: 2px dashed var(--ra-border2);
    border-radius: var(--ra-radius-sm);
    text-align: center;
    transition: all var(--ra-transition);
    cursor: pointer;
}

.ra-dropzone:hover,
.ra-dropzone.dragover {
    border-color: var(--ra-accent);
    background: rgba(43, 108, 176, 0.04);
}

.ra-dropzone__icon {
    font-size: 1.5rem;
    margin-bottom: 4px;
}

.ra-dropzone p {
    margin: 0;
    color: var(--ra-muted);
    font-size: 12px;
}

.ra-dropzone__link {
    color: var(--ra-accent);
    cursor: pointer;
    text-decoration: underline;
}

.ra-file-name {
    display: block;
    margin-top: 4px;
    color: var(--ra-accent);
    font-size: 12px;
    min-height: 1em;
}


/* === Строка действий === */

.ra-upload__actions {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    margin-top: 16px;
}

.ra-utc-field {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex-shrink: 0;
}

.ra-utc-field__label {
    font-size: 10px;
    color: var(--ra-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 600;
}

.ra-utc-field__select {
    height: 32px;
    padding: 0 8px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--ra-border);
    border-radius: 6px;
    color: var(--ra-text);
    font-size: 12px;
    min-width: 100px;
    transition: border-color var(--ra-transition);
}

.ra-utc-field__select:focus {
    outline: none;
    border-color: var(--ra-accent);
}

.ra-utc-field__select option {
    background: var(--ra-bg);
    color: var(--ra-text);
}

.ra-btn-analyze {
    flex: 1;
    height: 32px;
    background: var(--ra-accent);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all var(--ra-transition);
}

.ra-btn-analyze:hover {
    background: var(--ra-accent-hover);
}

.ra-btn-analyze:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}


/* ========================= LOADER ========================= */

.ra-loader {
    text-align: center;
    padding: 40px 16px;
    color: var(--ra-muted);
}

.ra-spinner {
    width: 32px;
    height: 32px;
    margin: 0 auto 10px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--ra-accent);
    border-radius: 50%;
    animation: raSpin 0.8s linear infinite;
}

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


/* ========================= TOPBAR ========================= */

.ra-topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--ra-panel);
    border-bottom: 1px solid var(--ra-border);
}

.ra-infobar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px;
    min-height: 36px;
    flex-wrap: wrap;
}

.ra-infobar__left {
    flex-shrink: 0;
}

/* Кнопка «Параметры» — аналог shotdetect_search */
.ra-infobar__toggle {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--ra-border);
    color: var(--ra-text);
    padding: 4px 10px;
    border-radius: var(--ra-radius-sm);
    cursor: pointer;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.ra-infobar__toggle:hover {
    border-color: rgba(255, 255, 255, 0.14);
}

/* Badge количества активных настроек */
.ra-badge {
    background: var(--ra-accent);
    color: #fff;
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 999px;
    font-weight: 700;
    min-width: 16px;
    text-align: center;
}

/* Chips (терминал, источник, период) */
.ra-infobar__chips {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
    flex: 1;
    min-width: 0;
}

.ra-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background: rgba(43, 108, 176, 0.12);
    border: 1px solid rgba(43, 108, 176, 0.30);
    border-radius: 999px;
    font-size: 11px;
    color: var(--ra-text);
    white-space: nowrap;
    font-family: var(--ra-mono);
}


/* ========================= SETTINGS PANEL ========================= */

.ra-settings {
    border-top: 1px solid var(--ra-border2);
    background: var(--ra-panel);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.55);
    padding: 12px 12px 14px;
    animation: raSlideDown 0.2s ease-out;
}

@keyframes raSlideDown {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ra-settings__title {
    font-size: 11px;
    font-weight: 700;
    color: var(--ra-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 8px;
}

.ra-settings__list {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.ra-settings__item {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 12px;
    color: var(--ra-text);
    user-select: none;
}

.ra-settings__item input[type="checkbox"] {
    accent-color: var(--ra-accent);
    cursor: pointer;
}

.ra-settings__actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.ra-btn-reset {
    background: rgba(255, 255, 255, 0.06);
    color: var(--ra-muted);
    border: 1px solid rgba(255, 255, 255, 0.10);
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 11px;
    cursor: pointer;
}

.ra-btn-reset:hover {
    color: var(--ra-text);
    border-color: rgba(255, 255, 255, 0.14);
}

.ra-settings__divider {
    width: 100%;
    height: 1px;
    background: var(--ra-border2);
}

.ra-settings__item--persist {
    font-weight: 600;
    color: var(--ra-muted);
}


/* ========================= ISSUES ========================= */

.ra-issues {
    margin: 0 12px;
    padding-top: 14px;
}

/* Скрываем пустую секцию — чтобы не оставался лишний отступ после закрытия всех блоков */
.ra-issues:empty {
    display: none;
}

.ra-issue {
    padding: 10px 12px;
    border-radius: var(--ra-radius-sm);
    border-left: 4px solid;
    margin-bottom: 8px;
    animation: raSlideDown 0.2s ease-out;
}

.ra-issue--error {
    background: var(--ra-error-bg);
    border-color: var(--ra-error-border);
}

.ra-issue--warning {
    background: var(--ra-warning-bg);
    border-color: var(--ra-warning-border);
}

.ra-issue--info {
    background: var(--ra-info-bg);
    border-color: var(--ra-info-border);
}

.ra-issue__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.ra-issue__title {
    font-weight: 600;
    margin-bottom: 4px;
    font-size: 12px;
    flex: 1;
}

.ra-issue__close {
    background: none;
    border: none;
    color: var(--ra-muted);
    cursor: pointer;
    padding: 2px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all var(--ra-transition);
    opacity: 0.6;
}

.ra-issue__close:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.08);
}

/* Анимация скрытия issue-блока */
.ra-issue.is-hiding {
    animation: raFadeOut 0.2s ease-out forwards;
}

@keyframes raFadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }

    to {
        opacity: 0;
        transform: translateY(-4px);
    }
}

.ra-issue--error .ra-issue__title {
    color: var(--ra-error-border);
}

.ra-issue--warning .ra-issue__title {
    color: var(--ra-warning-border);
}

.ra-issue--info .ra-issue__title {
    color: var(--ra-info-border);
}

.ra-issue ul {
    margin: 0;
    padding-left: 18px;
    font-size: 12px;
}

.ra-issue li {
    margin-bottom: 2px;
}

.ra-issue__toggle {
    background: none;
    border: none;
    color: var(--ra-warning-border);
    cursor: pointer;
    font-size: 12px;
    padding: 4px 0 0;
    text-decoration: underline;
}

.ra-issue__skipped {
    margin-top: 4px;
    font-size: 11px;
    color: var(--ra-muted);
    font-family: var(--ra-mono);
    max-height: 200px;
    overflow-y: auto;
}

/* Info-stats в issue-info */
.ra-info-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 12px;
}

.ra-info-stats span {
    color: var(--ra-text);
}

.ra-info-stats strong {
    color: var(--ra-text);
    font-weight: 600;
}


/* ========================= EXCHANGE SELECTOR ========================= */

.ra-exchange-selector {
    margin: 12px 12px 0;
    animation: raSlideDown 0.2s ease-out;
}

.ra-exchange-selector__inner {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.02));
    border: 1px solid var(--ra-accent);
    border-radius: var(--ra-radius);
    padding: 16px 20px;
    box-shadow: 0 4px 24px rgba(43, 108, 176, 0.15);
    backdrop-filter: blur(8px);
}

.ra-exchange-selector__title {
    font-size: 14px;
    font-weight: 600;
    color: var(--ra-text);
    margin: 0 0 4px;
}

.ra-exchange-selector__desc {
    color: var(--ra-muted);
    font-size: 12px;
    margin: 0 0 12px;
}

.ra-exchange-selector__fields {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.ra-exchange-selector__field {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.ra-exchange-selector__field label {
    font-size: 10px;
    color: var(--ra-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 600;
}

.ra-exchange-selector__field select {
    height: 32px;
    padding: 0 8px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--ra-border);
    border-radius: 6px;
    color: var(--ra-text);
    font-size: 12px;
    min-width: 120px;
    transition: border-color var(--ra-transition);
}

.ra-exchange-selector__field select:focus {
    outline: none;
    border-color: var(--ra-accent);
}

.ra-exchange-selector__field select option {
    background: var(--ra-bg);
    color: var(--ra-text);
}

.ra-exchange-selector__btn {
    height: 32px;
    padding: 0 16px;
    background: var(--ra-accent);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background var(--ra-transition);
}

.ra-exchange-selector__btn:hover {
    background: var(--ra-accent-hover);
}


/* ========================= DASHBOARD ========================= */

.ra-dashboard {
    padding: 14px 12px 0;
    animation: raFadeIn 0.3s ease-out;
}


/* === KPI Strip === */

.ra-kpi-strip {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.ra-kpi-card {
    border-radius: var(--ra-radius-sm);
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.16);
    border: 1px solid var(--ra-border2);
}

.ra-kpi-card__label {
    font-size: 10px;
    color: var(--ra-muted);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ra-kpi-card__value {
    font-size: 16px;
    font-weight: 700;
    font-family: var(--ra-mono);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.3px;
    white-space: nowrap;
}

.ra-kpi-card__suffix {
    display: inline;
    margin-left: 4px;
    font-size: 10px;
    color: var(--ra-muted);
    font-family: var(--ra-mono);
}


/* === Widget Grid === */

.ra-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    /* Каждый виджет занимает свою натуральную высоту, не растягивается по соседу */
    align-items: start;
    gap: 14px;
}


/* === Widget Container === */

.ra-widget {
    border-radius: var(--ra-radius);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.02));
    border: 1px solid var(--ra-border);
    box-shadow: var(--ra-shadow);
    overflow: hidden;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.ra-widget--full {
    grid-column: span 2;
}

.ra-widget--half {
    grid-column: span 1;
}

.ra-widget__header {
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--ra-border2);
    user-select: none;
}

.ra-widget__header:hover {
    background: rgba(255, 255, 255, 0.02);
}

.ra-widget__title {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.ra-widget__title svg {
    flex-shrink: 0;
    opacity: 0.7;
}

.ra-widget__arrow {
    font-size: 10px;
    color: var(--ra-muted);
    transition: transform var(--ra-transition);
    cursor: pointer;
}

.ra-widget.is-collapsed .ra-widget__arrow {
    transform: rotate(-90deg);
}

/* Зона кастомных контролов в шапке (между title и arrow) */
.ra-widget__controls {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
    cursor: default;
}

.ra-widget__controls-label {
    font-size: 10px;
    color: var(--ra-muted);
    margin-right: 2px;
}

.ra-widget__page-btn {
    padding: 2px 8px;
    font-size: 11px;
    font-family: var(--ra-mono);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--ra-border2);
    border-radius: 4px;
    color: var(--ra-muted);
    cursor: pointer;
    transition: all var(--ra-transition);
}

.ra-widget__page-btn:hover {
    color: var(--ra-text);
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.06);
}

.ra-widget__page-btn.is-active {
    background: var(--ra-accent);
    border-color: var(--ra-accent);
    color: #fff;
}

.ra-widget__body {
    padding: 12px 14px 14px;
    flex: 1;
    min-height: 0;
}

/* Ограничение высоты body — виджеты с длинным контентом (flex-column для дочерних scrollable) */
.ra-widget__body--constrained {
    display: flex;
    flex-direction: column;
    max-height: var(--ra-widget-max-h);
}

.ra-widget.is-collapsed .ra-widget__body {
    display: none;
}


/* ========================= TRADES FILTERS ========================= */

.ra-trades-filters {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 10px;
}

.ra-trades-filters__row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.ra-trades-filters__row--actions {
    justify-content: space-between;
    padding-top: 2px;
}

.ra-trades-filter-group {
    display: flex;
    align-items: center;
}

.ra-trades-filter-group--range {
    gap: 4px;
}

.ra-trades-filter-label {
    font-size: 11px;
    color: var(--ra-muted);
    margin-right: 4px;
    white-space: nowrap;
}

.ra-trades-filter {
    background: var(--ra-bg2);
    color: var(--ra-text);
    border: 1px solid var(--ra-border2);
    border-radius: var(--ra-radius-sm);
    padding: 4px 8px;
    font-size: 11px;
    font-family: inherit;
    cursor: pointer;
    transition: border-color var(--ra-transition);
}

.ra-trades-filter:hover,
.ra-trades-filter:focus {
    border-color: var(--ra-accent);
    outline: none;
}

.ra-trades-filter-input {
    background: var(--ra-bg2);
    color: var(--ra-text);
    border: 1px solid var(--ra-border2);
    border-radius: var(--ra-radius-sm);
    padding: 4px 6px;
    font-size: 11px;
    font-family: var(--ra-mono);
    width: 60px;
    transition: border-color var(--ra-transition);
}

.ra-trades-filter-input--date {
    width: 140px;
}

.ra-trades-filter-input:hover,
.ra-trades-filter-input:focus {
    border-color: var(--ra-accent);
    outline: none;
}

/* Убираем стрелки у number-инпутов */
.ra-trades-filter-input::-webkit-inner-spin-button,
.ra-trades-filter-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
}

.ra-trades-filter-input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.ra-trades-filter-sep {
    color: var(--ra-muted);
    font-size: 11px;
    user-select: none;
}

.ra-trades-summary {
    font-size: 11px;
    color: var(--ra-muted);
    font-family: var(--ra-mono);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 2px;
}

.ra-trades-summary__sep {
    margin: 0 6px;
    opacity: 0.4;
}

.ra-trades-filters__reset {
    background: none;
    border: 1px solid var(--ra-border2);
    color: var(--ra-muted);
    border-radius: var(--ra-radius-sm);
    padding: 3px 8px;
    font-size: 11px;
    cursor: pointer;
    transition: all var(--ra-transition);
}

.ra-trades-filters__reset:hover {
    color: var(--ra-text);
    border-color: var(--ra-accent);
}


/* ========================= TABLES (общие) ========================= */

.ra-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Scrollable-обёртка таблицы — заполняет оставшееся пространство body */
.ra-table-wrap--scrollable {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
}

.ra-table-wrap--scrollable::-webkit-scrollbar {
    width: 6px;
}

.ra-table-wrap--scrollable::-webkit-scrollbar-track {
    background: transparent;
}

.ra-table-wrap--scrollable::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 3px;
}

.ra-table-wrap--scrollable::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

.ra-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.ra-table thead {
    position: sticky;
    top: 0;
    z-index: 5;
}

/* Sticky-заголовок в scrollable: композиция rgba поверх solid panel — визуально идентично оригиналу, но непрозрачно */
.ra-table-wrap--scrollable .ra-table th {
    background: linear-gradient(rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0.25)),
        var(--ra-panel);
}

.ra-table th {
    background: rgba(0, 0, 0, 0.25);
    padding: 8px 8px;
    text-align: left;
    font-weight: 600;
    font-size: 11px;
    line-height: 14px;
    color: var(--ra-muted);
    border-bottom: 1px solid var(--ra-border);
    white-space: nowrap;
    cursor: pointer;
    user-select: none;
}

.ra-table th:hover {
    color: var(--ra-text);
}

.ra-table th.ra-num {
    text-align: right;
}

/* Индикатор сортировки */
.ra-sort-icon {
    margin-left: 4px;
    font-size: 10px;
    opacity: 0.4;
}

.ra-table th.is-sorted .ra-sort-icon {
    opacity: 1;
    color: var(--ra-accent);
}

.ra-table td {
    padding: 3px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    font-family: var(--ra-mono);
    white-space: nowrap;
    font-size: 12px;
    line-height: 24px;
}

.ra-table td.ra-num {
    text-align: right;
}

.ra-table tbody tr:not(.ra-strategy-detail):hover {
    background: rgba(255, 255, 255, 0.03);
}


/* ========================= PNL COLORS ========================= */

.ra-pnl-positive {
    color: var(--ra-up);
}

.ra-pnl-negative {
    color: var(--ra-down);
}

.ra-pnl-zero {
    color: var(--ra-muted);
}


/* ========================= STRATEGIES ========================= */

.ra-strategy-row {
    cursor: pointer;
    transition: background var(--ra-transition);
}

.ra-strategy-row:hover {
    background: rgba(255, 255, 255, 0.03);
}

.ra-strategy-row td {
    font-family: var(--ra-mono);
}

.ra-strategy-row td .ra-arrow {
    display: inline-block;
    margin-right: 6px;
    transition: transform var(--ra-transition);
    color: var(--ra-muted);
    font-size: 10px;
}

.ra-strategy-row.is-expanded td .ra-arrow {
    transform: rotate(90deg);
}

/* --- Рейтинг-бейдж --- */
.ra-strategy-rating {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    font-family: var(--ra-mono);
    line-height: 1.4;
    min-width: 28px;
    text-align: center;
}

.ra-strategy-rating--high {
    background: rgba(0, 200, 83, 0.18);
    color: #00c853;
}

.ra-strategy-rating--mid {
    background: rgba(255, 193, 7, 0.18);
    color: #ffc107;
}

.ra-strategy-rating--low {
    background: rgba(255, 82, 82, 0.18);
    color: #ff5252;
}

/* --- Детали стратегии (accordion) --- */
.ra-strategy-detail {
    display: none;
}

.ra-strategy-detail.is-visible {
    display: table-row;
}

.ra-strategy-detail-inner {
    padding: 12px 8px 14px;
}

/* Фон деталей на всю ширину ячейки */
.ra-strategy-detail>td {
    background: rgba(0, 0, 0, 0.12);
    padding: 0;
    cursor: default;
}

/* --- Detail header (рейтинг) --- */
.ra-strategy-detail-header {
    margin-bottom: 10px;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ra-strategy-rating-label {
    color: var(--ra-muted);
}

/* --- Секции (Эффективность | Риск) --- */
.ra-strategy-sections {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 10px;
}

.ra-strategy-section {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 6px;
    padding: 8px 10px;
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.ra-strategy-section--full {
    margin-bottom: 10px;
}

.ra-strategy-section__title {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ra-muted);
    margin-bottom: 6px;
    padding-bottom: 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.ra-strategy-section__title svg {
    opacity: 0.65;
}

/* --- Метрики-grid внутри секций (3 колонки: label | bar+share | value) --- */
.ra-strategy-metrics {
    display: grid;
    grid-template-columns: auto auto 1fr;
    gap: 3px 10px;
    font-size: 12px;
    margin: 0;
}

.ra-strategy-metrics .ra-metric-label {
    color: var(--ra-muted);
    font-size: 11px;
    padding: 1px 0;
    grid-column: 1;
}

/* Индикаторы (bar + share) — вторая колонка, после label */
.ra-strategy-metrics .ra-metric-indicators {
    display: flex;
    align-items: center;
    gap: 6px;
    grid-column: 2;
    padding: 1px 0;
}

/* Значение метрики — третья колонка, выровнено вправо */
.ra-strategy-metrics .ra-metric-value {
    font-weight: 500;
    color: var(--ra-text);
    font-family: var(--ra-mono);
    font-size: 12px;
    padding: 1px 0;
    text-align: right;
    white-space: nowrap;
    grid-column: 3;
}

/* Метрики без индикатора — значение в колонке 3 */
.ra-strategy-metrics .ra-metric-value--plain {
    grid-column: 3;
}


/* --- Health-бар индикатор метрики (аналог sd-miniud) --- */
.ra-metric-bar {
    display: inline-flex;
    width: 56px;
    height: 6px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
}

.ra-metric-bar__fill {
    height: 100%;
    border-radius: 999px;
    transition: width 0.4s ease;
}

.ra-metric-bar__fill--good {
    background: rgba(0, 200, 83, 0.75);
}

.ra-metric-bar__fill--medium {
    background: rgba(255, 193, 7, 0.75);
}

.ra-metric-bar__fill--poor {
    background: rgba(255, 82, 82, 0.75);
}

/* --- Доля в рейтинге рядом с метрикой --- */
.ra-metric-share {
    font-size: 9px;
    color: var(--ra-muted);
    font-family: var(--ra-mono);
    opacity: 0.7;
    white-space: nowrap;
}

/* --- Info-row (Структура) --- */
.ra-strategy-info-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    font-size: 12px;
}

.ra-strategy-info-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.ra-strategy-info-item__label {
    color: var(--ra-muted);
    font-size: 11px;
}

.ra-strategy-info-item__label::after {
    content: ':';
}

/* --- Монеты-grid (два блока рядом) --- */
.ra-strategy-coins-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 10px;
}

.ra-strategy-coins-block__title {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 6px;
}

.ra-strategy-coins-block__title svg {
    flex-shrink: 0;
}

.ra-strategy-coins-block__list {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

/* --- Coin-tag --- */
.ra-strategy-coin-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-family: var(--ra-mono);
    white-space: nowrap;
}

.ra-strategy-coin-tag b {
    font-weight: 600;
}

.ra-strategy-coin-tag small {
    color: var(--ra-muted);
    font-size: 10px;
}

.ra-strategy-coin-tag--profit {
    background: rgba(0, 200, 83, 0.08);
    color: #9be7b8;
    border: 1px solid rgba(0, 200, 83, 0.12);
}

.ra-strategy-coin-tag--loss {
    background: rgba(255, 82, 82, 0.08);
    color: #f7a0a0;
    border: 1px solid rgba(255, 82, 82, 0.12);
}

/* --- Адаптивность --- */
@media (max-width: 600px) {
    .ra-strategy-sections {
        grid-template-columns: 1fr;
    }

    .ra-strategy-coins-grid {
        grid-template-columns: 1fr;
    }
}


/* ========================= COIN CHART ========================= */

.ra-coin-chart {
    display: grid;
    grid-template-columns: auto 1fr auto;
    row-gap: 1px;
    position: relative;
}

/* Scrollable chart — заполняет оставшееся пространство body */
.ra-coin-chart--scrollable {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
}

.ra-coin-chart--scrollable::-webkit-scrollbar {
    width: 6px;
}

.ra-coin-chart--scrollable::-webkit-scrollbar-track {
    background: transparent;
}

.ra-coin-chart--scrollable::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 3px;
}

.ra-coin-chart--scrollable::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

.ra-coin-bar-row {
    display: contents;
}

.ra-coin-bar-label {
    font-family: var(--ra-mono);
    font-size: 12px;
    color: var(--ra-text);
    text-align: left;
    padding-right: 10px;
    white-space: nowrap;
    line-height: 22px;
}

.ra-coin-bar-track {
    position: relative;
    height: 14px;
    align-self: center;
}

.ra-coin-bar-fill {
    position: absolute;
    top: 0;
    height: 100%;
    border-radius: 2px;
    transition: width 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

.ra-coin-bar-fill.profit {
    background: linear-gradient(90deg, rgba(34, 197, 94, 0.25), var(--ra-up));
    left: 50%;
}

.ra-coin-bar-fill.loss {
    background: linear-gradient(270deg, rgba(239, 68, 68, 0.25), var(--ra-down));
    right: 50%;
}

.ra-coin-bar-value {
    min-width: 60px;
    text-align: right;
    font-family: var(--ra-mono);
    font-size: 12px;
    padding-left: 8px;
    padding-right: 10px;
    font-variant-numeric: tabular-nums;
    line-height: 22px;
}


/* === Тулбар PNL-виджета: стратегия + копирование === */

.ra-coin-toolbar {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    align-items: stretch;
    flex-wrap: wrap;
}


/* === Селектор стратегии === */

.ra-coin-strategy {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1 1 200px;
    padding: 8px 10px;
    background: rgba(0, 0, 0, 0.12);
    border: 1px solid var(--ra-border2);
    border-radius: var(--ra-radius-sm);
}

.ra-coin-strategy__label {
    font-size: 10px;
    color: var(--ra-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 600;
    white-space: nowrap;
}

.ra-coin-strategy__select {
    width: 100%;
    height: 26px;
    padding: 0 8px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--ra-border);
    border-radius: 6px;
    color: var(--ra-text);
    font-size: 11px;
    font-family: var(--ra-mono);
    transition: border-color var(--ra-transition);
    box-sizing: border-box;
}

.ra-coin-strategy__select:focus {
    outline: none;
    border-color: var(--ra-accent);
}

.ra-coin-strategy__select option {
    background: var(--ra-bg);
    color: var(--ra-text);
}


/* === Панель копирования символов === */

.ra-coin-copy {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 8px 10px;
    background: rgba(0, 0, 0, 0.12);
    border: 1px solid var(--ra-border2);
    border-radius: var(--ra-radius-sm);
    flex: 1 1 200px;
}

.ra-coin-copy__row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
}

.ra-coin-copy__label {
    font-size: 11px;
    color: var(--ra-muted);
    white-space: nowrap;
    min-width: 68px;
    font-family: var(--ra-ui);
}

.ra-coin-copy__input {
    width: 56px;
    height: 24px;
    padding: 0 6px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--ra-border);
    border-radius: 4px;
    color: var(--ra-text);
    font-size: 11px;
    font-family: var(--ra-mono);
    text-align: right;
    transition: border-color var(--ra-transition);
    flex-shrink: 0;
}

.ra-coin-copy__input:focus {
    outline: none;
    border-color: var(--ra-accent);
}

/* Скрываем стрелки у числового input */
.ra-coin-copy__input::-webkit-inner-spin-button,
.ra-coin-copy__input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
}

.ra-coin-copy__input[type="number"] {
    -moz-appearance: textfield;
}

.ra-coin-copy__suffix {
    font-size: 11px;
    color: var(--ra-muted);
    font-family: var(--ra-mono);
    flex-shrink: 0;
}

.ra-coin-copy__btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 24px;
    padding: 0 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--ra-border);
    border-radius: 4px;
    color: var(--ra-muted);
    font-size: 10px;
    font-family: var(--ra-ui);
    cursor: pointer;
    white-space: nowrap;
    transition: all var(--ra-transition);
    flex-shrink: 0;
}

.ra-coin-copy__btn:hover {
    color: var(--ra-text);
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.06);
}

.ra-coin-copy__btn svg {
    flex-shrink: 0;
    opacity: 0.7;
}

/* Анимация «✓ Скопировано» */
.ra-coin-copy__btn.is-copied {
    color: var(--ra-up);
    border-color: rgba(34, 197, 94, 0.30);
    background: rgba(34, 197, 94, 0.08);
}

.ra-coin-copy__btn.is-copied svg {
    opacity: 1;
    stroke: var(--ra-up);
}

.ra-coin-copy__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 16px;
    padding: 0 4px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 999px;
    font-size: 9px;
    font-weight: 700;
    color: var(--ra-muted);
    font-family: var(--ra-mono);
    flex-shrink: 0;
}

/* Цветовые акценты для badge прибыли/убытка */
.ra-coin-copy__row--profit .ra-coin-copy__badge {
    color: var(--ra-up);
    background: rgba(34, 197, 94, 0.10);
}

.ra-coin-copy__row--loss .ra-coin-copy__badge {
    color: var(--ra-down);
    background: rgba(239, 68, 68, 0.10);
}


/* === Пустое состояние coin chart === */

.ra-coin-chart-empty {
    text-align: center;
    padding: 20px 10px;
    color: var(--ra-muted);
    font-size: 12px;
}


/* Tooltip */
.ra-tooltip {
    position: fixed;
    padding: 6px 10px;
    background: rgba(11, 12, 15, 0.96);
    border: 1px solid var(--ra-border);
    border-radius: 6px;
    font-size: 11px;
    color: var(--ra-text);
    pointer-events: none;
    z-index: 1000;
    white-space: nowrap;
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    display: none;
    font-family: var(--ra-mono);
}


/* ========================= TRADES ========================= */

.ra-trades-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.ra-trades-filter {
    height: 26px;
    padding: 0 8px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--ra-border);
    border-radius: 6px;
    color: var(--ra-text);
    font-size: 11px;
}

.ra-trades-filter:focus {
    outline: none;
    border-color: var(--ra-accent);
}

.ra-trades-filter option {
    background: var(--ra-bg);
    color: var(--ra-text);
}

.ra-trades-count {
    color: var(--ra-muted);
    font-size: 11px;
}

/* Ссылка на график */
.ra-graph-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    color: var(--ra-text);
    text-decoration: none;
    font-size: 12px;
}

.ra-graph-link:hover {
    border-color: var(--ra-accent);
    background: rgba(43, 108, 176, 0.15);
}

/* Бейдж эмулятора */
.ra-badge-emu {
    display: inline-block;
    padding: 0 4px;
    font-size: 9px;
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border-radius: 3px;
    margin-left: 4px;
    vertical-align: middle;
    font-family: var(--ra-mono);
    font-weight: 600;
}


/* ========================= PAGINATION ========================= */

.ra-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 10px 0;
}

.ra-page-btn {
    min-width: 28px;
    height: 26px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--ra-border);
    color: var(--ra-muted);
    border-radius: 6px;
    cursor: pointer;
    font-size: 11px;
    font-family: var(--ra-mono);
}

.ra-page-btn:hover:not(:disabled) {
    color: var(--ra-text);
    border-color: rgba(255, 255, 255, 0.14);
}

.ra-page-btn.is-active {
    background: var(--ra-accent);
    border-color: var(--ra-accent);
    color: #fff;
}

.ra-page-btn:disabled {
    opacity: 0.3;
    cursor: default;
}

.ra-page-ellipsis {
    color: var(--ra-muted);
    font-size: 11px;
    padding: 0 2px;
}


/* ========================= DAILY PNL ========================= */

.ra-daily-toolbar {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    align-items: stretch;
    flex-wrap: wrap;
}

/* Панель статистики за месяц */
.ra-daily-stats {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.12);
    border: 1px solid var(--ra-border2);
    border-radius: var(--ra-radius-sm);
    flex: 2 1 300px;
    flex-wrap: wrap;
    row-gap: 2px;
}

.ra-daily-stats__item {
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.ra-daily-stats__label {
    font-size: 10px;
    color: var(--ra-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.ra-daily-stats__value {
    font-size: 12px;
    font-family: var(--ra-mono);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

/* Разделитель между группами */
.ra-daily-stats__item+.ra-daily-stats__item {
    padding-left: 10px;
    border-left: 1px solid var(--ra-border2);
}

/* Навигация по месяцам */
.ra-daily-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 10px;
    background: rgba(0, 0, 0, 0.12);
    border: 1px solid var(--ra-border2);
    border-radius: var(--ra-radius-sm);
    flex: 1 1 200px;
    justify-content: center;
    position: relative;
}

.ra-daily-nav__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--ra-border);
    border-radius: 6px;
    color: var(--ra-muted);
    cursor: pointer;
    font-size: 10px;
    transition: all var(--ra-transition);
    flex-shrink: 0;
}

.ra-daily-nav__btn:hover {
    color: var(--ra-text);
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.06);
}

.ra-daily-nav__label {
    background: none;
    border: none;
    color: var(--ra-text);
    font-size: 12px;
    font-weight: 600;
    font-family: var(--ra-mono);
    cursor: pointer;
    padding: 2px 8px;
    border-radius: 4px;
    transition: all var(--ra-transition);
    white-space: nowrap;
}

.ra-daily-nav__label:hover {
    background: rgba(255, 255, 255, 0.06);
}

/* Picker год/месяц */
.ra-daily-picker {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 6px;
    background: var(--ra-panel);
    border: 1px solid var(--ra-border);
    border-radius: var(--ra-radius-sm);
    padding: 10px 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    z-index: 50;
    min-width: 200px;
    animation: raSlideDown 0.15s ease-out;
}

.ra-daily-picker__year {
    margin-bottom: 8px;
}

.ra-daily-picker__year:last-child {
    margin-bottom: 0;
}

.ra-daily-picker__year-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--ra-muted);
    margin-bottom: 4px;
    font-family: var(--ra-mono);
}

.ra-daily-picker__months {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.ra-daily-picker__month {
    padding: 3px 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--ra-border2);
    border-radius: 4px;
    color: var(--ra-muted);
    font-size: 11px;
    font-family: var(--ra-mono);
    cursor: pointer;
    transition: all var(--ra-transition);
}

.ra-daily-picker__month:hover {
    color: var(--ra-text);
    border-color: var(--ra-accent);
    background: rgba(43, 108, 176, 0.12);
}

.ra-daily-picker__month.is-active {
    background: var(--ra-accent);
    border-color: var(--ra-accent);
    color: #fff;
}

/* Контейнер графика */
.ra-daily-chart {
    display: flex;
    flex: 1;
    min-height: 0;
    gap: 0;
}

/* Ось Y — relative-контейнер для absolute-позиционированных меток */
.ra-daily-axis-y {
    position: relative;
    width: 52px;
    flex-shrink: 0;
}

.ra-daily-axis-y__label {
    position: absolute;
    right: 0;
    transform: translateY(-50%);
    font-size: 10px;
    font-family: var(--ra-mono);
    color: var(--ra-muted);
    text-align: right;
    padding-right: 6px;
    white-space: nowrap;
}

/* Обёртка баров + ось X */
.ra-daily-bars-wrap {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
}

.ra-daily-bars-wrap::-webkit-scrollbar {
    height: 4px;
}

.ra-daily-bars-wrap::-webkit-scrollbar-track {
    background: transparent;
}

.ra-daily-bars-wrap::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 2px;
}

/* Область баров */
.ra-daily-bars {
    display: flex;
    align-items: stretch;
    gap: 2px;
    flex: 1;
    min-height: 300px;
    position: relative;
    border-left: 1px solid var(--ra-border2);
    border-bottom: 1px solid var(--ra-border2);
}

/* Горизонтальные линии сетки */
.ra-daily-grid-line {
    position: absolute;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--ra-border2);
    pointer-events: none;
    z-index: 1;
}

/* Нулевая линия ярче */
.ra-daily-grid-line--zero {
    background: var(--ra-muted);
    opacity: 0.5;
}

/* Колонка дня */
.ra-daily-bar-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 12px;
    position: relative;
    cursor: default;
}

.ra-daily-bar-col:hover {
    background: rgba(255, 255, 255, 0.03);
}

/* Бар */
.ra-daily-bar {
    position: absolute;
    left: 1px;
    right: 1px;
    border-radius: 2px 2px 0 0;
    transition: height 0.5s cubic-bezier(0.25, 1, 0.5, 1);
    min-width: 4px;
}

.ra-daily-bar--profit {
    background: linear-gradient(0deg, rgba(34, 197, 94, 0.30), var(--ra-up));
}

.ra-daily-bar--loss {
    background: linear-gradient(180deg, rgba(239, 68, 68, 0.30), var(--ra-down));
    border-radius: 0 0 2px 2px;
}

/* Ось X — отдельный ряд под барами (не absolute, не создаёт скролл) */
.ra-daily-axis-x {
    display: flex;
    gap: 2px;
    flex-shrink: 0;
    padding-top: 3px;
}

.ra-daily-axis-x__label {
    flex: 1;
    text-align: center;
    font-size: 10px;
    font-family: var(--ra-mono);
    color: var(--ra-muted);
    user-select: none;
    min-width: 12px;
}

/* Пустое состояние */
.ra-daily-empty {
    text-align: center;
    padding: 20px 10px;
    color: var(--ra-muted);
    font-size: 12px;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}


/* ========================= FUNDINGS ========================= */

.ra-fundings-total {
    font-size: 12px;
    color: var(--ra-muted);
    margin-bottom: 8px;
}

.ra-fundings-total strong {
    font-size: 13px;
    font-family: var(--ra-mono);
}

.ra-funding-card {
    border-radius: var(--ra-radius-sm);
    background: rgba(0, 0, 0, 0.12);
    border: 1px solid var(--ra-border2);
    margin-bottom: 4px;
    overflow: hidden;
    transition: border-color var(--ra-transition);
}

.ra-funding-card.is-expanded {
    border-color: rgba(43, 108, 176, 0.20);
}

.ra-funding-card__header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 10px;
    cursor: pointer;
    transition: background var(--ra-transition);
    user-select: none;
    font-size: 12px;
    font-family: var(--ra-mono);
}

.ra-funding-card__header:hover {
    background: rgba(255, 255, 255, 0.03);
}

.ra-funding-card__symbol {
    font-weight: 600;
    color: var(--ra-text);
    min-width: 100px;
    font-size: 12px;
}

.ra-funding-card__count {
    color: var(--ra-muted);
    font-size: 12px;
}

.ra-funding-card__total {
    margin-left: auto;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    font-size: 12px;
}

.ra-funding-card__arrow {
    color: var(--ra-muted);
    font-size: 9px;
    transition: transform var(--ra-transition);
    width: 14px;
    text-align: center;
}

.ra-funding-card.is-expanded .ra-funding-card__arrow {
    transform: rotate(90deg);
}

.ra-funding-card__body {
    border-top: 1px solid var(--ra-border2);
    padding: 6px 10px;
    background: rgba(0, 0, 0, 0.08);
}


/* ========================= RESPONSIVE ========================= */

@media (max-width: 900px) {
    .ra-grid {
        grid-template-columns: 1fr;
    }

    .ra-widget--full,
    .ra-widget--half {
        grid-column: span 1;
    }

    .ra-kpi-strip {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
}

@media (max-width: 600px) {
    .ra-upload {
        padding: 20px 10px;
    }

    .ra-upload__card {
        padding: 14px;
    }

    .ra-strategy-metrics {
        grid-template-columns: repeat(2, 1fr);
    }

    .ra-kpi-strip {
        grid-template-columns: repeat(2, 1fr);
    }
}