/* ── Mode picker ─────────────────────────────────────────────────── */

.page-intro {
  margin: 8px 0 20px;
}
.page-intro h1 {
  font-size: clamp(1.7rem, 4.5vw, 2.4rem);
  margin: 6px 0 4px;
}

.mode-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}
.mode-card {
  appearance: none;
  font: inherit;
  text-align: left;
  cursor: pointer;
  color: var(--fg);
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 20px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(251, 246, 240, 0.085), rgba(251, 246, 240, 0.03));
  box-shadow:
    0 1px 0 0 rgba(251, 246, 240, 0.08) inset,
    0 24px 60px -28px rgba(0, 0, 0, 0.75);
  transition:
    transform 0.15s ease,
    border-color 0.15s ease;
}
.mode-card:hover {
  transform: translateY(-2px);
  border-color: rgba(150, 207, 212, 0.6);
}
.mode-card .tile-icon {
  margin-bottom: 10px;
}
.mode-card .t {
  font-weight: 700;
  font-size: 1.15rem;
}
.mode-card .d {
  color: var(--muted);
  font-size: 0.92rem;
}
.mode-card.accent {
  background: var(--cadet);
  border-color: transparent;
  color: var(--navy);
}
.mode-card.accent .d {
  color: rgba(19, 33, 60, 0.75);
}
.mode-card.accent .tile-icon {
  background: var(--navy);
  color: var(--cadet);
}

.station-pick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}
.station-pick {
  appearance: none;
  font: inherit;
  text-align: left;
  cursor: pointer;
  color: var(--fg);
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(251, 246, 240, 0.085), rgba(251, 246, 240, 0.03));
}
.station-pick:hover:not(:disabled) {
  border-color: rgba(150, 207, 212, 0.6);
}
.station-pick:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.station-pick .no {
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  background: var(--accent-fill);
  color: var(--cadet);
}
.station-pick.selected {
  border: 2px solid var(--cadet);
}
.station-pick.selected .no {
  background: var(--cadet);
  color: var(--navy);
}

/* ── Scanning ────────────────────────────────────────────────────── */

.mode-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.mode-chip .ic {
  color: var(--cadet);
  width: 20px;
  height: 20px;
}

.scan-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  padding: 16px;
  max-width: 1200px;
  margin: 0 auto;
}
@media (min-width: 900px) {
  .scan-layout {
    grid-template-columns: minmax(340px, 440px) 1fr;
    align-items: start;
    padding: 22px;
    gap: 22px;
  }
  .scan-pane {
    position: sticky;
    top: 86px;
  }
}

.video-wrap {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid var(--line);
  box-shadow: 0 30px 70px -35px rgba(0, 0, 0, 0.9);
  aspect-ratio: 1 / 1;
  max-height: 46vh;
  width: 100%;
  margin: 0 auto;
}
@media (min-width: 900px) {
  .video-wrap {
    max-height: none;
  }
}
.video-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.cam-msg {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 22px;
  color: var(--fg-2);
  font-size: 0.95rem;
  background: rgba(10, 18, 32, 0.92);
}
.cam-msg > .ic {
  width: 36px;
  height: 36px;
  color: var(--cadet);
}
.cam-tools {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 3;
}
.cam-tools .btn {
  background: rgba(19, 33, 60, 0.75);
  backdrop-filter: blur(6px);
}

.manual-form {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.result-idle {
  text-align: center;
  color: var(--muted);
  padding: 36px 18px;
}
.result-idle .ic {
  width: 40px;
  height: 40px;
  color: var(--cadet);
  margin-bottom: 8px;
}

.result-card {
  border-radius: 24px;
  overflow: hidden;
  border: 2px solid var(--line);
  background: linear-gradient(180deg, rgba(251, 246, 240, 0.085), rgba(251, 246, 240, 0.03));
  box-shadow: 0 24px 60px -28px rgba(0, 0, 0, 0.75);
  animation: result-in 0.25s ease;
}
@keyframes result-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}
.status-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.35rem;
  line-height: 1.25;
}
.status-banner .ic {
  width: 30px;
  height: 30px;
  stroke-width: 2.4;
}
.result-card.ok {
  border-color: var(--cadet);
}
.result-card.ok .status-banner {
  background: var(--cadet);
  color: var(--navy);
}
.result-card.warn {
  border-color: var(--warn-line);
}
.result-card.warn .status-banner {
  background: var(--warn-soft);
  color: var(--warn);
}
.result-card.bad {
  border-color: var(--bad-line);
}
.result-card.bad .status-banner {
  background: var(--bad-soft);
  color: var(--bad);
}
.result-card.info {
  border-color: rgba(164, 162, 172, 0.5);
}
.result-card.info .status-banner {
  background: var(--info-soft);
  color: var(--fg);
}
.result-body {
  padding: 18px 20px 22px;
}
.who .name {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 800;
  line-height: 1.2;
}
.who .meta {
  color: var(--muted);
  font-size: 0.92rem;
  margin-top: 2px;
}

