/* Стили экрана station.js (карточка станции AC, макеты 02/03): только классы .st-…
   Общие компоненты (card, kpi, rows, tbl, pill, btn, banner) — из app.css. */

/* строка «Коннектор 01 · Type 2» + состояние + режим справа */
/* Размеры — из render-v2.py макета: строка на 14 px ниже линии вкладок, KPI — на 18 px ниже строки. */
.st-conn { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; min-height: 26px; margin: -8px 0 18px; }
.st-conn h3 { margin: 0; font-size: 15px; font-weight: 600; }
.st-conn .pill { height: 26px; }
.st-conn .st-mode { margin-left: auto; font-size: 14px; color: var(--muted); }

/* аварии и связь — над показателями */
.st-alerts .banner { margin: 0 0 12px; }

/* две колонки (фазы + режим, графики, диагностика): в макете 579 + 565 при зазоре 17 */
.st-row2 { display: grid; grid-template-columns: minmax(0, 579fr) minmax(0, 565fr); gap: 17px; margin-top: 17px; }
.st-row2.st-first { margin-top: 0; }
.st-row2.st-charts { margin-top: 15px; }
.st-top .st-cell > .card { min-height: 244px; }
.st-charts .card { padding-bottom: 12px; }
.st-cell { display: flex; min-width: 0; }
.st-cell > .card, .st-cell > .st-fill { flex: 1; }
.st .banner { margin-top: 17px; }
.st .st-alerts .banner { margin-top: 0; }
.st-mt { margin-top: 18px; }

/* таблица фаз: шапка 30 px, строка 34 px, колонки 107/145/137 px из 553 (макет) */
.st-phcard { padding-bottom: 10px; }
.st-phcard .card-h { margin-bottom: 6px; }
.st-phcard .tbl-wrap { margin: 0 -4px; }
.st-ph { table-layout: fixed; }
.st-ph th { padding: 7px 4px; color: var(--muted); }
.st-ph td { padding: 7px 4px; font-size: 14px; font-weight: 600; }
.st-ph th:nth-child(1) { width: 19.3%; } .st-ph th:nth-child(2) { width: 26.2%; } .st-ph th:nth-child(3) { width: 24.8%; }
.st-note { margin: 12px 0 0; font-size: 14px; color: var(--muted); }
.st-note.st-temp { font-size: 13px; }
.st-note + .st-note { margin-top: 10px; }
.st-phcard .tbl-wrap + .st-temp { margin-top: 16px; }
/* «Режим и текущая сессия»: строки 13 px с шагом 28 px, как в макете */
.st-mode-card .card-h { margin-bottom: 8px; }
.st-mode-card .rows > div { padding: 4px 0 5px; }
.st-total { font-size: 13px; font-weight: 400; color: var(--muted); }
.st-total b { color: var(--text); font-weight: 600; margin-left: 6px; }
.st-chg { display: inline-flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }

/* все поля статуса */
.st-raw summary { cursor: pointer; font-size: 15px; font-weight: 600; color: var(--soft); }
.st-raw[open] summary { margin-bottom: 12px; }
.st-rawt td { padding: 6px 8px; overflow-wrap: anywhere; }

/* обслуживание */
.st-checks { display: flex; flex-direction: column; gap: 2px; }
.st-check { align-items: flex-start; padding: 6px 0; }
.st-check input { margin-top: 2px; flex: none; }
.st-check small { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.st-h3 { font-size: 16px; font-weight: 600; margin: 24px 0 4px; padding-top: 18px; border-top: 1px solid var(--border); }
.st-hint { line-height: 1.5; }
.st-pss { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, .7fr) minmax(0, .8fr) minmax(0, 1fr) minmax(0, 1.1fr); gap: 10px; margin-top: 14px; }
.st-pss .field { gap: 6px; }
.st-pss .field > span { font-size: 12px; font-weight: 600; color: var(--muted); }
.st-sel { min-width: 300px; max-width: 100%; }
.st-label { width: 220px; }
.st-diagline { margin-top: 0; }
.st-prog { height: 8px; border-radius: 4px; background: var(--sub); overflow: hidden; margin-top: 12px; }
.st-prog > div { height: 100%; width: 0; background: var(--blue); transition: width .5s; }
/* наблюдение сервера: станция на обслуживании */
.st-maint .card-h .right.ctl { font-size: 13px; }
.st-maint-note { margin-top: 14px; max-width: 520px; }
.st-maint-note > span { font-size: 13px; font-weight: 600; color: var(--muted); }

@media (max-width: 1100px) {
  .st-row2 { grid-template-columns: 1fr; }
  .st-pss { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .st-conn .st-mode { margin-left: 0; flex-basis: 100%; font-size: 14px; }
  .st-pss { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .st-pss .field:first-child { grid-column: 1 / -1; }
  .st-sel, .st-label { min-width: 0; width: 100%; }
  .st-fw .row > .btn, .st-cfg .row > .btn, .st-cred .row > .btn, .st-maint-acts > .btn { flex: 1 1 auto; justify-content: center; }
  .st-maint-acts > .muted { flex-basis: 100%; }
  .st-total b { display: block; margin: 2px 0 0; }
}
