/**
 * ForTraders — конкурсы 2026 v2 (кит bf7e7202): стили страницы счёта участника.
 * Базовые токены и примитивы — в contest-2026-core.css.
 *
 * V2: одна контентная колонка (вложенный .ft26-cols ликвидирован), справа только
 * баннерный сайдбар 300px. Hero-карточка с StatStrip, табы Обзор/Сделки/По дням/
 * Проверка правил, серверная EquityCurve; Chart.js и все JS-хуки v1 сохранены.
 *
 * Легаси-слой плагина (frontend/css/frontend.css) остаётся подключённым:
 * все переопределения здесь идут с префиксом .ft26.ft26--account (корневой
 * контейнер страницы), чтобы выигрывать по специфичности независимо от
 * порядка загрузки файлов. !important — только там, где легаси сам
 * использует !important (статусные пилюли, .direction-name и т.п.).
 */

/* ── Внешняя сетка: контент + баннерный сайдбар (кит: 856 + 300 + gap) ── */
.ft26-page-account {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 24px;
    align-items: start;
}
.ft26-page-account__main { min-width: 0; }
.ft26-page-account__ad {
    min-width: 0;
    padding: 28px 0 48px;
}
.ft26-page-account__ad img { max-width: 100%; height: auto; }
.ft26--account .top-ad { min-width: 0; }

/* Вертикальный ритм контентной колонки: v2-кит = gap 20 */
.ft26.ft26--account .ft26-shell {
    gap: 20px;
    padding: 28px 0 48px;
}

/* ── Утилита: визуально скрытый заголовок (SEO/i18n сохраняем) ── */
.ft26-vh {
    position: absolute !important;
    width: 1px; height: 1px;
    margin: -1px; padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* ── Заголовки карточек: гасим легаси h2/h3 (28px + underline) ── */
.ft26.ft26--account .ft26-sechead--card .ft26-sechead__title,
.ft26.ft26--account .ft26-tablecard__head .ft26-sechead__title {
    margin: 0;
    padding: 0;
    border: 0;
    font-family: var(--font-interface);
    font-size: 14px;
    font-weight: 750;
    letter-spacing: 0.2px;
    line-height: 1.25;
    color: var(--text-heading);
}

/* ── Панели табов: вертикальный стек карточек ─────────────────── */
.ft26.ft26--account .ft26a-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0;
}
/* специфичность выше правила core .ft26-tabpanel[hidden] — восстанавливаем */
.ft26.ft26--account .ft26a-panel[hidden] { display: none; }

/* ── Hero счёта (ft26-hero2) ───────────────────────────────────── */
.ft26.ft26--account .ft26-hero2 {
    margin: 0;
    padding: 0;
    border-radius: var(--radius-3xl);
    border-color: var(--border-warm, #E6E7E1);
    box-shadow: var(--shadow-hero);
}
.ft26-hero2__body { padding: 28px; }
.ft26-hero2__idrow {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}
.ft26-hero2__idcol { flex: 1; min-width: 220px; }
.ft26-hero2__chips {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}
.ft26.ft26--account .ft26-hero2__title {
    margin: 0;
    padding: 0;
    font-family: var(--font-heading);
    font-size: var(--text-size-2xl);
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-heading);
    overflow-wrap: anywhere;
}
.ft26.ft26--account .ft26-hero2__lead {
    margin: 14px 0 16px;
    max-width: 72ch;
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--gray-550);
}
.ft26-hero2__cta { display: flex; gap: 10px; flex-wrap: wrap; }
.ft26.ft26--account .ft26-hero2__meta {
    display: flex;
    gap: 8px 24px;
    flex-wrap: wrap;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--border-warm, #E6E7E1);
    font-size: 13px;
    color: var(--text-muted);
}
.ft26.ft26--account .ft26-hero2__meta > span {
    display: inline-flex;
    align-items: baseline;
    gap: 5px;
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.4;
    flex-wrap: wrap;
}
.ft26.ft26--account .ft26-hero2__meta b { font-weight: 700; color: var(--text-heading); }
.ft26.ft26--account .ft26-hero2__meta a { font-weight: 600; }

/* Аватар hero (примитива нет в core — локально; места 1–3 рисуют медаль) */
.ft26.ft26--account .ft26-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--ink-800);
    color: #FFFFFF;
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 700;
}
.ft26.ft26--account .ft26-medal--hero { width: 56px; height: 56px; font-size: 22px; }

/* Нейтральные чипы hero крупнее базовых (по киту) */
.ft26-hero2__chips .ft26-chip--neutral {
    padding: 4px 10px;
    font-size: 12px;
    border-radius: var(--radius-md);
}

/* Статус участия → пилюля (легаси красит внутренние спаны с !important) */
.ft26.ft26--account .ft26-hero2__chips .account-participation-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    border: 1px solid rgba(22, 199, 132, 0.3);
    background: rgba(22, 199, 132, 0.1) !important;
    color: var(--up-700) !important;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}
