/* =====================================================================
   REDESIGN · PART 3 (18 Oct 2026)
   - header: name + clock only (its status cards moved into the Plant Pulse home)
   - the plant-chips bar is gone; the main navigation takes its place (sticky)
   - Switchgear page in the new design (cubicle drawings kept)
   - ETAP-style protection single line
   ===================================================================== */
[hidden] { display: none !important; }

/* ---------- header: name + subtitle | find & source | clock ---------- */
header { padding-bottom: 12px; }
.hd-top { margin-bottom: 0; align-items: center; }
header h1 { flex-wrap: wrap; white-space: normal; row-gap: 2px; flex: none; max-width: 46%; }
.hd-sub { flex-basis: 100%; padding-left: 46px; font-size: 12px; letter-spacing: .05em; }
.hd-sub::before { display: none; }
.ws-tools.hd-tools { flex: 1; max-width: 720px; margin: 0 22px; padding: 0 !important; border: none !important; position: relative; flex-basis: auto !important; display: flex; flex-direction: column; gap: 5px; }
.hd-tools .ws-label { font-size: 9.5px; letter-spacing: .2em; color: var(--kk); font-family: var(--disp); }
.hd-tools .ws-tabs { flex-wrap: nowrap !important; }
.hd-tools .ws-search { flex: 1; min-width: 0; }
@media (max-width: 1150px) {
  .hd-top { flex-wrap: wrap; }
  header h1 { max-width: none; flex: 1; }
  .ws-tools.hd-tools { order: 3; flex-basis: 100% !important; max-width: none; margin: 10px 0 0; }
}

