/* Management Connect – Web-Portal
   Aufbau: 1 Tokens · 2 Basis · 3 Layout · 4 Komponenten · 5 Seiten · 6 Hilfsklassen */

/* ==========================================================================
   1 Tokens
   ========================================================================== */

:root {
  --red: #ef381f;
  --red-hover: #c92c1a;
  --red-tint: #fdece8;
  --ink: #1e1c1e;
  --muted: #666266;
  --line: #e3e2e2;
  --line-strong: #c2bfc0;
  --canvas: #f5f5f4;
  --paper: #ffffff;
  --ok: #1f8a4c;
  --warn: #b26a00;

  --font-head: "Barlow Condensed", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;

  --radius: 12px;
  --radius-s: 8px;
  --gutter: 24px;
  --column: 1120px;
  --header-h: 64px;
  --tabs-h: 52px;
  --shadow: 0 1px 2px rgba(30, 28, 30, 0.04);
  --focus: 0 0 0 3px rgba(239, 56, 31, 0.28);
}

@media (max-width: 719px) {
  :root {
    --gutter: 16px;
  }
}

/* ==========================================================================
   2 Basis
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + var(--s-4));
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--font-head);
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1.02;
  letter-spacing: 0.005em;
  hyphens: auto;
}

h1 {
  font-size: clamp(40px, 6vw, 68px);
}

h2 {
  font-size: clamp(28px, 3.4vw, 38px);
}

h3 {
  font-size: 22px;
  line-height: 1.1;
}

h4 {
  font-size: 18px;
  line-height: 1.15;
}

p {
  margin: 0;
}

a {
  color: var(--red);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--red-hover);
}

img,
svg,
video,
canvas {
  max-width: 100%;
}

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

button {
  cursor: pointer;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

dl,
dd {
  margin: 0;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
}

:focus {
  outline: none;
}

:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 2px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms;
    animation-iteration-count: 1;
    transition-duration: 0.01ms;
  }
}

/* ==========================================================================
   3 Layout
   ========================================================================== */

.container {
  width: 100%;
  max-width: calc(var(--column) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.main {
  flex: 1 0 auto;
}

.page {
  padding-top: var(--s-6);
  padding-bottom: var(--s-8);
}

.page-loading {
  padding: var(--s-7) 0;
  color: var(--muted);
}

.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--s-4) var(--s-5);
  margin-bottom: var(--s-6);
}

.page-head-copy {
  min-width: 0;
  max-width: 760px;
}

.page-head .lead {
  margin-top: var(--s-3);
}

.stack {
  display: grid;
  gap: var(--s-5);
  align-content: start;
  min-width: 0;
}

.stack-s {
  display: grid;
  gap: var(--s-3);
  align-content: start;
  min-width: 0;
}

.grid-2,
.grid-3,
.split {
  display: grid;
  gap: var(--s-5);
  align-items: start;
}

.grid-2 > *,
.grid-3 > *,
.split > * {
  min-width: 0;
}

@media (min-width: 860px) {
  .grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .split {
    grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  }

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

/* Kopfzeile ---------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.site-header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: var(--s-5);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--s-3);
  min-height: 44px;
  color: var(--ink);
  text-decoration: none;
  flex: 0 1 auto;
  min-width: 0;
}

.brand:hover {
  color: var(--ink);
}

.brand-mark {
  width: 40px;
  height: 40px;
  flex: none;
}

.brand-text {
  display: grid;
  min-width: 0;
  line-height: 1.1;
  overflow: hidden;
}

.brand-sub,
.brand-name {
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-sub {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.brand-name {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  align-items: stretch;
  gap: var(--s-5);
  height: 100%;
  margin-left: var(--s-4);
  flex: 1 1 auto;
  min-width: 0;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  border-bottom: 3px solid transparent;
  border-top: 3px solid transparent;
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.site-nav a:hover {
  color: var(--ink);
}

.site-nav a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--red);
}

.site-account {
  position: relative;
  margin-left: auto;
  flex: none;
}

.account-button {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  min-height: 44px;
  padding: 3px var(--s-3) 3px 3px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
}

.account-button:hover,
.account-button[aria-expanded="true"] {
  border-color: var(--line-strong);
}

.account-name {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-button .icon {
  width: 16px;
  height: 16px;
  color: var(--muted);
}

.account-menu {
  position: absolute;
  top: calc(100% + var(--s-2));
  right: 0;
  z-index: 45;
  width: 264px;
  padding: var(--s-2);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 12px 32px rgba(30, 28, 30, 0.12);
}

.account-menu-head {
  padding: var(--s-3);
  border-bottom: 1px solid var(--line);
  margin-bottom: var(--s-2);
}

.account-menu-head strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.account-menu-head span {
  display: block;
  font-size: 13px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
}

.account-menu-item {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 44px;
  padding: 0 var(--s-3);
  background: none;
  border: 0;
  border-radius: var(--radius-s);
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
  text-align: left;
  text-decoration: none;
}

.account-menu-item:hover {
  background: var(--canvas);
  color: var(--ink);
}

@media (max-width: 859px) {
  .site-nav {
    display: none;
  }
}

@media (max-width: 719px) {
  .site-header-inner {
    gap: var(--s-3);
  }

  .brand-mark {
    width: 36px;
    height: 36px;
  }

  .brand-name {
    font-size: 18px;
  }

  .account-name {
    display: none;
  }

  .account-button {
    padding-right: var(--s-2);
  }
}

@media (max-width: 379px) {
  .brand-sub {
    letter-spacing: 0.08em;
  }

  .brand-name {
    font-size: 16px;
  }
}

/* Sehr schmale Geräte: Der Schriftzug darf nie unter den Anmelde-Knopf laufen. */
@media (max-width: 339px) {
  .site-header-inner,
  .brand {
    gap: var(--s-2);
  }

  .brand-mark {
    width: 32px;
    height: 32px;
  }

  .brand-sub {
    font-size: 9px;
  }

  .brand-name {
    font-size: 15px;
  }
}

/* Bereichs-Tabs ------------------------------------------------------------ */

.area-tabs {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.area-tabs-inner {
  display: flex;
  gap: var(--s-4);
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.area-tabs-inner::-webkit-scrollbar {
  display: none;
}

.area-tab {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  flex: none;
  height: var(--tabs-h);
  border-bottom: 3px solid transparent;
  border-top: 3px solid transparent;
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.area-tab:hover {
  color: var(--ink);
}

.area-tab[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--red);
}

@media (min-width: 720px) {
  .area-tabs {
    position: sticky;
    top: var(--header-h);
    z-index: 30;
  }
}

/* Fußzeile ----------------------------------------------------------------- */

.site-footer {
  background: var(--paper);
  border-top: 1px solid var(--line);
}

.site-footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-2) var(--s-5);
  padding-top: var(--s-4);
  padding-bottom: var(--s-4);
}

.site-footer-name {
  font-size: 14px;
  color: var(--muted);
}

.site-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--s-5);
}

