/* MedTrack: demo-only styles. The frame, the app shells and the building blocks are /kit/kit.css. */
.code { font-family: var(--mono); letter-spacing: .02em; }
.grow { flex: 1; min-width: 0; }
.wide { width: 100%; }

/* Key numbers */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.stats.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stats .stat { background: var(--card); box-shadow: var(--shadow); }
.phone .stats .stat { box-shadow: none; background: var(--paper-2); padding: 10px 12px; }
.stat.red b { color: var(--red-ink); }
.stat.amber b { color: var(--amber-ink); }
.hero-card.red { background: var(--red-ink); }
.hero-card .big.code { font-size: 32px; }
.hero-card .verdict-line { font: 700 15px/1.3 var(--display); overflow-wrap: anywhere; }
.pill.warm { background: var(--red-ink); }

/* Where a batch is: five stops, a count under each */
.where { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.where li { display: flex; flex-direction: column; align-items: center; gap: 3px; background: var(--paper-2); border-radius: 14px; padding: 10px 4px 8px; text-align: center; min-width: 0; }
.where b { font: 800 22px/1 var(--display); color: var(--blue); font-variant-numeric: tabular-nums; }
.where span { font-size: 12px; color: var(--ink-soft); overflow-wrap: anywhere; line-height: 1.2; }
.where li.zero { opacity: .55; }
.where li.zero b { color: var(--ink-faint); }

/* Package rows: the actions drop to their own line in narrow apps */
.rows li.pk { flex-wrap: wrap; }
.rows li.pk .acts { display: flex; gap: 8px; margin-left: auto; flex-wrap: wrap; }
.phone .rows li.pk .acts { flex-basis: 100%; }
.phone .rows li.pk .acts .btn { flex: 1; }
.phone .rows { background: var(--card); border-radius: 18px; padding: 2px 14px; box-shadow: var(--shadow); }
.batch-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.batch-top .grow strong { display: block; font-size: 17px; }
.batch-top .grow span { font-size: 13.5px; color: var(--ink-faint); }

/* Office header: the "pack a batch" form */
.pack { display: flex; gap: 8px; align-items: center; }
.pack select { width: auto; min-height: 36px; padding: 6px 10px; border-radius: 999px; font-size: 14px; }

/* Scan screens */
.viewfinder { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 210px; border: 0; border-radius: 24px; background: radial-gradient(circle at 50% 40%, #24314a, var(--ink) 70%); color: #fff; cursor: pointer; overflow: hidden; font: 700 15px/1.2 var(--display); }
.viewfinder[disabled] { cursor: default; opacity: .7; }
.vf-box { position: absolute; inset: 26px 20%; background:
  linear-gradient(#fff, #fff) top left / 28px 3px no-repeat, linear-gradient(#fff, #fff) top left / 3px 28px no-repeat,
  linear-gradient(#fff, #fff) top right / 28px 3px no-repeat, linear-gradient(#fff, #fff) top right / 3px 28px no-repeat,
  linear-gradient(#fff, #fff) bottom left / 28px 3px no-repeat, linear-gradient(#fff, #fff) bottom left / 3px 28px no-repeat,
  linear-gradient(#fff, #fff) bottom right / 28px 3px no-repeat, linear-gradient(#fff, #fff) bottom right / 3px 28px no-repeat; }
.vf-line { position: absolute; left: 22%; right: 22%; top: 50%; height: 2px; background: var(--green); box-shadow: 0 0 14px 2px rgba(35, 201, 78, .7); }
.vf-glyph { position: relative; background: #fff; border-radius: 16px; padding: 6px; }
.vf-glyph .glyph { width: 54px; height: 54px; }
.vf-text { position: relative; }
@media (prefers-reduced-motion: no-preference) {
  .viewfinder:not([disabled]) .vf-line { animation: scanline 2.2s ease-in-out infinite alternate; }
  @keyframes scanline { from { top: 22%; } to { top: 78%; } }
}
.scan-form { display: flex; gap: 8px; }
.scan-form input { flex: 1; min-width: 0; font-family: var(--mono); }
.scan-form .btn { flex: none; }
.back { align-self: flex-start; border: 0; background: transparent; color: var(--blue); font: 700 15px/1 var(--display); padding: 10px 2px; min-height: 44px; cursor: pointer; }

/* Sensor */
.reading-form { display: flex; gap: 8px; align-items: flex-end; }
.reading-form .field { flex: 1; min-width: 0; }

/* The two checks */
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.check { display: flex; align-items: center; gap: 10px; border-radius: 16px; padding: 10px 12px; background: var(--paper-2); }
.check strong { display: block; font: 700 14.5px/1.25 var(--display); }
.check .grow span { font-size: 13px; color: var(--ink-soft); }
.check .mark { font: 800 13px/1 var(--display); border-radius: 999px; padding: 6px 10px; background: var(--card); white-space: nowrap; }
.check.ok { background: var(--green-soft); }
.check.ok .mark { color: var(--green-ink); }
.check.bad { background: var(--red-soft); }
.check.bad .mark { color: var(--red-ink); }
.check.wait { background: var(--amber-soft); }
.check.wait .mark { color: var(--amber-ink); }

/* The trail: one vertical line, one stop per step */
.trail { list-style: none; margin: 0; padding: 0; }
.trail li { position: relative; display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 12px; padding-bottom: 14px; }
.trail li::before { content: ""; position: absolute; left: 18px; top: 38px; bottom: 0; width: 2px; background: var(--rule); }
.trail li:last-child::before { display: none; }
.trail .dot { width: 38px; height: 38px; border-radius: 50%; background: var(--card); box-shadow: inset 0 0 0 1.5px var(--rule); display: grid; place-items: center; }
.trail .dot .glyph { width: 26px; height: 26px; }
.trail li.ok .dot { background: var(--green-soft); box-shadow: none; }
.trail li.bad .dot { background: var(--red-soft); box-shadow: inset 0 0 0 2px var(--red-ink); }
.trail strong { display: block; font: 700 14.5px/1.3 var(--display); overflow-wrap: anywhere; }
.trail li.bad strong { color: var(--red-ink); }
.trail span { display: block; font-size: 13px; color: var(--ink-soft); overflow-wrap: anywhere; }
.trail time { display: block; font-size: 12.5px; color: var(--ink-faint); font-variant-numeric: tabular-nums; }

/* Recall, seen by every party */
.recall-card { background: var(--red-soft); border-radius: 18px; overflow: hidden; }
.recall-head { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: transparent; padding: 12px 14px; text-align: left; cursor: pointer; color: var(--red-ink); min-height: 56px; }
.recall-head .glyph { background: #fff; border-radius: 10px; padding: 2px; }
.recall-head strong { display: block; font: 700 15px/1.2 var(--display); }
.recall-head .grow span { font-size: 13px; }
.recall-card .recall-list { background: var(--card); margin: 0 8px 8px; border-radius: 14px; padding: 2px 12px; box-shadow: none; }
.panel.recalled { box-shadow: inset 0 0 0 2px var(--red-ink), var(--shadow); }
.panel .recall-list { background: transparent; }

/* Equipment: wards to move to */
.wards { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ward { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 54px; padding: 8px 14px; border: 1.5px solid var(--rule); border-radius: 16px; background: var(--card); text-align: left; cursor: pointer; font: 600 15px/1.2 var(--display); }
.ward:hover:not([disabled]) { border-color: var(--blue); }
.ward.here { background: var(--blue-soft); border-color: var(--blue); cursor: default; }
.ward .go { font-size: 13px; color: var(--blue); white-space: nowrap; }

@media (max-width: 520px) {
  .where li { padding: 8px 2px 6px; }
  .where .glyph { width: 24px; height: 24px; }
  .where b { font-size: 19px; }
  .where span { font-size: 11px; }
  .stats.three .stat { padding: 10px; }
  .stats.three .stat b { font-size: 21px; }
  .pack { width: 100%; }
  .pack select { flex: 1; }
}

/* Blue and green buttons: the drawing sits on a white disc so it stays visible */
.btn.primary .glyph, .btn.green .glyph { background: #fff; border-radius: 50%; padding: 2px; }

/* Office apps on phones: the nav gets its own row (the kit lets it squeeze next to the title) */
@media (max-width: 520px) {
  .desk-nav { flex-basis: 100%; order: 3; }
  .desk-actions { order: 4; margin-left: 0; width: 100%; }
  .desk-body .panel { padding: 14px; }
  .where { gap: 4px; }
  .where span { font-size: 10.5px; overflow-wrap: normal; }
}
