/* Badge Record: per-demo styles (the frame and building blocks are in /kit/kit.css). */

/* Badge kinds */
.avatar.k-staff { background: var(--blue-soft); color: var(--blue-deep); }
.avatar.k-contractor { background: var(--amber-soft); color: var(--amber-ink); }
.avatar.k-visitor { background: var(--green-soft); color: var(--green-ink); }
.stage code { font: 600 12.5px/1 var(--mono); color: var(--ink-soft); }
.wide { width: 100%; }

/* ---- At the door: who is badging ---- */
.who { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.who-btn { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px 8px; border: 1.5px solid var(--rule); border-radius: 16px; background: var(--card); cursor: pointer; min-width: 0; min-height: 44px; }
.who-btn:hover { border-color: var(--blue); }
.who-btn .avatar { position: relative; width: 40px; height: 40px; font-size: 15px; }
.who-btn strong { font: 700 13.5px/1.15 var(--display); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who-btn small { font: 500 11px/1 var(--mono); color: var(--ink-faint); }
.who-btn.on { border-color: var(--blue); background: var(--blue-soft); box-shadow: inset 0 0 0 1.5px var(--blue); }
.here { position: absolute; right: -1px; bottom: -1px; width: 12px; height: 12px; border-radius: 50%; background: var(--green); border: 2px solid var(--card); }

/* The wallet badge */
.wallet { border-radius: 18px; padding: 12px 16px 14px; display: flex; flex-direction: column; gap: 4px; color: #fff; background: var(--blue); box-shadow: 0 8px 20px rgba(16, 22, 33, .14); }
.wallet.w-contractor { background: var(--amber-ink); }
.wallet.w-visitor { background: var(--green-ink); }
.wallet-top { display: flex; justify-content: space-between; gap: 8px; font: 700 12px/1.2 var(--display); text-transform: uppercase; letter-spacing: .06em; opacity: .85; }
.wallet strong { font: 800 24px/1.1 var(--display); }
.wallet-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.wallet code { color: #fff; font-size: 14px; }
.wallet-status { font: 700 12.5px/1 var(--display); border-radius: 999px; padding: 6px 10px; background: rgba(255, 255, 255, .18); }
.wallet-status.on { background: #fff; color: var(--green-ink); }

/* The door reader */
.reader { background: var(--ink); color: #fff; border-radius: 24px; padding: 14px; display: flex; flex-direction: column; gap: 14px; }
.reader-doors { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.reader-doors button { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 8px 2px; border-radius: 14px; border: 1.5px solid rgba(255, 255, 255, .2); background: transparent; color: #fff; font: 600 12.5px/1.1 var(--display); cursor: pointer; min-height: 64px; min-width: 0; }
.reader-doors button .glyph { width: 30px; height: 30px; background: #fff; border-radius: 9px; padding: 2px; }
.reader-doors button.on { background: #fff; color: var(--ink); border-color: #fff; }
.reader-face { display: flex; align-items: center; gap: 16px; padding: 4px 2px; min-height: 84px; }
.lamp { width: 72px; height: 72px; border-radius: 50%; flex: none; display: grid; place-items: center; background: #2A3140; box-shadow: inset 0 0 0 6px rgba(255, 255, 255, .06); }
.lamp.green { background: var(--green); box-shadow: 0 0 0 6px rgba(35, 201, 78, .25), 0 0 34px rgba(35, 201, 78, .65); }
.lamp.red { background: #E5484D; box-shadow: 0 0 0 6px rgba(229, 72, 77, .25), 0 0 34px rgba(229, 72, 77, .65); }
.reader-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.reader-text strong { font: 800 28px/1.05 var(--display); letter-spacing: -.01em; }
.reader-text span { color: rgba(255, 255, 255, .78); font-size: 14px; }
.reader-text .reason { color: #fff; font-weight: 600; }
.reader-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.reader-btns .btn { min-height: 52px; font-size: 16px; }
.reader .btn.green { background: var(--green); border-color: var(--green); color: var(--ink); }
.reader .btn.out { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .4); }
.reader .btn[disabled] { opacity: .35; }
.reader-rec { font-size: 12.5px; color: rgba(255, 255, 255, .72); border-top: 1px dashed rgba(255, 255, 255, .22); padding-top: 10px; }
.reader-rec code { color: #fff; font-size: 12px; }
.reader-rec b { font: 700 12px/1 var(--mono); color: var(--green); margin-left: 4px; }
@media (prefers-reduced-motion: no-preference) {
  .lamp.green, .lamp.red { animation: lampon .45s cubic-bezier(.2, 0, 0, 1); }
  @keyframes lampon { from { transform: scale(.8); } to { transform: none; } }
}

/* Doors tab */
.doors .glyph { width: 40px; height: 40px; background: var(--paper-2); border-radius: 12px; padding: 3px; }
.door-count { display: flex; flex-direction: column; align-items: flex-end; }
.door-count b { font: 700 20px/1 var(--display); color: var(--blue); }
.door-count span { font-size: 11.5px; color: var(--ink-faint); }

.empty { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 28px 12px; color: var(--ink-faint); }
.empty strong { font: 700 17px/1.2 var(--display); color: var(--ink); }

/* ---- Security console ---- */
.stats4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.stats3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.desk .stat { background: var(--card); box-shadow: var(--shadow); border-radius: 16px; padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.desk .stat .glyph { width: 30px; height: 30px; margin-bottom: 4px; }
.desk .stat b { font-size: 32px; }
.stat.red b { color: var(--red-ink); }
.stat.amber b { color: var(--amber-ink); }
.sec-grid, .rv-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.entries li { flex-wrap: wrap; align-items: flex-start; }
.entries .t { font: 700 14px/36px var(--display); font-variant-numeric: tabular-nums; min-width: 44px; }
.entries .grow { flex: 1 1 160px; }
.entries .grow strong code, .rows .grow strong code { margin-left: 4px; font-weight: 500; color: var(--ink-faint); }
.end { display: flex; align-items: center; gap: 6px; margin-left: auto; flex-wrap: wrap; justify-content: flex-end; }
.entries li.fixed { background: linear-gradient(90deg, var(--amber-soft), transparent 70%); border-radius: 12px; padding-left: 8px; }
.rows .grow .fixline { display: block; color: var(--amber-ink); font-weight: 600; font-size: 13px; margin-top: 2px; }
.attn { border: 2px solid #C67A12; }
.calm { flex-direction: row; align-items: center; gap: 12px; color: var(--green-ink); font-weight: 600; }
.mini li { padding: 8px 0; }
/* Live: the list on the left, the side cards on the right; on narrow screens the open item comes first */
.sec-grid { grid-template-areas: "list attn" "list site" "list priv"; grid-template-rows: auto auto 1fr; }
.a-list { grid-area: list; } .a-attn { grid-area: attn; } .a-site { grid-area: site; } .a-priv { grid-area: priv; }
@media (max-width: 980px) {
  .sec-grid { grid-template-areas: "attn" "list" "site" "priv"; grid-template-rows: none; }
}
.privacy { display: flex; gap: 10px; align-items: center; font-size: 13.5px; color: var(--ink-soft); border: 1.5px dashed var(--rule); border-radius: 14px; padding: 10px 12px; background: var(--card); }
.privacy .glyph { width: 28px; height: 28px; }

/* Correction form */
.fixform { border: 2px solid var(--blue); }
.orig-line { display: flex; align-items: center; gap: 12px; background: var(--paper-2); border-radius: 14px; padding: 10px 12px; }
.orig-line div { display: flex; flex-direction: column; min-width: 0; }
.orig-line strong { font-family: var(--display); }
.orig-line span { font-size: 13.5px; color: var(--ink-soft); }
.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opt { display: inline-flex; align-items: center; gap: 8px; border: 1.5px solid var(--rule); border-radius: 999px; padding: 8px 14px; cursor: pointer; font: 600 14px/1.2 var(--display); min-height: 44px; background: var(--card); }
.opt:has(input:checked) { border-color: var(--blue); background: var(--blue-soft); color: var(--blue-deep); }
.opt input { accent-color: var(--blue); margin: 0; }

/* Original and correction, side by side */
.pairs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.pair { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 10px; align-items: stretch; }
.pair-card { border-radius: 16px; padding: 12px 14px; border: 1.5px solid var(--rule); display: flex; flex-direction: column; gap: 3px; min-width: 0; background: var(--card); }
.pair-card.orig { border-style: dashed; }
.pair-card.fix { border-color: #C67A12; background: var(--amber-soft); }
.pair-card strong { font-family: var(--display); }
.pair-card span { font-size: 13.5px; color: var(--ink-soft); }
.pair-tag { font: 700 11.5px/1.2 var(--mono); color: var(--ink-faint) !important; }
.pair-arrow { align-self: center; font: 700 22px/1 var(--display); color: var(--amber-ink); }

/* ---- Safety officer ---- */
.hero-card .big.huge { font-size: 64px; }
.hero-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.hero-chips span { background: rgba(255, 255, 255, .14); color: #fff; border-radius: 999px; padding: 6px 10px; font: 700 12.5px/1 var(--display); }
.hero-card .big.roll-count { font-size: 48px; }
.meter { width: 100%; height: 10px; margin-top: 6px; }
.meter .m-bg { fill: rgba(255, 255, 255, .28); }
.meter .m-fg { fill: #fff; }
.muster-btns { display: flex; gap: 6px; flex: none; }
.muster-btns .btn { min-height: 40px; }
.phone .rows li { padding: 10px 0; }
.phone .rows .grow strong { font-size: 15px; }

/* ---- Reviewer ---- */
.picks { display: flex; flex-wrap: wrap; gap: 8px; }
.pick { display: inline-flex; align-items: center; gap: 8px; border: 1.5px solid var(--rule); background: var(--card); border-radius: 999px; padding: 6px 12px 6px 6px; font: 600 14px/1 var(--display); cursor: pointer; min-height: 44px; }
.pick.mono { font: 600 13.5px/1 var(--mono); padding-left: 14px; }
.pick .glyph { width: 30px; height: 30px; background: var(--paper-2); border-radius: 50%; padding: 2px; }
.pick i { font: 700 11.5px/1 var(--mono); font-style: normal; background: var(--paper-2); color: var(--ink-soft); border-radius: 999px; padding: 4px 7px; }
.pick.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.pick.on .glyph { background: #fff; }
.pick.on i { background: rgba(255, 255, 255, .18); color: #fff; }

.tl { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.tl li { display: grid; grid-template-columns: 62px 16px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 9px 0; position: relative; }
.tl li::before { content: ""; position: absolute; left: 79px; top: 0; bottom: 0; width: 2px; background: var(--rule); }
.tl li:first-child::before { top: 14px; }
.tl li:last-child::before { bottom: calc(100% - 14px); }
.tl-time { font: 700 15px/1.15 var(--display); text-align: right; font-variant-numeric: tabular-nums; }
.tl-time small { display: block; font: 500 11.5px/1.2 var(--text); color: var(--ink-faint); }
.tl-dot { width: 14px; height: 14px; border-radius: 50%; margin: 2px 0 0 1px; background: var(--green); box-shadow: 0 0 0 3px var(--card); position: relative; z-index: 1; }
.tl-out .tl-dot { background: var(--blue); }
.tl-refused .tl-dot { background: #E5484D; }
.tl-fix .tl-dot { background: #C67A12; border-radius: 4px; }
.tl-muster .tl-dot { background: var(--ink-faint); }
.tl-body { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; }
.tl-body strong { font-family: var(--display); }
.tl-body span { font-size: 13.5px; color: var(--ink-soft); }
.tl-fix .tl-body strong { color: var(--amber-ink); }
.tl-refused .tl-body strong { color: var(--red-ink); }
.tl-hash { font: 500 11.5px/1.4 var(--mono); color: var(--ink-faint); white-space: nowrap; }

.check-card { display: flex; gap: 12px; align-items: center; border-radius: 16px; padding: 14px 16px; background: var(--card); box-shadow: var(--shadow); }
.check-card div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.check-card strong { font: 700 16px/1.2 var(--display); }
.check-card span { font-size: 13.5px; color: var(--ink-soft); }
.check-card.ok { background: var(--green-soft); box-shadow: none; }
.check-card.ok strong { color: var(--green-ink); }
.check-card.bad { background: var(--red-soft); box-shadow: none; }
.check-card.bad strong { color: var(--red-ink); }

/* ---- Narrow screens ---- */
@media (max-width: 980px) {
  .sec-grid, .rv-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 700px) {
  .stats4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pair { grid-template-columns: minmax(0, 1fr); }
  .pair-arrow { transform: rotate(90deg); justify-self: center; }
}
@media (max-width: 520px) {
  .desk .stat b { font-size: 26px; }
  .stats3 .stat { padding: 10px 12px; }
  .tl li { grid-template-columns: 46px 14px minmax(0, 1fr); gap: 8px; }
  .tl li::before { left: 60px; }
  .tl-time { font-size: 14px; }
  .tl-hash { grid-column: 3; }
  .reader-text strong { font-size: 24px; }
  .lamp { width: 62px; height: 62px; }
  .entries .t { min-width: 0; }
}
