/* Hi-Tech Computer System — Mobile-First Customer Form & Printable QR Poster */
:root {
  --brand-blue: #0057e7;
  --brand-blue-dark: #0041b3;
  --brand-orange: #f25c05;
  --wa-green: #16a34a;
  --wa-green-dark: #15803d;
  --surface: #f8fafc;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #475569;
  --border: #cbd5e1;
  --danger-bg: #fef2f2;
  --danger-border: #fecaca;
  --danger-text: #b91c1c;
  --shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.08), 0 4px 10px -4px rgba(15, 23, 42, 0.04);
  --radius: 16px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--surface);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.honeypot-field {
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.page-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 16px 36px;
}

.lang-bar {
  width: 100%;
  max-width: 480px;
  display: flex;
  justify-content: flex-end;
  margin-bottom: 10px;
}

.lang-switcher {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.05);
}

.lang-btn {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 6px 11px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.lang-btn.is-active {
  background: var(--brand-blue);
  color: #ffffff;
}

.lang-btn:hover:not(.is-active) {
  background: #f1f5f9;
  color: var(--text);
}

.main-card {
  width: 100%;
  max-width: 480px;
  background: var(--card);
  border: 1px solid #e2e8f0;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px 20px;
}

.brand-header {
  text-align: center;
  margin-bottom: 22px;
}

.brand-logo {
  display: block;
  margin: 0 auto 12px;
  max-width: 190px;
  max-height: 92px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.brand-title {
  margin: 0 0 6px;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

.brand-subtitle {
  margin: 0;
  font-size: 0.94rem;
  color: var(--muted);
}

.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.req-star {
  color: var(--brand-orange);
}

.text-input,
.select-input {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  font-size: 16px;
  color: var(--text);
  background: #ffffff;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.text-input:focus,
.select-input:focus {
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px rgba(0, 87, 231, 0.15);
}

.phone-row {
  display: grid;
  grid-template-columns: 124px 1fr;
  gap: 8px;
}

.field-hint {
  margin: 6px 0 0;
  font-size: 0.84rem;
  color: var(--muted);
  min-height: 1.25em;
}

.field-hint.valid {
  color: var(--wa-green-dark);
  font-weight: 500;
}

.field-hint.invalid {
  color: var(--danger-text);
}

/* Photo capture area */
.photo-box {
  border: 1.5px dashed #94a3b8;
  border-radius: 14px;
  padding: 16px;
  background: #f8fafc;
  text-align: center;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}

.photo-item {
  position: relative;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.photo-item-img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  background: #e2e8f0;
}

.photo-item-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px;
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  font-size: 0.78rem;
  color: var(--muted);
}

.photo-remove-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1.5px solid #ffffff;
  background: rgba(15, 23, 42, 0.78);
  color: #ffffff;
  font-size: 1.1rem;
  line-height: 1;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.photo-remove-btn:hover {
  background: var(--danger-text);
}

.photo-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 10px;
}

.photo-limit-note {
  margin: 8px 0 0;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--muted);
}

.btn-camera {
  width: 100%;
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--brand-blue);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.08s ease;
}

.btn-camera:hover:not(:disabled) {
  background: var(--brand-blue-dark);
}

.btn-camera:active:not(:disabled) {
  transform: scale(0.99);
}

.btn-camera:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.size-badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  background: #e0f2fe;
  color: #0369a1;
  font-size: 0.76rem;
  font-weight: 600;
}

.btn-submit {
  width: 100%;
  min-height: 54px;
  margin-top: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 20px;
  border: none;
  border-radius: 12px;
  background: var(--wa-green);
  color: #ffffff;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.15s ease, opacity 0.15s ease;
}

.btn-submit:hover:not(:disabled) {
  background: var(--wa-green-dark);
}

.btn-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(255, 255, 255, 0.35);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.alert-error {
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
  color: var(--danger-text);
  font-size: 0.92rem;
  font-weight: 500;
}

/* Success card */
.success-card {
  text-align: center;
}

.success-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: #dcfce7;
  color: var(--wa-green-dark);
  display: flex;
  align-items: center;
  justify-content: center;
}

.success-title {
  margin: 0 0 6px;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
}

