/* ============================================================
   Стили пускового АРМ машиниста (слайд 5)
   ============================================================ */

.sim {
  flex: 1; min-height: 0;
  display: grid;
  grid-template-columns: 440px 1fr 304px;
  grid-template-rows: minmax(0, 300px) minmax(0, 1fr) auto auto;
  grid-template-areas:
    "steps chart  tiles"
    "steps params tiles"
    "prompt prompt prompt"
    "timeline timeline timeline";
  gap: 13px;
}

.sim-subbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 13px; }
.sim-subbar .ttl { font-size: 22px; font-weight: 600; white-space: nowrap; }
.sim-subbar .ttl b { color: var(--brand); }
.sim-subbar .right { display: flex; align-items: center; gap: 18px; }
.sim-status { font-family: var(--mono); font-weight: 600; font-size: 15px; letter-spacing: 1.5px; padding: 6px 14px; border-radius: 7px; }
.sim-status.ok   { color: var(--ok);   background: var(--ok-dim); }
.sim-status.warn { color: var(--warn); background: var(--warn-dim); }
.sim-status.bad  { color: #ff8079;     background: var(--bad-dim); }

/* ---- panel headers ---- */
.panel-hd { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; gap: 12px; }
.panel-hd .h { font-family: var(--mono); font-size: 12.5px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.panel-hd .meta { font-family: var(--mono); font-size: 11px; color: var(--muted-2); white-space: nowrap; }

/* ============================================================
   ЛЕВАЯ КОЛОНКА · ЭТАПЫ + ЧЕК-ЛИСТ
   ============================================================ */
.steps-panel { grid-area: steps; padding: 15px 16px 13px; display: flex; flex-direction: column; overflow: hidden; }
.steps-panel .sp-cap { font-family: var(--mono); font-size: 12.5px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); font-weight: 600; margin-bottom: 11px; }

.cur-card { background: linear-gradient(135deg, rgba(235,94,51,.16), rgba(12,26,40,.35)); border: 1px solid rgba(235,94,51,.45); border-radius: 11px; padding: 13px 14px; }
.cur-top { display: flex; align-items: center; gap: 12px; }
.cur-n { width: 46px; height: 46px; flex-shrink: 0; border-radius: 10px; background: linear-gradient(135deg, var(--brand), #c8431f); color: #fff; font-family: var(--mono); font-weight: 700; font-size: 24px; display: grid; place-items: center; box-shadow: 0 4px 14px rgba(235,94,51,.4); }
.cur-meta { min-width: 0; }
.cur-lab { font-family: var(--mono); font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--brand-2); }
.cur-name { font-size: 17px; font-weight: 600; color: #fff; line-height: 1.15; margin-top: 2px; }
.cur-short { font-size: 12px; color: #f1c6b6; margin-top: 8px; line-height: 1.35; }
.cur-prog { display: flex; align-items: center; gap: 9px; margin-top: 11px; }
.cur-bar { flex: 1; height: 6px; border-radius: 3px; background: rgba(255,255,255,.1); overflow: hidden; }
.cur-fill { height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--brand), var(--brand-2)); transition: width .3s; }
.cur-pct { font-family: var(--mono); font-size: 12px; color: var(--brand-2); font-weight: 600; min-width: 34px; text-align: right; }

.next-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; margin-top: 9px; border-radius: 9px; background: var(--panel-2); border: 1px solid var(--line); }
.next-row .nx-lab { font-family: var(--mono); font-size: 9.5px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted-2); }
.next-n { width: 26px; height: 26px; flex-shrink: 0; border-radius: 7px; background: var(--panel-3); border: 1px solid var(--line); color: var(--muted); font-family: var(--mono); font-weight: 600; font-size: 13px; display: grid; place-items: center; }
.next-name { font-size: 13px; color: var(--muted); line-height: 1.2; }

