:root {
  --color-primary: #E2001A;
  --color-primary-dark: #B80016;
  --color-slate: #4E5F67;
  --color-ink: #1A1A1A;
  --color-text: #333333;
  --color-muted: #767676;
  --color-border: #E0E0E0;
  --color-surface: #F4F4F4;
  --color-dark: #2B2B2B;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: "Source Sans 3", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: #333333;
  background: #FFFFFF;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: "Source Serif 4", Georgia, "Times New Roman", serif;
  color: #1A1A1A;
  line-height: 1.2;
  margin: 0 0 1rem;
  font-weight: 600;
}

h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-top: 2.5rem;
}

h3 {
  font-family: "Source Sans 3", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
}

p {
  margin: 0 0 1rem;
}

a {
  color: #E2001A;
  text-decoration: none;
  transition: color 0.15s ease;
}
a:hover {
  color: #B80016;
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.lead {
  font-size: 1.2rem;
  color: #767676;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.8rem;
  font-weight: 600;
  color: #E2001A;
  margin: 0 0 0.5rem;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: #E2001A;
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 100;
}
.skip-link:focus {
  left: 0.5rem;
  top: 0.5rem;
}

:focus-visible {
  outline: 3px solid rgba(78, 95, 103, 0.5);
  outline-offset: 2px;
}

.container {
  width: 100%;
  max-width: 1140px;
  margin-inline: auto;
  padding-inline: 1rem;
}

.narrow {
  max-width: 680px;
  margin-inline: auto;
}

.site-main {
  min-height: 60vh;
}

.section {
  padding-block: 4rem;
}

.section--muted {
  background: #F4F4F4;
}

.site-header {
  border-bottom: 1px solid #E0E0E0;
  background: #FFFFFF;
  position: sticky;
  top: 0;
  z-index: 50;
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #4E5F67;
  font-size: 1.4rem;
  letter-spacing: 0.02em;
}
.brand:hover {
  text-decoration: none;
}
.brand strong {
  color: #E2001A;
}

.brand__sub {
  color: #4E5F67;
}

.brand__mark {
  position: relative;
  width: 34px;
  height: 30px;
  display: inline-block;
}

.brand__square {
  position: absolute;
  width: 20px;
  height: 20px;
}
.brand__square--red {
  background: #E2001A;
  top: 0;
  left: 0;
  transform: skewX(-12deg);
}
.brand__square--gray {
  background: #4E5F67;
  bottom: 0;
  right: 0;
  transform: skewX(-12deg);
  opacity: 0.85;
}

.site-nav {
  display: flex;
  align-items: center;
  flex: 1;
  gap: 1.5rem;
}

.site-nav__close {
  display: none;
}

.mainnav {
  margin-left: 1rem;
}

.mainnav__list {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.mainnav__link {
  color: #1A1A1A;
  font-weight: 600;
  padding-block: 0.5rem;
}
.mainnav__link:hover {
  color: #E2001A;
  text-decoration: none;
}

.site-header__actions {
  margin-left: auto;
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.site-header__user {
  font-size: 0.9rem;
  color: #767676;
  font-weight: 600;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 42px;
  height: 42px;
  padding: 9px;
  margin-left: auto;
  border: 1px solid #E0E0E0;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: #1A1A1A;
  border-radius: 2px;
}

.site-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease;
  z-index: 150;
}

@media (max-width: 720px) {
  .nav-toggle {
    display: inline-flex;
  }
  .site-nav {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 200;
    height: 100%;
    width: min(84%, 320px);
    flex: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: #fff;
    padding: 1.5rem;
    transform: translateX(100%);
    transition: transform 0.25s ease;
    overflow-y: auto;
  }
  body.nav-open .site-nav {
    transform: translateX(0);
    box-shadow: -8px 0 40px rgba(0, 0, 0, 0.3);
  }
  body.nav-open .site-backdrop {
    opacity: 1;
    visibility: visible;
  }
  body.nav-open {
    overflow: hidden;
  }
  .site-nav__close {
    display: inline-flex;
    align-self: flex-end;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 0;
    background: transparent;
    color: #1A1A1A;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    margin-bottom: 0.5rem;
  }
  .mainnav {
    margin-left: 0;
  }
  .mainnav__list {
    flex-direction: column;
    gap: 0;
  }
  .mainnav__link {
    display: block;
    padding: 1rem 0;
    border-bottom: 1px solid #E0E0E0;
  }
  .site-header__actions {
    margin-left: 0;
    margin-top: auto;
    padding-top: 1.5rem;
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }
  .site-header__actions form {
    width: 100%;
  }
  .site-header__actions .btn {
    width: 100%;
    padding: 0.85em 1.4em;
    font-size: 1rem;
  }
  .site-header__user {
    text-align: center;
    margin-bottom: 0.25rem;
  }
}
.site-footer {
  background: #2B2B2B;
  color: #cfcfcf;
  padding-block: 2.5rem;
  margin-top: 4rem;
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: space-between;
  align-items: flex-start;
}

.site-footer__title {
  color: #fff;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.site-footer__muted {
  color: #9a9a9a;
}

.site-footer__col {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.site-footer a {
  color: #dcdcdc;
}
.site-footer a:hover {
  color: #fff;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: "Source Sans 3", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1;
  padding: 0.8em 1.4em;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn:hover {
  text-decoration: none;
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn--sm {
  padding: 0.55em 1em;
  font-size: 0.9rem;
}

.icon {
  display: block;
  flex: none;
}

.btn--has-icon .icon {
  margin-right: -0.1em;
}

.btn--icon {
  padding-left: 0.55em;
  padding-right: 0.55em;
}

.btn--icon.btn--sm {
  padding-left: 0.5em;
  padding-right: 0.5em;
}

.btn--primary {
  background: #E2001A;
  color: #fff;
}
.btn--primary:hover:not(:disabled) {
  background: #B80016;
  color: #fff;
}

.btn--slate {
  background: #4E5F67;
  color: #fff;
}
.btn--slate:hover:not(:disabled) {
  background: #3B484E;
  color: #fff;
}

.btn--ghost {
  background: transparent;
  color: #1A1A1A;
  border-color: #E0E0E0;
}
.btn--ghost:hover:not(:disabled) {
  border-color: #4E5F67;
  color: #E2001A;
}

.cluster {
  display: flex;
  flex-wrap: nowrap;
  gap: 1rem;
  align-items: center;
}

.cluster--tight {
  gap: 0.4rem;
}

.hero {
  background: linear-gradient(180deg, #F4F4F4 0%, #fff 100%);
  padding-block: 4rem;
  border-bottom: 1px solid #E0E0E0;
}

.hero__title {
  margin-bottom: 1rem;
}

.hero__lead {
  font-size: 1.25rem;
  color: #333333;
  max-width: 60ch;
  margin-bottom: 1.5rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.cards {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.card {
  background: #fff;
  border: 1px solid #E0E0E0;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.card__icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #E2001A;
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  margin-bottom: 1rem;
}

.card__title {
  margin-bottom: 0.5rem;
}

.card__text {
  color: #767676;
  margin: 0;
}

.band {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: center;
  justify-content: space-between;
}

.band__title {
  margin: 0 0 0.25rem;
}

.band__text {
  margin: 0;
  color: #767676;
}

.form .field {
  margin-bottom: 1rem;
}

.form label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: #1A1A1A;
}

.field__label {
  display: block;
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 0.25rem;
  color: #1A1A1A;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 560px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

.field__hint {
  font-size: 0.85rem;
  color: #767676;
  margin: 0.25rem 0 0;
}

.field__error {
  font-size: 0.85rem;
  color: #E2001A;
  margin: 0.25rem 0 0;
  font-weight: 600;
}

.field--error input,
.field--error select,
.field--error textarea {
  border-color: #E2001A;
}
.field--error input:focus,
.field--error select:focus,
.field--error textarea:focus {
  box-shadow: 0 0 0 3px rgba(226, 0, 26, 0.15);
}

.flash-area {
  margin-top: 1.5rem;
}

.form input,
.form select,
.form textarea {
  width: 100%;
  font: inherit;
  color: #1A1A1A;
  padding: 0.65em 0.8em;
  border: 1px solid #E0E0E0;
  border-radius: 6px;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.form input:focus,
.form select:focus,
.form textarea:focus {
  outline: none;
  border-color: #4E5F67;
  box-shadow: 0 0 0 3px rgba(78, 95, 103, 0.18);
}

.form textarea {
  resize: vertical;
}

.datefield {
  position: relative;
}

.datefield__box {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3em 0.4em 0.3em 0.8em;
  border: 1px solid #E0E0E0;
  border-radius: 6px;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.datefield__box:focus-within {
  border-color: #4E5F67;
  box-shadow: 0 0 0 3px rgba(78, 95, 103, 0.18);
}

.field--error .datefield__box {
  border-color: #E2001A;
}
.field--error .datefield__box:focus-within {
  box-shadow: 0 0 0 3px rgba(226, 0, 26, 0.15);
}

.datefield.is-unvollstaendig .datefield__box {
  border-color: #B26A00;
}

.datefield__segs {
  display: flex;
  align-items: center;
  flex: 1;
}

.datefield__punkt {
  color: #767676;
}

.form .datefield__seg {
  width: 2.5ch;
  padding: 0.35em 0;
  border: 0;
  border-radius: 3px;
  background: none;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.form .datefield__seg::placeholder {
  color: #767676;
}
.form .datefield__seg:focus {
  outline: none;
  box-shadow: none;
  background: rgba(78, 95, 103, 0.1);
}

.form .datefield__seg--jahr {
  width: 4.5ch;
}

.datefield__knopf {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: none;
  color: #4E5F67;
  cursor: pointer;
}
.datefield__knopf:hover {
  background: #F4F4F4;
}
.datefield__knopf:focus-visible {
  outline: 2px solid #4E5F67;
  outline-offset: 1px;
}

.datefield__kal {
  position: absolute;
  z-index: 30;
  top: calc(100% + 0.25rem);
  left: 0;
  width: 19rem;
  max-width: calc(100vw - 2rem);
  padding: 1rem;
  border: 1px solid #E0E0E0;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}
.datefield__kal[hidden] {
  display: none;
}

.datefield__kal-kopf {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-bottom: 0.5rem;
}

.form .datefield__wahl {
  flex: 1;
  width: auto;
  padding: 0.3em 0.4em;
  font-size: 0.9rem;
}

.datefield__pfeil {
  flex: none;
  width: 1.9rem;
  height: 1.9rem;
  padding: 0;
  border: 1px solid #E0E0E0;
  border-radius: 6px;
  background: #fff;
  font-size: 1.1rem;
  line-height: 1;
  color: #4E5F67;
  cursor: pointer;
}
.datefield__pfeil:hover {
  background: #F4F4F4;
}

.datefield__raster {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
.datefield__raster th {
  padding-bottom: 0.25rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: #767676;
}
.datefield__raster th abbr {
  text-decoration: none;
}
.datefield__raster td {
  padding: 1px;
  text-align: center;
}

.datefield__tag {
  width: 100%;
  height: 2rem;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: none;
  font: inherit;
  font-size: 0.9rem;
  color: #333333;
  cursor: pointer;
}
.datefield__tag:hover {
  background: #F4F4F4;
}
.datefield__tag:focus-visible {
  outline: 2px solid #4E5F67;
  outline-offset: -2px;
}
.datefield__tag.is-heute {
  font-weight: 700;
  box-shadow: inset 0 0 0 1px #E0E0E0;
}
.datefield__tag.is-gewaehlt {
  background: #E2001A;
  color: #fff;
  font-weight: 600;
}
.datefield__tag.is-gewaehlt:hover {
  background: #B80016;
}

.alert {
  border: 1px solid transparent;
  border-left-width: 4px;
  border-radius: 6px;
  padding: 1rem 1.5rem;
  margin-bottom: 1rem;
}

.alert--success {
  background: #eef7ee;
  border-color: #2E7D32;
  color: #1e5a22;
}

.alert--danger {
  background: #fdecee;
  border-color: #E2001A;
  color: #8a0013;
}

.alert--info {
  background: #eef1f3;
  border-color: #4E5F67;
  color: #2f3d43;
}

.alert--warning {
  background: #fff6e9;
  border-color: #B26A00;
  color: #7a4900;
}

.badge {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.25em 0.7em;
  border-radius: 999px;
  background: #E9E9E9;
  color: #1A1A1A;
}

.badge--ok {
  background: #e3f2e4;
  color: #1e5a22;
}

.badge--wait {
  background: #fff2e0;
  color: #7a4900;
}

.badge--muted {
  background: #ececec;
  color: #767676;
}

.badge--info {
  background: #eef1f3;
  color: #2f3d43;
}

.state {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
}

.state__text {
  font-weight: 600;
}

.state--ok {
  color: #1e5a22;
}

.state--wait {
  color: #7a4900;
}

.state--danger {
  color: #E2001A;
}

.state--info {
  color: #2f3d43;
}

.state--muted {
  color: #a6a6a6;
}

a.state:hover {
  text-decoration: underline;
}

button.state {
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  cursor: pointer;
}
button.state:hover {
  text-decoration: underline;
}
button.state:focus-visible {
  outline: 2px solid #E2001A;
  outline-offset: 2px;
  border-radius: 2px;
}

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

.table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid #E0E0E0;
  border-radius: 6px;
  overflow: hidden;
}

.table th, .table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid #E0E0E0;
}

.table thead th {
  background: #F4F4F4;
  font-weight: 700;
  color: #1A1A1A;
}

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

.table tbody tr:hover {
  background: rgba(78, 95, 103, 0.05);
}

.table .table__actions {
  text-align: right;
  white-space: nowrap;
}

.table .table__actions .cluster {
  justify-content: flex-end;
  flex-wrap: nowrap;
}

.is-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.hero--compact {
  padding-block: 4rem 2.5rem;
}

.event-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

.event-card {
  display: flex;
  flex-direction: column;
  border: 1px solid #E0E0E0;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.event-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}
.event-card__body {
  padding: 1.5rem;
  flex: 1;
}
.event-card__modules {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}
.event-card__title {
  margin: 0 0 0.5rem;
  font-family: "Source Serif 4", Georgia, "Times New Roman", serif;
  font-size: 1.3rem;
  color: #1A1A1A;
}
.event-card__desc {
  color: #767676;
  margin-bottom: 1rem;
}
.event-card__foot {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
  padding: 1rem 1.5rem;
  border-top: 1px solid #E0E0E0;
  background: #F4F4F4;
}
.event-card__note {
  color: #767676;
  font-size: 0.9rem;
  font-weight: 600;
}

.event-meta {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.35rem 1rem;
  margin: 0;
}

.event-meta dt {
  color: #767676;
  font-weight: 600;
  font-size: 0.9rem;
}

.event-meta dd {
  margin: 0;
  color: #1A1A1A;
  font-size: 0.95rem;
}

.empty-events {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 2.5rem;
}

.reminder-card {
  border: 1px solid #E0E0E0;
  border-radius: 12px;
  background: #fff;
  padding: 2.5rem;
}
.reminder-card--prominent {
  border-color: rgba(226, 0, 26, 0.35);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  max-width: 720px;
  margin: 0 auto;
}
.reminder-card__intro h2 {
  margin-top: 0;
}
.reminder-card__intro p {
  color: #767676;
}

.reminder-form {
  margin-top: 1rem;
}

.event-detail {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 1.5rem;
  align-items: start;
}
@media (max-width: 760px) {
  .event-detail {
    grid-template-columns: 1fr;
  }
}

.event-signup {
  border: 1px solid #E0E0E0;
  border-radius: 12px;
  background: #fff;
  padding: 1.5rem;
  position: sticky;
  top: 90px;
}
.event-signup h2 {
  margin-top: 0;
}

.signup-line {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid #E0E0E0;
  margin: 0;
}
.signup-line span {
  color: #767676;
}

.text-ok {
  color: #1e5a22;
}

.text-wait {
  color: #7a4900;
}

.swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.swatch {
  font-size: 0.85rem;
  color: #767676;
}

.swatch span {
  display: block;
  width: 120px;
  height: 64px;
  border-radius: 6px;
  margin-bottom: 0.25rem;
}

.admin-plain {
  background: #F4F4F4;
}

.admin-login {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  gap: 1rem;
}

.admin-login .alert {
  width: 100%;
  max-width: 420px;
}

.admin-login__card {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border: 1px solid #E0E0E0;
  border-radius: 12px;
  padding: 2.5rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.admin-login__head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}
.admin-login__head strong {
  display: block;
  color: #1A1A1A;
}
.admin-login__head span {
  color: #767676;
  font-size: 0.85rem;
}

.admin-login__sub {
  color: #767676;
  font-size: 0.9rem;
  margin: -0.5rem 0 1rem;
}

.admin-login__foot {
  margin: 1rem 0 0;
  text-align: center;
  font-size: 0.85rem;
}
.admin-login__foot a {
  color: #4E5F67;
}

.admin-login h1 {
  font-size: 1.6rem;
  margin-bottom: 1.5rem;
}

body.admin {
  margin: 0;
  display: grid;
  grid-template-columns: 250px 1fr;
  min-height: 100vh;
  background: #F4F4F4;
}

.admin-sidebar {
  background: #2B2B2B;
  color: #d7d7d7;
  padding: 1.5rem 0;
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0 1.5rem 1.5rem;
  color: #fff;
  font-weight: 700;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-nav {
  display: flex;
  flex-direction: column;
  padding-top: 1rem;
}

.admin-nav__link {
  display: block;
  padding: 0.5rem 1.5rem;
  color: #cfcfcf;
  font-weight: 600;
  border-left: 3px solid transparent;
}
.admin-nav__link:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  text-decoration: none;
}
.admin-nav__link.is-active {
  background: rgba(226, 0, 26, 0.15);
  color: #fff;
  border-left-color: #E2001A;
}

.admin-nav__section {
  padding: 1.5rem 1.5rem 0.25rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #7a7a7a;
}

.admin-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.admin-topbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: #fff;
  border-bottom: 1px solid #E0E0E0;
  padding: 0.5rem 1.5rem;
  min-height: 60px;
}

.admin-topbar__site {
  font-weight: 600;
  font-size: 0.9rem;
}

.admin-topbar__user {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-weight: 600;
  color: #1A1A1A;
  margin-left: auto;
}

.admin-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 42px;
  height: 42px;
  padding: 9px;
  border: 1px solid #E0E0E0;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
}
.admin-hamburger span {
  display: block;
  height: 2px;
  background: #1A1A1A;
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.admin-nav-close {
  display: none;
}

.admin-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease;
  z-index: 150;
}

.admin-content {
  padding: 2.5rem 1.5rem;
  max-width: 1100px;
  width: 100%;
}

.admin-page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.admin-page-head h1 {
  margin: 0;
}
.admin-page-head__sub {
  margin: 0.25rem 0 0;
  color: #767676;
}

.admin-panel {
  background: #fff;
  border: 1px solid #E0E0E0;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.admin-panel h2 {
  margin-top: 0;
}

.stat-cards {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  margin-bottom: 1.5rem;
}

.stat-card {
  background: #fff;
  border: 1px solid #E0E0E0;
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.stat-card:hover {
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}
.stat-card--muted {
  opacity: 0.6;
}
.stat-card__value {
  font-family: "Source Serif 4", Georgia, "Times New Roman", serif;
  font-size: 2rem;
  font-weight: 700;
  color: #E2001A;
}
.stat-card__label {
  color: #767676;
  font-weight: 600;
  font-size: 0.9rem;
}
.stat-card__sep {
  margin: 0 0.3rem;
  color: #E0E0E0;
  font-weight: 400;
}
.stat-card__sum {
  font-size: 1.2rem;
}
.stat-card__hint {
  display: block;
  font-weight: 400;
  font-size: 0.78rem;
  color: #E0E0E0;
}
.stat-card--ok .stat-card__value {
  color: #2E7D32;
}

.btn--danger {
  color: #E2001A;
  border-color: #E0E0E0;
}
.btn--danger:hover:not(:disabled) {
  background: #E2001A;
  color: #fff;
  border-color: #E2001A;
}

.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  cursor: pointer;
}
.checkbox input {
  width: auto;
}

.dualis-search {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.dualis-search input[type=search] {
  flex: 1;
  min-width: 240px;
  font: inherit;
  color: #1A1A1A;
  padding: 0.65em 0.9em;
  border: 1px solid #E0E0E0;
  border-radius: 6px;
  background: #fff;
}
.dualis-search input[type=search]:focus {
  outline: none;
  border-color: #4E5F67;
  box-shadow: 0 0 0 3px rgba(78, 95, 103, 0.18);
}

.form input[type=file] {
  width: 100%;
  padding: 0.5em;
  border: 1px dashed #E0E0E0;
  border-radius: 6px;
  background: #fff;
}

.termin {
  border: 1px solid #E0E0E0;
  border-radius: 12px;
  padding: 1rem 1.5rem 1.5rem;
  margin-bottom: 1rem;
  background: #F4F4F4;
}
.termin--error {
  border-color: #E2001A;
  background: #fdf2f3;
}

.termin__head {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.termin__label {
  font-weight: 700;
  color: #1A1A1A;
}

.termin__opt {
  font-weight: 500;
  color: #767676;
  font-size: 0.85rem;
}

.termin__hint {
  color: #767676;
  font-size: 0.85rem;
}

.termin__row {
  display: flex;
  align-items: flex-end;
  gap: 1rem;
  flex-wrap: wrap;
}

.termin__cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.termin__cell span {
  font-size: 0.8rem;
  font-weight: 600;
  color: #767676;
}
.termin__cell input {
  font: inherit;
  color: #1A1A1A;
  padding: 0.55em 0.7em;
  border: 1px solid #E0E0E0;
  border-radius: 6px;
  background: #fff;
}
.termin__cell input:focus {
  outline: none;
  border-color: #4E5F67;
  box-shadow: 0 0 0 3px rgba(78, 95, 103, 0.18);
}

.termin__cell--date {
  flex: 1;
  min-width: 170px;
}

.termin__dash {
  padding-bottom: 0.6em;
  color: #767676;
  font-weight: 700;
}

.termin__presets {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.termin__presets-label {
  font-size: 0.8rem;
  color: #767676;
}

.chip {
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.3em 0.8em;
  border-radius: 999px;
  cursor: pointer;
  border: 1px solid #E0E0E0;
  background: #fff;
  color: #4E5F67;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}
.chip:hover {
  border-color: #4E5F67;
  background: #4E5F67;
  color: #fff;
}

.finalize-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.finalize-panel h2 {
  font-size: 1.1rem;
}

.reg-confirmed {
  color: #1e5a22;
  font-size: 0.8rem;
  font-weight: 600;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.modal[hidden] {
  display: none;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}

.modal__dialog {
  position: relative;
  background: #fff;
  border-radius: 12px;
  width: min(760px, 100%);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

.modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #E0E0E0;
}
.modal__head h2 {
  margin: 0;
  font-size: 1.15rem;
}

.modal__x {
  border: 0;
  background: transparent;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  color: #767676;
}
.modal__x:hover {
  color: #1A1A1A;
}

.modal__body {
  padding: 1.5rem;
  overflow-y: auto;
}
.modal__body textarea {
  width: 100%;
  font: inherit;
  padding: 0.55em 0.7em;
  border: 1px solid #E0E0E0;
  border-radius: 6px;
  resize: vertical;
}
.modal__body textarea:focus {
  outline: none;
  border-color: #4E5F67;
  box-shadow: 0 0 0 3px rgba(78, 95, 103, 0.18);
}

.modal__foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid #E0E0E0;
  background: #F4F4F4;
}

.mail-preview {
  width: 100%;
  height: 360px;
  margin-top: 0.5rem;
  border: 1px solid #E0E0E0;
  border-radius: 6px;
  background: #f4f4f4;
}

.modal__dialog--wide {
  width: min(920px, 100%);
}

.events-sheet[hidden] {
  display: none;
}
.events-sheet__who {
  margin: 0 0 1rem;
  color: #767676;
  font-size: 0.9rem;
}
.events-sheet__who strong {
  color: #1A1A1A;
}

.table--events {
  font-size: 0.9rem;
}
.table--events th, .table--events td {
  padding: 0.5rem 1rem;
  white-space: nowrap;
}
.table--events th:nth-child(2), .table--events td:nth-child(2) {
  width: 100%;
  white-space: normal;
}
.table--events a {
  font-weight: 600;
  color: #1A1A1A;
}
.table--events a:hover {
  color: #E2001A;
}

.events-cell__date {
  font-variant-numeric: tabular-nums;
}

.profile__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.profile__name {
  margin: 0;
  font-family: "Source Serif 4", Georgia, "Times New Roman", serif;
  font-size: 1.35rem;
  color: #1A1A1A;
}
.profile__sub {
  margin: 0.2rem 0 0;
  color: #767676;
  font-size: 0.9rem;
}
.profile__stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}
@media (max-width: 620px) {
  .profile__stats {
    grid-template-columns: repeat(2, 1fr);
  }
}
.profile__stat {
  border: 1px solid #E0E0E0;
  border-radius: 6px;
  background: #F4F4F4;
  padding: 0.5rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.profile__stat.is-open {
  border-color: #e8c99a;
  background: #fff6e9;
}
.profile__stat-num {
  font-family: "Source Serif 4", Georgia, "Times New Roman", serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: #1A1A1A;
}
.profile__stat-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: #767676;
}
.profile__cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
@media (max-width: 620px) {
  .profile__cols {
    grid-template-columns: 1fr;
  }
}
.profile__block {
  margin-bottom: 1.5rem;
}
.profile__block-title {
  margin: 0 0 0.5rem;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #767676;
  border-bottom: 1px solid #E0E0E0;
  padding-bottom: 0.25rem;
}
.profile__list {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.3rem 1rem;
  margin: 0;
  font-size: 0.9rem;
}
.profile__list dt {
  color: #767676;
  font-weight: 600;
}
.profile__list dd {
  margin: 0;
  color: #1A1A1A;
}
.profile__note {
  margin: 0;
  font-size: 0.9rem;
  color: #1A1A1A;
  background: #F4F4F4;
  border-radius: 6px;
  padding: 0.5rem 1rem;
}
.profile__reg-note {
  font-size: 0.8rem;
  color: #767676;
  font-style: italic;
}

.table--profile {
  font-size: 0.85rem;
}
.table--profile th, .table--profile td {
  padding: 0.5rem 1rem;
  vertical-align: top;
}
.table--profile th:nth-child(1), .table--profile td:nth-child(1),
.table--profile th:nth-child(3), .table--profile td:nth-child(3),
.table--profile th:nth-child(4), .table--profile td:nth-child(4),
.table--profile th:nth-child(5), .table--profile td:nth-child(5) {
  white-space: nowrap;
}
.table--profile th:nth-child(6), .table--profile td:nth-child(6) {
  min-width: 200px;
}
.table--profile a {
  font-weight: 600;
  color: #1A1A1A;
}
.table--profile a:hover {
  color: #E2001A;
}
.table--profile tr.is-cancelled td {
  opacity: 0.55;
}
.table--profile tr.is-cancelled a {
  text-decoration: line-through;
}

.finalize-test-status {
  font-size: 0.85rem;
  font-weight: 600;
}
.finalize-test-status.is-ok {
  color: #1e5a22;
}
.finalize-test-status.is-error {
  color: #8a0013;
}

.count-pill {
  display: inline-block;
  margin-left: 0.5rem;
  font-size: 0.85rem;
  font-weight: 700;
  background: #4E5F67;
  color: #fff;
  border-radius: 999px;
  padding: 0.05em 0.6em;
  vertical-align: middle;
}

.capacity-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.capacity-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
  border: 1px solid #E0E0E0;
  border-radius: 6px;
  padding: 0.5rem 1rem;
  min-width: 150px;
}
.capacity-card.is-full {
  border-color: #e6b8bd;
  background: #fdf3f4;
}
.capacity-card__mod {
  font-size: 0.8rem;
  font-weight: 600;
  color: #767676;
}
.capacity-card__num {
  font-family: "Source Serif 4", Georgia, "Times New Roman", serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: #1A1A1A;
}

.reg-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.reg-panel-head h2 {
  margin: 0;
}

.reg-panel-tools {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.reg-filter {
  font: inherit;
  padding: 0.5em 0.8em;
  border: 1px solid #E0E0E0;
  border-radius: 6px;
  background: #fff;
  min-width: 240px;
}
.reg-filter:focus {
  outline: none;
  border-color: #4E5F67;
  box-shadow: 0 0 0 3px rgba(78, 95, 103, 0.18);
}

.reg-table td {
  vertical-align: top;
}

.reg-panel-hint {
  margin: -0.5rem 0 1rem;
}

.reg-table tbody tr[data-profile-open] {
  cursor: pointer;
}
.reg-table tbody tr[data-profile-open]:focus-visible {
  outline: 2px solid #E2001A;
  outline-offset: -2px;
}

.reg-status {
  white-space: nowrap;
}

.reg-toggle__form {
  margin: 0;
}
.reg-toggle__form + .reg-toggle__form {
  margin-top: 0.3rem;
}

.reg-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  border: 1px solid #E0E0E0;
  border-radius: 999px;
  background: #fff;
  color: #767676;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.2em 0.7em 0.2em 0.5em;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.reg-toggle:hover {
  border-color: #4E5F67;
  color: #1A1A1A;
}
.reg-toggle:focus-visible {
  outline: 2px solid #E2001A;
  outline-offset: 2px;
}
.reg-toggle.is-on {
  background: #e3f2e4;
  border-color: #9ccb9f;
  color: #1e5a22;
}

.reg-note {
  max-width: 340px;
}

.reg-note details > summary {
  cursor: pointer;
  list-style: none;
  padding: 0.2em 0;
}
.reg-note details > summary::-webkit-details-marker {
  display: none;
}

.reg-note__text {
  color: #1A1A1A;
}

.reg-note__add {
  color: #4E5F67;
  font-weight: 600;
  font-size: 0.9rem;
}

.reg-note__form {
  margin-top: 0.5rem;
}

.reg-note__form textarea {
  width: 100%;
  font: inherit;
  padding: 0.5em 0.6em;
  border: 1px solid #E0E0E0;
  border-radius: 6px;
  resize: vertical;
}
.reg-note__form textarea:focus {
  outline: none;
  border-color: #4E5F67;
  box-shadow: 0 0 0 3px rgba(78, 95, 103, 0.18);
}

.reg-note__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.reg-note__hint {
  font-size: 0.8rem;
  color: #767676;
}

.select-with-add {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
}
.select-with-add select {
  flex: 1;
}
.select-with-add .btn {
  white-space: nowrap;
}

.quickadd {
  margin-top: 0.5rem;
  padding: 1rem;
  border: 1px dashed #E0E0E0;
  border-radius: 6px;
  background: #F4F4F4;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.quickadd__actions {
  display: flex;
  gap: 0.5rem;
}

.table tr.is-inactive td {
  color: #767676;
}

.input-suffix {
  position: relative;
  display: flex;
  align-items: center;
}

.input-suffix input {
  padding-right: 2.2em;
}

.input-suffix__unit {
  position: absolute;
  right: 0.9em;
  color: #767676;
  font-weight: 700;
  pointer-events: none;
}

.termin__preview {
  margin-top: 1rem;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  background: #fff;
  border: 1px solid #E0E0E0;
  font-weight: 600;
  color: #767676;
  font-size: 0.95rem;
}
.termin__preview.is-ok {
  color: #1e5a22;
  border-color: #bfe0c1;
  background: #f1f9f1;
}
.termin__preview.is-error {
  color: #8a0013;
  border-color: #f3c2c8;
  background: #fdecee;
}

.mails-filter {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}
.mails-filter input[type=search] {
  flex: 1;
  min-width: 240px;
  font: inherit;
  padding: 0.5em 0.8em;
  border: 1px solid #E0E0E0;
  border-radius: 6px;
}
.mails-filter input[type=search]:focus {
  outline: none;
  border-color: #4E5F67;
  box-shadow: 0 0 0 3px rgba(78, 95, 103, 0.18);
}
.mails-filter select {
  font: inherit;
  padding: 0.5em 0.6em;
  border: 1px solid #E0E0E0;
  border-radius: 6px;
  background: #fff;
}

.mails-by {
  font-size: 0.78rem;
  color: #767676;
}

.mails-addr {
  font-size: 0.85rem;
  color: #767676;
  word-break: break-all;
}

.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}
.pager__size {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}
.pager__label {
  font-size: 0.85rem;
  color: #767676;
  margin-right: 0.15rem;
}
.pager__opt {
  font-size: 0.85rem;
  line-height: 1;
  padding: 0.35em 0.7em;
  border-radius: 6px;
  border: 1px solid #E0E0E0;
  background: #fff;
  color: #4E5F67;
  text-decoration: none;
}
.pager__opt:hover {
  border-color: #4E5F67;
  text-decoration: none;
}
.pager__opt.is-active {
  background: #4E5F67;
  border-color: #4E5F67;
  color: #fff;
  font-weight: 700;
}
.pager__nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.pager__info {
  font-size: 0.85rem;
  color: #767676;
  font-variant-numeric: tabular-nums;
}
.pager__pages {
  color: #E0E0E0;
}

.mail-preview--tall {
  height: 620px;
}

.mail-meta {
  margin: 0;
  display: grid;
  gap: 0.5rem;
}
.mail-meta div {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: baseline;
}
.mail-meta dt {
  flex: 0 0 11rem;
  color: #767676;
  font-size: 0.85rem;
}
.mail-meta dd {
  margin: 0;
  flex: 1;
  min-width: 12rem;
}
.mail-meta__hint {
  color: #767676;
  font-size: 0.8rem;
}
.mail-meta__sum {
  font-size: 0.72rem;
  color: #767676;
  word-break: break-all;
}

.mail-actions {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  align-items: flex-start;
}
.mail-actions__resend {
  flex: 1 1 20rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: flex-start;
}
.mail-actions__forward {
  flex: 1 1 22rem;
}
.mail-actions__row {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.2rem;
}
.mail-actions__row input {
  flex: 1;
  min-width: 12rem;
  font: inherit;
  padding: 0.5em 0.8em;
  border: 1px solid #E0E0E0;
  border-radius: 6px;
}
.mail-actions__row input:focus {
  outline: none;
  border-color: #4E5F67;
  box-shadow: 0 0 0 3px rgba(78, 95, 103, 0.18);
}
.mail-actions__row .btn {
  white-space: nowrap;
}

.mail-resends {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
}
.mail-resends li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: 0.45rem 0;
  border-bottom: 1px solid #E0E0E0;
  font-size: 0.9rem;
}
.mail-resends li:last-child {
  border-bottom: 0;
}

.mail-source__head {
  font-size: 0.9rem;
  margin: 1rem 0 0.5rem;
}

.mail-source {
  margin: 0;
  padding: 0.5rem 0.75rem;
  max-height: 260px;
  overflow: auto;
  background: #2B2B2B;
  color: #e8e8e8;
  border-radius: 6px;
  font-size: 0.78rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.settings-panel h2 {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
}
.settings-panel__intro {
  margin: 0 0 1rem;
  color: #767676;
}

.settings-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.settings-grid .field {
  margin: 0;
}

.settings-default code {
  font-size: 0.85em;
  background: #F4F4F4;
  padding: 0.1em 0.4em;
  border-radius: 3px;
}

.settings-note {
  margin: 1rem 0 0;
  padding: 0.5rem 0.75rem;
  background: #F4F4F4;
  border-left: 3px solid #4E5F67;
  border-radius: 6px;
  font-size: 0.875rem;
  color: #333333;
}
.settings-note code {
  background: #fff;
  padding: 0.1em 0.4em;
  border-radius: 3px;
}

.settings-actions {
  position: sticky;
  bottom: 1rem;
}

.ref-vars {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin: 0.5rem 0;
}

.ref-vars__label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #767676;
}

.ref-var {
  font: inherit;
  font-size: 0.8rem;
  cursor: pointer;
  padding: 0.25em 0.7em;
  border-radius: 999px;
  background: #fff;
  border: 1px dashed #4E5F67;
  color: #4E5F67;
}
.ref-var:hover {
  background: #4E5F67;
  color: #fff;
  border-style: solid;
}

.ref-preview {
  margin-top: 1rem;
  padding: 1rem;
  background: #F4F4F4;
  border: 1px solid #E0E0E0;
  border-radius: 6px;
}
.ref-preview__head {
  font-size: 0.85rem;
  font-weight: 600;
  color: #767676;
  margin-bottom: 0.5rem;
}
.ref-preview__problem {
  margin: 0.5rem 0 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: #8a0013;
}

.ref-sample {
  display: flex;
  gap: 0.5rem;
  align-items: baseline;
  flex-wrap: wrap;
  padding: 0.35rem 0;
  border-bottom: 1px solid #E0E0E0;
}
.ref-sample:last-child {
  border-bottom: 0;
}
.ref-sample__label {
  flex: 0 0 8em;
  font-size: 0.78rem;
  color: #767676;
}
.ref-sample__text {
  flex: 1;
  min-width: 12rem;
  background: #fff;
  padding: 0.2em 0.5em;
  border-radius: 3px;
  word-break: break-word;
}
.ref-sample__len {
  font-size: 0.78rem;
  color: #767676;
  font-variant-numeric: tabular-nums;
}
.ref-sample.is-over .ref-sample__len {
  color: #E2001A;
  font-weight: 700;
}

.reg-payno {
  font-size: 0.78rem;
  color: #767676;
  letter-spacing: 0.04em;
}

.reg-pay {
  max-width: 260px;
}

.reg-pay__sum {
  font-size: 0.85rem;
  color: #767676;
  margin-top: 0.25rem;
}

.reg-pay__open {
  color: #B26A00;
  font-weight: 600;
}

.reg-pay__notified {
  font-size: 0.8rem;
  color: #1e5a22;
  font-weight: 600;
}

.reg-pay__waived {
  font-size: 0.8rem;
  color: #767676;
  margin-top: 0.25rem;
}

.reg-pay__waive {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px dashed #E0E0E0;
}
.reg-pay__waive input {
  font: inherit;
  width: 100%;
  padding: 0.4em 0.6em;
  border: 1px solid #E0E0E0;
  border-radius: 6px;
}
.reg-pay__waive input:focus {
  outline: none;
  border-color: #4E5F67;
  box-shadow: 0 0 0 3px rgba(78, 95, 103, 0.18);
}

.reg-pay__details > summary {
  cursor: pointer;
  list-style: none;
  padding: 0.25em 0;
}
.reg-pay__details > summary::-webkit-details-marker {
  display: none;
}

.reg-pay__toggle {
  color: #4E5F67;
  font-weight: 600;
  font-size: 0.85rem;
}

.reg-pay__log {
  list-style: none;
  margin: 0.5rem 0;
  padding: 0;
  border-top: 1px solid #E0E0E0;
}
.reg-pay__log li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid #E0E0E0;
  font-size: 0.85rem;
}

.reg-pay__log-amount {
  font-weight: 700;
  white-space: nowrap;
}

.reg-pay__log-meta {
  color: #767676;
  flex: 1;
}

.reg-pay__form {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: 0.5rem;
}
.reg-pay__form input {
  font: inherit;
  width: 100%;
  padding: 0.4em 0.6em;
  border: 1px solid #E0E0E0;
  border-radius: 6px;
}
.reg-pay__form input:focus {
  outline: none;
  border-color: #4E5F67;
  box-shadow: 0 0 0 3px rgba(78, 95, 103, 0.18);
}

.reg-pay__form-row {
  display: flex;
  gap: 0.4rem;
}
.reg-pay__form-row .input-suffix {
  flex: 0 0 8em;
}

.mail-variant {
  border: 0;
  padding: 0;
  margin: 0.5rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}
.mail-variant label {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.9rem;
}

.pay-capture {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.pay-search {
  font: inherit;
  font-size: 1.1rem;
  width: 100%;
  padding: 0.6em 0.8em;
  border: 2px solid #E0E0E0;
  border-radius: 6px;
}
.pay-search:focus {
  outline: none;
  border-color: #E2001A;
  box-shadow: 0 0 0 3px rgba(226, 0, 26, 0.15);
}

.pay-status {
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
}
.pay-status.is-ok {
  background: #eef7ee;
  color: #1e5a22;
}
.pay-status.is-error {
  background: #fdecee;
  color: #8a0013;
}

.pay-choices__head {
  margin: 0 0 0.5rem;
  color: #767676;
  font-size: 0.9rem;
}

.pay-choice {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  width: 100%;
  text-align: left;
  font: inherit;
  cursor: pointer;
  padding: 0.6rem 0.8rem;
  margin-bottom: 0.4rem;
  background: #fff;
  border: 1px solid #E0E0E0;
  border-radius: 6px;
}
.pay-choice:hover {
  border-color: #4E5F67;
  background: #F4F4F4;
}

.pay-choice__name {
  font-weight: 700;
}

.pay-choice__meta {
  font-size: 0.85rem;
  color: #767676;
}

.pay-hit {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.5rem;
  background: #fff;
  border: 1px solid #E0E0E0;
  border-left: 4px solid #E2001A;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.07);
}

.pay-hit__person {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding-bottom: 1rem;
  border-bottom: 1px solid #E0E0E0;
}

.pay-hit__name {
  font-size: 1.2rem;
  font-weight: 700;
  color: #1A1A1A;
  margin-right: 0.5rem;
  vertical-align: middle;
}

.pay-hit__meta {
  color: #767676;
  font-size: 0.875rem;
  margin-top: 0.35rem;
}

.pay-hit__sums {
  display: flex;
  margin: 0;
  border: 1px solid #E0E0E0;
  border-radius: 6px;
  overflow: hidden;
}
.pay-hit__sums div {
  margin: 0;
  padding: 0.4rem 0.9rem;
  text-align: right;
}
.pay-hit__sums div + div {
  border-left: 1px solid #E0E0E0;
}
.pay-hit__sums dt {
  font-size: 0.7rem;
  color: #767676;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.1rem;
}
.pay-hit__sums dd {
  margin: 0;
  font-weight: 700;
  font-size: 1.1rem;
  color: #1A1A1A;
  font-variant-numeric: tabular-nums;
}
.pay-hit__sums .is-open {
  background: rgba(226, 0, 26, 0.06);
}
.pay-hit__sums .is-open dd {
  color: #E2001A;
}

.pay-hit__warn {
  background: #fff6e9;
  color: #7a4900;
  border: 1px solid #f2dcae;
  border-radius: 6px;
  padding: 0.5rem 0.85rem;
  font-size: 0.875rem;
  line-height: 1.5;
}

.pay-hit__fields {
  display: grid;
  gap: 1rem;
  align-items: start;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
}
.pay-hit__fields .field {
  margin: 0;
}
.pay-hit__fields input {
  width: 100%;
  font: inherit;
  color: #1A1A1A;
  padding: 0.55em 0.75em;
  background: #fff;
  border: 1px solid #E0E0E0;
  border-radius: 6px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.pay-hit__fields input:focus {
  outline: none;
  border-color: #4E5F67;
  box-shadow: 0 0 0 3px rgba(78, 95, 103, 0.18);
}

.pay-recent__nr {
  font-size: 0.8rem;
  color: #767676;
}

.pay-recent__open {
  font-size: 0.8rem;
  color: #B26A00;
  font-weight: 600;
}

tr.is-fresh {
  animation: pay-flash 1.2s ease-out;
}

@keyframes pay-flash {
  from {
    background: #fff2e0;
  }
  to {
    background: transparent;
  }
}
.booking-presets {
  margin: 0.5rem 0 1.5rem;
  align-items: center;
  gap: 0.5rem;
}

.booking-presets .btn.is-active {
  background: #4E5F67;
  color: #fff;
  border-color: #4E5F67;
}

.booking-stats {
  margin-bottom: 1.5rem;
}

.booking-nr {
  font-size: 0.8rem;
  color: #767676;
}

.booking-ref {
  font-size: 0.8rem;
  color: #767676;
  word-break: break-word;
}

.booking-subtotal td {
  background: #F4F4F4;
  font-weight: 600;
}

.booking-total td {
  border-top: 2px solid #E0E0E0;
  font-weight: 700;
}

@media (max-width: 760px) {
  body.admin {
    grid-template-columns: 1fr;
  }
  .admin-hamburger {
    display: inline-flex;
  }
  .admin-nav-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    width: 32px;
    height: 32px;
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
  }
  .admin-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 200;
    height: 100%;
    width: min(82%, 300px);
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    box-shadow: none;
  }
  body.admin.nav-open .admin-sidebar {
    transform: translateX(0);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.35);
  }
  body.admin.nav-open .admin-backdrop {
    opacity: 1;
    visibility: visible;
  }
  body.admin.nav-open {
    overflow: hidden;
  }
}