.success-subtitle {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 0.94rem;
}

.dry-run-badge {
  display: inline-block;
  margin-bottom: 12px;
  padding: 4px 12px;
  border-radius: 999px;
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
  font-size: 0.8rem;
  font-weight: 700;
}

.summary-box {
  text-align: left;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 16px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px solid #e2e8f0;
  font-size: 0.92rem;
}

.summary-row:last-child {
  border-bottom: none;
}

.summary-key {
  color: var(--muted);
}

.summary-val {
  font-weight: 600;
  color: var(--text);
  word-break: break-word;
  text-align: right;
}

.summary-thumbs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 10px;
}

.summary-thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  display: block;
}

.dry-run-details {
  text-align: left;
  margin-bottom: 16px;
  font-size: 0.82rem;
  background: #f1f5f9;
  border-radius: 10px;
  padding: 10px 12px;
}

.dry-run-details pre {
  margin: 8px 0 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.76rem;
}

.btn-secondary {
  width: 100%;
  min-height: 48px;
  padding: 12px 18px;
  border-radius: 12px;
  border: 1.5px solid var(--brand-blue);
  background: #ffffff;
  color: var(--brand-blue);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-secondary:hover {
  background: #eff6ff;
}

.page-footer {
  margin-top: 18px;
  text-align: center;
  font-size: 0.82rem;
  color: #64748b;
}

.page-footer a {
  color: var(--muted);
  text-decoration: underline;
}

/* QR Poster Page */
.qr-page-wrap {
  min-height: 100vh;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.btn-action {
  min-height: 42px;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-action.primary {
  background: var(--brand-blue);
  border-color: var(--brand-blue);
  color: #ffffff;
}

.btn-action.orange {
  background: var(--brand-orange);
  border-color: var(--brand-orange);
  color: #ffffff;
}

.poster-card {
  width: 100%;
  max-width: 620px;
  background: #ffffff;
  border: 2px solid #0f172a;
  border-radius: 20px;
  padding: 36px 32px;
  text-align: center;
  box-shadow: var(--shadow);
}

.poster-logo {
  max-width: 240px;
  max-height: 110px;
  width: auto;
  height: auto;
  margin: 0 auto 20px;
  display: block;
}

.poster-headlines {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0 0 26px;
}

.poster-headline {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.3;
}

.poster-headline-lang {
  margin: 0;
  padding-top: 12px;
  border-top: 1px solid #e2e8f0;
  font-size: 1.2rem;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.35;
}

.poster-headline-zh {
  font-size: 1.3rem;
  line-height: 1.4;
}

.qr-frame {
  display: inline-block;
  padding: 18px;
  background: #ffffff;
  border: 3px solid var(--brand-blue);
  border-radius: 18px;
  margin-bottom: 0;
}

.qr-box svg {
  display: block;
  width: 260px;
  height: 260px;
}

@media (max-width: 560px) {
  .phone-row {
    grid-template-columns: 112px 1fr;
  }
}

/* Drop-Off Category Chips, Stepper & Accessories */
.opt-tag {
  font-weight: 500;
  color: var(--muted);
  font-size: 0.84rem;
}

.chip-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.choice-chip,
.acc-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 10px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  text-align: center;
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.choice-chip-wide {
  grid-column: span 3;
}

.choice-chip input,
.acc-chip input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.choice-chip.is-selected {
  border-color: var(--brand-blue);
  background: #eff6ff;
  color: var(--brand-blue-dark);
  box-shadow: 0 0 0 2px rgba(0, 87, 231, 0.12);
}

.choice-chip:focus-within,
.acc-chip:focus-within {
  outline: 2px solid var(--brand-blue);
  outline-offset: 2px;
}

.custom-category-wrap {
  margin-top: 10px;
}

.items-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.items-label-row .form-label {
  margin-bottom: 0;
}

.items-total-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  background: #dbeafe;
  color: var(--brand-blue-dark);
  font-size: 0.78rem;
  font-weight: 700;
}

.item-qty-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.item-qty-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px 8px 14px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.item-qty-row.is-active {
  border-color: var(--brand-blue);
  background: #eff6ff;
  box-shadow: 0 0 0 2px rgba(0, 87, 231, 0.1);
}

.item-qty-name {
  font-size: 0.96rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
}

.item-qty-row.is-active .item-qty-name {
  color: var(--brand-blue-dark);
}

.qty-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.qty-stepper {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: #ffffff;
}

.qty-btn {
  width: 46px;
  height: 46px;
  border: none;
  background: #f8fafc;
  color: var(--text);
  font-size: 1.25rem;
  font-weight: 700;
  cursor: pointer;
}

.qty-btn:hover:not(:disabled) {
  background: #e2e8f0;
}

.qty-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.qty-input {
  width: 58px;
  height: 46px;
  border: none;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  text-align: center;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  outline: none;
  -moz-appearance: textfield;
}

.qty-stepper-compact .qty-btn {
  width: 40px;
  height: 40px;
  font-size: 1.2rem;
}

.qty-stepper-compact .qty-input {
  width: 48px;
  height: 40px;
  font-size: 1rem;
}

.qty-input.is-zero {
  color: #94a3b8;
  font-weight: 600;
}

.qty-input::-webkit-inner-spin-button,
.qty-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.qty-hint {
  font-size: 0.88rem;
  color: var(--muted);
}

.acc-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.acc-chip {
  min-height: 38px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 600;
}

.acc-chip.is-selected {
  border-color: var(--brand-orange);
  background: #fff7ed;
  color: #c2410c;
}

.remarks-input {
  min-height: 44px;
  font-size: 0.94rem;
}

.remarks-textarea {
  min-height: 70px;
  resize: vertical;
  font-family: inherit;
  font-size: 0.96rem;
}

.receipt-banner {
  background: linear-gradient(135deg, #eff6ff 0%, #f8fafc 100%);
  border: 1.5px solid #bfdbfe;
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 14px;
}

.receipt-banner-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  color: var(--brand-blue-dark);
}

.receipt-banner-num {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: 0.02em;
}

.receipt-banner-time {
  font-size: 0.84rem;
  color: var(--muted);
}

/* Staff Log (/admin) */
.admin-page-wrap {
  min-height: 100vh;
  padding: 20px 16px 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.admin-login-card {
  margin-top: 24px;
}

.alert-warning {
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
  font-size: 0.88rem;
}

.admin-shell {
  width: 100%;
  max-width: 1040px;
}

.admin-topbar {
  background: var(--card);
  border: 1px solid #e2e8f0;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.admin-brand-logo {
  height: 46px;
  width: auto;
  object-fit: contain;
}

.admin-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text);
}

.admin-subtitle {
  margin: 2px 0 0;
  font-size: 0.86rem;
  color: var(--muted);
}

.admin-topbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.btn-action.danger {
  color: var(--danger-text);
  border-color: var(--danger-border);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.stat-card {
  background: var(--card);
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  padding: 12px 14px;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.stat-card.is-active {
  border-color: var(--brand-blue);
  background: #eff6ff;
}

.stat-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
}

.stat-value {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text);
}

.cat-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
}

