.ma-toolbar { display: flex; align-items: center; gap: 10px; height: 42px; min-height: 42px; padding: 0 10px; box-sizing: border-box; background: #1e222d; border-bottom: 1px solid #363a45; color: #d1d4dc; font: 12px 'Segoe UI', sans-serif; letter-spacing: 0; }
.ma-label { font-weight: 700; flex: 0 0 auto; }
.ma-legend { display: flex; align-items: center; gap: 14px; flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; scrollbar-width: thin; }
.ma-legend span { font-variant-numeric: tabular-nums; }
.ma-status { font-size: 11px; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #aeb4c0; }
.ma-icon { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 30px; width: 30px; height: 30px; padding: 5px; border: 1px solid #434651; border-radius: 4px; background: transparent; color: #d1d4dc; cursor: pointer; box-sizing: border-box; }
.ma-icon:hover { background: #363a45; }
.ma-icon:disabled { opacity: .45; cursor: wait; }
.ma-icon svg { width: 16px; height: 16px; }
.ma-dialog { width: min(430px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 18px; box-sizing: border-box; border: 1px solid #515663; border-radius: 8px; background: #1e222d; color: #d1d4dc; font: 14px 'Segoe UI', sans-serif; box-shadow: 0 16px 60px #0008; }
.ma-dialog::backdrop { background: #0009; }
.ma-dialog header, .ma-dialog footer { display: flex; align-items: center; gap: 10px; }
.ma-dialog header { justify-content: space-between; margin-bottom: 18px; }
.ma-dialog h2 { margin: 0; font-size: 18px; color: #fff; }
.ma-dialog form { margin: 0; }
.ma-toggle { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.ma-dialog input[type=checkbox] { accent-color: #2962ff; width: 17px; height: 17px; margin: 0; }
.ma-row { display: grid; grid-template-columns: 36px minmax(0, 1fr) 46px 30px; gap: 12px; align-items: center; min-height: 44px; }
.ma-columns { color: #b2b5be; font-size: 12px; min-height: 26px; }
.ma-rows { max-height: min(48dvh, 352px); overflow-y: auto; scrollbar-width: thin; padding-right: 4px; }
.ma-row input[type=number] { width: 100%; min-width: 0; height: 32px; padding: 4px 8px; box-sizing: border-box; border: 1px solid #515663; border-radius: 4px; background: #131722; color: #fff; font: inherit; }
.ma-row input[type=color] { width: 36px; height: 30px; border: 1px solid #515663; padding: 2px; border-radius: 4px; background: none; cursor: pointer; }
.ma-dialog footer { margin-top: 16px; border-top: 1px solid #363a45; padding-top: 14px; }
.ma-apply { margin-left: auto; background: #2962ff; color: #fff; border: 0; padding: 8px 24px; border-radius: 4px; cursor: pointer; font: inherit; }
.chart-wrapper { min-width: 0; min-height: 0; }
.chart-surface { position: relative; flex: 1; min-width: 0; min-height: 0; }
.chart-surface #chart-container { width: 100%; height: 100%; }
@media (max-width: 600px) { .ma-toolbar { gap: 6px; padding: 0 6px; } .ma-status { max-width: 85px; } }
@media (max-width: 700px) {
    body.training-app { flex-direction: column; height: 100dvh; }
    .training-app .chart-wrapper { flex: 0 0 44%; min-height: 220px; }
    .training-app #sidebar { width: 100%; flex: 1; min-height: 0; padding: 10px; border-left: 0; border-top: 1px solid #363a45; }
}
