/* =====================================================================
   병원용 결제 접수 화면 전용 스타일
   tokens.css → base.css → app.css → hospital.css
   ===================================================================== */

.scan-stage { padding: 18px var(--sp-5) var(--sp-5); flex: 1; display: flex; flex-direction: column; }

/* ---------- 카메라 뷰파인더 ---------- */
.viewfinder {
  background: #0b0f1a; border-radius: 20px; flex: 1; min-height: 300px;
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden; margin-bottom: var(--sp-4);
}
.viewfinder video, .viewfinder canvas.cam { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.viewfinder .corner { position: absolute; width: 26px; height: 26px; border-color: var(--hosp); }
.viewfinder .c1 { top: 16px; left: 16px;  border-top: 3px solid; border-left: 3px solid;  border-radius: 6px 0 0 0; }
.viewfinder .c2 { top: 16px; right: 16px; border-top: 3px solid; border-right: 3px solid; border-radius: 0 6px 0 0; }
.viewfinder .c3 { bottom: 16px; left: 16px;  border-bottom: 3px solid; border-left: 3px solid;  border-radius: 0 0 0 6px; }
.viewfinder .c4 { bottom: 16px; right: 16px; border-bottom: 3px solid; border-right: 3px solid; border-radius: 0 0 6px 0; }
.viewfinder .scan-line {
  position: absolute; left: 14px; right: 14px; height: 2px;
  background: var(--hosp); box-shadow: 0 0 10px var(--hosp); top: 20%;
  animation: sweep 1.6s ease-in-out infinite;
}
@keyframes sweep { 0%, 100% { top: 18%; } 50% { top: 78%; } }
.viewfinder .preview { opacity: 0; transition: opacity .2s ease; }
.viewfinder.detected .preview { opacity: 1; }
.viewfinder.detected .scan-line { display: none; }
.viewfinder .vf-caption {
  position: absolute; bottom: 14px; font-size: 11px; color: #cfd6e6;
  font-family: var(--font-mono); text-align: center; padding: 0 var(--sp-4);
}
.scan-cta { font-size: 12.5px; color: var(--ink-soft); text-align: center; margin-bottom: var(--sp-4); }

/* ---------- 스캔 결과 요약 ---------- */
.detect-summary {
  background: var(--hosp-soft); border: 1px solid var(--hosp);
  border-radius: 14px; padding: var(--sp-4); margin-bottom: var(--sp-4); font-size: 13px;
}
.detect-summary .row { display: flex; justify-content: space-between; padding: 5px 0; }
.detect-summary .row span:first-child { color: var(--ink-soft); }
.detect-summary .row span:last-child  { font-family: var(--font-mono); font-weight: 600; }

/* ---------- 접수 완료 ---------- */
.done-screen { text-align: center; padding: 30px 10px; margin: auto; }
.done-check {
  width: 56px; height: 56px; border-radius: 50%; background: var(--hosp); color: #fff;
  display: flex; align-items: center; justify-content: center; margin: 0 auto var(--sp-4); font-size: 26px;
}
.done-screen h3 { margin-bottom: var(--sp-2); font-size: 18px; }
.done-screen p { font-size: 13px; color: var(--ink-soft); margin: 0 0 var(--sp-5); line-height: 1.6; }

/* ---------- 병원 사용내역 ---------- */
.log-stage { padding: var(--sp-4) 18px var(--sp-5); flex: 1; overflow-y: auto; }
.log-summary { display: flex; gap: 8px; margin-bottom: 13px; }
.log-summary > div {
  flex: 1; background: var(--hosp-soft); border: 1px solid var(--hosp);
  border-radius: var(--radius-box); padding: 9px 11px; display: flex; flex-direction: column; gap: 2px;
}
.log-summary .ls-k { font-size: 10.5px; color: var(--ink-soft); }
.log-summary .ls-v { font-family: var(--font-mono); font-size: 15px; font-weight: 700; color: var(--hosp); }

.log-filter { display: flex; gap: 6px; margin-bottom: var(--sp-4); }
.fchip {
  border: 1px solid var(--line-strong); background: var(--paper); color: var(--ink-soft);
  border-radius: var(--radius-pill); padding: 5px 11px;
  font-size: 11.5px; font-weight: 600; cursor: pointer; font-family: var(--font-body);
}
.fchip.is-on { background: var(--hosp); border-color: var(--hosp); color: #fff; }

.day-group { margin-bottom: 15px; }
.day-head {
  display: flex; justify-content: space-between; align-items: baseline;
  font-family: var(--font-mono); font-size: 11px; font-weight: 600; color: var(--ink-faint);
  letter-spacing: .02em; padding: 0 2px 6px; border-bottom: 1px solid var(--line-strong); margin-bottom: 2px;
}
.log-row {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 9px 2px; border-bottom: 1px solid var(--line);
}
.log-row:last-child { border-bottom: none; }
.log-row .who  { font-size: 12.5px; font-weight: 600; }
.log-row .meta { font-size: 10.5px; color: var(--ink-faint); font-family: var(--font-mono); margin-top: 2px; }
.log-row .right { text-align: right; white-space: nowrap; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.log-row .amt  { font-family: var(--font-mono); font-weight: 600; font-size: 12.5px; }