.site-footer-links a,
.site-footer-links button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0;
  background: none;
  border: 0;
  color: var(--red);
  font-size: 14px;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.site-footer-links a:hover,
.site-footer-links button:hover {
  color: var(--red-hover);
}

/* ==========================================================================
   4 Komponenten
   ========================================================================== */

/* Text --------------------------------------------------------------------- */

.eyebrow {
  margin-bottom: var(--s-2);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red);
}

.lead {
  font-size: 18px;
  line-height: 1.5;
  color: var(--muted);
  max-width: 62ch;
}

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

.small {
  font-size: 14px;
}

.icon {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Karten ------------------------------------------------------------------- */

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--s-5);
  box-shadow: var(--shadow);
  min-width: 0;
}

.card > * + * {
  margin-top: var(--s-4);
}

.card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--s-2) var(--s-4);
}

.card-head > div {
  min-width: 0;
}

.card-title {
  font-size: 24px;
}

.card-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  padding-top: var(--s-4);
  border-top: 1px solid var(--line);
}

@media (max-width: 479px) {
  .card {
    padding: var(--s-4);
  }
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  min-height: 48px;
  padding: 0 var(--s-5);
  border: 1px solid transparent;
  border-radius: var(--radius-s);
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.05em;
  line-height: 1.1;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn-primary {
  background: var(--red);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--red-hover);
  color: #ffffff;
}

.btn-secondary {
  background: var(--paper);
  border-color: var(--line-strong);
  color: var(--ink);
}

.btn-secondary:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.btn-text {
  justify-content: flex-start;
  justify-self: start;
  min-height: 44px;
  padding: 0;
  background: none;
  border: 0;
  border-radius: 4px;
  color: var(--red);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  text-align: left;
}

.btn-text:hover {
  color: var(--red-hover);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.btn-small {
  min-height: 44px;
  padding: 0 var(--s-4);
  font-size: 16px;
}

.btn-block {
  width: 100%;
}

.form > .btn:not(.btn-block) {
  justify-self: start;
}

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex: none;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
}

.icon-btn:hover {
  border-color: var(--line-strong);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-3) var(--s-4);
}

/* Formulare ---------------------------------------------------------------- */

.form {
  display: grid;
  gap: var(--s-4);
  min-width: 0;
}

.form-grid {
  display: grid;
  gap: var(--s-4);
}

@media (min-width: 600px) {
  .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .field--full {
    grid-column: 1 / -1;
  }
}

.field {
  display: grid;
  gap: 6px;
  min-width: 0;
  align-content: start;
}

.field-label,
.legend {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.field-hint {
  font-size: 13px;
  color: var(--muted);
}

.input {
  width: 100%;
  min-width: 0;
  height: 48px;
  padding: 0 var(--s-3);
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-s);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

textarea.input {
  height: auto;
  min-height: 96px;
  padding: var(--s-3);
  line-height: 1.5;
  resize: vertical;
}

select.input {
  padding-right: var(--s-6);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23666266' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

input[type="file"].input {
  height: auto;
  min-height: 48px;
  padding: 10px var(--s-3);
  font-size: 14px;
}

.input::placeholder {
  color: #9a9799;
}

.input:hover {
  border-color: var(--muted);
}

.input:focus,
.input:focus-visible {
  outline: none;
  border-color: var(--red);
  border-radius: var(--radius-s);
  box-shadow: var(--focus);
}

.input[readonly] {
  background: var(--canvas);
}

fieldset {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

legend {
  padding: 0;
  margin-bottom: var(--s-2);
}

.check {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: var(--s-3);
  align-items: start;
  min-height: 44px;
  padding: var(--s-2) 0;
  cursor: pointer;
}

.check input {
  width: 22px;
  height: 22px;
  margin: 1px 0 0;
  accent-color: var(--red);
}

.check-text {
  display: grid;
  gap: 2px;
  font-size: 15px;
}

.check-text small {
  font-size: 13px;
  color: var(--muted);
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-3) var(--s-4);
}

.form-status {
  position: relative;
  padding-left: var(--s-4);
  font-size: 14px;
  color: var(--ink);
}

.form-status:empty {
  display: none;
}

.form-status::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted);
}

