/* ── Header & navigation ───────────────────────────────────────────────── */
header {
  background: var(--surface);
  border-bottom: 0.5px solid var(--border);
  padding: 1rem 1.25rem 0;
  position: sticky;
  top: 0;
  z-index: 10;
}
.header-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: .9rem;
}
.logo { font-size: 18px; }
.logo span { color: var(--accent); }
.user-info { font-size: 12px; color: var(--text2); display: flex; align-items: center; gap: 8px; }
.logout-btn {
  font-family: 'Georgia', serif;
  font-size: 12px;
  color: var(--text2);
  background: none;
  border: 0.5px solid var(--border-med);
  border-radius: 6px;
  padding: 4px 10px;
  cursor: pointer;
}
.logout-btn:hover { background: var(--surface2); }

nav { display: flex; overflow-x: auto; }
nav button {
  font-family: 'Georgia', serif;
  font-size: 13px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 8px 14px 10px;
  cursor: pointer;
  color: var(--text2);
  transition: color .15s, border-color .15s;
  white-space: nowrap;
  flex-shrink: 0;
}
nav button.active { color: var(--accent); border-bottom-color: var(--accent); }

/* ── Layout ────────────────────────────────────────────────────────────── */
main { padding: 1.25rem; max-width: 520px; margin: 0 auto; }

/* ── Step indicator ────────────────────────────────────────────────────── */
.steps { display: flex; align-items: center; gap: 0; margin-bottom: 1.25rem; }
.step { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text3); }
.step.active { color: var(--accent); }
.step.done { color: var(--text2); }
.step-num {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px;
  flex-shrink: 0;
}
.step.done .step-num { background: var(--accent); border-color: var(--accent); color: #fff; font-size: 10px; }
.step.active .step-num { border-color: var(--accent); }
.step-line { flex: 1; height: 1px; background: var(--border); margin: 0 6px; }

/* ── Camp selection ────────────────────────────────────────────────────── */
.camp-chip-wrap { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: .75rem; }
.camp-chip {
  font-family: 'Georgia', serif;
  font-size: 13px;
  padding: 6px 14px;
  border: 0.5px solid var(--border-med);
  border-radius: 100px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: all .12s;
}
.camp-chip:hover { background: var(--surface2); }
.camp-chip.selected { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ── Scanner ───────────────────────────────────────────────────────────── */
.video-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius);
  overflow: hidden;
  background: #0a0a0a;
}
.video-wrap video { width: 100%; height: 100%; object-fit: cover; display: block; }
.scan-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.scan-frame {
  width: 60%;
  aspect-ratio: 1;
  border: 2px solid var(--accent);
  border-radius: 4px;
  position: relative;
  box-shadow: 0 0 0 2000px rgba(0,0,0,0.45);
}
.scan-line {
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  background: var(--accent);
  animation: scanmove 2s ease-in-out infinite;
}
@keyframes scanmove { 0%,100%{top:10%;opacity:.5} 50%{top:88%;opacity:1} }
.scan-status {
  text-align: center;
  font-size: 13px;
  color: var(--text2);
  margin-top: .6rem;
  min-height: 20px;
  font-style: italic;
}

/* ── Item rows ─────────────────────────────────────────────────────────── */
.item-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 0.5px solid var(--border);
}
.item-row:last-child { border-bottom: none; }
.item-row-info { flex: 1; min-width: 0; }
.item-row-name { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-row-sub { font-size: 12px; color: var(--text2); font-style: italic; margin-top: 1px; }
.remove-btn {
  background: none;
  border: none;
  color: var(--text3);
  font-size: 18px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  flex-shrink: 0;
}
.remove-btn:hover { color: var(--danger); }
.empty-list { text-align: center; padding: 1.5rem 1rem; color: var(--text3); font-style: italic; font-size: 13px; }

/* ── Camp badge ────────────────────────────────────────────────────────── */
.camp-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-light);
  color: var(--accent-text);
  border: 0.5px solid var(--accent);
  border-radius: 100px;
  padding: 5px 14px 5px 10px;
  font-size: 13px;
  margin-bottom: .85rem;
}
.camp-badge-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }

/* ── Finalize summary ──────────────────────────────────────────────────── */
.summary-count { font-size: 28px; letter-spacing: -.02em; color: var(--text); }
.summary-sub { font-size: 13px; color: var(--text2); font-style: italic; margin-top: 2px; margin-bottom: 1rem; }

/* ── Pills ─────────────────────────────────────────────────────────────── */
.pill { display: inline-block; font-size: 11px; padding: 2px 9px; border-radius: 100px; letter-spacing: .03em; }
.pill.available { background: var(--accent-light); color: var(--accent-text); }
.pill.out { background: var(--warn-bg); color: var(--warn); }

/* ── Inventory table ───────────────────────────────────────────────────── */
.inv-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.inv-table th {
  text-align: left;
  font-weight: normal;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text3);
  padding: 6px 8px;
  border-bottom: 0.5px solid var(--border);
}
.inv-table td { padding: 9px 8px; border-bottom: 0.5px solid var(--border); vertical-align: middle; }
.inv-table tr:last-child td { border-bottom: none; }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 5px; vertical-align: middle; }
.dot.g { background: var(--accent); }
.dot.a { background: var(--warn); }

/* ── Stats ─────────────────────────────────────────────────────────────── */
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 1rem; }
.stat-card {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius);
  padding: .85rem 1rem;
}
.stat-label { font-size: 11px; color: var(--text3); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px; }
.stat-val { font-size: 26px; letter-spacing: -.02em; }
.section-actions { display: flex; align-items: center; justify-content: space-between; margin-bottom: .75rem; }

/* ── History rows ──────────────────────────────────────────────────────── */
.history-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 0.5px solid var(--border);
  font-size: 13px;
}
.history-row:last-child { border-bottom: none; }
.h-icon {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
  margin-top: 1px;
}
.h-icon.out { background: var(--warn-bg); color: var(--warn); }
.h-icon.in  { background: var(--accent-light); color: var(--accent-text); }
.h-main { flex: 1; }
.h-detail { font-size: 12px; color: var(--text2); margin-top: 2px; font-style: italic; }
.h-time { font-size: 11px; color: var(--text3); white-space: nowrap; }
.h-user { font-size: 11px; color: var(--text3); margin-top: 2px; }

/* ── Check-in result card ──────────────────────────────────────────────── */
.ci-result { text-align: center; padding: 1rem 0; }
.ci-result .item-name { font-size: 18px; margin-bottom: .25rem; }
.ci-result .item-status { font-size: 13px; color: var(--text2); font-style: italic; }
