/* CCR Academy 2.4.0 - control room additions: hide-trends layout, loop and fan faceplates, heat balance screen,
   and screen colors in the style of the Siemens PCS 7 and FLS ECS operator stations. */

/* ---------- Trend panel hidden: the process graphic takes the whole height ---------- */
.cr.trends-off .crleft.has-scr, .cr.trends-off.panel-off .crleft.has-scr { grid-template-rows: 44px minmax(0, 1fr) 0; }
.cr.trends-off .crleft:not(.has-scr) { grid-template-rows: minmax(0, 1fr) 0; }
.cr.trends-off .trendwrap { display: none; }
#crTrends.on { border-color: var(--sp); color: var(--sp); }
@media (max-width: 900px) { .cr.trends-off .crleft.has-scr, .cr.trends-off.panel-off .crleft.has-scr { grid-template-rows: 44px auto 0; } }

/* ---------- Faceplates ---------- */
.gangfp .calcsp button { width: auto !important; flex: 1 !important; padding: 0 4px; font-size: 11px; }
.gangfp .calcsp .spin { max-width: 80px; }
.loopfp .nm, .coolfp .nm, .gangfp .nm { color: var(--text); }
.coolfp .pv { font-size: 11px; grid-column: 1 / 3; color: var(--muted); }