.form-status.is-error::before {
  background: var(--red);
}

.form-status.is-ok::before {
  background: var(--ok);
}

/* Schalter ----------------------------------------------------------------- */

.switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  min-height: 52px;
  padding: var(--s-2) 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}

.switch:last-child {
  border-bottom: 0;
}

.switch-text {
  display: grid;
  gap: 2px;
  min-width: 0;
  font-weight: 500;
}

.switch-text small {
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
}

.switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  opacity: 0;
}

.switch-track {
  position: relative;
  flex: none;
  width: 48px;
  height: 28px;
  background: var(--line-strong);
  border-radius: 999px;
  transition: background-color 0.15s ease;
}

.switch-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  background: #ffffff;
  border-radius: 50%;
  box-shadow: 0 1px 2px rgba(30, 28, 30, 0.25);
  transition: transform 0.15s ease;
}

.switch input:checked + .switch-track {
  background: var(--red);
}

.switch input:checked + .switch-track::after {
  transform: translateX(20px);
}

.switch input:focus-visible + .switch-track {
  outline: 3px solid var(--red);
  outline-offset: 2px;
}

.switch input:disabled + .switch-track {
  opacity: 0.5;
}

/* Auswahlkarten (Standort) -------------------------------------------------- */

.choice-grid {
  display: grid;
  gap: var(--s-4);
}

@media (min-width: 600px) {
  .choice-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.choice {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--s-4);
  min-height: 88px;
  padding: var(--s-4) var(--s-5);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.choice:hover {
  border-color: var(--line-strong);
}

.choice input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  opacity: 0;
}

.choice-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--canvas);
  border-radius: var(--radius-s);
  color: var(--red);
}

.choice-icon .icon {
  width: 24px;
  height: 24px;
}

.choice-body {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.choice-title {
  font-family: var(--font-head);
  font-size: 26px;
  font-weight: 700;
  line-height: 1.05;
  text-transform: uppercase;
}

.choice-sub {
  font-size: 14px;
  color: var(--muted);
}

.choice-radio {
  width: 24px;
  height: 24px;
  border: 2px solid var(--line-strong);
  border-radius: 50%;
  background: var(--paper);
}

.choice:has(input:checked) {
  border-color: var(--red);
  box-shadow: 0 0 0 1px var(--red);
}

.choice:has(input:checked) .choice-icon {
  background: var(--red-tint);
}

.choice:has(input:checked) .choice-radio {
  border-color: var(--red);
  background: radial-gradient(circle, var(--red) 0 45%, #ffffff 50%);
}

.choice:has(input:focus-visible) {
  outline: 3px solid var(--red);
  outline-offset: 2px;
}

@media (max-width: 479px) {
  .choice {
    padding: var(--s-4);
    gap: var(--s-3);
  }

  .choice-title {
    font-size: 22px;
  }
}

/* Umschalter (Segmente) ------------------------------------------------------ */

.segmented {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  max-width: 100%;
}

.segmented-item {
  min-height: 44px;
  padding: 0 var(--s-4);
  background: none;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.segmented-item:hover {
  color: var(--ink);
}

.segmented-item[aria-pressed="true"] {
  background: var(--ink);
  color: #ffffff;
}

.switcher {
  display: grid;
  gap: 6px;
  justify-items: start;
}

.stack > .segmented,
.card > .segmented {
  justify-self: start;
  align-self: start;
}

/* Status, Marken, Zähler ----------------------------------------------------- */

.status {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.status::before {
  content: "";
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: var(--muted);
}

.status--ok::before {
  background: var(--ok);
}

.status--warn::before {
  background: var(--warn);
}

.status--red::before {
  background: var(--red);
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 var(--s-2);
  background: var(--canvas);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}

.tag--muted {
  color: var(--muted);
  font-weight: 500;
}

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

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  background: var(--red);
  border-radius: 999px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

/* Listen und Zeilen ----------------------------------------------------------- */

.list > * + * {
  border-top: 1px solid var(--line);
}

.row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-3) var(--s-4);
  padding: var(--s-4) 0;
}

.list > .row:first-child {
  padding-top: 0;
}

.list > .row:last-child {
  padding-bottom: 0;
}

.row-body {
  flex: 1 1 140px;
  min-width: 0;
  display: grid;
  gap: 2px;
}

.row-title {
  font-weight: 600;
}

.row-sub {
  font-size: 14px;
  color: var(--muted);
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-2) var(--s-4);
}

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex: none;
  overflow: hidden;
  background: var(--red-tint);
  border-radius: 50%;
  color: var(--red-hover);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar--m {
  width: 44px;
  height: 44px;
  font-size: 15px;
}

.avatar--l {
  width: 72px;
  height: 72px;
  font-size: 24px;
}

.empty {
  display: grid;
  gap: var(--s-3);
  justify-items: start;
  padding: var(--s-5);
  background: var(--canvas);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-s);
  color: var(--muted);
}

.card > .empty:only-child {
  margin: 0;
}

.facts {
  display: grid;
  gap: var(--s-3) var(--s-5);
}

.facts > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.facts dt {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.facts dd {
  font-weight: 500;
}

@media (min-width: 600px) {
  .facts--cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Kennzahlen ------------------------------------------------------------------ */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--s-4);
}

.stat {
  display: grid;
  gap: var(--s-1);
  padding: var(--s-4) var(--s-5);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  color: var(--ink);
  text-decoration: none;
}