.ft26.ft26--account .ft26-hero2__chips .account-participation-status:has(.status-disqualified) {
    background: rgba(240, 68, 56, 0.07) !important;
    color: var(--down-500) !important;
    border-color: rgba(240, 68, 56, 0.25);
}
.ft26.ft26--account .ft26-hero2__chips .account-participation-status:has(.status-quitted) {
    background: var(--gray-100) !important;
    color: var(--text-meta-color) !important;
    border-color: var(--border-soft);
}
.ft26.ft26--account .account-participation-status .status-disqualified,
.ft26.ft26--account .account-participation-status .status-quitted,
.ft26.ft26--account .account-participation-status .status-participating {
    display: inline !important;
    min-height: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    background-color: transparent !important;
    color: inherit !important;
    font-size: inherit !important;
    font-weight: inherit !important;
    line-height: inherit !important;
    letter-spacing: inherit !important;
    text-transform: inherit !important;
}

/* Статус соединения: пульс из кита (раздеваем легаси-пилюлю min-height 36) */
.ft26.ft26--account .ft26-hero2__chips .account-connection-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--up-600);
    white-space: nowrap;
}
.ft26.ft26--account .ft26-hero2__chips .account-connection-status:has(.status-disconnected) {
    color: var(--down-500);
}
.ft26.ft26--account .account-connection-status .status-indicator {
    position: relative;
    display: inline-block;
    flex: none;
    width: 8px;
    height: 8px;
    margin-right: 0;
    border-radius: 50%;
    background: var(--up-500);
    color: var(--up-500);
}
.ft26.ft26--account .account-connection-status .status-indicator.status-disconnected {
    background: var(--down-500);
    color: var(--down-500);
}
.ft26.ft26--account .account-connection-status .status-indicator.status-connected::after {
    content: "";
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    border: 1.5px solid currentColor;
    opacity: 0;
    animation: ft26Ring 2s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}
@media (prefers-reduced-motion: reduce) {
    .ft26.ft26--account .account-connection-status .status-indicator.status-connected::after { animation: none; }
}

/* «Обновлено: …» — тон по свежести (JS тогглит recent/moderate/stale) */
.ft26.ft26--account .ft26-hero2__meta .account-updated { color: var(--text-subtle); }
.ft26.ft26--account .ft26-hero2__meta .account-updated.moderate { color: var(--amber-deep); }
.ft26.ft26--account .ft26-hero2__meta .account-updated.stale { color: var(--down-500); }

/* ── StatStrip: адаптация плиток под счёт ──────────────────────── */
/* полоса в hero прижата к скруглению 26px */
.ft26.ft26--account .ft26-hero2__strip {
    border-radius: 0 0 calc(var(--radius-3xl) - 1px) calc(var(--radius-3xl) - 1px);
}
/* тултипы в лейблах не должны клипаться ellipsis'ом */
.ft26.ft26--account .ft26-stattile__label { overflow: visible; }
/* вторая строка плитки (дельта/примечание) */
.ft26-stattile__sub {
    display: block;
    margin-top: 3px;
    font-size: 11.5px;
    line-height: 1.3;
    color: var(--text-meta-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ft26.ft26--account .ft26-stattile__sub.ft26-num { font-size: 12px; font-weight: 700; }
.ft26.ft26--account .ft26-stattile__sub.profit-positive { color: var(--up-600); }
.ft26.ft26--account .ft26-stattile__sub.profit-negative { color: var(--down-500); }
/* значение всегда чернильное — тон несёт __sub (в т.ч. #drawdown-value от JS) */
.ft26.ft26--account .ft26-stattile__value.profit-positive,
.ft26.ft26--account .ft26-stattile__value.profit-negative { color: var(--text-heading); }
/* JS-заглушки «Нет данных» в плитке просадки */
.ft26.ft26--account .ft26-stattile .error {
    font-family: var(--font-interface);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-subtle);
}
.ft26.ft26--account .loading-indicator {
    display: inline-block;
    color: var(--text-subtle);
    animation: ft26LoadingPulse 1.2s ease-in-out infinite;
}
@keyframes ft26LoadingPulse {
    0%, 100% { opacity: 0.35; }
    50% { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
    .ft26.ft26--account .loading-indicator { animation: none; }
}

/* ── Карточка «Показатели счёта»: шапка + двойной StatStrip ────── */
.ft26-metrics__head { padding: 16px 20px 0; }
.ft26-metrics__head .ft26-sechead { margin-bottom: 12px; }
/* вторая полоса без разделителя (примитива --flat нет в core — локально) */
.ft26.ft26--account .ft26-statstrip--flat {
    border-top: 0;
    padding-top: 0;
}

/* ── Карточка «Кривая доходности» (EquityCurve, серверный SVG) ─── */
/* фикс-высота кита 190px (core задаёт height:auto) */
.ft26.ft26--account .ft26-curve svg { height: 190px; }

/* ── Блоки ошибок (дисквалификация / соединение) ───────────────── */
.ft26.ft26--account .account-error-block {
    margin: 0;
    padding: 16px 18px;
    border: 1px solid;
    border-radius: var(--radius-xl);
    box-shadow: none;
}
.ft26.ft26--account .account-error-block.disqualification-block {
    background: var(--amber-badge-bg);
    border-color: var(--amber-tint-border);
}
.ft26.ft26--account .account-error-block.connection-error-block {
    background: rgba(240, 68, 56, 0.05);
    border-color: rgba(240, 68, 56, 0.25);
}
.ft26.ft26--account .account-error-title {
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-heading);
}
.ft26.ft26--account .account-error-description {
    padding: 0;
    white-space: pre-wrap;
    font-size: 13px;
    line-height: 1.55;
    color: var(--text-body);
}

/* ── Блок действий ─────────────────────────────────────────────── */
.ft26-actions__row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}
.ft26.ft26--account .ft26-actions .account-actions { display: contents; }
.ft26.ft26--account .ft26-actions .ft26-btn {
    min-height: 0;
    height: var(--control-h);
    padding: 0 18px;
    border-radius: var(--radius-sm);
    font-family: var(--font-interface);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.1;
    box-shadow: none;
}
.ft26.ft26--account .ft26-actions .ft26-btn--primary {
    background: var(--amber-500);
    border-color: transparent;
    color: var(--text-on-brand);
}
.ft26.ft26--account .ft26-actions .ft26-btn--primary:hover {
    background: var(--amber-700);
    color: var(--text-on-brand);
    transform: translateY(-2px);
    box-shadow: var(--shadow-brand);
}
.ft26.ft26--account .ft26-actions .ft26-btn--secondary {
    background: var(--surface-card);
    border-color: var(--border-default);
    color: var(--text-heading);
    font-weight: 650;
}
.ft26.ft26--account .ft26-actions .ft26-btn--secondary:hover {
    background: var(--surface-card);
    border-color: var(--border-strong);
    color: var(--text-heading);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}