/* ---------- Heat balance screen ---------- */
.hbscr { padding: 12px 16px 18px; color: var(--text); font-size: 12.5px; }
.hbhead { display: flex; align-items: baseline; gap: 8px; margin-bottom: 10px; font-size: 14px; flex-wrap: wrap; }
.hbcols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.hbcols h4 { margin: 0 0 6px; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.hbrow { display: grid; grid-template-columns: minmax(120px, 1.4fr) minmax(60px, 1fr) 54px 40px; gap: 8px; align-items: center; padding: 5px 0; border-bottom: 1px solid var(--line); }
.hbrow .hbl { line-height: 1.25; }
.hbrow .hbbar { height: 10px; background: var(--panel2); border-radius: 3px; overflow: hidden; }
.hbrow .hbbar i { display: block; height: 100%; background: var(--sp); opacity: .8; }
.hbcols > div:last-child .hbrow .hbbar i { background: #e0a050; }
.hbrow.other .hbbar i { background: var(--muted); }
.hbrow .hbv { font-family: var(--mono); font-weight: 700; text-align: right; }
.hbrow .hbp { font-family: var(--mono); color: var(--muted); text-align: right; font-size: 11px; }
.hbrow.tot { border-bottom: 0; border-top: 2px solid var(--line2); font-weight: 700; }
.hbnote { margin-top: 12px; line-height: 1.5; max-width: 820px; }
@media (max-width: 900px) { .hbcols { grid-template-columns: 1fr; } }

/* ---------- Siemens PCS 7 style (default "standard"): light grey screens, dark blue values, green running drives ---------- */
.cr.hmi-standard { --bg: #c0c3c6; --bg2: #caced1; --panel: #d5d8db; --panel2: #c3c7ca; --line: #9ba1a6; --line2: #858b91; --text: #0f1317; --muted: #363d43; --dim: #50575d; --equip: #3b4147; --equip-fill: #a8aeb3; --pipe: #6c7379; --sp: #0a4f94; background: var(--bg); color: var(--text); }
.cr.hmi-standard .alarmbar { background: #b2b6ba; }
.cr.hmi-standard .mimicwrap, .cr.hmi-standard .mimicwrap .scr.html { background: #c7cacd; }
.cr.hmi-standard .log { background: #cdd0d3; }
.cr.hmi-standard .m-eq.run { fill: #a2a8ad; }
.cr.hmi-standard .m-eq.drv.run { fill: #a2a8ad; stroke: #0d8a2c; stroke-width: 2.4; }
.cr.hmi-standard .m-eq.drv.off { stroke: #50575d; }
.cr.hmi-standard .m-lbl { fill: #2b3137; }
.cr.hmi-standard .m-lbl.big { fill: #161a1e; }
.cr.hmi-standard .m-pipe.gas { stroke: #8a9197; }
.cr.hmi-standard .m-pipe.meal { stroke: #8a7550; }
.cr.hmi-standard .m-flow { stroke: #3d4349; }
.cr.hmi-standard .m-tag rect { fill: #f3f4f5; stroke: #7a8187; }
.cr.hmi-standard .m-tag text.v { fill: #08307a; }
.cr.hmi-standard .m-tag text.u, .cr.hmi-standard .m-tag text.n { fill: #3a4147; }
.cr.hmi-standard .m-tag.a1 rect { fill: #f6c9c5; } .cr.hmi-standard .m-tag.a2 rect { fill: #f8dcb8; } .cr.hmi-standard .m-tag.a3 rect { fill: #f3eab0; }
.cr.hmi-standard .m-lim-bg { fill: #dcdfe1; stroke: #9ba1a6; }
.cr.hmi-standard .scr svg rect[fill="#2a3137"], .cr.hmi-standard .scr svg rect[fill="#1e2327"] { fill: #b7bcc0; }
.cr.hmi-standard .scr svg rect[fill="#4a545d"], .cr.hmi-standard .scr svg path[fill="#4a545d"] { fill: #7d848a; }
.cr.hmi-standard .kpi .v, .cr.hmi-standard .fp .nm, .cr.hmi-standard .clock { color: var(--text); }
.cr.hmi-standard .scrtabs { background: #b4b8bc; }
.cr.hmi-standard .scrtabs button { background: #d3d6d9; border-color: #868c92; color: #14181c; }
.cr.hmi-standard .scrtabs button:hover { background: #e0e3e5; color: #000; }
.cr.hmi-standard .scrtabs button.on { background: #0a4f94; border-color: #0a4f94; color: #fff; }
.cr.hmi-standard .firstout { background: #f3c9c5; color: #3a0d0a; }
.cr.hmi-standard .firstout b { color: #9c1b12; }
.cr.hmi-standard .act.priority { background: #e7cdb8; border-color: #b0773f; }
.cr.hmi-standard .person-loc.hazard, .cr.hmi-standard .kpi.person.hazard { background: #f1c4bf; color: #6d1510; }
.cr.hmi-standard .diaglist button.sel, .cr.hmi-standard .hintbox { background: #cfe0ee; }
.cr.hmi-standard .facepl { box-shadow: 0 10px 28px rgba(0, 0, 0, .25); }
.cr.hmi-standard .gst { background: #b9bdc1; }
.cr.hmi-standard .gst.run, .cr.hmi-standard .eqperm.ok, .cr.hmi-standard .ilkscr .st-ok { color: #0b6e24; }

/* ---------- FLS ECS style: slate grey screens, cyan values, green running drives ---------- */
.cr.hmi-fls { --bg: #353c42; --bg2: #3d454c; --panel: #454d55; --panel2: #4d565e; --line: #5b646c; --line2: #69737b; --text: #eef2f5; --muted: #b8c1c8; --dim: #98a1a8; --equip: #c4cbd1; --equip-fill: #576068; --pipe: #8c959c; --sp: #3cc8f5; background: var(--bg); color: var(--text); }
.cr.hmi-fls .alarmbar { background: #2c3237; }
.cr.hmi-fls .mimicwrap, .cr.hmi-fls .mimicwrap .scr.html { background: #3a4248; }
.cr.hmi-fls .log { background: #333a40; }
.cr.hmi-fls .m-eq.run { fill: #5b646c; }
.cr.hmi-fls .m-eq.drv.run { fill: #5b646c; stroke: #3ddc5a; stroke-width: 2.4; }
.cr.hmi-fls .m-lbl { fill: #cfd6db; }
.cr.hmi-fls .m-lbl.big { fill: #f1f4f6; }
.cr.hmi-fls .m-pipe.gas { stroke: #6e777f; }
.cr.hmi-fls .m-pipe.meal { stroke: #a08860; }
.cr.hmi-fls .m-tag rect { fill: #1b2024; stroke: #6a737b; }
.cr.hmi-fls .m-tag text.v { fill: #7fe3ff; }
.cr.hmi-fls .m-tag text.u, .cr.hmi-fls .m-tag text.n { fill: #aeb7be; }
.cr.hmi-fls .scr svg rect[fill="#2a3137"], .cr.hmi-fls .scr svg rect[fill="#1e2327"] { fill: #4a535a; }
.cr.hmi-fls .scrtabs { background: #2c3237; }
.cr.hmi-fls .scrtabs button { background: #444c53; border-color: #646d75; color: #e6ebef; }
.cr.hmi-fls .scrtabs button.on { background: #3cc8f5; border-color: #3cc8f5; color: #0f1417; }

/* Trends keep a dark background on the light screens: the pens are drawn in light colors (many DCS trend displays are dark too). */
.cr.hmi-standard .trendwrap, .cr.hmi-light .trendwrap { --bg2: #1a1e22; --panel: #22272b; --panel2: #2a3035; --line: #30373d; --line2: #3d454c; --text: #dde3e8; --muted: #8d979f; --dim: #69737b; --sp: #8cc4ec; background: #1a1e22; color: var(--text); }
