/* ===================================================================
   SBOG Acties — Main Stylesheet
   =================================================================== */

/* ------------------------------------------------------------------ */
/*  Reset & Base                                                       */
/* ------------------------------------------------------------------ */

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

:root {
  --clr-primary: #2563eb;
  --clr-primary-light: #dbeafe;
  --clr-success: #16a34a;
  --clr-success-light: #dcfce7;
  --clr-danger: #dc2626;
  --clr-danger-light: #fee2e2;
  --clr-warning: #d97706;
  --clr-warning-light: #fef3c7;
  --clr-dark: #1e293b;
  --clr-text: #334155;
  --clr-muted: #64748b;
  --clr-border: #e2e8f0;
  --clr-bg: #f8fafc;
  --clr-card: #ffffff;
  --radius: 8px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07), 0 2px 4px rgba(0, 0, 0, 0.06);
}

html {
  font-size: 16px;
  touch-action: manipulation;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
    Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
  color: var(--clr-text);
  background: var(--clr-bg);
  line-height: 1.5;
  min-height: 100vh;
}

h1, h2, h3, h4 {
  color: var(--clr-dark);
  line-height: 1.3;
}

a {
  color: var(--clr-primary);
  text-decoration: none;
}

/* ------------------------------------------------------------------ */
/*  Utility                                                            */
/* ------------------------------------------------------------------ */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.hidden { display: none !important; }

/* ------------------------------------------------------------------ */
/*  Layout                                                             */
/* ------------------------------------------------------------------ */

.page {
  display: none;
  min-height: 100vh;
}
.page.active {
  display: block;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ------------------------------------------------------------------ */
/*  Top Bar                                                            */
/* ------------------------------------------------------------------ */

.topbar {
  background: var(--clr-card);
  border-bottom: 1px solid var(--clr-border);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.topbar__left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar__title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--clr-dark);
}

.topbar__event {
  font-size: 0.875rem;
  color: var(--clr-muted);
}

.topbar__right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar__user {
  font-size: 0.875rem;
  color: var(--clr-muted);
}

.topbar__user strong {
  color: var(--clr-dark);
}

/* ------------------------------------------------------------------ */
/*  Buttons                                                            */
/* ------------------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
  font-family: inherit;
  line-height: 1.4;
}

.btn:focus-visible {
  outline: 2px solid var(--clr-primary);
  outline-offset: 2px;
}

.btn--primary {
  background: var(--clr-primary);
  color: #fff;
}
.btn--primary:hover {
  background: #1d4ed8;
}

.btn--success {
  background: var(--clr-success);
  color: #fff;
}
.btn--success:hover {
  background: #15803d;
}

.btn--danger {
  background: var(--clr-danger);
  color: #fff;
}
.btn--danger:hover {
  background: #b91c1c;
}

.btn--outline {
  background: transparent;
  border-color: var(--clr-border);
  color: var(--clr-text);
}
.btn--outline:hover {
  background: var(--clr-bg);
  border-color: var(--clr-muted);
}

.btn--ghost {
  background: transparent;
  color: var(--clr-muted);
  padding: 6px 10px;
}
.btn--ghost:hover {
  color: var(--clr-dark);
  background: var(--clr-bg);
}

.btn--sm {
  padding: 4px 10px;
  font-size: 0.8125rem;
}

.btn--lg {
  padding: 12px 24px;
  font-size: 1rem;
}

.btn--block {
  width: 100%;
}

/* Round +/- buttons */
.btn-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--clr-border);
  background: var(--clr-card);
  font-size: 1.25rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
  line-height: 1;
}

.btn-count:active {
  transform: scale(0.92);
}

.btn-count--plus {
  border-color: var(--clr-success);
  color: var(--clr-success);
}
.btn-count--plus:hover {
  background: var(--clr-success-light);
}

.btn-count--minus {
  border-color: var(--clr-danger);
  color: var(--clr-danger);
}
.btn-count--minus:hover {
  background: var(--clr-danger-light);
}

.btn-count:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* ------------------------------------------------------------------ */
/*  Card                                                               */
/* ------------------------------------------------------------------ */

.card {
  background: var(--clr-card);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.card__header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--clr-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card__header h3 {
  font-size: 1rem;
  font-weight: 700;
}

.card__body {
  padding: 20px;
}

.card--flex {
  display: flex;
  flex-direction: column;
}

.card__body--flex {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* ------------------------------------------------------------------ */
/*  District Page Layout                                               */
/* ------------------------------------------------------------------ */

.district-page {
  padding-top: 24px;
  padding-bottom: 40px;
}

/* Stat strip */
.stat-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-box {
  background: var(--clr-card);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
}

.stat-box__label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--clr-muted);
  margin-bottom: 4px;
}

.stat-box__value {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--clr-dark);
}

.stat-box--highlight .stat-box__value {
  color: var(--clr-primary);
}

.stat-box--warning .stat-box__value {
  color: var(--clr-warning);
}