.ft26.ft26--account .ft26-actions .ft26-btn--danger {
    background: transparent;
    border-color: rgba(240, 68, 56, 0.35);
    color: var(--down-500);
}
.ft26.ft26--account .ft26-actions .ft26-btn--danger:hover {
    background: rgba(240, 68, 56, 0.06);
    color: var(--down-500);
    transform: none;
    box-shadow: none;
}
/* #clear-order-history в легаси покрашен по id (оранжевый) — перебиваем */
.ft26.ft26--account #clear-order-history {
    margin: 0;
    background: transparent;
    color: var(--down-500);
}
.ft26.ft26--account #clear-order-history:hover { background: rgba(240, 68, 56, 0.06); }
.ft26.ft26--account .ft26-actions .account-action-button.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Панель статуса обновления (#refresh-status — фазы is-*) */
.ft26.ft26--account #refresh-status { margin-top: 12px; }
.ft26.ft26--account #refresh-status.is-idle { display: none; }
.ft26.ft26--account #refresh-status .account-refresh-panel {
    display: grid;
    gap: 10px;
    padding: 14px;
    border: 1px solid var(--amber-tint-border);
    border-radius: var(--radius-lg);
    background: var(--amber-badge-bg);
    box-shadow: none;
}
.ft26.ft26--account #refresh-status .account-refresh-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.ft26.ft26--account #refresh-status .account-refresh-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--amber-deep);
}
.ft26.ft26--account #refresh-status .account-refresh-spinner {
    border-color: rgba(204, 146, 31, 0.25);
    border-top-color: var(--amber-deep);
}
.ft26.ft26--account #refresh-status .account-refresh-timer {
    font-family: var(--font-data);
    font-variant-numeric: tabular-nums;
    font-size: 12px;
    font-weight: 700;
    color: var(--amber-deep);
}
.ft26.ft26--account #refresh-status .account-refresh-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-heading);
}
.ft26.ft26--account #refresh-status .account-refresh-meta {
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--text-meta-color);
}
.ft26.ft26--account #refresh-status .account-refresh-progress {
    height: 6px;
    border-radius: var(--radius-pill);
    background: var(--gray-150);
}
.ft26.ft26--account #refresh-status .account-refresh-progress-bar {
    background: var(--amber-500);
    border-radius: inherit;
}
.ft26.ft26--account #refresh-status.is-success .account-refresh-panel {
    border-color: rgba(22, 199, 132, 0.3);
    background: rgba(22, 199, 132, 0.07);
}
.ft26.ft26--account #refresh-status.is-success .account-refresh-badge { color: var(--up-700); }
.ft26.ft26--account #refresh-status.is-success .account-refresh-spinner {
    border-color: rgba(22, 199, 132, 0.2);
    border-top-color: var(--up-600);
}
.ft26.ft26--account #refresh-status.is-success .account-refresh-progress-bar { background: var(--up-500); }
.ft26.ft26--account #refresh-status.is-error .account-refresh-panel {
    border-color: rgba(240, 68, 56, 0.3);
    background: rgba(240, 68, 56, 0.05);
}
.ft26.ft26--account #refresh-status.is-error .account-refresh-badge { color: var(--down-500); }
.ft26.ft26--account #refresh-status.is-error .account-refresh-spinner { border-top-color: var(--down-500); }
.ft26.ft26--account #refresh-status.is-error .account-refresh-progress-bar { background: var(--down-500); }