a.stat:hover {
  border-color: var(--line-strong);
  color: var(--ink);
}

.stat-value {
  font-family: var(--font-head);
  font-size: 44px;
  font-weight: 700;
  line-height: 1;
}

.stat-label {
  font-size: 14px;
  font-weight: 600;
}

.stat-more {
  font-size: 13px;
  color: var(--red);
  font-weight: 600;
}

@media (min-width: 860px) {
  .stat-grid--three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 599px) {
  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stat {
    padding: var(--s-4);
  }

  .stat-value {
    font-size: 36px;
  }

  .stat-grid--rows {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--s-3);
  }

  .stat-grid--rows .stat {
    grid-template-columns: 44px minmax(0, 1fr) auto;
    align-items: center;
    gap: var(--s-3);
  }
}

/* QR-Codes -------------------------------------------------------------------- */

.qr {
  display: grid;
  gap: var(--s-4);
  justify-items: start;
}

.qr-box {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 220px;
  max-width: 100%;
  aspect-ratio: 1;
  padding: var(--s-3);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

/* Die QR-Bibliothek schreibt eine feste Größe direkt an das Canvas. */
.qr-code-canvas { width: 100% !important; height: 100% !important; }

.qr-fallback {
  padding: var(--s-3);
  font-size: 14px;
  color: var(--muted);
  text-align: center;
}

.code-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-2) var(--s-4);
  max-width: 100%;
}

.code-line code {
  min-width: 0;
  max-width: 100%;
  padding: 6px var(--s-2);
  background: var(--canvas);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow-wrap: anywhere;
}

.code-big {
  font-family: var(--font-head);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
}

/* Tabellen -------------------------------------------------------------------- */

.table-wrap {
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.table th {
  padding: 0 var(--s-3) var(--s-3);
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: left;
  color: var(--muted);
  white-space: nowrap;
}

.table td {
  padding: var(--s-3);
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.table th:first-child,
.table td:first-child {
  padding-left: 0;
}

.table th:last-child,
.table td:last-child {
  padding-right: 0;
}

.table tr:last-child td {
  border-bottom: 0;
}

.table .cell-strong {
  font-weight: 600;
}

@media (max-width: 719px) {
  .table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  .table,
  .table tbody,
  .table tr,
  .table td {
    display: block;
    width: 100%;
  }

  .table tr {
    padding: var(--s-3) var(--s-4);
    border: 1px solid var(--line);
    border-radius: var(--radius-s);
    background: var(--paper);
  }

  .table tr + tr {
    margin-top: var(--s-3);
  }

  .table td,
  .table td:first-child,
  .table td:last-child {
    display: grid;
    grid-template-columns: 104px minmax(0, 1fr);
    gap: var(--s-3);
    padding: 6px 0;
    border: 0;
  }

  .table td::before {
    content: attr(data-label);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
    padding-top: 2px;
  }
}

/* Hinweisleiste ----------------------------------------------------------------- */

.flash {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--s-4);
  margin-bottom: var(--s-5);
  padding: var(--s-3) var(--s-4);
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 4px solid var(--red);
  border-radius: var(--radius-s);
}

.flash p {
  padding-top: 10px;
  padding-bottom: 10px;
  font-weight: 500;
}

/* Rückfrage vor einem Schritt, der sich nicht zurücknehmen lässt. */
.confirm-box {
  display: grid;
  gap: var(--s-3);
  padding: var(--s-4);
  background: var(--canvas);
  border: 1px solid var(--line);
  border-left: 4px solid var(--red);
  border-radius: var(--radius-s);
}

/* Dialoge ----------------------------------------------------------------------- */

.dialog {
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  background: var(--paper);
  border: 0;
  border-radius: 16px;
  color: var(--ink);
  box-shadow: 0 24px 64px rgba(30, 28, 30, 0.24);
}

.dialog::backdrop {
  background: rgba(30, 28, 30, 0.5);
}

.dialog-card {
  display: grid;
  gap: var(--s-4);
  padding: var(--s-5);
}

.dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--s-4);
}

.dialog-head > div {
  min-width: 0;
}

.dialog-title {
  font-size: 28px;
}

.dialog-person {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  min-width: 0;
}

.dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
}

.dialog-section {
  display: grid;
  gap: var(--s-3);
  padding-top: var(--s-4);
  border-top: 1px solid var(--line);
}

.scanner-video {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: var(--ink);
  border-radius: var(--radius-s);
  object-fit: cover;
}

@media (max-width: 479px) {
  .dialog-card {
    padding: var(--s-4);
  }
}

/* Kurzmeldung ------------------------------------------------------------------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: var(--s-5);
  z-index: 80;
  max-width: calc(100vw - 32px);
  padding: var(--s-3) var(--s-4);
  background: var(--ink);
  border-radius: var(--radius-s);
  color: #ffffff;
  font-size: 15px;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ==========================================================================
   5 Seiten
   ========================================================================== */

/* Startseite -------------------------------------------------------------------- */

.hero {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.hero-inner {
  display: grid;
  gap: var(--s-6);
  align-items: center;
  padding-top: var(--s-7);
  padding-bottom: var(--s-7);
}

.hero-copy {
  display: grid;
  gap: var(--s-4);
  justify-items: start;
  min-width: 0;
}

.hero-copy .eyebrow {
  margin-bottom: 0;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  margin-top: var(--s-3);
}

.hero-mark {
  width: 100%;
  max-width: 300px;
  height: auto;
  justify-self: center;
}

@media (min-width: 860px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    padding-top: var(--s-8);
    padding-bottom: var(--s-8);
  }
}