/* Description block */
.district-description {
  background: var(--clr-primary-light);
  border-left: 4px solid var(--clr-primary);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 14px 18px;
  margin-bottom: 24px;
  font-size: 0.9rem;
  white-space: pre-line;
  color: var(--clr-dark);
}

.district-map-wrap {
  margin-bottom: 20px;
}

.district-map {
  width: 100%;
  height: 320px;
  border-radius: var(--radius);
  border: 1px solid var(--clr-border);
  z-index: 1;
}

.route-marker {
  background: #2563eb;
  color: #fff;
  border-radius: 50%;
  width: 28px !important;
  height: 28px !important;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,.3);
}

.route-marker span {
  line-height: 1;
}

.street-tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  background: var(--clr-bg);
  border: 1px solid var(--clr-border);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--clr-dark);
  white-space: nowrap;
}

/* Two-column layout */
.district-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

@media (max-width: 860px) {
  .district-grid {
    grid-template-columns: 1fr;
  }
}

.district-grid__main {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.district-grid__side {
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: relative;
}

/* On two-column layout, make the log card fill the row height set by the left column */
@media (min-width: 861px) {
  .district-grid__side > .card--flex {
    position: absolute;
    inset: 0;
  }
}

/* ------------------------------------------------------------------ */
/*  Items List                                                         */
/* ------------------------------------------------------------------ */

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

.item-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--clr-bg);
  border-radius: var(--radius);
  transition: background 0.15s;
}

.item-row:hover {
  background: #f1f5f9;
}

.item-row__info {
  flex: 1;
  min-width: 0;
}

.item-row__name {
  font-weight: 600;
  color: var(--clr-dark);
}

.item-row__price {
  font-size: 0.8125rem;
  color: var(--clr-muted);
}

.item-row__count {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--clr-primary);
  min-width: 48px;
  text-align: center;
}

.item-row__count-block {
  text-align: center;
  min-width: 64px;
}

.item-row__count-block .item-row__count {
  min-width: auto;
}

.item-row__count-detail {
  font-size: 0.7rem;
  color: var(--clr-muted);
  white-space: nowrap;
}

.item-row__controls {
  display: flex;
  gap: 8px;
}

/* Sell buttons (cash / QR) */
.btn-sell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 44px;
  border-radius: var(--radius);
  border: 2px solid var(--clr-border);
  background: var(--clr-card);
  font-size: 1.15rem;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
  line-height: 1;
}

.btn-sell:active {
  transform: scale(0.92);
}

.btn-sell--cash {
  border-color: var(--clr-success);
}
.btn-sell--cash:hover:not(:disabled) {
  background: var(--clr-success-light);
}

.btn-sell--qr {
  border-color: var(--clr-primary);
}
.btn-sell--qr:hover:not(:disabled) {
  background: var(--clr-primary-light);
}

.btn-sell:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* ------------------------------------------------------------------ */
/*  Tips                                                               */
/* ------------------------------------------------------------------ */

.tips-form {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.tips-form input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid var(--clr-border);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: inherit;
}

.tips-form input:focus {
  outline: none;
  border-color: var(--clr-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.tips-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 200px;
  overflow-y: auto;
}

.tip-entry {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: var(--clr-bg);
  border-radius: 4px;
  font-size: 0.8125rem;
}

.tip-entry__amount {
  font-weight: 700;
}

.tip-entry__amount--positive {
  color: var(--clr-success);
}

.tip-entry__amount--negative {
  color: var(--clr-danger);
}

.tip-entry__meta {
  color: var(--clr-muted);
}

.tips-total {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--clr-border);
  font-weight: 700;
  text-align: right;
  font-size: 0.9rem;
}

/* ------------------------------------------------------------------ */
/*  Activity Log                                                       */
/* ------------------------------------------------------------------ */

.activity-log {
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
  padding: 12px;
  flex: 1;
  min-height: 0;
}

.log-entry {
  padding: 10px 14px;
  border-left: 3px solid var(--clr-primary);
  background: var(--clr-bg);
  border-radius: 0 4px 4px 0;
  font-size: 0.8125rem;
  line-height: 1.5;
}

.log-entry__time {
  color: var(--clr-muted);
  font-size: 0.75rem;
  margin-right: 6px;
}

.log-entry__user {
  font-weight: 700;
  color: var(--clr-primary);
  margin-right: 6px;
}

.log-entry__action {
  color: var(--clr-dark);
}

/* ------------------------------------------------------------------ */
/*  Bottom Actions Bar                                                 */
/* ------------------------------------------------------------------ */

.bottom-actions {
  margin-top: 32px;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.bottom-actions__left,
.bottom-actions__right {
  display: flex;
  gap: 10px;
}

/* ------------------------------------------------------------------ */
/*  Modal                                                              */
/* ------------------------------------------------------------------ */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
}

.modal-backdrop.hidden {
  display: none;
}

