/* style.css - главный файл стилей */
@import url('main.css');
@import url('tabs.css');
@import url('buttons.css');

/* ========== ТРЕНД-ТАБЛИЦА ========== */

/* Заголовок секции */
.section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 30px;
    margin-bottom: 0;
    padding: 18px 24px;
    background: #1e2430;
    border-radius: 15px 15px 0 0;
    border-bottom: 2px solid #00d4aa;
    font-size: 20px;
    font-weight: 700;
    color: #e2e8f0;
    box-shadow: none;
}

.section-title i {
    color: #00d4aa;
    font-size: 22px;
}

.section-title + .tabs-container {
    border-radius: 0 0 15px 15px;
    margin-top: 0;
}

.section-subtitle {
    font-size: 12px;
    font-weight: 400;
    color: #7d8590;
    margin-left: 4px;
}

/* Минимальная ширина для тренд-таблицы (10 колонок) */
.trend-table {
    min-width: 900px;
}

/* Бейджи тренда */
.trend-up {
    display: inline-block;
    background: rgba(104,211,145,0.12);
    color: #68d391;
    padding: 3px 9px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
    letter-spacing: 0.2px;
}

.trend-down {
    display: inline-block;
    background: rgba(252,129,129,0.12);
    color: #fc8181;
    padding: 3px 9px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
    letter-spacing: 0.2px;
}