.cl-cap { display: flex; align-items: center; justify-content: space-between; margin: 13px 0 8px; }
.cl-cap .h { font-family: var(--mono); font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.cl-cap .c { font-family: var(--mono); font-size: 11.5px; color: var(--ok); font-weight: 600; }
#sim-checklist { flex: 1; display: flex; flex-direction: column; gap: 4px; min-height: 0; }
.cl-item { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: center; padding: 7px 9px; border-radius: 8px; border: 1px solid transparent; transition: background .25s, border-color .25s; }
.cl-box { width: 22px; height: 22px; border-radius: 6px; border: 1.5px solid var(--line-strong); display: grid; place-items: center; color: transparent; transition: all .25s; }
.cl-box svg { width: 13px; height: 13px; }
.cl-txt { font-size: 13px; color: var(--muted-2); line-height: 1.25; transition: color .25s; }
.cl-item.done .cl-box { background: var(--ok); border-color: var(--ok); color: #08221a; }
.cl-item.done .cl-txt { color: #b7c6d4; }
.cl-item.cur { background: var(--brand-dim); border-color: rgba(235,94,51,.45); }
.cl-item.cur .cl-box { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(235,94,51,.15); animation: clpulse 1.4s infinite; }
.cl-item.cur .cl-txt { color: #fff; font-weight: 500; }
@keyframes clpulse { 50% { box-shadow: 0 0 0 5px rgba(235,94,51,0); } }

.detect { margin-top: 11px; padding: 9px 12px; border-radius: 8px; background: var(--panel-2); border: 1px solid var(--line); border-left: 3px solid var(--cyan); }
.detect .lab { font-family: var(--mono); font-size: 9.5px; letter-spacing: 1.3px; color: var(--cyan); text-transform: uppercase; }
.detect .val { font-family: var(--mono); font-size: 12px; color: var(--text); margin-top: 4px; line-height: 1.4; }

/* ============================================================
   ЦЕНТР · ГРАФИК ЭТАПА
   ============================================================ */
.chart-panel { grid-area: chart; padding: 12px 16px 8px; display: flex; flex-direction: column; min-height: 0; }
.chart-panel svg { width: 100%; flex: 1; min-height: 0; }

/* ============================================================
   ЦЕНТР · КОРИДОРЫ ПАРАМЕТРОВ
   ============================================================ */
.params-panel { grid-area: params; padding: 12px 18px 12px; display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
#sim-params { flex: 1; display: flex; flex-direction: column; justify-content: space-around; min-height: 0; margin-top: 6px; }
.pc-row { padding: 5px 0; }
.pc-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.pc-name { font-size: 14px; color: var(--text); font-weight: 500; display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap; }
.pc-note { font-family: var(--mono); font-size: 10.5px; color: var(--muted-2); font-weight: 400; }
.pc-read { font-family: var(--mono); white-space: nowrap; }
.pc-val { font-size: 18px; font-weight: 600; color: var(--text); }
.pc-unit { font-size: 11px; color: var(--muted-2); margin-left: 3px; }

.pc-track { position: relative; height: 22px; margin-top: 7px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.pc-corridor { position: absolute; left: 13%; right: 13%; top: 0; bottom: 0; background: linear-gradient(90deg, rgba(52,201,138,.05), rgba(52,201,138,.14) 50%, rgba(52,201,138,.05)); border-left: 1px solid rgba(52,201,138,.3); border-right: 1px solid rgba(52,201,138,.3); }
.pc-center { position: absolute; left: 50%; top: -1px; bottom: -1px; width: 2px; margin-left: -1px; background: rgba(174,188,203,.85); }
.pc-edge { position: absolute; top: 3px; bottom: 3px; width: 1px; background: rgba(52,201,138,.5); }
.pc-edge.l { left: 13%; } .pc-edge.r { right: 13%; }
.pc-marker { position: absolute; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: var(--ok); border: 2px solid #0a141f; transition: left .3s ease, background .3s; z-index: 3; }
.pc-ghost { position: absolute; top: 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px; transform: rotate(45deg); border: 1.5px solid var(--cyan); background: rgba(70,169,230,.18); transition: left .3s ease; z-index: 2; }
.pc-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 4px; }
.pc-scale { font-family: var(--mono); font-size: 10px; color: var(--muted-2); }
.pc-scale.r { text-align: right; }
.pc-dev { font-family: var(--mono); font-size: 11.5px; font-weight: 600; color: var(--ok); }
.pc-row.warn .pc-corridor { background: linear-gradient(90deg, rgba(243,177,60,.05), rgba(243,177,60,.12) 50%, rgba(243,177,60,.05)); border-color: rgba(243,177,60,.3); }
.pc-row.bad .pc-corridor { background: linear-gradient(90deg, rgba(239,90,82,.05), rgba(239,90,82,.14) 50%, rgba(239,90,82,.05)); border-color: rgba(239,90,82,.35); }

/* ============================================================
   ПРАВАЯ КОЛОНКА · ПЛИТКИ + ПРОШЛЫЙ ПУСК
   ============================================================ */
.tiles-panel { grid-area: tiles; display: flex; flex-direction: column; gap: 11px; min-height: 0; }
#sim-tiles { display: flex; flex-direction: column; gap: 9px; }
#sim-tiles .tile { padding: 11px 14px; }
#sim-tiles .tile .trow { display: flex; align-items: baseline; gap: 7px; }
#sim-tiles .tile .v { font-size: 31px; }
#sim-tiles .tile .u { font-size: 13px; }
#sim-tiles .tile .l { font-size: 12.5px; margin-top: 5px; line-height: 1.2; }

.sim-ref { flex: 1; min-height: 0; border-radius: 11px; padding: 14px 15px; border: 1px solid var(--line); background: linear-gradient(180deg, var(--panel), var(--panel-2)); display: flex; flex-direction: column; overflow: hidden; }
.sim-ref.cyan { border-left: 3px solid var(--cyan); }
.sim-ref.ok   { border-left: 3px solid var(--ok); }
.sim-ref.warn { border-left: 3px solid var(--warn); }
.sr-hd { display: flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 11px; letter-spacing: .8px; text-transform: uppercase; font-weight: 600; }
.sim-ref.cyan .sr-hd { color: var(--cyan); }
.sim-ref.ok .sr-hd { color: var(--ok); }
.sim-ref.warn .sr-hd { color: var(--warn); }
.sr-src { font-family: var(--mono); font-size: 12px; color: #fff; font-weight: 600; margin-top: 10px; line-height: 1.3; }
.sr-txt { font-size: 13px; color: var(--muted); line-height: 1.5; margin-top: 8px; }

/* ============================================================
   ПОДСКАЗКА (advisory)
   ============================================================ */
.sim-prompt { grid-area: prompt; display: grid; grid-template-columns: 52px 1fr 168px; gap: 16px; align-items: center; padding: 13px 18px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); }
.sim-prompt.ok   { border-color: rgba(52,201,138,.35); background: linear-gradient(90deg, var(--ok-dim), rgba(16,34,51,.4) 55%); }
.sim-prompt.warn { border-color: rgba(243,177,60,.45); background: linear-gradient(90deg, var(--warn-dim), rgba(16,34,51,.4) 55%); }
.sim-prompt.bad  { border-color: rgba(239,90,82,.5);  background: linear-gradient(90deg, var(--bad-dim), rgba(16,34,51,.4) 55%); }
.pr-ico { width: 50px; height: 50px; border-radius: 11px; display: grid; place-items: center; font-weight: 700; font-size: 28px; font-family: var(--mono); }
.pr-ico.ok { background: var(--ok-dim); color: var(--ok); }
.pr-ico.warn { background: var(--warn-dim); color: var(--warn); }
.pr-ico.bad { background: var(--bad-dim); color: #ff8079; }
.pr-title { font-size: 18px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.pr-body { font-size: 14px; color: var(--muted); line-height: 1.45; }
.pr-body b { color: var(--text); font-weight: 600; }
.pr-side { text-align: right; }
.pr-badge { font-family: var(--mono); font-size: 12px; font-weight: 600; padding: 5px 12px; border-radius: 6px; display: inline-block; }
.pr-badge.ok { background: var(--ok-dim); color: var(--ok); }
.pr-badge.warn { background: var(--warn-dim); color: var(--warn); }
.pr-badge.bad { background: var(--bad-dim); color: #ff8079; }
.pr-crit { font-family: var(--mono); font-size: 12px; color: var(--muted); margin-top: 9px; }

/* ============================================================
   ШКАЛА ВРЕМЕНИ
   ============================================================ */
.timeline-panel { grid-area: timeline; display: flex; align-items: center; gap: 18px; padding: 12px 18px; border-radius: 10px; }
.tl-play { display: inline-flex; align-items: center; gap: 9px; background: var(--brand); color: #fff; border: none; border-radius: 8px; padding: 11px 18px; font-family: var(--sans); font-size: 15px; font-weight: 600; cursor: pointer; white-space: nowrap; transition: transform .12s, box-shadow .2s; box-shadow: 0 4px 14px rgba(235,94,51,.3); }
.tl-play:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(235,94,51,.4); }
.tl-clock-box { display: flex; flex-direction: column; line-height: 1.1; min-width: 78px; }
.tl-clock-box .ck { font-family: var(--mono); font-size: 22px; color: var(--text); font-weight: 600; }
.tl-clock-box .mn { font-family: var(--mono); font-size: 11px; color: var(--muted-2); }
.tl-track { flex: 1; position: relative; display: flex; flex-direction: column; gap: 6px; }
.tl-marks { display: flex; gap: 7px; flex-wrap: wrap; }
.tl-jump { font-family: var(--mono); font-size: 11px; color: var(--muted); background: var(--panel-3); border: 1px solid var(--line); border-radius: 6px; padding: 4px 9px; cursor: pointer; transition: all .15s; }
.tl-jump:hover { color: #fff; border-color: var(--brand); }
.tl-jump.bad { border-color: rgba(239,90,82,.4); color: #ff8079; }
.tl-jump.warn { border-color: rgba(243,177,60,.4); color: var(--warn); }
.tl-jump.ok { border-color: rgba(52,201,138,.4); color: var(--ok); }
#sim-range { -webkit-appearance: none; appearance: none; width: 100%; height: 7px; border-radius: 4px; background: var(--panel-3); outline: none; cursor: pointer; border: 1px solid var(--line); }
#sim-range::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 20px; height: 20px; border-radius: 50%; background: var(--brand); border: 3px solid #0a141f; box-shadow: 0 0 0 1px var(--brand), 0 3px 8px rgba(0,0,0,.5); cursor: pointer; }
#sim-range::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--brand); border: 3px solid #0a141f; cursor: pointer; }
.tl-speed { font-family: var(--mono); font-size: 14px; font-weight: 600; background: var(--panel-3); color: var(--muted); border: 1px solid var(--line); border-radius: 7px; padding: 9px 14px; cursor: pointer; min-width: 50px; }
.tl-speed:hover { color: #fff; border-color: var(--line-strong); }