.modal {
  background: var(--clr-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  max-width: 480px;
  width: 90%;
  max-height: 85vh;
  overflow-y: auto;
}

.modal__header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--clr-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal__header h2 {
  font-size: 1.125rem;
}

.modal__body {
  padding: 24px 20px;
  text-align: center;
}

.modal__body img {
  max-width: 100%;
  border-radius: var(--radius);
}

.modal__body--left {
  text-align: left;
}

.modal__body--left p {
  white-space: pre-line;
  line-height: 1.6;
  color: var(--clr-text);
}

.modal__footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 20px;
  border-top: 1px solid var(--clr-border);
}

.modal__footer--wrap {
  flex-wrap: wrap;
}

.modal--popup {
  animation: modalSlideIn 0.18s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-16px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ------------------------------------------------------------------ */
/*  Badge                                                              */
/* ------------------------------------------------------------------ */

.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge--active {
  background: var(--clr-success-light);
  color: var(--clr-success);
}

.badge--closed {
  background: var(--clr-danger-light);
  color: var(--clr-danger);
}

.badge--open {
  background: var(--clr-primary-light);
  color: var(--clr-primary);
}

.badge--upcoming {
  background: var(--clr-primary-light);
  color: var(--clr-primary);
}

/* Synthetic demo data — deliberately attention-grabbing so it is never mistaken
   for the real member list. */
.badge--demo {
  background: var(--clr-warning-light);
  color: var(--clr-warning);
}

/* Sync freshness. Deliberately quiet: it is reassurance while everything works,
   not a status the volunteer needs to read. It only earns attention when it says
   something is wrong, which the JS controls by wording rather than styling. */
.badge--sync {
  background: var(--clr-surface-alt, rgba(0, 0, 0, 0.06));
  color: var(--clr-muted, #6b7280);
  font-weight: 400;
}

/* Hidden rather than emptied: an empty badge still occupies the row and shifts
   the layout between renders, which reads as a glitch on every poll. */
.badge--sync:empty {
  display: none;
}

/* ------------------------------------------------------------------ */
/*  Responsive                                                         */
/* ------------------------------------------------------------------ */

/* ------------------------------------------------------------------ */
/*  Form elements (login etc.)                                         */
/* ------------------------------------------------------------------ */

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

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--clr-dark);
}

.input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--clr-border);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: inherit;
  color: var(--clr-text);
  background: var(--clr-card);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.input:focus {
  outline: none;
  border-color: var(--clr-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.error-msg {
  margin-top: 14px;
  padding: 10px 14px;
  background: var(--clr-danger-light);
  color: var(--clr-danger);
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 600;
}

/* ------------------------------------------------------------------ */
/*  Event list (selection page)                                        */
/* ------------------------------------------------------------------ */

.event-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.event-card {
  background: var(--clr-card);
  border: 2px solid var(--clr-border);
  border-radius: var(--radius);
  padding: 18px 20px;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.event-card:hover {
  border-color: var(--clr-primary);
  box-shadow: var(--shadow-md);
}

.event-card h3 {
  margin-bottom: 4px;
  color: var(--clr-primary);
}

.event-card p {
  color: var(--clr-muted);
  font-size: 0.875rem;
  margin-bottom: 8px;
}

/* ------------------------------------------------------------------ */
/*  Admin Panel                                                        */
/* ------------------------------------------------------------------ */

.admin-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 2px solid var(--clr-border);
  margin-bottom: 24px;
}

.admin-tab {
  padding: 10px 20px;
  border: none;
  background: transparent;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--clr-muted);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: color 0.15s, border-color 0.15s;
  font-family: inherit;
}

.admin-tab:hover {
  color: var(--clr-dark);
}

.admin-tab--active {
  color: var(--clr-primary);
  border-bottom-color: var(--clr-primary);
}

.admin-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.admin-section-header h2 {
  font-size: 1.25rem;
}

/* Admin table */
.table-wrap {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.admin-table thead {
  background: var(--clr-bg);
}

.admin-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 700;
  color: var(--clr-dark);
  border-bottom: 2px solid var(--clr-border);
  white-space: nowrap;
}

.admin-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--clr-border);
  vertical-align: middle;
}

.admin-table tbody tr:hover {
  background: var(--clr-bg);
}

.admin-table .td-items,
.admin-table .td-desc {
  max-width: 200px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-table tfoot .report-totals td {
  background: var(--clr-bg);
  border-top: 2px solid var(--clr-border);
}

.action-btns {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* ---- Context menu (⋯ dropdown) ---- */
.ctx-menu-wrap {
  position: relative;
  flex-shrink: 0;
}

.ctx-menu-trigger {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--clr-border);
  border-radius: var(--radius);
  background: var(--clr-card);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  position: relative;
}

.ctx-menu-trigger::before {
  content: '';
  display: block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--clr-muted);
  box-shadow:
    0 -7px 0 var(--clr-muted),
    0  7px 0 var(--clr-muted);
  transition: background 0.15s, box-shadow 0.15s;
}

.ctx-menu-trigger:hover {
  background: var(--clr-primary-light);
  border-color: var(--clr-primary);
}

.ctx-menu-trigger:hover::before {
  background: var(--clr-primary);
  box-shadow:
    0 -7px 0 var(--clr-primary),
    0  7px 0 var(--clr-primary);
}

