/* MIRA Ops — page styles on the MIRA concept core (core.css). Twin, kit, reports and gateway styles follow the other MIRA rebuilds (same class names); Ops-specific styles at the end. */
[hidden] { display: none !important; }
:root { --brand: var(--primary); --brand-h: var(--primary-h); --line-2: #EAECF0; --focus: var(--ring); --accent: #A855F7; }
body.kiosk .rail, body.kiosk .top, body.kiosk .sector-bar, body.kiosk .mira-card, body.kiosk .rail-scrim { display: none !important; }
body.kiosk { --rail: 0px; } body.kiosk .shell { margin-left: 0; padding-left: 0; } body.kiosk .view { padding-top: 16px; }

/* ===== twin (from MIRA Helios) ===== */
.twin-panel { display: flex; flex-direction: column; }
.twin { position: relative; height: 600px; min-height: 420px; background: linear-gradient(#dfe9f4, #eef2f6); overflow: hidden; border-radius: var(--r) var(--r) 0 0; }
.twin canvas#room3d { position: absolute; inset: 0; width: 100%; height: 100%; display: block; outline: none; }
.o3-armed .twin canvas#room3d, .twin.o3-armed canvas#room3d { box-shadow: inset 0 0 0 2px rgba(104, 1, 102, .35); }
.p3-labels { position: absolute; inset: 0; pointer-events: none; z-index: 2; overflow: hidden; }
.p3-l { position: absolute; left: 0; top: 0; pointer-events: auto; display: flex; flex-direction: column; align-items: center; gap: 0; padding: 0; background: none; border: 0; cursor: pointer; }
.p3-l .bx { padding: 5px 8px; border-radius: 8px; background: rgba(255, 255, 255, .96); border: 1px solid var(--line); box-shadow: 0 4px 12px rgba(16, 24, 40, .14); font: 600 11.5px/1.25 var(--f-body); color: var(--text); white-space: nowrap; text-align: left; }
.p3-l .bx small { display: block; font: 500 10.5px/1.25 var(--f-body); color: var(--text-3); }
.p3-l .ln { width: 1.5px; height: 18px; background: currentColor; opacity: .55; color: var(--text-3); }
.p3-l.r .bx { border-color: #FECDCA; } .p3-l.r .bx b { color: #B42318; } .p3-l.r .ln { color: #D92D20; }
.p3-l.a .bx { border-color: #FEDF89; } .p3-l.a .bx b { color: #B54708; } .p3-l.a .ln { color: #F79009; }
.p3-l.sel .bx { border-color: var(--brand); box-shadow: 0 0 0 3px var(--focus), 0 4px 12px rgba(16, 24, 40, .14); } .p3-l.sel .ln { color: var(--brand); }
.p3-l.eq .bx { background: rgba(247, 238, 247, .97); border-color: #EBD3EA; }
.p3-tip { position: absolute; left: 0; top: 0; z-index: 7; pointer-events: none; max-width: 220px; padding: 7px 10px; border-radius: 8px; background: rgba(16, 24, 40, .9); color: #fff; font: 500 12px/1.4 var(--f-body); opacity: 0; transition: opacity .12s; }
.p3-tip.on { opacity: 1; } .p3-tip b { display: block; font-weight: 700; }
.tw-hud { position: absolute; z-index: 4; }
.tw-hud.tl { top: 14px; left: 16px; max-width: calc(100% - 330px); pointer-events: none; }
.tw-hud.tl .k { display: flex; align-items: center; gap: 7px; font: 500 12px/1 var(--f-body); color: var(--text-2); }
.tw-hud.tl .t { margin-top: 6px; font: 700 16px/1.3 var(--f-body); color: var(--text); text-shadow: 0 1px 0 rgba(255,255,255,.7); }
.tw-hud.tl .t span { display: block; font: 500 12px/1.3 var(--f-body); color: var(--text-2); }
.tw-legend { margin-top: 10px; display: inline-flex; flex-wrap: wrap; gap: 6px 12px; padding: 7px 10px; border-radius: 8px; background: rgba(255, 255, 255, .92); border: 1px solid var(--line); font: 500 11.5px/1 var(--f-body); color: var(--text-2); }
.tw-legend span { display: inline-flex; align-items: center; gap: 6px; }
.tw-legend i { width: 12px; height: 8px; border-radius: 2px; }
.tw-legend .ramp { width: 70px; height: 8px; border-radius: 4px; }
.tw-hud.tr { top: 12px; right: 12px; }
.tw-hud.tr .seg { background: rgba(255, 255, 255, .94); box-shadow: var(--shadow); }
.tw-card { position: absolute; z-index: 5; top: 58px; right: 12px; width: 290px; max-height: calc(100% - 128px); overflow: auto; padding: 14px 16px; border-radius: 12px; background: rgba(255, 255, 255, .98); border: 1px solid var(--line); box-shadow: 0 12px 32px rgba(16, 24, 40, .18); }
.tw-card h4 { font: 700 15px/1.3 var(--f-body); padding-right: 28px; }
.tw-card .sub { font: 500 12px/1.35 var(--f-body); color: var(--text-3); margin-top: 2px; }
.tw-card .x { position: absolute; top: 8px; right: 8px; width: 32px; height: 32px; border-radius: 8px; color: var(--text-3); display: grid; place-items: center; font-size: 18px; }
.tw-card .x:hover { background: var(--surface-2); color: var(--text); }
.tw-card .kv { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 10px; }
.tw-card .kv div { padding: 7px 9px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line); min-width: 0; }
.tw-card .kv small { display: block; font: 500 11px/1.2 var(--f-body); color: var(--text-3); }
.tw-card .kv b { display: block; margin-top: 3px; font: 700 14px/1.1 var(--f-body); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tw-card .note { margin-top: 10px; padding: 9px 11px; border-radius: 9px; background: var(--tint); border: 1px solid #EBD3EA; font: 500 12.5px/1.5 var(--f-body); color: var(--text-2); }
.tw-card .note b { color: var(--brand); }
.tw-card .acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tw-card .acts button, .tw-b, .ins .acts button, .mini-btn { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line-strong); background: #fff; font: 600 12.5px/1 var(--f-body); color: var(--text); white-space: nowrap; }
.tw-card .acts button.pri, .tw-b.pri, .ins .acts button.pri, .mini-btn.pri { background: var(--brand); border-color: var(--brand); color: #fff; }
.tw-card .bars { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 3px; align-items: end; height: 54px; margin-top: 10px; }
.tw-card .bars i { display: block; border-radius: 3px 3px 1px 1px; background: #CFA3CE; position: relative; }
.tw-card .bars i.a { background: var(--amber); } .tw-card .bars i.r { background: rgba(217, 45, 32, .5); min-height: 3px; }
.tw-card .bars i span { position: absolute; bottom: -14px; left: 0; right: 0; text-align: center; font: 500 9.5px/1 var(--f-body); color: var(--text-3); }
.tw-card .bars + .gap { height: 14px; }
.tw-bar { position: absolute; z-index: 4; left: 12px; bottom: 12px; right: 210px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tw-b { box-shadow: var(--shadow); background: rgba(255, 255, 255, .96); }
.tw-sun { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 6px 0 12px; border-radius: 8px; background: rgba(255, 255, 255, .96); border: 1px solid var(--line-strong); box-shadow: var(--shadow); font: 600 12.5px/1 var(--f-body); color: var(--text-2); }
.tw-sun input { width: 130px; accent-color: var(--brand); }
.tw-sun b { min-width: 38px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.tw-live { height: 26px; padding: 0 9px; border-radius: 6px; font: 600 11.5px/1 var(--f-body); color: var(--text-2); border: 1px solid var(--line); }
.tw-live.on { background: #ECFDF3; color: #067647; border-color: #ABEFC6; }
.tw-narr { position: absolute; z-index: 5; left: 12px; bottom: 58px; width: min(440px, calc(100% - 330px)); padding: 14px 16px; border-radius: 12px; background: rgba(255, 255, 255, .98); border: 1px solid var(--line); box-shadow: 0 12px 32px rgba(16, 24, 40, .18); }
.tw-narr .h { display: flex; align-items: center; gap: 8px; font: 700 11.5px/1 var(--f-body); color: var(--brand); letter-spacing: .02em; }
.tw-narr .h em { margin-left: auto; font-style: normal; color: var(--text-3); font-weight: 600; }
.tw-narr h4 { margin-top: 8px; font: 700 15.5px/1.3 var(--f-body); }
.tw-narr p { margin-top: 6px; font: 500 13px/1.55 var(--f-body); color: var(--text-2); }
.tw-narr p b { color: var(--text); }
.tw-narr .dots { display: flex; gap: 5px; margin-top: 10px; }
.tw-narr .dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--line-strong); } .tw-narr .dots i.on { background: var(--brand); width: 18px; border-radius: 4px; }
.tw-narr .nav { display: flex; gap: 6px; margin-top: 10px; }
.tw-narr .nav button { height: 34px; min-width: 40px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line-strong); background: #fff; font: 600 12.5px/1 var(--f-body); }
.tw-narr .nav button.pri { background: var(--brand); border-color: var(--brand); color: #fff; }
.tw-narr .nav .end { margin-left: auto; }
.tw-fallback { position: absolute; inset: 0; z-index: 3; background: #f3f5f8; display: flex; flex-direction: column; padding-top: 96px; }
.tw-fallback .fb-h { order: 2; padding: 4px 16px 60px; font: 500 12.5px/1.4 var(--f-body); color: var(--text-2); }
.tw-fallback svg { flex: 1; width: 100%; min-height: 0; }
.tw-fallback .pl-s { cursor: pointer; } .tw-fallback .pl-s:hover { stroke: #101828; stroke-width: 1.2; }
.twin.walking .tw-hud, .twin.walking .tw-bar, .twin.walking .o3-ui, .twin.walking .tw-narr { display: none !important; }
.twin.walking .tw-card { top: 64px; }
.twin-foot { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.twin-foot > div { padding: 11px 14px; min-width: 0; border-right: 1px solid var(--line-2); }
.twin-foot > div:last-child { border-right: 0; }
.twin-foot small { display: block; font: 500 11.5px/1.2 var(--f-body); color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.twin-foot b { display: block; margin-top: 4px; font: 700 18px/1 var(--f-body); white-space: nowrap; }
.twin-foot u { text-decoration: none; font: 500 11px var(--f-body); color: var(--text-3); margin-left: 3px; }
/* orbit3d controls */
.o3-ui { position: absolute; right: 12px; bottom: 12px; z-index: 4; display: flex; align-items: center; gap: 6px; pointer-events: none; }
.o3-hint { padding: 6px 10px; border-radius: 999px; background: rgba(16, 24, 40, .8); color: #fff; font: 500 12px var(--f-body); white-space: nowrap; opacity: 0; transform: translateY(4px); transition: opacity .25s var(--ease), transform .25s var(--ease); position: absolute; right: 0; bottom: 44px; }
.o3-hint.on { opacity: 1; transform: none; }
.o3-nudge .o3-hint { background: var(--brand); }
.o3-reset, .o3-zoom { pointer-events: auto; display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 34px; padding: 0 10px; border-radius: 8px; background: rgba(255, 255, 255, .96); border: 1px solid var(--line-strong); box-shadow: var(--shadow); font: 600 12.5px var(--f-body); color: var(--text-2); }
.o3-zoom { width: 34px; padding: 0; font-size: 17px; }
.o3-reset:hover, .o3-zoom:hover { color: var(--text); }
/* walk3d HUD */
.wk-hud { position: absolute; inset: 0; z-index: 6; pointer-events: none; }
.wk-hud > * { pointer-events: auto; }
.wk-top { position: absolute; left: 12px; top: 12px; display: flex; align-items: center; gap: 10px; }
.wk-exit { height: 36px; padding: 0 12px; border-radius: 9px; background: #fff; border: 1px solid var(--line-strong); font: 600 13px var(--f-body); box-shadow: var(--shadow); }
.wk-where { display: flex; flex-direction: column; padding: 6px 12px; border-radius: 10px; background: rgba(16, 24, 40, .74); color: #fff; }
.wk-where b { font-size: 13.5px; font-weight: 700; } .wk-where span { font-size: 12px; opacity: .85; }
.wk-bar { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: calc(100% - 24px); }
.wk-tour, .wk-tools { display: flex; align-items: center; gap: 2px; padding: 4px; border-radius: 12px; background: rgba(16, 24, 40, .8); }
.wk-tour button, .wk-tools button { min-width: 40px; height: 36px; padding: 0 12px; border: 0; border-radius: 9px; background: transparent; color: #fff; font: 600 13px var(--f-body); }
.wk-tour button:hover, .wk-tools button:hover { background: rgba(255, 255, 255, .14); }
.wk-tools button.on, .wk-tour button[aria-pressed="true"] { background: var(--brand-h); }
.wk-tools button[hidden] { display: none; }
.wk-stop { padding: 0 10px; font-size: 12.5px; color: rgba(255, 255, 255, .88); white-space: nowrap; max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.wk-hint { position: absolute; left: 50%; top: 64px; transform: translate(-50%, -6px); margin: 0; padding: 8px 14px; border-radius: 99px; background: rgba(16, 24, 40, .8); color: #fff; font-size: 12.5px; opacity: 0; transition: .25s; pointer-events: none; max-width: calc(100% - 260px); text-align: center; }
.wk-hint.on { opacity: 1; transform: translate(-50%, 0); }
.twin.walk-stereo .wk-hud > :not(.wk-top), .twin.walk-stereo .p3-labels, .twin.walk-stereo .tw-card { display: none !important; }
.twin { height: 580px; background: linear-gradient(#e6ebf1, #f3f5f8); }
.p3-l.ups .bx { border-color: #EBD3EA; }
.tw-card .spk { margin-top: 10px; } .tw-card .spk small { display: block; font: 500 11px/1.3 var(--f-body); color: var(--text-3); margin-top: 2px; }
.tw-card .cells, #bkDetail .cells { display: grid; grid-template-columns: repeat(16, minmax(0, 1fr)); gap: 2px; align-items: end; height: 48px; margin-top: 10px; }
.tw-card .cells i, #bkDetail .cells i { display: block; border-radius: 2px 2px 0 0; background: #8fd1ae; }
.tw-card .cells i.a, #bkDetail .cells i.a { background: var(--amber); } #bkDetail .cells i.on { outline: 2px solid var(--text); }
.tw-card .kv b.cr { color: #B42318; } .tw-card .kv b.ca { color: #B54708; } .tw-card .kv b.cg { color: #067647; }
.twin.touring .p3-labels .ups { opacity: .85; }

/* ===== layout bits ===== */
.kpis.k8 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kpi.warn { border-color: #FEDF89; } .kpi.warn .val b { color: #B54708; }
.kpi.bad { border-color: #FECDCA; } .kpi.bad .val b { color: #B42318; }
.col-stack { display: flex; flex-direction: column; gap: var(--gap); min-width: 0; }
.banner.ok { border-color: #ABEFC6; background: var(--green-t); } .banner.ok > .ic { color: #067647; } .banner.warn > .ic { color: #B54708; }
.banner > .ic { flex: none; } .banner > div { flex: 1; min-width: 0; } .banner .btn { flex: none; }
.c-amber { color: #B54708; }
.blk { display: block; }
.vzbox { min-height: 40px; }
.empty-s { padding: 14px; border: 1px dashed var(--line-strong); border-radius: var(--rs); color: var(--text-3); font-size: 12.5px; }

/* unit list (overview) */
.ulist { display: flex; flex-direction: column; }
.urow { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; grid-template-areas: 'b n p' 'b l a'; gap: 4px 10px; align-items: center; padding: 9px 4px; border-bottom: 1px solid var(--line-2); border-radius: 6px; min-height: 52px; }
.urow:last-child { border-bottom: 0; } .urow:hover { background: var(--surface-2); }
.urow .un b { display: block; font-size: 13px; font-weight: 600; } .urow .un b small { font-weight: 500; color: var(--text-3); font-size: 11px; }
.urow .un > small, .urow .ul small, .urow .ua small { display: block; font-size: 11.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.urow .mbadge { grid-area: b; } .urow .un { grid-area: n; min-width: 0; } .urow .st { grid-area: p; justify-self: end; } .urow .ul { grid-area: l; display: flex; align-items: center; gap: 8px; min-width: 0; } .urow .ua { grid-area: a; text-align: right; } .urow .ul .minibar { width: 70px; flex: none; } .urow .un > small { display: none; } .urow .ua small { display: inline; margin-left: 4px; } .urow .ua b { font-size: 13.5px; font-weight: 700; white-space: nowrap; }
.rides { display: flex; flex-direction: column; gap: 8px; }
.ride { display: grid; grid-template-columns: 62px 1fr auto; gap: 10px; align-items: center; padding: 9px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); }
.ride .rt { font: 600 12px var(--f-mono); color: var(--text-2); } .ride b { display: block; font-size: 12.5px; font-weight: 600; } .ride small { display: block; font-size: 11.5px; color: var(--text-3); }
.ride .rv { font: 700 13.5px var(--f-body); color: #067647; white-space: nowrap; }
.whatif label { display: block; font-size: 13px; color: var(--text-2); } .whatif label b { color: var(--text); font-size: 16px; }
.whatif input { width: 100%; margin: 12px 0; height: 28px; }
.wi-out { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px; }
.wi-out div { padding: 10px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); min-width: 0; }
.wi-out small { display: block; font-size: 11.5px; color: var(--text-3); } .wi-out b { display: block; font: 700 18px/1.2 var(--f-body); margin-top: 4px; white-space: nowrap; }
.ins { padding: 16px; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); }
.ins.crit { border-color: #FECDCA; background: linear-gradient(#FEF3F2, #fff 60%); } .ins.warn { border-color: #FEDF89; background: linear-gradient(#FFFAEB, #fff 60%); } .ins.info { border-color: var(--tint-2); background: linear-gradient(var(--tint), #fff 60%); }
.ins .inr { font-weight: 600; color: var(--text); } .ins .btn { align-self: flex-start; margin-top: auto; }
.panel .ins-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ins-grid + .grid { margin-top: var(--gap); }

/* units page */
.par { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.par .pm { padding: 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); display: flex; flex-direction: column; gap: 6px; }
.par .pm span { font: 700 20px/1 var(--f-body); } .par .pm .minibar { width: 100%; } .par .pm small { font-size: 11.5px; color: var(--text-3); }
.ucards { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--gap); }
.ucard { display: flex; flex-direction: column; gap: 8px; } .ucard:hover { border-color: var(--tint-2); }
.ucard .row { display: flex; align-items: center; gap: 10px; } .ucard .grow b { display: block; } .ucard .grow small { display: block; font-size: 11.5px; }
.ucard .semi { margin: 0 auto; }
.ucard .kv3 { display: grid; gap: 6px; } .ucard .kv3 div { padding: 6px 8px; border-radius: 8px; background: var(--surface-2); } .ucard .kv3 small { display: block; font-size: 11px; color: var(--text-3); } .ucard .kv3 b { font-size: 13px; }
.utabs a { display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border-radius: 6px; font: 500 12.5px var(--f-body); color: var(--text-2); }
.utabs a.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }

/* single-line mimic */
.mimic { overflow-x: auto; }
.mimic-svg { width: 100%; min-width: 640px; height: auto; }
.mimic-svg .mt { font: 600 12px var(--f-body); fill: var(--text-2); }
.mimic-svg .bt { font: 700 13px var(--f-body); fill: var(--text); text-anchor: middle; } .mimic-svg .bs { font: 500 11px var(--f-body); fill: var(--text-3); text-anchor: middle; }
.mimic-svg .blk { fill: #F9FAFB; stroke: #D0D5DD; stroke-width: 1.5; }
.mimic-svg .blk.on { fill: var(--tint); stroke: var(--primary); } .mimic-svg .blk.warn { fill: #FFFAEB; stroke: #F79009; } .mimic-svg .blk.info { fill: #EFF8FF; stroke: #2E90FA; }
.mimic-svg path { fill: none; }
.mimic-svg .fl.on { stroke-dasharray: 10 8; animation: flow 1.1s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -18; } }
.tbl.io td:first-child { color: var(--text-2); }
.comp { display: flex; flex-direction: column; gap: 4px; }
.crow { display: grid; grid-template-columns: minmax(0, 1fr) 90px 70px; gap: 10px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--line-2); }
.crow:last-child { border-bottom: 0; }
.crow b { display: block; font-size: 12.5px; font-weight: 600; } .crow small { display: block; font-size: 11.5px; color: var(--text-3); }
.crow .minibar { width: 100%; } .crow > span:last-child { text-align: right; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.sstrip { margin-bottom: 12px; } .sstrip .sh b { font-size: 13px; } .sstrip .sh small { display: block; font-size: 11.5px; color: var(--text-3); }
.cells40 { display: grid; grid-template-columns: repeat(40, minmax(0, 1fr)); gap: 2px; margin-top: 6px; }
.cells40 i { display: block; height: 18px; border-radius: 2px; }
.cells40.li { grid-template-columns: repeat(32, minmax(0, 1fr)); } .cells40.li i { height: 12px; }

/* battery analytics */
.bheat .ax { font: 500 11px var(--f-body); fill: var(--text-3); } .bheat .cv { font: 600 10px var(--f-body); pointer-events: none; }
.bheat .hc { cursor: pointer; } .bheat .hc:hover { stroke: #101828; stroke-width: 1.5; }
.heat-leg { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 10px; font-size: 12px; color: var(--text-2); }
.heat-leg span { display: inline-flex; align-items: center; gap: 6px; } .heat-leg i { width: 14px; height: 10px; border-radius: 2px; } .heat-leg .muted { color: var(--text-3); }
.bd-h b { display: block; font: 700 16px var(--f-body); } .bd-h small { display: block; font-size: 12px; color: var(--text-3); margin-bottom: 10px; }
.nbs { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; margin-top: 10px; }
.nbs span { padding: 5px 4px; border-radius: 6px; text-align: center; font-size: 11px; background: var(--surface-2); border-bottom: 3px solid var(--c); }
.nbs span b { display: block; font-size: 11px; color: var(--text-3); } .nbs span.on { outline: 2px solid var(--text); }
.ra-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.ra { padding: 8px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); text-align: center; }
.ra small { display: block; font-size: 11px; color: var(--text-3); } .ra b { display: block; font: 700 20px/1.2 var(--f-body); } .ra span { font-size: 11px; color: var(--text-2); }
.ra.bad { border-color: #FECDCA; background: var(--red-t); } .ra.bad b { color: #B42318; } .ra.warn { border-color: #FEDF89; background: var(--amber-t); }
.ra-f { margin-top: 12px; } .h5 { font: 600 12.5px var(--f-body); color: var(--text-2); margin-bottom: 4px; }
.fcl { margin-top: 8px; } .fcl .crow { grid-template-columns: minmax(0, 1fr) auto; }

/* room */
.eqgrid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.eq { padding: 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.eq b { font-size: 13px; } .eq small { font-size: 11.5px; color: var(--text-3); } .eq .st { align-self: flex-start; }

/* power */
.ride-steps { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.ride-steps div { padding: 9px 10px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); min-width: 0; }
.ride-steps span { display: block; font-size: 11px; color: var(--text-3); } .ride-steps b { display: block; font-size: 12.5px; margin-top: 2px; } .ride-steps small { display: block; font-size: 11.5px; color: var(--text-2); }
.tlist { display: flex; flex-direction: column; gap: 6px; max-height: 330px; overflow-y: auto; }
.trl { display: grid; grid-template-columns: 64px 1fr; gap: 10px; padding: 8px 10px; border-radius: 9px; border-left: 3px solid #98A2B3; background: var(--surface-2); }
.trl.crit { border-left-color: var(--red); } .trl.warn { border-left-color: var(--amber); } .trl.info { border-left-color: var(--blue); }
.trl .mono { font-size: 11.5px; color: var(--text-2); } .trl b { display: block; font-size: 12.5px; } .trl small { display: block; font-size: 11.5px; color: var(--text-3); }

/* efficiency */
.ecol { display: flex; flex-direction: column; gap: 8px; }
.eco { padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); }
.eco .eh { display: flex; align-items: center; justify-content: space-between; } .eco > small { display: block; font-size: 11.5px; color: var(--text-2); margin: 3px 0 6px; }
.eco .kv3 { display: grid; gap: 6px; } .eco .kv3 small { display: block; font-size: 11px; color: var(--text-3); } .eco .kv3 b { font-size: 13px; }
.chipx { font: 600 11.5px var(--f-body); padding: 3px 9px; border-radius: 99px; } .chipx.g { background: var(--green-t); color: #067647; } .chipx.a { background: var(--amber-t); color: #B54708; } .chipx.r { background: var(--red-t); color: #B42318; }

/* alarms */
.altbl td.wrapc { white-space: normal; min-width: 200px; max-width: 280px; }
.altbl td small.blk { font-size: 11px; white-space: normal; max-width: 180px; }
.kanban { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.kcol { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.kh { display: flex; justify-content: space-between; font: 600 12.5px var(--f-body); color: var(--text-2); } .kh span { color: var(--text-3); }
.kc { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px; box-shadow: var(--shadow); }
.kc .row { display: flex; gap: 8px; } .kc p { font-size: 12.5px; font-weight: 600; margin: 4px 0; } .kc small { display: block; font-size: 11.5px; color: var(--text-3); }
.kc .kf { margin-top: 6px; font-size: 11.5px; color: var(--text-2); } .kinr { margin-top: 6px; font: 700 12.5px var(--f-body); color: var(--primary); }
.cal td, .cal th { padding: 8px 6px; } .cal td:first-child { white-space: normal; min-width: 180px; }
.cdot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: var(--primary); }
.cdot.batt { background: var(--red); } .cdot.part { background: var(--amber); } .cdot.room { background: var(--blue); }
.cal tr.tot td { background: var(--surface-2); font-weight: 600; }

/* reports */
.phone { margin: 0 auto; max-width: 330px; border-radius: 26px; border: 8px solid #101828; background: #ECE5DD; overflow: hidden; }
.wa-h { padding: 10px 12px; background: #075E54; color: #fff; } .wa-h b { display: block; font-size: 13.5px; } .wa-h small { font-size: 11px; opacity: .85; }
.wa-b { padding: 10px; display: flex; flex-direction: column; gap: 8px; height: 440px; overflow-y: auto; }
.wa { align-self: flex-start; max-width: 92%; background: #fff; border-radius: 0 10px 10px 10px; padding: 8px 10px 5px; font: 500 12.5px/1.45 var(--f-body); color: #111; box-shadow: 0 1px 1px rgba(0,0,0,.12); }
.wa.me { align-self: flex-end; background: #DCF8C6; border-radius: 10px 0 10px 10px; } .wa small { display: block; text-align: right; font-size: 10.5px; color: #667085; }
.rules { display: flex; flex-direction: column; gap: 8px; }
.rule { display: grid; grid-template-columns: 10px 1fr; gap: 10px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); }
.rule b { display: block; font-size: 12.5px; } .rule small { display: block; font-size: 11.5px; color: var(--text-2); }
.sdot { width: 10px; height: 10px; border-radius: 50%; margin-top: 4px; background: var(--blue); } .sdot.crit { background: var(--red); } .sdot.warn { background: var(--amber); }
.dlog { margin-top: 14px; } .dlog p { padding: 7px 0; border-bottom: 1px solid var(--line-2); } .dlog b { display: block; font-size: 12.5px; } .dlog small { font-size: 11.5px; color: var(--text-3); }
.rb { display: grid; grid-template-columns: 1.1fr 1fr 1.3fr; gap: 18px; }
.rb fieldset { border: 0; min-width: 0; } .rb legend { font: 700 12.5px/1 var(--f-body); margin-bottom: 8px; }
.rb .opts { display: flex; flex-direction: column; gap: 6px; }
.rb .opt { position: relative; display: flex; align-items: flex-start; gap: 10px; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line); background: #fff; cursor: pointer; min-height: 44px; }
.rb .opt:has(input:checked) { border-color: var(--primary); background: var(--tint); }
.rb .opt input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.rb .opt::before { content: ""; flex-shrink: 0; width: 16px; height: 16px; margin-top: 1px; border: 1.5px solid var(--line-strong); border-radius: 5px; background: #fff; }
.rb .opt:has(input[type="radio"])::before { border-radius: 50%; }
.rb .opt:has(input:checked)::before { border-color: var(--primary); background: var(--primary); box-shadow: inset 0 0 0 3px #fff; }
.rb .opt:has(input:focus-visible) { outline: 2px solid var(--primary-h); outline-offset: 2px; }
.rb .opt b { display: block; font-size: 13px; } .rb .opt small { display: block; font-size: 11.5px; color: var(--text-3); }
.rb .sch { margin-top: 8px; font-size: 12px; color: var(--text-2); }
.rb .prev { border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: var(--surface-2); }
.rb .prev h5 { font: 700 14px var(--f-body); } .rb .prev p { margin-top: 4px; font-size: 12px; color: var(--text-2); } .rb .prev ul { margin: 8px 0 0 16px; font-size: 12px; line-height: 1.6; color: var(--text-2); }
.rb .dl { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }

/* gateway + MIRA */
.pathsvg { width: 100%; height: auto; min-width: 760px; } .pathsvg .flowl { animation: flow 1.2s linear infinite; }
.panel:has(> .pathsvg), .panel:has(.pathsvg) { overflow-x: auto; }
.feed { display: flex; flex-direction: column; gap: 6px; max-height: 470px; overflow-y: auto; }
.fd { display: grid; grid-template-columns: 46px 1fr; gap: 10px; padding: 9px 10px; border-radius: 10px; border-left: 3px solid var(--blue); background: var(--surface-2); }
.fd.crit { border-left-color: var(--red); } .fd.warn { border-left-color: var(--amber); }
.fd .mono { font-size: 11.5px; color: var(--text-2); } .fd b { font-size: 12.5px; } .fd p { font-size: 12.5px; color: var(--text-2); } .fd small { font-size: 11.5px; color: var(--text-3); }
.tk i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); display: inline-block; } .tk.warn i { background: var(--amber); } .tk.bad i { background: var(--red); }

/* ===== responsive ===== */
@media (max-width: 1440px) { .ucards { grid-template-columns: repeat(3, minmax(0, 1fr)); } .ride-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); } .eqgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1280px) {
  .twin-panel { grid-column: span 12; } .col-stack { grid-column: span 12; }
  .kpis.k8 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .panel .ins-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rb { grid-template-columns: 1fr 1fr; } .rb .prevcol { grid-column: span 2; }
  .kanban { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .twin { height: 480px; }
  .tw-hud.tl { max-width: calc(100% - 24px); } .tw-hud.tl .t span { display: none; }
  .tw-hud.tr { top: auto; bottom: 58px; left: 12px; right: 12px; overflow-x: auto; scrollbar-width: none; } .tw-hud.tr::-webkit-scrollbar { display: none; }
  .tw-bar { right: 12px; } .o3-ui { bottom: 104px; }
  .tw-card { top: auto; bottom: 12px; left: 12px; right: 12px; width: auto; max-height: 64%; }
  .tw-narr { left: 12px; right: 12px; width: auto; bottom: 104px; }
  .twin-foot { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .twin-foot > div:nth-child(3n) { border-right: 0; } .twin-foot > div:nth-child(-n+3) { border-bottom: 1px solid var(--line-2); }
  .ra-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .kpis.k8 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .twin { height: 540px; }
  .tw-hud.tr { top: 62px; bottom: auto; }
  .twin.touring .tw-hud.tr, .twin.touring .p3-labels .eq { display: none; }
  .tw-narr .dots { display: none; } .tw-narr { padding: 12px 14px; bottom: 116px; max-height: 52%; overflow: auto; } .tw-narr p { font-size: 12.5px; line-height: 1.45; }
  .tw-hud.tl .t { font-size: 14px; } .tw-hud.tl .tw-legend { display: none; }
  .tw-b, .o3-reset, .o3-zoom, .tw-hud.tr .seg button, .tw-narr .nav button, .tw-card .acts button, .tw-card .x, .wk-exit, .wk-tour button, .wk-tools button, .p3-l { min-height: 44px; }
  .o3-zoom, .tw-card .x { width: 44px; } .o3-ui { bottom: 116px; }
  .wk-hint { max-width: calc(100% - 24px); top: 64px; } .wk-stop { display: none; }
  .ucards, .eqgrid, .ride-steps, .kanban, .par, .wi-out { grid-template-columns: 1fr; }
  .panel .ins-grid { grid-template-columns: 1fr; }
  .rb { grid-template-columns: 1fr; } .rb .prevcol { grid-column: auto; }
  .ra-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .crow { grid-template-columns: minmax(0, 1fr) 60px 64px; }
  .utabs a { min-height: 44px; }
  .ride { grid-template-columns: 1fr auto; } .ride .rt { grid-column: 1 / -1; }
  .whatif input { height: 44px; }
  .banner .btn { width: 100%; justify-content: center; }
  .tw-card .acts button { flex: 1; justify-content: center; }
  .urow { min-height: 56px; }
  .chat-panel .ask-box .btn { min-height: 44px; }
}
.twin-panel .twin { flex: 1 1 auto; height: auto; min-height: 580px; }
@media (max-width: 900px) { .twin-panel .twin { min-height: 480px; } }
@media (max-width: 700px) { .twin-panel .twin { min-height: 540px; } }
/* lines draw immediately (the core draw-in animation hid solid lines until it finished) */
svg.chart .ln { animation: none !important; stroke-dashoffset: 0 !important; stroke-dasharray: none !important; }
svg.chart .ln[stroke-dasharray] { stroke-dasharray: 5 4 !important; }
td.wrapc { white-space: normal !important; min-width: 220px; }
.altbl td.num { min-width: 140px; white-space: normal; } .altbl td small.blk { max-width: none; }
@media (max-width: 700px) {
  table.mob-cards td a { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; }
  .ask-box textarea { min-height: 44px; }
}
@media (max-width: 700px) {
  .tw-hud.tr { left: 12px; right: 12px; overflow-x: auto; scrollbar-width: none; }
  .tw-hud.tr::-webkit-scrollbar { display: none; }
  .tw-hud.tr .seg { flex-wrap: nowrap; }
}

/* ===================== MIRA Crew specific ===================== */
.c-red { color: #B42318 !important; } .c-green { color: #067647; }
.banner.red > .ic { color: #B42318; } .banner.warn { border-color: #FEDF89; }
.st { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 999px; font: 600 11.5px/1 var(--f-body); white-space: nowrap; }
.st i { width: 6px; height: 6px; border-radius: 50%; }
.twin-foot b { font-size: 16px; }
/* machine list (floor) */
.mlist { display: flex; flex-direction: column; gap: 6px; max-height: 300px; overflow-y: auto; }
.mgh { font: 700 11px/1 var(--f-body); letter-spacing: .04em; text-transform: uppercase; color: var(--text-3); margin: 6px 0 4px; }
.mrow { display: grid; grid-template-columns: 10px 76px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 6px 4px; border-radius: 8px; min-height: 44px; }
.mrow:hover { background: var(--surface-2); }
.sdot2 { width: 10px; height: 10px; border-radius: 50%; }
.mrow .mn b { display: block; font: 700 12.5px var(--f-mono); } .mrow .mn small { display: block; font-size: 11px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mrow .mo { display: flex; align-items: center; gap: 6px; min-width: 0; } .mrow .mo .minibar { flex: 1; } .mrow .mo small { font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.feed2 { display: flex; flex-direction: column; gap: 4px; }
.frow { display: grid; grid-template-columns: 44px 1fr; gap: 8px; padding: 6px 8px; border-radius: 8px; border-left: 3px solid #12B76A; background: var(--surface-2); font-size: 12px; }
.frow.warn { border-left-color: var(--amber); } .frow.bad { border-left-color: var(--red); }
.frow time { font: 600 11.5px var(--f-mono); color: var(--text-2); }
.flag { display: inline-block; padding: 2px 6px; border-radius: 5px; font: 700 10px/1.3 var(--f-body); letter-spacing: .02em; background: var(--grey-t); color: var(--text-2); white-space: nowrap; }
.flag.warn { background: var(--amber-t); color: #B54708; } .flag.bad { background: var(--red-t); color: #B42318; } .flag.info { background: var(--blue-t); color: #175CD3; } .flag.ok { background: var(--green-t); color: #067647; }
.tw-card .flags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.oplink { font-weight: 600; color: var(--text); } .oplink:hover { color: var(--primary); }
.sk { display: inline-block; padding: 2px 8px; border-radius: 999px; font: 600 11px/1.4 var(--f-body); }
.sk-expert { background: var(--tint); color: var(--primary); } .sk-skilled { background: var(--blue-t); color: #175CD3; } .sk-beginner { background: var(--amber-t); color: #B54708; }
.apq { display: inline-flex; flex-wrap: wrap; gap: 4px 10px; font: 500 11.5px var(--f-body); color: var(--text-3); text-decoration: none; } .apq b { color: var(--text); font-weight: 700; }
.av { display: inline-grid; place-items: center; flex: none; border-radius: 50%; color: #fff; font-weight: 700; background: hsl(var(--h, 290) 55% 42%); }
.av.none { width: 38px; height: 38px; background: var(--red-t); color: #B42318; font-size: 16px; }
.row { display: flex; align-items: center; } .grow { flex: 1; min-width: 0; } .blk { display: block; }
.vz .lb { font: 600 11.5px var(--f-body); fill: var(--text-2); } .vz .vl { font: 600 11px var(--f-body); fill: var(--text); }
/* machine page */
.mswitch { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 12px; }
.mswitch a { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); font: 600 12px var(--f-mono); color: var(--text-2); }
.mswitch a i { width: 8px; height: 8px; border-radius: 50%; } .mswitch a.on { border-color: var(--primary); color: var(--primary); background: var(--tint); }
.sig3 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); }
.sig .lbl { display: flex; align-items: center; gap: 7px; font: 600 12px var(--f-body); color: var(--text-2); }
.sig .big { margin-top: 10px; } .sig .big b { display: block; font: 800 28px/1.1 var(--f-body); font-variant-numeric: tabular-nums; } .sig .big u { display: block; text-decoration: none; font-size: 12px; color: var(--text-3); margin-top: 4px; }
.sig .sub { display: flex; justify-content: space-between; gap: 8px; margin-top: 10px; font-size: 12px; color: var(--text-2); }
.pbar { height: 8px; border-radius: 4px; background: var(--grey-t); margin-top: 10px; overflow: hidden; } .pbar i { display: block; height: 100%; background: #12B76A; }
.opl { display: flex; align-items: center; gap: 10px; margin-top: 10px; } .opl b { display: block; font-size: 14px; } .opl small { display: block; font-size: 11.5px; color: var(--text-3); }
.rlist { display: flex; flex-direction: column; gap: 6px; }
.rrow { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) 60px; gap: 8px; align-items: center; font-size: 12.5px; } .rrow b { text-align: right; } .rrow .minibar { width: 100%; }
.qlist { display: flex; flex-direction: column; gap: 4px; }
.qrow { display: grid; grid-template-columns: 30px 1fr auto; gap: 8px; align-items: center; padding: 6px; border-radius: 8px; min-height: 44px; } .qrow:hover { background: var(--surface-2); }
.qrow b { display: block; font-size: 12.5px; } .qrow small { display: block; font-size: 11px; color: var(--text-3); }
.lvl { display: inline-block; padding: 2px 7px; border-radius: 6px; font: 700 11px var(--f-mono); background: var(--grey-t); color: var(--text-2); }
.lvl.l1 { background: #F2F4F7; } .lvl.l2 { background: #EBD3EA; color: #680166; } .lvl.l3 { background: #C48BC2; color: #fff; } .lvl.l4 { background: #680166; color: #fff; }
.sklist { display: flex; flex-wrap: wrap; gap: 4px; }
.kv4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.kv4 > div { padding: 9px 10px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); min-width: 0; }
.kv4 small { display: block; font-size: 11px; color: var(--text-3); } .kv4 b { display: block; margin-top: 3px; font: 700 15px/1.2 var(--f-body); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prof .kv4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.prof .pn { font: 800 18px/1.2 var(--f-body); } .prof .tags { display: flex; flex-wrap: wrap; gap: 4px; }
.certs { display: flex; flex-direction: column; gap: 6px; }
.cert { padding: 9px 11px; border-radius: 10px; border: 1px solid var(--line); border-left: 4px solid #12B76A; background: var(--surface-2); }
.cert.expired { border-left-color: var(--red); background: var(--red-t); } .cert.due { border-left-color: var(--amber); background: var(--amber-t); } .cert.soon { border-left-color: var(--blue); }
.cert b { display: block; font-size: 12.5px; } .cert small { display: block; font-size: 11.5px; color: var(--text-2); }
.mrow2 { display: grid; grid-template-columns: 40px 1fr; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--line-2); font-size: 12.5px; } .mrow2 small { display: block; color: var(--text-3); font-size: 11.5px; }
/* leaderboard */
.podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
.pod { display: flex; align-items: center; gap: 12px; position: relative; } .pod b { display: block; font-size: 14px; } .pod small { display: block; font-size: 11.5px; color: var(--text-3); }
.pod .medal { position: absolute; top: 8px; left: 8px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font: 800 11px var(--f-body); color: #fff; background: #680166; }
.pod.p2 .medal { background: #B64FB3; } .pod.p3 .medal { background: #C48BC2; }
.pod .ps { text-align: right; } .pod .ps b { font: 800 22px/1 var(--f-body); color: var(--primary); }
.wt { margin-bottom: 10px; } .wt .row { justify-content: space-between; font-size: 12.5px; } .wt input { width: 100%; accent-color: var(--primary); height: 28px; }
/* planner */
.roster td { white-space: nowrap; } .roster td.cur { background: var(--tint); }
.cand { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; border: 1px solid var(--line); margin-top: 8px; } .cand.best { border-color: var(--primary); background: var(--tint); }
.cand small { font-size: 11.5px; color: var(--text-2); }
.calc { padding: 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); font-size: 12.5px; line-height: 1.7; } .calc .tot { font: 800 18px var(--f-body); color: var(--primary); }
.secards { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.secard { display: flex; flex-direction: column; gap: 4px; } .secard .row { justify-content: space-between; gap: 6px; } .secard small { font-size: 11.5px; color: var(--text-2); }
.secard .big2 { font: 800 24px/1.1 var(--f-body); }
.sum p, .sum li { font-size: 13px; line-height: 1.55; color: var(--text-2); } .sum ol { margin: 8px 0 0 18px; } .sum li { margin-bottom: 6px; } .sum b { color: var(--text); }
.mot { padding: 8px 0; border-bottom: 1px solid var(--line-2); } .mot b { display: block; font-size: 12.5px; margin-bottom: 4px; } .mot .minibar { flex: 1; } .mot small { font-size: 11.5px; color: var(--text-3); }
.rules.two { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.il-svg { width: 100%; height: auto; } .il-svg .b { fill: #F9FAFB; stroke: #D0D5DD; stroke-width: 1.5; } .il-svg .b.pri { fill: var(--tint); stroke: var(--primary); }
.il-svg .t { font: 700 13px var(--f-body); fill: var(--text); } .il-svg .s { font: 500 11px var(--f-body); fill: var(--text-3); }
.il-svg .w { stroke: #98A2B3; stroke-width: 2; fill: none; } .il-svg .w.p { stroke: var(--primary); stroke-dasharray: 8 6; animation: flow 1.1s linear infinite; }
.kpis.k8 .kpi .val b { font-size: 26px; }
td small.blk { white-space: normal; max-width: 260px; }
@media (max-width: 1440px) { .secards { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 1280px) { .sig3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .rules.two { grid-template-columns: repeat(2, minmax(0, 1fr)); } .c3.col-stack, .c9.col-stack { grid-column: span 12; } .kpis.k6 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 900px) { .secards { grid-template-columns: repeat(2, minmax(0, 1fr)); } .podium { grid-template-columns: 1fr; } }
@media (max-width: 700px) {
  .sig3, .kv4, .rules.two, .kpis.k4, .kpis.k6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .secards { grid-template-columns: 1fr; }
  .mswitch a, .chip, .seg button, .wt input, .btn, .btn.sm, .qrow, .mrow, .oplink, .rb .opt, td a, .tag[href] { min-height: 44px; }
  .mswitch a { min-width: 44px; justify-content: center; }
  .rrow { grid-template-columns: minmax(0, 1fr) 70px 56px; }
  .tw-card .flags { display: none; }
}
@media (max-width: 700px) { .chip { min-width: 44px; justify-content: center; } .opl .oplink { display: inline-flex; align-items: center; min-height: 44px; } }
.sig .big .apq { display: flex; margin-top: 6px; font: 500 12px/1.3 var(--f-body); color: var(--text-3); }
.sig .big .apq span { display: inline; } .sig .big .apq b { display: inline; font: 700 12.5px/1.3 var(--f-body); color: var(--text); }

/* ===================== MIRA Ops specific ===================== */
.mb-s { margin-bottom: 12px; } .pad { padding: 14px; } .ph.pad { padding: 16px 20px 10px; margin: 0; } .dim td { opacity: .55; }
.vz-note { margin-top: 8px; font-size: 12.5px; color: var(--text-2); }
.sw { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 6px; vertical-align: 0; }
.mgrp + .mgrp { margin-top: 6px; } .mgh { font: 700 11px/1 var(--f-body); letter-spacing: .05em; text-transform: uppercase; color: var(--text-3); padding: 8px 4px 4px; }
.mlink { font-weight: 700; color: var(--text); } .mlink:hover { color: var(--brand); }
.note-b { padding: 10px 12px; border-radius: 10px; background: var(--tint); border: 1px solid #EBD3EA; font-size: 12.5px; line-height: 1.5; color: var(--text-2); }
.note-b b { color: var(--text); }
/* linked apps */
.apps { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; }
.app-card { display: flex; flex-direction: column; gap: 9px; padding: 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); min-width: 0; }
.app-card .ah { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; } .app-card .ah b { font-size: 14px; } .app-card .ah .tag { margin-left: auto; }
.app-card .kv3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.app-card .kv3 div { padding: 7px 8px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); min-width: 0; }
.app-card .kv3 small { display: block; font-size: 11px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .app-card .kv3 b { display: block; font-size: 12.5px; line-height: 1.3; margin-top: 2px; }
.app-card .ac-l { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
/* machines live */
.mcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.mcards .mcard { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); color: var(--text); }
.mcards .mcard:hover { border-color: #D9B7D8; box-shadow: var(--shadow-lg); }
.mcard .mh { display: flex; align-items: center; gap: 8px; min-width: 0; } .mcard .mh b { font-size: 15px; } .mcard .mh small { color: var(--text-3); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; } .mcard .mh .st { margin-left: auto; flex: none; }
.mcard .mbody { display: flex; gap: 14px; align-items: center; }
.ring-wrap { position: relative; width: 64px; height: 64px; flex: none; } .ring-wrap span { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; } .ring-wrap b { font-size: 14px; } .ring-wrap small { font-size: 10px; color: var(--text-3); }
.mstats { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.sprow { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 8px; align-items: center; font-size: 12.5px; } .sprow small { color: var(--text-3); } .sprow b { white-space: nowrap; }
.mcard .mfoot { display: flex; flex-direction: column; gap: 2px; font-size: 12px; color: var(--text-2); border-top: 1px solid var(--line-2); padding-top: 8px; }
/* andon */
.atiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.atile { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: #101828; color: #fff; min-height: 76px; }
.atile.r { box-shadow: inset 0 0 0 2px #D92D20; } .atile.a { box-shadow: inset 0 0 0 2px #F79009; }
.atile b { font-size: 16px; } .atile small { display: block; font-size: 12px; color: #c9d4e5; } .atile em { display: block; font-style: normal; font-size: 12px; color: #FDB022; margin-top: 3px; }
.lamp { display: flex; flex-direction: column; gap: 3px; flex: none; } .lamp i { width: 16px; height: 10px; border-radius: 3px; opacity: .18; } .lamp i.on { opacity: 1; box-shadow: 0 0 10px currentColor; }
.lamp i.r { background: #D92D20; color: #D92D20; } .lamp i.a { background: #F79009; color: #F79009; } .lamp i.g { background: #12B76A; color: #12B76A; } .lamp i.b { background: #2E90FA; color: #2E90FA; }
/* machine page */
.jobc b { display: block; font-size: 14px; } .jobc > small { display: block; color: var(--text-3); font-size: 12px; margin: 2px 0 8px; } .jobc .kv4 { margin-top: 10px; }
.ptbl { display: flex; flex-direction: column; } .prow { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: baseline; padding: 7px 2px; border-bottom: 1px solid var(--line-2); font-size: 12.5px; }
.prow small { color: var(--text-3); font-size: 11.5px; } .prow b { font-variant-numeric: tabular-nums; min-width: 70px; text-align: right; } .prow.bad b { color: #B42318; } .prow.warn b { color: #B54708; }
.hrow { display: flex; gap: 10px; align-items: center; padding: 7px 2px; border-bottom: 1px solid var(--line-2); width: 100%; text-align: left; background: none; border-left: 0; border-right: 0; border-top: 0; }
.hrow b { display: block; font-size: 12.5px; } .hrow small { display: block; font-size: 11.5px; color: var(--text-3); }
.hrow.btnrow { cursor: pointer; border-radius: 8px; } .hrow.btnrow:hover, .hrow.btnrow.on { background: var(--tint); }
.hsc { flex: none; display: inline-grid; place-items: center; min-width: 34px; height: 26px; padding: 0 6px; border-radius: 7px; color: #fff; font: 700 12px/1 var(--f-body); } .hsc.sm { min-width: 30px; height: 22px; font-size: 11px; }
.hlist { display: flex; flex-direction: column; max-height: 420px; overflow: auto; }
.drvl { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; } .drv { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 7px 9px; border: 1px solid var(--line); border-radius: 9px; color: var(--text); font-size: 12.5px; } .drv small { color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .drv:hover { border-color: #D9B7D8; }
.g-in { gap: 16px; }
/* HMI */
.hmi { max-width: 980px; border-radius: 18px; background: #0b1220; color: #e6edf7; padding: 16px; border: 8px solid #1d2939; box-shadow: var(--shadow-lg); }
.hmi-top { display: flex; align-items: center; gap: 10px; font-size: 15px; } .hmi-top .hm-t { margin-left: auto; font: 600 13px var(--f-mono); color: #98a2b3; }
.hmi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.hmi-card { background: #111a2e; border: 1px solid #22304d; border-radius: 12px; padding: 12px; min-width: 0; } .hmi-card > small { display: block; color: #98a2b3; font-size: 11.5px; margin-bottom: 6px; } .hmi-card b { color: #fff; } .hmi-card b.big { display: block; font-size: 26px; } .hmi-card b.big u { text-decoration: none; font-size: 12px; color: #98a2b3; margin-left: 4px; } .hmi-card .opl small { color: #98a2b3; } .hmi-card .pbar { margin: 8px 0 4px; }
.hmi-stop { margin-top: 12px; padding: 12px; border-radius: 12px; background: #111a2e; border: 1px solid #22304d; } .hmi-stop.on { border-color: #F79009; }
.hs-h { font-size: 13.5px; color: #c9d4e5; } .hs-h b { color: #fff; }
.hs-b { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.hs-b button { min-height: 58px; padding: 8px; border-radius: 10px; background: #1d2939; border: 1px solid #344054; color: #e6edf7; font-size: 12px; text-align: left; line-height: 1.3; } .hs-b button b { display: block; color: #FDB022; font-size: 12px; } .hs-b button.on { border-color: #fff; background: #680166; }
.hs-f { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; } .hmi .btn:not(.pri) { background: #1d2939; color: #e6edf7; border-color: #344054; }
/* drives */
.gauges4 { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; } .gauges4 > span { display: flex; justify-content: center; padding: 8px 0; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.cmpc { padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); min-width: 0; } .cmpc > b { display: block; font-size: 15px; } .cmpc > small { color: var(--text-3); font-size: 12px; } .cmpc .gauges { display: flex; justify-content: space-around; flex-wrap: wrap; margin: 8px 0; }
.chk { position: relative; display: inline-flex; align-items: center; justify-content: center; min-width: 32px; min-height: 32px; cursor: pointer; } .chk input { position: absolute; inset: 0; width: 100% !important; height: 100% !important; margin: 0; opacity: 0; cursor: pointer; } .chk i { width: 16px; height: 16px; border-radius: 4px; border: 1.5px solid var(--line-strong); background: #fff; display: grid; place-items: center; } .chk input:checked + i { background: var(--brand); border-color: var(--brand); } .chk input:checked + i::after { content: ""; width: 8px; height: 4px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); } .chk input:focus-visible + i { box-shadow: 0 0 0 3px var(--focus); }
.keypad { max-width: 520px; margin: 0 0 16px; padding: 16px; border-radius: 16px; background: #1d2939; color: #fff; box-shadow: var(--shadow-lg); }
.kp-disp { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 10px; background: #0b1a10; border: 2px solid #344054; }
.seg7 { font: 700 44px/1 var(--f-mono); color: #7CFFB2; letter-spacing: .08em; text-shadow: 0 0 12px rgba(124, 255, 178, .45); min-width: 160px; } .kp-u { font: 700 14px var(--f-mono); color: #7CFFB2; }
.kp-leds { margin-left: auto; display: flex; flex-direction: column; gap: 4px; } .kp-leds i { font: 600 10px var(--f-mono); color: #475467; font-style: normal; } .kp-leds i.on { color: #7CFFB2; } .kp-leds i.on.r { color: #F97066; }
.kp-keys { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin: 12px 0 8px; } .kp-keys button { min-height: 48px; border-radius: 10px; background: #344054; color: #fff; font: 700 13px var(--f-body); border: 1px solid #475467; } .kp-keys .run { background: #067647; } .kp-keys .stop { background: #B42318; }
/* SMED, QC */
.smed { display: flex; flex-direction: column; gap: 6px; } .smr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; padding: 8px 10px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface-2); font-size: 12.5px; }
.smr b { font-variant-numeric: tabular-nums; } .smr em { grid-column: 1 / -1; font-style: normal; font-size: 11.5px; color: var(--text-3); } .smr.external { border-color: #ABEFC6; background: var(--green-t); } .smr.external em { color: #067647; }
.qc { display: flex; flex-direction: column; } .qr { display: grid; grid-template-columns: 44px 50px minmax(0, 1fr) auto auto; gap: 8px; align-items: center; padding: 7px 2px; border-bottom: 1px solid var(--line-2); font-size: 12.5px; } .qr time { font: 500 12px var(--f-mono); color: var(--text-3); } .qr em { font-style: normal; font-variant-numeric: tabular-nums; } .qr.fail em { color: #B42318; font-weight: 600; }
.chart-box { min-height: 120px; position: relative; }
@media (max-width: 1280px) { .gauges4 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .hmi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) {
  .apps { grid-template-columns: 1fr; } .gauges4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .hmi-grid { grid-template-columns: 1fr; } .hs-b { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mcards { grid-template-columns: 1fr; } .atiles { grid-template-columns: 1fr 1fr; } .kp-keys { grid-template-columns: repeat(3, minmax(0, 1fr)); } .seg7 { font-size: 34px; min-width: 120px; }
  .qr { grid-template-columns: 40px 46px minmax(0, 1fr) auto; } .qr .st { display: none; }
  #view .btn, #view .seg > *, #view a.tag, #view .mswitch a, #view .chk, #view .hrow.btnrow, #view .mrow, #view .drv, #view .atile, #view .kp-keys button, #view .hs-b button, #view .opt, #view a.mlink, #view .mcard { min-height: 44px; }
  #view .btn, #view .seg > *, #view a.tag, #view .mswitch a, #view .chk, #view a.mlink { min-width: 44px; display: inline-flex; align-items: center; justify-content: center; }
  #view .seg { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; max-width: 100%; } #view .seg::-webkit-scrollbar { display: none; } #view .seg > * { flex: none; white-space: nowrap; padding: 0 12px; }
  .app-card .ac-l .btn { flex: 1; }
}

/* Alarms & work orders table (fix 2 Nov): the ₹ impact column wrapped into many short lines and the last column was cut off
   at 1440. Give the text columns sensible widths, keep short columns on one line, and let the table scroll inside its card. */
.panel.flush > .tbl-wrap.al-wrap { margin: 0; padding: 0; overflow-x: auto; }
.al-tbl { min-width: 1020px; }
.al-tbl th, .al-tbl td { padding-left: 10px; padding-right: 10px; }
.al-tbl th:first-child, .al-tbl td:first-child { padding-left: 20px; }
.al-tbl th:last-child, .al-tbl td:last-child { padding-right: 20px; }
.al-tbl td:nth-child(4) { white-space: normal; min-width: 230px; }
.al-tbl td:nth-child(4) small.blk { max-width: 420px; }
.al-tbl td:nth-child(5) { white-space: normal; min-width: 160px; }
.al-tbl td:nth-child(5) small.blk { max-width: none; }
.al-tbl td:nth-child(6) { white-space: normal; min-width: 110px; }
.al-tbl td:nth-child(9) .st { white-space: normal; text-align: left; line-height: 1.25; }

/* 3 Nov restore: named bays + status-dot machine chips (1 Nov twin look) */
.p3-l.ar .bx { background: rgba(23, 21, 27, .86); border-color: rgba(255, 255, 255, .18); color: #fff; box-shadow: 0 6px 16px rgba(16, 24, 40, .22); }
.p3-l.ar .bx b { color: #fff; font-weight: 700; } .p3-l.ar .bx small { color: rgba(255, 255, 255, .72); }
.p3-l .bx.mc { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px 3px 7px; border-radius: 999px; }
.p3-l .bx.mc b { font-weight: 800; color: var(--text); }
.p3-l .sd { width: 9px; height: 9px; border-radius: 50%; background: #98A2B3; flex: none; box-shadow: 0 0 0 2px rgba(255, 255, 255, .9); }
.p3-l .sd.ok { background: #12B76A; } .p3-l .sd.warn { background: #F79009; } .p3-l .sd.bad { background: #D92D20; } .p3-l .sd.info { background: #2E90FA; }
.tw-bar .seg.views { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.tw-bar .seg.views::-webkit-scrollbar { display: none; }
.tw-bar .seg.views button { white-space: nowrap; }
.g-glass .p3-l.ar .bx, .p3-l.ar .bx { background: rgba(23, 21, 27, .88); border-color: rgba(255, 255, 255, .2); color: #fff; }
.g-glass .p3-l.ar .bx b, .g-glass .p3-l.ar .bx small { color: #fff; }
.g-glass .p3-l.ar .bx small { opacity: .75; }
.g-glass .p3-l .bx.mc { border-radius: 999px; }
.tw-bar .seg.views button[aria-pressed="true"] { background: #fff; color: var(--text); font-weight: 700; box-shadow: 0 1px 3px rgba(16, 24, 40, .14); }

/* clip-fix 7 Nov 2026: segmented controls (Trends machine picker has 14 buttons) wrap inside their container instead of running off the right edge */
.seg { max-width: 100%; flex-wrap: wrap; }
