/* hmi-runtime.css — operator interface styling for an exported HMI.
   Follows the plant HMI in www/: navy command bar with a teal underline,
   light plant area, gradient START/STOP buttons and flashing trip alarms.
   Generated by HMI Studio. */

:root {
  --hmi-bg: #f8fafc;
  --hmi-panel: #ffffff;
  --hmi-text: #0f172a;
  --hmi-accent: #0891b2;
  --hmi-head-1: #0f172a;
  --hmi-head-2: #1a2744;
  --hmi-run: #16a34a;
  --hmi-stop: #94a3b8;
  --hmi-trip: #dc2626;
  --hmi-manual: #0891b2;
  --hmi-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;

  --hmi-border: #e2e8f0;
  --hmi-border-strong: #cbd5e1;
  --hmi-muted: #64748b;
  --hmi-surface-2: #f1f5f9;

  --hmi-green-mid: #15803d;
  --hmi-green-dark: #14532d;
  --hmi-red-mid: #b91c1c;
  --hmi-red-dark: #7f1d1d;

  --hmi-shadow-sm: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
  --hmi-shadow-lg: 0 10px 32px rgba(0,0,0,.12), 0 4px 8px rgba(0,0,0,.07);
  --hmi-shadow-xl: 0 20px 60px rgba(0,0,0,.18), 0 8px 20px rgba(0,0,0,.10);
}

[data-hmi-theme="dark"] {
  --hmi-border: #24344f;
  --hmi-border-strong: #334155;
  --hmi-muted: #94a3b8;
  --hmi-surface-2: #16233c;
  --hmi-shadow-sm: 0 1px 3px rgba(0,0,0,.4);
  --hmi-shadow-lg: 0 10px 32px rgba(0,0,0,.5);
  --hmi-shadow-xl: 0 20px 60px rgba(0,0,0,.6);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  background: var(--hmi-bg);
  color: var(--hmi-text);
  font-family: var(--hmi-font);
  -webkit-font-smoothing: antialiased;
  -webkit-user-select: none;
  user-select: none;
}

.hmi-root { display: flex; flex-direction: column; height: 100vh; }

.hmi-boot {
  margin: auto;
  padding: 40px;
  text-align: center;
  color: var(--hmi-muted);
  font-size: 15px;
}
.hmi-boot-error { color: var(--hmi-trip); }

/* ---------- command bar ---------- */

.hmi-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 16px;
  background: linear-gradient(160deg, var(--hmi-head-1) 0%, var(--hmi-head-2) 100%);
  border-bottom: 3px solid var(--hmi-accent);
  box-shadow: 0 3px 18px rgba(0,0,0,.22);
  flex: 0 0 auto;
  z-index: 10;
}

.hmi-title {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: #f8fafc;
  text-shadow: 0 1px 4px rgba(0,0,0,.4);
  border: 1.5px solid rgba(255,255,255,.22);
  border-radius: 7px;
  padding: 6px 18px;
  white-space: nowrap;
}

.hmi-tabs { display: flex; gap: 6px; overflow-x: auto; flex: 1 1 auto; padding: 2px 0; }
.hmi-tabs::-webkit-scrollbar { height: 4px; }
.hmi-tabs::-webkit-scrollbar-thumb { background: rgba(255,255,255,.25); border-radius: 2px; }

