body { background-color: #0f1117; color: #e5e7eb; overflow-y: auto !important; }
.text-subtle { color: #8b92a5; }

/* Стили фильтров */
.filter-panel { background: #0b0d12; border: 1px solid #1f2933; border-radius: 12px; padding: 20px; margin-bottom: 20px; }
.filter-label { font-size: 12px; color: #8b92a5; margin-bottom: 6px; display: block; font-weight: 500; }

.custom-select-btn { background-color: #111827; border: 1px solid #1f2933; color: #fff; width: 100%; text-align: left; padding: 8px 12px; border-radius: 6px; font-size: 13px; display: flex; justify-content: space-between; align-items: center; cursor: pointer; }
.custom-select-btn:hover { border-color: #86ab2c; }
.custom-input-search { background-color: #111827; border: 1px solid #1f2933; color: #fff; width: 100%; padding: 8px 12px; border-radius: 6px; font-size: 13px; outline: none; }
.custom-input-search:focus { border-color: #86ab2c; }

.custom-dropdown-menu { background-color: #111827; border: 1px solid #1f2933; border-radius: 8px; box-shadow: 0 10px 25px rgba(0,0,0,0.5); padding: 8px 0; max-height: 250px; overflow-y: auto; }
.custom-dropdown-item { padding: 6px 15px; display: flex; align-items: center; gap: 10px; cursor: pointer; transition: 0.2s; color: #d1d5db; font-size: 13px; }
.custom-dropdown-item:hover { background-color: #1f2933; color: #fff; }
.custom-checkbox { width: 16px; height: 16px; border: 1px solid #2a3441; border-radius: 4px; display: flex; align-items: center; justify-content: center; background: #0b0d12; }
.custom-dropdown-item.selected .custom-checkbox { background: #86ab2c; border-color: #86ab2c; }
.custom-dropdown-item.selected .custom-checkbox::after { content: '✓'; color: #fff; font-size: 11px; }

/* Таблица */
.ta-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ta-table th { background: #111827; color: #8b92a5; font-weight: 600; padding: 14px 12px; border-bottom: 1px solid #1f2933; text-align: left; white-space: nowrap; }
.ta-table td { padding: 12px; border-bottom: 1px solid #1f2933; vertical-align: middle; }
.ta-table tr:hover td { background-color: rgba(255,255,255,0.02); }
.chart-icon-btn { background: none; border: none; color: #86ab2c; font-size: 18px; cursor: pointer; transition: 0.2s; padding: 0; }
.chart-icon-btn:hover { color: #fff; transform: scale(1.1); }

/* Пагинация */
.pagination-custom { display: flex; list-style: none; padding: 0; margin: 20px 0 0 0; justify-content: center; gap: 5px; }
.page-item-c { background-color: #111827; border: 1px solid #1f2933; color: #d1d5db; padding: 6px 12px; border-radius: 4px; cursor: pointer; transition: 0.2s; font-size: 13px; }
.page-item-c.active { background-color: #86ab2c; border-color: #86ab2c; color: #fff; }
.page-item-c:hover:not(.active):not(.disabled) { background-color: #1f2933; color: #fff; }
.page-item-c.disabled { opacity: 0.5; cursor: not-allowed; }

/* МОДАЛЬНОЕ ОКНО (100% высоты) */
.modal-xl-custom { max-width: 95%; margin: 10px auto; height: calc(100vh - 20px); }
.modal-content-custom { background-color: #0f1117; border: 1px solid #1f2933; border-radius: 12px; height: 100%; display: flex; flex-direction: column; overflow: hidden; }
.modal-body-custom { flex: 1; display: flex; flex-direction: column; padding: 12px; overflow: hidden; min-height: 0; }

.metrics-bar { background: #111827; border-bottom: 1px solid #1f2933; padding: 12px 20px; display: flex; flex-wrap: wrap; gap: 20px; align-items: center; }
.metric-item { display: flex; flex-direction: column; }
.metric-lbl { font-size: 11px; color: #8b92a5; text-transform: uppercase; }
.metric-val { font-size: 14px; font-weight: bold; color: #fff; }
.metric-val.green { color: #26a69a; }
.metric-val.red { color: #ef5350; }

/* Графики внутри модалки */
.chart-wrapper { border: 1px solid #1f2933; border-radius: 8px; overflow: hidden; background: #111827; display: flex; flex-direction: column; }
.chart-header { background: #0b0d12; border-bottom: 1px solid #1f2933; padding: 6px 12px; display: flex; justify-content: space-between; align-items: center; }
.chart-tf-select { background: #111827; color: #86ab2c; border: 1px solid #1f2933; border-radius: 4px; font-weight: bold; font-size: 12px; cursor: pointer; outline: none; padding: 2px 5px; }
.chart-container-inner { flex: 1; position: relative; min-height: 0; }

/* Главный график занимает 60% высоты, саб-графики 40% */
.main-chart { flex: 6; margin-bottom: 12px; }
.sub-charts-row { flex: 4; display: flex; gap: 12px; min-height: 0; }
.sub-chart { flex: 1; }

.auth-lock-box { text-align: center; padding: 60px 20px; background: #111827; border-radius: 12px; border: 1px dashed #1f2933; margin-top: 20px; }

/* Мобильный вид графиков */
@media (max-width: 991px) {
    .modal-xl-custom { max-width: 100%; margin: 0; height: 100vh; border-radius: 0; }
    .modal-content-custom { border-radius: 0; border: none; }
    .sub-charts-row { display: none !important; } /* Скрываем нижние на телефоне */
    .main-chart { flex: 1; margin-bottom: 0; } /* Главный занимает все место */
}