.ctx-menu {
  display: none;
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 4px;
  min-width: 180px;
  background: #fff;
  border: 1px solid var(--clr-border);
  border-radius: var(--radius);
  box-shadow: 0 4px 16px rgba(0,0,0,.12);
  z-index: 100;
  padding: 4px 0;
}

.ctx-menu.is-open {
  display: block;
}

.ctx-menu__item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 14px;
  border: none;
  background: none;
  font-size: 0.85rem;
  color: var(--clr-text);
  cursor: pointer;
  text-align: left;
  white-space: nowrap;
  transition: background 0.12s;
}

.ctx-menu__item:hover {
  background: var(--clr-primary-light);
}

.ctx-menu__item--danger {
  color: var(--clr-danger);
}

.ctx-menu__item--danger:hover {
  background: #fef2f2;
}

.ctx-menu__divider {
  height: 1px;
  background: var(--clr-border);
  margin: 4px 0;
}

/* ------------------------------------------------------------------ */
/*  District Cards (admin)                                              */
/* ------------------------------------------------------------------ */

.district-card-list {
  display: flex;
  flex-direction: column;
}

.district-card {
  padding: 14px 16px;
  border-bottom: 1px solid var(--clr-border);
}

.district-card:last-child {
  border-bottom: none;
}

.district-card__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.district-card__info {
  flex: 1;
  min-width: 0;
}

.district-card__title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}

.district-card__title strong {
  font-size: 0.95rem;
}

.district-card__desc {
  font-size: 0.8rem;
  color: var(--clr-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 280px;
}

.district-card__info--clickable {
  cursor: pointer;
  border-radius: var(--radius);
  padding: 4px 8px;
  margin: -4px -8px;
  transition: background 0.15s;
}

.district-card__info--clickable:hover {
  background: var(--clr-primary-light);
}

.district-card--clickable {
  cursor: pointer;
  transition: background 0.15s;
}

.district-card--clickable:hover {
  background: #f1f5f9;
}

.district-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-top: 8px;
  font-size: 0.8rem;
  color: var(--clr-text);
}

.district-card__meta-item {
  white-space: nowrap;
}

/* ------------------------------------------------------------------ */
/*  Report stat boxes                                                   */
/* ------------------------------------------------------------------ */

.report-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.report-stats--totals {
  gap: 10px;
  margin-top: 0;
}

.report-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 14px;
  background: var(--clr-bg);
  border-radius: var(--radius);
  border: 1px solid var(--clr-border);
  min-width: 80px;
  flex: 1;
}

.report-stats--totals .report-stat {
  padding: 12px 16px;
  background: var(--clr-card);
  box-shadow: var(--shadow-sm);
}

.report-stat--highlight {
  background: var(--clr-primary-light) !important;
  border-color: var(--clr-primary) !important;
}

.report-stat__label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--clr-muted);
  margin-bottom: 2px;
  white-space: nowrap;
}

.report-stat__value {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--clr-dark);
  white-space: nowrap;
}

@media (max-width: 600px) {
  .district-card__desc {
    max-width: 100%;
  }
}

/* Form rows (side-by-side fields) */
.form-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.form-row .form-group {
  min-width: 140px;
}

/* Item config rows in event form */
.item-config-row {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
  align-items: center;
}

.item-config-row .input {
  flex: 1;
}

.item-config-row .input:first-child {
  flex: 2;
}

/* Wide item config (name + price + payment link) */
.item-config-header {
  display: grid;
  grid-template-columns: 2fr 1fr 3fr 36px;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--clr-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.item-config-row-wide {
  display: grid;
  grid-template-columns: 2fr 1fr 3fr 36px;
  gap: 8px;
  margin-bottom: 8px;
  align-items: center;
}

/* V2 item config (name + price + link + group + units + delete) */
.item-config-header-v2 {
  display: grid;
  grid-template-columns: 2fr 80px 2fr 1.2fr 60px 56px 36px;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--clr-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.item-config-row-v2 {
  display: grid;
  grid-template-columns: 2fr 80px 2fr 1.2fr 60px 56px 36px;
  gap: 8px;
  margin-bottom: 8px;
  align-items: center;
}

/* "vrij" = the donor sets the amount (vrije gift), so price 0 is intentional. */
.item-cfg-free {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  color: var(--clr-muted);
  white-space: nowrap;
  cursor: pointer;
}

@media (max-width: 860px) {
  .item-config-header-v2,
  .item-config-row-v2 {
    grid-template-columns: 1fr 1fr;
  }
  .item-config-header-v2 {
    display: none;
  }
}

/* Item group header in district page (shared inventory) */
.item-group-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 16px;
  margin-top: 4px;
  background: var(--clr-primary-light);
  border-left: 3px solid var(--clr-primary);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 0.8125rem;
}

.item-group-header__name {
  font-weight: 700;
  color: var(--clr-dark);
}

.item-group-header__stock {
  color: var(--clr-muted);
}

.item-row--grouped {
  margin-left: 12px;
  border-left: 2px solid var(--clr-border);
}

/* Color utilities */
.clr-warning {
  color: var(--clr-warning);
}

/* ------------------------------------------------------------------ */
/*  Kascontrole result grid                                            */
/* ------------------------------------------------------------------ */

.kas-result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
}