@media (max-width: 859px) {
  .hero-mark {
    display: none;
  }
}

.section {
  padding: var(--s-7) 0;
}

.section--paper {
  background: var(--paper);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-head {
  max-width: 720px;
  margin-bottom: var(--s-6);
}

.section-head p:not(.eyebrow) {
  margin-top: var(--s-3);
  color: var(--muted);
}

@media (min-width: 860px) {
  .section {
    padding: var(--s-8) 0;
  }
}

.location-detail {
  margin-top: var(--s-4);
}

.location-detail h3 {
  font-size: 30px;
}

.feature-grid {
  display: grid;
  gap: var(--s-6) var(--s-5);
}

@media (min-width: 600px) {
  .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 960px) {
  .feature-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.feature {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: var(--s-4);
  align-items: start;
}

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--red-tint);
  border-radius: var(--radius-s);
  color: var(--red);
}

.feature-icon .icon {
  width: 24px;
  height: 24px;
}

.feature h3 {
  margin-bottom: 6px;
}

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

.steps {
  display: grid;
  gap: var(--s-4);
  counter-reset: step;
}

@media (min-width: 860px) {
  .steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.step {
  display: grid;
  gap: var(--s-3);
  align-content: start;
}

.step-number {
  font-family: var(--font-head);
  font-size: 44px;
  font-weight: 700;
  line-height: 1;
  color: var(--red);
}

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

.start-notice {
  padding-top: var(--s-5);
}

.start-notice .flash {
  margin-bottom: var(--s-5);
}

/* App-Seite (Ziel des QR-Codes auf dem Aushang) -------------------------------------- */

.app-page {
  display: grid;
  gap: var(--s-6);
  align-content: start;
}

.app-page > .flash {
  margin-bottom: 0;
}

.app-head {
  display: grid;
  gap: var(--s-4);
  justify-items: start;
  max-width: 760px;
}

.app-head .eyebrow {
  margin-bottom: 0;
}

.app-head .hero-actions {
  margin-top: 0;
}

.app-pending {
  padding: var(--s-3) var(--s-4);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  font-weight: 500;
}

.app-checkin {
  max-width: 760px;
}

.step-title {
  font-size: 22px;
  line-height: 1.1;
}

@media (max-width: 479px) {
  .app-head .hero-actions,
  .app-head .hero-actions .btn {
    width: 100%;
  }
}

/* Anmeldung ----------------------------------------------------------------------- */

.auth {
  max-width: 480px;
  margin-inline: auto;
  padding-top: var(--s-7);
}

.auth-head {
  margin-bottom: var(--s-5);
}

.auth-head h1 {
  font-size: clamp(40px, 6vw, 56px);
}

.auth-head .lead {
  margin-top: var(--s-3);
  font-size: 16px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s-2);
}

.auth-tab {
  min-height: 48px;
  padding: 0 var(--s-3);
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-s);
  color: var(--ink);
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.auth-tab[aria-selected="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: #ffffff;
}

.auth-alt {
  margin-top: var(--s-5);
  font-size: 15px;
  color: var(--muted);
}

/* Registrierung abschließen --------------------------------------------------------- */

.onboarding {
  max-width: 760px;
}

.stepper {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s-2);
  margin-bottom: var(--s-5);
}

.stepper li {
  display: grid;
  gap: 6px;
  padding-top: var(--s-2);
  border-top: 3px solid var(--line);
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.stepper li[aria-current="step"] {
  border-top-color: var(--red);
  color: var(--ink);
}

.stepper li.is-done {
  border-top-color: var(--ink);
  color: var(--ink);
}

.stepper-number {
  font-family: var(--font-head);
  font-size: 20px;
  line-height: 1;
}

@media (max-width: 599px) {
  .stepper-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .stepper li {
    position: relative;
  }
}

.onboarding-step {
  display: grid;
  gap: var(--s-4);
}

.onboarding-step[hidden] {
  display: none;
}

/* Übersicht im Teilnehmerbereich ---------------------------------------------------- */

.overview {
  display: grid;
  gap: var(--s-5);
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "event" "side" "next" "stats";
}

.overview--no-next {
  grid-template-areas: "event" "side" "stats";
}

.overview-event {
  grid-area: event;
}

.overview-side {
  grid-area: side;
}

.overview-next {
  grid-area: next;
}

.overview-stats {
  grid-area: stats;
}

@media (min-width: 860px) {
  .overview {
    grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
    grid-template-areas: "event side" "next side" "stats side";
    grid-template-rows: auto auto 1fr;
    align-items: start;
  }

  .overview--no-next {
    grid-template-areas: "event side" "stats side";
    grid-template-rows: auto 1fr;
  }
}

/* Programm ------------------------------------------------------------------------ */

.program-item {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: var(--s-2) var(--s-5);
  padding: var(--s-4) 0;
}

.program-item:first-child {
  padding-top: 0;
}

.program-item:last-child {
  padding-bottom: 0;
}

.program-time {
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.15;
}

.program-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-2);
  margin-bottom: 4px;
}

.program-body p {
  margin-top: 4px;
  color: var(--muted);
}

@media (max-width: 599px) {
  .program-item {
    grid-template-columns: 1fr;
  }
}

.mc-card {
  display: grid;
  gap: var(--s-3);
  align-content: start;
}

.mc-card > * + * {
  margin-top: 0;
}

.capacity {
  display: grid;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
}

.mc-note {
  max-width: 52ch;
}

.mc-video {
  width: 100%;
  overflow: hidden;
  border-radius: var(--radius-s);
  background: var(--ink);
}