.hmi-tab {
  appearance: none;
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.08);
  color: #cbd5e1;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 7px 15px;
  border-radius: 7px;
  cursor: pointer;
  white-space: nowrap;
  transition: all .15s ease;
}
.hmi-tab:hover {
  background: var(--hmi-accent);
  border-color: var(--hmi-accent);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 3px 12px rgba(8,145,178,.4);
}
.hmi-tab.is-active {
  background: linear-gradient(160deg, #0e7490 0%, var(--hmi-accent) 100%);
  border-color: var(--hmi-accent);
  color: #fff;
  box-shadow: 0 2px 8px rgba(8,145,178,.45), inset 0 1px 0 rgba(255,255,255,.18);
}

.hmi-headright { display: flex; align-items: center; gap: 12px; margin-left: auto; }

.hmi-alarmcount {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 6px 13px;
  border-radius: 20px;
  border: 1.5px solid rgba(255,255,255,.25);
  color: #cbd5e1;
  white-space: nowrap;
  background: transparent;
  font-family: inherit;
  cursor: pointer;
}
.hmi-alarmcount.is-alarm {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(160deg, var(--hmi-red-mid), var(--hmi-trip));
  box-shadow: 0 3px 14px rgba(220,38,38,.5);
}
/* ISA-18.2: only what is not yet acknowledged keeps flashing */
.hmi-alarmcount.is-unack { animation: hmi-pulse 1.1s ease-in-out infinite; }
/* the colour of the worst alarm in the summary, set by the runtime */
.hmi-alarmcount.is-alarm { background: var(--hmi-alarm, linear-gradient(160deg, var(--hmi-red-mid), var(--hmi-trip))); }

.hmi-pill {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .1em;
  padding: 6px 12px;
  border-radius: 20px;
  border: 1.5px solid currentColor;
  white-space: nowrap;
}
.hmi-pill-on  { color: #4ade80; background: rgba(22,163,74,.18); }
.hmi-pill-off { color: #cbd5e1; background: rgba(148,163,184,.16); }
.hmi-pill-bad { color: #fca5a5; background: rgba(220,38,38,.22); animation: hmi-pulse 1.1s ease-in-out infinite; }

.hmi-clock {
  font-size: 12.5px;
  font-weight: 600;
  color: #e2e8f0;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  letter-spacing: .02em;
}

/* ---------- plant area ---------- */

.hmi-stage { position: relative; flex: 1 1 auto; overflow: hidden; }

.hmi-canvas {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  transform-origin: center center;
}

.hw { position: absolute; }
/* the moving part of a machine, drawn over its still drawing (drawing economy) */
.hw-motion { position: absolute; left: 0; top: 0; width: 100%; height: 100%; pointer-events: none; }
.hw svg { display: block; overflow: visible; }
/* Hover: an outline, not a drop-shadow filter. A filter on a machine whose
   artwork moves is re-run on every motion step for as long as a mouse rests
   on it, which is costly on a small panel PC such as a Raspberry Pi 5. */
.hw.is-clickable { cursor: pointer; border-radius: 4px; transition: outline-color .14s ease; outline: 2px solid transparent; outline-offset: 2px; }
.hw.is-clickable:hover { outline-color: rgba(8,145,178,.55); }
.hw.is-trip { animation: hmi-flash 1s steps(1, end) infinite; }
.hw.is-manual { outline: 1.5px dashed var(--hmi-manual); outline-offset: 3px; border-radius: 3px; }

/* Accessibility (T-029). The keyboard focus: a white ring inside a dark blue one, seen on a light
   plant and on a dark one; only for the keyboard (:focus-visible), never after a touch. */
.hw.is-clickable:focus-visible { outline: 3px solid #1d4ed8; outline-offset: 4px; box-shadow: 0 0 0 4px #fff; border-radius: 4px; }
:where(button, select, summary, a[href], [role="button"], [role="tab"], input[type="checkbox"], input[type="radio"], input[type="range"], [tabindex]:not([tabindex="-1"])):focus-visible {
  outline: 3px solid #2563eb; outline-offset: 2px; }
/* State marks: a shape per state, top left (the lock badge is top right), so no state is told by
   colour alone. Running: a play triangle in a circle. Tripped: a warning triangle. Manual: an M
   in a square. No PLC link: a question mark. Stopped: no mark. Pure CSS: nothing is redrawn. */
.hw[data-st]::before { content: ""; position: absolute; left: -7px; top: -7px; width: var(--hmi-mark-size, 18px); height: var(--hmi-mark-size, 18px);
  border-radius: 50%; background: #0f172a center / 100% no-repeat; box-shadow: 0 0 0 2px #fff; pointer-events: none; z-index: 2; }
.hw[data-st="run"]::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9.5 7v10l8-5z' fill='white'/%3E%3C/svg%3E"); }
.hw[data-st="trip"]::before { border-radius: 0; box-shadow: none; background-color: transparent;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.2 23.2 21.6H.8z' fill='%23b91c1c' stroke='white' stroke-width='1.6' stroke-linejoin='round'/%3E%3Crect x='10.9' y='8.4' width='2.2' height='7.2' rx='1' fill='white'/%3E%3Ccircle cx='12' cy='18.4' r='1.45' fill='white'/%3E%3C/svg%3E"); }
.hw[data-st="manual"]::before { border-radius: 4px; background-color: #7c2d12;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.8 17V7.4l5.2 6.2 5.2-6.2V17' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.hw[data-st="offline"]::before { background-color: #475569;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9.2 9.4a2.9 2.9 0 1 1 4.1 2.6c-.9.4-1.3 1-1.3 1.9v.5' fill='none' stroke='white' stroke-width='2.3' stroke-linecap='round'/%3E%3Ccircle cx='12' cy='17.7' r='1.4' fill='white'/%3E%3C/svg%3E"); }
@media (forced-colors: active) { .hw[data-st]::before { forced-color-adjust: none; } .hw.is-clickable:focus-visible { outline-color: Highlight; } }

@keyframes hmi-flash { 0%, 54% { opacity: 1; } 55%, 100% { opacity: .35; } }
@keyframes hmi-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }

/* ---------- device popup: AUTO / MANUAL and START / STOP ----------
   A light instrument card: tinted header band, stat tiles, a two-way mode
   selector, two strong command buttons, and live PLC signal rows. It keeps
   its own light palette whatever the screen's theme, so it always reads as
   the same trusted control surface. */

.hmi-dialog {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(15, 23, 42, .45);   /* dimmed, not blurred: the plant stays readable behind it */
}
.hmi-dialog[hidden] { display: none; }
.hmi-dialog [hidden] { display: none !important; }

.hmi-dialog-card {
  --ink: #0f2742;
  --ink-2: #475a70;
  --ink-3: #7b8ca0;
  --line: #dbe3ec;
  --line-2: #c9d4e0;
  --paper: #ffffff;
  --paper-2: #f5f8fb;
  --cyan: #0e7490;
  --manual: #0e7490;
  --focus: #2563eb;
  --tone: #64748b;
  --mono: "Cascadia Mono", Consolas, "SFMono-Regular", ui-monospace, monospace;
  position: relative;
  width: min(420px, 100%);
  max-height: calc(100vh - 32px);
  overflow: auto;
  color: var(--ink);
  background: var(--paper);
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  border: 1px solid var(--line-2);
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(15, 39, 66, .28), 0 4px 14px rgba(15, 39, 66, .12);
  animation: hmi-pop .18s cubic-bezier(.2, .9, .3, 1.15);
}
.hmi-dialog-card:focus { outline: none; }
@keyframes hmi-pop { from { transform: translateY(8px) scale(.985); opacity: 0; } to { transform: none; opacity: 1; } }
.hmi-dialog-card svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---- header band ---- */
.hmi-dlg-head {
  position: relative;
  padding: 18px 64px 16px 20px;
  background: linear-gradient(135deg, #eaf2fb 0%, #dce9f7 100%);
  border-bottom: 1px solid var(--line);
}
.hmi-dlg-head::after {                 /* state colour along the band's foot */
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 3px;
  background: var(--tone);
  transition: background .25s;
}
.hmi-dlg-kicker {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--cyan);
}
.hmi-dlg-title {
  margin: 4px 0 10px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: .01em;
  line-height: 1.15;
  overflow-wrap: anywhere;
}
.hmi-dlg-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px 4px 9px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: .12em;
  color: color-mix(in srgb, var(--tone) 82%, #000);
  background: color-mix(in srgb, var(--tone) 12%, #fff);
  border: 1px solid color-mix(in srgb, var(--tone) 45%, #fff);
}
.hmi-dlg-badge i { width: 8px; height: 8px; border-radius: 50%; background: var(--tone); }
.hmi-dialog-card[data-state="trip"]:not(.no-flash) .hmi-dlg-badge i { animation: hmi-lamp 1s steps(2, jump-none) infinite; }
@keyframes hmi-lamp { 50% { opacity: .2; } }
.hmi-dlg-x {
  appearance: none;
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  padding: 9px;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  background: rgba(255, 255, 255, .7);
  color: var(--ink-2);
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.hmi-dlg-x:hover { background: #fff; color: var(--ink); border-color: var(--ink-3); }

/* ---- stat tiles ---- */
.hmi-dlg-tiles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}
.hmi-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 6px 11px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 9px;
}
.hmi-tile span { font-size: 11px; font-weight: 600; color: var(--ink-3); }
.hmi-tile b {
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--ink);
}
.hmi-tile b[data-tone="ok"]   { color: #15803d; }
.hmi-tile b[data-tone="warn"] { color: #b45309; }
.hmi-tile b[data-tone="bad"]  { color: #b91c1c; }
.hmi-tile b[data-tone="info"] { color: var(--manual); }

/* ---- sections ---- */
.hmi-dlg-sec { padding: 16px 20px; }
.hmi-dlg-rule { border-bottom: 1px solid var(--line); }
.hmi-dlg-label {
  margin-bottom: 10px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--cyan);
}

/* AUTO / MANUAL */
.hmi-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.hmi-seg button {
  appearance: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink-2);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s, box-shadow .15s;
}
.hmi-seg button svg { width: 17px; height: 17px; flex: 0 0 auto; }
.hmi-seg button:not(:disabled):hover { border-color: var(--ink-3); color: var(--ink); }
.hmi-seg button[aria-checked="true"] {
  cursor: default;
  color: var(--ink);
  border-color: #aebccb;
  background: linear-gradient(180deg, #ffffff 0%, #e6edf4 100%);
  box-shadow: inset 0 1px 0 #fff, 0 1px 2px rgba(15, 39, 66, .12);
}
.hmi-seg button[data-mode="manual"][aria-checked="true"] {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(180deg, #1591ab 0%, var(--manual) 100%);
  box-shadow: 0 2px 8px rgba(14, 116, 144, .3);
}
.hmi-seg button:disabled { opacity: .5; cursor: not-allowed; }

/* START / STOP */
.hmi-cmds { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hmi-cmd {
  appearance: none;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  min-height: 76px;
  padding: 14px 16px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: #fff;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .15s ease, filter .15s ease;
}
.hmi-cmd-top { display: flex; align-items: center; gap: 9px; }
.hmi-cmd-top svg { width: 17px; height: 17px; fill: currentColor; stroke: none; }
.hmi-cmd b { font-size: 17px; font-weight: 800; letter-spacing: .1em; }
.hmi-cmd small { font-size: 12px; font-weight: 600; opacity: .9; }
.hmi-cmd-start {
  background: linear-gradient(160deg, #22c55e 0%, #16a34a 50%, #15803d 100%);
  border-color: #15803d;
  box-shadow: 0 4px 14px rgba(22, 163, 74, .28), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.hmi-cmd-stop {
  background: linear-gradient(160deg, #56657a 0%, #3b4859 55%, #2a3544 100%);
  border-color: #2a3544;
  box-shadow: 0 4px 14px rgba(30, 41, 59, .25), inset 0 1px 0 rgba(255, 255, 255, .15);
}
.hmi-cmd:not(:disabled):hover { filter: brightness(1.06); transform: translateY(-1px); }
.hmi-cmd:not(:disabled):active { transform: translateY(1px); filter: brightness(.97); }
/* the button that matches what the machine is doing is quieter: it is a fact, not an action */
.hmi-cmd[aria-pressed="true"] { filter: saturate(.75); box-shadow: inset 0 2px 6px rgba(0, 0, 0, .22); }
.hmi-cmd[aria-pressed="true"] small::before { content: "\25CF  "; }
.hmi-cmd:disabled {
  cursor: not-allowed;
  color: var(--ink-3);
  background: var(--paper-2);
  border-color: var(--line);
  box-shadow: none;
}
.hmi-cmd.is-armed,
.hmi-seg button.is-armed {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  animation: hmi-arm .9s ease-in-out infinite;
}
.hmi-cmd.is-armed small { opacity: 1; font-weight: 800; }
@keyframes hmi-arm { 50% { outline-color: rgba(37, 99, 235, .25); } }

.hmi-cmd:focus-visible,
.hmi-seg button:focus-visible,
.hmi-dlg-x:focus-visible,
.hmi-dlg-close:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* password */
.hmi-pin {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  margin-top: 12px;
  padding: 0 12px;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  background: var(--paper-2);
  color: var(--ink-3);
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.hmi-pin svg { width: 17px; height: 17px; flex: 0 0 auto; }
.hmi-pin:focus-within { background: #fff; border-color: var(--focus); box-shadow: 0 0 0 3px rgba(37, 99, 235, .15); }
.hmi-pin input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  letter-spacing: .1em;
}
.hmi-pin input::placeholder { letter-spacing: normal; font-size: 13px; color: var(--ink-3); }

/* feedback */
.hmi-dlg-msg {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 12px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--ink-2);
}
.hmi-dlg-msg:empty { display: none; }
/* monitoring only: no buttons, so the section is just its message, if any */
.hmi-dlg-sec.is-ro { padding-top: 0; padding-bottom: 0; }
.hmi-dlg-sec.is-ro .hmi-dlg-msg { margin: 12px 0; }
.hmi-dlg-sec.is-ro:has(.hmi-dlg-msg:empty) { border-bottom: 0; }
.hmi-dlg-msg::before { content: ""; flex: 0 0 auto; width: 8px; height: 8px; margin-top: 5px; border-radius: 50%; background: currentColor; }
.hmi-dlg-msg.is-ok    { color: #15803d; }
.hmi-dlg-msg.is-arm   { color: var(--focus); }
.hmi-dlg-msg.is-arm::before { animation: hmi-lamp 1s steps(2, jump-none) infinite; }
.hmi-dlg-msg.is-busy  { color: var(--focus); }
.hmi-dlg-msg.is-busy::before {
  width: 12px; height: 12px; margin-top: 3px;
  background: none;
  border: 2px solid currentColor;
  border-right-color: transparent;
  animation: hmi-spin .8s linear infinite;
}
@keyframes hmi-spin { to { transform: rotate(360deg); } }
.hmi-dlg-msg.is-warn,
.hmi-dlg-msg.is-error {
  padding: 10px 12px;
  border-radius: 8px;
  border-left: 3px solid currentColor;
}
.hmi-dlg-msg.is-warn  { color: #92400e; background: #fffbeb; }
.hmi-dlg-msg.is-error { color: #b91c1c; background: #fef2f2; }
.hmi-dlg-msg.is-warn::before, .hmi-dlg-msg.is-error::before { display: none; }

/* PLC signal rows, after the reference's interlock list */
.hmi-sigs { display: flex; flex-direction: column; gap: 6px; }
.hmi-sig {
  --edge: #c9d4e0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 36px;
  padding: 7px 12px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--edge);
  border-radius: 7px;
  font-size: 13px;
}
.hmi-sig span { font-weight: 600; color: var(--ink); }
.hmi-sig em { margin-left: 6px; font-style: normal; font-family: var(--mono); font-size: 12px; color: var(--ink-3); }
.hmi-sig b { font-family: var(--mono); font-size: 12px; font-weight: 700; color: var(--ink-2); white-space: nowrap; }
.hmi-sig[data-tone="ok"]   { --edge: #16a34a; }
.hmi-sig[data-tone="ok"] b { color: #15803d; }
.hmi-sig[data-tone="warn"] { --edge: #d97706; background: #fffbeb; }
.hmi-sig[data-tone="warn"] b { color: #b45309; }
.hmi-sig[data-tone="info"] { --edge: var(--manual); }
.hmi-sig[data-tone="info"] b { color: var(--manual); }

/* footer */
.hmi-dlg-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px 14px;
  border-top: 1px solid var(--line);
  background: var(--paper-2);
}
.hmi-dlg-foot-note { font-size: 12px; color: var(--ink-3); }
.hmi-dlg-close {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 16px;
  border: 1px solid #991b1b;
  border-radius: 8px;
  background: linear-gradient(180deg, #c62828 0%, #a61d1d 100%);
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(166, 29, 29, .25);
}
.hmi-dlg-close svg { width: 15px; height: 15px; stroke-width: 2.6; }
.hmi-dlg-close:hover { filter: brightness(1.07); }

@media (max-width: 400px) {
  .hmi-dlg-tiles { gap: 6px; padding: 12px 14px; }
  .hmi-dlg-sec { padding: 14px; }
  .hmi-tile b { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .hmi-dialog-card, .hmi-cmd, .hmi-cmd.is-armed, .hmi-seg button.is-armed,
  .hmi-dlg-badge i, .hmi-dlg-msg::before { animation: none !important; transition: none !important; }
}


::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--hmi-surface-2); }
::-webkit-scrollbar-thumb { background: var(--hmi-border-strong); border-radius: 3px; }

@media (max-width: 760px) {
  .hmi-title { font-size: 11px; letter-spacing: .12em; padding: 5px 10px; }
  .hmi-clock { display: none; }
}

/* ---------------------------------------------------------------- *
 * Alarm & event panel (alarm summary, journal, run hours)
 * ---------------------------------------------------------------- */
.hmi-ap {
  position: fixed; inset: 0; z-index: 110;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  background: rgba(15, 23, 42, .45);
}
.hmi-ap[hidden] { display: none; }
.hmi-ap-card {
  width: min(1100px, 100%); max-height: min(780px, 100%);
  display: flex; flex-direction: column;
  background: #fff; color: #0f2742; border-radius: 14px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, .35);
  font-family: var(--hmi-font, inherit); overflow: hidden;
  animation: hmi-pop .16s ease-out;
}
.hmi-ap-head { display: flex; align-items: center; gap: 12px; padding: 12px 14px 0 18px; border-bottom: 1px solid #dbe3ec; }
.hmi-ap-tabs { display: flex; gap: 2px; flex: 1; }
.hmi-ap-tabs button {
  border: 0; background: transparent; padding: 10px 16px 12px; font: inherit; font-size: 14px; font-weight: 700;
  color: #7b8ca0; cursor: pointer; border-bottom: 3px solid transparent;
}
.hmi-ap-tabs button.is-active { color: #0f2742; border-bottom-color: var(--hmi-accent, #0891b2); }
/* the close button sits in the header row here, not in the device card's corner */
.hmi-ap-head .hmi-dlg-x {
  position: static; flex: 0 0 auto; margin: 0 0 6px auto;
  border: 1px solid #c9d4e0; background: #fff; color: #475a70;
}
.hmi-ap-head .hmi-dlg-x:hover { color: #0f2742; border-color: #7b8ca0; }
.hmi-ap-head .hmi-dlg-x svg { display: block; width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.hmi-ap-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 12px 18px; border-bottom: 1px solid #edf1f6; background: #f5f8fb; }
.hmi-ap-tools select, .hmi-ap-acts select {
  font: inherit; font-size: 13px; padding: 6px 8px; border: 1px solid #c9d4e0; border-radius: 8px; background: #fff; color: #0f2742;
}
.hmi-ap-btn {
  font: inherit; font-size: 13px; font-weight: 700; padding: 7px 14px; min-height: 34px;
  border: 1px solid #c9d4e0; border-radius: 8px; background: #fff; color: #0f2742; cursor: pointer;
}
.hmi-ap-btn:hover:not([disabled]) { border-color: #7b8ca0; }
.hmi-ap-btn[disabled] { opacity: .45; cursor: default; }
.hmi-ap-primary { background: #0f2742; border-color: #0f2742; color: #fff; }
.hmi-ap-note { margin-left: auto; font-size: 12px; color: #7b8ca0; }
/* ISA-18.2: flood banner, first out / chattering marks, rationalisation, out of service */
.hmi-ap-flood { flex-basis: 100%; padding: 6px 10px; border-radius: 6px; background: #991b1b; color: #fff; font-weight: 600; font-size: 12.5px; }
.hmi-ap-flood .hmi-ap-btn { margin-left: 8px; padding: 2px 8px; }
.hmi-ap-mark { display: inline-block; margin-left: 6px; padding: 0 5px; border: 1px solid currentColor; border-radius: 4px; font-size: 10.5px; font-weight: 700; letter-spacing: .03em; }
.hmi-ap-mark.is-chat { border-style: dashed; }
.hmi-ap-why { margin-top: 2px; font-size: 11.5px; color: #7b8ca0; }
.hmi-ap-sub { margin: 14px 0 4px; font-size: 12px; font-weight: 700; color: #7b8ca0; text-transform: uppercase; letter-spacing: .04em; }
.hmi-ap-table tr.is-oos td { color: #7b8ca0; font-style: italic; }
.hmi-ap-link { border: 0; background: none; padding: 0; font: inherit; color: inherit; text-decoration: underline; cursor: pointer; }
.hmi-ap-body { overflow: auto; flex: 1; }
.hmi-ap-empty { padding: 48px 16px; text-align: center; color: #7b8ca0; font-size: 15px; }
.hmi-ap-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.hmi-ap-table th {
  position: sticky; top: 0; z-index: 1; background: #fff; text-align: left; font-size: 11px; letter-spacing: .06em;
  text-transform: uppercase; color: #7b8ca0; padding: 10px 12px; border-bottom: 1px solid #dbe3ec;
}
.hmi-ap-table td { padding: 9px 12px; border-bottom: 1px solid #edf1f6; vertical-align: middle; }
.hmi-ap-table tr.is-unack.is-active td { font-weight: 700; }
.hmi-ap-table tr.is-unack td:first-child { box-shadow: inset 4px 0 0 var(--hmi-trip, #dc2626); animation: hmi-flash 1s steps(1) infinite; }
.hmi-ap-table tr.is-rtn td { color: #475a70; }
.hmi-ap-table tr.is-shelved td { opacity: .6; }
.hmi-ap-num { text-align: right; font-variant-numeric: tabular-nums; }
.hmi-ap-acts { white-space: nowrap; text-align: right; }
.hmi-ap-acts > * { margin-left: 6px; }
.hmi-ap-pri {
  display: inline-block; min-width: 72px; text-align: center; padding: 3px 8px; border-radius: 6px;
  font-size: 11px; font-weight: 800; letter-spacing: .05em; color: #fff; background: var(--p, #64748b);
}
@media (max-width: 720px) {
  .hmi-ap-tabs button { padding: 10px 8px 12px; font-size: 13px; }
  .hmi-ap-table th:nth-child(4), .hmi-ap-table td:nth-child(4) { display: none; }
  .hmi-dlg-tiles { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- tag status page (F9 / the Plant | Tags switch) ---------- */

.hmi-tv-switch {
  position: fixed; left: 12px; bottom: 12px; z-index: 90;
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px;
  border: 1px solid rgba(255,255,255,.14); border-radius: 999px; cursor: pointer;
  /* no backdrop blur: it would be redrawn on every motion step of the plant under it */
  background: rgba(15,23,42,.82); color: #cbd5e1; font: 600 12px/1 var(--hmi-font); letter-spacing: .04em;
  opacity: .5; transition: opacity .2s;
}
.hmi-tv-switch:hover, .hmi-tv-switch:focus-visible, .hmi-tv-switch.is-on { opacity: 1; }
.hmi-tv-switch.in-header { position: static; opacity: 1; background: rgba(255,255,255,.08); }
.hmi-tv-switch.in-page { position: static; flex: none; height: 38px; }
.hmi-tv-sw-track {
  position: relative; width: 34px; height: 20px; border-radius: 999px;
  background: #475569; transition: background .2s;
}
.hmi-tv-sw-knob {
  position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.35); transition: transform .2s;
}
.hmi-tv-switch.is-on .hmi-tv-sw-track { background: var(--hmi-accent); }
.hmi-tv-switch.is-on .hmi-tv-sw-knob { transform: translateX(14px); }
.hmi-tv-sw-lbl[data-side="plant"] { color: #fff; }
.hmi-tv-switch.is-on .hmi-tv-sw-lbl[data-side="plant"] { color: #94a3b8; }
.hmi-tv-switch.is-on .hmi-tv-sw-lbl[data-side="tags"] { color: #fff; }

.hmi-tv {
  flex: 1 1 auto; overflow: auto; padding: 20px 24px 64px;
  background: var(--hmi-bg); color: var(--hmi-text);
  -webkit-user-select: text; user-select: text;
}
.hmi-tv[hidden] { display: none; }
.hmi-tv-head { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.hmi-tv-title { flex: 1 1 280px; min-width: 0; }
.hmi-tv-title h2 { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -.01em; }
.hmi-tv-sub { margin: 4px 0 0; color: var(--hmi-muted); font-size: 13px; }
.hmi-tv-search {
  flex: 0 1 340px; min-width: 200px; height: 38px; padding: 0 14px; border-radius: 10px;
  border: 1px solid var(--hmi-border-strong); background: var(--hmi-panel); color: var(--hmi-text);
  font: 14px var(--hmi-font); outline: none;
}
.hmi-tv-search:focus { border-color: var(--hmi-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--hmi-accent) 22%, transparent); }

.hmi-tv-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.hmi-tv-chip {
  display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--hmi-border); background: var(--hmi-panel); color: var(--hmi-text);
  font: 600 13px var(--hmi-font); cursor: pointer; box-shadow: var(--hmi-shadow-sm);
}
.hmi-tv-chip i { width: 9px; height: 9px; border-radius: 50%; background: var(--c, var(--hmi-muted)); }
.hmi-tv-chip b {
  min-width: 22px; padding: 2px 7px; border-radius: 999px; text-align: center; font-size: 12px;
  background: var(--hmi-surface-2); font-variant-numeric: tabular-nums;
}
.hmi-tv-chip.is-active { border-color: var(--c, var(--hmi-accent)); box-shadow: inset 0 0 0 1px var(--c, var(--hmi-accent)); }
.hmi-tv-chip.is-all { --c: var(--hmi-accent); }
.hmi-tv-chip.is-run { --c: var(--hmi-run); }
.hmi-tv-chip.is-stop { --c: var(--hmi-stop); }
.hmi-tv-chip.is-trip { --c: var(--hmi-trip); }
.hmi-tv-chip.is-manual { --c: var(--hmi-manual); }
.hmi-tv-chip.is-sensor { --c: #a855f7; }
.hmi-tv-chip.is-group { --c: #f59e0b; }

.hmi-tv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; }
.hmi-tv-card {
  --c: var(--hmi-stop);
  position: relative; padding: 14px 14px 12px 18px; border-radius: 14px; overflow: hidden;
  background: var(--hmi-panel); border: 1px solid var(--hmi-border); box-shadow: var(--hmi-shadow-sm);
}
.hmi-tv-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--c); }
.hmi-tv-card.is-run, .hmi-tv-card.is-on { --c: var(--hmi-run); }
.hmi-tv-card.is-trip { --c: var(--hmi-trip); border-color: color-mix(in srgb, var(--hmi-trip) 45%, var(--hmi-border)); }
.hmi-tv-card.is-manual { --c: var(--hmi-manual); }
.hmi-tv-card.is-offline { --c: var(--hmi-border-strong); opacity: .75; }
.hmi-tv-card header { display: flex; align-items: center; gap: 9px; min-width: 0; }
.hmi-tv-dot {
  flex: none; width: 11px; height: 11px; border-radius: 50%; background: var(--c);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 22%, transparent);
}
.hmi-tv-card h3 { flex: 1; min-width: 0; margin: 0; font-size: 15px; font-weight: 750; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hmi-tv-state {
  flex: none; padding: 3px 8px; border-radius: 6px; font-size: 10.5px; font-weight: 800; letter-spacing: .06em;
  color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent);
}
.hmi-tv-card.is-stop .hmi-tv-state, .hmi-tv-card.is-off .hmi-tv-state, .hmi-tv-card.is-offline .hmi-tv-state { color: var(--hmi-muted); }
.hmi-tv-type { margin: 4px 0 10px 20px; font-size: 12px; color: var(--hmi-muted); }
.hmi-tv-type b { color: var(--hmi-text); }

.hmi-tv-bits { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.hmi-tv-bits li {
  --l: var(--hmi-run);
  display: grid; grid-template-columns: 74px 1fr auto 26px; align-items: center; gap: 8px;
  padding: 6px 8px; border-radius: 8px; background: var(--hmi-surface-2);
}
.hmi-tv-bits li.r-trip { --l: var(--hmi-trip); }
.hmi-tv-bits li.r-man { --l: var(--hmi-manual); }
.hmi-tv-bits li.r-cmd { --l: var(--hmi-accent); }
.hmi-tv-role { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--hmi-muted); }
.hmi-tv-bits code {
  font: 700 13.5px ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace; color: var(--hmi-text);
}
.hmi-tv-bits small { font-size: 11px; color: var(--hmi-muted); font-variant-numeric: tabular-nums; }
.hmi-tv-lamp {
  justify-self: end; width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center; font: 800 11px ui-monospace, Consolas, monospace;
  color: var(--hmi-muted); border: 2px solid var(--hmi-border-strong); background: var(--hmi-panel);
}
.hmi-tv-bits li.is-1 .hmi-tv-lamp {
  color: #fff; border-color: var(--l); background: var(--l);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--l) 25%, transparent), 0 0 10px color-mix(in srgb, var(--l) 55%, transparent);
}
.hmi-tv-bits li.is-na .hmi-tv-lamp { border-style: dashed; }
.hmi-tv-none, .hmi-tv-empty { color: var(--hmi-muted); font-size: 13px; padding: 6px 0 2px 20px; }
.hmi-tv-empty { grid-column: 1 / -1; text-align: center; padding: 48px 0; font-size: 15px; }
.hmi-tv-foot { margin-top: 18px; font-size: 12px; color: var(--hmi-muted); }
.hmi-tv-more { font: inherit; color: var(--hmi-accent, #0e7490); background: none; border: 1px solid currentColor; border-radius: 6px; padding: 4px 12px; margin-left: 4px; cursor: pointer; }

@media (max-width: 600px) {
  .hmi-tv { padding: 14px 16px 64px; }
  .hmi-tv-search { flex: 1 1 100%; }
  .hmi-tv-grid { grid-template-columns: 1fr; }
}

/* ---- History tab (historian) ---- */
.hmi-h-wrap { padding: 12px 18px 18px; }
.hmi-h-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 8px; font-size: 13px; color: #0f172a; }
.hmi-h-leg i { display: inline-block; width: 12px; height: 12px; border-radius: 2px; margin: 0 5px -1px 0; }
.hmi-h-leg small { color: #64748b; }
.hmi-h-chart { position: relative; }
.hmi-h-chart svg { display: block; font-family: inherit; }
.hmi-h-read { position: absolute; top: 8px; background: rgba(15, 23, 42, .92); color: #fff; font-size: 12px; line-height: 1.5;
  padding: 6px 9px; border-radius: 6px; pointer-events: none; min-width: 170px; }
.hmi-h-picker { padding: 14px 18px; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px 14px; }
.hmi-h-picker > div { grid-column: 1 / -1; }
.hmi-h-pick { font-size: 13px; color: #0f172a; display: flex; gap: 6px; align-items: center; }
.hmi-h-pick small { color: #64748b; }

/* ---------- setpoint change: value, review, result ---------- */
.hmi-sp { z-index: 120; }
.hmi-sp-card { width: min(440px, 100%); display: flex; flex-direction: column; }
/* recipes: the same dialog, wider, with a table that scrolls */
.hmi-sp-card.hmi-rc-card { width: min(760px, 100%); max-height: 92vh; }
.hmi-rc-card .hmi-sp-body { overflow: auto; min-height: 0; }
.hmi-rc-scroll { max-height: 52vh; overflow: auto; margin: 8px 0; }
.hmi-rc-in { width: 100%; box-sizing: border-box; padding: 7px 9px; margin-bottom: 8px; font: inherit; }
.hmi-rc-val { width: 96px; padding: 5px 7px; font: inherit; text-align: right; }
.hmi-rc-notes { font-size: 12px; opacity: .7; }
.hmi-rc-state.is-bad { color: #dc2626; font-weight: 600; }
.hmi-rc-state.is-ok { color: #15803d; font-weight: 600; }
.hmi-sp-card .hmi-dlg-head { padding-bottom: 14px; }
.hmi-sp-card .hmi-dlg-head::after { background: var(--cyan); }
.hmi-sp-title { margin: 4px 0 0; font-size: 21px; font-weight: 800; line-height: 1.15; overflow-wrap: anywhere; }
.hmi-sp-body { padding: 16px 20px 6px; overflow: auto; min-height: 0; }
.hmi-sp-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px 16px; border-top: 1px solid var(--line); background: var(--paper-2); }
.hmi-sp-foot .hmi-ap-btn { min-width: 96px; }
.hmi-sp-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.hmi-sp-grid > div { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper-2); }
.hmi-sp-grid span { display: block; font-size: 10.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.hmi-sp-grid b { display: block; margin-top: 3px; font-size: 14px; font-family: var(--mono); color: var(--ink); overflow-wrap: anywhere; }
.hmi-sp-label { display: block; font-size: 12px; font-weight: 700; color: var(--ink-2); margin-bottom: 6px; }
.hmi-sp-input { display: flex; align-items: stretch; gap: 6px; }
.hmi-sp-input input { flex: 1 1 auto; min-width: 0; font: 700 24px/1.2 var(--mono); padding: 10px 12px; text-align: right;
  border: 1.5px solid var(--line-2); border-radius: 8px; color: var(--ink); background: #fff; }
.hmi-sp-input input:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(14, 116, 144, .18); }
.hmi-sp-units { align-self: center; font-size: 15px; font-weight: 700; color: var(--ink-2); padding: 0 2px; }
.hmi-sp-step { appearance: none; width: 48px; font: 700 22px/1 inherit; border: 1.5px solid var(--line-2); border-radius: 8px; background: var(--paper-2); color: var(--ink); cursor: pointer; }
.hmi-sp-step:hover { border-color: var(--ink-3); }
.hmi-sp-msg { min-height: 20px; margin: 8px 0 6px; font-size: 13px; color: var(--ink-2); }
.hmi-sp-msg.is-bad { color: #b91c1c; font-weight: 600; }
.hmi-sp-review { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 14px 8px 4px; font-family: var(--mono); flex-wrap: wrap; }
.hmi-sp-old { font-size: 20px; color: var(--ink-3); text-decoration: line-through; text-decoration-thickness: 1px; }
.hmi-sp-arrow { font-size: 22px; color: var(--ink-3); }
.hmi-sp-new { font-size: 30px; font-weight: 800; color: var(--ink); }
.hmi-sp-delta { text-align: center; font-size: 13px; font-weight: 700; color: var(--cyan); margin-bottom: 10px; }
.hmi-sp-note { margin: 6px 0 4px; font-size: 12.5px; line-height: 1.5; color: var(--ink-2); }
.hmi-sp-write { background: #b45309; border-color: #b45309; color: #fff; }
.hmi-sp-write:hover:not([disabled]) { background: #92400e; border-color: #92400e; }
.hmi-sp-result { margin: 4px 0 12px; padding: 12px 14px; border-radius: 8px; font-size: 14px; line-height: 1.5; }
.hmi-sp-result.is-ok { background: rgba(22, 163, 74, .1); border: 1px solid rgba(22, 163, 74, .45); color: #14532d; }
.hmi-sp-result.is-bad { background: rgba(220, 38, 38, .08); border: 1px solid rgba(220, 38, 38, .4); color: #7f1d1d; }
.hmi-sp-table .hmi-sp-now { font-family: "Cascadia Mono", Consolas, monospace; }
.hmi-sp-addr { font-style: normal; font-size: 11.5px; color: #7b8ca0; font-family: "Cascadia Mono", Consolas, monospace; }
.hmi-sp-bad { color: #b91c1c; font-weight: 700; }
@media (max-width: 420px) { .hmi-sp-grid { grid-template-columns: 1fr; } }

/* maintenance lock: the bar in a machine's popup, and a padlock on the machine itself */
.hmi-lockbar { display: flex; align-items: center; gap: 10px; margin: 12px 20px 0; padding: 9px 12px; border-radius: 10px;
  background: var(--surface-2, rgba(100, 116, 139, .08)); color: var(--ink-2, inherit); font-size: 13px; }
.hmi-lockbar > svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; }
.hmi-lockbar > span { flex: 1; min-width: 0; }
.hmi-lock-btn { flex: none; font: inherit; font-size: 13px; font-weight: 600; padding: 6px 12px; border-radius: 8px; cursor: pointer;
  border: 1.5px solid currentColor; background: transparent; color: #b45309; }
.hmi-lock-btn.is-force { color: #dc2626; }
.hmi-lock-btn[hidden] { display: none; }
.hmi-dialog-card.is-locked .hmi-lockbar { background: rgba(220, 38, 38, .12); color: #b91c1c; font-weight: 600; }
.hw.hmi-locked::after { content: ""; position: absolute; right: -4px; top: -4px; width: 22px; height: 22px; border-radius: 50%;
  background: #dc2626 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.4'%3E%3Crect x='5' y='10.5' width='14' height='10' rx='2.2'/%3E%3Cpath d='M8.5 10.5V7.8a3.5 3.5 0 0 1 7 0v2.7'/%3E%3C/svg%3E") center / 14px no-repeat;
  box-shadow: 0 0 0 2px #fff; pointer-events: none; z-index: 2; }
