/* Контейнеры: страховочная прокрутка только на сенсорных экранах */
#monTableContainer,
#mainTradesTableContainer,
#tradesTableContainer {
 width: 100% !important;
 max-width: 100% !important;
}
@media (hover: none) {
 #monTableContainer,
 #mainTradesTableContainer,
 #tradesTableContainer {
 overflow-x: auto;
 scrollbar-width: thin;
 scrollbar-color: #b7d4c1 #f4f9f5;
 }
}

#monTableContainer table,
#mainTradesTableContainer table,
#tradesTableContainer table {
 width: 100% !important;
 max-width: 100% !important;
 border-collapse: collapse;
 table-layout: auto !important;
}

/* Кнопки компактные, слово внутри кнопки не ломается */
#monTableContainer td a, #monTableContainer td button,
#mainTradesTableContainer td a, #mainTradesTableContainer td button,
#tradesTableContainer td a, #tradesTableContainer td button {
 display: inline-block;
 padding: 3px 8px !important;
 margin: 1px 2px 1px 0;
 font-size: 0.78rem !important;
 line-height: 1.3;
 white-space: nowrap;
 box-sizing: border-box;
}

/* ============================================================
 КОЛОНКА ДЕЙСТВИЙ: одна кнопка, при наведении остальные
 вылетают ВЛЕВО сплошной белой панелью
 ============================================================ */
@media (hover: hover) and (pointer: fine) {
 #monTableContainer td:last-child,
 #mainTradesTableContainer td:last-child,
 #tradesTableContainer td:last-child {
 position: relative;
 }
 /* Прячем все элементы ячейки, кроме первого */
 #monTableContainer td:last-child > *:not(:first-child),
 #mainTradesTableContainer td:last-child > *:not(:first-child),
 #tradesTableContainer td:last-child > *:not(:first-child) {
 display: none !important;
 }
 /* Стрелка влево на первой кнопке: подсказка, что меню раскрывается влево */
 #monTableContainer td:last-child > :first-child::after,
 #mainTradesTableContainer td:last-child > :first-child::after,
 #tradesTableContainer td:last-child > :first-child::after {
 content: " \25C2";
 font-size: 0.7em;
 opacity: 0.7;
 }
 /* При наведении пункты собираются панелью СЛЕВА от ячейки */
 #monTableContainer td:last-child:hover > *:not(:first-child),
 #mainTradesTableContainer td:last-child:hover > *:not(:first-child),
 #tradesTableContainer td:last-child:hover > *:not(:first-child) {
 display: block !important;
 position: absolute !important;
 right: 100%; /* панель прижата вплотную к ячейке слева */
 width: 170px; /* все пункты одной ширины */
 height: 34px; /* фиксированная высота = шагу */
 margin: 0 !important;
 padding: 0 12px !important;
 line-height: 34px;
 background: #fff;
 border: none;
 border-top: 1px solid #b7d4c1;
 border-bottom: 1px solid #b7d4c1;
 border-right: 1px solid #b7d4c1;
 border-left: none;
 border-radius: 0;
 box-shadow: 0 4px 16px rgba(0,0,0,0.12);
 color: #1a3a2e;
 text-align: left;
 font-size: 0.8rem !important;
 white-space: nowrap;
 overflow: hidden;
 text-overflow: ellipsis;
 box-sizing: border-box;
 z-index: 1000;
 }
 /* Пункты на одной высоте с кнопкой и ниже — шаг ровно 34px,
 прижаты встык: белая полоса сплошная, провалов нет */
 #monTableContainer td:last-child:hover > *:nth-child(2),
 #mainTradesTableContainer td:last-child:hover > *:nth-child(2),
 #tradesTableContainer td:last-child:hover > *:nth-child(2) { top: 0; }
 #monTableContainer td:last-child:hover > *:nth-child(3),
 #mainTradesTableContainer td:last-child:hover > *:nth-child(3),
 #tradesTableContainer td:last-child:hover > *:nth-child(3) { top: 34px; }
 #monTableContainer td:last-child:hover > *:nth-child(4),
 #mainTradesTableContainer td:last-child:hover > *:nth-child(4),
 #tradesTableContainer td:last-child:hover > *:nth-child(4) { top: 68px; }
 #monTableContainer td:last-child:hover > *:nth-child(5),
 #mainTradesTableContainer td:last-child:hover > *:nth-child(5),
 #tradesTableContainer td:last-child:hover > *:nth-child(5) { top: 102px; }
 #monTableContainer td:last-child:hover > *:nth-child(6),
 #mainTradesTableContainer td:last-child:hover > *:nth-child(6),
 #tradesTableContainer td:last-child:hover > *:nth-child(6) { top: 136px; }
 #monTableContainer td:last-child:hover > *:nth-child(7),
 #mainTradesTableContainer td:last-child:hover > *:nth-child(7),
 #tradesTableContainer td:last-child:hover > *:nth-child(7) { top: 170px; }
 /* Левый край панели скруглён у первого и последнего пункта */
 #monTableContainer td:last-child:hover > *:nth-child(2),
 #mainTradesTableContainer td:last-child:hover > *:nth-child(2),
 #tradesTableContainer td:last-child:hover > *:nth-child(2) {
 border-radius: 6px 0 0 0;
 }
 #monTableContainer td:last-child:hover > *:not(:first-child):last-of-type,
 #mainTradesTableContainer td:last-child:hover > *:not(:first-child):last-of-type,
 #tradesTableContainer td:last-child:hover > *:not(:first-child):last-of-type {
 border-radius: 0 0 0 6px;
 }
 /* Подсветка пункта при наведении */
 #monTableContainer td:last-child:hover > *:not(:first-child):hover,
 #mainTradesTableContainer td:last-child:hover > *:not(:first-child):hover,
 #tradesTableContainer td:last-child:hover > *:not(:first-child):hover {
 background: #f4f9f5;
 }
}

/* --- Ступени сжатия для остальной таблицы --- */
@media (max-width: 1250px) {
 #monTableContainer td, #monTableContainer th,
 #mainTradesTableContainer td, #mainTradesTableContainer th,
 #tradesTableContainer td, #tradesTableContainer th {
 padding: 5px 5px !important;
 font-size: 0.8rem !important;
 }
}
@media (max-width: 1050px) {
 #monTableContainer td, #monTableContainer th,
 #mainTradesTableContainer td, #mainTradesTableContainer th,
 #tradesTableContainer td, #tradesTableContainer th {
 padding: 3px 3px !important;
 font-size: 0.74rem !important;
 }
}

/* Графики: резиновые, за контейнер не выходят */
#accountChartsContainer svg,
#accountChartContainer svg {
 width: 100% !important;
 height: auto;
}
#accountChartsContainer .chart-slider,
#accountChartsContainer .chart-slide {
 max-width: 100% !important;
}