/* ---------- main navigation (where the plant chips were) ---------- */
#flowTabRow {
  position: sticky; top: 0; z-index: 40;
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 0;
  padding: 10px 28px 10px; margin: 0;
  background: rgba(11, 16, 21, .96); backdrop-filter: blur(6px);
  border-top: 1px solid var(--ln); border-bottom: 1px solid var(--ln);
}
#flowTabRow .ws { padding: 0 10px; gap: 4px; }
#flowTabRow .ws:first-child { padding-left: 0; }
#flowTabRow .ws-label { font-size: 9px; letter-spacing: .2em; }
#flowTabRow .ws-tabs { gap: 5px; flex-wrap: nowrap; }
#flowTabRow .mode-tab { padding: 6px 10px 6px 8px; font-size: 11px; gap: 6px; letter-spacing: .05em; white-space: nowrap; }
#flowTabRow .mode-tab svg { width: 14px; height: 14px; }
#homeTab.active, #plantsTab.active { color: var(--text); }
@media (max-width: 1360px) { #flowTabRow { position: static; } #flowTabRow .ws-tabs { flex-wrap: wrap; } #flowTabRow .mode-tab svg { display: none; } #flowTabRow .mode-tab { padding: 6px 9px; } }

#plantsMenu { position: fixed; z-index: 80; display: none; width: 290px; padding: 6px; background: var(--c1); border: 1px solid var(--ln2); border-radius: 12px; box-shadow: 0 18px 40px rgba(0,0,0,.55); }
#plantsMenu.open { display: block; }
#plantsMenu button { display: grid; grid-template-columns: 10px 1fr auto; gap: 10px; align-items: center; width: 100%; padding: 8px 10px; border: none; border-radius: 7px; background: none; color: var(--text); cursor: pointer; text-align: left; font-family: var(--sans); font-size: 12.5px; text-transform: none; }
#plantsMenu button:hover { background: #16202a; }
#plantsMenu i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
#plantsMenu b { font-family: var(--mono); font-size: 11.5px; font-weight: 500; color: #9aa6b2; }

/* ---------- home: 8 status cards (4 × 2) ---------- */
#pulse .hp-hero { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.hp-df { gap: 4px; }
.hp-df.sim { border-color: #5a4210; }
.hp-dfin { display: flex; align-items: center; gap: 6px; margin-top: 2px; }
.hp-dfin label { font-family: var(--mono); font-size: 10.5px; color: var(--kk); text-transform: none; }
.hp-dfin input { width: 64px; padding: 3px 6px; border-radius: 5px; border: 1px solid var(--ln2); background: var(--c2); color: var(--text); font-family: var(--mono); font-size: 12px; }
.hp-dfin button { padding: 2px 8px; border-radius: 5px; border: 1px solid var(--ln2); background: none; color: #c9d3dc; cursor: pointer; }
.hp-dfin button:hover { border-color: var(--copper); }
@media (max-width: 1100px) { #pulse .hp-hero { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- source badge variants ---------- */
.pp-src.live { border-color: #13a874; color: var(--mint); }

/* ---------- SWITCHGEAR in the new design ---------- */
.swg-banner { border-radius: 10px; }
.swg-banner.off { background: var(--c1); border-color: var(--ln); }
.swg-lineup { background: var(--c1); border-color: var(--ln); border-radius: 12px; }
.swg-lineup-head h3 { font-size: 15px; letter-spacing: .08em; }
.swg-lineup-head p { font-size: 11px; color: var(--kk); }
.swg-kpi { background: var(--c2); border-color: var(--ln); border-radius: 8px; }
.swg-kpi span { font-size: 9.5px; letter-spacing: .12em; color: var(--kk); }
.swg-panel { background: var(--c2); border-color: var(--ln); }
.swg-panel:hover, .swg-panel.sel { border-color: var(--fc, var(--copper)); }
.swg-panel.sel { box-shadow: 0 0 0 1px var(--fc, var(--copper)); background: color-mix(in srgb, var(--fc, var(--copper)) 8%, var(--c2)); }
.swg-coupler { background: var(--c1); border-color: var(--ln); }
.swg-live, .swg-station { background: var(--c1); border: 1px solid var(--ln); border-radius: 12px; padding: 14px 16px; margin: 14px 0; }
.swg-station-head h3, .swg-live-h h3 { font-family: var(--disp); font-size: 13px; letter-spacing: .12em; font-weight: 500; }
.swg-station-head p { font-size: 11px; color: var(--kk); }
.swg-lc { background: var(--c2); border-color: var(--ln); border-radius: 10px; }
.swg-legend { background: var(--c1); border: 1px solid var(--ln); border-radius: 10px; padding: 10px 14px; font-size: 11.5px; }
.swg-table.pt td { white-space: normal; }

/* ---------- ETAP-style protection single line ---------- */
.et { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.et-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.et-in { display: flex; align-items: center; gap: 8px; font-family: var(--disp); font-size: 11px; letter-spacing: .1em; color: var(--kk); }
.et-in input { width: 80px; padding: 5px 8px; border-radius: 6px; border: 1px solid var(--ln2); background: var(--c2); color: var(--text); font-family: var(--mono); font-size: 12.5px; }
.et-warn { font-family: var(--mono); font-size: 10.5px; padding: 3px 8px; border-radius: 4px; border: 1px solid #e69500; color: var(--amber); text-transform: none; }
.et-where { font-family: var(--disp); font-size: 12px; letter-spacing: .08em; color: var(--kk); display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; }
.et-where.on { color: var(--rose); }
.et-where em { font-style: normal; font-family: var(--sans); font-size: 11.5px; letter-spacing: 0; color: var(--kk); text-transform: none; }
.et-wrap { background: #f7f7f2; border: 1px solid #c9ccd1; border-radius: 10px; padding: 10px; overflow-x: auto;
  background-image: radial-gradient(#d9dbde 1px, transparent 1px); background-size: 16px 16px; }
.et-svg { display: block; width: 100%; min-width: 1100px; height: auto; font-family: Arial, Helvetica, sans-serif; }
.et-svg .et-w { stroke: #1f1f1f; stroke-width: 1.6; fill: none; }
.et-svg .et-w.dash { stroke-dasharray: 3 3; stroke: #3060c0; }
.et-svg .et-bus { stroke: #b0161c; stroke-width: 6; stroke-linecap: square; }
.et-svg .et-bus.f { stroke: #ff2a2a; }
.et-svg .et-bl { font-size: 11px; font-weight: 700; fill: #b0161c; }
.et-svg .et-gen { fill: #fff; stroke: #1f1f1f; stroke-width: 1.8; }
.et-svg .et-sine { fill: none; stroke: #1f1f1f; stroke-width: 1.6; }
.et-svg .et-cb { fill: #fff; stroke: #1f1f1f; stroke-width: 1.6; }
.et-svg .et-cb.cl { fill: #d7262d; stroke: #8a1015; }
.et-svg .et-cb.op { fill: #1d9a52; stroke: #0f5c30; }
.et-svg .et-ct { fill: none; stroke: #1f1f1f; stroke-width: 1.3; }
.et-svg .et-tr { fill: #fff; stroke: #1f1f1f; stroke-width: 1.5; }
.et-svg .et-load { fill: #fff; stroke: #1f1f1f; stroke-width: 1.4; }
.et-svg .et-lt { font-size: 9px; fill: #444; font-weight: 700; }
.et-svg .et-lb { font-size: 10.5px; fill: #333; }
.et-svg .et-lb.b { font-weight: 700; fill: #111; }
.et-svg .et-r { fill: #fff; stroke: #3060c0; stroke-width: 1.8; }
.et-svg .et-r.set { fill: #e6eeff; }
.et-svg .et-r.pend { stroke: #9aa0a8; stroke-dasharray: 3 2; }
.et-svg .et-r.trip { fill: #ff3b3b; stroke: #a00; }
.et-svg .et-r.ok { fill: #c8f0d4; stroke: #1d9a52; }
.et-svg .et-rt { font-size: 8.5px; font-weight: 700; fill: #1b3a7a; }
.et-svg .et-fl { font-size: 9px; fill: #3060c0; }
.et-svg .et-fl.pend { fill: #888; }
.et-svg .et-flag { fill: #fff; stroke: #3060c0; stroke-width: 1.1; }
.et-svg .et-flag.pend { stroke: #b4b8be; stroke-dasharray: 3 2; fill: #fafafa; }
.et-svg .et-flag.trip { stroke: #c00; stroke-width: 1.8; fill: #fff3f3; }
.et-svg .et-flag.ok { stroke: #1d9a52; fill: #f2fbf5; }
.et-svg .et-ft { font-size: 8.8px; fill: #222; }
.et-svg .et-ft.b { font-weight: 700; fill: #1b3a7a; }
.et-svg .et-ft.live { fill: #0a7a3c; font-weight: 700; }
.et-svg .et-ft.big { font-size: 15px; font-weight: 700; fill: #c00; }
.et-svg .et-col { fill: transparent; stroke: transparent; }
.et-svg .et-hit { cursor: pointer; }
.et-svg .et-hit:hover .et-col { fill: rgba(48, 96, 192, .06); stroke: rgba(48, 96, 192, .35); stroke-dasharray: 4 3; }
.et-svg .et-col.f { fill: rgba(255, 60, 60, .07); stroke: rgba(200, 0, 0, .55); stroke-dasharray: 5 3; }
.et-svg .et-bolt { fill: #ffcc00; stroke: #c00; stroke-width: 1.4; }
.et-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 11px; color: var(--kk); text-transform: none; }
.et-legend span { display: flex; align-items: center; gap: 6px; }
.et-k { width: 14px; height: 14px; border-radius: 50%; border: 2px solid #3060c0; background: #e6eeff; display: inline-block; }
.et-k.pend { border-style: dashed; border-color: #9aa0a8; background: #fff; }
.et-k.trip { background: #ff3b3b; border-color: #a00; }
.et-k.ok { background: #c8f0d4; border-color: #1d9a52; }
.et-k.cl { border-radius: 2px; background: #d7262d; border-color: #8a1015; }
.et-seq td { white-space: normal; }
.et-h { font-family: var(--disp); font-size: 13px; letter-spacing: .12em; font-weight: 500; color: var(--kk); margin: 18px 0 10px; }