/* Статусные сообщения под действиями */
.ft26.ft26--account .delete-status,
.ft26.ft26--account .account-status-message { margin-top: 10px; font-size: 13px; }
.ft26.ft26--account .delete-status:empty,
.ft26.ft26--account .account-status-message:empty { display: none; }
.ft26.ft26--account #disqualification-status { max-width: 100%; overflow-wrap: break-word; }
.ft26.ft26--account .disqualification-message {
    margin-top: 10px;
    padding: 12px 14px;
    background: rgba(240, 68, 56, 0.05);
    border: 1px solid rgba(240, 68, 56, 0.25);
    border-radius: var(--radius-lg);
}
.ft26.ft26--account .disqualification-title {
    color: var(--down-500);
    font-weight: 700;
    margin-bottom: 8px;
}
.ft26.ft26--account .disqualification-reasons ul { margin: 5px 0 5px 20px; padding: 0; }
.ft26.ft26--account .disqualification-reasons li { margin-bottom: 5px; color: var(--text-body); }

/* ── Тултипы (порт инлайнового <style> шаблона v1) ─────────────── */
.ft26.ft26--account .tooltip-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 15px;
    height: 15px;
    margin-left: 2px;
    background: var(--gray-150);
    color: var(--text-muted);
    border-radius: 50%;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0;
    text-transform: none;
    cursor: help;
    position: relative;
    vertical-align: middle;
}
.ft26.ft26--account .tooltip-icon:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    max-width: 74vw;
    margin-bottom: 8px;
    padding: 10px 12px;
    background: var(--ink-850);
    color: #fff;
    border-radius: 8px;
    font-family: var(--font-interface);
    font-weight: 400;
    font-size: 12.5px;
    line-height: 1.45;
    letter-spacing: normal;
    text-transform: none;
    text-align: left;
    white-space: pre-line;
    box-shadow: var(--shadow-lg);
    z-index: 30;
}
.ft26.ft26--account .tooltip-icon:hover::before {
    content: "";
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 3px;
    border-width: 5px;
    border-style: solid;
    border-color: var(--ink-850) transparent transparent transparent;
    z-index: 31;
}

/* ── Шапки табличных карточек ──────────────────────────────────── */
.ft26-tablecard__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px 14px;
    flex-wrap: wrap;
    padding: 18px 20px 12px;
}
.ft26.ft26--account .ft26-tablecard__head .ft26-live {
    margin-right: auto;
    font-size: 12px;
    font-weight: 700;
}
.ft26.ft26--account .pagination { margin: 0; }
.ft26-histpages form { margin: 0; }

/* Компактные контролы в шапках карточек */
.ft26.ft26--account .ft26-sechead .ft26-select,
.ft26.ft26--account .ft26-tablecard__head .ft26-select {
    width: auto;
    height: 32px;
    padding: 0 28px 0 10px;
    font-size: 13px;
    border-radius: 8px;
    background-position: calc(100% - 16px) 13px, calc(100% - 10px) 13px;
}

/* ── Карточка графика Chart.js ─────────────────────────────────── */
.ft26.ft26--account .chart-controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 0;
    background: transparent;
    border-radius: 0;
}
.ft26.ft26--account .chart-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 4px 16px;
    margin: 4px 0 10px;
    min-height: 18px;
}
.ft26.ft26--account .chart-legend .legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 0;
    border-radius: 0;
    cursor: default;
}
.ft26.ft26--account .chart-legend .legend-color {
    width: 14px;
    height: 3px;
    margin: 0;
    border-radius: 2px;
}
.ft26.ft26--account .chart-legend .legend-label {
    margin: 0;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--text-meta-color);
}
.ft26.ft26--account .chart-legend .legend-value {
    font-family: var(--font-data);
    font-variant-numeric: tabular-nums;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--text-heading);
}
.ft26.ft26--account .chart-legend .legend-item:nth-child(2) .legend-value { color: var(--up-600); }
.ft26.ft26--account .chart-scroll-container {
    margin: 0;
    padding: 0;
    max-width: none;
    overflow-x: auto;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    -webkit-overflow-scrolling: touch;
}
.ft26.ft26--account .chart-container {
    position: relative;
    width: 100% !important;
    height: 320px !important;
    margin: 0;
}
.ft26.ft26--account #chart-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid var(--border-warm, #E6E7E1);
    border-radius: 8px;
    box-shadow: var(--shadow-xs);
    font-size: 13px;
    color: var(--text-muted);
    z-index: 10;
}
.ft26.ft26--account #chart-loading.hidden { display: none; }

/* Мини-график equity: узел жив для admin/js/account-chart.js, но скрыт —
   его роль выполняет серверная «Кривая доходности» */
.ft26.ft26--account .ft26-equitymini { display: none; }