.mc-video video,
.mc-video iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  background: var(--ink);
}

.mc-video video {
  object-fit: contain;
}

.capacity-bar {
  width: 100%;
  height: 6px;
  appearance: none;
  border: 0;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}

.capacity-bar::-webkit-progress-bar {
  background: var(--line);
}

.capacity-bar::-webkit-progress-value {
  background: var(--ink);
}

.capacity-bar::-moz-progress-bar {
  background: var(--ink);
}

/* Kontakte ------------------------------------------------------------------------ */

.contact {
  display: grid;
  gap: var(--s-4);
  padding: var(--s-5) 0;
}

.list > .contact:first-child {
  padding-top: 0;
}

.list > .contact:last-child {
  padding-bottom: 0;
}

.contact-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-3) var(--s-4);
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-1) var(--s-5);
  font-size: 14px;
}

.contact-links span {
  color: var(--muted);
}

.contact-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 600;
}

.dialog .facts dd a {
  display: inline-block;
  padding-block: 8px;
}

.note-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--s-3);
  align-items: end;
}

@media (max-width: 599px) {
  .note-form {
    grid-template-columns: 1fr;
  }
}

.member-row {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  width: 100%;
  min-height: 56px;
  padding: var(--s-2) 0;
  background: none;
  border: 0;
  color: var(--ink);
  text-align: left;
}

button.member-row:hover .row-title {
  color: var(--red);
}

.member-row .icon {
  margin-left: auto;
  color: var(--muted);
}

/* Chat ---------------------------------------------------------------------------- */

.chat {
  display: grid;
  grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
  min-height: 520px;
  padding: 0;
  overflow: hidden;
}

.chat > * + * {
  margin-top: 0;
}

.chat-threads {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border-right: 1px solid var(--line);
}

.chat-threads-head {
  padding: var(--s-4) var(--s-5);
  border-bottom: 1px solid var(--line);
}

.chat-thread-list {
  flex: 1 1 auto;
  overflow-y: auto;
  max-height: 560px;
}

.chat-thread {
  display: grid;
  gap: 2px;
  width: 100%;
  min-height: 64px;
  padding: var(--s-3) var(--s-5);
  background: none;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-left: 3px solid transparent;
  text-align: left;
}

.chat-thread:hover {
  background: var(--canvas);
}

.chat-thread[aria-current="true"] {
  background: var(--canvas);
  border-left-color: var(--red);
}

.chat-thread strong,
.chat-thread small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-thread small {
  font-size: 13px;
  color: var(--muted);
}

.chat-thread time {
  font-size: 12px;
  color: var(--muted);
}

.chat-pane {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.chat-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-2) var(--s-3);
  padding: var(--s-3) var(--s-5);
  border-bottom: 1px solid var(--line);
}

.chat-head-copy {
  flex: 1 1 160px;
  min-width: 0;
  display: grid;
}

.chat-head-copy small {
  font-size: 13px;
  color: var(--muted);
}

.chat-messages {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  min-height: 240px;
  max-height: 460px;
  padding: var(--s-5);
  overflow-y: auto;
  background: var(--canvas);
}

.message {
  display: grid;
  gap: 2px;
  max-width: min(78%, 520px);
  padding: var(--s-2) var(--s-3);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px 12px 12px 4px;
  align-self: flex-start;
}

.message--mine {
  align-self: flex-end;
  background: var(--red-tint);
  border-color: #f8cfc7;
  border-radius: 12px 12px 4px 12px;
}

.message-sender {
  font-size: 12px;
  font-weight: 700;
}

.message p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.message time {
  font-size: 11px;
  color: var(--muted);
}

.chat-compose {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--s-3);
  align-items: end;
  padding: var(--s-4) var(--s-5);
  border-top: 1px solid var(--line);
}

.chat-compose textarea.input {
  min-height: 48px;
  max-height: 160px;
}

.chat-placeholder {
  flex: 1 1 auto;
  display: grid;
  place-content: center;
  gap: var(--s-2);
  padding: var(--s-6);
  color: var(--muted);
  text-align: center;
}

.chat-note {
  padding: var(--s-3) var(--s-5);
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--muted);
}

.chat-back {
  display: none;
}

@media (max-width: 719px) {
  .chat {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .chat-threads {
    border-right: 0;
  }

  .chat.is-conversation .chat-threads,
  .chat.is-list .chat-pane {
    display: none;
  }

  .chat-back {
    display: inline-flex;
  }

  .chat-threads-head,
  .chat-thread,
  .chat-head,
  .chat-compose,
  .chat-note {
    padding-left: var(--s-4);
    padding-right: var(--s-4);
  }

  .chat-messages {
    padding: var(--s-4);
    max-height: 56vh;
  }
}

/* Benachrichtigungen ------------------------------------------------------------- */

.notice {
  display: grid;
  gap: 4px;
  padding: var(--s-4) 0 var(--s-4) var(--s-4);
  border-left: 3px solid transparent;
}

.notice.is-unread {
  border-left-color: var(--red);
}

.notice time {
  font-size: 13px;
  color: var(--muted);
}

.notice p {
  color: var(--muted);
  white-space: pre-line;
}

/* Mitteilungen vom Wella-Team ------------------------------------------------------ */

.announcement {
  display: grid;
  gap: 4px;
  padding: var(--s-4) 0;
}

.list > .announcement:first-child {
  padding-top: 0;
}

.list > .announcement:last-child {
  padding-bottom: 0;
}

.announcement p {
  white-space: pre-line;
}

.announcement time {
  font-size: 13px;
  color: var(--muted);
}

/* Feedback ------------------------------------------------------------------------ */

.rating {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
}

.rating label {
  position: relative;
  cursor: pointer;
}

.rating input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  opacity: 0;
}