.kas-result-item {
  text-align: center;
  padding: 12px;
  background: var(--clr-bg);
  border-radius: var(--radius);
}

.kas-result-item--highlight {
  background: var(--clr-primary-light);
  border: 2px solid var(--clr-primary);
}

.kas-result-label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--clr-muted);
  margin-bottom: 4px;
}

.kas-result-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--clr-dark);
}

/* ------------------------------------------------------------------ */
/*  Kascontrole denomination stepper                                    */
/* ------------------------------------------------------------------ */

.kas-denom-header {
  display: none;
}

.kas-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
  font-size: 0.9rem;
}

.kas-summary-row--muted {
  color: var(--clr-muted);
}

.kas-summary-row--border {
  padding-top: 8px;
  margin-bottom: 12px;
  border-top: 1px solid var(--clr-border);
}

.kas-summary-row--result {
  padding-top: 10px;
  margin-bottom: 0;
  border-top: 2px solid var(--clr-border);
  font-size: 1.1rem;
}

.kas-denom-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.kas-denom-list--grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.kas-denom-row {
  display: grid;
  grid-template-columns: 70px 1fr 80px;
  gap: 8px;
  align-items: center;
  padding: 6px 8px;
  background: var(--clr-bg);
  border-radius: var(--radius);
  transition: background 0.15s;
}

.kas-denom-row:hover {
  background: #f1f5f9;
}

.kas-denom-label {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--clr-dark);
}

.kas-denom-stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.kas-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--clr-border);
  background: var(--clr-card);
  font-size: 1.15rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.12s;
  font-family: inherit;
  line-height: 1;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.kas-btn:active {
  transform: scale(0.9);
}

.kas-btn--minus {
  border-color: var(--clr-danger);
  color: var(--clr-danger);
}

.kas-btn--minus:hover {
  background: var(--clr-danger-light);
}

.kas-btn--plus {
  border-color: var(--clr-success);
  color: var(--clr-success);
}

.kas-btn--plus:hover {
  background: var(--clr-success-light);
}

.kas-count {
  width: 52px;
  text-align: center;
  padding: 6px 4px;
  border: 1px solid var(--clr-border);
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 700;
  font-family: inherit;
  color: var(--clr-dark);
  background: var(--clr-card);
  -moz-appearance: textfield;
}

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

.kas-count:focus {
  outline: none;
  border-color: var(--clr-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.kas-count-readonly {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  text-align: center;
  padding: 6px 4px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--clr-dark);
}

.kas-subtotal {
  text-align: right;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--clr-muted);
}

@media (max-width: 400px) {
  .kas-denom-row {
    grid-template-columns: 55px 1fr 65px;
  }
  .kas-btn {
    width: 32px;
    height: 32px;
    font-size: 1rem;
  }
  .kas-count {
    width: 44px;
    font-size: 0.9rem;
  }
}

/* Select styling */
select.input {
  appearance: auto;
}

/* Textarea styling */
textarea.input {
  resize: vertical;
  min-height: 60px;
}

/* ------------------------------------------------------------------ */
/*  Responsive                                                         */
/* ------------------------------------------------------------------ */

@media (max-width: 600px) {
  .topbar {
    flex-wrap: wrap;
    gap: 4px 12px;
  }

  .topbar__left {
    flex-wrap: wrap;
    gap: 6px;
  }

  .topbar__right {
    gap: 8px;
  }

  .stat-strip {
    grid-template-columns: repeat(2, 1fr);
  }

  .btn-count {
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
  }

  .bottom-actions {
    flex-direction: column;
  }

  /* Modal: stack footer buttons vertically on small screens */
  .modal__footer {
    flex-direction: column-reverse;
  }

  .modal__footer .btn {
    width: 100%;
    min-height: 44px;
  }
}

/* ------------------------------------------------------------------ */
/*  Sale Reactions (floating +€ amounts)                                */
/* ------------------------------------------------------------------ */

.reactions-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  overflow: hidden;
}

.reaction-amount {
  position: absolute;
  bottom: 20vh;
  font-size: 1.3rem;
  font-weight: 800;
  color: #22c55e;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
  white-space: nowrap;
  animation: amountFloat var(--duration, 2.2s) ease-out forwards;
  will-change: transform, opacity;
  user-select: none;
}

@keyframes amountFloat {
  0% {
    opacity: 0;
    transform: translateY(0) scale(0.7);
  }
  12% {
    opacity: 1;
    transform: translateY(-2vh) scale(1.15);
  }
  35% {
    opacity: 1;
    transform: translateY(-18vh) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-50vh) scale(0.8);
  }
}

/* Sale flash on the total */
.report-stat--highlight .report-stat__value.flash {
  animation: salePulse 0.5s ease-out;
}

@keyframes salePulse {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.25); color: #22c55e; }
  100% { transform: scale(1); }
}

