/* Copyright (c) 2026 Ivan Vasilev This source code is licensed under the MIT license found in the LICENSE file in the root directory of this source tree. */ /* Стили вкладки «Монитор». Общая дизайн-система — в App.css. */ .mon-card { display: flex; flex-direction: column; gap: 12px; background: var(--surface-bright); border: 1px solid var(--outline-variant); border-radius: var(--shape-extra-large); padding: 20px; margin-bottom: 16px; } .mon-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; } .mon-title { margin: 0; font-size: var(--title-medium-size); line-height: var(--title-medium-line); font-weight: var(--weight-medium); color: var(--on-surface); } .mon-hint { margin: 0; font-size: var(--body-small-size); line-height: var(--body-small-line); color: var(--neutral-text); } .mon-actions { display: flex; flex-wrap: wrap; gap: 8px; } @media (max-width: 599px) { .mon-actions .btn { flex: 1; } .mon-toolbar .server-select { flex: 1 1 100%; } /* своя строка под периодом */ .mon-toolbar .server-current { width: 100%; } .mon-toolbar .server-menu { width: 100%; } } /* ───── Графики ───── Цвета рядов — токены темы. Проверено validate_palette: светлая #6a45b8 / #c4620a на #fdfaf6, тёмная #8f6be0 / #d9772a на #2b251d (CVD ΔE ≥ 19, контраст ≥ 3:1). Подписи и значения цветом ряда не красим. */ :root { --series-1: #6a45b8; --series-2: #c4620a; } :root[data-theme="dark"] { --series-1: #8f6be0; --series-2: #d9772a; } /* Строка над плитками: период слева, выбор сервера (components/ServerSelect) справа; на узком — друг под другом */ .mon-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; margin-bottom: 16px; } .mon-filters { display: flex; flex-wrap: wrap; gap: 8px; } .mon-range { min-height: 44px; padding: 0 18px; font: inherit; font-size: var(--body-medium-size); line-height: var(--body-medium-line); color: var(--on-surface); background: var(--surface-bright); border: 1px solid var(--outline); border-radius: var(--shape-full); cursor: pointer; } .mon-range--on { background: var(--primary-container); color: var(--on-primary-container); border-color: transparent; font-weight: var(--weight-medium); } .mon-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(148px, 1fr)); gap: 12px; margin-bottom: 16px; } .mon-tile { display: flex; flex-direction: column; gap: 4px; background: var(--surface-bright); border: 1px solid var(--outline-variant); border-radius: var(--shape-large); padding: 14px 16px; } .mon-tile-label { font-size: var(--body-small-size); line-height: var(--body-small-line); color: var(--neutral-text); } .mon-tile-value { font-size: var(--title-large-size); line-height: var(--title-large-line); font-weight: var(--weight-medium); color: var(--on-surface); } .mon-tile-sub { font-size: var(--body-small-size); line-height: var(--body-small-line); color: var(--neutral-text); } .mon-tile-rates { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; } .mon-tile-rate { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; white-space: nowrap; } .mon-tile-dir { font-size: var(--body-large-size); line-height: var(--body-large-line); } .mon-tile-total { margin-top: 6px; padding-top: 10px; border-top: 1px solid var(--outline-variant); } .mon-tile-meter { display: flex; flex-direction: column; gap: 4px; } .mon-tile-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; align-self: center; } .mon-charts { display: grid; grid-template-columns: 1fr; gap: 16px; margin-bottom: 16px; } @media (min-width: 1000px) { .mon-charts { grid-template-columns: 1fr 1fr; } .mon-charts .mon-chart:first-child { grid-column: 1 / -1; } } .mon-chart { margin: 0; min-width: 0; background: var(--surface-bright); border: 1px solid var(--outline-variant); border-radius: var(--shape-extra-large); padding: 16px; transition: opacity var(--duration-short3) var(--ease-standard); } .mon-chart--dim { opacity: .6; } .mon-chart-head { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 16px; margin-bottom: 4px; } .mon-chart-title { font-size: var(--title-medium-size); line-height: var(--title-medium-line); font-weight: var(--weight-medium); color: var(--on-surface); } .mon-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: var(--body-small-size); line-height: var(--body-small-line); color: var(--neutral-text); } .mon-legend-item { display: inline-flex; align-items: center; gap: 6px; } .mon-key { display: inline-block; width: 14px; height: 3px; border-radius: var(--shape-extra-small); flex: none; } .mon-chart-toggle { margin-left: auto; min-height: 44px; padding: 0 12px; font: inherit; font-size: var(--label-large-size); line-height: var(--label-large-line); color: var(--on-primary-container); background: none; border: 0; border-radius: var(--shape-full); cursor: pointer; } .mon-plot { position: relative; } .mon-plot svg { display: block; max-width: 100%; } .mon-plot svg:focus-visible { border-radius: var(--shape-small); } .mon-grid { stroke: var(--outline-variant); stroke-width: 1; } .mon-tick { fill: var(--neutral-text); font-size: var(--body-small-size); font-family: var(--font); } .mon-cross { stroke: var(--outline); stroke-width: 1; } .mon-end { stroke: var(--surface-bright); stroke-width: 2px; } .mon-empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 0 24px; text-align: center; font-size: var(--body-medium-size); line-height: var(--body-medium-line); color: var(--neutral-text); } .mon-tip { position: absolute; pointer-events: none; z-index: 2; display: flex; flex-direction: column; gap: 4px; background: var(--surface-container); border: 1px solid var(--outline-variant); border-radius: var(--shape-medium); padding: 8px 10px; font-size: var(--body-small-size); line-height: var(--body-small-line); color: var(--neutral-text); } .mon-tip-time { color: var(--neutral-text); } .mon-tip-row { display: flex; align-items: center; gap: 8px; } .mon-tip-row b { font-weight: var(--weight-medium); font-size: var(--label-large-size); line-height: var(--label-large-line); color: var(--on-surface); } .mon-table-wrap { overflow-x: auto; } .mon-table { width: 100%; border-collapse: collapse; font-size: var(--body-medium-size); line-height: var(--body-medium-line); } .mon-table th { text-align: left; font-weight: var(--weight-medium); color: var(--on-surface-variant); padding: 8px 10px; white-space: nowrap; } .mon-table td { padding: 8px 10px; color: var(--on-surface); border-top: .5px solid var(--outline-variant); font-variant-numeric: tabular-nums; white-space: nowrap; } .mon-notice { margin-bottom: 12px; } /* Полоски процессора и памяти в плитках */ .mon-bar { display: block; width: 100%; height: 8px; border-radius: var(--shape-extra-small); overflow: hidden; background: var(--primary-container); margin: 2px 0; } .mon-bar i { display: block; height: 100%; border-radius: var(--shape-extra-small); background: var(--series-1); transition: width var(--duration-medium2) var(--ease-standard); } .mon-bar i.mon-bar--warn { background: var(--warn-dot); } .mon-bar i.mon-bar--bad { background: var(--error-dot); } /* Разбивка «По серверам» в режиме «Все серверы» */ .mon-per-server { margin-bottom: 16px; } /* Кнопка рядом с подписью — по центру строки */ .mon-actions { align-items: center; }