.rating span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-s);
  font-family: var(--font-head);
  font-size: 24px;
  font-weight: 700;
}

.rating input:checked + span {
  background: var(--red);
  border-color: var(--red);
  color: #ffffff;
}

.rating input:focus-visible + span {
  outline: 3px solid var(--red);
  outline-offset: 2px;
}

.rating-scale {
  display: flex;
  justify-content: space-between;
  max-width: 292px;
  font-size: 13px;
  color: var(--muted);
}

/* Team-Bereich -------------------------------------------------------------------- */

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--s-3) var(--s-4);
}

.toolbar .field {
  flex: 1 1 220px;
  max-width: 360px;
}

.record {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--s-2) var(--s-4);
  padding: var(--s-3) 0;
}

.list > .record:first-child {
  padding-top: 0;
}

.list > .record:last-child {
  padding-bottom: 0;
}

.record[aria-current="true"] .row-title {
  color: var(--red);
}

.check-group {
  display: grid;
  gap: 0 var(--s-4);
}

@media (min-width: 600px) {
  .check-group {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.company-members {
  display: grid;
  gap: var(--s-2);
  margin-top: var(--s-2);
  padding-left: var(--s-4);
  border-left: 2px solid var(--line);
  font-size: 14px;
}

.company-members li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-1) var(--s-2);
}

.cell-line {
  display: block;
}

.cell-line + .cell-line {
  margin-top: 2px;
}

/* Programm pflegen: der Ablauf je Tag; das Formular öffnet sich in der Zeile. */
.program-item .row-actions {
  margin-top: var(--s-1);
}

.program-item .confirm-box {
  margin-top: var(--s-3);
}

.program-item .confirm-box p {
  margin-top: 0;
}

.program-item .confirm-box > p:first-child,
.program-item .confirm-box .form-status {
  color: var(--ink);
}

.program-edit {
  margin: var(--s-4) 0;
  padding: var(--s-4);
  background: var(--canvas);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-s);
}

.list > .program-edit:first-child {
  margin-top: 0;
}

.list > .program-edit:last-child {
  margin-bottom: 0;
}

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

.form-grid--time > .field:first-child {
  grid-column: 1 / -1;
}

@media (min-width: 600px) {
  .form-grid--time {
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr);
  }

  .form-grid--time > .field:first-child {
    grid-column: auto;
  }
}

.time-shift {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-2) var(--s-4);
}

.time-shift-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
}

.program-preview {
  font-weight: 600;
}

.program-preview:empty {
  display: none;
}

/* Meldungen: offene zuerst, erledigte ruhiger. */
.report .confirm-box {
  flex: 1 1 100%;
}

/* Seite einer Veranstaltung: Karten in zwei Spalten, die Angaben oben über die ganze Breite. */
.event-board {
  display: grid;
  gap: var(--s-5);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 26rem), 1fr));
  align-items: start;
}

.event-card {
  display: grid;
  gap: var(--s-4);
  align-content: start;
}

.event-card-date {
  margin: 0;
  font-weight: 600;
}

/* Anmeldehilfe: das vorläufige Passwort gut lesbar zum Vorlesen. */
.temp-password {
  margin: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--ink);
  user-select: all;
  overflow-wrap: anywhere;
}

.help-result p {
  margin: 0;
}

/* Wella-Team: Rolle direkt in der Zeile ändern. */
.staff .confirm-box {
  flex: 1 1 100%;
}

.staff {
  flex-wrap: wrap;
}

.staff .row-body {
  flex: 1 1 100%;
}

.staff .row-actions {
  flex: 1 1 100%;
  justify-content: flex-start;
}

.staff .row-actions .input {
  width: auto;
  min-width: 11rem;
}

.report-comment {
  max-width: 70ch;
}

.report--done .row-title {
  font-weight: 500;
}

.report--done .row-title,
.report--done .report-comment {
  color: var(--muted);
}

/* Auswertung: Rangliste mit wählbarer Sortierung. */
.table .cell-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.table .cell-sorted {
  font-weight: 700;
}

.sort-button {
  min-height: 32px;
  padding: 0;
  background: none;
  border: 0;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  color: inherit;
}

.sort-button:hover,
.sort-button[aria-pressed="true"] {
  color: var(--ink);
}

.sort-button[aria-pressed="true"]::after {
  content: " ↓";
}

.rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: start;
  min-width: 28px;
  height: 28px;
  padding: 0 6px;
  border-radius: 999px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.rank--top {
  background: var(--red-tint);
  color: var(--red-hover);
  font-weight: 700;
}

.sort-switch {
  display: none;
}

@media (max-width: 719px) {
  .sort-switch {
    display: grid;
    gap: 6px;
    justify-items: start;
  }

  .table .cell-num {
    text-align: left;
  }

  /* Die Spaltennamen der Rangliste sind länger als in den anderen Tabellen. */
  .table--ranking td,
  .table--ranking td:first-child,
  .table--ranking td:last-child {
    grid-template-columns: 132px minmax(0, 1fr);
  }
}

/* Check-in: Aushang-Karte und Listen, die sich durchsuchen lassen. */
.venue {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-5);
}

.venue .qr-box {
  flex: none;
}

.venue-body {
  flex: 1 1 280px;
  min-width: 0;
  display: grid;
  gap: var(--s-4);
  justify-items: start;
}