/* ------------------------------------------------------------------ */
/*  Login Carousel                                                      */
/* ------------------------------------------------------------------ */

.lc {
  max-width: 420px;
  margin: 0 auto;
  padding: 0 20px;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* ---- Header ---- */
.lc__header {
  padding-top: 48px;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lc__header .btn--ghost {
  align-self: flex-start;
  margin-bottom: 16px;
}

.lc__event {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--clr-dark);
  margin-bottom: 16px;
  text-align: center;
}

.lc__welcome {
  font-size: 0.875rem;
  color: var(--clr-muted);
  margin-bottom: 16px;
  text-align: center;
}

.lc__welcome strong {
  color: var(--clr-dark);
}

.lc__welcome-change {
  background: none;
  border: none;
  color: var(--clr-primary);
  font-size: 0.875rem;
  font-family: inherit;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
  margin-left: 4px;
}

.lc__welcome-change:hover {
  color: var(--clr-dark);
}

/* Step dots */
.lc__dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 8px;
}

.lc__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--clr-border);
  transition: background 0.3s, transform 0.3s;
}

.lc__dot--active {
  background: var(--clr-primary);
  transform: scale(1.4);
}

.lc__dot--done {
  background: var(--clr-success);
}

/* ---- Body / Track ---- */
.lc__body {
  flex: 1;
  overflow: hidden;
}

.lc__track {
  display: flex;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.lc__slide {
  width: 100%;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 4px 40px;
}

.lc__title {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 4px;
  text-align: center;
}

.lc__sub {
  color: var(--clr-muted);
  font-size: 0.9rem;
  margin-bottom: 28px;
  text-align: center;
}

.lc__input {
  width: 100%;
  max-width: 280px;
  padding: 14px 18px;
  border: 2px solid var(--clr-border);
  border-radius: var(--radius);
  font-size: 1.25rem;
  font-family: inherit;
  text-align: center;
  color: var(--clr-dark);
  background: var(--clr-card);
  transition: border-color 0.15s, box-shadow 0.15s;
  margin-bottom: 20px;
}

.lc__input:focus {
  outline: none;
  border-color: var(--clr-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* Wijk '5a' is the one wijk whose number is not purely digits. The field is a
   numeric keypad by default, so this is the escape hatch to a full keyboard. */
.lc__linkbtn {
  display: block;
  width: 100%;
  max-width: 280px;
  margin: -10px auto 14px;
  padding: 6px 4px;
  border: none;
  background: none;
  color: var(--clr-primary);
  font: inherit;
  font-size: 0.85rem;
  text-decoration: underline;
  cursor: pointer;
}

.lc__linkbtn:focus-visible {
  outline: 2px solid var(--clr-primary);
  outline-offset: 2px;
  border-radius: var(--radius);
}

.lc__error {
  width: 100%;
  max-width: 280px;
  margin-bottom: 12px;
  padding: 10px 14px;
  background: var(--clr-danger-light);
  color: var(--clr-danger);
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 600;
  text-align: center;
}

.lc__btn {
  max-width: 280px;
}

/* ---- PIN digit display ---- */
.pin-display {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 24px;
  min-height: 56px;
  align-items: center;
}

.pin-display__digit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 56px;
  border-radius: 12px;
  background: var(--clr-primary-light);
  border: 2px solid var(--clr-primary);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--clr-primary);
  animation: pinPop 0.2s ease-out;
}

.pin-display__placeholder {
  display: flex;
  gap: 12px;
}

.pin-display__placeholder span {
  display: block;
  width: 48px;
  height: 56px;
  border-radius: 12px;
  border: 2px dashed var(--clr-border);
  background: var(--clr-bg);
}

@keyframes pinPop {
  0%   { transform: scale(0.5); }
  60%  { transform: scale(1.25); }
  100% { transform: scale(1); }
}

/* ---- T9 PIN keypad ---- */
.pin-pad {
  display: grid;
  grid-template-columns: repeat(3, 76px);
  gap: 14px;
  justify-content: center;
  margin-bottom: 24px;
}

.pin-pad__key {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 76px;
  height: 76px;
  border: none;
  border-radius: var(--radius);
  background: #edf2f7;
  cursor: pointer;
  transition: background 0.1s, transform 0.1s;
  font-family: inherit;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  gap: 1px;
}

.pin-pad__key:active {
  background: var(--clr-primary-light);
  transform: scale(0.94);
}

.pin-pad__num {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--clr-dark);
  line-height: 1;
}

.pin-pad__letters {
  font-size: 0.55rem;
  font-weight: 600;
  color: var(--clr-muted);
  letter-spacing: 2px;
  text-transform: uppercase;
  line-height: 1;
}

.pin-pad__key--blank {
  visibility: hidden;
  cursor: default;
  background: transparent;
}

.pin-pad__key--fn {
  font-size: 1.3rem;
  color: var(--clr-muted);
  background: transparent;
}

.pin-pad__key--fn:active {
  background: var(--clr-bg);
}

.lc__slide--pin {
  padding-top: 16px;
}