/* ── Таблица «Статистика по инструментам» ──────────────────────── */
.ft26.ft26--account .symbols-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    flex-wrap: wrap;
}
.ft26.ft26--account .symbols-controls button.ft26-btn {
    margin: 0;
    height: 32px;
    padding: 0 12px;
    background: transparent;
    border: 1px solid var(--border-default);
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 12.5px;
    font-weight: 650;
    cursor: pointer;
}
.ft26.ft26--account .symbols-controls button.ft26-btn:hover {
    background: var(--surface-sunken);
    color: var(--text-heading);
}
.ft26.ft26--account .symbols-controls .symbol-filter {
    margin-left: 0;
    width: 170px;
    height: 32px;
    padding: 0 10px;
    font-size: 13px;
    border: 1.5px solid var(--border-default);
    border-radius: 8px;
}
.ft26.ft26--account .symbols-table-container {
    margin: 0;
    border: 0;
    border-radius: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.ft26.ft26--account .symbols-table {
    width: 100%;
    min-width: 560px;
    border-collapse: collapse;
    margin: 0;
}
.ft26.ft26--account .symbols-table th {
    position: relative;
    background: var(--surface-warm, #FCFBF6); /* тёплая шапка таблиц кита */
    padding: 8px 14px;
    text-align: right;
    font-family: var(--font-interface);
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: var(--letter-spacing-chip, 0.5px);
    color: var(--text-subtle);
    border-top: 1px solid var(--border-default);
    border-bottom: 1px solid var(--border-default);
    white-space: nowrap;
}
.ft26.ft26--account .symbols-table th:first-child { text-align: left; padding-left: 20px; }
.ft26.ft26--account .symbols-table th.sortable { cursor: pointer; }
.ft26.ft26--account .symbols-table th.sortable:hover { color: var(--text-heading); }
.ft26.ft26--account .symbols-table th.sortable:after {
    content: "⇕";
    position: static;
    margin-left: 4px;
    opacity: 0.35;
}
.ft26.ft26--account .symbols-table th.sortable.asc:after { content: "↑"; opacity: 1; color: var(--amber-deep); }
.ft26.ft26--account .symbols-table th.sortable.desc:after { content: "↓"; opacity: 1; color: var(--amber-deep); }
.ft26.ft26--account .symbols-table td {
    padding: 10px 14px;
    text-align: right;
    font-size: 13.5px;
    font-family: var(--font-data);
    font-variant-numeric: tabular-nums;
    border-bottom: 1px solid var(--border-default);
    vertical-align: middle;
    color: var(--text-body);
}
.ft26.ft26--account .symbols-table td:first-child { text-align: left; padding-left: 20px; }
.ft26.ft26--account .symbols-table tbody tr:last-child td { border-bottom: 0; }
.ft26.ft26--account .symbol-row { cursor: pointer; transition: background 0.2s; }
.ft26.ft26--account .symbol-row:hover { background: var(--gray-25, #FCFBF6); }
.ft26.ft26--account .symbol-row .symbol-name {
    display: flex;
    align-items: center;
    font-family: var(--font-interface);
    font-weight: 700;
    color: var(--text-heading);
}
.ft26.ft26--account .expand-icon {
    display: inline-block;
    width: 16px;
    margin-right: 6px;
    text-align: center;
    font-size: 9px;
    color: var(--text-subtle);
    transition: transform 0.25s var(--ft26-ease);
}
.ft26.ft26--account .expand-icon.expanded { transform: rotate(90deg); color: var(--amber-deep); }
.ft26.ft26--account .symbols-table td.profit-positive { color: var(--up-600); font-weight: 700; }
.ft26.ft26--account .symbols-table td.profit-negative { color: var(--down-500); font-weight: 700; }
.ft26.ft26--account .direction-row { background: var(--gray-50); cursor: pointer; }
.ft26.ft26--account .direction-row td { font-size: 12.5px; }
.ft26.ft26--account .direction-name {
    padding-left: 34px !important;
    font-family: var(--font-interface) !important;
    font-weight: 700;
}
.ft26.ft26--account .direction-row.buy-row .direction-name { color: var(--up-600); }
.ft26.ft26--account .direction-row.sell-row .direction-name { color: var(--down-500); }
.ft26.ft26--account .direction-indent { display: inline-block; width: 0; }
.ft26.ft26--account .direction-icon {
    display: inline-block;
    width: 14px;
    text-align: center;
    font-size: 9px;
    transition: transform 0.25s var(--ft26-ease);
}
.ft26.ft26--account .direction-icon.expanded { transform: rotate(90deg); }
.ft26.ft26--account .trades-row { background: var(--gray-75); }
.ft26.ft26--account .trades-row td { font-size: 12.5px; color: var(--text-meta-color); }
.ft26.ft26--account .trades-name {
    padding-left: 52px !important;
    font-family: var(--font-interface) !important;
    font-size: 12.5px;
}
.ft26.ft26--account .trades-row.positive-trades-row .trades-name { color: var(--up-600); }
.ft26.ft26--account .trades-row.negative-trades-row .trades-name { color: var(--down-500); }
.ft26.ft26--account .trades-indent { display: inline-block; width: 8px; }

/* ── Таблицы «Открытые позиции» / «История сделок» ─────────────── */
.ft26.ft26--account .orders-table-container {
    margin: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.ft26.ft26--account .orders-table {
    width: 100%;
    min-width: 640px;
    border-collapse: collapse;
    margin: 0;
}
.ft26.ft26--account .orders-table th {
    background: var(--surface-warm, #FCFBF6); /* тёплая шапка таблиц кита */
    padding: 8px 14px;
    text-align: right;
    font-family: var(--font-interface);
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: var(--letter-spacing-chip, 0.5px);
    color: var(--text-subtle);
    border-top: 1px solid var(--border-default);
    border-bottom: 1px solid var(--border-default);
    white-space: nowrap;
}
.ft26.ft26--account .orders-table th:nth-child(-n+3) { text-align: left; }
.ft26.ft26--account .orders-table th:first-child { padding-left: 20px; }
.ft26.ft26--account .orders-table td {
    padding: 10px 14px;
    text-align: right;
    font-size: 13.5px;
    font-family: var(--font-data);
    font-variant-numeric: tabular-nums;
    border-bottom: 1px solid var(--border-default);
    color: var(--text-body);
    vertical-align: middle;
    white-space: nowrap;
}
.ft26.ft26--account .orders-table td:nth-child(-n+3) { text-align: left; }
.ft26.ft26--account .orders-table td:first-child { padding-left: 20px; }
.ft26.ft26--account .orders-table tbody tr:last-child td { border-bottom: 0; }
.ft26.ft26--account .orders-table tbody tr:hover td,
.ft26.ft26--account .orders-table tbody tr.hover td { background: var(--gray-25, #FCFBF6); }
.ft26.ft26--account .orders-table .ft26-cell-ticket { color: var(--text-subtle); }
.ft26.ft26--account .orders-table .ft26-cell-symbol {
    font-family: var(--font-interface);
    font-weight: 700;
    color: var(--text-heading);
}
/* тип рисует чип, а не цвет ячейки */
.ft26.ft26--account .orders-table td.order-buy,
.ft26.ft26--account .orders-table td.order-sell,
.ft26.ft26--account .orders-table td.order-unknown { color: var(--text-body); font-weight: 400; }
.ft26.ft26--account .orders-table .ft26-chip { font-family: var(--font-interface); }
.ft26.ft26--account .orders-table td.ft26-cell-profit.profit-positive { color: var(--up-600); font-weight: 700; }
.ft26.ft26--account .orders-table td.ft26-cell-profit.profit-negative { color: var(--down-500); font-weight: 700; }
/* балансовые операции: тикет/символ приглушены, сумма — чернильная */
.ft26.ft26--account .orders-table tr.is-balance .ft26-cell-symbol {
    color: var(--text-subtle);
    font-weight: 400;
    font-family: var(--font-data);
}
.ft26.ft26--account .orders-table tr.is-balance td.ft26-cell-profit.profit-positive,
.ft26.ft26--account .orders-table tr.is-balance td.ft26-cell-profit.profit-negative { color: var(--text-heading); }

.ft26.ft26--account .no-orders,
.ft26.ft26--account .no-data {
    margin: 0;
    padding: 4px 20px 18px;
    color: var(--text-subtle);
    font-size: 13.5px;
    font-style: normal;
    text-align: left;
}

/* ── История изменений счёта ───────────────────────────────────── */
.ft26.ft26--account .history-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin: 0;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
}
.ft26.ft26--account select.history-filter { min-width: 0; max-width: 210px; }
.ft26.ft26--account #sort_date {
    height: 32px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--surface-card);
    border: 1px solid var(--border-default);
    border-radius: 8px;
    font-family: var(--font-interface);
    font-size: 12.5px;
    font-weight: 650;
    color: var(--text-heading);
    cursor: pointer;
}
.ft26.ft26--account #sort_date:hover {
    background: var(--surface-card);
    border-color: var(--border-strong);
}
.ft26.ft26--account #sort_date .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    line-height: 1;
}
.ft26.ft26--account #account-history-wrapper {
    padding: 8px 20px 16px;
    min-height: 48px;
    font-size: 13px;
    color: var(--text-meta-color);
}
.ft26.ft26--account #account-history-wrapper:has(table) { padding: 0 0 4px; }
.ft26.ft26--account #account-history-wrapper.loading { opacity: 0.55; }
/* AJAX-таблица приходит из admin/views/history-table.php (table.widefat) */
.ft26.ft26--account #account-history-wrapper table.widefat {
    width: 100%;
    border-collapse: collapse;
    border: 0;
    box-shadow: none;
    background: transparent;
}
.ft26.ft26--account #account-history-wrapper table.widefat th {
    background: var(--surface-warm, #FCFBF6);
    padding: 8px 14px;
    text-align: left;
    font-family: var(--font-interface);
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: var(--letter-spacing-chip, 0.5px);
    color: var(--text-subtle);
    border-top: 1px solid var(--border-default);
    border-bottom: 1px solid var(--border-default);
    white-space: nowrap;
}
.ft26.ft26--account #account-history-wrapper table.widefat td {
    padding: 10px 14px;
    font-size: 13px;
    font-family: var(--font-data);
    font-variant-numeric: tabular-nums;
    border-bottom: 1px solid var(--border-default);
    color: var(--text-body);
}
.ft26.ft26--account #account-history-wrapper table.widefat th:first-child,
.ft26.ft26--account #account-history-wrapper table.widefat td:first-child { padding-left: 20px; }
.ft26.ft26--account #account-history-wrapper table.widefat tbody tr:last-child td { border-bottom: 0; }
.ft26.ft26--account #account-history-wrapper .change-percent {
    display: inline-block;
    padding: 2px 8px;
    border-radius: var(--radius-pill);
    font-family: var(--font-data);
    font-size: 12px;
    font-weight: 700;
}
.ft26.ft26--account #account-history-wrapper .change-percent.positive {
    color: var(--up-600);
    background: rgba(22, 199, 132, 0.12);
}
.ft26.ft26--account #account-history-wrapper .change-percent.negative {
    color: var(--down-500);
    background: rgba(240, 68, 56, 0.1);
}
.ft26.ft26--account #account-history-wrapper .history-pagination {
    margin: 14px 0 0;
    padding: 0 20px 16px;
    text-align: center;
}
.ft26.ft26--account #account-history-wrapper .pagination-info {
    margin-bottom: 8px;
    font-size: 12.5px;
    color: var(--text-subtle);
}
.ft26.ft26--account #account-history-wrapper .pagination-controls {
    display: flex;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
}
.ft26.ft26--account #account-history-wrapper .pagination-controls .button {
    display: inline-grid;
    place-content: center;
    min-width: 30px;
    height: 30px;
    padding: 0 8px;
    border-radius: 8px;
    border: 1px solid var(--border-warm, #E6E7E1);
    background: var(--surface-card);
    color: var(--text-body);
    font-family: var(--font-data);
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: background-color 160ms var(--ft26-ease), color 160ms var(--ft26-ease), border-color 160ms var(--ft26-ease);
}
.ft26.ft26--account #account-history-wrapper .pagination-controls .history-page-btn:hover {
    background: var(--surface-card);
    border-color: var(--border-strong);
    color: var(--text-heading);
}
.ft26.ft26--account #account-history-wrapper .pagination-controls .button-primary {
    background: var(--ink-850);
    border-color: var(--ink-850);
    color: #fff;
    opacity: 1;
    cursor: default;
}