.rows {
  border-top: 1px solid var(--line);
}

.rows > .row {
  padding: var(--s-3) 0;
  border-bottom: 1px solid var(--line);
}

/* Aushang: Vorschau am Bildschirm. Alle Maße hängen an --u, einem Hundertstel der Blattbreite;
   im Druck wird nur --u neu gesetzt, damit das Blatt genauso aussieht wie die Vorschau. */
.poster-page {
  display: grid;
  gap: var(--s-4);
  justify-items: center;
}

.poster-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3) var(--s-5);
  width: min(100%, 640px);
}

.poster-hint {
  width: min(100%, 640px);
  font-size: 14px;
}

.poster {
  --u: min((100vw - 2 * var(--gutter)) / 100, 6.4px);
  width: calc(var(--u) * 100);
  max-width: 100%;
  aspect-ratio: 210 / 297;
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: 0 8px 28px rgba(30, 28, 30, 0.1);
  color: var(--ink);
  overflow: hidden;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.poster-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: calc(var(--u) * 6.5) calc(var(--u) * 8);
  text-align: center;
}

.poster-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: calc(var(--u) * 3);
  text-align: left;
}

.poster-mark {
  width: calc(var(--u) * 11);
  height: calc(var(--u) * 11);
  flex: none;
}

.poster-brand {
  font-family: var(--font-head);
  font-size: calc(var(--u) * 3.6);
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.1;
  text-transform: uppercase;
  color: var(--red);
}

.poster-place {
  font-family: var(--font-head);
  font-size: calc(var(--u) * 8);
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
}

.poster-title {
  font-size: calc(var(--u) * 6.8);
  line-height: 1;
  hyphens: manual;
  white-space: nowrap;
}

.poster-qr {
  width: calc(var(--u) * 45);
}

.poster-qr .qr-box {
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
}

.poster-steps {
  display: grid;
  gap: calc(var(--u) * 2);
  align-self: stretch;
  text-align: left;
}

.poster-steps li {
  display: grid;
  grid-template-columns: calc(var(--u) * 7) minmax(0, 1fr);
  column-gap: calc(var(--u) * 2);
  align-items: start;
  padding-top: calc(var(--u) * 2);
  border-top: calc(var(--u) * 0.3) solid var(--ink);
  font-size: calc(var(--u) * 2.8);
  line-height: 1.35;
}

.poster-steps strong {
  grid-column: 2;
  font-family: var(--font-head);
  font-size: calc(var(--u) * 4.2);
  line-height: 1.1;
  text-transform: uppercase;
}

.poster-steps li > span:last-child {
  grid-column: 2;
}

.poster-step-number {
  grid-row: 1 / span 2;
  font-family: var(--font-head);
  font-size: calc(var(--u) * 8.6);
  font-weight: 700;
  line-height: 0.95;
  color: var(--red);
}

.poster-code {
  font-size: calc(var(--u) * 2.8);
  line-height: 1.2;
  color: var(--muted);
}

.poster-code strong {
  font-family: var(--font-head);
  font-size: calc(var(--u) * 4.6);
  letter-spacing: 0.08em;
  color: var(--ink);
  white-space: nowrap;
}

@media print {
  @page {
    size: A4 portrait;
    margin: 12mm;
  }

  /* Nur der Aushang wird gedruckt, ohne Kopfzeile, Tabs, Fußzeile und Knöpfe. */
  body:has(.poster) {
    display: block;
    min-height: 0;
    background: #ffffff;
  }

  body:has(.poster) .site-header,
  body:has(.poster) .area-tabs,
  body:has(.poster) .site-footer,
  body:has(.poster) .skip-link,
  body:has(.poster) .toast,
  body:has(.poster) .flash,
  body:has(.poster) .poster-toolbar,
  body:has(.poster) .poster-hint {
    display: none;
  }

  body:has(.poster) .page {
    max-width: none;
    padding: 0;
  }

  body:has(.poster) .poster-page {
    display: block;
  }

  /* Blattbreite = A4 abzüglich der Seitenränder. */
  .poster {
    --u: 1.86mm;
    max-width: none;
    border: 0;
    box-shadow: none;
    break-inside: avoid;
  }
}

/* ==========================================================================
   6 Hilfsklassen
   ========================================================================== */

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

.skip-link {
  position: absolute;
  left: var(--s-4);
  top: -80px;
  z-index: 100;
  padding: var(--s-3) var(--s-4);
  background: var(--ink);
  border-radius: var(--radius-s);
  color: #ffffff;
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: var(--s-2);
  color: #ffffff;
}

.noscript {
  margin: var(--s-5);
  padding: var(--s-4);
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 4px solid var(--red);
  border-radius: var(--radius-s);
}

.area-tabs[hidden],
.table tr[hidden],
[hidden] {
  display: none;
}

.main:focus-visible {
  outline: none;
}

/* Rechtliche Seiten: ruhiger Lesetext. */
.legal {
  max-width: 760px;
}

.legal .page-head {
  margin-bottom: 0;
}

.legal-date {
  margin-top: var(--s-3);
}

.legal-section {
  margin-top: var(--s-6);
}

.legal-section h2 {
  margin-bottom: var(--s-3);
  font-size: 26px;
}

.legal-section > * + * {
  margin-top: var(--s-3);
}

.legal-section ul,
.legal-section ol {
  display: grid;
  gap: var(--s-2);
  padding-left: 22px;
  list-style: disc;
}

.legal-section ol {
  list-style: decimal;
}

.provider .facts {
  margin-top: var(--s-3);
}
