:root { --red: #a12944; --red-dark: #7d1f35; --purple: #720f80; --ink: #1c1c1c; --ink-2: #4a4a4c; --muted: #6b6b6d; --line: #e3e3e3; --line-2: #c9caca; --bg: #f2f2f3; --tint: #f8eef1; --green: #1f7a4d; --green-bg: #e8f6ee; --amber: #95651a; --amber-bg: #fdf3e3; --blue: #3a4b7a; --blue-bg: #eef1f8; }
* { box-sizing: border-box; }
body { margin: 0; font-family: Montserrat, system-ui, sans-serif; font-size: 14px; color: var(--ink); background: var(--bg); }
[hidden] { display: none !important; }
.logo { width: 132px; height: 18px; display: block; }
.btn { font: inherit; font-size: 13px; font-weight: 600; padding: 10px 18px; border-radius: 6px; border: 1px solid var(--line-2); background: #fff; color: var(--ink); cursor: pointer; white-space: nowrap; }
.btn:hover { background: #f4f4f4; } .btn:disabled { opacity: .5; cursor: default; }
.btn.primary { background: var(--red); border-color: var(--red); color: #fff; } .btn.primary:hover { background: var(--red-dark); }
.btn.purple { background: var(--purple); border-color: var(--purple); color: #fff; }
.btn.danger { color: var(--red); border-color: #e3c2ca; } .btn.danger:hover { background: var(--tint); }
.btn.white { background: #fff; color: var(--red); border-color: #fff; }
.btn.ghost { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.4); color: #fff; }
.btn.sm { padding: 7px 12px; font-size: 12px; }
.link { font: inherit; font-weight: 600; color: var(--red); background: none; border: 0; cursor: pointer; padding: 4px 0; }
.chip { font: inherit; font-size: 12px; font-weight: 600; padding: 8px 14px; border-radius: 6px; cursor: pointer; border: 1px solid #d8d8d8; background: #fff; color: var(--ink-2); }
.chip.on { background: var(--red); border-color: var(--red); color: #fff; }
input, select { font: inherit; font-size: 14px; padding: 11px 14px; border: 1px solid var(--line-2); border-radius: 6px; outline: none; background: #fff; width: 100%; }
input:focus { border-color: var(--red); }
.grow { flex: 1; min-width: 0; } .row { display: flex; gap: 10px; align-items: center; } .between { justify-content: space-between; } .wrap { flex-wrap: wrap; }
.muted { color: var(--muted); } .tiny { font-size: 12px; color: var(--muted); } .tiny a { color: var(--red); font-weight: 600; }
.mono { font-family: ui-monospace, Menlo, monospace; font-size: 12px; background: #f6f6f7; border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; user-select: all; cursor: text; }
.pill { display: inline-block; font-size: 12px; font-weight: 600; padding: 5px 12px; border-radius: 999px; }
.pill.sent, .pill.online, .pill.resolved, .pill.INFO { background: var(--green-bg); color: var(--green); }
.pill.pending, .pill.acknowledged, .pill.WARN { background: var(--amber-bg); color: var(--amber); }
.pill.failed, .pill.waiting, .pill.ERROR, .pill.assist { background: var(--tint); color: var(--red); }
.pill.offline, .pill.disabled { background: #efefef; color: var(--muted); }
.dot { width: 12px; height: 12px; border-radius: 50%; flex: none; display: inline-block; background: var(--line-2); }
.dot.ok { background: #3fa96a; } .dot.bad { background: var(--red); animation: apulse 1.6s infinite; } .dot.warn { background: #e0a33a; }
.blink { width: 12px; height: 12px; border-radius: 50%; background: #fff; animation: ablink 1s infinite; flex: none; }
@keyframes apulse { 0% { box-shadow: 0 0 0 0 rgba(161,41,68,.5) } 70% { box-shadow: 0 0 0 14px rgba(161,41,68,0) } 100% { box-shadow: 0 0 0 0 rgba(161,41,68,0) } }
@keyframes ablink { 0%,49% { opacity: 1 } 50%,100% { opacity: .25 } }

/* login */
.login { position: fixed; inset: 0; background: linear-gradient(170deg, #a12944, #720f80); display: grid; place-items: center; padding: 20px; }
.login-card { background: #fff; border-radius: 12px; padding: 36px; width: min(380px, 100%); display: flex; flex-direction: column; gap: 14px; }
.login-card .logo { filter: invert(1) brightness(.2); }
.login-card .sub { font-size: 12px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.err { color: var(--red); font-weight: 600; font-size: 13px; }

/* layout */
.app { display: flex; min-height: 100vh; }
.side { width: 260px; flex: none; background: linear-gradient(170deg, #a12944 0%, #720f80 100%); color: #fff; display: flex; flex-direction: column; padding: 28px 0 20px; position: sticky; top: 0; height: 100vh; }
.side-head { padding: 0 24px 22px; border-bottom: 1px solid rgba(255,255,255,.22); }
.side .sub { font-size: 11px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: rgba(255,255,255,.7); margin-top: 12px; }
#nav { display: flex; flex-direction: column; gap: 4px; padding: 18px 14px; }
#nav button { font: inherit; display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; padding: 13px 14px; border: 0; border-radius: 8px; cursor: pointer; text-align: left; background: transparent; color: rgba(255,255,255,.78); }
#nav button.on { background: rgba(255,255,255,.18); color: #fff; }
.badge { margin-left: auto; font-size: 11px; font-weight: 700; min-width: 22px; height: 22px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; padding: 0 7px; background: rgba(255,255,255,.22); }
.badge:empty { display: none; } .badge.red { background: #fff; color: var(--red); }
.side-foot { margin-top: auto; padding: 18px 24px 0; border-top: 1px solid rgba(255,255,255,.22); margin-inline: 24px; font-size: 13px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.side-foot .tiny { width: 100%; color: rgba(255,255,255,.6); } .side-foot .link { color: #fff; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.top { height: 80px; flex: none; background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center; padding: 0 32px; gap: 24px; }
.top > div:first-child { flex: 1; } .title { font-size: 22px; font-weight: 700; letter-spacing: -.01em; } .subtitle { font-size: 13px; color: var(--muted); margin-top: 2px; }
.occ-chip { display: flex; align-items: center; gap: 10px; background: var(--tint); border: 1px solid #e6c9d1; border-radius: 8px; padding: 9px 16px; }
.occ-chip span { font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--red); } .occ-chip b { font-size: 22px; font-weight: 800; color: var(--red); } .occ-chip .cap { text-transform: none; letter-spacing: 0; font-size: 14px; color: #9c6a78; }
.alert { background: var(--red); color: #fff; padding: 12px 32px; display: flex; align-items: center; gap: 16px; font-weight: 600; }
.warnbar { background: var(--amber-bg); color: var(--amber); border-bottom: 1px solid #f0dcb8; padding: 10px 32px; display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; }
.page { padding: 24px 32px 40px; display: flex; flex-direction: column; gap: 18px; }

/* cards */
.card { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 22px 24px; }
.card.flush { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 24px; border-bottom: 1px solid #eee; }
.card h3 { margin: 0; font-size: 16px; font-weight: 700; } .card h3 + .tiny { margin-top: 2px; }
.grid { display: grid; gap: 18px; } .g4 { grid-template-columns: repeat(4, 1fr); } .g2 { grid-template-columns: repeat(2, 1fr); } .g21 { grid-template-columns: 2fr 1fr; }
.kpi .label { font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.kpi .value { font-size: 40px; font-weight: 800; letter-spacing: -.02em; margin-top: 10px; line-height: 1; } .kpi .delta { font-size: 13px; font-weight: 600; margin-top: 10px; color: var(--green); } .kpi .delta.bad { color: var(--red); }
.bars { display: flex; align-items: flex-end; gap: 8px; height: 180px; margin-top: 22px; }
.bars div { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; gap: 6px; font-size: 11px; color: var(--muted); }
.bars i { width: 100%; border-radius: 5px 5px 0 0; background: var(--red); display: block; } .bars i.zero { background: #e8e8e8; }
.stat-row { display: flex; justify-content: space-between; font-size: 14px; font-weight: 600; margin-top: 16px; } .track { height: 8px; border-radius: 4px; background: #eee; margin-top: 8px; overflow: hidden; } .track i { display: block; height: 100%; }

/* tables */
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 13px 16px; border-bottom: 1px solid #eee; }
td { padding: 12px 16px; border-bottom: 1px solid #f2f2f2; vertical-align: middle; }
tr:hover td { background: #fafafa; } td.mono-cell { font-family: ui-monospace, Menlo, monospace; font-size: 12px; color: var(--muted); }
.thumb { width: 36px; height: 48px; object-fit: cover; border-radius: 4px; background: #eee; display: block; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--tint); color: var(--red); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; }

/* live view */
.live-card.assist { border-color: var(--red); animation: apulse 1.6s infinite; }
.live-alert { display: flex; align-items: center; gap: 12px; padding: 10px 24px; background: var(--red); color: #fff; font-size: 13px; }
.live-body { display: flex; gap: 20px; padding: 20px 24px; border-bottom: 1px solid #eee; }
.screen-tile { width: 120px; height: 150px; flex: none; border-radius: 8px; background: linear-gradient(160deg, #a12944, #720f80); color: #fff; padding: 14px; display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; }
.screen-tile .tiny { color: rgba(255,255,255,.75); font-weight: 600; letter-spacing: .14em; text-transform: uppercase; font-size: 11px; } .screen-tile b { font-size: 15px; line-height: 1.25; }
.screen-tile.off { background: #e8e8e8; color: var(--muted); } .screen-tile.off .tiny { color: var(--muted); }
.live-printer { display: flex; align-items: center; gap: 12px; padding: 12px 24px; border-bottom: 1px solid #eee; } .live-printer.bad { background: var(--tint); }

/* kiosk cards */
.proto { flex: none; width: 48px; font-size: 11px; font-weight: 700; letter-spacing: .08em; color: var(--muted); }
.kiosk { display: flex; flex-direction: column; gap: 16px; }
.kiosk .stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; padding-top: 16px; border-top: 1px solid #f0f0f0; } .kiosk .stats b { display: block; font-size: 18px; margin-top: 4px; }
.confirm { display: flex; align-items: center; gap: 14px; background: var(--tint); border: 1px solid #e3c2ca; border-radius: 8px; padding: 12px 16px; color: var(--red-dark); font-size: 13px; }
.dashed { border-style: dashed; border-color: var(--line-2); }

/* settings */
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; } .field .tiny { font-weight: 400; }
/* ViOnyx Hub card: step 1 certificate, step 2 connection; a step that cannot run yet is dimmed */
.hub-step { border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; } .hub-step.off { opacity: .55; }
.hub-step-head { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.hub-step .tiny, .hub-step .mono-cell { overflow-wrap: anywhere; } /* a SHA-256 fingerprint has no spaces to break at */
.step-num { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--red); color: #fff; font-size: 12px; font-weight: 700; }
.stepper { display: flex; align-items: center; gap: 14px; } .stepper .num { font-size: 44px; font-weight: 800; width: 140px; text-align: center; padding: 0; border: 1px solid transparent; border-radius: 6px; -moz-appearance: textfield; } .stepper .num:focus { border-color: var(--red); } .stepper .num::-webkit-inner-spin-button { -webkit-appearance: none; } .stepper .btn { width: 48px; height: 48px; font-size: 22px; padding: 0; }
.toggle { font: inherit; font-size: 12px; font-weight: 700; padding: 6px 14px; border-radius: 999px; border: 0; cursor: pointer; background: #e8e8e8; color: var(--muted); } .toggle.on { background: var(--red); color: #fff; }

@media (max-width: 1100px) { .g4 { grid-template-columns: repeat(2, 1fr); } .g2, .g21 { grid-template-columns: 1fr; } .kiosk .stats { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 760px) { .app { flex-direction: column; } .side { width: auto; height: auto; position: static; padding: 18px 0 12px; } #nav { flex-direction: row; flex-wrap: wrap; } .page, .top { padding-inline: 16px; } .top { height: auto; padding-block: 14px; flex-wrap: wrap; } }