.lc__slide--pin .lc__title {
  margin-bottom: 16px;
}

/* Bigger keypad & body on mobile */
@media (max-width: 480px) {
  .lc__header {
    padding-top: 32px;
  }

  .lc__title {
    font-size: 1.6rem;
  }

  .lc__sub {
    font-size: 1rem;
    margin-bottom: 32px;
  }

  .lc__input {
    font-size: 1.4rem;
    padding: 16px 20px;
    max-width: 100%;
  }

  .lc__btn {
    max-width: 100%;
    min-height: 52px;
    font-size: 1.05rem;
  }

  .pin-pad {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    width: 100%;
    max-width: 320px;
  }

  .pin-pad__key {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
  }

  .pin-pad__num {
    font-size: 1.6rem;
  }

  .pin-display__digit {
    width: 44px;
    height: 52px;
    font-size: 1.5rem;
  }

  .pin-display__placeholder span {
    width: 44px;
    height: 52px;
  }

  .lc__error {
    max-width: 100%;
  }
}



























/* ------------------------------------------------------------------ */
/*  Donateursactie — walk view (#7 §4)                                 */
/* ------------------------------------------------------------------ */

.walk-page { padding-top: 1rem; }

.walk-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 1rem;
}

.walk-search {
  flex: 1 1 220px;
  min-width: 180px;
  padding: 0.6rem 0.85rem;
  font-size: 1rem;
  font-family: inherit;
  color: var(--clr-text);
  background: var(--clr-card);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius);
}

.walk-search:focus {
  outline: none;
  border-color: var(--clr-primary);
  box-shadow: 0 0 0 3px var(--clr-primary-light);
}

.walk-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.walk-filter {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  font-family: inherit;
  font-weight: 500;
  color: var(--clr-text);
  background: var(--clr-card);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius);
  cursor: pointer;
}

.walk-filter:hover { border-color: var(--clr-muted); }

.walk-filter--active {
  color: #fff;
  background: var(--clr-primary);
  border-color: var(--clr-primary);
}

.walk-filter__count {
  font-variant-numeric: tabular-nums;
  opacity: 0.75;
}

.walk-row { cursor: pointer; transition: background 0.35s ease; }
.walk-row:hover { background: var(--clr-bg); }
.walk-row--done { background: var(--clr-success-light); }
.walk-row--done:hover { background: var(--clr-success-light); }

/* A row mid-flight during a reorder: lifted above its neighbours so the eye can
   follow the one row that moved instead of a wall of shifting rows. Kept as a
   class rather than a CSS animation because the list is re-rendered on every
   tap, which would restart the animation on every row. */
.walk-row--moved {
  position: relative;
  z-index: 2;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
  transition: background 0.35s ease, box-shadow 0.4s ease;
}

.walk-nr {
  min-width: 1.75rem;
  color: var(--clr-muted);
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

/* Status and the previous-years control share a line under the address, so the
   row stays two lines tall on a phone instead of growing a third column. */
.walk-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.6rem;
  margin-top: 0.2rem;
  font-size: 0.8125rem;
}

/* Last edition's result — opens the full history. Muted, because it is context
   and not the task at hand. */
.walk-prev-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.5rem;
  font-family: inherit;
  font-size: 0.8125rem;
  color: var(--clr-muted);
  background: var(--clr-card);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius);
  cursor: pointer;
  font-variant-numeric: tabular-nums;
}

.walk-prev-btn:hover { border-color: var(--clr-muted); color: var(--clr-text); }

.walk-prev-btn__year { font-weight: 600; }

.walk-prev-btn__chev { opacity: 0.6; }

.walk-prev-btn--given { color: var(--clr-success); }

.walk-prev-btn--exempt { font-style: italic; }

.walk-prev { color: var(--clr-muted); font-variant-numeric: tabular-nums; }
.walk-prev--given { color: var(--clr-success); font-weight: 600; }
.walk-prev--exempt { color: var(--clr-muted); font-style: italic; }
.walk-prev--none { opacity: 0.4; }

.walk-state { font-size: 0.8125rem; white-space: nowrap; }
.walk-state--donated { color: var(--clr-success); font-weight: 600; }
.walk-state--nothing { color: var(--clr-muted); }
.walk-state--not-home { color: var(--clr-warning); }
.walk-state--exempt { color: var(--clr-muted); font-style: italic; }
.walk-state--gone { color: var(--clr-danger); }
.walk-state--unknown { color: var(--clr-muted); opacity: 0.6; }