.history-card {
  margin-top: 16px;
}
.history-card h2 {
  font-size: 1.1rem;
}
.history-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line-soft);
  cursor: pointer;
}
.history-item:last-child {
  border-bottom: 0;
}
.history-item .h-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Kiosk (customer check only) ─────────────────────────────────── */

#view-kiosk {
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
}
.kiosk-lock {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 50;
  appearance: none;
  border: 1px solid var(--line);
  background: rgba(19, 33, 60, 0.6);
  color: var(--fg-2);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: grid;
  place-items: center;
  opacity: 0.7;
}
.kiosk-lock .ic {
  width: 20px;
  height: 20px;
}
.kiosk-idle {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 28px 16px;
  gap: 6px;
}
.kiosk-idle h1 {
  font-size: clamp(2.2rem, 7vw, 3.8rem);
  margin: 6px 0 0;
}
.kiosk-idle p {
  font-size: clamp(1.05rem, 3vw, 1.4rem);
  margin: 0 0 18px;
  color: var(--fg-2);
}
.kiosk-video {
  width: min(78vw, 54vh, 460px);
  max-height: none;
  border: 2px solid rgba(150, 207, 212, 0.55);
  box-shadow:
    0 0 0 8px rgba(150, 207, 212, 0.08),
    0 40px 90px -40px rgba(0, 0, 0, 0.95);
}
.kiosk-flip {
  margin-top: 16px;
}
.kiosk-result {
  position: fixed;
  inset: 0;
  z-index: 40;
  overflow-y: auto;
  background: rgba(10, 18, 32, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}
.kiosk-result > * {
  margin: auto;
}
/* Off-white card: CI pair Navy on Off-White, easy to read for guests. */
.kiosk-card {
  width: min(100%, 780px);
  background: var(--offwhite);
  border-radius: 28px;
  box-shadow: 0 40px 100px -30px rgba(0, 0, 0, 0.9);
  overflow: hidden;
  animation: result-in 0.3s ease;
}
.kiosk-card .kiosk-head {
  padding: 26px 24px 20px;
  text-align: center;
  background: var(--navy);
  color: var(--offwhite);
}
.kiosk-card .kiosk-head .hello {
  color: var(--cadet);
}
.kiosk-card .kiosk-head .name {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 5.5vw, 2.6rem);
  font-weight: 900;
  line-height: 1.15;
}
.kiosk-card .kiosk-body {
  padding: 22px 24px 24px;
}
.kiosk-card .kiosk-body .station-grid {
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
}
.kiosk-countdown {
  height: 5px;
  background: var(--cadet);
  transform-origin: left;
  animation-name: countdown;
  animation-timing-function: linear;
  animation-fill-mode: forwards;
}
@keyframes countdown {
  to {
    transform: scaleX(0);
  }
}
.kiosk-notfound {
  text-align: center;
  padding: 44px 24px;
}
.kiosk-notfound .ic {
  width: 56px;
  height: 56px;
  color: #b4233c;
}
.kiosk-notfound h2 {
  margin-top: 12px;
}
.kiosk-tap {
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  padding: 0 0 18px;
}

.pin-pad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
}
.pin-pad button {
  font: inherit;
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  min-height: 58px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--tint-1);
  color: var(--fg);
  cursor: pointer;
}
.pin-pad button:hover {
  background: var(--tint-2);
}
.pin-pad button.go {
  background: var(--cadet);
  color: var(--navy);
  border-color: transparent;
}
.pin-display {
  text-align: center;
  font-size: 2rem;
  letter-spacing: 0.4em;
  min-height: 48px;
  font-weight: 800;
}