.cat-pill.is-active {
  background: var(--brand-blue);
  border-color: var(--brand-blue);
  color: #ffffff;
}

.cat-count {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  font-size: 0.76rem;
}

.cat-pill.is-active .cat-count {
  background: rgba(255, 255, 255, 0.25);
}

.admin-toolbar {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}

.admin-search,
.admin-select {
  min-height: 44px;
  font-size: 0.92rem;
}

.records-meta {
  font-size: 0.86rem;
  color: var(--muted);
  margin-bottom: 10px;
  font-weight: 600;
}

.records-empty {
  background: var(--card);
  border: 1px dashed var(--border);
  border-radius: 14px;
  padding: 32px 20px;
  text-align: center;
  color: var(--muted);
  font-weight: 600;
}

.records-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.record-card {
  background: var(--card);
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  padding: 14px;
  display: grid;
  grid-template-columns: 92px 1fr 180px;
  gap: 14px;
  align-items: center;
}

.record-thumb-btn {
  position: relative;
  padding: 0;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #f1f5f9;
  width: 92px;
  height: 92px;
  overflow: hidden;
  cursor: pointer;
}

.record-thumb-count {
  position: absolute;
  right: 4px;
  bottom: 4px;
  background: rgba(15, 23, 42, 0.78);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 999px;
  line-height: 1.2;
}

