/* ================================================================
   Drawer (PhDrawer) + меню (PhMenuItem) — глобальные стили.
   Раньше здесь были override'ы DevExpress (.dxbl-drawer/.dxbl-menu).
   ================================================================ */

/* ── Панели: левая (навигация) — сине-чёрный градиент, правая (баланс/курсы) — фиолетовый ── */
.ph-drawer-left > .ph-drawer-panel {
    background-image: linear-gradient(180deg, #14306e 0%, #0a0f1c 100%);
    color: #ffffff;
}
.ph-drawer-right > .ph-drawer-panel {
    background-image: linear-gradient(180deg, #3b2a6e 0%, #1a1035 100%);
    color: rgba(220, 210, 255, 0.92);
}
html.app-dark .ph-drawer > .ph-drawer-panel {
    background-image: linear-gradient(180deg, #161b22 0%, #0d1117 100%) !important;
    color: #c9d1d9;
}
html.app-dark .ph-drawer-left > .ph-drawer-panel { border-right: 1px solid #21262d; }
html.app-dark .ph-drawer-right > .ph-drawer-panel { border-left: 1px solid #21262d; }

/* ── Пункты меню ── */
.ph-menu { display: flex; flex-direction: column; gap: 2px; width: 100%; }
.ph-menu-item {
    display: flex; align-items: center; gap: .65rem;
    padding: .6rem .9375rem;
    border-left: 3px solid transparent;
    color: #ffffff; text-decoration: none;
    font-size: 13px; font-weight: 500;
    transition: background-color .12s, color .12s;
}
.ph-menu-item i { color: rgba(255, 255, 255, 0.85); font-size: 14px; width: 1.1em; text-align: center; }
.ph-menu-item:hover { background: rgba(255, 255, 255, 0.12); color: #ffffff; }
.ph-menu-item:hover i { color: #ffffff; }
.ph-menu-item.active {
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff; font-weight: 600;
    border-left-color: rgba(200, 180, 255, 0.7);
}
.ph-menu-item.active i { color: #ffffff; }
.ph-menu-item.text-danger, .ph-menu-item.text-danger i { color: #ff8a8a !important; }

html.app-dark .ph-menu-item, html.app-dark .ph-menu-item i { color: #8b949e; }
html.app-dark .ph-menu-item:hover { background: rgba(255, 255, 255, 0.06); color: #c9d1d9; }
html.app-dark .ph-menu-item:hover i { color: #c9d1d9; }
html.app-dark .ph-menu-item.active { background: rgba(255, 255, 255, 0.08); color: #e6edf3; border-left-color: #388bfd; }
html.app-dark .ph-menu-item.active i { color: #e6edf3; }

/* Balance-panel содержимое — светлый текст */
.balance-panel,
.balance-card,
.balance-row { color: rgba(220, 210, 255, 0.92); }
.balance-amount { color: #ffffff; font-size: 1.5rem; font-weight: 700; }
.balance-currency { color: rgba(220, 210, 255, 0.75); font-size: 0.85rem; margin-left: 4px; }
.balance-row { font-size: 0.85rem; }
.balance-panel .text-muted { color: rgba(220, 210, 255, 0.55) !important; }
.balance-row .text-success { color: #4ade80 !important; }
.balance-row .text-danger  { color: #f87171 !important; }
.balance-row .text-warning { color: #fbbf24 !important; }
.wallet-addr { color: rgba(220, 210, 255, 0.75); }

/* Кнопка «Обновить» в balance-panel — поверх тёмной панели */
.balance-card .btn-outline-secondary {
    background: transparent;
    border-color: rgba(255,255,255,0.25);
    color: rgba(220, 210, 255, 0.92);
}
.balance-card .btn-outline-secondary:hover {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.35);
    color: #ffffff;
}

html.app-dark .balance-panel,
html.app-dark .balance-card,
html.app-dark .balance-row { color: #c9d1d9; }
html.app-dark .balance-amount { color: #e6edf3; }
html.app-dark .balance-currency { color: #8b949e; }
html.app-dark .balance-panel .text-muted { color: #8b949e !important; }
html.app-dark .balance-card .btn-outline-secondary {
    border-color: #30363d;
    color: #c9d1d9;
}
html.app-dark .balance-card .btn-outline-secondary:hover {
    background: rgba(255,255,255,0.06);
    border-color: #484f58;
    color: #e6edf3;
}


/* Картa под табами на дашборде */
html.app-dark .card,
html.app-dark .tabs-border-top-0 {
    background-color: #161b22 !important;
    border-color: #30363d !important;
    color: #c9d1d9;
}
html.app-dark .card-body { background-color: #161b22; color: #c9d1d9; }
html.app-dark .card-header,
html.app-dark .card-footer {
    background-color: #161b22 !important;
    border-color: #30363d !important;
    color: #c9d1d9;
}


/* Bootstrap-классы, которые часто оставляют белый фон в dark theme */
html.app-dark .bg-white,
html.app-dark .bg-light { background-color: #161b22 !important; color: #c9d1d9; }

html.app-dark .btn-outline-secondary {
    background-color: transparent;
    border-color: #30363d;
    color: #c9d1d9;
}
html.app-dark .btn-outline-secondary:hover {
    background-color: rgba(255,255,255,0.06);
    border-color: #484f58;
    color: #e6edf3;
}
html.app-dark .btn-outline-primary {
    background-color: transparent;
    border-color: #1f6feb;
    color: #58a6ff;
}
html.app-dark .btn-outline-primary:hover {
    background-color: #1f6feb;
    color: #ffffff;
}

/* «Личный кабинет» — табличные строки/labels */
html.app-dark .form-control,
html.app-dark .form-select {
    background-color: #0d1117 !important;
    border-color: #30363d !important;
    color: #c9d1d9 !important;
}
html.app-dark .form-control:focus,
html.app-dark .form-select:focus {
    border-color: #58a6ff !important;
    box-shadow: 0 0 0 3px rgba(88,166,255,0.12) !important;
}

/* Inputs/labels на «Личный кабинет» */
html.app-dark label,
html.app-dark .form-label,
html.app-dark .text-body { color: #c9d1d9; }

/* Контрольный фон страницы — если что-то нарисовалось белой плашкой
   и тащит вверх .bg-body-tertiary / .bg-secondary-subtle */
html.app-dark .bg-body-tertiary,
html.app-dark .bg-secondary-subtle,
html.app-dark .bg-light-subtle {
    background-color: #161b22 !important;
    color: #c9d1d9;
}
