/* ===== MARKTEX · КУРСЫ АКТИВОВ — дизайн-слой страницы =====
   Принципы: золото — только бренд и «выбрано»; одна поверхность вместо россыпи карточек;
   цифры — главные; зелёный/красный — только для движения цены. Каркас — в ui-base.css. */
:root { --mx-f-ui: 'Onest', 'Inter', system-ui, sans-serif; --mx-f-display: 'Unbounded', 'Onest', sans-serif;
        --mx-line: rgba(255,255,255,.08); --mx-line-strong: rgba(255,255,255,.14); --mx-surface: rgba(255,255,255,.028); --mx-surface-2: rgba(255,255,255,.055);
        --mx-gold-line: rgba(212,175,55,.38); --mx-gold-wash: rgba(212,175,55,.09); --mx-r: 14px; }
body.light { --mx-line: rgba(20,20,20,.1); --mx-line-strong: rgba(20,20,20,.18); --mx-surface: rgba(255,255,255,.75); --mx-surface-2: rgba(20,20,20,.05); --mx-gold-wash: rgba(212,175,55,.14); }
body, button, input, select, .page-content { font-family: var(--mx-f-ui); }
.page-content { font-variant-numeric: tabular-nums; }
:focus-visible { outline: 2px solid var(--gold, #d4af37); outline-offset: 2px; }
button, select, input { font-family: inherit; }

/* ===== ГЕРОЙ ===== */
.page-content .hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; text-align: left; padding: 8px 0 22px; margin: 0; }
.page-content .hero h1 { font-family: var(--mx-f-display); font-weight: 600; font-size: clamp(28px, 4.4vw, 54px); line-height: 1.05; letter-spacing: -.02em; margin: 0; text-align: left; }
.page-content .hero h1 span { background: none; -webkit-text-fill-color: currentColor; color: var(--text-color); text-shadow: none; }
.hero-text { display: flex; flex-direction: column; gap: 10px; }
.page-content .hero .hero-sub { margin: 0; font-size: 13px; font-weight: 500; letter-spacing: .14em; text-transform: none; color: var(--gold, #d4af37); text-align: left; }
.hero-live { display: inline-flex; align-items: center; gap: 9px; padding: 8px 14px; border: 1px solid var(--mx-line); border-radius: 999px; font-size: 12px; color: var(--text-secondary); background: var(--mx-surface); }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green, #4ade80); animation: livePulse 2s ease-out infinite; }
@keyframes livePulse { 0% { box-shadow: 0 0 0 0 rgba(74,222,128,.55); } 100% { box-shadow: 0 0 0 10px rgba(74,222,128,0); } }

/* ===== ФИЛЬТРЫ ===== */
.filters-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; justify-content: flex-start; margin-bottom: 14px; padding: 0 0 14px; border-bottom: 1px solid var(--mx-line); background: none; border-radius: 0; border-top: 0; border-left: 0; border-right: 0; }
.filter-chip { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border: 1px solid transparent; border-radius: 999px; background: transparent; color: var(--text-secondary); font-size: 13px; font-weight: 500; cursor: pointer; user-select: none; white-space: nowrap; transition: color .2s, background .2s, border-color .2s; }
.filter-chip i { font-size: 12px; opacity: .75; }
.filter-chip:hover { color: var(--text-color); background: var(--mx-surface-2); }
.filter-chip.active { background: var(--gold, #d4af37); border-color: var(--gold, #d4af37); color: #17130a; font-weight: 700; box-shadow: none; transform: none; }
.filter-chip.active i { opacity: 1; }
.chip-sep { width: 1px; height: 20px; background: var(--mx-line-strong); margin: 0 8px; }

/* ===== СЕТИ ===== */
.network-filters-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; padding: 0; background: none; border: 0; }
.network-label { font-size: 13px; font-weight: 500; color: var(--text-secondary); white-space: nowrap; }
.custom-network-dropdown { position: relative; min-width: 220px; }
.network-dropdown-selected { display: flex; align-items: center; gap: 9px; padding: 9px 14px; background: var(--mx-surface); border: 1px solid var(--mx-line); border-radius: 10px; cursor: pointer; user-select: none; font-size: 13px; font-weight: 500; transition: border-color .2s; }
.network-dropdown-selected:hover, .network-dropdown-selected.open { border-color: var(--mx-gold-line); }
.net-dropdown-icon { display: flex; align-items: center; justify-content: center; color: var(--gold, #d4af37); }
.dropdown-arrow { margin-left: auto; color: var(--text-secondary); font-size: 10px; }
.network-dropdown-options { position: absolute; top: 100%; left: 0; right: 0; margin-top: 6px; max-height: 320px; overflow-y: auto; z-index: 1000; background: #141413; border: 1px solid var(--mx-line-strong); border-radius: 12px; box-shadow: 0 18px 40px rgba(0,0,0,.55); }
.network-dropdown-options::-webkit-scrollbar { width: 6px; } .network-dropdown-options::-webkit-scrollbar-thumb { background: var(--mx-line-strong); border-radius: 3px; }
.net-dropdown-option { display: flex; align-items: center; gap: 10px; padding: 9px 14px; cursor: pointer; border-bottom: 1px solid var(--mx-line); border-left: 2px solid transparent; transition: background .15s; }
.net-dropdown-option:last-child { border-bottom: 0; }
.net-dropdown-option:hover { background: var(--mx-surface-2); }
.net-dropdown-option.active { background: var(--mx-gold-wash); border-left-color: var(--gold, #d4af37); }
.net-option-icon { width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; border: 1px solid var(--mx-line); }
.net-option-info { flex: 1; min-width: 0; }
.net-option-name { font-size: 13px; font-weight: 600; color: var(--text-color); }
.net-option-count { font-size: 11px; color: var(--text-secondary); margin-top: 1px; }
.net-dropdown-divider { height: 1px; background: var(--mx-line); margin: 4px 0; }
.net-search-wrap { padding: 8px; border-bottom: 1px solid var(--mx-line); position: relative; }
.net-search-input { width: 100%; padding: 8px 12px 8px 30px; background: var(--mx-surface-2); border: 1px solid var(--mx-line); border-radius: 8px; color: var(--text-color); font-size: 12px; outline: none; }
.net-search-icon { position: absolute; left: 18px; top: 16px; color: var(--text-secondary); font-size: 11px; pointer-events: none; }
.network-search-wrap { position: relative; display: flex; align-items: center; }
.network-search-icon { position: absolute; left: 12px; color: var(--text-secondary); font-size: 12px; pointer-events: none; }
.network-search-input { width: 190px; padding: 9px 12px 9px 32px; background: var(--mx-surface); border: 1px solid var(--mx-line); border-radius: 10px; color: var(--text-color); font-size: 13px; outline: none; transition: border-color .2s, width .25s; }
.network-search-input:focus, .net-search-input:focus, .go-to-input:focus { border-color: var(--mx-gold-line); }
.network-search-input:focus { width: 240px; }
::placeholder { color: var(--text-secondary); opacity: .8; }

/* ===== РАСКЛАДКА ===== */
.dashboard-layout { display: grid; grid-template-columns: 252px minmax(0, 1fr); gap: 28px; align-items: start; }
.main-content { min-width: 0; }
.sidebar { display: flex; flex-direction: column; position: sticky; top: 92px; border: 1px solid var(--mx-line); border-radius: var(--mx-r); background: var(--mx-surface); overflow: hidden; }
.sidebar-card { padding: 16px 18px; border: 0; border-bottom: 1px solid var(--mx-line); border-radius: 0; background: none; }
.sidebar-card:last-child { border-bottom: 0; }
.sidebar-title { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 13px; font-weight: 600; color: var(--text-color); text-transform: none; letter-spacing: 0; }
.sidebar-title i { font-size: 13px; color: var(--gold, #d4af37); }
.metric-row { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; border: 0; }
.metric-label { font-size: 12px; color: var(--text-secondary); }
.metric-value { font-size: 13px; font-weight: 600; }
.geo-map { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.geo-cell { background: var(--mx-surface-2); border-radius: 10px; padding: 8px; text-align: center; }
.geo-symbol { font-size: 11px; font-weight: 700; color: var(--text-color); }
.geo-arrow { font-size: 16px; line-height: 1.2; } .geo-arrow.up { color: var(--green, #4ade80); } .geo-arrow.down { color: var(--red, #f87171); }
.geo-pct { font-size: 11px; font-weight: 600; }
.session-list { display: flex; flex-direction: column; gap: 2px; }
.session-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 7px 0; font-size: 12px; background: none; border-radius: 0; }
.session-name { font-weight: 500; flex: 1; } .session-name i { color: var(--text-secondary); margin-right: 4px; }
.session-status { font-size: 11px; font-weight: 600; } .session-time { font-size: 11px; color: var(--text-secondary); }
.ai-compass { display: flex; align-items: center; gap: 14px; padding: 4px 0; }
.compass-ring { width: 56px; height: 56px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0; transition: all .5s; }
.compass-ring.bullish { border: 2px solid var(--green, #4ade80); background: rgba(74,222,128,.1); color: var(--green, #4ade80); }
.compass-ring.bearish { border: 2px solid var(--red, #f87171); background: rgba(248,113,113,.1); color: var(--red, #f87171); }
.compass-ring.neutral { border: 2px solid var(--gold, #d4af37); background: var(--mx-gold-wash); color: var(--gold, #d4af37); }
.compass-label { font-size: 12px; font-weight: 700; line-height: 1.3; }
.compass-label.bullish { color: var(--green, #4ade80); } .compass-label.bearish { color: var(--red, #f87171); } .compass-label.neutral { color: var(--gold, #d4af37); }

/* ===== ТОП-3: ОДНА ПОЛОСА ===== */
.top-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-bottom: 22px; border: 1px solid var(--mx-line); border-radius: var(--mx-r); background: var(--mx-surface); overflow: hidden; }
.top-card { padding: 18px 20px 14px; cursor: pointer; border-right: 1px solid var(--mx-line); background: none; border-radius: 0; border-top: 0; border-bottom: 0; border-left: 0; transition: background .2s; }
.top-card:last-child { border-right: 0; }
.top-card:hover { background: var(--mx-surface-2); transform: none; box-shadow: none; }
.top-card-header { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; }
.top-card-icon { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; border: 0; }
.top-card-symbol { font-size: 13px; font-weight: 600; color: var(--text-secondary); }
.top-card-price { font-family: var(--mx-f-display); font-size: clamp(18px, 2vw, 26px); font-weight: 600; letter-spacing: -.02em; margin: 2px 0 4px; }
.top-card-change { font-size: 13px; font-weight: 700; } .top-card-change.up { color: var(--green, #4ade80); } .top-card-change.down { color: var(--red, #f87171); }
.top-card-sparkline { width: 100%; height: 54px; margin-top: 10px; display: block; }

/* ===== ПОИСК И СОРТИРОВКА ===== */
.search-bar-wrapper { display: flex; gap: 10px; margin-bottom: 14px; }
.search-input-wrap { flex: 1; position: relative; }
.search-input-wrap > i { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--text-secondary); font-size: 13px; }
.search-input { width: 100%; padding: 12px 44px 12px 40px; background: var(--mx-surface); border: 1px solid var(--mx-line); border-radius: 12px; color: var(--text-color); font-size: 14px; outline: none; transition: border-color .2s, background .2s; }
.search-input:focus { border-color: var(--mx-gold-line); background: var(--mx-surface-2); }
.search-clear { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); width: 24px; height: 24px; border-radius: 50%; border: 0; background: var(--mx-surface-2); color: var(--text-secondary); font-size: 11px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.search-clear:hover { color: var(--text-color); }
.sort-select { padding: 12px 14px; min-width: 150px; background: var(--mx-surface); border: 1px solid var(--mx-line); border-radius: 12px; color: var(--text-color); font-size: 13px; outline: none; cursor: pointer; }
.sort-select option { background: #181816; color: #eee; }
/* Кнопка «?» рядом с селектом сортировки (рядом, не внутри select — иначе ломается) */
.sort-help-wrap { display: inline-flex; align-items: center; gap: 2px; }
.sort-help-wrap .mt-help-btn { flex-shrink: 0; }

/* ===== ТАБЛИЦА ===== */
.table-wrapper { border: 1px solid var(--mx-line); border-radius: var(--mx-r); background: var(--mx-surface); overflow-x: auto; overflow-y: hidden; }
.market-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.market-table thead th { padding: 14px 12px; text-align: left; font-size: 12px; font-weight: 500; color: var(--text-secondary); text-transform: none; letter-spacing: 0; white-space: nowrap; background: none; border-bottom: 1px solid var(--mx-line-strong); vertical-align: bottom; }
.market-table thead th:not(:first-child) { text-align: center; }
.market-table thead th:nth-child(2) { text-align: left; min-width: 150px; }
.market-table tbody tr { border-bottom: 1px solid var(--mx-line); transition: background .15s; }
.market-table tbody tr:last-child { border-bottom: 0; }
.market-table tbody tr:hover { background: var(--mx-gold-wash); }
.market-table tbody td { padding: 12px; vertical-align: middle; color: var(--text-color); }
.market-table tbody td:not(:first-child) { text-align: center; }
.market-table tbody td:nth-child(2) { text-align: left; }
.market-table tbody td:first-child { box-shadow: inset 2px 0 0 transparent; transition: box-shadow .15s; }
.market-table tbody tr:hover td:first-child { box-shadow: inset 2px 0 0 var(--gold, #d4af37); }
.asset-col { min-width: 150px; }
.asset-cell { display: flex; align-items: center; gap: 11px; }
.asset-icon-compact { width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0; }
.asset-text { min-width: 0; }
.asset-name { font-weight: 600; font-size: 13px; line-height: 1.25; color: var(--text-color); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.asset-symbol { font-size: 12.5px; color: var(--text-secondary); margin-top: 2px; }
.price-cell { font-weight: 700; font-size: 14px; white-space: nowrap; }
.change-cell, .change-5m { font-weight: 600; font-size: 13px; white-space: nowrap; }
.change-cell.up, .change-5m.up { color: var(--green, #4ade80); } .change-cell.down, .change-5m.down { color: var(--red, #f87171); }
.change-5m { font-size: 12px; }
.network-cell { font-size: 12px; color: var(--text-secondary); white-space: nowrap; }
.network-cell .net-icon, .net-icon { display: inline-flex; align-items: center; justify-content: center; margin-right: 4px; font-size: 11px; vertical-align: middle; }
.sparkline-cell { width: 112px; }
.sparkline-canvas { width: 96px; height: 36px; }
.spark-tf { display: inline-flex; gap: 2px; margin-top: 6px; padding: 2px; border-radius: 8px; background: var(--mx-surface-2); }
.spark-tf-btn { border: 0; background: transparent; border-radius: 6px; padding: 3px 8px; color: var(--text-secondary); font-size: 11px; font-weight: 600; line-height: 1.4; cursor: pointer; transition: background .15s, color .15s; }
.spark-tf-btn:hover { color: var(--text-color); }
.spark-tf-btn.active { background: var(--gold, #d4af37); color: #17130a; }
.spark-period { font-size: 11.5px; font-weight: 600; text-align: center; margin-top: 1px; color: var(--text-secondary); }
.spark-period.up { color: var(--green, #4ade80); } .spark-period.down { color: var(--red, #f87171); }
.chart-tf-label { font-size: 12px; color: var(--gold, #d4af37); font-weight: 600; margin-left: 8px; }
.high-low-cell { font-size: 12px; color: var(--text-secondary); white-space: nowrap; }
.high-low-cell .high { color: var(--green, #4ade80); } .high-low-cell .low { color: var(--red, #f87171); }
.mcap-cell, .volume-cell { font-weight: 500; font-size: 13px; white-space: nowrap; }
.volume-bar-track { display: inline-block; width: 44px; height: 4px; background: var(--mx-surface-2); border-radius: 2px; overflow: hidden; vertical-align: middle; margin-left: 8px; }
.volume-bar-fill { display: block; height: 100%; border-radius: 2px; }
.leader-badge { display: inline-flex; align-items: center; justify-content: center; width: 15px; height: 15px; margin-left: 5px; border-radius: 50%; background: var(--gold, #d4af37); color: #17130a; font-size: 9px; font-weight: 800; }
.trend-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.trend-dot.up { background: var(--green, #4ade80); } .trend-dot.down { background: var(--red, #f87171); }

/* ===== СОСТОЯНИЯ ===== */
.state-row td { text-align: center !important; padding: 56px 20px !important; }
.state-box { display: inline-flex; flex-direction: column; align-items: center; gap: 10px; color: var(--text-secondary); font-size: 14px; }
.state-box i { font-size: 26px; color: var(--gold, #d4af37); opacity: .8; } .state-box.err i { color: var(--red, #f87171); opacity: 1; } .state-box small { font-size: 12px; opacity: .75; }
.state-retry { margin-top: 6px; padding: 9px 20px; border: 0; border-radius: 10px; background: var(--gold, #d4af37); color: #17130a; font-size: 13px; font-weight: 700; cursor: pointer; transition: opacity .2s; }
.state-retry:hover { opacity: .88; }
.skel { display: inline-block; height: 10px; border-radius: 5px; background: linear-gradient(90deg, var(--mx-surface-2), var(--mx-gold-wash), var(--mx-surface-2)); background-size: 200% 100%; animation: skelSlide 1.3s ease-in-out infinite; vertical-align: middle; }
@keyframes skelSlide { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ===== МИНИ-ГРАФИК И СВОДКА ===== */
.mini-chart-panel { display: none; margin-top: 14px; padding: 16px 18px; border: 1px solid var(--mx-line); border-radius: var(--mx-r); background: var(--mx-surface); }
.mini-chart-panel.visible { display: block; }
.mini-chart-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.mini-chart-title { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
.mini-chart-close { background: none; border: 0; color: var(--text-secondary); cursor: pointer; font-size: 14px; } .mini-chart-close:hover { color: var(--gold, #d4af37); }
.mini-chart-canvas-wrap, .mini-chart-canvas-wrap canvas { height: 80px; width: 100%; }
.daily-summary { margin-top: 18px; padding: 18px 20px; border: 1px solid var(--mx-line); border-radius: var(--mx-r); background: var(--mx-surface); }
.summary-title { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; font-size: 14px; font-weight: 600; }
.summary-title i { color: var(--gold, #d4af37); }
.summary-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.summary-item { padding: 0 16px; border-left: 1px solid var(--mx-line); text-align: left; overflow: hidden; }
.summary-item:first-child { padding-left: 0; border-left: 0; }
.summary-label { font-size: 12px; color: var(--text-secondary); margin-bottom: 5px; }
.summary-value { font-size: 15px; font-weight: 700; } .summary-value.green { color: var(--green, #4ade80); } .summary-value.red { color: var(--red, #f87171); } .summary-value.gold { color: var(--gold, #d4af37); }

/* ===== ПАГИНАЦИЯ ===== */
.pagination-wrapper { display: flex; justify-content: space-between; align-items: center; gap: 16px 24px; flex-wrap: wrap; margin-top: 18px; padding: 0; background: none; border: 0; }
.pagination-nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; flex: 1; justify-content: flex-start; }
.page-btn { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; height: 36px; padding: 0 10px; border: 1px solid transparent; border-radius: 10px; background: transparent; color: var(--text-secondary); font-size: 13px; font-weight: 500; cursor: pointer; transition: background .15s, color .15s; }
.page-btn:hover { background: var(--mx-surface-2); color: var(--text-color); }
.page-btn.active { background: var(--gold, #d4af37); color: #17130a; font-weight: 700; }
.page-btn.arrow-btn { border-color: var(--mx-line); font-size: 11px; }
.page-ellipsis { padding: 0 4px; color: var(--text-secondary); user-select: none; }
.pagination-controls { display: flex; align-items: center; padding: 0; background: none; border: 0; }
.pagination-go-to { display: flex; align-items: center; gap: 8px; }
.go-to-label { font-size: 12px; color: var(--text-secondary); white-space: nowrap; }
.go-to-input { width: 56px; height: 36px; background: var(--mx-surface); border: 1px solid var(--mx-line); border-radius: 10px; color: var(--text-color); font-size: 13px; text-align: center; outline: none; }
.go-to-btn { width: 36px; height: 36px; border: 0; border-radius: 10px; background: var(--gold, #d4af37); color: #17130a; font-size: 12px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.pagination-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; padding: 0; background: none; border: 0; text-align: right; }
.pagination-info-row { display: flex; gap: 6px; justify-content: flex-end; font-size: 12px; color: var(--text-secondary); }
.pagination-info-row .info-gold { color: var(--gold, #d4af37); font-weight: 700; } .pagination-info-row .info-value { color: var(--text-color); font-weight: 600; }

/* ===== ПРЕВЬЮ АКТИВА ===== */
.asset-preview-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 9998; display: none; }
.asset-preview-panel { position: fixed; right: -360px; top: 0; width: 340px; max-width: 92vw; height: 100vh; padding: 28px 24px; background: #121211; border-left: 1px solid var(--mx-line-strong); z-index: 9999; transition: right .3s cubic-bezier(.22,1,.36,1); overflow-y: auto; }
.asset-preview-panel.visible, .asset-preview-panel[style*="display: block"] { right: 0; }
.preview-close { position: absolute; top: 14px; right: 14px; background: none; border: 0; color: var(--text-secondary); font-size: 18px; cursor: pointer; } .preview-close:hover { color: var(--gold, #d4af37); }
.preview-header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.preview-icon { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.preview-name { font-size: 16px; font-weight: 700; } .preview-symbol { font-size: 12px; color: var(--text-secondary); }
.preview-price { font-family: var(--mx-f-display); font-size: 26px; font-weight: 600; letter-spacing: -.02em; margin: 14px 0 18px; }
.preview-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.preview-stat { padding: 12px; border-radius: 12px; background: var(--mx-surface-2); }
.preview-stat-label { font-size: 12px; color: var(--text-secondary); } .preview-stat-value { font-size: 15px; font-weight: 700; margin-top: 4px; }

/* ===== МОДАЛЬНОЕ ОКНО АКТИВА ===== */
.asset-modal-overlay { position: fixed; inset: 0; z-index: 10000; display: none; align-items: center; justify-content: center; background: rgba(0,0,0,.72); backdrop-filter: blur(6px); }
.asset-modal-overlay.active { display: flex; }
.asset-modal { position: relative; width: 94%; max-width: 1400px; height: 92vh; overflow-y: auto; background: #111110; border: 1px solid var(--mx-line-strong); border-radius: 20px; box-shadow: 0 30px 80px rgba(0,0,0,.7); animation: assetModalIn .28s cubic-bezier(.22,1,.36,1); }
@keyframes assetModalIn { from { opacity: 0; transform: translateY(20px) scale(.98); } to { opacity: 1; transform: none; } }
.asset-modal-header { position: sticky; top: 0; z-index: 10; display: flex; justify-content: space-between; align-items: center; padding: 20px 28px; background: #111110; border-bottom: 1px solid var(--mx-line); }
.asset-modal-title { font-family: var(--mx-f-display); font-size: clamp(18px, 2.2vw, 26px); font-weight: 600; letter-spacing: -.02em; color: var(--text-color); }
.asset-modal-close { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--mx-line-strong); background: transparent; color: var(--text-secondary); font-size: 15px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: color .15s, border-color .15s; }
.asset-modal-close:hover { color: var(--text-color); border-color: var(--text-secondary); }
.asset-modal-body { padding: 24px 28px 32px; }
/* экран загрузки окна актива: под шапкой окна, на всю видимую высоту (top ставит asset-modal.js) */
.am-loading { position: absolute; left: 0; right: 0; top: 78px; bottom: 0; z-index: 9; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; padding: 0 16px; text-align: center; background: radial-gradient(circle at 50% 40%, #181816 0%, #111110 70%); border-radius: 0 0 20px 20px; transition: opacity .25s cubic-bezier(.2,.8,.2,1), visibility .25s cubic-bezier(.2,.8,.2,1); }
.am-loading.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.asset-modal.am-busy { overflow: hidden; }
body.light .am-loading { background: radial-gradient(circle at 50% 40%, #ffffff 0%, #f1f2f4 70%); }
.asset-modal-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 16px; margin-bottom: 24px; }
.asset-info-card { padding: 18px 20px; border: 1px solid var(--mx-line); border-radius: var(--mx-r); background: var(--mx-surface); }
.asset-info-card h3 { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 14px; font-weight: 600; color: var(--text-color); text-transform: none; letter-spacing: 0; }
.asset-info-card h3 i, .asset-chart-section h3 > i, .asset-description h3 i { color: var(--gold, #d4af37); }
.asset-info-row { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--mx-line); }
.asset-info-row:last-child { border-bottom: 0; }
.asset-info-label { color: var(--text-secondary); font-size: 13px; } .asset-info-value { font-weight: 600; font-size: 13px; text-align: right; }
.asset-chart-section { margin-top: 24px; }
.asset-chart-section h3 { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; font-size: 16px; font-weight: 600; color: var(--text-color); }
.asset-chart-tf { margin-left: auto; display: inline-flex; gap: 2px; padding: 2px; border-radius: 8px; background: var(--mx-surface-2); }
.chart-source-label { font-size: 11px; color: var(--text-secondary); margin-left: 6px; }
.asset-chart-canvas-wrap { position: relative; padding: 14px; overflow: hidden; border: 1px solid var(--mx-line); border-radius: var(--mx-r); background: var(--mx-surface); }
#assetChart { width: 100%; height: 320px; display: block; }
.asset-chart-state { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 20px; font-size: 13px; color: var(--text-secondary); text-align: center; }
.asset-chart-state.hidden { display: none; } .asset-chart-state.error { color: var(--red, #f87171); }
.asset-description { margin-top: 24px; padding: 20px; border: 1px solid var(--mx-line); border-radius: var(--mx-r); background: var(--mx-surface); }
.asset-description h3 { margin-bottom: 10px; font-size: 14px; font-weight: 600; color: var(--text-color); }
.asset-description p { max-width: 75ch; font-size: 14px; line-height: 1.7; color: var(--text-secondary); }
.asset-description p { white-space: pre-line; }
.asset-more { margin-left: 4px; padding: 0; border: 0; background: none; color: var(--gold, #d4af37); font: inherit; font-weight: 600; cursor: pointer; }
.asset-facts { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--mx-line); font-size: 13px; }
.asset-facts .af-row { display: grid; grid-template-columns: 140px 1fr; gap: 12px; padding: 4px 0; }
.asset-facts .af-k { color: var(--text-secondary); }
.asset-facts .af-v { color: var(--text-color); }
.asset-facts .af-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.asset-facts .af-links a { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border: 1px solid var(--mx-line); border-radius: 9px; color: var(--text-color); text-decoration: none; font-size: 12.5px; }
.asset-facts .af-links a:hover { border-color: var(--mx-gold-line); }
.asset-facts .af-links i { color: var(--gold, #d4af37); }
.asset-facts .af-src { margin-top: 10px; font-size: 11px; color: var(--text-secondary); opacity: .75; }

/* ===== ПОЛОСА ОРИЕНТИРОВ + ЛЕГЕНДА ИСТОЧНИКОВ ===== */
.strip-head { display: flex; align-items: center; gap: 12px; margin: 0 0 8px; min-height: 24px; }
.strip-title { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--text-secondary); }
.strip-title i { color: var(--gold, #d4af37); font-size: 13px; }
.strip-legend { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; padding: 5px 10px; border: 1px solid var(--mx-line); border-radius: 999px; font-size: 12.5px; font-weight: 500; color: var(--text-secondary); cursor: pointer; transition: border-color .2s, color .2s; }
.strip-legend:hover { border-color: var(--mx-gold-line); color: var(--text-color); }
.strip-legend i { font-size: 11.5px; color: var(--gold, #d4af37); }

/* ===== ПОЛОСА СОСТОЯНИЯ ВЫБОРКИ (активные фильтры) ===== */
.state-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: -4px 0 12px; font-size: 12px; color: var(--text-secondary); }
.sb-label { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--text-color); }
.sb-label i { color: var(--gold, #d4af37); font-size: 11px; }
.sb-chips { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.af-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 9px; border: 1px solid var(--mx-line); border-radius: 8px; background: var(--mx-surface); color: var(--text-color); font-size: 11px; white-space: nowrap; }
.af-chip b { color: var(--gold, #d4af37); font-weight: 700; }
.af-x { display: inline-flex; align-items: center; justify-content: center; width: 15px; height: 15px; border: 0; border-radius: 4px; background: transparent; color: var(--text-secondary); font-size: 9px; cursor: pointer; }
.af-x:hover { background: var(--mx-surface-2); color: var(--red, #f87171); }
.sb-fav { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border: 1px solid var(--mx-line); border-radius: 8px; cursor: pointer; }
.sb-fav i { color: var(--gold, #d4af37); font-size: 10px; }
.sb-reset { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; padding: 5px 11px; border: 1px solid var(--mx-line); border-radius: 8px; background: transparent; color: var(--text-secondary); font-size: 11px; font-weight: 600; cursor: pointer; transition: color .2s, border-color .2s; }
.sb-reset:hover { color: var(--text-color); border-color: var(--mx-gold-line); }

/* ===== МЕТКИ ИСТОЧНИКА ДАННЫХ В ТАБЛИЦЕ ===== */
.demo-badge { display: inline-block; margin-left: 6px; padding: 1px 5px; border: 1px solid rgba(251,191,36,.45); border-radius: 5px; color: #fbbf24; font-size: 9px; font-weight: 700; letter-spacing: .06em; vertical-align: middle; }
.net-guessed { border-bottom: 1px dotted var(--text-secondary); cursor: help; }
.fav-star { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; margin-left: 2px; border: 0; border-radius: 6px; background: transparent; color: var(--mx-line-strong); font-size: 12px; cursor: pointer; transition: color .15s, background .15s, transform .15s; }
.fav-star:hover { color: var(--gold, #d4af37); background: var(--mx-gold-wash); }
.fav-star.on { color: var(--gold, #d4af37); }
.fav-star.on:hover { transform: scale(1.12); }

/* ===== СОРТИРОВКА КЛИКОМ ПО ЗАГОЛОВКУ ===== */
.market-table thead th[data-sort] { cursor: pointer; user-select: none; transition: color .15s; }
.market-table thead th[data-sort]:hover { color: var(--text-color); }
.market-table thead th.sorted { color: var(--text-color); }
.sort-ico { display: inline-block; min-width: 9px; margin-left: 4px; font-size: 9px; color: var(--gold, #d4af37); opacity: 0; }
.market-table thead th.sorted .sort-ico { opacity: 1; }

/* ===== АДАПТИВ ===== */
@media (max-width: 1100px) {
  .dashboard-layout { grid-template-columns: 1fr; gap: 22px; }
  .main-content { order: 1; } .sidebar { order: 2; position: static; display: grid; grid-template-columns: repeat(2, 1fr); }
  .sidebar-card { border-right: 1px solid var(--mx-line); } .sidebar-card:nth-child(2n) { border-right: 0; }
}
@media (max-width: 760px) {
  .hide-mobile { display: none; }
  .page-content .hero { padding-bottom: 16px; }
  .filters-bar { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; } .filters-bar::-webkit-scrollbar { display: none; }
  .chip-sep { flex-shrink: 0; }
  .top-cards { grid-template-columns: 1fr; } .top-card { border-right: 0; border-bottom: 1px solid var(--mx-line); } .top-card:last-child { border-bottom: 0; }
  .search-bar-wrapper { flex-direction: column; } .sort-select { width: 100%; }
  .market-table thead th, .market-table tbody td { padding: 10px 6px; } .price-cell { font-size: 13px; }
  .summary-grid { grid-template-columns: 1fr 1fr; row-gap: 16px; } .summary-item:nth-child(3) { padding-left: 0; border-left: 0; }
  .sidebar { grid-template-columns: 1fr; } .sidebar-card { border-right: 0; }
  .pagination-wrapper { flex-direction: column; align-items: flex-start; } .pagination-info { text-align: left; } .pagination-info-row { justify-content: flex-start; }
  .asset-modal { width: 100%; height: 100vh; border-radius: 0; } .asset-modal-header, .asset-modal-body { padding-left: 16px; padding-right: 16px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ===== СВЕТЛАЯ ТЕМА ===== */
body.light .network-dropdown-options, body.light .asset-modal, body.light .asset-modal-header, body.light .asset-preview-panel { background: #fff; color: #141414; }
body.light .sort-select option { background: #fff; color: #141414; }
body.light .market-table tbody td, body.light .asset-name { color: #141414; }
body.light .change-cell.up, body.light .change-5m.up, body.light .top-card-change.up { color: #15803d; }
body.light .change-cell.down, body.light .change-5m.down, body.light .top-card-change.down { color: #b91c1c; }
body.light .hero-live { background: #fff; }
body.light .filter-chip.active, body.light .page-btn.active, body.light .spark-tf-btn.active { color: #17130a; }

/* ===== Финальная полировка: источник, вспышка, скелетон, sticky, F&G ===== */
.src-dot { display:inline-block; width:6px; height:6px; border-radius:50%; margin-right:7px; vertical-align:middle; background:#fbbf24; opacity:.8; }
.src-dot.live { background:#34d399; box-shadow:0 0 6px rgba(52,211,153,.7); }
.skel { color: transparent !important; border-radius:4px; min-width:56px; display:inline-block; background: linear-gradient(90deg, rgba(255,255,255,.05) 25%, rgba(255,255,255,.14) 50%, rgba(255,255,255,.05) 75%); background-size:200% 100%; animation: skel 1.2s linear infinite; user-select:none; }
@keyframes skel { to { background-position: -200% 0; } }
@media (min-width: 761px) {
  /* таблица скроллится сама (и по горизонтали, и по вертикали) — шапка колонок прилипает внутри неё */
  .table-wrapper { overflow: auto; max-height: calc(100vh - 32px); scrollbar-width: thin; }
  .market-table thead th { position: sticky; top: 0; z-index: 5; background: #141412; }
  body.light .market-table thead th { background: #f7f7f8; }
}
.fng-gauge { padding: 4px 16px 12px; text-align:center; }
.fng-gauge svg { width:100%; max-width:170px; height:auto; display:block; margin:0 auto; }
.fng-gauge .fng-lbl { font-size:11px; color:var(--text-secondary); margin-top:-4px; }
@media (prefers-reduced-motion: reduce) { .skel { animation:none; } }

/* звёздочка избранного в строке — общее избранное сайта (10.10.2026) */
.fav-btn { width: 26px; height: 26px; margin-right: 6px; border: 0; border-radius: 6px; background: transparent; color: var(--text-secondary); cursor: pointer; font-size: 13px; opacity: .45; vertical-align: middle; }
tr:hover .fav-btn { opacity: 1; }
.fav-btn:hover { color: #d4af37; background: rgba(212,175,55,.1); opacity: 1; }
.fav-btn.on { color: #d4af37; opacity: 1; }