/* The amount, inline on the status line: bold enough to spot after a tap. */
.walk-amount {
  color: var(--clr-success);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* Controls: one price+💵 button per tier (records Contant in one tap), one shared
   💳 that asks which amount, then the two 'no sale' outcomes and undo. The 💳 is
   shared rather than per tier because the amount is the donor's choice at the
   door — that is what keeps this row at six buttons instead of eight. */
.walk-tiers,
.walk-outcomes {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

/* Wider than the 48px icon default because these carry a price, not a glyph. */
.walk-tiers .btn-sell {
  width: auto;
  min-width: 52px;
  padding: 0 8px;
  font-size: 0.9375rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* Tier chooser inside the Betaalverzoek dialog. */
.walk-qr-ask {
  margin-bottom: 0.75rem;
  font-size: 0.9375rem;
  color: var(--clr-text);
}

.walk-qr-tiers {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.walk-qr-tiers .btn {
  min-width: 88px;
  height: 52px;
  font-size: 1.125rem;
  font-weight: 700;
}

/* Free-gift amount step (a tier the donor prices). */
.walk-qr-amount-input {
  display: block;
  width: 100%;
  max-width: 200px;
  height: 52px;
  margin: 0 auto;
  text-align: center;
  font-size: 1.25rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* Reserved space: the hint appearing must not shift the buttons under the thumb. */
.walk-qr-hint {
  min-height: 1.25rem;
  margin-top: 0.5rem;
  font-size: 0.8125rem;
  color: var(--clr-danger, #c0392b);
}

.walk-action-none {
  font-size: 0.8125rem;
  color: var(--clr-muted);
  font-style: italic;
}

.walk-empty {
  padding: 1.5rem;
  text-align: center;
  color: var(--clr-muted);
}

/* QR / Betaalverzoek dialog contents */
.walk-qr-address {
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--clr-dark);
}

.walk-qr-link {
  margin-bottom: 1rem;
  font-size: 0.8125rem;
  color: var(--clr-muted);
  word-break: break-all;
}

.walk-qr-img {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  height: auto;
}

.walk-qr-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 20px;
  flex-wrap: wrap;
}

/* Per-address year strip (#7 §4B) */
/* Rows of the previous-years dialog. One per year, newest first, so a long
   history scrolls vertically instead of needing a sideways-scrolling table. */
.walk-modal__address {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.walk-hist-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 0.75rem;
}

.walk-hist-item {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.5rem 0.65rem;
  border-radius: var(--radius);
  background: var(--clr-bg);
  font-size: 0.9375rem;
}

.walk-hist-item__year {
  min-width: 3.25rem;
  color: var(--clr-muted);
  font-variant-numeric: tabular-nums;
}

.walk-hist-item__val { font-variant-numeric: tabular-nums; }

.walk-hist-item__val em {
  color: var(--clr-muted);
  font-style: normal;
  font-size: 0.8125rem;
  margin-left: 0.35rem;
}

.walk-hist--donated { background: var(--clr-success-light); color: var(--clr-success); font-weight: 600; }
.walk-hist--nothing { color: var(--clr-muted); }
.walk-hist--not-home { background: var(--clr-warning-light); color: var(--clr-warning); }
.walk-hist--exempt { background: var(--clr-bg); color: var(--clr-muted); font-style: italic; }
.walk-hist--gone { color: var(--clr-danger); }
.walk-hist--none { color: var(--clr-border); }

.walk-hist-summary {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  color: var(--clr-text);
}

/* Phones: the walk view is used standing on a doorstep.
   Five buttons (💵 | 💳 | x | ✉ | −) fit one 390px line at a tappable size, so
   the whole action set stays on a single line and more addresses fit per screen.
   Nothing is hidden — previous years, the status and the method all stay visible. */
@media (max-width: 720px) {
  .walk-row {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .walk-row .item-row__info { flex: 1 1 100%; }

  .walk-row .item-row__controls {
    flex: 1 1 100%;
    flex-wrap: nowrap;
    gap: 0.375rem;
    align-items: center;
  }

  /* No count block on a phone: the amount rides the status line instead, so the
     row is address + meta + one 46px button line and four fit per screen. */
  .walk-row .item-row__count-block { display: none; }

  .walk-tiers { flex: 0 0 auto; gap: 0.25rem; }
  .walk-outcomes { flex: 1 1 auto; gap: 0.25rem; }
  .walk-row .btn-sell { min-width: 44px; height: 46px; padding: 0 4px; font-size: 1rem; }
  /* Every button shares the line evenly so the five fit at 360px (the narrowest
     common phone) as well as at 390px+; fixed widths overflow at 360. */
  .walk-tiers .btn-sell { flex: 1 1 0; min-width: 44px; }
  .walk-outcomes .btn-sell { flex: 1 1 0; min-width: 44px; }
  .walk-outcomes .btn-count { flex: 1 1 0; min-width: 44px; width: auto; }
  /* The Paasactie's phone rule shrinks .btn-count to 40px, which is under the
     44px minimum touch target — override it for the walk row's undo button. */
  .walk-row .btn-count { height: 46px; }
}

@media (max-width: 520px) {
  .walk-filter { font-size: 0.8125rem; padding: 0.4rem 0.6rem; }

  /* The order number stays: it is how a volunteer matches the row to the list on
     paper, and it doubles as the row's leading anchor now the count block is
     gone. Narrower, smaller, not hidden. */
  .walk-nr { min-width: 1.25rem; font-size: 0.75rem; }

  .walk-meta { font-size: 0.75rem; }

  .walk-qr-img { width: 100%; max-width: 240px; }
}