.record-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.record-main {
  min-width: 0;
}

.record-top-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.record-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.receipt-badge,
.cat-badge,
.status-badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
}

.receipt-badge {
  background: #e2e8f0;
  color: #0f172a;
}

.cat-badge {
  background: #dbeafe;
  color: #1e40af;
}

.status-badge.status-received {
  background: #fef3c7;
  color: #92400e;
}

.status-badge.status-in_progress {
  background: #e0f2fe;
  color: #075985;
}

.status-badge.status-ready {
  background: #dcfce7;
  color: #166534;
}

.status-badge.status-collected {
  background: #f1f5f9;
  color: #475569;
}

.record-time {
  font-size: 0.82rem;
  color: var(--muted);
}

.record-customer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.record-name {
  font-size: 1rem;
  color: var(--text);
}

.record-wa-link {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--wa-green-dark);
  text-decoration: underline;
}

.record-notes-line,
.record-staff-note {
  margin: 3px 0 0;
  font-size: 0.86rem;
  color: var(--muted);
  word-break: break-word;
}

.record-staff-note {
  color: #0369a1;
  font-weight: 600;
}

.record-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.record-status-select {
  min-height: 40px;
  font-size: 0.88rem;
  padding: 6px 10px;
}

.record-detail-btn {
  width: 100%;
  min-height: 38px;
  font-size: 0.84rem;
}

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 1000;
}

.modal-card {
  width: 100%;
  max-width: 560px;
  max-height: 92vh;
  overflow-y: auto;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.25);
  padding: 20px;
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.modal-title {
  margin: 6px 0 0;
  font-size: 1.15rem;
  color: var(--text);
}

.modal-close {
  border: none;
  background: #f1f5f9;
  color: var(--text);
  width: 36px;
  height: 36px;
  border-radius: 999px;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.modal-photo {
  width: 100%;
  max-height: 340px;
  object-fit: contain;
  border-radius: 12px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  margin-bottom: 8px;
}

.modal-photo-counter {
  text-align: center;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 8px;
}

.modal-photo-strip {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 14px;
}

.modal-thumb-btn {
  flex: 0 0 auto;
  width: 64px;
  height: 64px;
  padding: 0;
  border: 2px solid #cbd5e1;
  border-radius: 10px;
  overflow: hidden;
  background: #f1f5f9;
  cursor: pointer;
}

.modal-thumb-btn.is-active {
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 2px rgba(0, 87, 231, 0.2);
}

.modal-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.modal-meta-grid {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 14px;
}

.modal-meta-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 5px 0;
  border-bottom: 1px solid #e2e8f0;
  font-size: 0.88rem;
}

.modal-meta-row:last-child {
  border-bottom: none;
}

.modal-meta-key {
  color: var(--muted);
}

.modal-meta-val {
  font-weight: 600;
  color: var(--text);
  text-align: right;
  word-break: break-word;
}

.modal-notes-group {
  margin-bottom: 10px;
}

.modal-textarea {
  min-height: 84px;
  resize: vertical;
  font-family: inherit;
}

.modal-save-msg {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--wa-green-dark);
  margin-bottom: 10px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

@media (max-width: 820px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .admin-toolbar {
    grid-template-columns: 1fr 1fr;
  }
  .record-card {
    grid-template-columns: 80px 1fr;
  }
  .record-controls {
    grid-column: span 2;
    flex-direction: row;
  }
}

@media (max-width: 480px) {
  .chip-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .choice-chip-wide {
    grid-column: span 2;
  }
  .admin-toolbar {
    grid-template-columns: 1fr;
  }
}

@media print {
  body {
    background: #ffffff !important;
  }
  .no-print {
    display: none !important;
  }
  .qr-page-wrap {
    padding: 0;
    min-height: auto;
  }
  .poster-card {
    box-shadow: none;
    max-width: 100%;
    width: 100%;
    border: 2px solid #000000;
    page-break-inside: avoid;
  }
  .qr-box svg {
    width: 300px;
    height: 300px;
  }
}