:root {
  color-scheme: light;
  --ink: #17222b;
  --muted: #5f6a70;
  --line: #d8ded8;
  --paper: #fbfaf6;
  --panel: #ffffff;
  --forest: #1f4d3a;
  --forest-dark: #183a2d;
  --amber: #f7e7b1;
  --blue: #dfe8f7;
  --green: #dfeeda;
  --stone: #e3e1dd;
  --silver: #eeeeee;
  --taupe: #dad5d2;
  --sky: #ccdcf5;
  --danger: #b94733;
  --danger-soft: #f8ded8;
  --wait: #8a6617;
  --wait-soft: #fff1c7;
  --done: #235e46;
  --done-soft: #dceee3;
  --shadow: 0 10px 30px rgba(23, 34, 43, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
}

[hidden] {
  display: none !important;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  background: var(--forest);
  color: white;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  font-weight: 700;
}

button:hover {
  background: var(--forest-dark);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

a {
  color: var(--forest);
  font-weight: 800;
}

svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 48px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(1180px, calc(100% - 32px));
  margin: 24px auto 18px;
  padding: 12px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand-logo {
  width: 76px;
  height: 76px;
  display: block;
  flex: 0 0 auto;
  object-fit: contain;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: 1.6rem;
  line-height: 1.15;
}

h2 {
  font-size: 1.25rem;
  line-height: 1.2;
}

h3 {
  font-size: 1rem;
}

.brand p,
.section-head p {
  color: var(--muted);
  margin-top: 4px;
}

.tabs,
.toolbar,
.notice-row,
.login-row,
.dialog-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.tab,
.secondary-button,
.icon-button,
.filter-button,
.button-link {
  background: white;
  color: var(--ink);
  border: 1px solid var(--line);
}

.button-link {
  min-height: 42px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  font-weight: 800;
  text-decoration: none;
}

.secondary-link {
  min-height: 38px;
}

.tab.is-active,
.filter-button.is-active {
  border-color: var(--forest);
  background: var(--forest);
  color: white;
}

.icon-button {
  width: 42px;
  padding: 0;
}

.summary-band {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--line);
  box-shadow: var(--shadow);
}

body[data-admin="true"] .summary-band {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

body[data-view="helper"] .summary-band {
  display: none;
}

.stat {
  background: white;
  padding: 18px;
}

.stat span {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 6px;
}

.stat strong {
  font-size: 2rem;
  line-height: 1;
}

.pending-stat strong {
  color: var(--wait);
}

.view {
  display: none;
  margin-top: 26px;
}

.view.is-active {
  display: block;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 16px;
}

.notice-row {
  margin-bottom: 18px;
}

.status-pill {
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.85rem;
  font-weight: 800;
  border: 1px solid transparent;
}

.status-pill.ok {
  background: white;
  border-color: var(--line);
}

.status-pill.wait {
  color: var(--wait);
  background: var(--wait-soft);
}

.status-pill.done {
  color: var(--done);
  background: var(--done-soft);
}

.shift-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.shift-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.shift-card.is-occupied {
  background: #f7f7f5;
  box-shadow: none;
}

.shift-card.is-occupied .shift-card-head {
  opacity: 0.78;
}

.shift-card.is-occupied .count-badge {
  color: var(--muted);
}

.shift-card[data-accent="amber"] .shift-card-head {
  background: var(--amber);
}

.shift-card[data-accent="blue"] .shift-card-head {
  background: var(--blue);
}

.shift-card[data-accent="green"] .shift-card-head {
  background: var(--green);
}

.shift-card[data-accent="stone"] .shift-card-head {
  background: var(--stone);
}

.shift-card[data-accent="silver"] .shift-card-head {
  background: var(--silver);
}

.shift-card[data-accent="taupe"] .shift-card-head {
  background: var(--taupe);
}

.shift-card[data-accent="sky"] .shift-card-head {
  background: var(--sky);
}

.shift-card-head {
  min-height: 94px;
  padding: 16px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
}

.shift-card-head p {
  color: var(--muted);
  margin-top: 6px;
}

.count-badge {
  flex: 0 0 auto;
  min-width: 78px;
  text-align: center;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(23, 34, 43, 0.12);
  border-radius: 8px;
  padding: 8px;
  font-weight: 900;
}

.shift-card-body {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.occupied-note {
  color: var(--muted);
  font-weight: 800;
}

.list-empty-state,
.occupied-shifts {
  grid-column: 1 / -1;
}

.occupied-shifts {
  margin-top: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: var(--shadow);
}

.occupied-shifts summary {
  min-height: 48px;
  cursor: pointer;
  padding: 14px 16px;
  color: var(--muted);
  font-weight: 900;
}

.occupied-shifts[open] summary {
  border-bottom: 1px solid var(--line);
}

.occupied-grid {
  padding: 16px;
}

.shift-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.public-shift-summary {
  grid-template-columns: 1fr;
}

.summary-item {
  min-height: 74px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: white;
}

.summary-item strong,
.summary-item small {
  display: block;
  overflow-wrap: anywhere;
}

.summary-item strong {
  color: var(--muted);
  line-height: 1.2;
}

.summary-item small {
  color: var(--muted);
  font-size: 0.86rem;
  margin-top: 4px;
}

.summary-item.is-open strong {
  color: var(--done);
}

.summary-item.is-full strong {
  color: var(--ink);
}

.summary-item.has-pending strong {
  color: var(--wait);
}

.request-block-button {
  width: 100%;
}

.info-band {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 24px;
  margin-top: 28px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
}

.info-band ul {
  margin: 12px 0 0;
  padding-left: 20px;
}

.info-band li + li {
  margin-top: 6px;
}

.contacts {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.contact-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.contact-row a {
  color: var(--forest);
  font-weight: 800;
  text-decoration: none;
}

.login-panel,
.admin-panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.login-panel {
  padding: 18px;
  max-width: 520px;
}

label {
  display: grid;
  gap: 7px;
  font-weight: 800;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  color: var(--ink);
  background: white;
}

textarea {
  resize: vertical;
}

.login-row {
  margin-top: 8px;
}

.login-row input {
  flex: 1 1 220px;
}

.admin-panels {
  display: grid;
  gap: 18px;
}

.helper-panels {
  display: grid;
  gap: 18px;
}

.helper-status-card {
  order: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-left: 8px solid var(--wait);
  border-radius: 8px;
  background: #fffdf3;
  box-shadow: var(--shadow);
}

.helper-status-card.is-active {
  border-left-color: var(--done);
  background: #edf8ef;
}

.helper-status-card.is-after {
  border-left-color: var(--muted);
  background: white;
}

.helper-status-card h3 {
  margin-top: 8px;
  font-size: 1.15rem;
}

.helper-status-card p {
  margin-top: 8px;
  color: var(--muted);
  font-weight: 750;
}

.helper-mode-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 0.84rem;
  font-weight: 900;
  background: var(--wait-soft);
  color: var(--wait);
}

.helper-mode-pill.is-active {
  background: var(--done-soft);
  color: var(--done);
}

.helper-mode-pill.is-after {
  background: var(--stone);
  color: var(--ink);
}

.helper-countdown {
  margin-top: 6px;
  font-size: clamp(2rem, 7vw, 3.9rem);
  line-height: 1;
  font-weight: 950;
  color: var(--ink);
}

.helper-status-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

body[data-helper-mode="before"] .helper-duty-panel {
  order: 1;
}

body[data-helper-mode="before"] .helper-faq-panel {
  order: 2;
}

body[data-helper-mode="before"] .helper-message-panel {
  order: 3;
}

body[data-helper-mode="before"] .helper-scan-panel {
  order: 4;
}

body[data-helper-mode="active"] .helper-faq-panel,
body[data-helper-mode="after"] .helper-faq-panel {
  order: 1;
}

body[data-helper-mode="active"] .helper-message-panel,
body[data-helper-mode="after"] .helper-message-panel {
  order: 2;
}

body[data-helper-mode="active"] .helper-scan-panel,
body[data-helper-mode="after"] .helper-scan-panel {
  order: 3;
}

body[data-helper-mode="active"] .helper-status-card {
  order: 4;
}

body[data-helper-mode="active"] .helper-duty-panel {
  order: 5;
}

body[data-helper-mode="after"] .helper-duty-panel {
  order: 4;
}

.admin-panel {
  padding: 18px;
}

.compact-head {
  margin-bottom: 12px;
}

.orga-checklist {
  display: grid;
  gap: 8px;
}

.orga-item {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(120px, 0.42fr) minmax(180px, 0.7fr);
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.orga-item.is-done {
  background: var(--done-soft);
}

.orga-check {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-weight: 850;
}

.orga-check input {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.orga-check strong,
.orga-check small {
  display: block;
}

.orga-check small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.orga-item.is-done .orga-check strong {
  text-decoration: line-through;
  text-decoration-thickness: 2px;
}

.orga-field {
  display: grid;
  gap: 4px;
}

.orga-field span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.orga-field input {
  min-height: 38px;
  padding: 8px 10px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
  margin-top: 14px;
}

.wide-field {
  grid-column: span 2;
}

.checkbox-label {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.checkbox-label input {
  width: 18px;
  height: 18px;
}

.helper-shifts,
.faq-list {
  display: grid;
  gap: 12px;
}

.helper-shifts {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mini-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--paper);
}

.mini-card p {
  color: var(--muted);
  margin-top: 5px;
}

.mini-card strong {
  color: var(--done);
}

.faq-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  background: var(--paper);
}

.faq-item summary {
  cursor: pointer;
  font-weight: 900;
}

.faq-item p {
  color: var(--muted);
  margin-top: 8px;
}

.faq-images {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.faq-image-card {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: white;
}

.faq-image-card a {
  display: block;
}

.faq-image-card img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.faq-image-card figcaption {
  padding: 8px 10px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.message-feed {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.message-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--paper);
}

.message-item.admin {
  border-left: 5px solid var(--forest);
}

.message-item.helper {
  border-left: 5px solid var(--wait);
}

.message-item strong,
.message-item small {
  display: block;
}

.message-item small {
  color: var(--muted);
  font-size: 0.84rem;
  margin-top: 2px;
}

.message-item p {
  margin-top: 8px;
  overflow-wrap: anywhere;
}

.message-form {
  display: grid;
  grid-template-columns: minmax(180px, 0.6fr) minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
  margin-top: 14px;
}

.scan-box {
  display: grid;
  gap: 12px;
}

.video-preview {
  width: min(420px, 100%);
  aspect-ratio: 4 / 3;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--ink);
  object-fit: cover;
}

.scan-result {
  min-height: 22px;
  color: var(--done);
  font-weight: 800;
}

.scan-result.is-error {
  color: var(--danger);
}

.voucher-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.voucher-card {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--paper);
}

.voucher-card p {
  color: var(--muted);
  margin-top: 4px;
  overflow-wrap: anywhere;
}

.voucher-card code {
  font-size: 0.86rem;
}

.voucher-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.whatsapp-link {
  background: #1f8f58;
  border-color: #1f8f58;
  color: white;
}

.whatsapp-link:hover {
  background: #176f44;
}

.qr-preview {
  width: 118px;
  height: 118px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.email-log {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.log-row {
  display: grid;
  grid-template-columns: 150px 110px minmax(0, 1fr);
  gap: 10px;
  border-bottom: 1px solid var(--line);
  padding: 9px 0;
}

.log-row span,
.log-row small {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.log-row small {
  grid-column: 3;
}

.request-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.request-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.request-item p {
  color: var(--muted);
  margin-top: 4px;
  overflow-wrap: anywhere;
}

.request-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.danger-button {
  background: var(--danger);
}

.danger-button:hover {
  background: #923321;
}

.empty-state {
  color: var(--muted);
  padding: 18px 0 4px;
}

.table-wrap {
  overflow-x: auto;
  margin-top: 14px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

th,
td {
  text-align: left;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 0.86rem;
}

td small {
  display: block;
  color: var(--muted);
  margin-top: 3px;
}

.table-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

dialog {
  width: min(520px, calc(100% - 24px));
  border: 0;
  border-radius: 8px;
  padding: 0;
  box-shadow: 0 20px 70px rgba(23, 34, 43, 0.28);
}

dialog::backdrop {
  background: rgba(23, 34, 43, 0.42);
}

.dialog-box {
  position: relative;
  display: grid;
  gap: 14px;
  padding: 24px;
  background: white;
}

.dialog-box p {
  color: var(--muted);
}

.dialog-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 38px;
  min-height: 38px;
  padding: 0;
  background: white;
  color: var(--ink);
  border: 1px solid var(--line);
}

.dialog-actions {
  justify-content: flex-end;
  margin-top: 4px;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: min(420px, calc(100% - 36px));
  min-height: 44px;
  display: none;
  align-items: center;
  padding: 12px 14px;
  border-radius: 8px;
  background: var(--ink);
  color: white;
  box-shadow: var(--shadow);
  z-index: 20;
}

.toast.is-visible {
  display: flex;
}

.toast.is-error {
  background: var(--danger);
}

.redeem-overlay {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(23, 34, 43, 0.68);
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
  transition: opacity 220ms ease;
}

.redeem-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.redeem-overlay.is-success::before,
.redeem-overlay.is-success::after {
  content: "";
  position: absolute;
  inset: -12%;
  opacity: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 12% 24%, #ffc629 0 6px, transparent 7px),
    radial-gradient(circle at 24% 76%, #1f8f58 0 5px, transparent 6px),
    radial-gradient(circle at 42% 16%, #2f8bd6 0 6px, transparent 7px),
    radial-gradient(circle at 58% 82%, #ffc629 0 7px, transparent 8px),
    radial-gradient(circle at 73% 28%, #ffffff 0 5px, transparent 6px),
    radial-gradient(circle at 88% 70%, #ff7a45 0 6px, transparent 7px);
  animation: confetti-fall 3s ease-out forwards;
}

.redeem-overlay.is-success::after {
  transform: rotate(12deg);
  animation-delay: 120ms;
}

.redeem-overlay.is-error::before {
  content: "!";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(185, 71, 51, 0.34);
  font-size: min(64vw, 520px);
  font-weight: 1000;
  line-height: 1;
  animation: alert-pulse 3s ease-out forwards;
}

.redeem-overlay-card {
  position: relative;
  z-index: 1;
  width: min(100%, 430px);
  min-height: 320px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 16px;
  padding: 38px 28px;
  text-align: center;
  background: #edf8ef;
  border: 3px solid #1f8f58;
  border-radius: 18px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.32);
  overflow: hidden;
  transform: scale(0.94);
  transition: transform 220ms ease;
}

.redeem-overlay.is-visible .redeem-overlay-card {
  transform: scale(1);
}

.redeem-overlay.is-error .redeem-overlay-card {
  background: #fff0ef;
  border-color: var(--danger);
}

.redeem-burst {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

.redeem-overlay.is-success .redeem-burst {
  opacity: 1;
  background:
    linear-gradient(45deg, transparent 48%, rgba(255, 198, 41, 0.55) 49% 51%, transparent 52%) 8% 16% / 38px 38px,
    linear-gradient(-45deg, transparent 48%, rgba(31, 143, 88, 0.35) 49% 51%, transparent 52%) 88% 22% / 34px 34px,
    radial-gradient(circle at 20% 82%, rgba(47, 139, 214, 0.42) 0 8px, transparent 9px),
    radial-gradient(circle at 78% 78%, rgba(255, 122, 69, 0.38) 0 9px, transparent 10px);
  animation: confetti-pop 3s ease-out forwards;
}

.redeem-icon {
  width: 108px;
  height: 108px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #1f8f58;
  color: white;
  box-shadow: 0 16px 28px rgba(31, 77, 58, 0.25);
}

.redeem-overlay.is-error .redeem-icon {
  background: var(--danger);
  box-shadow: 0 16px 28px rgba(185, 71, 51, 0.25);
}

.redeem-icon svg {
  width: 62px;
  height: 62px;
  stroke-width: 3;
}

.redeem-overlay h2 {
  font-size: clamp(2rem, 8vw, 3.4rem);
  line-height: 1;
}

.redeem-overlay p {
  max-width: 32ch;
  color: var(--muted);
  font-size: 1.1rem;
  font-weight: 850;
  line-height: 1.35;
}

@keyframes confetti-fall {
  0% {
    opacity: 0;
    transform: translateY(-42px) scale(0.98);
  }

  14% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translateY(70px) scale(1.04);
  }
}

@keyframes confetti-pop {
  0% {
    opacity: 0;
    transform: scale(0.8);
  }

  16% {
    opacity: 1;
    transform: scale(1);
  }

  100% {
    opacity: 0;
    transform: scale(1.08);
  }
}

@keyframes alert-pulse {
  0% {
    opacity: 0;
    transform: scale(0.82);
  }

  14% {
    opacity: 1;
    transform: scale(1);
  }

  100% {
    opacity: 0;
    transform: scale(1.08);
  }
}

@media (max-width: 860px) {
  .topbar,
  .section-head,
  .info-band {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar,
  .section-head {
    display: flex;
  }

  .summary-band,
  .shift-groups,
  .info-band {
    grid-template-columns: 1fr;
  }

  .orga-item {
    grid-template-columns: 1fr;
  }

  body[data-admin="true"] .summary-band {
    grid-template-columns: 1fr;
  }

  .tabs,
  .toolbar {
    width: 100%;
  }

  .tab,
  .filter-button {
    flex: 1 1 130px;
  }

  .shift-summary {
    grid-template-columns: 1fr;
  }

  .request-item {
    grid-template-columns: 1fr;
  }

  .request-actions {
    justify-content: flex-start;
  }

  .helper-shifts,
  .faq-images,
  .voucher-grid,
  .form-grid,
  .message-form {
    grid-template-columns: 1fr;
  }

  .helper-status-card {
    grid-template-columns: 1fr;
  }

  .helper-status-actions {
    justify-content: flex-start;
  }

  .wide-field {
    grid-column: auto;
  }

  .voucher-card {
    grid-template-columns: 96px minmax(0, 1fr);
  }

  .qr-preview {
    width: 96px;
    height: 96px;
  }

  .log-row {
    grid-template-columns: 1fr;
  }

  .log-row small {
    grid-column: auto;
  }
}

@media (max-width: 520px) {
  main,
  .topbar {
    width: min(100% - 20px, 1180px);
  }

  .brand {
    align-items: flex-start;
  }

  .brand-logo {
    width: 58px;
    height: 58px;
  }

  h1 {
    font-size: 1.3rem;
  }

  .summary-band {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body[data-admin="true"] .summary-band {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stat {
    padding: 14px;
  }

  .redeem-overlay {
    padding: 18px;
  }

  .redeem-overlay-card {
    min-height: 286px;
    padding: 30px 20px;
  }

  .redeem-icon {
    width: 92px;
    height: 92px;
  }

  .redeem-icon svg {
    width: 54px;
    height: 54px;
  }
}