.trend-neutral {
    display: inline-block;
    background: rgba(160,174,192,0.1);
    color: #718096;
    padding: 3px 9px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

/* ========== ВОЛАТИЛЬНОСТЬ ========== */

/* Минимальная ширина для таблицы волатильности */
.vol-table {
    min-width: 1000px;
}

/* Ячейка волатильности: рост и падение стопкой */
.vol-table td {
    vertical-align: middle;
    padding: 6px 8px !important;
}

.vol-rise,
.vol-fall {
    display: block;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    line-height: 1.5;
}

.vol-rise { color: #2e7d32; }
.vol-fall { color: #c62828; }

/* Ячейка с высоким риском — фоновая подсветка */
.vol-cell-risky {
    background: rgba(244, 67, 54, 0.07) !important;
}
.vol-cell-risky .vol-fall {
    color: #b71c1c;
    font-size: 13px;
}

/* Нет данных */
.vol-no-data { color: #bbb; font-size: 12px; }

/* ========== ЗОНЫ ПОДДЕРЖКИ И СОПРОТИВЛЕНИЯ ========== */

/* Таблица */
.sr-table {
    min-width: 800px;
}

/* Кликабельные строки таблиц — открывают график Bybit */
.clickable-row {
    cursor: pointer;
    transition: background-color 0.15s ease;
}
.clickable-row:hover {
    background-color: rgba(0, 212, 170, 0.06) !important;
}

/* Ликвидность — колонка «Ликвид» */
/* Колонка «Стакан $» — стакан ордеров */
.ob-cell {
    display: flex;
    flex-direction: column;
    gap: 1px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
}
.ob-ask { color: #fc8181; }   /* продавцы — красный */
.ob-bid { color: #68d391; }   /* покупатели — зелёный */

.liq-liquid {
    display: inline-block;
    background: #1a4731;
    color: #68d391;
    border-radius: 5px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}
.liq-normal {
    display: inline-block;
    background: #3d2e00;
    color: #fbbf24;
    border-radius: 5px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}
.liq-thin {
    display: inline-block;
    background: #3d1a1a;
    color: #fc8181;
    border-radius: 5px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

/* ── Зоны ликвидации (Лик-риск) ──────────────────────────────────── */
.lr-cell {
    display: flex;
    flex-direction: column;
    gap: 3px;
    font-size: 11px;
    font-weight: 600;
    min-width: 95px;
}
.lr-long  { color: #fc8181; }   /* красный — лонги под угрозой (ниже цены) */
.lr-short { color: #68d391; }   /* зелёный — шорты под угрозой (выше цены) */
.lr-none  { color: #555; font-size: 12px; }

/* ── Бейджи категорий (таб «Все») ─────────────────────────────────── */
.cat-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    white-space: nowrap;
    letter-spacing: 0.3px;
}
.cat-conservative { background: rgba(104,211,145,0.15); color: #68d391; }
.cat-working      { background: rgba(99,179,237,0.15);  color: #63b3ed; }
.cat-aggressive   { background: rgba(246,173,85,0.15);  color: #f6ad55; }
.cat-madmax       { background: rgba(252,129,129,0.15); color: #fc8181; }

/* ── Коридор цены ─────────────────────────────────────────────────── */
.corridor-controls {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 8px 20px;
    background: #1e2430;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    flex-wrap: wrap;
}
.corridor-filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}
.corridor-filter-label {
    font-size: 12px;
    color: #7d8590;
    font-weight: 500;
    white-space: nowrap;
}

/* Ячейка в таблице */
.corridor-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 72px;
}

/* Мини-бар */
.corridor-bar {
    position: relative;
    width: 64px;
    height: 5px;
    background: rgba(255,255,255,0.08);
    border-radius: 3px;
    overflow: visible;
}
.corridor-dot {
    position: absolute;
    width: 9px;
    height: 9px;
    background: #00d4aa;
    border: 2px solid #1e2430;
    border-radius: 50%;
    top: -2px;
    transform: translateX(-50%);
    box-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

/* Цвет процента по ширине */
.corridor-narrow { color: #38a169; font-size: 11px; font-weight: 600; } /* < 0.5%  зелёный */
.corridor-medium { color: #dd6b20; font-size: 11px; font-weight: 600; } /* 0.5–2%  оранжевый */
.corridor-wide   { color: #e53e3e; font-size: 11px; font-weight: 600; } /* > 2%    красный */

/* Типы зон */
.sr-support {
    display: inline-block;
    background: rgba(104,211,145,0.12);
    color: #68d391;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}
.sr-resistance {
    display: inline-block;
    background: rgba(252,129,129,0.12);
    color: #fc8181;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

/* Расстояние до цены */
.sr-dist-support    { color: #68d391; font-weight: 600; }
.sr-dist-resistance { color: #fc8181; font-weight: 600; }

/* Сила уровня */
.sr-strength {
    color: #f5a623;
    font-size: 13px;
    letter-spacing: 1px;
    white-space: nowrap;
}

/* Объём */
.sr-vol-high   { color: #2e7d32; font-weight: 600; }
.sr-vol-medium { color: #f57c00; }
.sr-vol-low    { color: #9e9e9e; }

/* Таймфрейм бейдж */
.sr-tf-badge {
    display: inline-block;
    background: rgba(255,255,255,0.07);
    color: #94a3b8;
    padding: 1px 7px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
}

/* Круглый уровень */
.sr-round { color: #68d391; font-weight: 700; }

/* Статус зоны */
.sr-status-active      { color: #48bb78; font-size: 11px; white-space: nowrap; }
.sr-status-broken-down { color: #fc8181; font-size: 11px; white-space: nowrap; }
.sr-status-broken-up   { color: #68d391; font-size: 11px; white-space: nowrap; }

/* OI — открытый интерес */
.oi-up   { color: #48bb78; font-size: 11px; font-weight: 600; white-space: nowrap; }
.oi-down { color: #fc8181; font-size: 11px; font-weight: 600; white-space: nowrap; }
.oi-flat { color: #a0aec0; font-size: 11px; font-weight: 500; white-space: nowrap; }

/* L/S — соотношение лонг/шорт аккаунтов */
.ls-long-heavy  { color: #fc8181; font-size: 11px; font-weight: 700; white-space: nowrap; }
.ls-short-heavy { color: #68d391; font-size: 11px; font-weight: 700; white-space: nowrap; }
.ls-neutral     { color: #a0aec0; font-size: 11px; font-weight: 500; white-space: nowrap; }

/* Панель фильтров */
.sr-filters {
    padding: 14px 20px 10px;
    background: #1e2430;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.sr-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
}
.sr-filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}
.sr-filter-label {
    font-size: 12px;
    color: #7d8590;
    white-space: nowrap;
    font-weight: 500;
}

/* Пилюли фильтров */
.filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
.filter-pill {
    padding: 3px 10px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    background: rgba(255,255,255,0.04);
    color: #7d8590;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}
.filter-pill:hover {
    border-color: rgba(0,212,170,0.4);
    color: #00d4aa;
}
.filter-pill.active {
    background: rgba(0,212,170,0.15);
    border-color: rgba(0,212,170,0.4);
    color: #00d4aa;
}

/* Легенда над таблицей */
.vol-legend {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
}
.vol-rise-ex { color: #2e7d32; font-weight: 700; }
.vol-fall-ex { color: #c62828; font-weight: 700; }
.vol-hint    { color: #999; font-style: italic; }

/* Можно добавить общие стили для всего проекта */
:root {
    --primary-gradient: #0d1117;
    --success-color: #3fb950;
    --danger-color: #f85149;
    --warning-color: #ff9800;
    --info-color: #00d4aa;
}

/* Глобальные стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Geist', 'Segoe UI', system-ui, sans-serif;
    background: #0d1117;
    min-height: 100dvh;
    color: #d1d9e0;
}

/* Утилиты */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }
.mt-3 { margin-top: 30px; }

.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 20px; }
.mb-3 { margin-bottom: 30px; }

.hidden { display: none; }
.visible { display: block; }

/* ========== FAQ PANEL ========== */

/* Кнопка в хедере */
.faq-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 18px;
    background: transparent;
    border: 1px solid rgba(0,212,170,0.35);
    border-radius: 8px;
    color: #00d4aa;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}
.faq-btn:hover {
    background: rgba(0,212,170,0.1);
    border-color: rgba(0,212,170,0.6);
}

/* Кнопка выхода в хедере */
.logout-btn-header {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 13px;
    background: transparent;
    border: 1px solid rgba(255,80,80,0.35);
    border-radius: 8px;
    color: rgba(255,80,80,0.7);
    font-size: 15px;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.logout-btn-header:hover {
    background: rgba(255,80,80,0.1);
    border-color: rgba(255,80,80,0.7);
    color: #ff5050;
}

/* Оверлей */
.faq-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 1000;
    backdrop-filter: blur(2px);
}
.faq-overlay.open { display: block; }

/* Панель */
.faq-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: min(620px, 95vw);
    height: 100vh;
    background: #1a1f2e;
    color: #e2e8f0;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -4px 0 30px rgba(0,0,0,0.5);
}
.faq-panel.open { transform: translateX(0); }

/* Шапка панели */
.faq-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    background: #1e2430;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    flex-shrink: 0;
}
.faq-header-title {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #00d4aa;
    font-size: 18px;
    font-weight: 700;
    color: white;
}
.faq-header-title i { font-size: 20px; }
.faq-close-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    border-radius: 6px;
    color: white;
    width: 34px;
    height: 34px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.2s;
}
.faq-close-btn:hover { background: rgba(255,255,255,0.35); }

/* Тело панели */
.faq-body {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    scrollbar-width: thin;
    scrollbar-color: #4a5568 #1a1f2e;
}
.faq-body::-webkit-scrollbar { width: 5px; }
.faq-body::-webkit-scrollbar-track { background: #1a1f2e; }
.faq-body::-webkit-scrollbar-thumb { background: #4a5568; border-radius: 3px; }

/* Секция аккордеона */
.faq-section {
    background: #242b3d;
    border-radius: 10px;
    margin-bottom: 8px;
    overflow: hidden;
    border: 1px solid #2d3748;
}
.faq-section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    cursor: pointer;
    user-select: none;
    transition: background 0.15s;
}
.faq-section-header:hover { background: #2d3748; }
.faq-section-icon {
    width: 32px;
    height: 32px;
    background: rgba(0,212,170,0.1);
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #00d4aa;
    font-size: 14px;
    flex-shrink: 0;
}
.faq-section-title {
    font-size: 15px;
    font-weight: 600;
    color: #e2e8f0;
    flex: 1;
}
.faq-section-badge {
    font-size: 11px;
    color: #718096;
    margin-right: 4px;
    white-space: nowrap;
}
.faq-chevron {
    color: #718096;
    font-size: 13px;
    transition: transform 0.25s;
    flex-shrink: 0;
}
.faq-chevron.rotated { transform: rotate(180deg); }

/* Тело секции */
.faq-section-body {
    display: none;
    padding: 0 16px 16px;
}
.faq-section-body.open { display: block; }

.faq-intro {
    font-size: 13px;
    color: #a0aec0;
    line-height: 1.6;
    margin-bottom: 14px;
    padding: 10px 12px;
    background: #161b22;
    border-radius: 7px;
    border-left: 3px solid #00d4aa;
}

/* Карточки категорий */
.faq-category-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.faq-cat-card {
    padding: 12px;
    border-radius: 8px;
    border: 1px solid;
}
.faq-cat-conservative { background: #1a2744; border-color: #3b82f633; }
.faq-cat-working      { background: #1a2a20; border-color: #22c55e33; }
.faq-cat-aggressive   { background: #2a1f10; border-color: #f59e0b33; }
.faq-cat-madmax       { background: #2a1218; border-color: #ef444433; }
.faq-cat-name {
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 5px;
    color: #e2e8f0;
}
.faq-cat-conservative .faq-cat-name { color: #93c5fd; }
.faq-cat-working .faq-cat-name      { color: #86efac; }
.faq-cat-aggressive .faq-cat-name   { color: #fbbf24; }
.faq-cat-madmax .faq-cat-name       { color: #fca5a5; }
.faq-cat-desc { font-size: 11px; color: #94a3b8; line-height: 1.5; }

/* Список колонок */
.faq-col-list { display: flex; flex-direction: column; gap: 10px; }
.faq-col {
    padding: 10px 12px;
    background: #1a1f2e;
    border-radius: 7px;
    border-left: 3px solid #4a5568;
}
.faq-col:hover { border-left-color: #00d4aa; }
.faq-col-name {
    font-size: 13px;
    font-weight: 700;
    color: #00d4aa;
    margin-bottom: 4px;
}
.faq-col-desc {
    font-size: 12px;
    color: #94a3b8;
    line-height: 1.6;
}
.faq-tip {
    margin-top: 6px;
    padding: 6px 9px;
    background: #0f172a;
    border-radius: 5px;
    font-size: 11.5px;
    color: #7dd3fc;
    border-left: 2px solid #38bdf8;
    line-height: 1.55;
}
.faq-red   { color: #fc8181; font-weight: 600; }
.faq-green { color: #68d391; font-weight: 600; }

/* Легенда тренда */
.faq-trend-legend {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
}
.faq-trend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: #94a3b8;
}
.faq-badge-up {
    display: inline-block;
    background: #1a4731;
    color: #68d391;
    border-radius: 5px;
    padding: 2px 9px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    min-width: 60px;
    text-align: center;
}
.faq-badge-down {
    display: inline-block;
    background: #4a1a1a;
    color: #fc8181;
    border-radius: 5px;
    padding: 2px 9px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    min-width: 60px;
    text-align: center;
}
.faq-badge-flat {
    display: inline-block;
    background: #2d3748;
    color: #a0aec0;
    border-radius: 5px;
    padding: 2px 9px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    min-width: 60px;
    text-align: center;
}
.faq-badge-vol-up {
    display: inline-block;
    background: #1a4731;
    color: #68d391;
    border-radius: 5px;
    padding: 2px 9px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    min-width: 70px;
    text-align: center;
}
.faq-badge-vol-down {
    display: inline-block;
    background: #4a1a1a;
    color: #fc8181;
    border-radius: 5px;
    padding: 2px 9px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    min-width: 70px;
    text-align: center;
}

/* Статусы S/R */
.faq-status-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 4px 10px;
    margin-top: 8px;
    align-items: center;
}
.faq-status-near     { color: #68d391; font-weight: 700; font-size: 11px; white-space: nowrap; }
.faq-status-watch    { color: #fbbf24; font-weight: 700; font-size: 11px; white-space: nowrap; }
.faq-status-far      { color: #718096; font-weight: 700; font-size: 11px; white-space: nowrap; }
.faq-status-break-up { color: #93c5fd; font-weight: 700; font-size: 11px; white-space: nowrap; }
.faq-status-break-down { color: #fca5a5; font-weight: 700; font-size: 11px; white-space: nowrap; }
.faq-status-grid span:nth-child(even) { font-size: 11px; color: #94a3b8; }

/* Блок стратегий */
.faq-strategy-block {
    margin-top: 14px;
    background: #1a1f2e;
    border-radius: 8px;
    padding: 12px;
    border: 1px solid #2d3748;
}
.faq-strategy-title {
    font-size: 13px;
    font-weight: 600;
    color: #fbbf24;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.faq-strategy-list { display: flex; flex-direction: column; gap: 8px; }
.faq-strategy-item {
    font-size: 12px;
    color: #94a3b8;
    line-height: 1.6;
    padding-left: 10px;
    border-left: 2px solid #4a5568;
}
.faq-strategy-item strong { color: #cbd5e0; }

/* ═══════════════════════════════════════════════════════════════════
   РЕКОМЕНДАЦИИ — таблица сигналов + модал
   ═══════════════════════════════════════════════════════════════════ */

/* ── Переключатель режима торговли ── */
.signals-mode-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #1e2430;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    flex-wrap: wrap;
}
.signals-mode-label {
    font-size: 12px;
    font-weight: 600;
    color: #7d8590;
    white-space: nowrap;
    margin-right: 4px;
}
.signals-mode-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    border: 1.5px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.04);
    border-radius: 20px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    color: #7d8590;
    transition: all 0.2s;
    white-space: nowrap;
}
.signals-mode-btn:hover {
    border-color: rgba(0,212,170,0.4);
    color: #00d4aa;
}
.signals-mode-btn.active {
    border-color: rgba(0,212,170,0.4);
    background: rgba(0,212,170,0.15);
    color: #00d4aa;
}
.signals-mode-tfs {
    font-size: 10px;
    font-weight: 400;
    opacity: 0.75;
}
.signals-last-updated {
    font-size: 11px;
    color: #7d8590;
    white-space: nowrap;
}
/* Market Breadth индикатор */
.signals-market-bias {
    margin-left: auto;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    white-space: nowrap;
    cursor: default;
    letter-spacing: 0.2px;
}
.signals-market-bias.mb-bearish { background: #2d1515; color: #fc8181; border: 1px solid #742a2a; }
.signals-market-bias.mb-bullish { background: #1a2d1a; color: #68d391; border: 1px solid #276749; }
.signals-market-bias.mb-mixed   { background: #1a1f2d; color: #90cdf4; border: 1px solid #2a4365; }

/* Бейдж режима в модале */
.modal-mode-badge {
    margin-top: 6px;
    font-size: 11px;
    color: #718096;
    display: flex;
    align-items: center;
    gap: 5px;
}
.modal-mode-tfs {
    color: #4a5568;
    font-style: italic;
}

/* ── Таблица ── */
.signals-table td { vertical-align: middle; padding: 8px 10px; }
.signals-table .clickable-row { cursor: pointer; transition: background 0.15s; }
.signals-table .clickable-row:hover { background: #1e2638; }

/* ── Кнопка «Показать все / Свернуть» в таблицах анализа ─────────── */
.tabs-expand-wrap {
    display: flex;
    justify-content: center;
    padding: 10px 0 4px;
}
.tabs-expand-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    border: 1px solid #2d3748;
    border-radius: 8px;
    background: #161b22;
    color: #94a3b8;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.tabs-expand-btn:hover {
    border-color: rgba(0,212,170,0.4);
    color: #e2e8f0;
    background: rgba(0,212,170,0.06);
}
.tabs-collapse-btn { color: #718096; }

/* ── Кнопка «Показать все / Свернуть» ──────────────────────────────── */
.signals-expand-wrap {
    display: flex;
    justify-content: center;
    padding: 10px 0 4px;
}
.signals-expand-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    border: 1px solid #2d3748;
    border-radius: 8px;
    background: #161b22;
    color: #94a3b8;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.signals-expand-btn:hover {
    border-color: rgba(0,212,170,0.4);
    color: #e2e8f0;
    background: rgba(0,212,170,0.06);
}
.signals-collapse-btn { color: #718096; }
.expand-hidden-count {
    font-size: 11px;
    font-weight: 400;
    color: #4a5568;
    background: #1a2030;
    padding: 2px 7px;
    border-radius: 10px;
}

/* Сигнал (LONG/SHORT) */
.sig-long  { color: #68d391; font-weight: 700; white-space: nowrap; }
.sig-short { color: #fc8181; font-weight: 700; white-space: nowrap; }

/* Шкала оценки */
.sig-score-wrap  { display: flex; align-items: center; gap: 6px; min-width: 90px; }
.sig-score-num   { font-weight: 700; font-size: 14px; min-width: 18px; }
.sig-bar-bg      { flex: 1; height: 6px; background: #2d3748; border-radius: 3px; overflow: hidden; }
.sig-bar         { height: 100%; border-radius: 3px; transition: width 0.3s; }
.sig-bar-high    { background: #68d391; }
.sig-bar-mid     { background: #fbbf24; }
.sig-bar-low     { background: #fc8181; }

/* Рекомендация */
.rec-trade   { color: #68d391; font-weight: 700; white-space: nowrap; }
.rec-consider{ color: #fbbf24; font-weight: 700; white-space: nowrap; }
.rec-skip    { color: #fc8181; font-weight: 600; white-space: nowrap; }
.rec-wait    { color: #f6ad55; font-weight: 600; white-space: nowrap; } /* Сигнал есть, но вход не сейчас */

/* Тейк-профит / Вход в таблице Рекомендации */
.sig-tp-cell  { display: flex; flex-direction: column; gap: 2px; }
.sig-tp-pct   { font-weight: 700; font-size: 12px; white-space: nowrap; }
.sig-tp-rr    { font-size: 10px; color: #718096; white-space: nowrap; }
.sig-tp-great { color: #68d391; }   /* R:R ≥ 2.0 */
.sig-tp-good  { color: #9ae6b4; }   /* R:R ≥ 1.5 */
.sig-tp-ok    { color: #fbbf24; }   /* R:R < 1.5  */

/* Вход по S/R зоне — ячейка таблицы */
.sig-entry-cell  { border-left: 2px solid #4299e1; padding-left: 4px; }
.sig-entry-px    { font-weight: 700; font-size: 12px; color: #90cdf4; white-space: nowrap; }
.sig-entry-sltp  { display: flex; gap: 2px; align-items: center; font-size: 10px; white-space: nowrap; }
.sig-entry-sl    { color: #fc8181; }
.sig-entry-sep   { color: #4a5568; }

/* Блок входа в модале */
.modal-entry-block       { background: #0d1520; border: 1px solid #2d3748; border-radius: 10px;
                            padding: 14px 16px; margin-bottom: 16px; }
.modal-entry-block.modal-entry-none
                          { display: flex; align-items: center; justify-content: center;
                            gap: 8px; color: #718096; font-size: 12px; border-style: dashed;
                            padding: 12px 16px; margin-bottom: 16px; text-align: center; }
.modal-entry-none .fas   { color: #4a5568; }
.modal-entry-header      { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.modal-entry-header .fas { color: #4299e1; }
.modal-entry-title       { font-size: 12px; font-weight: 700; color: #90cdf4; letter-spacing: 0.3px; }
.modal-entry-badge       { margin-left: auto; font-size: 10px; background: #1a3a5c;
                            color: #63b3ed; padding: 2px 8px; border-radius: 10px; white-space: nowrap; }
.modal-entry-row         { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.modal-entry-card        { background: #0f1319; border-radius: 8px; padding: 10px 12px;
                            display: flex; flex-direction: column; gap: 3px; }
.modal-entry-in          { border-left: 3px solid #4299e1; }
.modal-entry-sl          { border-left: 3px solid #fc8181; }
.modal-entry-tp          { border-left: 3px solid #68d391; }
.modal-entry-lbl         { font-size: 10px; color: #718096; font-weight: 600; }
.modal-entry-px          { font-size: 14px; font-weight: 800; color: #e2e8f0; }
.modal-entry-pct         { font-size: 16px; font-weight: 800; line-height: 1.1; }
.modal-entry-sl .modal-entry-pct  { color: #fc8181; }
.modal-entry-tp .modal-entry-pct  { color: #68d391; }
.modal-entry-dist        { font-size: 10px; color: #718096; }
.modal-entry-rr          { text-align: center; font-size: 12px; font-weight: 600;
                            padding: 6px; background: #0f1319; border-radius: 6px; }

/* Trend Duration column */
.sig-td-cell  { display: flex; flex-direction: column; gap: 3px; }
.sig-td-row   { display: flex; align-items: center; gap: 4px; }
.sig-td-tf    { font-size: 9px; color: #4a5568; min-width: 18px; }
.sig-td-dir   { font-weight: 700; font-size: 11px; white-space: nowrap; }
.sig-td-up      { color: #68d391; }
.sig-td-down    { color: #fc8181; }
.sig-td-pullback{ color: #f6ad55; } /* Откат против сигнала — потенциальный вход */
.sig-td-speed   { font-size: 10px; color: #718096; white-space: nowrap; }

/* Бейджи скоростного анализа */
.sig-spd-badges  { display: flex; flex-wrap: wrap; gap: 2px; margin-top: 2px; }
.sig-spd-badge   { font-size: 9px; font-weight: 700; padding: 1px 4px; border-radius: 3px; white-space: nowrap; }
.sig-spd-pyramid { background: rgba(251,191,36,0.15); color: #fbbf24; border: 1px solid rgba(251,191,36,0.3); }
.sig-spd-overheat{ background: rgba(252,129,129,0.15); color: #fc8181; border: 1px solid rgba(252,129,129,0.3); }
.sig-spd-exhaust { background: rgba(160,174,192,0.15); color: #a0aec0; border: 1px solid rgba(160,174,192,0.3); }
.sig-spd-spdiv   { background: rgba(246,173,85,0.15);  color: #f6ad55; border: 1px solid rgba(246,173,85,0.3);  }

/* Рекомендация: перегрев */
.rec-overheat { color: #fc8181; }

/* Тренд пилюли */
.sig-trend-wrap { display: flex; gap: 3px; flex-wrap: wrap; max-width: 120px; }
.sig-tf         { font-size: 10px; padding: 1px 5px; border-radius: 3px; font-weight: 600; white-space: nowrap; }
.trend-up       { background: rgba(104,211,145,0.15); color: #68d391; }
.trend-dn       { background: rgba(252,129,129,0.15); color: #fc8181; }
.trend-nu       { background: #2d3748; color: #718096; }

/* S/R уровни */
.sig-sr-sup { color: #68d391; font-size: 12px; font-weight: 600; }
.sig-sr-res { color: #fc8181; font-size: 12px; font-weight: 600; }

/* ── Модал ── */
.signals-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.65);
    z-index: 1000;
    backdrop-filter: blur(2px);
    align-items: center;
    justify-content: center;
}
.signals-modal-overlay.open { display: flex; }

.signals-modal {
    display: block;
    position: relative;
    z-index: 1001;
    background: #1a1f2e;
    border: 1px solid #2d3748;
    border-radius: 12px;
    padding: 28px;
    width: 90%;
    max-width: 600px;
    height: 85vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}

/* signals-modal-body — реальный flex-контейнер */
#signals-modal-body {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

/* Статичные дочерние элементы body не сжимаются */
#signals-modal-body > *:not(.modal-panes-wrap) { flex-shrink: 0; }

/* Область пейнов — занимает всё оставшееся место, сам не скроллится */
.modal-panes-wrap {
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.signals-modal-close {
    position: absolute;
    top: 14px;
    right: 16px;
    background: #2d3748;
    border: none;
    color: #94a3b8;
    font-size: 16px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: background 0.2s, color 0.2s;
}
.signals-modal-close:hover { background: #4a5568; color: #fff; }

/* Заголовок модала */
.modal-header-row { display: block; margin-bottom: 18px; }
.modal-symbol     { font-size: 22px; font-weight: 800; color: #e2e8f0;
                    display: flex; align-items: center; flex-wrap: nowrap; gap: 0;
                    overflow: hidden; }
.modal-price      { font-size: 14px; color: #94a3b8; font-weight: 400; margin-left: 10px; }
.modal-vol        { font-size: 12px; color: #718096; margin-top: 6px; }
/* Бадж направления и кнопка Обновить — одинаковый размер */
.modal-dir, .modal-refresh-action {
    display: inline-flex; align-items: center; justify-content: center; gap: 5px;
    width: 120px; height: 32px;
    font-size: 14px; font-weight: 800; border-radius: 6px;
    white-space: nowrap; flex-shrink: 0; line-height: 1; box-sizing: border-box;
}
.modal-dir-long  { background: rgba(104,211,145,0.15); color: #68d391; border: 1px solid rgba(104,211,145,0.3); }
.modal-dir-short { background: rgba(252,129,129,0.15); color: #fc8181; border: 1px solid rgba(252,129,129,0.3); }
/* Кнопка «Обновить» — симметричная с баджем направления */
.modal-refresh-action {
    background: rgba(100,116,139,0.15);
    border: 1px solid rgba(100,116,139,0.3);
    color: #94a3b8;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.modal-refresh-action:hover { background: rgba(100,116,139,0.3); color: #e2e8f0; }
.modal-refresh-action i { font-size: 12px; }

/* Блок оценки */
.modal-score-block  { background: #0f1319; border-radius: 8px; padding: 14px 16px; margin-bottom: 10px; }
.modal-score-line   { display: flex; align-items: center; gap: 12px; }
.modal-score-num    { font-size: 28px; font-weight: 900; color: #e2e8f0; line-height: 1; }
.modal-score-of     { font-size: 14px; color: #718096; font-weight: 400; }
.modal-bar-bg       { flex: 1; height: 8px; background: #2d3748; border-radius: 4px; overflow: hidden; }
.modal-bar          { height: 100%; border-radius: 4px; }
.modal-rec          { font-size: 14px; white-space: nowrap; }
.modal-score-sub    { display: flex; align-items: center; margin-top: 10px; font-size: 12px; color: #718096; }
.modal-score-actions { display: flex; gap: 8px; margin-bottom: 14px; justify-content: flex-end; background: #0f1319; border-radius: 8px; padding: 10px 16px; }

/* Факторы */
.modal-factors-grid  { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 18px; }
.modal-factors-col   { background: #0f1319; border-radius: 8px; padding: 12px; }
.modal-factors-title { font-size: 12px; font-weight: 700; color: #94a3b8; margin-bottom: 8px; }
.modal-factors-list  { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 5px; max-height: 220px; overflow-y: auto; overflow-x: hidden; }
.modal-factors-list::-webkit-scrollbar       { width: 3px; }
.modal-factors-list::-webkit-scrollbar-track { background: transparent; }
.modal-factors-list::-webkit-scrollbar-thumb { background: #2d3748; border-radius: 2px; }
.modal-factor-ok     { font-size: 12px; color: #e2e8f0; line-height: 1.4; }
.modal-factor-warn   { font-size: 12px; color: #fbbf24; line-height: 1.4; }
.modal-factor-none   { font-size: 12px; color: #4a5568; font-style: italic; }

/* Доп. данные */
.modal-zones     { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.modal-zone-item { display: flex; justify-content: space-between; align-items: center;
                   font-size: 12px; padding: 6px 0; border-bottom: 1px solid #1e2638; }
.modal-zone-label { color: #718096; }
.modal-zone-val   { color: #cbd5e0; font-weight: 600; }

/* Цвета значений в modal-zones */
.mzv-pos    { color: #68d391; font-weight: 600; }
.mzv-neg    { color: #fc8181; font-weight: 600; }
.mzv-contra { color: #f6ad55; font-weight: 600; } /* против направления сигнала */
.mzv-dim    { color: #4a5568; } /* заглушка пока данные грузятся */
.sl-val  { color: #fc8181; font-weight: 600; }
.tp-val  { color: #68d391; font-weight: 600; }

/* Время до TP */
.ttp-base    { color: #68d391; font-weight: 700; }
.ttp-range   { color: #718096; font-weight: 400; font-size: 11px; }
.ttp-reached { color: #68d391; }
.ttp-none    { color: #718096; font-style: italic; }

/* Баннер готовности к входу (CVD + Liq Sweep + Daily VWAP) */
.entry-banner {
    padding: 10px 14px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 13px;
    margin-bottom: 14px;
    text-align: center;
    letter-spacing: 0.02em;
}
.entry-banner-ready { background: #1a4731; color: #68d391; border: 1px solid #276749; }
.entry-banner-wait  { background: #3d2e00; color: #fbbf24; border: 1px solid #6b4c00; }

/* Разделитель секций в modal-zones */
.modal-zone-divider { height: 1px; background: #2d3748; margin: 4px 0; }

/* Длительность тренда — цвет по направлению */
.trend-dur-up   { color: #68d391; font-weight: 600; }
.trend-dur-down { color: #fc8181; font-weight: 600; }

/* ADX — цвет по силе тренда */
.adx-strong   { color: #68d391; font-weight: 700; }
.adx-moderate { color: #9ae6b4; font-weight: 600; }
.adx-weak     { color: #fbbf24; font-weight: 500; }
.adx-flat     { color: #718096; font-weight: 500; }

/* EMA стек — цвета по выравниванию */
.ema-bull       { color: #68d391; font-weight: 600; }
.ema-bear       { color: #fc8181; font-weight: 600; }
.ema-weak_bull  { color: #9ae6b4; font-weight: 600; }
.ema-weak_bear  { color: #feb2b2; font-weight: 600; }
.ema-mixed      { color: #a0aec0; font-weight: 600; }

/* BB позиция — полоска */
.bb-bar {
    display: inline-block; position: relative;
    width: 70px; height: 8px;
    background: linear-gradient(to right, #68d391, #a0aec0, #fc8181);
    border-radius: 4px; margin-right: 6px; vertical-align: middle;
}
.bb-bar-fill { display: none; }  /* не используется, цвет задан градиентом */
.bb-bar-dot  {
    position: absolute; top: -2px; width: 12px; height: 12px;
    background: #fff; border: 2px solid #2d3748;
    border-radius: 50%; transform: translateX(-50%);
}

/* Предупреждение в modal-zone (Volume Trap и т.п.) */
.mzi-warn {
    background: rgba(252, 129, 129, 0.08);
    border-radius: 6px; padding: 4px 8px !important;
    border-bottom: none !important;
}

/* Табы внутри модала */
.modal-tabs-nav   { display: flex; flex-wrap: nowrap; gap: 2px; margin-bottom: 16px;
                    border-bottom: 1px solid #1e2638; overflow-x: auto; overflow-y: hidden; }
.modal-tab-btn    { background: none; border: none; cursor: pointer;
                    padding: 8px 10px 9px; font-size: 12px; font-weight: 600;
                    color: #718096; border-bottom: 2px solid transparent;
                    margin-bottom: -1px; display: flex; align-items: center;
                    gap: 5px; white-space: nowrap; flex-shrink: 0;
                    transition: color 0.15s, border-color 0.15s; }
.modal-tab-btn:hover  { color: #cbd5e0; }
.modal-tab-btn.active { color: #e2e8f0; border-bottom-color: #667eea; }
.modal-tab-pane       { background: #0f1319; border-radius: 8px; padding: 14px; height: 100%; box-sizing: border-box; overflow-y: auto; overflow-x: hidden; }
#modal-pane-info      { overflow-x: hidden; overflow-y: auto; }
.modal-tab-hidden     { display: none !important; }
.modal-tab-pane::-webkit-scrollbar       { width: 4px; }
.modal-tab-pane::-webkit-scrollbar-track { background: transparent; }
.modal-tab-pane::-webkit-scrollbar-thumb { background: #2d3748; border-radius: 2px; }
/* Статус иконки таба Стакан */
.ob-ws-ok  { color: #68d391 !important; animation: ob-pulse 1.6s ease-in-out infinite; }
.ob-ws-err { color: #fc8181 !important; animation: ob-pulse 0.7s ease-in-out infinite; }
/* Цвет иконки таба Тренд */
.trend-icon-up   { color: #68d391 !important; }
.trend-icon-down { color: #fc8181 !important; }
.modal-sltp-empty     { text-align: center; padding: 40px 20px; color: #4a5568;
                        font-size: 13px; }

/* SL / TP блок */
.modal-sltp          { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 18px; }
.modal-sltp-card     { background: #0f1319; border-radius: 8px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.modal-sltp-sl       { border-left: 3px solid #fc8181; }
.modal-sltp-tp       { border-left: 3px solid #68d391; }
.modal-sltp-lbl      { font-size: 11px; color: #718096; font-weight: 600; letter-spacing: 0.3px; }
.modal-sltp-pct      { font-size: 20px; font-weight: 800; line-height: 1.1; }
.modal-sltp-sl .modal-sltp-pct { color: #fc8181; }
.modal-sltp-tp .modal-sltp-pct { color: #68d391; }
.modal-sltp-px       { font-size: 13px; color: #94a3b8; }
.modal-sltp-rr       { grid-column: 1 / -1; text-align: center; font-size: 12px; font-weight: 600;
                        padding: 7px; background: #0f1319; border-radius: 6px 6px 0 0; }
.modal-sltp-ttp      { grid-column: 1 / -1; text-align: center; font-size: 12px;
                        padding: 6px 7px; background: #0f1319; border-radius: 0 0 6px 6px;
                        border-top: 1px solid #1e2638; color: #718096; }
.sltp-rr-good        { color: #68d391; }
.sltp-rr-ok          { color: #fbbf24; }
.sltp-rr-poor        { color: #fc8181; }

/* Кнопка Bybit */
.modal-bybit-btn  {
    background: linear-gradient(135deg, #f7a035, #f05f57);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 120px;
    height: 32px;
    box-sizing: border-box;
    transition: opacity 0.2s;
}
.modal-bybit-btn:hover { opacity: 0.85; }

@media (max-width: 600px) {
    .modal-factors-grid { grid-template-columns: 1fr; }
    .signals-modal { padding: 18px; }
}
/* Кнопка обновления в модальном окне */
.modal-refresh-btn {
    background: #2d3748;
    border: 1px solid #4a5568;
    border-radius: 8px;
    color: #94a3b8;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s;
    white-space: nowrap;
    line-height: 1;
    align-self: stretch;
}
.modal-refresh-btn:hover {
    background: #4a5568;
    color: #e2e8f0;
    border-color: #667eea;
}
.modal-refresh-btn i {
    font-size: 11px;
}

/* ===== РЫНОЧНЫЙ КОНТЕКСТ — новый дизайн ===== */
.market-context-panel { margin-top: 20px; }

.mkt-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1.4fr;
    gap: 14px;
    margin-top: 16px;
}

/* ── Карточка ── */
.mkt-card {
    background: #111827;
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.mkt-card-hdr {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 15px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6b7280;
}
.mkt-card-sessions .mkt-card-hdr { background: linear-gradient(135deg, #0c1220 0%, #132035 100%); }
.mkt-card-btc      .mkt-card-hdr { background: linear-gradient(135deg, #1a1200 0%, #2d2000 100%); }
.mkt-card-breadth  .mkt-card-hdr { background: linear-gradient(135deg, #0d1a0d 0%, #152415 100%); }

.mkt-hdr-left { display: flex; align-items: center; gap: 7px; }
.mkt-hdr-left i { font-size: 12px; }
.mkt-card-sessions .mkt-hdr-left i { color: #60a5fa; }
.mkt-card-btc      .mkt-hdr-left i { color: #f59e0b; }
.mkt-card-breadth  .mkt-hdr-left i { color: #34d399; }

.mkt-clock {
    font-size: 10px; font-family: monospace; font-weight: 500;
    color: #4b5563; text-transform: none; letter-spacing: 0;
}

/* ── Таймлайн суток ── */
.mkt-timeline-wrap { padding: 12px 14px 6px; }

.mkt-tl-bar {
    position: relative;
    height: 10px;
    background: #1f2937;
    border-radius: 6px;
}
.mkt-tl-seg {
    position: absolute;
    height: 100%;
    border-radius: 3px;
    opacity: 0.5;
}
.mkt-tl-asia   { background: #3b82f6; }
.mkt-tl-europe { background: #f59e0b; }
.mkt-tl-usa    { background: #10b981; }
.mkt-tl-now {
    position: absolute;
    top: -4px; bottom: -4px;
    width: 2px;
    background: #f9fafb;
    border-radius: 2px;
    z-index: 2;
    box-shadow: 0 0 6px rgba(249,250,251,0.7);
}
.mkt-tl-labels {
    display: flex;
    justify-content: space-between;
    font-size: 9px;
    color: #374151;
    margin-top: 4px;
    font-family: monospace;
}

/* ── Строки сессий ── */
.mkt-sessions-list { display: flex; flex-direction: column; gap: 6px; padding: 8px 14px 14px; }

.mkt-sess-row {
    background: #0f172a;
    border: 1px solid #1e293b;
    border-radius: 10px;
    padding: 9px 11px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    transition: border-color 0.2s;
}
.mkt-sess-row.sess-open   { border-color: rgba(52,211,153,0.3);  background: rgba(52,211,153,0.04); }
.mkt-sess-row.sess-danger { border-color: rgba(251,191,36,0.35); background: rgba(251,191,36,0.04); }

.mkt-sess-top { display: flex; align-items: center; gap: 7px; }
.mkt-sess-icon  { font-size: 15px; width: 20px; text-align: center; flex-shrink: 0; }
.mkt-sess-name  { font-size: 13px; font-weight: 700; color: #e2e8f0; min-width: 58px; }
.mkt-sess-hours { font-size: 10px; color: #4b5563; flex: 1; font-family: monospace; }
.mkt-sess-badge {
    font-size: 10px; font-weight: 700;
    padding: 2px 7px; border-radius: 20px; white-space: nowrap;
}
.badge-open   { background: rgba(52,211,153,0.15); color: #34d399; border: 1px solid rgba(52,211,153,0.3); }
.badge-closed { background: rgba(55,65,81,0.5);    color: #6b7280; border: 1px solid #374151; }
.badge-danger { background: rgba(251,191,36,0.15); color: #fbbf24; border: 1px solid rgba(251,191,36,0.3); }

.mkt-sess-progress { height: 3px; background: #1f2937; border-radius: 3px; overflow: hidden; }
.mkt-sess-prog-fill { height: 100%; border-radius: 3px; transition: width 0.6s ease; }
.prog-asia   { background: #3b82f6; }
.prog-europe { background: #f59e0b; }
.prog-usa    { background: #10b981; }
.prog-danger { background: #fbbf24; }

.mkt-sess-countdown { font-size: 10px; color: #6b7280; font-family: monospace; }

/* ── Bitcoin ── */
#mkt-btc-badge {
    font-size: 11px; font-weight: 700;
    padding: 2px 9px; border-radius: 20px;
}
.mkt-badge-bull { background: rgba(52,211,153,0.15); color: #34d399; border: 1px solid rgba(52,211,153,0.3); }
.mkt-badge-bear { background: rgba(248,113,113,0.15); color: #f87171; border: 1px solid rgba(248,113,113,0.3); }
.mkt-badge-neu  { background: rgba(156,163,175,0.12); color: #9ca3af; border: 1px solid rgba(156,163,175,0.2); }

#mkt-sentiment-body { padding: 14px 15px 10px; display: flex; flex-direction: column; gap: 10px; }

.mkt-btc-price {
    font-size: 26px; font-weight: 800; color: #f9fafb;
    letter-spacing: -0.5px; line-height: 1;
}

.mkt-trend-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.mkt-pill {
    font-size: 12px; font-weight: 700;
    padding: 4px 10px; border-radius: 20px;
}
.mkt-pill-up  { background: rgba(52,211,153,0.15); color: #34d399; border: 1px solid rgba(52,211,153,0.25); }
.mkt-pill-dn  { background: rgba(248,113,113,0.15); color: #f87171; border: 1px solid rgba(248,113,113,0.25); }
.mkt-pill-neu { background: rgba(156,163,175,0.1);  color: #9ca3af; border: 1px solid rgba(156,163,175,0.2); }

.mkt-rsi-row { display: flex; align-items: center; gap: 8px; }
.mkt-rsi-label { font-size: 11px; color: #6b7280; min-width: 36px; }
.mkt-rsi-val   { font-size: 13px; font-weight: 700; min-width: 38px; }
.mkt-rsi-track { flex: 1; height: 5px; background: #1f2937; border-radius: 3px; overflow: hidden; }
.mkt-rsi-fill  { height: 100%; border-radius: 3px; transition: width 0.4s; }
/* Цвет фона — только для полосы прогресса */
.rsi-normal { background: #60a5fa; }
.rsi-hot    { background: #f87171; }
.rsi-cold   { background: #34d399; }
/* Цвет текста значения RSI — отдельно, без фона */
.mkt-rsi-val.rsi-normal { background: transparent; color: #60a5fa; }
.mkt-rsi-val.rsi-hot    { background: transparent; color: #f87171; }
.mkt-rsi-val.rsi-cold   { background: transparent; color: #34d399; }

/* ── Fear & Greed ── */
#mkt-fg-body { padding: 0 15px 14px; }

.mkt-fg-wrap {
    background: #0f172a; border: 1px solid #1e293b; border-radius: 10px;
    padding: 9px 13px; display: flex; align-items: center; gap: 9px;
}
.mkt-fg-label { font-size: 11px; color: #6b7280; font-weight: 600; white-space: nowrap; }
.mkt-fg-gauge { flex: 1; height: 6px; background: #1f2937; border-radius: 4px; overflow: hidden; }
.mkt-fg-fill  { height: 100%; border-radius: 4px; transition: width 0.5s; }
/* Цвет текста для val и class — контрастный белый/тёмный */
.mkt-fg-val   { font-size: 14px; font-weight: 800; background: transparent !important; }
.mkt-fg-class { font-size: 11px; font-weight: 600; white-space: nowrap; background: transparent !important; }

/* Цвет фона — только для полосы fill */
.mkt-fg-extreme-fear { background: #ef4444; }
.mkt-fg-fear         { background: #f97316; }
.mkt-fg-neutral      { background: #eab308; }
.mkt-fg-greed        { background: #22c55e; }
.mkt-fg-extreme-greed{ background: #10b981; }
/* Цвет текста для val / class — читаемый на тёмном фоне панели */
.mkt-fg-val.mkt-fg-extreme-fear, .mkt-fg-class.mkt-fg-extreme-fear { color: #f87171; }
.mkt-fg-val.mkt-fg-fear,         .mkt-fg-class.mkt-fg-fear         { color: #fb923c; }
.mkt-fg-val.mkt-fg-neutral,      .mkt-fg-class.mkt-fg-neutral      { color: #facc15; }
.mkt-fg-val.mkt-fg-greed,        .mkt-fg-class.mkt-fg-greed        { color: #4ade80; }
.mkt-fg-val.mkt-fg-extreme-greed,.mkt-fg-class.mkt-fg-extreme-greed{ color: #34d399; }

/* ── Market Breadth ── */
.mkt-badge-sm {
    font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 20px;
}

#mkt-breadth-body { padding: 14px 15px; display: flex; flex-direction: column; gap: 10px; }

.mkt-breadth-bias {
    font-size: 15px; font-weight: 800;
    padding: 10px 14px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center; gap: 8px;
}
.bias-bull { background: rgba(52,211,153,0.1);  color: #34d399; border: 1px solid rgba(52,211,153,0.2); }
.bias-bear { background: rgba(248,113,113,0.1); color: #f87171; border: 1px solid rgba(248,113,113,0.2); }
.bias-mix  { background: rgba(156,163,175,0.08); color: #9ca3af; border: 1px solid rgba(156,163,175,0.15); }

.mkt-breadth-rows { display: flex; flex-direction: column; gap: 7px; }

.mkt-breadth-row { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.mkt-tf-label { font-weight: 700; color: #6b7280; min-width: 20px; font-family: monospace; font-size: 11px; }
.mkt-split-bar {
    flex: 1; height: 8px; background: #1f2937; border-radius: 4px; overflow: hidden; display: flex;
}
.mkt-split-up { background: #34d399; height: 100%; transition: width 0.4s; }
.mkt-split-dn { background: #f87171; height: 100%; transition: width 0.4s; }
.mkt-split-pct-up { color: #34d399; font-weight: 700; min-width: 34px; text-align: right; font-size: 11px; }
.mkt-split-pct-dn { color: #f87171; font-weight: 700; min-width: 34px; font-size: 11px; }

.mkt-coin-count-row { font-size: 11px; color: #374151; text-align: center; padding-top: 2px; }
.mkt-coin-count-row i { margin-right: 4px; }

/* ── обратная совместимость ── */
.mkt-up    { color: #68d391; }
.mkt-dn    { color: #fc8181; }
.mkt-neu   { color: #a0aec0; }
.mkt-price { color: #e2e8f0; font-size: 15px; }
.mkt-no-data { color: #4b5563; font-size: 13px; text-align: center; padding: 20px 0; }
.mkt-sent-divider {
    font-size: 10px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.8px; color: #4a5568;
    padding-top: 6px; margin-top: 2px;
    border-top: 1px solid #2d3748;
}

@media (max-width: 900px) {
    .mkt-grid { grid-template-columns: 1fr 1fr; }
    .mkt-card-breadth { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
    .mkt-grid { grid-template-columns: 1fr; }
}

/* ─── Live цена в шапке модала ───────────────────────────────────────────── */
.modal-live-chg,
.modal-live-speed,
.modal-live-trades,
.modal-live-avg-trade {
    font-size: 12px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 10px;
    margin-left: 8px;
    vertical-align: middle;
    transition: color 0.3s, background 0.3s;
}
.live-chg-up   { background: rgba(104,211,145,0.15); color: #68d391; }
.live-chg-dn   { background: rgba(252,129,129,0.15); color: #fc8181; }
.live-chg-flat { background: rgba(160,174,192,0.1);  color: #718096; }

/* ─── Live Order Book секция в модале ────────────────────────────────────── */
.modal-live-ob-wrap {
    background: #0d1117;
    border: 1px solid #1e2a3a;
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 14px;
    height: 264px;
    overflow: hidden;
    box-sizing: border-box;
}
.ob-live-loading {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #718096;
    font-size: 13px;
}
/* Пульсирующая точка — живое соединение */
.ob-live-dot {
    display: inline-block;
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #68d391;
    animation: ob-pulse 1.4s ease-in-out infinite;
    flex-shrink: 0;
}
@keyframes ob-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.4; transform: scale(0.7); }
}
.ob-live-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}
.ob-live-title {
    font-size: 12px;
    color: #718096;
    flex: 1;
}
.ob-live-delta {
    font-size: 12px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
}
.ob-delta-pos     { background: rgba(104,211,145,0.15); color: #68d391; }
.ob-delta-neg     { background: rgba(252,129,129,0.15); color: #fc8181; }
.ob-delta-neutral { background: rgba(160,174,192,0.1);  color: #718096; }

/* Бар взвешенного имбаланса */
.ob-imb-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}
.ob-imb-label {
    font-size: 11px;
    color: #4a5568;
    min-width: 120px;
}
.ob-imb-track {
    flex: 1;
    height: 6px;
    background: #1a202c;
    border-radius: 3px;
    position: relative;
    overflow: hidden;
}
.ob-imb-fill {
    position: absolute;
    top: 0; height: 100%;
    border-radius: 3px;
    transition: width 0.3s ease;
}
.ob-imb-fill.ob-bull { background: #68d391; }
.ob-imb-fill.ob-bear { background: #fc8181; }
.ob-imb-fill.ob-neutral { background: #4a5568; width: 2px !important; left: 50% !important; }
.ob-imb-mid {
    position: absolute;
    top: 0; left: 50%;
    width: 1px; height: 100%;
    background: #2d3748;
}
.ob-imb-val {
    font-size: 12px;
    font-weight: 700;
    min-width: 38px;
    text-align: right;
}
.ob-imb-val.ob-bull { color: #68d391; }
.ob-imb-val.ob-bear { color: #fc8181; }
.ob-imb-val.ob-neutral { color: #718096; }

/* Строка live-метрик: OI дельта · спред · фандинг */
.ob-live-metrics {
    display: flex;
    gap: 10px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}
.ob-metric-item {
    display: flex;
    align-items: center;
    gap: 4px;
}
.ob-metric-label {
    font-size: 10px;
    color: #4a5568;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.ob-metric-val {
    font-size: 11px;
    font-weight: 600;
    color: #a0aec0;
}
.ob-metric-pos { color: #68d391; }
.ob-metric-neg { color: #fc8181; }

/* Список live факторов */
.ob-factors-list {
    list-style: none;
    margin: 0; padding: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.ob-factors-list li {
    font-size: 12px;
    padding: 2px 0;
}
.ob-factor-pos   { color: #68d391; }
.ob-factor-neg   { color: #fc8181; }
.ob-factor-empty { color: #4a5568; font-style: italic; }

/* Squeeze Score строка */
.ob-squeeze-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #1e2a3a;
}
.ob-sq-label {
    font-size: 11px;
    color: #718096;
    white-space: nowrap;
    min-width: 80px;
}
.ob-sq-dots {
    display: flex;
    gap: 5px;
    align-items: center;
}
.ob-sq-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    cursor: default;
}
.ob-sq-dot-on  { background: #f6ad55; box-shadow: 0 0 5px rgba(246,173,85,0.6); }
.ob-sq-dot-off { background: #2d3748; border: 1px solid #4a5568; }
.ob-sq-badge {
    font-size: 12px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: auto;
    white-space: nowrap;
}
.ob-sq-fire { background: rgba(246,173,85,0.2); color: #f6ad55; }
.ob-sq-warn { background: rgba(246,224,85,0.12); color: #ecc94b; }
.ob-sq-low  { background: rgba(160,174,192,0.08); color: #718096; }
.ob-sq-none { background: transparent; color: #4a5568; font-weight: 400; }

/* ─── Таблица фандинга ───────────────────────────────────────────────────── */
.funding-table th:nth-child(n+4),
.funding-table td:nth-child(n+4) { text-align: center; }

/* Цветовые бейджи прогноза (LONG: платишь / получаешь) */
.fr-danger  { color: #fc8181; font-weight: 700; }
.fr-warn    { color: #f6ad55; font-weight: 700; }
.fr-caution { color: #ecc94b; font-weight: 600; }
.fr-ok      { color: #718096; }
.fr-earn    { color: #68d391; font-weight: 600; }

/* Время следующего списания */
.fr-next-time {
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: #a0aec0;
    letter-spacing: 0.5px;
}

/* Легенда под строкой поиска */
.fr-legend {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    font-size: 11px;
}
.fr-legend-item { font-weight: 600; }
.fr-legend-item.fr-danger  { color: #fc8181; }
.fr-legend-item.fr-warn    { color: #f6ad55; }
.fr-legend-item.fr-caution { color: #ecc94b; }
.fr-legend-item.fr-ok      { color: #718096; }
.fr-legend-item.fr-earn    { color: #68d391; }

/* Таймер в модале сигнала */
.modal-funding-countdown {
    font-family: 'Courier New', monospace;
    font-size: 13px;
    font-weight: 700;
    color: #a0aec0;
    letter-spacing: 1px;
    transition: color 0.3s;
}
.modal-funding-countdown.mfc-soon   { color: #ecc94b; }
.modal-funding-countdown.mfc-urgent { color: #fc8181; animation: ob-pulse 0.8s ease-in-out infinite; }

/* ════════════════════════════════════════════════════════════════════
   Блок «Торговля бота» — BotTradesManager
   ════════════════════════════════════════════════════════════════════ */

/* Обёртка */
.bot-trades-wrap {
    padding: 0;
}

/* ── Тулбар ─────────────────────────────────────────────────────────── */
.bot-trades-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 16px 10px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    background: #1e2430;
}
.bot-trades-filters {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}
.bt-filter-label {
    font-size: 12px;
    color: #7d8590;
    display: flex;
    align-items: center;
    gap: 6px;
}
.bt-filter-label select {
    font-size: 12px;
    padding: 3px 6px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    background: rgba(255,255,255,0.05);
    color: #d1d9e0;
    cursor: pointer;
}
.bt-refresh-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}
.bt-last-update {
    font-size: 11px;
    color: #7d8590;
}
.btn-sm {
    padding: 4px 10px !important;
    font-size: 0.78rem !important;
    border-radius: 6px !important;
}

/* ── Управление ботом ───────────────────────────────────────────────── */
.bt-control-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 14px;
    background: #161b22;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    flex-wrap: wrap;
    gap: 8px;
}
.bt-bot-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    color: #94a3b8;
}
.bt-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #a0aec0;
    flex-shrink: 0;
}
.bt-status-dot.bt-status-running {
    background: #48bb78;
    animation: bt-pulse 1.4s ease-in-out infinite;
}
.bt-status-dot.bt-status-stopped {
    background: #fc8181;
}
@keyframes bt-pulse {
    0%   { opacity: 1;   transform: scale(1);   }
    50%  { opacity: 0.4; transform: scale(1.35); }
    100% { opacity: 1;   transform: scale(1);   }
}
.bt-control-btns {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.bt-btn-toggle {
    padding: 5px 14px; border-radius: 6px; font-size: 0.78rem;
    cursor: pointer; border: none; transition: opacity .15s; color: #fff;
    min-width: 110px;
}
.bt-btn-toggle.bt-btn-toggle-start { background: #48bb78; }
.bt-btn-toggle.bt-btn-toggle-stop  { background: #e53e3e; }
.bt-btn-toggle:hover { opacity: .85; }
.bt-action { width: 32px; padding: 0 4px !important; text-align: center; }
.bt-close-btn {
    background: none;
    border: 1px solid #fc8181;
    color: #e53e3e;
    border-radius: 4px;
    width: 24px; height: 24px;
    cursor: pointer;
    font-size: 0.7rem;
    display: inline-flex; align-items: center; justify-content: center;
    opacity: 0.6;
    transition: opacity .15s, background .15s;
}
.bt-close-btn:hover { opacity: 1; background: #fff5f5; }

.bt-btn-close-all {
    background: #744210; color: #fef3c7; border: none;
    padding: 5px 12px; border-radius: 6px; font-size: 0.78rem; cursor: pointer;
    transition: opacity .15s;
}
.bt-btn-close-all:hover { opacity: .85; }

.bt-btn-resume {
    background: #1a4731; color: #6ee7b7; border: 1px solid #34d399;
    padding: 5px 12px; border-radius: 6px; font-size: 0.78rem; cursor: pointer;
    transition: opacity .15s;
}
.bt-btn-resume:hover { opacity: .85; }

.bt-pause-badge {
    display: inline-flex; align-items: center; gap: 4px;
    background: #78350f; color: #fde68a;
    padding: 2px 8px; border-radius: 10px; font-size: 0.75rem; font-weight: 600;
    border: 1px solid #d97706;
    animation: bt-pause-pulse 2s infinite;
}

@keyframes bt-pause-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.65; }
}

/* ── Статистика ─────────────────────────────────────────────────────── */
.bt-stats-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.bt-stat-card {
    flex: 1 1 100px;
    padding: 10px 14px;
    border-right: 1px solid rgba(255,255,255,0.06);
    min-width: 90px;
}
.bt-stat-card:last-child { border-right: none; }

/* ── Карточка live PnL ───────────────────────────────────────────────── */
.bt-stat-live-pnl { background: rgba(0,212,170,0.04); }

/* Мигающая зелёная точка «live» */
.bt-live-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #48bb78;
    margin-left: 4px;
    vertical-align: middle;
    animation: bt-dot-pulse 2s ease-in-out infinite;
}
@keyframes bt-dot-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.3; transform: scale(0.7); }
}
.bt-stat-label {
    font-size: 0.72rem;
    color: #7d8590;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 3px;
    white-space: nowrap;
}
.bt-stat-value {
    font-size: 1rem;
    font-weight: 700;
    color: #e2e8f0;
    font-family: 'JetBrains Mono', monospace;
}

/* ── График PnL бота внутри раздела ─────────────────────────────────── */
.bt-pnl-chart-card {
    margin: 16px 0;
    border-radius: 10px;
    overflow: hidden;
}

/* ── Таблица со скроллом ─────────────────────────────────────────────── */
.bt-table-scroll {
    max-height: 360px;
    overflow-y: auto;
    overflow-x: auto;
}
/* кастомный скроллбар */
.bt-table-scroll::-webkit-scrollbar       { width: 5px; height: 5px; }
.bt-table-scroll::-webkit-scrollbar-track { background: transparent; }
.bt-table-scroll::-webkit-scrollbar-thumb { background: rgba(0,212,170,0.25); border-radius: 3px; }
.bt-table-scroll::-webkit-scrollbar-thumb:hover { background: rgba(0,212,170,0.45); }

.bt-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
    min-width: 840px;
    table-layout: fixed;
}
.bt-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #1e2430;
    color: #7d8590;
    font-weight: 600;
    padding: 10px 8px;
    text-align: center;
    white-space: nowrap;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-right: 1px solid rgba(255,255,255,0.05);
    border-bottom: 1px solid rgba(255,255,255,0.07);
    cursor: pointer;
    user-select: none;
}
.bt-table thead th:last-child { border-right: none; }
.bt-table thead th:hover { background: #252d3d; color: #d1d9e0; }
.bt-table tbody tr {
    border-bottom: 1px solid rgba(255,255,255,0.04);
    transition: background 0.15s;
}
.bt-table tbody tr:hover td { background: rgba(0,212,170,0.05); cursor: pointer; }
.bt-table td {
    padding: 9px 8px;
    text-align: center;
    vertical-align: middle;
    color: #c9d1d9;
    background: #161b22;
}
.bt-num  { font-family: 'JetBrains Mono', monospace; font-size: 12px; font-variant-numeric: tabular-nums; }
.bt-time { font-size: 11px; color: #7d8590; white-space: nowrap; font-family: 'JetBrains Mono', monospace; }
.bt-sltp { white-space: nowrap; }
.bt-sl   { color: #e53e3e; }
.bt-tp   { color: #38a169; }
.bt-empty { padding: 36px !important; font-size: 13px; color: #484f58 !important; text-align: center; }

/* Первая ячейка (монета) — как в coins-table */
.bt-table td:first-child {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #e2e8f0;
    text-align: left;
    padding-left: 14px;
}

/* Глобальный класс приглушённого текста */
.muted { color: #484f58 !important; }

/* ── Направление ─────────────────────────────────────────────────────── */
.bt-dir       { font-weight: 700; font-size: 11px; padding: 2px 7px; border-radius: 4px; white-space: nowrap; }
.bt-long      { background: rgba(104,211,145,0.12); color: #68d391; }
.bt-short     { background: rgba(252,129,129,0.12); color: #fc8181; }

/* ── Режим ───────────────────────────────────────────────────────────── */
.bt-mode-live { background: rgba(252,129,129,0.12); color: #fc8181; font-weight: 700; font-size: 11px; padding: 2px 6px; border-radius: 4px; }
.bt-mode-test { background: rgba(255,255,255,0.07); color: #94a3b8; font-weight: 600; font-size: 11px; padding: 2px 6px; border-radius: 4px; }

/* ── Статус ──────────────────────────────────────────────────────────── */
.bt-status    { font-size: 11px; white-space: nowrap; }
.bt-st-open      { color: #3fb950; font-weight: 700; }
.bt-st-pending   { color: #e3b341; }
.bt-st-tp        { color: #3fb950; font-weight: 700; }
.bt-st-be        { color: #f59e0b; font-weight: 700; }
.bt-st-sl        { color: #f85149; font-weight: 700; }
.bt-st-cancelled { color: #7d8590; }
.bt-st-error     { color: #f0883e; }

/* Подсветка строк по статусу */
.bt-row-open    td:first-child { border-left: 3px solid #48bb78; }
.bt-row-pending td:first-child { border-left: 3px solid #ecc94b; }
.bt-row-tp      td:first-child { border-left: 3px solid #38a169; }
.bt-row-sl      td:first-child { border-left: 3px solid #e53e3e; }

/* ── PnL цвета ───────────────────────────────────────────────────────── */
.pnl-pos { color: #3fb950; font-weight: 700; }
.pnl-neg { color: #f85149; font-weight: 700; }

/* ── Bot history — колонка в таблице сигналов ───────────────────────── */
.bot-stat-cell { display: flex; flex-direction: column; align-items: center; line-height: 1.4; gap: 1px; }
.bot-stat-pos  { color: #3fb950; font-weight: 700; }
.bot-stat-neg  { color: #f85149; font-weight: 700; }
.bot-stat-neu  { color: #718096; font-weight: 500; }
.bot-stat-cell small { font-size: 0.72rem; }

/* ── Bot history — блок в модале ─────────────────────────────────────── */
.bot-modal-block {
    background: #0f1319;
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 12px;
}
.bot-modal-title {
    font-size: 11px;
    font-weight: 700;
    color: #00d4aa;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.bot-modal-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
}
.bot-modal-dir {
    font-size: 11px;
    font-weight: 700;
    width: 42px;
    color: #7d8590;
}
.bot-modal-bar-wrap {
    flex: 1;
    height: 6px;
    background: rgba(255,255,255,0.08);
    border-radius: 3px;
    overflow: hidden;
}
.bot-modal-bar     { height: 100%; border-radius: 3px; transition: width 0.4s; }
.bot-modal-bar-pos { background: #48bb78; }
.bot-modal-bar-neg { background: #fc8181; }
.bot-modal-bar-neu { background: #a0aec0; }
.bot-modal-val     { font-size: 0.78rem; min-width: 80px; text-align: right; }

/* ── Live PnL — кратковременная подсветка строки при обновлении ─────── */
@keyframes bt-live-flash {
    0%   { background-color: transparent; }
    30%  { background-color: rgba(66, 153, 225, 0.12); }
    100% { background-color: transparent; }
}
.bt-row-live-flash { animation: bt-live-flash 0.6s ease-out; }

/* ── Live цена и расстояние до входа (pending/open) ──────────────────── */
.bt-live-price {
    font-size: 0.72rem;
    color: #63b3ed;
    font-weight: 600;
    letter-spacing: 0.01em;
    font-variant-numeric: tabular-nums;
}
.bt-entry-dist {
    font-size: 0.68rem;
    color: #a0aec0;
    white-space: nowrap;
}
.bt-entry-dist.bt-dist-near {
    color: #f6ad55;
    font-weight: 700;
}

/* ── Прогресс-бар к TP/SL ────────────────────────────────────────────── */
.bt-progress-wrap {
    width: 100%;
    height: 3px;
    background: rgba(255,255,255,0.08);
    border-radius: 2px;
    margin-top: 4px;
    overflow: hidden;
}
.bt-progress-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.4s ease;
}
.bt-progress-fill.tp { background: #48bb78; }
.bt-progress-fill.sl { background: #fc8181; }
.bt-bar-pct {
    font-size: 0.68rem;
    display: block;
    text-align: right;
    line-height: 1.2;
}

/* ── Оценка ──────────────────────────────────────────────────────────── */
.bt-score {
    display: inline-block;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    font-weight: 700;
    font-size: 0.76rem;
    padding: 1px 7px;
    border-radius: 10px;
    min-width: 22px;
}

/* ── Футер ───────────────────────────────────────────────────────────── */
.bt-footer {
    padding: 8px 16px;
    font-size: 0.74rem;
    color: #a0aec0;
    text-align: right;
    border-top: 1px solid #f0f4f8;
}

/* ── Адаптив ─────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .bt-stats-row   { display: grid; grid-template-columns: 1fr 1fr; }
    .bt-stat-card   { border-right: none; border-bottom: 1px solid rgba(255,255,255,0.06); }
    .bt-table-scroll { max-height: 280px; }
}

/* ── Bot trades: поиск ──────────────────────────────────────────────── */
.bt-search-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.bt-search-icon {
    position: absolute;
    left: 8px;
    color: #7d8590;
    font-size: 11px;
    pointer-events: none;
}
.bt-search-input {
    padding: 4px 8px 4px 26px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    font-size: 12px;
    color: #d1d9e0;
    background: rgba(255,255,255,0.05);
    width: 150px;
    transition: border-color 0.2s, width 0.2s;
}
.bt-search-input::placeholder { color: #484f58; }
.bt-search-input:focus {
    outline: none;
    border-color: rgba(0,212,170,0.4);
    width: 200px;
}
.bt-highlight {
    background: rgba(0,212,170,0.2);
    color: #00d4aa;
    border-radius: 2px;
    padding: 0 1px;
}

/* ── Bot trades: сортировка ─────────────────────────────────────────── */
/* sortable уже встроен в .bt-table thead th, оставляем для совместимости */
.bt-sortable {
    cursor: pointer;
    user-select: none;
}
.bt-sortable:hover { background: #252d3d !important; color: #d1d9e0 !important; }
.bt-sortable i     { margin-left: 4px; opacity: 0.5; font-size: 10px; }

/* ══════════════════════════════════════════════════════════════════════
   МОИ СДЕЛКИ  (my-trades)
   ══════════════════════════════════════════════════════════════════════ */

/* Переопределяем overflow: hidden из .tabs-container — иначе тултипы обрезаются */
#my-trades-section-content {
    overflow: visible;
}

.mt-wrap {
    background: #fff;
    border-radius: 0 0 15px 15px;
    overflow: visible;
}

/* ── Сводная панель ──────────────────────────────────────────────────── */
.mt-summary {
    display: flex;
    align-items: center;
    gap: 14px;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 55%, #0f3460 100%);
    padding: 18px 22px;
}

.mt-summary-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    row-gap: 16px;
    min-width: 0;
}

.mt-summary-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 0 0 0 18px;
    border-left: 1px solid rgba(255,255,255,0.08);
    min-width: 0;
}

/* Первый элемент каждой строки — без левой границы */
.mt-summary-item:nth-child(4n+1) {
    padding-left: 0;
    border-left: none;
}

/* Разделитель между строками */
.mt-summary-item:nth-child(n+5) {
    padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.mt-summary-label {
    font-size: 10px;
    color: rgba(255,255,255,0.55);
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mt-summary-label i { margin-right: 4px; }

.mt-summary-value {
    font-size: 20px;
    font-weight: 800;
    color: #f8fafc;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.5px;
    line-height: 1;
    transition: color 0.3s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mt-summary-target { color: #93c5fd; }
.mt-summary-free   { color: #a5f3fc; }
.mt-sum-pos        { color: #4ade80 !important; }
.mt-sum-neg        { color: #f87171 !important; }
.mt-sum-warn       { color: #fbbf24 !important; }
.mt-sum-sl-ok      { color: #6ee7b7 !important; }

/* Скрываем старые элементы-разделители если остались */
.mt-summary-divider,
.mt-summary-spacer { display: none; }

/* ── Индикатор использования маржи ───────────────────────────────────── */
.mt-util-section {
    background: rgba(8,14,26,0.8);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding: 14px 22px;
}

.mt-util-top {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 9px;
}

.mt-util-icon {
    font-size: 11px;
    color: rgba(255,255,255,0.55);
}

.mt-util-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255,255,255,0.55);
}

.mt-util-pct {
    font-size: 20px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: #f8fafc;
    line-height: 1;
    margin-left: auto;
    transition: color 0.4s;
}

.mt-util-warn-text {
    font-size: 11px;
    font-weight: 500;
    color: rgba(255,255,255,0.55);
    transition: color 0.4s;
    white-space: nowrap;
}

/* Трек */
.mt-util-track {
    position: relative;
    height: 7px;
    background: rgba(255,255,255,0.07);
    border-radius: 4px;
    overflow: visible;
}

.mt-util-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease, background-color 0.4s;
    min-width: 0;
}

/* Цвет заливки по зоне */
.mt-util-fill.mt-util-safe   { background: linear-gradient(90deg, #16a34a, #4ade80); }
.mt-util-fill.mt-util-ok     { background: linear-gradient(90deg, #16a34a, #facc15); }
.mt-util-fill.mt-util-warn   { background: linear-gradient(90deg, #16a34a, #f97316); }
.mt-util-fill.mt-util-danger { background: linear-gradient(90deg, #f97316, #ef4444); }

/* Цвет процента по зоне */
.mt-util-pct.mt-util-safe    { color: #4ade80; }
.mt-util-pct.mt-util-ok      { color: #facc15; }
.mt-util-pct.mt-util-warn    { color: #f97316; }
.mt-util-pct.mt-util-danger  { color: #ef4444; }

/* Цвет предупреждения по зоне */
.mt-util-warn-text.mt-util-safe   { color: #4ade80; }
.mt-util-warn-text.mt-util-ok     { color: #facc15; }
.mt-util-warn-text.mt-util-warn   { color: #f97316; }
.mt-util-warn-text.mt-util-danger { color: #ef4444; }

/* Вертикальные маркеры зон */
.mt-util-zone-mark {
    position: absolute;
    top: -2px;
    bottom: -2px;
    width: 1px;
    background: rgba(255,255,255,0.2);
    transform: translateX(-50%);
    border-radius: 1px;
}

/* Подписи зон */
.mt-util-zone-labels {
    position: relative;
    height: 14px;
    margin-top: 4px;
}

.mt-util-zl {
    position: absolute;
    font-size: 9px;
    color: rgba(255,255,255,0.38);
    transform: translateX(-50%);
    font-variant-numeric: tabular-nums;
    line-height: 1;
    top: 0;
}

.mt-util-zl-start { transform: none; left: 0 !important; }
.mt-util-zl-end   { transform: none; right: 0; left: auto !important; }

/* ── Покупательная способность ───────────────────────────────────────── */
.mt-util-bp-title {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255,255,255,0.55);
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(255,255,255,0.07);
}
.mt-util-bp-title i { margin-right: 4px; }

.mt-util-bp-row {
    display: flex;
    align-items: flex-start;
    gap: 0;
    margin-top: 10px;
    flex-wrap: wrap;
    row-gap: 8px;
}

.mt-util-bp-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 0 20px 0 0;
}

.mt-util-bp-sep {
    width: 1px;
    align-self: stretch;
    min-height: 36px;
    background: rgba(255,255,255,0.08);
    margin: 0 20px 0 0;
    flex-shrink: 0;
}

.mt-util-bp-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255,255,255,0.55);
    white-space: nowrap;
}

.mt-util-bp-label i { margin-right: 3px; }

.mt-util-bp-val {
    font-size: 20px;
    font-weight: 800;
    color: #a5f3fc;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.5px;
    line-height: 1;
}

.mt-util-bp-free {
    font-size: 18px;
    font-weight: 700;
    color: #f8fafc;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.mt-util-bp-lev {
    font-size: 18px;
    font-weight: 700;
    color: #fbbf24;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.mt-util-bp-safe {
    font-size: 18px;
    font-weight: 700;
    color: #4ade80;
    font-variant-numeric: tabular-nums;
    line-height: 1;
    transition: color 0.3s;
}

.mt-util-bp-safe.mt-util-warn   { color: #f97316; }
.mt-util-bp-safe.mt-util-danger { color: #ef4444; }

.mt-util-bp-safe-sub {
    font-size: 10px;
    color: rgba(255,255,255,0.45);
    line-height: 1;
    margin-top: 1px;
}

.mt-util-bp-hint {
    flex: 1;
    font-size: 11px;
    color: rgba(255,255,255,0.45);
    align-self: flex-end;
    padding-bottom: 1px;
    text-align: right;
}

/* ══════════════════════════════════════════════════════════
   Риск-анализ портфеля (mt-risk-section)
   ══════════════════════════════════════════════════════════ */

.mt-risk-section {
    background: rgba(8,14,26,0.8);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding: 14px 22px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* Табы: Направление / Риск / Фандинг */
.mt-panel-tabs {
    background: rgba(8,14,26,0.8);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.mt-panel-tab-hd {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 12px 16px 0;
}
.mt-panel-pane {
    padding: 14px 22px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.mt-panel-pane--hidden {
    display: none;
}

/* Заголовок блока */
.mt-risk-block-title {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255,255,255,0.55);
    margin-bottom: -6px;
}
.mt-risk-block-title i { margin-right: 4px; }

/* ── [1] Метрики ─────────────────────────────────────────── */
.mt-risk-metrics {
    display: flex;
    align-items: flex-start;
    gap: 0;
    flex-wrap: wrap;
}

.mt-risk-metric {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.mt-risk-sep {
    width: 1px;
    align-self: stretch;
    min-height: 56px;
    background: rgba(255,255,255,0.07);
    margin-right: 20px;
    flex-shrink: 0;
}

.mt-risk-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255,255,255,0.5);
    white-space: nowrap;
}
.mt-risk-label i { margin-right: 3px; }

.mt-risk-val {
    font-size: 20px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.5px;
    line-height: 1;
    color: #f8fafc;
    transition: color 0.3s;
}

.mt-risk-sub {
    font-size: 11px;
    color: rgba(255,255,255,0.42);
    line-height: 1;
}

/* Цвета значений */
.mt-risk-val-safe   { color: #4ade80; }
.mt-risk-val-ok     { color: #facc15; }
.mt-risk-val-warn   { color: #f97316; }
.mt-risk-val-danger { color: #ef4444; }
.mt-risk-val-long   { color: #4ade80; }
.mt-risk-val-short  { color: #f87171; }

/* Текстовая метка зоны под значением */
.mt-risk-zone {
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    margin-top: 1px;
    min-height: 11px; /* резервируем строку даже если пусто */
}
.mt-risk-zone-placeholder { visibility: hidden; }
.mt-risk-zone-safe   { color: rgba(74,222,128,0.7); }
.mt-risk-zone-ok     { color: rgba(251,191,36,0.7); }
.mt-risk-zone-warn   { color: rgba(249,115,22,0.7); }
.mt-risk-zone-danger { color: rgba(239,68,68,0.8); }

/* ── [2] Шкала Long / Short ─────────────────────────────── */
.mt-risk-dir-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mt-risk-dir-side {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    min-width: 48px;
}

.mt-risk-dir-side--long  { align-items: flex-start; }
.mt-risk-dir-side--short { align-items: flex-end; }

.mt-risk-dir-label {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.8px;
    color: rgba(255,255,255,0.4);
}

.mt-risk-dir-pct {
    font-size: 16px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}
.mt-risk-dir-side--long  .mt-risk-dir-pct { color: #4ade80; }
.mt-risk-dir-side--short .mt-risk-dir-pct { color: #f87171; }

.mt-risk-dir-usd {
    font-size: 10px;
    color: rgba(255,255,255,0.3);
    font-variant-numeric: tabular-nums;
}

.mt-risk-dir-track {
    flex: 1;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    background: rgba(255,255,255,0.06);
}

.mt-risk-dir-long-fill {
    height: 100%;
    background: linear-gradient(90deg, #16a34a, #4ade80);
    border-radius: 4px 0 0 4px;
    transition: width 0.5s ease;
}

.mt-risk-dir-short-fill {
    height: 100%;
    background: linear-gradient(90deg, #f87171, #dc2626);
    border-radius: 0 4px 4px 0;
    transition: width 0.5s ease;
}

.mt-risk-net {
    font-size: 11px;
    font-weight: 600;
    text-align: center;
    margin-top: -6px;
}
.mt-risk-net-long     { color: #4ade80; }
.mt-risk-net-short    { color: #f87171; }
.mt-risk-net-balanced { color: rgba(255,255,255,0.4); }

/* ── Рекомендация хеджирования (правая колонка в mt-risk-metrics) ── */
.mt-hedge-rec {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 14px;
}
.mhr-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255,255,255,.5);
    white-space: nowrap;
}
.mhr-label i { margin-right: 4px; color: rgba(96,165,250,.75); }
.mhr-sep {
    color: rgba(255,255,255,.12);
    font-size: 11px;
}
.mhr-item {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
    min-width: 0;
}
.mhr-symbol {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    font-weight: 700;
    color: rgba(255,255,255,.75);
}
.mhr-loss {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    font-variant-numeric: tabular-nums;
    color: #f87171;
}
.mhr-dir {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    font-weight: 700;
    padding: 1px 4px;
    border-radius: 3px;
    letter-spacing: 0.5px;
}
.mhr-dir--short { background: rgba(239,68,68,.15);  color: #f87171; }
.mhr-dir--long  { background: rgba(34,197,94,.15);  color: #4ade80; }
.mhr-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    min-width: 0;
}
.mhr-chip {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    font-variant-numeric: tabular-nums;
    padding: 1px 6px;
    border-radius: 3px;
    background: rgba(255,255,255,.04);
    color: rgba(255,255,255,.35);
    border: 1px solid rgba(255,255,255,.07);
    white-space: nowrap;
}
.mhr-chip--main {
    background: rgba(96,165,250,.1);
    color: #93c5fd;
    border-color: rgba(96,165,250,.2);
    font-weight: 600;
}
.mhr-chip--warn {
    color: rgba(251,191,36,.55);
    border-color: rgba(251,191,36,.18);
}

/* ── Итоговая рекомендация хеджа ────────────────────────── */
.mt-hedge-summary {
    flex: 0 0 auto;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 8px;
    background: rgba(96,165,250,.05);
    border: 1px solid rgba(96,165,250,.12);
}
.mt-hedge-summary:empty { display: none; }
.mhs-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    color: rgba(96,165,250,.75);
}
.mhs-action {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    color: rgba(255,255,255,.72);
    line-height: 1;
    white-space: nowrap;
}
.mhs-action strong {
    font-size: 13px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.3px;
    color: #93c5fd;
    display: inline;
    line-height: 1;
    margin: 0;
}
.mhs-sub {
    font-size: 10px;
    color: rgba(255,255,255,.48);
}
.mhs-sub b { color: #4ade80; font-weight: 600; }

/* ── Симуляция P&L при движении цены ────────────────────────────────── */
.mt-hedge-sim {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,0.06);
    margin-top: 4px;
}
.mt-hs-titlerow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: -4px;
}
.mt-hs-title {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255,255,255,.4);
}
.mt-hs-title i { margin-right: 4px; color: rgba(96,165,250,.55); }
.mt-hs-now {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: 6px;
    border: 1px solid transparent;
    flex-shrink: 0;
}
.mt-hs-now .mt-hs-pct {
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.3px;
}
.mt-hs-now .mt-hs-val {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.mt-hs-block {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.mt-hs-head {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.mt-hs-head i { margin-right: 4px; }
.mt-hs-head--up { color: rgba(74,222,128,.7); }
.mt-hs-head--dn { color: rgba(248,113,113,.7); }
.mt-hs-row {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}
.mt-hs-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 4px 9px;
    border-radius: 6px;
    border: 1px solid transparent;
    gap: 2px;
    min-width: 50px;
}
.mt-hs-chip--pos {
    background: rgba(34,197,94,.07);
    border-color: rgba(34,197,94,.14);
}
.mt-hs-chip--neg {
    background: rgba(239,68,68,.07);
    border-color: rgba(239,68,68,.14);
}
.mt-hs-pct {
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.3px;
    color: rgba(255,255,255,.35);
}
.mt-hs-chip--pos .mt-hs-pct { color: rgba(74,222,128,.55); }
.mt-hs-chip--neg .mt-hs-pct { color: rgba(248,113,113,.55); }
.mt-hs-val {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.mt-hs-chip--pos .mt-hs-val { color: #4ade80; }
.mt-hs-chip--neg .mt-hs-val { color: #f87171; }

/* ── Рекомендации по хеджированию ───────────────────────────────────── */
.mt-hedge-advice {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,0.06);
    margin-top: 2px;
}
.mt-ha-header {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.mt-ha-bias {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 8px;
    border-radius: 4px;
}
.mt-ha-bias i { font-size: 9px; }
.mt-ha-bias--long    { background: rgba(74,222,128,.12);  color: #4ade80; }
.mt-ha-bias--short   { background: rgba(248,113,113,.12); color: #f87171; }
.mt-ha-bias--neutral { background: rgba(255,255,255,.07); color: rgba(255,255,255,.5); }
.mt-ha-exp {
    font-size: 10px;
    color: rgba(255,255,255,.4);
    font-variant-numeric: tabular-nums;
}
.mt-ha-balanced {
    font-size: 11px;
    color: #4ade80;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 7px;
    background: rgba(34,197,94,.06);
    border: 1px solid rgba(34,197,94,.12);
}
.mt-ha-balanced i { font-size: 13px; }

/* Карточки вариантов */
.mt-ha-cards {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: flex-start;
}
.mt-ha-card {
    flex: 1;
    min-width: 160px;
    background: rgba(255,255,255,.03);
    border: 1px solid rgba(255,255,255,.07);
    border-radius: 9px;
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 7px;
}
.mt-ha-card--main {
    background: rgba(96,165,250,.06);
    border-color: rgba(96,165,250,.2);
}
.mt-ha-card-head {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}
.mt-ha-cov {
    font-size: 12px;
    font-weight: 800;
    color: rgba(255,255,255,.85);
    letter-spacing: -0.3px;
}
.mt-ha-size {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: #93c5fd;
}
.mt-ha-star {
    font-size: 11px;
    color: #fbbf24;
    margin-left: auto;
}

/* Таблица сценариев */
.mt-ha-tbl {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.mt-ha-trow {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    font-variant-numeric: tabular-nums;
}
.mt-ha-sc {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.3px;
    width: 30px;
    flex-shrink: 0;
}
.mt-ha-sc--up { color: rgba(74,222,128,.7); }
.mt-ha-sc--dn { color: rgba(248,113,113,.7); }
.mt-ha-bef {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: rgba(255,255,255,.35);
    width: 46px;
    text-align: right;
    flex-shrink: 0;
}
.mt-ha-arr {
    color: rgba(255,255,255,.2);
    font-size: 9px;
    flex-shrink: 0;
}
.mt-ha-aft {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    font-weight: 700;
    width: 46px;
    flex-shrink: 0;
}
.mt-ha-aft--better { color: #4ade80; }
.mt-ha-aft--worse  { color: #f87171; }
.mt-ha-dlt {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    font-weight: 600;
    margin-left: auto;
}
.mt-ha-dlt--pos { color: rgba(74,222,128,.6); }
.mt-ha-dlt--neg { color: rgba(248,113,113,.6); }

/* ── Блок «Как свести убыток к нулю» ────────────────────────────────── */
.mt-hedge-neutral {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,0.06);
    margin-top: 2px;
}
.mt-hn-header {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255,255,255,.45);
}
.mt-hn-header i { margin-right: 5px; color: rgba(251,191,36,.6); }
.mt-hn-cur {
    font-size: 11px;
    color: rgba(255,255,255,.4);
}
.mt-hn-pos { color: #4ade80; font-weight: 700; }
.mt-hn-neg { color: #f87171; font-weight: 700; }
.mt-hn-size {
    font-family: 'JetBrains Mono', monospace;
    color: #93c5fd;
    font-size: 12px;
    font-weight: 800;
}

.mt-hn-option {
    background: rgba(255,255,255,.03);
    border: 1px solid rgba(255,255,255,.07);
    border-radius: 9px;
    padding: 9px 12px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.mt-hn-option--good {
    background: rgba(34,197,94,.06);
    border-color: rgba(34,197,94,.15);
    flex-direction: row;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: #4ade80;
}
.mt-hn-option--good i { font-size: 14px; }
.mt-hn-option--dim {
    opacity: 0.6;
}

.mt-hn-opt-head {
    display: flex;
    align-items: center;
    gap: 6px;
}
.mt-hn-opt-num {
    font-size: 10px;
    font-weight: 800;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgba(255,255,255,.1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: rgba(255,255,255,.6);
}
.mt-hn-opt-title {
    font-size: 11px;
    font-weight: 700;
    color: rgba(255,255,255,.8);
}
.mt-hn-opt-tag {
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    padding: 1px 5px;
    border-radius: 3px;
    margin-left: auto;
}
.mt-hn-tag--risk    { background: rgba(239,68,68,.12);   color: #f87171; }
.mt-hn-tag--ok      { background: rgba(34,197,94,.12);   color: #4ade80; }
.mt-hn-tag--na      { background: rgba(255,255,255,.07); color: rgba(255,255,255,.35); }

.mt-hn-opt-body {
    font-size: 11px;
    color: rgba(255,255,255,.6);
    line-height: 1.5;
}
.mt-hn-opt-body b { color: rgba(255,255,255,.85); }
.mt-hn-opt-detail {
    font-size: 10px;
    color: rgba(255,255,255,.38);
    line-height: 1.5;
    padding-top: 2px;
    border-top: 1px solid rgba(255,255,255,.05);
    margin-top: 2px;
}
.mt-hn-opt-detail b { color: rgba(255,255,255,.6); }
.mt-hn-opt-warn {
    font-size: 10px;
    color: rgba(251,191,36,.6);
}

/* ── Динамический хедж ───────────────────────────────────────────────── */
.mt-hedge-dynamic {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,0.06);
    margin-top: 2px;
}
.mt-hd-header {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255,255,255,.45);
}
.mt-hd-header i { margin-right: 5px; color: rgba(96,165,250,.6); }

.mt-hd-tabs {
    display: flex;
    align-items: center;
    gap: 4px;
}
.mt-hd-tab {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 5px;
    border: 1px solid rgba(255,255,255,.1);
    background: rgba(255,255,255,.04);
    color: rgba(255,255,255,.45);
    cursor: pointer;
    transition: all 0.15s;
}
.mt-hd-tab:hover { background: rgba(255,255,255,.08); color: rgba(255,255,255,.7); }
.mt-hd-tab--active {
    background: rgba(96,165,250,.15);
    border-color: rgba(96,165,250,.3);
    color: #93c5fd;
}
.mt-hd-tab-hint {
    font-size: 9px;
    color: rgba(255,255,255,.25);
    margin-left: 4px;
}

.mt-hd-section-title {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: rgba(255,255,255,.35);
    margin-top: 4px;
}
.mt-hd-section-title i { margin-right: 4px; }
.mt-hd-section-title--up i { color: rgba(74,222,128,.6); }
.mt-hd-section-title--dn i { color: rgba(248,113,113,.6); }

.mt-hd-grid {
    display: grid;
    grid-template-columns: 52px 1fr 1fr 52px;
    gap: 2px 8px;
    align-items: center;
}
.mt-hd-th {
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: rgba(255,255,255,.25);
    padding-bottom: 3px;
}
.mt-hd-sc {
    font-size: 10px;
    font-weight: 700;
    color: rgba(255,255,255,.55);
    font-variant-numeric: tabular-nums;
}
.mt-hd-val {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.mt-hd-diff {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    text-align: right;
}
.mt-hd-pos  { color: #4ade80; }
.mt-hd-neg  { color: #f87171; }
.mt-hd-dim  { color: rgba(255,255,255,.3); }
.mt-hd-be   { text-decoration: underline; text-decoration-color: rgba(74,222,128,.5); }

.mt-hd-be-line {
    font-size: 10px;
    color: rgba(255,255,255,.45);
    line-height: 1.5;
}
.mt-hd-be-line b { color: rgba(255,255,255,.75); }

/* Блок «что делать» */
.mt-hd-act {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
    padding: 5px 9px;
    border-radius: 7px;
    border: 1px solid rgba(255,255,255,.06);
    background: rgba(255,255,255,.02);
    font-size: 10px;
    color: rgba(255,255,255,.55);
}
.mt-hd-act--up { border-color: rgba(74,222,128,.12); background: rgba(74,222,128,.04); }
.mt-hd-act--dn { border-color: rgba(248,113,113,.12); background: rgba(248,113,113,.04); }
.mt-hd-act b {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: #93c5fd;
    font-weight: 700;
}
.mt-hd-act-dir {
    font-weight: 700;
    color: rgba(255,255,255,.7);
    white-space: nowrap;
}
.mt-hd-act-arrow { color: rgba(255,255,255,.2); }
.mt-hd-comm {
    margin-left: auto;
    font-size: 9px;
    color: rgba(248,113,113,.6);
    white-space: nowrap;
}

/* ── [3] Шкала фандинга 72ч ─────────────────────────────── */
.mt-ft-wrap {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mt-ft-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mt-ft-title {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255,255,255,0.55);
}
.mt-ft-title i { margin-right: 3px; }

.mt-ft-next {
    font-size: 11px;
    color: rgba(255,255,255,0.45);
    margin-left: 2px;
}

.mt-ft-per {
    font-size: 13px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    margin-left: auto;
}
.mt-ft-recv { color: #4ade80; }
.mt-ft-pay  { color: #f87171; }

/* Трек */
.mt-ft-timeline {
    padding: 0 0 4px;
}

.mt-ft-track-wrap {
    position: relative;
    height: 60px;
    margin: 0 0;
}

.mt-ft-line {
    position: absolute;
    top: 8px;
    left: 0;
    right: 0;
    height: 2px;
    border-radius: 1px;
    background: rgba(255,255,255,0.12);
}
.mt-ft-line-recv { background: linear-gradient(90deg, rgba(74,222,128,.15), rgba(74,222,128,.5)); }
.mt-ft-line-pay  { background: linear-gradient(90deg, rgba(248,113,113,.15), rgba(248,113,113,.5)); }

.mt-ft-point {
    position: absolute;
    top: 0;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}
.mt-ft-point:first-child { transform: none; }
.mt-ft-point:last-child  { transform: translateX(-100%); }

.mt-ft-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.15);
    background: #1e293b;
    transition: background 0.3s, border-color 0.3s;
    flex-shrink: 0;
    margin-top: 2px;
}
.mt-ft-dot-now   { background: rgba(255,255,255,0.3); border-color: rgba(255,255,255,0.4); }
.mt-ft-dot-recv  { background: #4ade80; border-color: #16a34a; }
.mt-ft-dot-pay   { background: #f87171; border-color: #dc2626; }
.mt-ft-dot-zero  { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.15); }

.mt-ft-pt-time {
    font-size: 11px;
    color: rgba(255,255,255,0.3);
    white-space: nowrap;
    line-height: 1;
}

.mt-ft-pt-val {
    font-size: 11px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    line-height: 1;
    color: rgba(255,255,255,0.5);
}

.mt-ft-pt-ev {
    font-size: 11px;
    color: rgba(255,255,255,0.2);
    white-space: nowrap;
    line-height: 1;
}

/* Разбивка по монетам */
.mt-ft-breakdown {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 2px;
}

.mt-ft-bk-item {
    font-size: 11px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    background: rgba(255,255,255,0.05);
    border-radius: 4px;
    padding: 2px 7px;
    white-space: nowrap;
}

.mt-refresh-btn {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.55);
    border-radius: 8px;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    font-size: 13px;
}
.mt-refresh-btn:hover {
    background: rgba(255,255,255,0.15);
    color: #fff;
}

/* ── Сетка карточек ──────────────────────────────────────────────────── */
.mt-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
    padding: 16px 20px;
    background: #0d1117;
    border-radius: 0 0 15px 15px;
    min-height: 80px;
}

.mt-empty {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 20px;
    color: #94a3b8;
    font-size: 14px;
    gap: 12px;
}
.mt-empty-icon {
    font-size: 36px;
    opacity: 0.35;
}

/* ── Карточка сделки ─────────────────────────────────────────────────── */
.mt-card {
    background: #161b22;
    border-radius: 14px;
    padding: 16px 16px 14px;
    border-left: 5px solid rgba(255,255,255,.08);
    box-shadow: 0 2px 8px rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,.08);
    transition: box-shadow 0.18s ease, transform 0.18s ease;
    position: relative;
    overflow: visible;
}
.mt-card:hover {
    box-shadow: 0 8px 20px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.13), 0 0 0 3px rgba(255,255,255,.03);
    transform: translateY(-2px);
}
.mt-card-long  { border-left-color: #22c55e; }
.mt-card-short { border-left-color: #ef4444; }
.mt-card-pending { opacity: 0.75; }
.mt-card-dragging {
    opacity: .3;
    transform: scale(.97);
    box-shadow: none !important;
    cursor: grabbing !important;
}
.mt-card-dragover {
    box-shadow: 0 0 0 2px #00d4aa, 0 8px 24px rgba(0,212,170,.15) !important;
    transform: translateY(-2px);
}
.mt-drag-handle {
    font-size: 11px;
    color: rgba(255,255,255,.15);
    margin-right: 7px;
    cursor: grab;
    flex-shrink: 0;
    transition: color .15s;
}
.mt-card:hover .mt-drag-handle { color: rgba(255,255,255,.4); }
.mt-card-dragging .mt-drag-handle { cursor: grabbing; }

/* Вспышка при обновлении тика */
@keyframes mt-flash {
    0%   { box-shadow: 0 2px 8px rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,.08), 0 0 0 0   rgba(99,179,237,0); }
    30%  { box-shadow: 0 2px 8px rgba(0,0,0,.5), 0 0 0 1px rgba(99,179,237,.6),   0 0 0 5px rgba(99,179,237,.25); }
    100% { box-shadow: 0 2px 8px rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,.08), 0 0 0 0   rgba(99,179,237,0); }
}
.mt-card-flash { animation: mt-flash 0.6s ease; }

/* Бейдж «Ожидание» */
.mt-pending-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 10px;
    font-weight: 700;
    background: rgba(251,191,36,0.15);
    color: #fbbf24;
    border: 1px solid rgba(251,191,36,0.3);
    border-radius: 5px;
    padding: 3px 7px;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

/* ── Заголовок карточки ──────────────────────────────────────────────── */
.mt-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    gap: 6px;
    min-width: 0;
}

.mt-card-symbol {
    font-size: 16px;
    font-weight: 900;
    color: #e2e8f0;
    letter-spacing: 0.2px;
    line-height: 1;
    white-space: nowrap;
    flex-shrink: 0;
}
.mt-usdt {
    font-size: 11px;
    font-weight: 600;
    color: #94a3b8;
    margin-left: 2px;
}

.mt-card-badges {
    display: flex;
    flex-wrap: nowrap;
    gap: 4px;
    justify-content: flex-end;
    align-items: center;
    flex-shrink: 0;
}

/* Бейджи */
.mt-badge {
    display: inline-flex;
    align-items: center;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 5px;
    letter-spacing: 0.4px;
    white-space: nowrap;
}
.mt-badge-long  { background: rgba(34,197,94,.15);  color: #4ade80; border: 1px solid rgba(34,197,94,.3); }
.mt-badge-short { background: rgba(239,68,68,.15);  color: #f87171; border: 1px solid rgba(239,68,68,.3); }
.mt-badge-cat   { background: rgba(255,255,255,.07); color: #94a3b8; font-weight: 600; }
.mt-badge-rr    { background: rgba(139,92,246,.15); color: #a78bfa; border: 1px solid rgba(139,92,246,.3); }

/* ── Живая цена ──────────────────────────────────────────────────────── */
.mt-card-price-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 10px;
}

.mt-card-price {
    font-size: 22px;
    font-weight: 800;
    color: #e2e8f0;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.5px;
    line-height: 1;
}

.mt-dist-text {
    font-size: 11px;
    color: #94a3b8;
    font-weight: 600;
}

/* ── Прогресс-бар ────────────────────────────────────────────────────── */
.mt-progress-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
}
.mt-progress-label {
    font-size: 11px;
    font-weight: 600;
    color: #94a3b8;
    letter-spacing: 0.2px;
    white-space: nowrap;
}
.mt-progress-track-wrap {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}
.mt-progress-track {
    width: 100%;
    height: 7px;
    background: rgba(255,255,255,.08);
    border-radius: 4px;
    overflow: hidden;
}
/* BEP-маркер — жёлтый тик поверх прогресс-бара */
.mt-bep-marker {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 2px;
    height: 14px;
    background: #fbbf24;
    border-radius: 1px;
    box-shadow: 0 0 5px rgba(251,191,36,0.7);
    pointer-events: none;
    z-index: 2;
}
/* SL-маркер на TP-баре — оранжевый тик (когда стоп сдвинут в прибыль) */
.mt-sl-tp-marker {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 2px;
    height: 14px;
    background: #fb923c;
    border-radius: 1px;
    box-shadow: 0 0 5px rgba(251,146,60,0.7);
    pointer-events: none;
    z-index: 2;
}
/* Маркеры grid-ордеров на прогресс-баре */
.mt-grid-marker {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 2px;
    height: 14px;
    background: #818cf8;
    border-radius: 1px;
    box-shadow: 0 0 5px rgba(129,140,248,0.6);
    pointer-events: none;
    z-index: 2;
}
.mt-grid-marker-label {
    position: absolute;
    bottom: calc(100% + 3px);
    left: 50%;
    transform: translateX(-50%);
    font-size: 11px;
    font-weight: 800;
    color: #818cf8;
    line-height: 1;
    white-space: nowrap;
}
/* Строка безубытка */
.mt-bep-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    margin-bottom: 10px;
    padding: 5px 8px;
    border-radius: 7px;
    transition: background 0.4s ease, border-color 0.4s ease;
    background: rgba(239,68,68,0.07);
    border: 1px solid rgba(239,68,68,0.25);
}
.mt-bep-row.mt-bep-row-reached {
    background: rgba(34,197,94,0.07);
    border-color: rgba(34,197,94,0.25);
}
.mt-bep-icon  { color: #94a3b8; font-size: 9px; flex-shrink: 0; }
.mt-bep-row.mt-bep-row-reached .mt-bep-icon { color: #4ade80; }
.mt-bep-label { color: #94a3b8; font-weight: 600; }
.mt-bep-price { color: #e2e8f0; font-weight: 700; font-variant-numeric: tabular-nums; }
.mt-bep-status { margin-left: auto; font-size: 10px; font-weight: 700; font-variant-numeric: tabular-nums; }
.mt-bep-reached { color: #4ade80; }
.mt-bep-pending { color: #f87171; }

/* Кнопка «→ SL» в строке безубытка */
.mt-bep-sl-btn {
    margin-left: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 5px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.02em;
    border: 1px solid rgba(148,163,184,0.25);
    background: rgba(148,163,184,0.08);
    color: #94a3b8;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    flex-shrink: 0;
}
.mt-bep-sl-btn:hover {
    background: rgba(148,163,184,0.18);
    color: #e2e8f0;
    border-color: rgba(148,163,184,0.45);
}
.mt-bep-sl-btn--active {
    background: rgba(34,197,94,0.12);
    color: #4ade80;
    border-color: rgba(34,197,94,0.4);
    animation: bep-btn-pulse 2s ease-in-out infinite;
}
.mt-bep-sl-btn--active:hover {
    background: rgba(34,197,94,0.22);
    color: #86efac;
    border-color: rgba(34,197,94,0.6);
}
@keyframes bep-btn-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); }
    50%       { box-shadow: 0 0 0 4px rgba(34,197,94,0.18); }
}

/* Цена в модалке подтверждения BEP */
.mt-bep-confirm-price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 10px;
    margin: 10px 0 2px;
    font-size: 13px;
    color: #94a3b8;
}
.mt-bep-confirm-price strong {
    font-size: 16px;
    font-weight: 800;
    color: #4ade80;
    font-variant-numeric: tabular-nums;
}
.mt-bep-confirm-entry {
    font-size: 11px;
    color: #64748b;
}
/* Зелёная кнопка OK в модалке */
.wl-confirm-btn--ok {
    flex: 1;
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: background 0.2s;
    background: rgba(34,197,94,0.18);
    color: #4ade80;
}
.wl-confirm-btn--ok:hover { background: rgba(34,197,94,0.28); }
/* Бейджи частичного закрытия */
.mt-partial-row {
    display: flex;
    align-items: stretch;
    gap: 6px;
}
.mt-partial-badge {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 5px 4px;
    border-radius: 7px;
    border: 1px solid transparent;
    font-variant-numeric: tabular-nums;
}
.mt-partial-badge.mt-pnl-pos {
    background: rgba(34,197,94,0.07);
    border-color: rgba(34,197,94,0.2);
}
.mt-partial-badge.mt-pnl-neg {
    background: rgba(239,68,68,0.07);
    border-color: rgba(239,68,68,0.2);
}
/* Кнопки закрытия позиции (25/50/75/100%) */
.mt-partial-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 5px 4px;
    border-radius: 7px;
    border: 1px solid rgba(239,68,68,0.2);
    font-variant-numeric: tabular-nums;
    cursor: pointer;
    background: rgba(239,68,68,0.07);
    transition: transform .12s, filter .12s, border-color .15s, background .15s;
}
.mt-partial-btn.mt-pnl-pos {
    background: rgba(34,197,94,0.08);
    border-color: rgba(34,197,94,0.25);
}
.mt-partial-btn.mt-pnl-neg {
    background: rgba(239,68,68,0.1);
    border-color: rgba(239,68,68,0.28);
}
.mt-partial-btn:hover { transform: translateY(-1px); filter: brightness(1.15); }
.mt-partial-btn:active { transform: translateY(0); filter: brightness(.95); }
.mt-partial-btn.mt-pnl-pos .mt-partial-usd { color: #22c55e; }
.mt-partial-btn.mt-pnl-neg .mt-partial-usd { color: #ef4444; }
/* CSS-тултип для кнопок закрытия (не зависит от браузерного title) */
.mt-tip { position: relative; z-index: 1; }
.mt-tip:hover { z-index: 9999; }
.mt-tip::after {
    content: attr(data-tip);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%) scale(.9);
    background: #1e293b;
    color: #e2e8f0;
    font-size: 11px;
    font-weight: 500;
    white-space: pre-line;
    text-align: center;
    max-width: 140px;
    line-height: 1.5;
    padding: 5px 9px;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,.08);
    pointer-events: none;
    opacity: 0;
    transition: opacity .15s, transform .15s;
    z-index: 9999;
}
.mt-tip:hover::after {
    opacity: 1;
    transform: translateX(-50%) scale(1);
}
/* Крайние кнопки — не даём тултипу выходить за границы */
.mt-partial-row .mt-tip:first-child::after {
    left: 0;
    transform: translateX(0) scale(.9);
}
.mt-partial-row .mt-tip:first-child:hover::after {
    transform: translateX(0) scale(1);
}
.mt-partial-row .mt-tip:last-child::after {
    left: auto;
    right: 0;
    transform: translateX(0) scale(.9);
}
.mt-partial-row .mt-tip:last-child:hover::after {
    transform: translateX(0) scale(1);
}
/* ─── Общий контейнер для секций Закрыть / Усреднить ───── */
.mt-action-section {
    margin-bottom: 10px;
    border-radius: 8px;
    overflow: visible;
    border: 1px solid transparent;
}
.mt-action-label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
    padding: 4px 8px 3px;
    border-radius: 7px 7px 0 0;
}
.mt-action-btns {
    display: flex;
    gap: 6px;
    padding: 0 6px 6px;
    /* Тултипы должны выходить за пределы контейнера */
    overflow: visible;
    position: relative;
    z-index: 0;
}
/* Секция «Закрыть» */
.mt-action-section--close {
    background: rgba(239,68,68,0.05);
    border-color: rgba(239,68,68,0.15);
}
.mt-action-section--close .mt-action-label {
    color: #94a3b8;
}
/* Секция «Усреднить» */
.mt-action-section--avg {
    background: rgba(99,102,241,0.06);
    border-color: rgba(99,102,241,0.18);
}
.mt-action-section--avg .mt-action-label {
    color: #6366f1;
}

/* Секция «Сетка» */
.mt-action-section--grid {
    background: rgba(129,140,248,0.05);
    border-color: rgba(129,140,248,0.15);
}
.mt-action-section--grid .mt-action-label {
    color: #818cf8;
}
.mt-grid-badge {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 5px 4px;
    border-radius: 7px;
    border: 1px solid transparent;
    font-variant-numeric: tabular-nums;
    cursor: default;
    transition: background .15s, border-color .15s;
}
/* Ожидает исполнения */
.mt-grid-badge--pending {
    background: rgba(129,140,248,.07);
    border-color: rgba(129,140,248,.2);
}
.mt-grid-badge--pending .mt-grid-badge-label { color: rgba(255,255,255,.4); }
.mt-grid-badge--pending .mt-grid-badge-price { color: rgba(255,255,255,.6); }
.mt-grid-badge--pending .mt-grid-badge-pnl   { color: rgba(255,255,255,.6); }
/* Цена достигнута / ордер исполнен */
.mt-grid-badge--fired {
    background: rgba(52,211,153,.1);
    border-color: rgba(52,211,153,.3);
}
.mt-grid-badge--fired .mt-grid-badge-label { color: rgba(52,211,153,.7); }
.mt-grid-badge--fired .mt-grid-badge-price { color: #34d399; }
.mt-grid-badge--fired .mt-grid-badge-pnl   { color: #34d399; font-weight: 700; }
/* Внутренние элементы */
.mt-grid-badge-price {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 500;
}
.mt-grid-badge-pnl {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 600;
}
.mt-grid-badge-sym {
    font-size: 9px;
    opacity: .7;
    margin-left: 1px;
}
/* Галочка «исполнен» и TP-лейбл — абсолютные поверх бейджа */
.mt-grid-badge {
    position: relative;
}
.mt-grid-badge-check {
    position: absolute;
    bottom: 3px;
    right: 4px;
    font-size: 8px;
    color: #34d399;
    opacity: .85;
}
/* TP-бейдж в ожидании: чуть ярче акцент */
.mt-grid-badge--tp {
    border-color: rgba(250,204,21,.2);
    background: rgba(250,204,21,.06);
}
.mt-grid-badge--tp .mt-grid-badge-price { color: rgba(250,204,21,.8); }
.mt-grid-badge--tp .mt-grid-badge-pnl   { color: rgba(250,204,21,.8); }
/* Номер лимитного ордера в левом верхнем углу */
.mt-grid-badge-num {
    position: absolute;
    top: 2px;
    left: 4px;
    font-size: 8px;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    line-height: 1;
    color: rgba(129,140,248,.55);
}
.mt-grid-badge--fired .mt-grid-badge-num { color: rgba(52,211,153,.6); }
/* Лейбл «TP» в левом верхнем углу */
.mt-grid-badge-tp-label {
    position: absolute;
    top: 2px;
    left: 4px;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: .3px;
    color: rgba(250,204,21,.55);
    line-height: 1;
}
.mt-grid-badge--fired .mt-grid-badge-tp-label { color: rgba(52,211,153,.6); }

/* Заглушка когда нет лимитников — высота = высоте одного бейджа */
.mt-grid-empty {
    min-height: 56px;
    align-items: center;
    justify-content: center;
}
.mt-grid-empty-hint {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.2px;
    color: rgba(255,255,255,.25);
}
/* Нет ни сетки, ни TP — подсвечиваем предупреждением */
.mt-action-section--grid-warn {
    background: rgba(251,191,36,.06);
    border-color: rgba(251,191,36,.2);
}
.mt-action-section--grid-warn .mt-action-label {
    color: rgba(251,191,36,.7);
}
.mt-action-section--grid-warn .mt-grid-empty-hint {
    color: rgba(251,191,36,.6);
}
.mt-action-section--grid-warn .mt-grid-empty-hint .fa-exclamation-triangle {
    font-size: 10px;
    opacity: .8;
}

/* ─── Строка усреднения (кнопки) ─────────────────────────── */
.mt-avg-row {
    display: flex;
    gap: 6px;
}
.mt-avg-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 5px 4px;
    border-radius: 7px;
    border: 1px solid rgba(99,102,241,0.3);
    background: rgba(99,102,241,0.08);
    font-variant-numeric: tabular-nums;
    cursor: pointer;
    transition: transform .12s, filter .12s, background .15s, border-color .15s;
}
.mt-avg-btn:hover {
    transform: translateY(-1px);
    background: rgba(99,102,241,0.16);
    border-color: rgba(99,102,241,0.5);
    filter: brightness(1.1);
}
.mt-avg-btn:active { transform: translateY(0); filter: brightness(.95); }
.mt-avg-pct {
    font-size: 9px;
    font-weight: 700;
    color: #818cf8;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.mt-avg-usd {
    font-size: 12px;
    font-weight: 800;
    color: #a5b4fc;
    line-height: 1.1;
}
.mt-avg-sym {
    font-size: 9px;
    font-weight: 600;
    opacity: 0.65;
    margin-left: 1px;
}
/* Тултип для avg-кнопок (крайние) */
.mt-avg-row .mt-tip:first-of-type::after { left: 0; transform: translateX(0) scale(.9); }
.mt-avg-row .mt-tip:first-of-type:hover::after { transform: translateX(0) scale(1); }
.mt-avg-row .mt-tip:last-child::after { left: auto; right: 0; transform: translateX(0) scale(.9); }
.mt-avg-row .mt-tip:last-child:hover::after { transform: translateX(0) scale(1); }

/* Модалка усреднения */
.mt-avg-modal .wl-confirm-title { color: #818cf8; }
.mt-avg-confirm-table {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 12px 0 4px;
    padding: 10px 12px;
    background: rgba(99,102,241,0.06);
    border: 1px solid rgba(99,102,241,0.15);
    border-radius: 8px;
}
.mt-avg-confirm-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 12px;
}
.mt-avg-confirm-key {
    color: #64748b;
    font-weight: 500;
}
.mt-avg-confirm-val {
    color: #e2e8f0;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.mt-avg-confirm-usd {
    color: #64748b;
    font-weight: 500;
    font-size: 11px;
}
.mt-avg-confirm-newavg { color: #818cf8; }
.mt-avg-confirm-fee    { color: #94a3b8; }

/* Кнопка «Усреднить» в модалке */
.wl-confirm-btn--avg {
    flex: 1;
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: background 0.2s;
    background: rgba(99,102,241,0.18);
    color: #818cf8;
}
.wl-confirm-btn--avg:hover { background: rgba(99,102,241,0.28); }

.mt-close-err {
    font-size: 11px;
    color: #f87171;
    margin-top: 8px;
    text-align: center;
    min-height: 14px;
    line-height: 1.4;
}
.mt-partial-pct {
    font-size: 9px;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.mt-partial-usd {
    font-size: 12px;
    font-weight: 800;
    line-height: 1.1;
}
.mt-partial-badge.mt-pnl-pos .mt-partial-usd { color: #22c55e; }
.mt-partial-badge.mt-pnl-neg .mt-partial-usd { color: #ef4444; }
.mt-partial-sym {
    font-size: 9px;
    font-weight: 600;
    opacity: 0.65;
    margin-left: 1px;
}
.mt-progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.35s ease;
    min-width: 2px;
}
.mt-fill-tp { background: linear-gradient(90deg, #86efac, #22c55e); }
.mt-fill-sl { background: linear-gradient(90deg, #fca5a5, #ef4444); }
.mt-progress-pct {
    font-size: 11px;
    font-weight: 700;
    min-width: 32px;
    text-align: right;
}

/* ── Уровни Вход / TP / SL ───────────────────────────────────────────── */
.mt-levels {
    display: flex;
    gap: 4px;
    margin-bottom: 14px;
}
.mt-level { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.mt-level-center { text-align: center; align-items: center; }
.mt-level-right  { text-align: right;  align-items: flex-end; }

.mt-level-label {
    font-size: 9px;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.mt-level-value {
    font-size: 12px;
    font-weight: 700;
    color: #c9d1d9;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.mt-level-tp { color: #3fb950; }
.mt-level-sl { color: #f85149; }
.mt-level-liq { color: #f97316; }
.mt-level-label-liq { color: #f97316; opacity: .8; }

/* ── Футер карточки ──────────────────────────────────────────────────── */
.mt-card-footer {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,.1);
    gap: 6px;
}

/* Строка фандинга */
.mt-funding-row {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 8px;
    margin: 6px 0 2px;
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(255,255,255,.07);
    border-radius: 6px;
    font-size: 11px;
}
.mt-funding-icon {
    font-size: 9px;
    color: rgba(255,255,255,.25);
    flex-shrink: 0;
}
.mt-funding-label {
    font-size: 10px;
    font-weight: 500;
    color: rgba(255,255,255,.35);
    flex-shrink: 0;
    margin-right: 2px;
}
.mt-fund-time {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: rgba(255,255,255,.45);
    flex-shrink: 0;
}
.mt-fund-sep {
    color: rgba(255,255,255,.18);
    font-size: 10px;
}
.mt-fund-rate {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    font-weight: 600;
    flex-shrink: 0;
}
.mt-fund-amt {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 700;
    margin-left: auto;
}
.mt-funding-pay  { color: #ff6b6b; }
.mt-funding-recv { color: #00d4aa; }


/* Время открытия позиции */
.mt-open-time {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 10px;
    padding-top: 7px;
    border-top: 1px solid rgba(255,255,255,.1);
}
.mt-open-time-icon {
    font-size: 9px;
    color: #7d8590;
    flex-shrink: 0;
}
.mt-open-time-rel {
    font-size: 10px;
    font-weight: 600;
    color: #7d8590;
    white-space: nowrap;
}
.mt-open-time-abs {
    font-size: 10px;
    color: #94a3b8;
    font-weight: 500;
    white-space: nowrap;
}

/* PnL */
.mt-pnl-block { display: flex; flex-direction: column; gap: 1px; }
.mt-pnl-roi {
    font-size: 10px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.3px;
    opacity: 0.65;
    line-height: 1;
}
.mt-pnl-pct {
    font-size: 16px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}
.mt-pnl-usd-row {
    display: flex;
    align-items: center;
    gap: 7px;
}
.mt-pnl-usd {
    font-size: 11px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    opacity: 0.85;
    white-space: nowrap;
}
.mt-pnl-net {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 11px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    padding-left: 7px;
    border-left: 1px solid rgba(255,255,255,.1);
    white-space: nowrap;
}
.mt-pnl-net-label {
    font-size: 8px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.55;
    margin-right: 1px;
}
.mt-pnl-pos { color: #3fb950; }
.mt-pnl-neg { color: #f85149; }

/* Цель */
.mt-target-block { text-align: center; }
.mt-target-label {
    display: block;
    font-size: 9px;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 3px;
}
.mt-target-val {
    font-size: 13px;
    font-weight: 700;
    color: #00d4aa;
    font-variant-numeric: tabular-nums;
}

/* Время */
.mt-time-block {
    display: flex;
    align-items: center;
    gap: 4px;
    text-align: right;
}
.mt-time-icon { font-size: 10px; color: #cbd5e1; }
.mt-time-val  { font-size: 11px; color: #94a3b8; font-weight: 500; white-space: nowrap; }

/* Объём позиции рядом с ценой */
.mt-card-qty {
    font-size: 11px;
    color: #94a3b8;
    font-weight: 600;
    align-self: flex-end;
    padding-bottom: 2px;
    white-space: nowrap;
}

/* Leverage badge */
.mt-badge-lev  { background: rgba(227,179,65,.12); color: #e3b341; }
/* Cross/Isolated badge */
.mt-badge-mode { background: rgba(255,255,255,.07); color: #7d8590; font-weight: 600; font-size: 10px; }

/* SL прогресс-бар */
.mt-progress-sl-wrap {
    margin-top: -6px;
    margin-bottom: 10px;
}
.mt-progress-sl-wrap .mt-progress-track {
    background: rgba(239,68,68,0.08);
}
.mt-progress-label-sl { color: #ef4444; }

/* Прогресс-бар без TP/SL */
.mt-progress-notp {
    justify-content: center;
    min-height: 16px;
}
.mt-progress-label-muted {
    font-size: 10px;
    color: #cbd5e1;
    font-style: italic;
}

/* Строка ликвидации */
.mt-liq-row {
    font-size: 11px;
    color: #94a3b8;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 5px;
}
.mt-liq-icon  { color: #fbbf24; font-size: 10px; }
.mt-liq-price { font-weight: 700; color: #ef4444; }

/* Блок размера позиции в футере */
.mt-pos-block { text-align: right; }
/* Кнопка сетки TP-ордеров */
.mt-grid-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 6px;
    background: rgba(99,102,241,.1);
    color: #818cf8;
    font-size: 11px;
    border: 1px solid rgba(99,102,241,.2);
    cursor: pointer;
    transition: background .15s, filter .15s, transform .12s;
    flex-shrink: 0;
    margin-left: 2px;
}
.mt-grid-btn:hover { background: rgba(99,102,241,.2); filter: brightness(1.15); transform: scale(1.08); }
.mt-grid-btn:active { transform: scale(.95); }
.mt-grid-pct { font-size: 10px; opacity: .65; margin-left: 2px; }

/* Секция «Сетка лимиток» (кнопки создания) */
.mt-action-section--new-grid {
    background: rgba(129,140,248,0.05);
    border-color: rgba(129,140,248,0.15);
}
.mt-action-section--new-grid .mt-action-label { color: #818cf8; }
.mt-newgrid-btn {
    flex: 1;
    padding: 5px 4px;
    border-radius: 7px;
    border: 1px solid rgba(129,140,248,0.25);
    background: rgba(129,140,248,0.08);
    color: #a5b4fc;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: transform .12s, filter .12s, background .15s, border-color .15s;
    white-space: nowrap;
}
.mt-newgrid-btn:hover {
    transform: translateY(-1px);
    background: rgba(129,140,248,0.18);
    border-color: rgba(129,140,248,0.5);
    filter: brightness(1.1);
}
.mt-newgrid-btn:active { transform: translateY(0); filter: brightness(.95); }
.mt-newgrid-btn--median {
    border-color: rgba(34,197,94,0.25);
    background: rgba(34,197,94,0.07);
    color: #4ade80;
}
.mt-newgrid-btn--median:hover {
    background: rgba(34,197,94,0.16);
    border-color: rgba(34,197,94,0.5);
}

/* Модал сетки */
.mt-grid-modal { min-width: 300px; max-width: 360px; }
.mt-grid-confirm-btn {
    flex: 1 1 0;
    min-width: 0;
    padding: 11px 12px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 6px;
    box-sizing: border-box;
    background: rgba(99,102,241,.15);
    color: #818cf8;
    border: 1px solid rgba(99,102,241,.3);
    transition: background .15s;
}
.mt-grid-confirm-btn:hover:not(:disabled) { background: rgba(99,102,241,.25); }
.mt-grid-confirm-btn:disabled { opacity: .5; cursor: not-allowed; }
.mt-grid-table { width: 100%; border-collapse: collapse; font-size: 12px; margin-top: 4px; }
.mt-grid-th { font-size: 10px; color: #94a3b8; font-weight: 600; padding: 4px 6px; text-align: left; border-bottom: 1px solid rgba(0,0,0,.06); }
.mt-grid-td { padding: 6px 6px; border-bottom: 1px solid rgba(0,0,0,.04); color: #334155; }
.mt-grid-price { font-weight: 700; font-variant-numeric: tabular-nums; }
.mt-grid-input-wrap { margin-bottom: 12px; text-align: left; }
.mt-grid-label { font-size: 10px; font-weight: 600; color: #94a3b8; display: block; margin-bottom: 4px; text-transform: uppercase; letter-spacing: .4px; }
.mt-grid-input { width: 100%; padding: 7px 10px; border-radius: 8px; border: 1px solid rgba(0,0,0,.1); font-size: 13px; background: #f8fafc; color: #1e293b; outline: none; box-sizing: border-box; }
.mt-grid-input:focus { border-color: #818cf8; box-shadow: 0 0 0 3px rgba(99,102,241,.12); }

.mt-bybit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 6px;
    background: #1a1a2e;
    color: #fff;
    font-size: 12px;
    font-weight: 900;
    font-family: Arial, sans-serif;
    text-decoration: none;
    border: none;
    transition: filter .15s, transform .12s;
    flex-shrink: 0;
    margin-left: 2px;
    line-height: 1;
    letter-spacing: -.5px;
}
.mt-bybit-btn:hover { filter: brightness(1.12); transform: scale(1.08); }
.mt-bybit-btn:active { transform: scale(.95); }
.mt-pos-label {
    display: block;
    font-size: 9px;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 3px;
}
.mt-pos-val {
    font-size: 13px;
    font-weight: 700;
    color: #475569;
    font-variant-numeric: tabular-nums;
}
.mt-fee-label {
    display: block;
    font-size: 9px;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 6px;
    margin-bottom: 2px;
}
.mt-fee-val {
    font-size: 12px;
    font-weight: 600;
    color: #f87171;
    font-variant-numeric: tabular-nums;
}
/* Тоггл тип входа (мейкер/тейкер) на карточке сделки */
.mt-entry-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    border-radius: 3px;
    font-size: 8px;
    font-weight: 800;
    cursor: pointer;
    margin-left: 4px;
    background: rgba(148,163,184,0.15);
    color: #94a3b8;
    border: 1px solid rgba(148,163,184,0.3);
    transition: all .15s;
    vertical-align: middle;
    user-select: none;
}
.mt-entry-toggle:hover {
    background: rgba(148,163,184,0.25);
    border-color: rgba(148,163,184,0.5);
}
.mt-entry-toggle--maker {
    background: rgba(129,140,248,0.15);
    color: #818cf8;
    border-color: rgba(129,140,248,0.3);
}
.mt-entry-toggle--maker:hover {
    background: rgba(129,140,248,0.25);
    border-color: rgba(129,140,248,0.5);
}
.bt-sort-active    { opacity: 1 !important; color: #fef08a; }

/* ══════════════════════════════════════════════════════════════════════
   ИСТОРИЯ СДЕЛОК  (trade-history)
   ══════════════════════════════════════════════════════════════════════ */

.th-wrap {
    background: #fff;
    border-radius: 0 0 15px 15px;
    overflow: hidden;
}

/* ── Сводная панель ──────────────────────────────────────────────────── */
.th-summary {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 55%, #1a1040 100%);
    padding: 22px 28px;
}

.th-summary-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 0 28px 0 0;
}

.th-summary-label {
    font-size: 11px;
    color: rgba(255,255,255,0.45);
    font-weight: 600;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    white-space: nowrap;
}
.th-summary-label i { margin-right: 5px; }

.th-summary-value {
    font-size: 24px;
    font-weight: 800;
    color: #f8fafc;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.5px;
    line-height: 1;
    transition: color 0.3s;
}

.th-summary-best { color: #86efac; }
.th-sum-pos      { color: #4ade80 !important; }
.th-sum-neg      { color: #f87171 !important; }
.th-sum-warn     { color: #fbbf24 !important; }

.th-summary-divider {
    width: 1px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    margin: 0 28px 0 0;
    align-self: center;
    flex-shrink: 0;
}

.th-summary-spacer { display: none; }

/* Блок с кнопками периода (два ряда) */
/* ── Блок управления периодом ────────────────────────────────────────── */
.th-period-block {
    display: flex;
    flex-direction: column;
    margin-left: auto;
    flex-shrink: 0;
    align-items: stretch;
    background: rgba(6, 10, 26, 0.75);
    border: 1px solid rgba(99, 102, 241, 0.18);
    border-radius: 10px;
    padding: 4px;
    gap: 0;
    backdrop-filter: blur(6px);
}

.th-period-wrap {
    display: flex;
    gap: 2px;
    align-items: center;
}

/* Второй ряд — кнопки растягиваются на всю ширину блока */
.th-period-wrap-db .th-period-btn {
    flex: 1;
    justify-content: center;
}

.th-period-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.38);
    border-radius: 6px;
    height: 26px;
    padding: 0 10px;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.025em;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.th-period-btn:hover {
    background: rgba(255, 255, 255, 0.07);
    color: rgba(255, 255, 255, 0.75);
}
.th-period-active {
    background: rgba(139, 92, 246, 0.22) !important;
    color: #c4b5fd !important;
    box-shadow: inset 0 0 0 1px rgba(139, 92, 246, 0.38);
}

/* Метка «БД» */
.th-period-db-label {
    font-size: 9px;
    font-weight: 700;
    color: rgba(165,180,252,0.5);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding-right: 2px;
}

/* Второй ряд — архивные периоды */
.th-period-db {
    color: rgba(165, 180, 252, 0.42);
}
.th-period-db:hover {
    background: rgba(99, 102, 241, 0.12);
    color: rgba(165, 180, 252, 0.85);
}
.th-period-db.th-period-active {
    background: rgba(99, 102, 241, 0.22) !important;
    color: #a5b4fc !important;
    box-shadow: inset 0 0 0 1px rgba(99, 102, 241, 0.4) !important;
}

/* Горизонтальный разделитель между рядами */
.th-period-hsep {
    height: 1px;
    background: rgba(99, 102, 241, 0.13);
    margin: 3px 4px;
}

/* Вертикальный разделитель перед кнопкой обновить */
.th-period-vsep {
    width: 1px;
    height: 14px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0 2px;
    flex-shrink: 0;
}

.th-refresh-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.32);
    border-radius: 6px;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, transform 0.4s ease;
    font-size: 11px;
    flex-shrink: 0;
}
.th-refresh-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.8);
    transform: rotate(180deg);
}

/* ── Сетка карточек ──────────────────────────────────────────────────── */
.th-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
    padding: 16px 20px;
    background: #161b22;
    min-height: 80px;
}

.th-empty {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 20px;
    color: #94a3b8;
    font-size: 14px;
    gap: 12px;
    text-align: center;
    line-height: 1.6;
}
.th-empty-icon { font-size: 34px; opacity: 0.3; }

/* ── Карточка закрытой сделки ────────────────────────────────────────── */
.th-card {
    background: #161b22;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,.3), 0 0 0 1px rgba(255,255,255,.05);
    cursor: pointer;
    transition: transform 0.14s ease, box-shadow 0.14s ease;
    display: flex;
    flex-direction: column;
}
.th-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,.35), 0 0 0 1px rgba(255,255,255,.08);
}
.th-card-win { box-shadow: 0 1px 3px rgba(0,0,0,.3), 0 0 0 1px rgba(34,197,94,0.2); }
.th-card-win:hover { box-shadow: 0 8px 24px rgba(34,197,94,0.15), 0 0 0 1px rgba(34,197,94,0.3); }
.th-card-loss { box-shadow: 0 1px 3px rgba(0,0,0,.3), 0 0 0 1px rgba(239,68,68,0.2); }
.th-card-loss:hover { box-shadow: 0 8px 24px rgba(239,68,68,0.15), 0 0 0 1px rgba(239,68,68,0.25); }

/* ── Тёмная шапка ───────────────────────────────────────────────────── */
.th-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 13px 9px;
    background: #0f172a;
    gap: 8px;
}
.th-card-long  .th-card-head { border-top: 2.5px solid #22c55e; }
.th-card-short .th-card-head { border-top: 2.5px solid #ef4444; }

.th-card-sym {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 17px;
    font-weight: 800;
    color: #f1f5f9;
    letter-spacing: 0.3px;
    line-height: 1;
}
.th-card-usdt {
    font-size: 11px;
    font-weight: 600;
    color: #475569;
    margin-left: 1px;
}
.th-card-head-right {
    display: flex;
    align-items: center;
    gap: 5px;
}
.th-lev {
    font-size: 10px;
    font-weight: 700;
    color: #f59e0b;
    background: rgba(245,158,11,0.15);
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: 0.2px;
}
.th-dir-badge {
    font-size: 10px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 5px;
    letter-spacing: 0.6px;
    white-space: nowrap;
}
.th-badge-long  { background: rgba(34,197,94,0.2);  color: #4ade80; }
.th-badge-short { background: rgba(239,68,68,0.18); color: #f87171; }

/* ── Тело карточки ──────────────────────────────────────────────────── */
.th-card-body {
    padding: 12px 13px 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

/* PnL */
.th-pnl-block {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
}
.th-pnl-main {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 32px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.5px;
    line-height: 1;
}
.th-pnl-curr {
    font-size: 16px;
    font-weight: 700;
    margin-left: 2px;
    opacity: 0.7;
}
.th-pnl-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}
.th-result-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}
.th-dot-win  { background: #22c55e; }
.th-dot-loss { background: #ef4444; }
.th-result-label {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.8px;
    line-height: 1;
}
.th-pnl-pct {
    font-size: 11px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    opacity: 0.85;
}
.th-pnl-pos { color: #3fb950; }
.th-pnl-neg { color: #f85149; }

/* Цены */
.th-prices-row {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 7px 10px;
    background: rgba(255,255,255,.05);
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,.07);
}
.th-price-col {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}
.th-price-col-right { align-items: flex-end; }
.th-plabel {
    font-size: 9px;
    font-weight: 700;
    color: #7d8590;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.th-pval {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: #c9d1d9;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    letter-spacing: 0.2px;
}
.th-price-divider {
    color: #484f58;
    font-size: 13px;
    padding: 0 8px;
    flex-shrink: 0;
    align-self: center;
}

/* Компактная мета-строка */
.th-compact-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #7d8590;
}
.th-cm-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
}
.th-cm-item i { font-size: 9px; color: #484f58; }
.th-cm-sep { color: #484f58; }

/* ── Футер ──────────────────────────────────────────────────────────── */
.th-card-foot {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 7px 13px 9px;
    border-top: 1px solid rgba(255,255,255,.06);
    background: #1e2430;
    margin-top: auto;
}
.th-qty-label {
    font-size: 11px;
    font-weight: 700;
    color: #7d8590;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.th-qty-sym { color: #484f58; font-weight: 600; }
.th-exit-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    white-space: nowrap;
    letter-spacing: 0.3px;
}
.th-exit-sl     { background: rgba(248,81,73,0.12);   color: #f85149; }
.th-exit-tp     { background: rgba(63,185,80,0.12);   color: #3fb950; }
.th-exit-лимит  { background: rgba(99,102,241,0.12);  color: #818cf8; }
.th-exit-выход  { background: rgba(255,255,255,.06);  color: #7d8590; }
.th-exit-manual { background: rgba(255,255,255,.06);  color: #7d8590; }
.th-exit-мkt    { background: rgba(255,255,255,.06);  color: #7d8590; }
.th-foot-gap { flex: 1; }
.th-elapsed {
    font-size: 10px;
    color: #94a3b8;
    font-weight: 500;
    white-space: nowrap;
}
/* legacy aliases used elsewhere */
.th-pnl-pos { color: #3fb950; }
.th-pnl-neg { color: #f85149; }
.th-time { font-size: 11px; color: #94a3b8; font-weight: 500; white-space: nowrap; }

/* ── Кнопка «Поделиться» на карточке ─────────────────────────────────── */
.th-share-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border: none;
    border-radius: 6px;
    background: rgba(255,255,255,.07);
    color: #7d8590;
    font-size: 11px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, transform 0.15s;
    line-height: 1;
}
.th-share-btn:hover {
    background: #6366f1;
    color: #fff;
    transform: scale(1.1);
}

/* ── Оверлей и модал шар-карточки ────────────────────────────────────── */
.th-share-overlay {
    position: fixed;
    inset: 0;
    z-index: 9000;
    background: rgba(2, 6, 23, 0.75);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: th-overlay-in 0.2s ease;
}
@keyframes th-overlay-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}
.th-share-modal {
    background: #1e293b;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 20px;
    padding: 20px;
    width: min(860px, 100%);
    box-shadow: 0 24px 60px rgba(0,0,0,0.5);
    animation: th-modal-in 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes th-modal-in {
    from { transform: scale(0.92) translateY(16px); opacity: 0; }
    to   { transform: scale(1)    translateY(0);    opacity: 1; }
}
.th-share-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}
.th-share-modal-title {
    font-size: 15px;
    font-weight: 700;
    color: #e2e8f0;
    display: flex;
    align-items: center;
    gap: 8px;
}
.th-share-modal-title i {
    color: #6366f1;
}
.th-share-close {
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 8px;
    background: rgba(255,255,255,0.06);
    color: #94a3b8;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s;
}
.th-share-close:hover {
    background: rgba(239,68,68,0.2);
    color: #f87171;
}
.th-share-canvas-wrap {
    border-radius: 16px;
    overflow: hidden;
    line-height: 0;
    box-shadow: 0 4px 24px rgba(0,0,0,0.4);
}
.th-share-canvas-wrap canvas {
    max-width: 100%;
    height: auto !important;
}
.th-share-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
    justify-content: center;
}
.th-share-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 24px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.15s, transform 0.15s;
}
.th-share-action-btn:hover {
    opacity: 0.85;
    transform: translateY(-1px);
}
.th-share-download {
    background: #6366f1;
    color: #fff;
}
.th-share-copy {
    background: rgba(255,255,255,0.08);
    color: #cbd5e1;
    transition: background 0.2s, color 0.2s;
}
.th-share-link {
    background: rgba(99,102,241,0.15);
    color: #a5b4fc;
    border: 1px solid rgba(99,102,241,0.35);
    transition: background 0.2s, color 0.2s;
}
.th-share-link:hover {
    background: rgba(99,102,241,0.3);
    color: #e0e7ff;
}

/* Блок с результирующей ссылкой */
.th-share-link-result {
    margin-top: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(34,197,94,0.08);
    border: 1px solid rgba(34,197,94,0.25);
    border-radius: 10px;
    padding: 10px 14px;
    animation: th-modal-in 0.2s ease;
}
.th-share-link-url {
    flex: 1;
    font-size: 12px;
    color: #86efac;
    word-break: break-all;
    text-decoration: none;
    font-weight: 500;
}
.th-share-link-url:hover { text-decoration: underline; }
.th-share-link-copy-btn {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 6px;
    background: rgba(255,255,255,0.06);
    color: #94a3b8;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s;
}
.th-share-link-copy-btn:hover {
    background: rgba(34,197,94,0.2);
    color: #4ade80;
}

/* ── Индикатор заметки на карточке ──────────────────────────────────── */
.th-note-indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #f59e0b;
    opacity: 0.85;
    transition: opacity 0.15s, transform 0.15s;
    flex-shrink: 0;
}
.th-note-indicator:hover { opacity: 1; transform: scale(1.15); }
.th-note-indicator-hidden { display: none !important; }
.th-ai-indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: #818cf8;
    opacity: 0.85;
    transition: opacity 0.15s, transform 0.15s;
    flex-shrink: 0;
}
.th-ai-indicator:hover { opacity: 1; transform: scale(1.15); }

/* ── Модал заметок ───────────────────────────────────────────────────── */
.th-note-overlay {
    position: fixed;
    inset: 0;
    background: rgba(2,8,20,0.65);
    backdrop-filter: blur(6px);
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: th-overlay-in 0.18s ease;
    padding: 12px;
    box-sizing: border-box;
}
@keyframes th-overlay-out {
    from { opacity: 1; }
    to   { opacity: 0; }
}
.th-note-modal {
    background: linear-gradient(145deg, #0d1117, #161b22);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 20px;
    width: 100%;
    max-width: 680px;
    max-height: 94vh;
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: 0 24px 80px rgba(0,0,0,0.6), 0 0 0 1px rgba(0,212,170,0.08);
    animation: th-modal-in 0.22s cubic-bezier(0.34,1.56,0.64,1);
    display: flex;
    flex-direction: column;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.12) transparent;
}
.th-note-modal::-webkit-scrollbar {
    width: 4px;
}
.th-note-modal::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 0 20px 20px 0;
}
.th-note-modal::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.12);
    border-radius: 4px;
}
.th-note-modal::-webkit-scrollbar-thumb:hover {
    background: rgba(0,212,170,0.4);
}

/* ── Хедер ───────────────────────────────────────────────────────────── */
.th-note-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    gap: 8px;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    background: linear-gradient(145deg, #0d1117, #161b22);
    z-index: 2;
}
.th-note-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    min-width: 0;
}
.th-note-sym {
    font-size: 17px;
    font-weight: 900;
    color: rgba(255,255,255,0.92);
    white-space: nowrap;
    letter-spacing: -0.3px;
}
.th-note-usdt {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255,255,255,0.35);
    margin-left: 2px;
}
.th-note-dir {
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 5px;
    white-space: nowrap;
}
.th-note-dir-long  { background: rgba(34,197,94,0.12); color: #4ade80; border: 1px solid rgba(34,197,94,0.25); }
.th-note-dir-short { background: rgba(239,68,68,0.10); color: #f87171; border: 1px solid rgba(239,68,68,0.22); }
.th-note-pnl {
    font-size: 15px;
    font-weight: 800;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
.th-note-pnl-pos { color: #4ade80; }
.th-note-pnl-neg { color: #f87171; }
.th-note-time {
    font-size: 11px;
    color: rgba(255,255,255,0.35);
    white-space: nowrap;
}
.th-note-close-btn {
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 8px;
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.5);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
    transition: background 0.15s, color 0.15s;
}
.th-note-close-btn:hover { background: rgba(239,68,68,0.15); color: #f87171; }

/* ── График сделки ───────────────────────────────────────────────────── */
.th-note-chart-section {
    flex-shrink: 0;
    padding: 10px 14px 14px;
    background: rgba(255,255,255,0.02);
    border-bottom: 1px solid rgba(255,255,255,0.07);
}
.th-note-chart-tf-bar {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    background: #0d1526;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px 10px 0 0;
}
.th-note-chart-tf-label {
    font-size: 10px;
    font-weight: 700;
    color: rgba(255,255,255,0.3);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-right: 2px;
}
.th-note-tf-btn {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.35);
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.th-note-tf-btn:hover { background: rgba(255,255,255,0.07); color: rgba(255,255,255,0.65); }
.th-note-tf-active {
    background: rgba(0,212,170,0.15) !important;
    border-color: rgba(0,212,170,0.4) !important;
    color: #00d4aa !important;
}
.th-note-chart-loading {
    height: 260px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: rgba(255,255,255,0.3);
    font-size: 13px;
    background: #0d1526;
    border-radius: 0 0 10px 10px;
}
.th-note-chart {
    display: none;
    height: 260px;
    overflow: hidden;
    border-radius: 0 0 10px 10px;
}
.th-note-chart > * {
    border-radius: 0 !important;
}

/* ── Тело ─────────────────────────────────────────────────────────────── */
.th-note-body {
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.th-note-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.th-note-label {
    font-size: 11px;
    font-weight: 700;
    color: rgba(255,255,255,0.4);
    display: flex;
    align-items: center;
    gap: 5px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.th-note-label i { color: #00d4aa; font-size: 11px; }
.th-note-ta {
    width: 100%;
    min-height: 88px;
    padding: 10px 12px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 9px;
    font-size: 13.5px;
    line-height: 1.6;
    color: rgba(255,255,255,0.85);
    background: rgba(255,255,255,0.04);
    resize: vertical;
    font-family: inherit;
    transition: border-color 0.15s, box-shadow 0.15s;
    box-sizing: border-box;
}
.th-note-ta:focus {
    outline: none;
    border-color: rgba(0,212,170,0.5);
    box-shadow: 0 0 0 3px rgba(0,212,170,0.1);
    background: rgba(255,255,255,0.06);
}
.th-note-ta::placeholder { color: rgba(255,255,255,0.2); }

/* ── Футер ───────────────────────────────────────────────────────────── */
.th-note-footer {
    padding: 12px 18px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-top: 1px solid rgba(255,255,255,0.07);
    flex-shrink: 0;
    background: transparent;
}
.th-note-save-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 20px;
    border: none;
    border-radius: 8px;
    background: #00d4aa;
    color: #0d1117;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s, box-shadow 0.15s;
}
.th-note-save-btn:hover { background: #00bfa0; box-shadow: 0 4px 14px rgba(0,212,170,0.3); }
.th-note-save-btn-done { background: #4ade80 !important; }
.th-note-cancel-btn {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 8px;
    background: transparent;
    color: rgba(255,255,255,0.5);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}
.th-note-cancel-btn:hover { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.2); color: rgba(255,255,255,0.75); }
.th-note-delete-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1px solid rgba(239,68,68,0.25);
    border-radius: 8px;
    background: transparent;
    color: #f87171;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    margin-left: auto;
    transition: background 0.15s, border-color 0.15s;
}
.th-note-delete-btn:hover { background: rgba(239,68,68,0.1); border-color: rgba(239,68,68,0.4); }

/* ── AI-анализ сделки ─────────────────────────────────────────────────────── */
.th-ai-comment-block {
    margin: 0 14px 14px;
    padding: 12px 14px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(0,212,170,0.15);
    border-radius: 10px;
    font-size: 12px;
}

.th-ai-comment-block.th-ai-loading-state {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    color: rgba(255,255,255,0.35);
}

.th-ai-spin-icon { font-size: 14px; }

.th-ai-header {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 10px;
}

.th-ai-robot-icon {
    width: 22px;
    height: 22px;
    background: rgba(0,212,170,0.12);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: #00d4aa;
    flex-shrink: 0;
}

.th-ai-title {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: rgba(255,255,255,0.35);
    flex: 1;
}

.th-ai-verdict-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 20px;
    flex-shrink: 0;
}

.th-ai-v-correct { background: rgba(34,197,94,0.12);  color: #4ade80; border: 1px solid rgba(34,197,94,0.25); }
.th-ai-v-maybe   { background: rgba(234,179,8,0.10);  color: #fbbf24; border: 1px solid rgba(234,179,8,0.25); }
.th-ai-v-neutral { background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.45); border: 1px solid rgba(255,255,255,0.1); }
.th-ai-v-wrong   { background: rgba(239,68,68,0.10);  color: #f87171; border: 1px solid rgba(239,68,68,0.22); }
.th-ai-v-profit  { background: rgba(251,191,36,0.10); color: #fbbf24; border: 1px solid rgba(251,191,36,0.22); }
.th-ai-v-ok      { background: rgba(34,197,94,0.12);  color: #4ade80; border: 1px solid rgba(34,197,94,0.25); }

.th-ai-stats-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 9px;
    flex-wrap: wrap;
}

.th-ai-stat-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.th-ai-stat-label {
    font-size: 10px;
    color: rgba(255,255,255,0.3);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.th-ai-stat-val {
    font-size: 12px;
    font-weight: 700;
    color: rgba(255,255,255,0.7);
}

.th-ai-stat-fav { color: #4ade80; }
.th-ai-stat-adv { color: #f87171; }

.th-ai-stat-meta {
    font-size: 10px;
    color: rgba(255,255,255,0.3);
}

.th-ai-stat-sep {
    color: rgba(255,255,255,0.15);
    font-size: 12px;
}

.th-ai-comment-text {
    font-size: 12.5px;
    color: rgba(255,255,255,0.65);
    line-height: 1.65;
    margin: 0 0 2px;
}

.th-ai-meta {
    font-size: 10px;
    color: rgba(255,255,255,0.25);
    margin-top: 7px;
}



/* ═══════════════════════════════════════════════════════════
   GOALS WIDGET — premium dark card
   ═══════════════════════════════════════════════════════════ */

#goals-widget-container { margin-bottom: 0; }

/* Root — стыкуется с секцией «Мои Сделки» снизу */
.gw-root {
    margin-top: 30px;
}

/* Основная карточка */
.gw-card {
    position: relative;
    overflow: hidden;
    background: linear-gradient(145deg, #0d1117 0%, #161b22 60%, #0d1117 100%);
    border-radius: 20px 20px 0 0;
    border-bottom: 2px solid #00d4aa;
    padding: 22px 28px 20px;
    box-shadow: 0 4px 32px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.06);
}

/* Сетчатая текстура */
.gw-grid-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
    background-size: 28px 28px;
    mask-image: radial-gradient(ellipse 90% 80% at 50% 0%, black 40%, transparent 100%);
}

/* ── Шапка ── */
.gw-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 22px;
}

.gw-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Пульсирующая точка — сигнализирует "live" */
.gw-pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #00d4aa;
    flex-shrink: 0;
    box-shadow: 0 0 0 0 rgba(0, 212, 170, .6);
    animation: gw-pulse 2.4s ease-in-out infinite;
}
@keyframes gw-pulse {
    0%, 100% { box-shadow: 0 0 0 0   rgba(0,212,170,.6); }
    50%       { box-shadow: 0 0 0 7px rgba(0,212,170,0);  }
}

.gw-eyebrow {
    display: block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .12em;
    color: rgba(255,255,255,.35);
    text-transform: uppercase;
    line-height: 1.2;
}

.gw-title {
    display: block;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    margin-top: 2px;
    letter-spacing: .01em;
}

.gw-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* Бейдж дней */
.gw-badge {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255,255,255,.5);
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(255,255,255,.1);
    padding: 3px 10px;
    border-radius: 20px;
    white-space: nowrap;
}
.gw-badge--warn { color: #f59e0b; border-color: rgba(245,158,11,.3); background: rgba(245,158,11,.08); }
.gw-badge--last { color: #ef4444; border-color: rgba(239,68,68,.3);  background: rgba(239,68,68,.08);  }

/* Иконки-кнопки */
.gw-icon-btn {
    width: 28px;
    height: 28px;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 7px;
    color: rgba(255,255,255,.4);
    font-size: 11px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .15s;
}
.gw-icon-btn:hover         { background: rgba(255,255,255,.12); color: #fff; }
.gw-icon-btn--del:hover    { background: rgba(239,68,68,.15); border-color: rgba(239,68,68,.3); color: #ef4444; }

/* ── Тело: кольца ── */
.gw-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 22px;
}

.gw-body-row {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0;
}

.gw-divider {
    width: 1px;
    height: 110px;
    background: linear-gradient(to bottom, transparent, rgba(255,255,255,.1), transparent);
    flex-shrink: 0;
    margin: 0 28px;
}

.gw-ring-wrap {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

/* SVG кольцо */
.gw-ring-container {
    position: relative;
    width: 96px;
    height: 96px;
    flex-shrink: 0;
}

.gw-ring-svg {
    width: 96px;
    height: 96px;
    transform: rotate(-90deg);
}

/* Фоновая дорожка */
.gw-ring-track {
    stroke: rgba(255,255,255,.07);
    stroke-width: 7;
}

/* Свечение (размытое) */
.gw-ring-glow {
    stroke-width: 10;
    stroke-linecap: round;
    opacity: .25;
    filter: blur(4px);
    stroke-dasharray: var(--c-total);
    stroke-dashoffset: var(--c-total);
    animation: gw-draw .9s cubic-bezier(.4,0,.2,1) .1s forwards;
}

/* Основное кольцо */
.gw-ring-fill {
    stroke-width: 7;
    stroke-linecap: round;
    stroke-dasharray: var(--c-total);
    stroke-dashoffset: var(--c-total);
    animation: gw-draw .9s cubic-bezier(.4,0,.2,1) .1s forwards;
}

@keyframes gw-draw {
    to { stroke-dashoffset: var(--c-offset); }
}

/* Центр кольца */
.gw-ring-inner {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gw-ring-num {
    font-family: 'JetBrains Mono', monospace;
    font-size: 17px;
    font-weight: 700;
    line-height: 1;
}
.gw-ring-num sup {
    font-size: 10px;
    font-weight: 600;
    vertical-align: super;
    opacity: .75;
}

/* Мета справа от кольца */
.gw-ring-meta {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.gw-ring-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .1em;
    color: rgba(255,255,255,.3);
    text-transform: uppercase;
}

.gw-ring-current {
    font-family: 'JetBrains Mono', monospace;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.1;
    white-space: nowrap;
}

.gw-ring-target {
    font-size: 11px;
    color: rgba(255,255,255,.3);
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* ── Таймлайн ── */
/* ── ROI-кольцо: слот прозрачен для flex-родителя ────────────────────────── */
#gw-roi-ring-slot {
    display: flex;
    flex-direction: column;
    gap: 14px;
    border-top: 1px solid rgba(255,255,255,.06);
    padding-top: 14px;
}
#gw-roi-ring-slot:empty { display: none; }

.gw-roi-row {
    display: flex;
    align-items: center;
    gap: 0;
}
.gw-roi-row .gw-ring-wrap {
    flex: 1;
    justify-content: center;
}

/* ── Табы: Цели / Риск / PnL / Аналитика ── */
.gw-tab-header {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.gw-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: transparent;
    border: 1px solid rgba(255,255,255,.1);
    color: rgba(255,255,255,.35);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 20px;
    cursor: pointer;
    transition: color .15s, border-color .15s, background .15s;
    font-family: inherit;
    line-height: 1.4;
}
.gw-tab-btn i {
    font-size: 9px;
    opacity: .75;
}
.gw-tab-btn:hover {
    color: rgba(255,255,255,.65);
    border-color: rgba(255,255,255,.22);
}
.gw-tab-btn--active {
    background: rgba(0,212,170,.1);
    border-color: rgba(0,212,170,.4);
    color: #00d4aa;
}
.gw-tab-btn--active i {
    opacity: 1;
}

.gw-tab-body {
    /* обёртка содержимого активного таба */
}

/* В табе «Цели» ряд колец отделён от таймлайна */
.gw-tab-body .gw-body-row {
    margin-bottom: 16px;
}

.gw-timeline {
    position: relative;
}

.gw-timeline-track {
    position: relative;
    height: 3px;
    background: rgba(255,255,255,.07);
    border-radius: 2px;
    overflow: visible;
    margin-bottom: 8px;
}

.gw-timeline-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: linear-gradient(90deg, rgba(0,212,170,.6), rgba(0,212,170,1));
    border-radius: 2px;
    transition: width .6s ease;
}

.gw-timeline-cursor {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 11px;
    height: 11px;
    background: #00d4aa;
    border: 2px solid #0d1117;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(0,212,170,.7);
}

.gw-timeline-labels {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: rgba(255,255,255,.25);
    letter-spacing: .02em;
}

.gw-timeline-mid {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: rgba(0,212,170,.6);
}

/* ── Пустое состояние ── */
.gw-card--empty {
    padding: 18px 28px;
}

.gw-empty-inner {
    display: flex;
    align-items: center;
    gap: 16px;
}

.gw-empty-ring {
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    opacity: .5;
}

.gw-empty-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

.gw-empty-hint {
    font-size: 13px;
    color: rgba(255,255,255,.25);
}

.gw-btn-new {
    background: rgba(0,212,170,.12);
    color: #00d4aa;
    border: 1px solid rgba(0,212,170,.3);
    border-radius: 9px;
    padding: 8px 18px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    transition: all .15s;
    flex-shrink: 0;
}
.gw-btn-new:hover {
    background: rgba(0,212,170,.22);
    box-shadow: 0 0 16px rgba(0,212,170,.2);
}

/* ═══════════════════════════════════════════════════════════
   GOALS MODAL
   ═══════════════════════════════════════════════════════════ */

.gm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.6);
    backdrop-filter: blur(4px);
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.gm-dialog {
    position: relative;
    overflow: hidden;
    background: linear-gradient(145deg, #0d1117, #161b22);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 20px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 24px 64px rgba(0,0,0,.5), 0 0 0 1px rgba(0,212,170,.1);
}

.gm-grid-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255,255,255,.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.02) 1px, transparent 1px);
    background-size: 24px 24px;
}

.gm-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px 16px;
    border-bottom: 1px solid rgba(255,255,255,.07);
}

.gm-header-title {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.gm-header-title i { color: #00d4aa; }

.gm-close {
    width: 28px;
    height: 28px;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 7px;
    color: rgba(255,255,255,.4);
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .15s;
}
.gm-close:hover { background: rgba(255,255,255,.12); color: #fff; }

.gm-body {
    padding: 20px 22px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.gm-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.gm-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .05em;
    color: rgba(255,255,255,.4);
    text-transform: uppercase;
}

.gm-opt { font-weight: 400; text-transform: none; color: rgba(255,255,255,.2); }
.gm-req { color: #00d4aa; }

.gm-input {
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 9px;
    padding: 10px 13px;
    font-size: 14px;
    color: #fff;
    outline: none;
    width: 100%;
    box-sizing: border-box;
    transition: border-color .15s, box-shadow .15s;
}
.gm-input::placeholder { color: rgba(255,255,255,.2); }
.gm-input:focus {
    border-color: rgba(0,212,170,.5);
    box-shadow: 0 0 0 3px rgba(0,212,170,.1);
}
.gm-input--mono { font-family: 'JetBrains Mono', monospace; font-size: 15px; }

/* Дата-пикер: убираем нативный цвет в webkit */
.gm-input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(.5);
    cursor: pointer;
}

.gm-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* Превью расчёта */
.gm-preview {
    background: rgba(0,212,170,.06);
    border: 1px solid rgba(0,212,170,.15);
    border-radius: 9px;
    padding: 10px 13px;
    min-height: 38px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.gm-preview-item {
    font-size: 12px;
    color: rgba(0,212,170,.8);
    display: flex;
    align-items: center;
    gap: 5px;
}

.gm-preview-daily {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    color: #00d4aa;
}

.gm-preview-sep { color: rgba(255,255,255,.15); }

.gm-error {
    background: rgba(239,68,68,.08);
    border: 1px solid rgba(239,68,68,.25);
    border-radius: 9px;
    padding: 9px 13px;
    font-size: 12px;
    color: #fca5a5;
}

.gm-footer {
    padding: 14px 22px 20px;
    display: flex;
    gap: 10px;
    border-top: 1px solid rgba(255,255,255,.07);
}

.gm-btn-save {
    background: rgba(0,212,170,.15);
    color: #00d4aa;
    border: 1px solid rgba(0,212,170,.35);
    border-radius: 9px;
    padding: 10px 22px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 7px;
    transition: all .15s;
}
.gm-btn-save:hover    { background: rgba(0,212,170,.25); box-shadow: 0 0 20px rgba(0,212,170,.2); }
.gm-btn-save:disabled { opacity: .5; cursor: not-allowed; }

.gm-btn-cancel {
    background: rgba(255,255,255,.05);
    color: rgba(255,255,255,.4);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 9px;
    padding: 10px 16px;
    font-size: 13px;
    cursor: pointer;
    transition: all .15s;
}
.gm-btn-cancel:hover { background: rgba(255,255,255,.09); color: rgba(255,255,255,.7); }

/* ═══════════════════════════════════════════════════════════
   ПРОФИЛЬ: блок цели
   ═══════════════════════════════════════════════════════════ */

.prf-goal-empty {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 0 8px;
    color: #aaa;
    font-size: 13px;
}

.prf-goal-info {
    margin-bottom: 12px;
}

.prf-goal-title {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: #333;
    margin-bottom: 8px;
}

.prf-goal-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 5px 0;
    border-bottom: 1px solid #f5f5f5;
    gap: 8px;
}

.prf-goal-label {
    font-size: 12px;
    color: #888;
    flex-shrink: 0;
}

.prf-goal-value {
    font-size: 13px;
    color: #333;
    font-weight: 500;
    text-align: right;
}

.prf-goal-pct {
    color: #667eea;
    font-weight: 700;
}

/* ── Адаптив ──────────────────────────────────────────── */
@media (max-width: 680px) {
    .gw-body      { flex-direction: column; gap: 18px; }
    .gw-ring-wrap { justify-content: flex-start; }
    .gm-row       { grid-template-columns: 1fr; }
    .gw-card      { padding: 18px 18px 16px; }
}

/* На мобильных: кольца в табе «Цели» — сетка 2×2, без вертикальных разделителей */
@media (max-width: 600px) {
    .gw-tab-body .gw-body-row {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 16px;
        justify-items: start;
    }
    .gw-tab-body .gw-body-row .gw-divider { display: none; }

    .gw-tab-body .gw-body-row .gw-ring-container,
    .gw-tab-body .gw-body-row .gw-ring-svg { width: 80px; height: 80px; }
    .gw-tab-body .gw-body-row .gw-ring-num     { font-size: 14px; }
    .gw-tab-body .gw-body-row .gw-ring-current { font-size: 17px; }
    .gw-tab-body .gw-body-row .gw-ring-target  { font-size: 10px; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   Калькулятор ликвидации — liqCalc
   ══════════════════════════════════════════════════════════════════════════ */

.liqc-card {
    position: relative;
    background: #080e1a;
    border: 1px solid rgba(255,255,255,.07);
    border-radius: 16px;
    padding: 24px 28px 28px;
    overflow: hidden;
    margin-bottom: 24px;
}

.liqc-grid-overlay {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(0,212,170,.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,212,170,.03) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
}

/* ── Long / Short toggle ───────────────────────────────────────── */
.liqc-dir-row {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
}

.liqc-dir-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 22px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,.1);
    background: rgba(255,255,255,.04);
    color: rgba(255,255,255,.35);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all .17s;
    font-family: inherit;
}
.liqc-dir-btn:hover { color: rgba(255,255,255,.65); }

.liqc-dir-btn--long.active {
    background: rgba(34,197,94,.12);
    border-color: rgba(34,197,94,.45);
    color: #22c55e;
    box-shadow: 0 0 18px rgba(34,197,94,.12);
}
.liqc-dir-btn--short.active {
    background: rgba(239,68,68,.12);
    border-color: rgba(239,68,68,.45);
    color: #ef4444;
    box-shadow: 0 0 18px rgba(239,68,68,.12);
}

/* ── Поля ввода ────────────────────────────────────────────────── */
.liqc-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px 28px;
    margin-bottom: 24px;
}

.liqc-field--leverage { grid-column: 1 / -1; }

.liqc-label {
    display: block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: rgba(255,255,255,.3);
    margin-bottom: 8px;
}

.liqc-label-badge {
    display: inline-block;
    background: rgba(0,212,170,.15);
    color: #00d4aa;
    border-radius: 6px;
    padding: 1px 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .02em;
    margin-left: 6px;
    font-family: 'JetBrains Mono', monospace;
}

.liqc-label-hint {
    font-size: 10px;
    font-weight: 400;
    color: rgba(255,255,255,.2);
    margin-left: 4px;
    text-transform: none;
    letter-spacing: 0;
}

.liqc-input-wrap {
    display: flex;
    align-items: center;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 10px;
    padding: 0 14px;
    height: 42px;
    transition: border-color .15s;
}
.liqc-input-wrap:focus-within {
    border-color: rgba(0,212,170,.5);
    background: rgba(0,212,170,.04);
}
.liqc-input-wrap--sm { max-width: 120px; }

.liqc-input {
    flex: 1;
    min-width: 0;
    background: none;
    border: none;
    outline: none;
    color: #fff;
    font-size: 15px;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
}
.liqc-input::placeholder { color: rgba(255,255,255,.2); }
.liqc-input[type=number]::-webkit-inner-spin-button,
.liqc-input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; }

.liqc-unit {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255,255,255,.25);
    letter-spacing: .05em;
    white-space: nowrap;
}

/* ── Слайдер плеча ─────────────────────────────────────────────── */
.liqc-leverage-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 8px;
}

.liqc-slider {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    border-radius: 2px;
    outline: none;
    cursor: pointer;
    background: linear-gradient(to right,
        #00d4aa 0%, #00d4aa var(--sl-fill, 7%),
        rgba(255,255,255,.1) var(--sl-fill, 7%), rgba(255,255,255,.1) 100%);
}
.liqc-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px; height: 18px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #00d4aa;
    box-shadow: 0 0 8px rgba(0,212,170,.4);
    cursor: pointer;
    transition: transform .12s;
}
.liqc-slider::-webkit-slider-thumb:hover { transform: scale(1.2); }
.liqc-slider::-moz-range-thumb {
    width: 18px; height: 18px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #00d4aa;
    cursor: pointer;
}

.liqc-slider-ticks {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: rgba(255,255,255,.2);
    padding: 0 2px;
}

/* ── Результаты ────────────────────────────────────────────────── */
.liqc-result-card {
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,.07);
    background: rgba(255,255,255,.03);
    overflow: hidden;
}

.liqc-result-card--long  { border-color: rgba(239,68,68,.2); }
.liqc-result-card--short { border-color: rgba(34,197,94,.2); }

.liqc-result-main {
    padding: 20px 22px 16px;
    border-bottom: 1px solid rgba(255,255,255,.06);
}

.liqc-result-main-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .1em;
    color: rgba(255,255,255,.3);
    text-transform: uppercase;
    margin-bottom: 6px;
}

.liqc-result-main-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 34px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 14px;
}

.liqc-result-dist {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}
.liqc-result-dist-label {
    font-size: 11px;
    color: rgba(255,255,255,.3);
}

.liqc-dist-bar {
    height: 4px;
    background: rgba(255,255,255,.07);
    border-radius: 2px;
    overflow: hidden;
}
.liqc-dist-fill {
    height: 100%;
    border-radius: 2px;
    width: 0;
    transition: width .35s cubic-bezier(.4,0,.2,1), background .3s;
}

.liqc-result-rows {
    display: flex;
    flex-direction: column;
}
.liqc-result-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 22px;
    border-bottom: 1px solid rgba(255,255,255,.04);
}
.liqc-result-row:last-child { border-bottom: none; }
.liqc-result-row-label {
    font-size: 12px;
    color: rgba(255,255,255,.35);
}

/* ── Значения ─────────────────────────────────────────────────── */
.liqc-val {
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    font-weight: 600;
    color: rgba(255,255,255,.75);
}
.liqc-val--mono { font-size: 13px; }
.liqc-val--red   { color: #ef4444; }
.liqc-val--green { color: #22c55e; }

/* ── Адаптив ───────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .liqc-fields { grid-template-columns: 1fr; gap: 14px; }
    .liqc-field--leverage { grid-column: 1; }
    .liqc-card { padding: 18px 16px 20px; }
    .liqc-result-main-value { font-size: 26px; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   Portfolio Insights — redesign
   ══════════════════════════════════════════════════════════════════════════ */

/* ── Обёртка ─────────────────────────────────────────────────────────────── */
.pi-wrap {
    background: #080e1a;
    border: 1px solid rgba(255,255,255,.07);
    border-radius: 14px;
    overflow: hidden;
}

/* ── Утилиты ────────────────────────────────────────────────────────────── */
.pi-pos     { color: #22c55e; }
.pi-neg     { color: #f87171; }
.pi-neutral { color: #f59e0b; }
.pi-dim     { color: #334155; }

/* ── Контрол-бар ─────────────────────────────────────────────────────────── */
.pi-control-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-bottom: 1px solid rgba(255,255,255,.05);
    background: rgba(255,255,255,.02);
    gap: 10px;
    flex-wrap: wrap;
}
.pi-tabs { display: flex; gap: 4px; }
.pi-tab {
    background: transparent;
    border: 1px solid rgba(255,255,255,.08);
    color: #475569;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    cursor: pointer;
    transition: all .18s;
    letter-spacing: .02em;
}
.pi-tab span { font-weight: 400; font-size: 10px; opacity: .7; }
.pi-tab:hover    { border-color: rgba(255,255,255,.2); color: #94a3b8; }
.pi-tab--active  {
    background: rgba(99,102,241,.18);
    border-color: rgba(99,102,241,.45);
    color: #a5b4fc;
}
.pi-control-right {
    display: flex;
    align-items: center;
    gap: 10px;
}
.pi-ts {
    font-size: 11px;
    color: #334155;
    font-family: 'JetBrains Mono', monospace;
    display: flex;
    align-items: center;
    gap: 5px;
}
.pi-ts i { color: #1e3a5f; font-size: 8px; }
.pi-btn-refresh {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(255,255,255,.09);
    color: #64748b;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all .18s;
}
.pi-btn-refresh:hover    { background: rgba(255,255,255,.09); color: #94a3b8; border-color: rgba(255,255,255,.16); }
.pi-btn-refresh:disabled { opacity: .4; cursor: not-allowed; }
.pi-btn-refresh i        { font-size: 11px; }

/* ── Стрип метрик ────────────────────────────────────────────────────────── */
.pi-stat-strip {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    border-bottom: 1px solid rgba(255,255,255,.04);
    gap: 0;
}
.pi-stat {
    flex: 1;
    text-align: center;
}
.pi-stat-val {
    font-family: 'JetBrains Mono', monospace;
    font-size: 18px;
    font-weight: 700;
    color: #e2e8f0;
    line-height: 1;
}
.pi-stat-label {
    font-size: 10px;
    color: #334155;
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-top: 4px;
}
.pi-stat-div {
    width: 1px;
    height: 28px;
    background: rgba(255,255,255,.05);
    flex-shrink: 0;
}

/* ── Сетка панелей ───────────────────────────────────────────────────────── */
.pi-panels { display: flex; flex-direction: column; gap: 1px; background: rgba(255,255,255,.04); }
.pi-panels-top    { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: rgba(255,255,255,.04); }
.pi-panels-bottom { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: rgba(255,255,255,.04); }

/* ── Базовая панель ──────────────────────────────────────────────────────── */
.pi-panel {
    background: #080e1a;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity .3s ease, transform .3s ease;
}
.pi-panel--visible {
    opacity: 1;
    transform: translateY(0);
}
.pi-panel--wide { grid-column: span 1; }

.pi-panel-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px 10px;
    border-bottom: 1px solid rgba(255,255,255,.04);
}
.pi-panel-icon {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
}
.pi-panel-meta  { flex: 1; min-width: 0; }
.pi-panel-title {
    font-size: 12px;
    font-weight: 700;
    color: #cbd5e1;
    line-height: 1.2;
}
.pi-panel-sub {
    font-size: 10px;
    color: #334155;
    margin-top: 1px;
    font-family: 'JetBrains Mono', monospace;
}
.pi-panel-body {
    padding: 10px 14px 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.pi-panel-kpi {
    font-family: 'JetBrains Mono', monospace;
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}
.pi-panel-kpi span { font-size: 11px; opacity: .7; margin-left: 1px; }

/* ── Цветовые акценты панелей (левая полоска) ──────────────────────────── */
.pi-panel--amber { border-left: 2px solid rgba(245,158,11,.5); }
.pi-panel--amber .pi-panel-icon { background: rgba(245,158,11,.12); color: #f59e0b; }
.pi-panel--red   { border-left: 2px solid rgba(248,113,113,.5); }
.pi-panel--red   .pi-panel-icon { background: rgba(248,113,113,.1); color: #f87171; }
.pi-panel--blue  { border-left: 2px solid rgba(96,165,250,.4); }
.pi-panel--blue  .pi-panel-icon { background: rgba(96,165,250,.1); color: #60a5fa; }
.pi-panel--gold  { border-left: 2px solid rgba(251,191,36,.4); }
.pi-panel--gold  .pi-panel-icon { background: rgba(251,191,36,.1); color: #fbbf24; }
.pi-panel--purple{ border-left: 2px solid rgba(167,139,250,.4); }
.pi-panel--purple .pi-panel-icon { background: rgba(167,139,250,.1); color: #a78bfa; }

/* ── Строки примеров (ранний выход / SL) ────────────────────────────────── */
.pi-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 0;
    border-bottom: 1px solid rgba(255,255,255,.03);
    font-size: 11px;
}
.pi-row:last-child { border-bottom: none; }
.pi-row-sym  {
    font-weight: 700;
    color: #94a3b8;
    font-size: 11px;
    min-width: 52px;
    font-family: 'JetBrains Mono', monospace;
}
.pi-row-dir {
    font-size: 9px;
    font-weight: 800;
    padding: 1px 4px;
    border-radius: 3px;
    flex-shrink: 0;
}
.pi-dir-buy  { background: rgba(34,197,94,.15);  color: #22c55e; }
.pi-dir-sell { background: rgba(248,113,113,.13); color: #f87171; }
.pi-row-pnl  {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    font-size: 11px;
    min-width: 52px;
    text-align: right;
}
.pi-row-hint { color: #334155; font-size: 10px; font-family: 'JetBrains Mono', monospace; }
.pi-row-lost {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 700;
    color: #f87171;
    margin-left: auto;
    background: rgba(248,113,113,.08);
    border: 1px solid rgba(248,113,113,.2);
    border-radius: 4px;
    padding: 0 5px;
}
.pi-empty-row {
    font-size: 11px;
    color: #334155;
    padding: 6px 0;
}

/* ── Long vs Short ──────────────────────────────────────────────────────── */
.pi-vs {
    display: flex;
    gap: 0;
    align-items: stretch;
    margin-bottom: 10px;
}
.pi-vs-side {
    flex: 1;
    padding: 6px 8px;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,.05);
    background: rgba(255,255,255,.02);
    transition: border-color .2s;
}
.pi-vs-side:first-child { margin-right: 6px; }
.pi-vs-winner {
    border-color: rgba(255,255,255,.12);
    background: rgba(255,255,255,.04);
}
.pi-vs-label {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    margin-bottom: 4px;
}
.pi-vs-num {
    font-family: 'JetBrains Mono', monospace;
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 4px;
}
.pi-vs-row {
    display: flex;
    gap: 4px;
    font-size: 10px;
    color: #475569;
    align-items: center;
    font-family: 'JetBrains Mono', monospace;
}
.pi-vs-div { display: none; }
.pi-vs-bar {
    display: flex;
    height: 3px;
    border-radius: 2px;
    overflow: hidden;
    background: rgba(255,255,255,.04);
    margin-bottom: 4px;
}
.pi-vs-bar-long  { background: rgba(34,197,94,.6);  transition: width .5s ease; }
.pi-vs-bar-short { background: rgba(248,113,113,.6); transition: width .5s ease; }
.pi-vs-bar-labels {
    display: flex;
    justify-content: space-between;
    font-size: 9px;
    color: #334155;
    font-family: 'JetBrains Mono', monospace;
}

/* ── Монеты ─────────────────────────────────────────────────────────────── */
.pi-sym-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
.pi-col-head {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #334155;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 5px;
}
.pi-col-sub {
    font-size: 10px;
    color: #475569;
    margin-top: -4px;
    margin-bottom: 6px;
    font-weight: 400;
}
.pi-sym-row {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 0;
    border-bottom: 1px solid rgba(255,255,255,.03);
    font-size: 11px;
}
.pi-sym-row:last-child { border-bottom: none; }
.pi-sym-rank {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    font-weight: 700;
    width: 22px;
    text-align: center;
    flex-shrink: 0;
}
.pi-sym-rank--good { color: #334155; }
.pi-sym-rank--bad  { color: #4b2020; }
.pi-sym-name {
    font-weight: 700;
    color: #94a3b8;
    min-width: 46px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
}
.pi-sym-bar-wrap {
    flex: 1;
    height: 3px;
    background: rgba(255,255,255,.04);
    border-radius: 2px;
    overflow: hidden;
}
.pi-sym-bar {
    height: 100%;
    border-radius: 2px;
    transition: width .4s ease;
}
.pi-sym-bar--pos { background: rgba(34,197,94,.5); }
.pi-sym-bar--neg { background: rgba(248,113,113,.5); }
.pi-sym-wr  { font-size: 10px; color: #475569; min-width: 32px; text-align: right; font-family: 'JetBrains Mono', monospace; }
.pi-sym-pnl {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: 11px;
    min-width: 52px;
    text-align: right;
}

/* ── Тепловая карта часов ────────────────────────────────────────────────── */
.pi-hour-badges {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-left: auto;
    align-items: flex-end;
}
.pi-hour-badge {
    font-size: 10px;
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
    padding: 2px 7px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}
.pi-hour-badge--best  { background: rgba(34,197,94,.1);  color: #22c55e; border: 1px solid rgba(34,197,94,.2); }
.pi-hour-badge--worst { background: rgba(248,113,113,.1); color: #f87171; border: 1px solid rgba(248,113,113,.2); }

.pi-hmap { display: flex; flex-direction: column; gap: 3px; }
.pi-hrow { display: grid; grid-template-columns: repeat(12, 1fr); gap: 3px; }

.pi-hcell {
    background: rgba(255,255,255,.04);
    border-radius: 5px;
    padding: 5px 3px 4px;
    text-align: center;
    cursor: default;
    position: relative;
    transition: transform .12s, box-shadow .12s;
    min-height: 52px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
}
.pi-hcell:hover {
    transform: scale(1.06);
    z-index: 5;
    box-shadow: 0 4px 16px rgba(0,0,0,.4);
}
.pi-hcell--empty { opacity: .35; }
.pi-hcell--best  { outline: 1px solid rgba(34,197,94,.5); }
.pi-hcell--worst { outline: 1px solid rgba(248,113,113,.5); }

.pi-hcell-h   { display: block; font-size: 9px;  font-weight: 700; color: rgba(255,255,255,.5); font-family: 'JetBrains Mono', monospace; }
.pi-hcell-wr  { display: block; font-size: 9px;  color: rgba(255,255,255,.4); }
.pi-hcell-pnl { display: block; font-size: 9px;  font-weight: 700; color: rgba(255,255,255,.8); font-family: 'JetBrains Mono', monospace; }

/* ── Состояния (ошибка, пусто) ────────────────────────────────────────────── */
.pi-state-msg {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px 16px;
    color: #334155;
    font-size: 13px;
}
.pi-state-msg i { font-size: 18px; flex-shrink: 0; }

/* ── Скелетон ─────────────────────────────────────────────────────────────── */
.pi-sk-strip {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255,255,255,.04);
}
.pi-sk-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: rgba(255,255,255,.04);
}
.pi-sk-block,
.pi-sk-card {
    background: #080e1a;
    position: relative;
    overflow: hidden;
}
.pi-sk-card { height: 160px; }
.pi-sk-block::after,
.pi-sk-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,.03) 50%, transparent 100%);
    animation: pi-shimmer 1.8s infinite;
}
@keyframes pi-shimmer {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* ── Адаптив ─────────────────────────────────────────────────────────────── */
@media (max-width: 960px) {
    .pi-panels-top    { grid-template-columns: 1fr 1fr; }
    .pi-panels-bottom { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .pi-panels-top    { grid-template-columns: 1fr; }
    .pi-panels-bottom { grid-template-columns: 1fr; }
    .pi-sym-cols      { grid-template-columns: 1fr; }
    .pi-stat-val      { font-size: 15px; }
    .pi-hrow          { grid-template-columns: repeat(8, 1fr); }
}

/* ═══════════════════════════════════════════════════════════════
   WATCHLIST — Список наблюдения
   ═══════════════════════════════════════════════════════════════ */

/* Переопределяем overflow: hidden из .tabs-container */
#watchlist-container {
  overflow: visible;
}

/* Тулбар: сортировка + кнопка добавить */
.wl-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px 8px;
  flex-wrap: wrap;
}
.wl-sort-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.03);
  color: rgba(255,255,255,.35);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
}
.wl-sort-btn:hover { background: rgba(255,255,255,.07); color: rgba(255,255,255,.7); }
.wl-sort-btn.active { background: rgba(0,212,170,.1); color: #00d4aa; border-color: rgba(0,212,170,.22); }
.wl-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 8px;
  border: 1px solid rgba(0,212,170,.25);
  background: rgba(0,212,170,.08);
  color: #00d4aa;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all .15s;
  margin-left: auto;
}
.wl-add-btn:hover { background: rgba(0,212,170,.16); }

/* Сетка карточек */
.wl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
  padding: 16px;
  overflow: visible;
}
.wl-empty {
  width: 100%;
  text-align: center;
  padding: 32px 20px;
  color: rgba(255,255,255,.2);
  font-size: 13px;
}

/* ── Карточка (аналог th-card) ── */
.wl-card {
  border-radius: 14px;
  background: #161b22;
  box-shadow: 0 1px 3px rgba(0,0,0,.3), 0 0 0 1px rgba(255,255,255,.05);
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease;
  cursor: pointer;
  position: relative;
  display: flex;
  flex-direction: column;
}
.wl-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,.35), 0 0 0 1px rgba(255,255,255,.08);
}
/* Drag & Drop состояния */
.wl-card-dragging {
  opacity: .35;
  transform: scale(.97);
  box-shadow: none !important;
  cursor: grabbing !important;
}
.wl-card-dragover {
  box-shadow: 0 0 0 2px #00d4aa, 0 6px 20px rgba(0,212,170,.15) !important;
  transform: translateY(-2px);
}
.wl-drag-handle {
  font-size: 11px;
  color: rgba(255,255,255,.2);
  margin-right: 7px;
  cursor: grab;
  flex-shrink: 0;
  transition: color .15s;
}
.wl-card:hover .wl-drag-handle { color: rgba(255,255,255,.45); }
.wl-card-dragging .wl-drag-handle { cursor: grabbing; }

/* Шапка карточки */
.wl-card-head {
  background: #0f172a;
  padding: 9px 11px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 2.5px solid transparent;
}
.wl-card-long .wl-card-head  { border-top-color: #22c55e; }
.wl-card-short .wl-card-head { border-top-color: #ef4444; }

/* Тикер */
.wl-sym {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  font-size: 16px;
  color: #fff;
  letter-spacing: .02em;
  line-height: 1;
}
.wl-sym-usdt {
  font-size: 10px;
  color: rgba(255,255,255,.35);
  font-weight: 600;
  margin-left: 1px;
}

/* Бейдж направления */
.wl-dir-badge {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 6px;
}
.wl-badge-long  { background: rgba(34,197,94,.2);  color: #4ade80; }
.wl-badge-short { background: rgba(239,68,68,.18); color: #f87171; }

/* Тело карточки */
.wl-card-body {
  padding: 10px 11px 8px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
}

/* Текущая цена */
.wl-price {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: #e2e8f0;
  letter-spacing: .01em;
  line-height: 1.1;
}

/* Δ от добавления */
.wl-delta {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  font-size: 22px;
  line-height: 1;
}
.wl-delta-pos  { color: #3fb950; }
.wl-delta-neg  { color: #f85149; }
.wl-delta-zero { color: #7d8590; }

/* Строка 24h + funding */
.wl-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  margin-top: 2px;
}
.wl-meta-item {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  color: #7d8590;
}
.wl-meta-item i { font-size: 9px; opacity: .7; }
.wl-meta-val     { font-weight: 600; }
.wl-meta-val-pos { color: #3fb950; }
.wl-meta-val-neg { color: #f85149; }

/* Футер карточки */
.wl-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 11px 7px;
  border-top: 1px solid rgba(255,255,255,.06);
  background: #1e2430;
  gap: 4px;
  margin-top: auto;
}
.wl-added-at {
  font-size: 9px;
  color: #94a3b8;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wl-goto-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 9px;
  font-weight: 700;
  color: #00d4aa;
  background: rgba(0,212,170,.08);
  border: 1px solid rgba(0,212,170,.2);
  border-radius: 5px;
  padding: 2px 6px;
  cursor: pointer;
  transition: background .12s;
  white-space: nowrap;
}
.wl-goto-btn:hover { background: rgba(0,212,170,.18); }
.wl-del-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
  border-radius: 6px;
  border: none;
  background: rgba(239,68,68,.07);
  color: #f87171;
  font-size: 10px;
  cursor: pointer;
  transition: background .12s;
  flex-shrink: 0;
}
.wl-del-btn:hover { background: rgba(239,68,68,.18); }
.wl-edit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
  border-radius: 6px;
  border: none;
  background: rgba(96,165,250,.07);
  color: #60a5fa;
  font-size: 10px;
  cursor: pointer;
  transition: background .12s;
  flex-shrink: 0;
}
.wl-edit-btn:hover { background: rgba(96,165,250,.18); }
.wl-pin-indicator {
  font-size: 9px;
  color: #f59e0b;
  flex-shrink: 0;
}

/* WS-индикатор статуса */
.wl-ws-dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #94a3b8;
  margin-left: 6px;
  vertical-align: middle;
  transition: background .3s;
}
.wl-ws-dot--ok  { background: #22c55e; box-shadow: 0 0 0 2px rgba(34,197,94,.15); }
.wl-ws-dot--err { background: #f87171; }

/* ── Модал добавления монеты ── */
.wl-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(4px);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.wl-modal {
  background: #0d1117;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 24px 64px rgba(0,0,0,.5);
  overflow: hidden;
}
.wl-modal-head {
  padding: 18px 20px 14px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.wl-modal-title {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
}
.wl-modal-close {
  width: 30px; height: 30px;
  border-radius: 8px;
  border: none;
  background: rgba(255,255,255,.07);
  color: rgba(255,255,255,.4);
  font-size: 13px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .15s;
}
.wl-modal-close:hover { background: rgba(255,255,255,.14); color: #fff; }
.wl-modal-body { padding: 16px 20px 20px; }

/* Поиск */
.wl-search-wrap {
  position: relative;
  margin-bottom: 12px;
}
.wl-search-wrap i {
  position: absolute;
  left: 12px; top: 50%;
  transform: translateY(-50%);
  color: rgba(255,255,255,.2);
  font-size: 13px;
  pointer-events: none;
}
.wl-search {
  width: 100%;
  padding: 10px 12px 10px 36px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px;
  color: #fff;
  font-size: 13px;
  outline: none;
  box-sizing: border-box;
  transition: border-color .15s;
}
.wl-search:focus { border-color: rgba(0,212,170,.4); }
.wl-search::placeholder { color: rgba(255,255,255,.2); }

/* Список символов */
.wl-sym-list {
  max-height: 220px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.07) transparent;
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 10px;
  margin-bottom: 14px;
}
.wl-sym-row {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  cursor: pointer;
  border-bottom: 1px solid rgba(255,255,255,.04);
  transition: background .1s;
  gap: 8px;
}
.wl-sym-row:last-child { border-bottom: none; }
.wl-sym-row:hover { background: rgba(255,255,255,.04); }
.wl-sym-row.selected { background: rgba(0,212,170,.07); }
.wl-sym-row-name {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: #fff;
  flex: 1;
}
.wl-sym-row-base { font-size: 11px; color: rgba(255,255,255,.25); }
.wl-sym-row-check {
  color: #00d4aa;
  font-size: 12px;
  opacity: 0;
  transition: opacity .1s;
}
.wl-sym-row.selected .wl-sym-row-check { opacity: 1; }

/* Направление */
.wl-dir-wrap {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}
.wl-dir-opt {
  flex: 1;
  padding: 9px 0;
  border-radius: 10px;
  border: 1.5px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.03);
  color: rgba(255,255,255,.3);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  cursor: pointer;
  text-align: center;
  transition: all .15s;
}
.wl-dir-opt.sel-long  { background: rgba(34,197,94,.1);  color: #4ade80;  border-color: rgba(34,197,94,.3);  }
.wl-dir-opt.sel-short { background: rgba(239,68,68,.1);  color: #f87171;  border-color: rgba(239,68,68,.28); }

/* Кнопка добавить */
.wl-submit-btn {
  width: 100%;
  padding: 11px;
  border-radius: 10px;
  border: none;
  background: rgba(0,212,170,.12);
  color: #00d4aa;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s;
}
.wl-submit-btn:hover:not(:disabled) { background: rgba(0,212,170,.22); }
.wl-submit-btn:disabled { opacity: .4; cursor: not-allowed; }

.wl-modal-err {
  font-size: 12px;
  color: #f87171;
  margin-top: 8px;
  min-height: 16px;
  text-align: center;
}

/* ── Модал подтверждения удаления ── */
.wl-confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(6px);
  z-index: 4000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity .18s ease;
}
.wl-confirm-overlay--in { opacity: 1; }

.wl-confirm-modal {
  background: #0d1117;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 18px;
  padding: 32px 28px 24px;
  width: 100%;
  max-width: 320px;
  text-align: center;
  box-shadow: 0 32px 80px rgba(0,0,0,.6);
  transform: translateY(10px);
  transition: transform .18s ease;
}
.wl-confirm-overlay--in .wl-confirm-modal { transform: translateY(0); }

.wl-confirm-icon {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: rgba(239,68,68,.1);
  border: 1px solid rgba(239,68,68,.2);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
  font-size: 20px;
  color: #f87171;
}

.wl-confirm-title {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}

.wl-confirm-sub {
  font-size: 13px;
  color: rgba(255,255,255,.35);
  margin-bottom: 24px;
  line-height: 1.5;
}
.wl-confirm-sym {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  font-size: 15px;
  color: rgba(255,255,255,.75);
  display: inline-block;
  margin-right: 4px;
}

.wl-confirm-actions {
  display: flex;
  gap: 10px;
  width: 100%;
}
.wl-confirm-btn {
  flex: 1;
  padding: 11px 0;
  border-radius: 10px;
  border: none;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all .15s;
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.wl-confirm-btn--cancel {
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.45);
  border: 1px solid rgba(255,255,255,.08);
}
.wl-confirm-btn--cancel:hover { background: rgba(255,255,255,.1); color: rgba(255,255,255,.7); }
.wl-confirm-btn--del {
  background: rgba(239,68,68,.12);
  color: #f87171;
  border: 1px solid rgba(239,68,68,.25);
}
.wl-confirm-btn--del:hover { background: rgba(239,68,68,.22); }
.wl-confirm-btn:disabled { opacity: .5; cursor: not-allowed; }

/* ── Эмулятор сетапов: блок R:R / профит / убыток ─────────────────────── */
.wl-setup-block {
    border-top: 1px solid rgba(255,255,255,.06);
    padding: 8px 11px 6px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    background: rgba(255,255,255,.03);
}
.wl-setup-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
}
.wl-setup-label {
    font-size: 9px;
    font-weight: 600;
    color: #7d8590;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    white-space: nowrap;
}
.wl-setup-val {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: #c9d1d9;
    font-variant-numeric: tabular-nums;
}
.wl-setup-val-pos     { color: #3fb950; }
.wl-setup-val-neg     { color: #f85149; }
.wl-setup-val-neutral { color: #7d8590; }
.wl-setup-divider {
    height: 1px;
    background: rgba(255,255,255,.06);
    margin: 2px 0;
}

/* ── Поля ввода в модале ────────────────────────────────────────────────── */
.wl-modal-section-title {
    font-size: 10px;
    font-weight: 700;
    color: rgba(255,255,255,.3);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin: 14px 0 8px;
}
.wl-modal-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 8px;
}
.wl-modal-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.wl-modal-field-label {
    font-size: 10px;
    font-weight: 600;
    color: rgba(255,255,255,.35);
    letter-spacing: 0.3px;
}
.wl-modal-field-input {
    width: 100%;
    padding: 8px 10px;
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 8px;
    color: #fff;
    font-size: 13px;
    outline: none;
    box-sizing: border-box;
    transition: border-color .15s;
    font-variant-numeric: tabular-nums;
}
.wl-modal-field-input:focus { border-color: rgba(0,212,170,.4); }
.wl-modal-field-input::placeholder { color: rgba(255,255,255,.15); }
.wl-modal-field--full { grid-column: 1 / -1; }

/* R:R preview под полями */
.wl-rr-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 7px 10px;
    background: rgba(0,212,170,.06);
    border: 1px solid rgba(0,212,170,.15);
    border-radius: 8px;
    margin-bottom: 14px;
    min-height: 32px;
}
.wl-rr-preview-label {
    font-size: 10px;
    font-weight: 600;
    color: rgba(255,255,255,.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.wl-rr-preview-val {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 18px;
    font-weight: 800;
    color: #00d4aa;
    font-variant-numeric: tabular-nums;
}
.wl-rr-preview-empty {
    font-size: 11px;
    color: rgba(255,255,255,.2);
}


/* ═══════════════════════════════════════════════════════════
   SAVED SETUPS — Список сохранённых сетапов
   ═══════════════════════════════════════════════════════════ */

.wl-save-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: 8px;
    border: 1px solid rgba(99,102,241,.3);
    background: rgba(99,102,241,.08);
    color: #818cf8;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: all .15s;
    white-space: nowrap;
}
.wl-save-btn:hover:not(:disabled) { background: rgba(99,102,241,.16); }
.wl-save-btn:disabled { opacity: .35; cursor: not-allowed; }

.wl-save-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    backdrop-filter: blur(4px);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.wl-save-modal {
    background: #0d1117;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 16px;
    width: 100%;
    max-width: 400px;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(0,0,0,.5);
}
.wl-save-modal-head {
    padding: 16px 18px 12px;
    border-bottom: 1px solid rgba(255,255,255,.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.wl-save-modal-title { font-size: 14px; font-weight: 700; color: #fff; }
.wl-save-modal-body  { padding: 16px 18px 18px; }
.wl-save-name-label  { font-size: 10px; font-weight: 600; color: rgba(255,255,255,.35); letter-spacing: .3px; margin-bottom: 6px; }
.wl-save-name-input {
    width: 100%;
    padding: 10px 12px;
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 10px;
    color: #fff;
    font-size: 14px;
    outline: none;
    box-sizing: border-box;
    transition: border-color .15s;
    margin-bottom: 12px;
}
.wl-save-name-input:focus { border-color: rgba(99,102,241,.45); }
.wl-save-name-input::placeholder { color: rgba(255,255,255,.18); }
.wl-save-coins-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 14px;
    padding: 8px 10px;
    background: rgba(255,255,255,.03);
    border: 1px solid rgba(255,255,255,.06);
    border-radius: 8px;
    min-height: 36px;
}
.wl-save-preview-label { font-size: 10px; color: rgba(255,255,255,.25); width: 100%; margin-bottom: 4px; }
.wl-save-submit-btn {
    width: 100%;
    padding: 10px;
    border-radius: 10px;
    border: none;
    background: rgba(99,102,241,.15);
    color: #818cf8;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s;
}
.wl-save-submit-btn:hover:not(:disabled) { background: rgba(99,102,241,.25); }
.wl-save-submit-btn:disabled { opacity: .4; cursor: not-allowed; }
.wl-save-modal-err { font-size: 11px; color: #f87171; margin-top: 8px; min-height: 14px; text-align: center; }

.ss-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; padding: 16px; }
#saved-setups-container { overflow: visible; }
.ss-empty {
    width: 100%;
    text-align: center;
    padding: 32px 20px;
    color: rgba(255,255,255,.2);
    font-size: 13px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.ss-empty i { font-size: 28px; opacity: .2; }

.ss-card {
    background: #161b22;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,.3), 0 0 0 1px rgba(255,255,255,.06);
    display: flex;
    flex-direction: column;
    transition: transform .15s, box-shadow .15s;
    cursor: pointer;
}
.ss-card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,.4), 0 0 0 1px rgba(0,212,170,.2); }
.ss-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px 8px;
    background: #1e2430;
    border-top: 2px solid #00d4aa;
    gap: 6px;
}
.ss-card-name {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 15px;
    font-weight: 800;
    color: #f1f5f9;
    letter-spacing: .02em;
    line-height: 1.2;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ss-del-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px; height: 22px;
    border-radius: 6px;
    border: none;
    background: rgba(239,68,68,.1);
    color: #f87171;
    font-size: 10px;
    cursor: pointer;
    flex-shrink: 0;
    transition: background .12s;
}
.ss-del-btn:hover { background: rgba(239,68,68,.22); }
.ss-card-coins { padding: 8px 12px; display: flex; flex-wrap: wrap; gap: 4px; flex: 1; min-height: 36px; }
.ss-card-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    border-top: 1px solid rgba(255,255,255,.06);
    border-bottom: 1px solid rgba(255,255,255,.06);
}
.ss-cstat {
    display: flex;
    flex-direction: column;
    padding: 6px 12px;
    gap: 2px;
    border-right: 1px solid rgba(255,255,255,.04);
}
.ss-cstat:nth-child(even) { border-right: none; }
.ss-cstat:nth-child(n+3) { border-top: 1px solid rgba(255,255,255,.04); }
/* Порог ликв — всегда на всю ширину */
.ss-cstat-warn { grid-column: 1 / -1; border-top: 1px solid rgba(255,255,255,.04); border-right: none; }
.ss-cstat-lbl { font-size: 9px; font-weight: 700; color: #7d8590; text-transform: uppercase; letter-spacing: .06em; }
.ss-cstat-val { font-size: 12px; font-weight: 700; color: #c9d1d9; font-family: 'JetBrains Mono', monospace; }
.ss-cstat-pos { color: #3fb950; }
.ss-cstat-neg { color: #f85149; }
.ss-cstat-warn { color: #e3b341; }
.ss-cstat-margin { color: #58a6ff; }
.ss-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border-top: 1px solid rgba(255,255,255,.06);
    gap: 8px;
}
.ss-card-meta { font-size: 10px; color: #94a3b8; font-weight: 600; }
.ss-coin-badge { font-size: 9px; font-weight: 800; padding: 2px 6px; border-radius: 5px; letter-spacing: .04em; white-space: nowrap; }
.ss-coin-long  { background: rgba(63,185,80,.12);  color: #3fb950; }
.ss-coin-short { background: rgba(248,81,73,.1);   color: #f85149; }
.ss-running-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 20px;
    background: rgba(63,185,80,.12);
    color: #3fb950;
    white-space: nowrap;
    flex-shrink: 0;
}
.ss-running-badge i { font-size: 6px; animation: ss-pulse 1.8s ease-in-out infinite; }
@keyframes ss-pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
.ss-card--running { box-shadow: 0 2px 8px rgba(0,0,0,.3), 0 0 0 1px rgba(63,185,80,.25); }
.ss-card--running:hover { box-shadow: 0 6px 20px rgba(0,0,0,.4), 0 0 0 1px rgba(63,185,80,.45); }
.ss-card-dragging  { opacity: .4; transform: scale(.97); box-shadow: none !important; }
.ss-card-dragover  { box-shadow: 0 0 0 2px rgba(0,212,170,.6) !important; transform: translateY(-2px); }
.ss-drag-handle    { color: rgba(255,255,255,.2); cursor: grab; font-size: 12px; margin-right: 4px; flex-shrink: 0; transition: color .15s; }
.ss-card:hover .ss-drag-handle { color: rgba(255,255,255,.45); }
.ss-card-dragging .ss-drag-handle { cursor: grabbing; }
.wl-frame-card-dragging { opacity: .4; transform: scale(.97); box-shadow: none !important; }
.wl-frame-card-dragover { box-shadow: 0 0 0 2px rgba(0,212,170,.6) !important; transform: translateY(-2px); }
.ss-launch-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: 7px;
    border: none;
    background: rgba(0,212,170,.1);
    color: #00d4aa;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: background .12s;
    white-space: nowrap;
    flex-shrink: 0;
}
.ss-launch-btn:hover { background: rgba(0,212,170,.2); }

.ss-launch-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    backdrop-filter: blur(4px);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.ss-launch-modal {
    background: #0d1117;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 16px;
    width: 100%;
    max-width: 520px;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(0,0,0,.5);
}
.ss-launch-head {
    padding: 16px 18px 12px;
    border-bottom: 1px solid rgba(255,255,255,.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.ss-launch-title { font-size: 15px; font-weight: 700; color: #fff; }
.ss-launch-body  { padding: 14px 18px; }
.ss-launch-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.ss-launch-table th {
    text-align: left;
    font-size: 9px;
    font-weight: 700;
    color: rgba(255,255,255,.3);
    text-transform: uppercase;
    letter-spacing: .5px;
    padding: 0 8px 8px 0;
    border-bottom: 1px solid rgba(255,255,255,.06);
}
.ss-launch-table td {
    padding: 7px 8px 7px 0;
    color: rgba(255,255,255,.75);
    border-bottom: 1px solid rgba(255,255,255,.04);
    font-variant-numeric: tabular-nums;
}
.ss-launch-table tr:last-child td { border-bottom: none; }
/* ── Detail modal — сводная строка баланса / ликвидации ── */
.ss-modal-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    border-bottom: 1px solid rgba(255,255,255,.06);
    background: rgba(255,255,255,.02);
}
.ss-msumm-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 8px 14px;
    border-right: 1px solid rgba(255,255,255,.05);
    min-width: 0;
    flex: 1 1 auto;
}
.ss-msumm-stat:last-child { border-right: none; }
.ss-msumm-lbl {
    font-size: 9px;
    font-weight: 700;
    color: rgba(255,255,255,.3);
    text-transform: uppercase;
    letter-spacing: .06em;
    white-space: nowrap;
}
.ss-msumm-val {
    font-size: 12px;
    font-weight: 700;
    color: rgba(255,255,255,.75);
    font-family: 'JetBrains Mono', monospace;
    white-space: nowrap;
}
.ss-msumm-pos  { color: #3fb950; }
.ss-msumm-neg  { color: #f85149; }
.ss-msumm-margin { color: #58a6ff; }
.ss-msumm-warn { color: #e3b341; }
/* ── Detail modal — карточки монет ── */
.ss-detail-body {
    padding: 12px 18px;
    display: block;
    max-height: 60vh;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(0,212,170,0.25) transparent;
}
.ss-detail-body::-webkit-scrollbar { width: 4px; }
.ss-detail-body::-webkit-scrollbar-track { background: transparent; }
.ss-detail-body::-webkit-scrollbar-thumb {
    background: rgba(0,212,170,0.25);
    border-radius: 4px;
}
.ss-detail-body::-webkit-scrollbar-thumb:hover {
    background: rgba(0,212,170,0.45);
}
.ss-detail-coin {
    background: #161b22;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,.07);
    overflow: hidden;
    margin-bottom: 8px;
}
.ss-detail-coin:last-child { margin-bottom: 0; }
.ss-detail-coin-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: #1e2430;
    border-bottom: 1px solid rgba(255,255,255,.06);
}
.ss-detail-sym {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 17px;
    font-weight: 900;
    color: #f1f5f9;
    letter-spacing: .02em;
}
.ss-detail-usdt { font-size: 11px; color: #94a3b8; font-weight: 600; margin-left: 2px; }
.ss-detail-coin-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    min-height: 44px;
}
.ss-detail-stat {
    display: flex;
    flex-direction: column;
    padding: 8px 12px;
    gap: 3px;
    border-right: 1px solid rgba(255,255,255,.06);
}
.ss-detail-stat:last-child { border-right: none; }
.ss-detail-lbl { font-size: 9px; font-weight: 700; color: #7d8590; text-transform: uppercase; letter-spacing: .06em; }
.ss-detail-val { font-size: 13px; font-weight: 700; color: #c9d1d9; font-family: 'JetBrains Mono', monospace; }
.ss-detail-val--pos { color: #3fb950; }
.ss-detail-val--neg { color: #f85149; }
.ss-launch-actions { display: flex; gap: 8px; padding: 0 18px 18px; }
.ss-btn-merge, .ss-btn-replace {
    flex: 1;
    padding: 10px 0;
    border-radius: 10px;
    border: none;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.ss-btn-merge   { background: rgba(99,102,241,.12);  color: #818cf8; }
.ss-btn-replace { background: rgba(245,158,11,.1);   color: #f59e0b; }
.ss-btn-merge:hover:not(:disabled)   { background: rgba(99,102,241,.22); }
.ss-btn-replace:hover:not(:disabled) { background: rgba(245,158,11,.2);  }
.ss-btn-merge:disabled, .ss-btn-replace:disabled { opacity: .45; cursor: not-allowed; }
.ss-btn-launch-frame {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    flex: 1;
    padding: 10px 20px;
    border-radius: 9px;
    border: none;
    background: rgba(0,212,170,.12);
    color: #00d4aa;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s;
}
.ss-btn-launch-frame:hover:not(:disabled) { background: rgba(0,212,170,.22); }
.ss-btn-launch-frame:disabled { opacity: .45; cursor: not-allowed; }
.ss-launch-err { font-size: 11px; color: #f87171; min-height: 14px; text-align: center; padding: 0 18px 12px; }

/* ── Watchlist Frames ─────────────────────────────────────────── */
.wl-frames-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
    padding: 16px;
}
.wl-frame-card {
    background: #161b22;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,.3), 0 0 0 1px rgba(255,255,255,.06);
    display: flex;
    flex-direction: column;
    transition: transform .15s, box-shadow .15s;
    cursor: pointer;
}
.wl-frame-card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,.4), 0 0 0 1px rgba(0,212,170,.2); }
.wl-frame-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px 8px;
    background: #1e2430;
    border-top: 2px solid #00d4aa;
    gap: 6px;
}
.wl-frame-card-name {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 15px;
    font-weight: 800;
    color: #f1f5f9;
    letter-spacing: .02em;
    line-height: 1.2;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
}
.wl-frame-rename-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px; height: 22px;
    border-radius: 6px;
    border: none;
    background: rgba(255,255,255,.06);
    color: rgba(255,255,255,.35);
    font-size: 10px;
    cursor: pointer;
    flex-shrink: 0;
    transition: background .12s, color .12s;
}
.wl-frame-rename-btn:hover { background: rgba(0,212,170,.15); color: #00d4aa; }
.wl-frame-card-body {
    padding: 8px 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    flex: 1;
    min-height: 36px;
}
.wl-frame-empty-hint { font-size: 10px; color: rgba(255,255,255,.2); align-self: center; }
.wl-frame-overflow { font-size: 9px; font-weight: 800; padding: 2px 6px; border-radius: 5px; background: rgba(255,255,255,.07); color: rgba(255,255,255,.4); letter-spacing: .04em; white-space: nowrap; }
.wl-frame-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    border-top: 1px solid rgba(255,255,255,.06);
    border-bottom: 1px solid rgba(255,255,255,.06);
}
.wl-fstat {
    display: flex;
    flex-direction: column;
    padding: 6px 12px;
    gap: 2px;
    border-right: 1px solid rgba(255,255,255,.04);
}
.wl-fstat:nth-child(even) { border-right: none; }
.wl-fstat:nth-child(n+3) { border-top: 1px solid rgba(255,255,255,.04); }
.wl-fstat-lbl { font-size: 9px; font-weight: 700; color: rgba(255,255,255,.3); text-transform: uppercase; letter-spacing: .06em; }
.wl-fstat-val { font-size: 11px; font-weight: 700; color: rgba(255,255,255,.55); font-family: 'JetBrains Mono', monospace; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wl-fstat-pos { color: #3fb950; }
.wl-fstat-neg { color: #f85149; }
.wl-fstat-margin { color: #58a6ff; }
.wl-frame-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border-top: 1px solid rgba(255,255,255,.06);
    gap: 8px;
}
.wl-frame-meta {
    font-size: 10px;
    color: #94a3b8;
    font-weight: 600;
}
.wl-frame-park-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px; height: 28px;
    border-radius: 7px;
    border: none;
    background: rgba(255,255,255,.06);
    color: rgba(255,255,255,.3);
    font-size: 11px;
    cursor: pointer;
    flex-shrink: 0;
    transition: background .12s, color .12s;
}
.wl-frame-park-btn:hover { background: rgba(99,102,241,.15); color: #818cf8; }
.wl-frame-open-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: 7px;
    border: none;
    background: rgba(0,212,170,.1);
    color: #00d4aa;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: background .12s;
    white-space: nowrap;
}
.wl-frame-open-btn:hover { background: rgba(0,212,170,.2); }
.wl-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 11px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,.1);
    background: rgba(255,255,255,.04);
    color: rgba(255,255,255,.55);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s;
    white-space: nowrap;
    flex-shrink: 0;
}
.wl-back-btn:hover { background: rgba(255,255,255,.09); color: rgba(255,255,255,.85); }
.wl-frame-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 16px;
    font-weight: 800;
    color: #f1f5f9;
    letter-spacing: .02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}
.wl-toolbar-sep {
    width: 1px;
    height: 20px;
    background: rgba(255,255,255,.1);
    flex-shrink: 0;
    margin: 0 2px;
}
.wl-frame-name-input {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 15px;
    font-weight: 800;
    color: #f1f5f9;
    letter-spacing: .02em;
    background: rgba(0,212,170,.08);
    border: 1px solid rgba(0,212,170,.35);
    border-radius: 6px;
    padding: 2px 7px;
    outline: none;
    flex: 1;
    min-width: 0;
}

/* ═══════════════════════════════════════════════════════════════════
   SUBSCRIPTION — баннер, оверлей, карточки тарифов, секция профиля
   ═══════════════════════════════════════════════════════════════════ */

/* ── Grace / trial_ending баннер ─────────────────────────────────── */
/* Когда баннер видим — сдвигаем страницу вниз чтобы шапка не перекрывалась */
body.has-sub-banner { padding-top: 44px; }

.sub-banner {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 10px 20px;
    background: linear-gradient(90deg, #92400e, #b45309);
    color: #fef3c7;
    font-size: 13px;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
.sub-banner-btn {
    background: #fbbf24;
    color: #1c1c1e;
    border: none;
    border-radius: 6px;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s;
    white-space: nowrap;
}
.sub-banner-btn:hover { background: #f59e0b; }

/* ── Оверлей полной блокировки ───────────────────────────────────── */
.sub-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0,0,0,0.92);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.sub-overlay-box {
    background: #131320;
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 20px;
    padding: 40px 32px 32px;
    max-width: 780px;
    width: 100%;
    text-align: center;
}
.sub-overlay-icon  { font-size: 40px; margin-bottom: 12px; }
.sub-overlay-title { font-size: 22px; font-weight: 700; color: #f1f1f1; margin: 0 0 8px; }
.sub-overlay-sub   { font-size: 14px; color: rgba(255,255,255,0.5); margin: 0 0 28px; }

/* ── Модал ──────────────────────────────────────────────────────── */
.sub-modal-wrap {
    position: fixed;
    inset: 0;
    z-index: 9500;
    background: rgba(0,0,0,0.78);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.sub-modal {
    background: #131320;
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 20px;
    padding: 36px 32px 28px;
    max-width: 780px;
    width: 100%;
    position: relative;
}
.sub-modal-close {
    position: absolute;
    top: 14px; right: 14px;
    background: rgba(255,255,255,0.05);
    border: none;
    border-radius: 6px;
    color: rgba(255,255,255,0.4);
    width: 30px; height: 30px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.15s, color 0.15s;
}
.sub-modal-close:hover { background: rgba(255,255,255,0.1); color: #f1f1f1; }

/* Шапка модала */
.sub-modal-header {
    text-align: center;
    margin-bottom: 32px;
}
.sub-modal-lock {
    width: 48px; height: 48px;
    background: rgba(0,212,170,0.1);
    border: 1px solid rgba(0,212,170,0.2);
    border-radius: 12px;
    display: inline-flex; align-items: center; justify-content: center;
    color: #00d4aa;
    font-size: 18px;
    margin-bottom: 14px;
}
.sub-modal-title {
    font-size: 20px;
    font-weight: 700;
    color: #f1f1f1;
    margin: 0 0 6px;
}
.sub-modal-sub {
    font-size: 13px;
    color: rgba(255,255,255,0.35);
    margin: 0;
}

/* ── Карточки тарифов ───────────────────────────────────────────── */
.sub-plans {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 20px;
}
.sub-plan-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 14px;
    padding: 24px 18px 20px;
    text-align: center;
    position: relative;
    transition: border-color 0.2s, background 0.2s;
}
.sub-plan-card:hover {
    border-color: rgba(255,255,255,0.14);
    background: rgba(255,255,255,0.05);
}
.sub-plan-card--recommended {
    background: rgba(0,212,170,0.05);
    border-color: rgba(0,212,170,0.45);
    box-shadow: 0 0 0 1px rgba(0,212,170,0.12), 0 8px 40px rgba(0,212,170,0.07);
    padding-top: 32px;
}
.sub-plan-card--recommended:hover {
    border-color: rgba(0,212,170,0.65);
    background: rgba(0,212,170,0.07);
}

/* Бейдж «Выбор большинства» */
.sub-plan-badge {
    position: absolute;
    top: -12px; left: 50%;
    transform: translateX(-50%);
    background: #00d4aa;
    color: #0a0a14;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 4px 14px;
    border-radius: 20px;
    white-space: nowrap;
}

.sub-plan-period {
    font-size: 11px;
    font-weight: 700;
    color: rgba(255,255,255,0.4);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 10px;
}
.sub-plan-price {
    font-size: 30px;
    font-weight: 800;
    color: #f1f1f1;
    line-height: 1;
    margin-bottom: 4px;
}
.sub-plan-price-cur {
    font-size: 18px;
    font-weight: 600;
    color: rgba(255,255,255,0.55);
}
.sub-plan-perday {
    font-size: 11px;
    color: rgba(255,255,255,0.28);
    margin-bottom: 14px;
}
.sub-plan-discount-badge {
    display: inline-block;
    background: rgba(52,211,153,0.1);
    border: 1px solid rgba(52,211,153,0.22);
    color: #34d399;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    margin-bottom: 16px;
    height: 22px;
    line-height: 16px;
}
.sub-plan-discount-empty { height: 22px; margin-bottom: 16px; }

.sub-plan-btn {
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.65);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.sub-plan-btn:hover {
    background: rgba(255,255,255,0.11);
    color: #f1f1f1;
    border-color: rgba(255,255,255,0.18);
}
.sub-plan-btn--recommended {
    background: #00d4aa;
    color: #0a0a14;
    border-color: transparent;
    font-weight: 700;
}
.sub-plan-btn--recommended:hover { background: #00be9a; }
.sub-plan-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* Подвал модала */
.sub-modal-footer {
    text-align: center;
    font-size: 12px;
    color: rgba(255,255,255,0.2);
    margin-top: 4px;
}
.sub-modal-footer i { margin-right: 5px; }

@media (max-width: 560px) {
    .sub-plans { grid-template-columns: 1fr; }
    .sub-modal { padding: 32px 20px 24px; }
}

/* ── Сообщения об ошибках / статусе ─────────────────────────────── */
.sub-msg { font-size: 12px; text-align: center; min-height: 18px; margin-top: 8px; }
.sub-msg--info  { color: rgba(255,255,255,0.5); }
.sub-msg--error { color: #f87171; }

/* ── Секция профиля ──────────────────────────────────────────────── */
.prf-sub-loading { padding: 24px 0; text-align: center; color: rgba(255,255,255,0.3); }
.prf-sub-status-row { margin-bottom: 12px; }
.prf-sub-info { margin-bottom: 16px; }

/* Статус-бейджи */
.sub-status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.3px;
}
.sub-status--trial    { background: rgba(99,102,241,0.2);  color: #a5b4fc; }
.sub-status--active   { background: rgba(52,211,153,0.2);  color: #34d399; }
.sub-status--grace    { background: rgba(251,191,36,0.2);  color: #fbbf24; }
.sub-status--blocked  { background: rgba(248,113,113,0.2); color: #f87171; }
.sub-status--override { background: rgba(0,212,170,0.2);   color: #00d4aa; }

/* ══════════════════════════════════════════════════════════════════════════
   ЕЖЕДНЕВНАЯ СТАТИСТИКА  (.ds-*)
   ══════════════════════════════════════════════════════════════════════════ */

/* ── Обёртка секции ──────────────────────────────────────────────────────── */
.ds-wrap {
    background: #fff;
    border-radius: 0 0 15px 15px;
    overflow: hidden;
}

/* ── Заголовок + переключатель ───────────────────────────────────────────── */
.ds-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 28px 18px;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 55%, #1a1040 100%);
}

.ds-title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #f8fafc;
    letter-spacing: 0.01em;
}
.ds-title i {
    margin-right: 8px;
    color: #00d4aa;
    font-size: 15px;
}

/* Кнопки переключения периода */
.ds-period-btns {
    display: flex;
    gap: 2px;
    background: rgba(6, 10, 26, 0.75);
    border: 1px solid rgba(0, 212, 170, 0.18);
    border-radius: 8px;
    padding: 3px;
    backdrop-filter: blur(6px);
}

.ds-period-btn {
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.38);
    border-radius: 6px;
    height: 26px;
    padding: 0 12px;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.025em;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}
.ds-period-btn:hover {
    background: rgba(255,255,255,0.07);
    color: rgba(255,255,255,0.75);
}
.ds-period-active {
    background: rgba(0, 212, 170, 0.18) !important;
    color: #00d4aa !important;
    box-shadow: inset 0 0 0 1px rgba(0, 212, 170, 0.35);
}

/* ── Обёртка таблицы ─────────────────────────────────────────────────────── */
.ds-table-wrap {
    overflow-x: auto;
    background: #0f1523;
}
.ds-table-wrap::-webkit-scrollbar       { height: 5px; }
.ds-table-wrap::-webkit-scrollbar-track { background: #0f1523; }
.ds-table-wrap::-webkit-scrollbar-thumb { background: #2d3748; border-radius: 3px; }

/* ── Таблица ─────────────────────────────────────────────────────────────── */
.ds-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
    color: #e2e8f0;
    min-width: 540px;
}

/* Шапка */
.ds-table thead th {
    padding: 11px 20px;
    font-size: 10.5px;
    font-weight: 700;
    color: rgba(255,255,255,0.38);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    text-align: right;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    background: #0b1120;
    white-space: nowrap;
}
.ds-table thead th:first-child {
    text-align: left;
}

/* Строки данных */
.ds-table tbody tr {
    border-bottom: 1px solid rgba(255,255,255,0.05);
    transition: background 0.12s;
}
.ds-table tbody tr:hover {
    background: rgba(255,255,255,0.03);
}
.ds-table tbody td {
    padding: 10px 20px;
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.ds-table tbody td:first-child {
    text-align: left;
    font-weight: 600;
    color: rgba(255,255,255,0.7);
    font-size: 12.5px;
}

/* Итоговая строка (tfoot) */
.ds-table tfoot tr {
    border-top: 1px solid rgba(255,255,255,0.12);
}
.ds-table tfoot td {
    padding: 11px 20px;
    text-align: right;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    background: rgba(255,255,255,0.035);
    white-space: nowrap;
    font-size: 13px;
}
.ds-table tfoot td:first-child {
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(255,255,255,0.45);
}

/* ── Цветовая окраска ─────────────────────────────────────────────────────── */
.ds-pos  { color: #4ade80; }
.ds-neg  { color: #f87171; }
.ds-warn { color: #fbbf24; }
.ds-dim  { color: rgba(255,255,255,0.35); }

/* ── Skeleton-строки (загрузка) ──────────────────────────────────────────── */
.ds-skeleton td {
    padding: 12px 20px;
}
.ds-skeleton-cell {
    height: 14px;
    border-radius: 4px;
    background: linear-gradient(90deg, rgba(255,255,255,0.05) 25%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.05) 75%);
    background-size: 200% 100%;
    animation: ds-shimmer 1.4s infinite;
}
@keyframes ds-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ── Пустые состояния ────────────────────────────────────────────────────── */
.ds-empty {
    padding: 48px 20px;
    text-align: center;
    color: rgba(255,255,255,0.3);
    font-size: 14px;
    background: #0f1523;
    line-height: 1.6;
}
.ds-empty i {
    display: block;
    font-size: 32px;
    margin-bottom: 10px;
    opacity: 0.3;
}

/* ── Адаптив ──────────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .ds-header   { padding: 16px 16px 14px; }
    .ds-title    { font-size: 14px; }
    .ds-table tbody td,
    .ds-table tfoot td,
    .ds-table thead th { padding: 9px 12px; }
}

/* ── Constructor ─────────────────────────────────────────────────────────── */

.ctr-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 16px;
    flex-wrap: wrap;
}
.ctr-toolbar .wl-add-btn {
    padding: 7px 14px;
    font-size: 12px;
    margin-left: 0;
}

.ctr-save-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 8px;
    border: 1px solid rgba(0,212,170,.3);
    background: rgba(0,212,170,.08);
    color: #00d4aa;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background .18s, border-color .18s;
}
.ctr-save-btn:hover:not(:disabled) {
    background: rgba(0,212,170,.15);
    border-color: rgba(0,212,170,.5);
}
.ctr-save-btn:disabled { opacity: .35; cursor: not-allowed; }

.ctr-launch-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    border-radius: 8px;
    border: none;
    background: #00d4aa;
    color: #0d1117;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: background .18s, transform .12s;
}
.ctr-launch-btn:hover:not(:disabled) {
    background: #00e6b8;
    transform: translateY(-1px);
}
.ctr-launch-btn:disabled { opacity: .35; cursor: not-allowed; transform: none; }

.ctr-clear-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border-radius: 8px;
    border: 1px solid rgba(248,81,73,.25);
    background: rgba(248,81,73,.06);
    color: #f85149;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    margin-left: auto;
    transition: background .18s, border-color .18s;
}
.ctr-clear-btn:hover {
    background: rgba(248,81,73,.13);
    border-color: rgba(248,81,73,.45);
}

.ctr-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 48px 24px;
    color: rgba(255,255,255,.18);
    font-size: 13px;
    font-weight: 500;
    text-align: center;
}
.ctr-empty i {
    font-size: 28px;
    opacity: .25;
}

/* ── Leverage badge (×10) на карточке монеты ─────────────────────────── */
.wl-lev-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(255,200,60,.12);
    border: 1px solid rgba(255,200,60,.25);
    color: #ffc83c;
    font-size: 10px;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: .02em;
    margin-left: 4px;
    line-height: 1;
}

/* ── Liquidation price label & live distance ────────────────────────── */
.wl-setup-val-liq {
    color: #ff6b6b;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
}
.wl-setup-val-warn {
    color: #ffc83c;
}
.wl-setup-val-crit {
    color: #ff4444;
    font-weight: 700;
    animation: crit-pulse 1s ease-in-out infinite alternate;
}
@keyframes crit-pulse {
    from { opacity: 1; }
    to   { opacity: .45; }
}

/* ── Risk bar (суммарная аналитика сетапа) ───────────────────────────── */
.ctr-risk-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 20px;
    padding: 10px 16px;
    margin: 0 16px 12px;
    background: rgba(255,255,255,.03);
    border: 1px solid rgba(255,255,255,.07);
    border-radius: 10px;
    font-size: 12px;
}
.ctr-risk-stat {
    display: flex;
    align-items: baseline;
    gap: 6px;
}
.ctr-risk-stat--dim { opacity: .35; }
.ctr-risk-lbl {
    color: rgba(255,255,255,.35);
    font-size: 11px;
    white-space: nowrap;
}
.ctr-risk-val {
    color: rgba(255,255,255,.85);
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    font-weight: 600;
}
.ctr-risk-val--neg { color: #ff6b6b; }
.ctr-risk-sub {
    font-size: 10px;
    font-weight: 400;
    color: rgba(255,255,255,.35);
    font-family: inherit;
}
.ctr-risk-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 600;
    margin-left: auto;
}
.ctr-risk-badge--ok {
    background: rgba(0,212,170,.1);
    border: 1px solid rgba(0,212,170,.25);
    color: #00d4aa;
}
.ctr-risk-badge--warn {
    background: rgba(255,200,60,.08);
    border: 1px solid rgba(255,200,60,.2);
    color: #ffc83c;
}

/* ── SL-статус в карточке монеты ────────────────────────────────────── */
.ctr-sl-status {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 10px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 6px;
    margin-top: 2px;
}
.ctr-sl-status--ok {
    background: rgba(0,212,170,.08);
    color: #00d4aa;
}
.ctr-sl-status--none {
    background: rgba(255,200,60,.08);
    color: #ffc83c;
}
.ctr-sl-status--danger {
    background: rgba(248,81,73,.1);
    color: #f85149;
}

/* ── Margin mode toggle (Cross / Isolated) ──────────────────────────── */
.ctr-margin-opt.sel-cross {
    background: rgba(96,165,250,.15);
    border-color: rgba(96,165,250,.5);
    color: #60a5fa;
}
.ctr-margin-opt.sel-isolated {
    background: rgba(255,200,60,.12);
    border-color: rgba(255,200,60,.4);
    color: #ffc83c;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Auth Methods — раздел "Способы входа" в профиле
   ═══════════════════════════════════════════════════════════════════════════ */

.prf-auth-methods-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
    padding: 0;
}

.prf-auth-method-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.06);
    background: rgba(255,255,255,0.03);
}

.prf-auth-method--active {
    border-color: rgba(0,212,170,0.18);
    background: rgba(0,212,170,0.04);
}

.prf-auth-method--empty {
    opacity: .7;
}

.prf-auth-method-icon {
    width: 28px;
    text-align: center;
    font-size: 14px;
    color: rgba(0,212,170,.6);
    flex-shrink: 0;
}

.prf-auth-method-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.prf-auth-method-name {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255,255,255,.85);
}

.prf-auth-method-id {
    font-size: 12px;
    color: rgba(255,255,255,.4);
    font-family: 'JetBrains Mono', monospace;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.prf-auth-method-id--none {
    font-style: italic;
    font-family: inherit;
}

.prf-btn--sm {
    padding: 5px 10px !important;
    font-size: 11px !important;
    flex-shrink: 0;
}

.prf-auth-divider {
    height: 1px;
    background: rgba(255,255,255,0.07);
    margin: 16px 0;
}

/* ═══════════════════════════════════════════════════════════
   PROFILE — Уровень риска
   ═══════════════════════════════════════════════════════════ */

.prf-risk-desc {
    font-size: 11px;
    color: rgba(255,255,255,.45);
    line-height: 1.6;
    margin: 0 0 16px;
}

.prf-risk-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
}

.prf-risk-btn {
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(255,255,255,.1);
    color: rgba(255,255,255,.6);
    border-radius: 6px;
    font-size: 11px;
    font-weight: 500;
    padding: 5px 11px;
    cursor: pointer;
    transition: background .15s, border-color .15s, color .15s;
    font-family: 'JetBrains Mono', monospace;
}
.prf-risk-btn:hover {
    background: rgba(0,212,170,.12);
    border-color: rgba(0,212,170,.3);
    color: #00d4aa;
}
.prf-risk-btn--active {
    background: rgba(0,212,170,.18) !important;
    border-color: rgba(0,212,170,.55) !important;
    color: #00d4aa !important;
}

.prf-risk-custom-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}
.prf-risk-custom-label {
    font-size: 11px;
    color: rgba(255,255,255,.45);
    flex-shrink: 0;
}
.prf-risk-custom-input-wrap {
    display: flex;
    align-items: center;
    gap: 0;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 6px;
    overflow: hidden;
    background: rgba(255,255,255,.04);
    transition: border-color .15s;
}
.prf-risk-custom-input-wrap:focus-within {
    border-color: rgba(0,212,170,.4);
}
.prf-risk-custom-input {
    background: transparent;
    border: none;
    outline: none;
    color: rgba(255,255,255,.85);
    font-size: 11px;
    font-family: 'JetBrains Mono', monospace;
    padding: 5px 8px;
    width: 70px;
    -moz-appearance: textfield;
}
.prf-risk-custom-input::-webkit-outer-spin-button,
.prf-risk-custom-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
}
.prf-risk-custom-sym {
    font-size: 11px;
    color: rgba(255,255,255,.35);
    padding: 0 8px 0 2px;
    font-family: 'JetBrains Mono', monospace;
}

.prf-risk-current-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 14px;
}
.prf-risk-current-label {
    font-size: 11px;
    color: rgba(255,255,255,.4);
}
.prf-risk-current-val {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    font-weight: 600;
    color: #00d4aa;
}

.prf-risk-msg {
    font-size: 11px;
    padding: 6px 10px;
    border-radius: 6px;
    margin-bottom: 10px;
}
.prf-risk-msg--ok {
    background: rgba(34,197,94,.12);
    color: #22c55e;
    border: 1px solid rgba(34,197,94,.25);
}
.prf-risk-msg--err {
    background: rgba(239,68,68,.1);
    color: #ef4444;
    border: 1px solid rgba(239,68,68,.2);
}

.prf-risk-save-btn {
    margin-top: 4px;
}

/* ═══════════════════════════════════════════════════════════
   SKELETON / SHIMMER — предотвращение CLS при загрузке
   ═══════════════════════════════════════════════════════════ */

/* Базовая шиммер-анимация */
@keyframes sk-shimmer {
    0%   { background-position: -600px 0; }
    100% { background-position:  600px 0; }
}

.sk-shimmer {
    background: linear-gradient(
        90deg,
        rgba(255,255,255,.04) 0%,
        rgba(255,255,255,.09) 40%,
        rgba(255,255,255,.04) 80%
    );
    background-size: 600px 100%;
    animation: sk-shimmer 1.6s ease-in-out infinite;
    border-radius: 6px;
}

/* ── Скелетон строк таблицы сигналов ── */
.sig-sk-row td { padding: 10px 8px; border-bottom: 1px solid rgba(255,255,255,0.04); }
.sig-sk-cell   { height: 13px; border-radius: 4px; }

/* ── Скелетон шапки ── */
.sk-header {
    background: #0d1117;
    padding: 16px 0;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    margin-bottom: 28px;
}
.sk-header-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 32px;
    gap: 12px;
}
.sk-header-logo  { width: 160px; height: 20px; }
.sk-header-right { display: flex; gap: 8px; }
.sk-header-btn   { width: 80px; height: 28px; border-radius: 8px; }

/* ── Скелетон stats-panel ── */
.sk-stats-panel {
    background: #161b22;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    border: 1px solid rgba(255,255,255,0.06);
}
.sk-stats-title { width: 200px; height: 14px; margin-bottom: 16px; }
.sk-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
}
.sk-stat-card {
    background: #1e2430;
    border-radius: 10px;
    padding: 18px 20px;
    border: 1px solid rgba(0,212,170,0.06);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}
.sk-stat-icon  { width: 26px; height: 26px; border-radius: 50%; }
.sk-stat-value { width: 60px; height: 26px; border-radius: 4px; }
.sk-stat-label { width: 80px; height: 10px; border-radius: 4px; }

/* ── Скелетон gw-card (goals widget) ── */
.sk-gw-card {
    position: relative;
    overflow: hidden;
    background: linear-gradient(145deg, #0d1117 0%, #161b22 60%, #0d1117 100%);
    border-radius: 20px 20px 0 0;
    border-bottom: 2px solid rgba(0,212,170,.15);
    padding: 22px 28px 20px;
    margin-bottom: 0;
}
.sk-gw-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}
.sk-gw-title-group { display: flex; flex-direction: column; gap: 6px; }
.sk-gw-eyebrow { width: 120px; height: 10px; border-radius: 4px; }
.sk-gw-title   { width: 180px; height: 18px; border-radius: 4px; }
.sk-gw-badge   { width: 60px; height: 24px; border-radius: 20px; }
.sk-gw-body {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 20px;
}
.sk-ring-wrap { display: flex; align-items: center; gap: 16px; }
.sk-ring      { width: 96px; height: 96px; border-radius: 50%; flex-shrink: 0; }
.sk-ring-meta { display: flex; flex-direction: column; gap: 8px; }
.sk-ring-label   { width: 60px; height: 10px; border-radius: 4px; }
.sk-ring-value   { width: 80px; height: 16px; border-radius: 4px; }
.sk-ring-sub     { width: 100px; height: 10px; border-radius: 4px; }
.sk-gw-timeline  { height: 6px; border-radius: 3px; }

/* ── Скелетон tabs-container ── */
.sk-tabs {
    background: #161b22;
    border-radius: 0 0 12px 12px;
    border: 1px solid rgba(255,255,255,0.06);
    border-top: none;
    overflow: hidden;
}
.sk-tabs-header {
    background: #1e2430;
    padding: 12px 8px;
    display: flex;
    gap: 4px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.sk-tab-btn { height: 32px; border-radius: 6px; flex-shrink: 0; }
.sk-tab-btn:nth-child(1) { width: 80px;  }
.sk-tab-btn:nth-child(2) { width: 100px; }
.sk-tab-btn:nth-child(3) { width: 90px;  }
.sk-tab-btn:nth-child(4) { width: 110px; }
.sk-tabs-body { padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.sk-row { height: 14px; border-radius: 4px; }
.sk-row:nth-child(1) { width: 90%;  }
.sk-row:nth-child(2) { width: 75%;  }
.sk-row:nth-child(3) { width: 85%;  }

/* Fade-in при замене скелетона реальным контентом */
/* ── Skeleton: карточки «Мои Сделки» ─────────────────────────────────────── */
.mt-sk-card {
    background: rgba(255,255,255,.03);
    border: 1px solid rgba(255,255,255,.06);
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 12px;
}
.mt-sk-header      { height: 18px; border-radius: 6px; width: 140px; }
.mt-sk-body        { display: flex; flex-direction: column; gap: 10px; }
.mt-sk-row         { height: 12px; border-radius: 4px; }
.mt-sk-row--wide   { width: 80%; }
.mt-sk-row--mid    { width: 60%; }
.mt-sk-row--narrow { width: 40%; }

@keyframes sk-fadein {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0);   }
}
.header,
.stats-panel,
.gw-root,
.tabs-header,
.tabs-content,
.pi-container,
.watchlist-root,
.saved-setups-root,
.my-trades-root,
.trade-history-root {
    animation: sk-fadein 200ms ease-out both;
}

/* ── Hold Efficiency (время удержания позиции) ──────────────────────────── */
.th-hold-insight {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    background: rgba(255,255,255,.03);
    border: 1px solid rgba(255,255,255,.07);
}
.th-hold-insight--hold_efficient { border-color: rgba(52,211,153,.2); }
.th-hold-insight--hold_slow      { border-color: rgba(251,191,36,.2); }
.th-hold-insight--hold_frozen    { border-color: rgba(251,146,60,.25); }
.th-hold-insight--hold_loss_long { border-color: rgba(248,113,113,.2); }

.th-hold-header {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 7px;
}
.th-hold-icon {
    font-size: 11px;
    color: rgba(255,255,255,.35);
    flex-shrink: 0;
}
.th-hold-title {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255,255,255,.55);
    letter-spacing: .02em;
    text-transform: uppercase;
}
.th-hold-badge {
    margin-left: auto;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 4px;
}
.th-hold-badge--ok     { background: rgba(52,211,153,.12); color: #34d399; }
.th-hold-badge--warn   { background: rgba(251,191,36,.12);  color: #fbbf24; }
.th-hold-badge--danger { background: rgba(248,113,113,.12); color: #f87171; }

.th-hold-stats {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 7px;
}
.th-hold-stat {
    display: flex;
    align-items: center;
    gap: 5px;
}
.th-hold-stat-label {
    font-size: 10px;
    color: rgba(255,255,255,.4);
}
.th-hold-stat-val {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 600;
    color: rgba(255,255,255,.75);
    font-variant-numeric: tabular-nums;
}
.th-hold-stat-sep { color: rgba(255,255,255,.2); font-size: 10px; }

.th-hold-rate--ok     { color: #34d399; }
.th-hold-rate--warn   { color: #fbbf24; }
.th-hold-rate--danger { color: #f87171; }

.th-hold-comment {
    font-size: 12px;
    line-height: 1.55;
    color: rgba(255,255,255,.6);
    margin: 0;
}

/* ══════════════════════════════════════════════════════════════
   APP FOOTER
══════════════════════════════════════════════════════════════ */
.app-footer {
    margin-top: auto;
    border-top: 1px solid rgba(255,255,255,.06);
    background: rgba(0,0,0,.25);
}

.app-footer-inner {
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 0 32px;
    gap: 16px;
}

.app-footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.app-footer-logo {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
    color: #00d4aa;
}

.app-footer-sep {
    width: 1px;
    height: 14px;
    background: rgba(255,255,255,.12);
}

.app-footer-tagline {
    font-size: 11px;
    color: rgba(255,255,255,.35);
    letter-spacing: .02em;
}

.app-footer-meta {
    display: flex;
    align-items: center;
    gap: 6px;
}

.app-footer-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 20px;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.07);
    font-size: 11px;
    color: rgba(255,255,255,.4);
    white-space: nowrap;
}

.app-footer-chip i {
    font-size: 9px;
    color: rgba(255,255,255,.25);
}

.app-footer-dot {
    color: #22c55e !important;
    animation: footer-pulse 2.5s ease-in-out infinite;
}

@keyframes footer-pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: .35; }
}

@media (max-width: 768px) {
    .app-footer-inner { height: auto; padding: 10px 0; flex-wrap: wrap; }
    .app-footer-tagline { display: none; }
    .app-footer-chip:last-child { display: none; }
}

.app-footer-copy {
    font-size: 11px;
    color: rgba(255,255,255,.2);
}

.liqc-result-row--accent {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(255,255,255,.08);
}
.liqc-val--accent {
    color: #00d4aa;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
}