/* ── PriceDelta (примитива нет в core — локально) ──────────────── */
.ft26.ft26--account .ft26-delta {
    font-family: var(--font-data);
    font-size: 13px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.ft26.ft26--account .ft26-delta.is-up { color: var(--up-600); }
.ft26.ft26--account .ft26-delta.is-down { color: var(--down-500); }

/* ── Таб «По дням»: дивергентные бары (DailyBars кита) ─────────── */
.ft26-daily__toppad { padding: 16px 20px 0; }
.ft26-daily__toppad .ft26-sechead { margin-bottom: 10px; }
.ft26-daily__head {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr) 84px 64px;
    gap: 10px;
    padding: 8px 20px;
    background: var(--surface-warm, #FCFBF6);
    border-top: 1px solid var(--border-default);
    border-bottom: 1px solid var(--border-default);
    font-family: var(--font-interface);
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: var(--letter-spacing-chip, 0.5px);
    color: var(--text-subtle);
}
.ft26-daily__head span:nth-child(n+3) { text-align: right; }
.ft26-daily__row {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr) 84px 64px;
    gap: 10px;
    padding: 9px 20px;
    align-items: center;
}
.ft26-daily__row + .ft26-daily__row { border-top: 1px solid var(--border-default); }
.ft26-daily__day { font-size: 12px; color: var(--text-subtle); white-space: nowrap; }
.ft26-daily__bar { position: relative; display: block; height: 10px; min-width: 0; }
.ft26-daily__axis {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 1px;
    background: var(--border-strong);
}
.ft26-daily__fill {
    position: absolute;
    top: 1px;
    bottom: 1px;
    border-radius: 4px;
}
.ft26-daily__fill.is-up { background: var(--price-up, #16C784); }
.ft26-daily__fill.is-down { background: var(--price-down, #F04438); }
.ft26-daily__row .ft26-delta { text-align: right; }
.ft26-daily__n { text-align: right; font-size: 13px; color: var(--text-body); }

/* ── Таб «Проверка правил» (RulesCheck кита) ───────────────────── */
.ft26-rules { display: flex; flex-direction: column; }
.ft26-rules__row {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr) 220px;
    gap: 12px;
    align-items: center;
    padding: 11px 0;
}
.ft26-rules__row + .ft26-rules__row { border-top: 1px solid var(--border-default); }
.ft26-rules__mark {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
    color: #FFFFFF;
}
.ft26-rules__mark.is-ok { background: var(--price-up, #16C784); }
.ft26-rules__mark.is-fail { background: var(--price-down, #F04438); }
.ft26-rules__rule { font-size: 14px; font-weight: 600; color: var(--text-heading); overflow-wrap: anywhere; }
.ft26-rules__fact { text-align: right; font-size: 13px; color: var(--text-muted); }
.ft26.ft26--account .ft26-rules__fact.is-fail { color: var(--down-500); font-weight: 700; }
.ft26.ft26--account .ft26-rules__meta-fail { color: var(--down-500); font-weight: 600; }

/* ── «Информация о счёте»: KV в 2 колонки на широких экранах ───── */
.ft26.ft26--account .ft26-kv__v img { display: inline-block; vertical-align: middle; }
@media (min-width: 768px) {
    .ft26.ft26--account .ft26-kv--2col {
        display: grid;
        grid-template-columns: 1fr 1fr;
        column-gap: 32px;
    }
}

/* ── Адаптив ───────────────────────────────────────────────────── */
@media (max-width: 1280px) {
    .ft26-page-account { gap: 20px; }
}

@media (max-width: 1100px) {
    .ft26-page-account { grid-template-columns: minmax(0, 1fr); }
    .ft26-page-account__ad {
        width: 100%;
        max-width: 336px;
        margin: 0 auto;
        padding: 0 0 36px;
    }
    /* блоки рейла по центру мобильного потока */
    .ft26-page-account__ad .ft26-brail { align-items: center; }
    .ft26-page-account__ad .ft26-brail > * { width: 100%; max-width: 300px; }
}

@media (max-width: 768px) {
    .ft26-hero2__body { padding: 20px; }
    .ft26-tablecard__head { padding: 16px 16px 10px; }
    .ft26-metrics__head { padding: 14px 16px 0; }
    .ft26-daily__toppad { padding: 14px 16px 0; }
    .ft26-daily__head,
    .ft26-daily__row { padding-left: 16px; padding-right: 16px; }
    .ft26.ft26--account .symbols-table th:first-child,
    .ft26.ft26--account .symbols-table td:first-child,
    .ft26.ft26--account .orders-table th:first-child,
    .ft26.ft26--account .orders-table td:first-child,
    .ft26.ft26--account #account-history-wrapper table.widefat th:first-child,
    .ft26.ft26--account #account-history-wrapper table.widefat td:first-child { padding-left: 16px; }
    .ft26.ft26--account #account-history-wrapper { padding: 8px 16px 14px; }
    .ft26.ft26--account #account-history-wrapper:has(table) { padding: 0 0 4px; }
}

/* Карточный режим широких таблиц сделок (механика td[data-label]) */
@media (max-width: 700px) {
    .ft26.ft26--account .orders-table { min-width: 0; }
    .ft26.ft26--account .orders-table thead { display: none; }
    .ft26.ft26--account .orders-table tbody tr {
        display: block;
        padding: 10px 16px;
        border-bottom: 1px solid var(--border-default);
    }
    .ft26.ft26--account .orders-table tbody tr:last-child { border-bottom: 0; }
    .ft26.ft26--account .orders-table td,
    .ft26.ft26--account .orders-table td:nth-child(-n+3) {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 12px;
        padding: 4px 0;
        border-bottom: 0;
        text-align: right;
        white-space: normal;
    }
    .ft26.ft26--account .orders-table td:first-child { padding-left: 0; }
    .ft26.ft26--account .orders-table td::before {
        content: attr(data-label);
        flex: none;
        font-family: var(--font-interface);
        font-size: 11px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.06em;
        color: var(--text-subtle);
        text-align: left;
    }
    .ft26.ft26--account .orders-table tbody tr:hover td,
    .ft26.ft26--account .orders-table tbody tr.hover td { background: transparent; }
}

@media (max-width: 560px) {
    .ft26-hero2__cta .ft26-btn { flex: 1 1 auto; }
    .ft26.ft26--account .ft26-actions .ft26-btn { flex: 1 1 100%; }
    .ft26.ft26--account .symbols-controls { width: 100%; }
    .ft26.ft26--account .symbols-controls .symbol-filter { flex: 1 1 100%; width: auto; }
    .ft26.ft26--account .history-filters { width: 100%; }
    .ft26.ft26--account select.history-filter { max-width: none; flex: 1 1 140px; }
    .ft26-daily__head,
    .ft26-daily__row { grid-template-columns: 52px minmax(0, 1fr) 72px 48px; gap: 8px; }
    /* факт правила переносится под формулировку */
    .ft26-rules__row { grid-template-columns: 22px minmax(0, 1fr); }
    .ft26-rules__fact { grid-column: 2; text-align: left; margin-top: 2px; }
}

@media (max-width: 480px) {
    .ft26-hero2__body { padding: 16px; }
    .ft26.ft26--account .ft26-avatar,
    .ft26.ft26--account .ft26-medal--hero { width: 48px; height: 48px; font-size: 19px; }
    .ft26.ft26--account .ft26-stattile__value { font-size: 18px; }
    .ft26.ft26--account .tooltip-icon:hover::after { width: 220px; }
    .ft26.ft26--account .chart-container { height: 260px !important; }
}

@media (max-width: 390px) {
    .ft26-tablecard__head { padding: 14px 14px 10px; }
    .ft26.ft26--account .orders-table tbody tr { padding: 10px 14px; }
    .ft26.ft26--account .symbols-table th:first-child,
    .ft26.ft26--account .symbols-table td:first-child { padding-left: 14px; }
    .ft26-hero2__chips { gap: 6px; }
    .ft26-daily__head,
    .ft26-daily__row { padding-left: 14px; padding-right: 14px; }
}
