/* =========================================================
   Mitgliederbereich
   ========================================================= */

.members-page { background: var(--black); min-height: 100vh; }

.m-main { padding-top: 76px; min-height: calc(100vh - 0px); }
.m-view[hidden], .m-panel[hidden], .m-sub[hidden] { display: none !important; }

.btn--sm { padding: 10px 14px 9px; font-size: 16px; }
.m-nav-actions { display: flex; gap: 10px; align-items: center; }

.m-center {
  min-height: calc(100vh - 76px);
  display: grid;
  place-items: center;
  padding-block: 60px;
}

.m-spinner {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 4px solid rgba(241, 236, 226, .15);
  border-top-color: var(--red);
  animation: spin .8s linear infinite;
}

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

/* Karten & Formulare */
.m-card {
  background: #181616;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: clamp(22px, 3.5vw, 36px);
  position: relative;
}

.m-card--narrow { max-width: 520px; }
.m-card a { color: var(--paper); }

.m-form-title {
  font-family: var(--f-display);
  font-weight: 900;
  font-size: 26px;
  text-transform: uppercase;
  line-height: 1;
  margin: 0 0 8px;
}

.m-form-title + .m-help { margin-top: 0; }
.m-form .m-form-title:not(:first-child) { margin-top: 26px; }

.m-help { color: var(--muted); font-size: 14px; margin: 6px 0 18px; }
.m-small { color: var(--muted); font-size: 15px; }
.m-small a { color: var(--paper); }

.field select {
  font: inherit;
  font-size: 16px;
  color: var(--paper);
  background: #1c1a1a;
  border: 1.5px solid rgba(241, 236, 226, .16);
  border-radius: 4px;
  padding: 13px 14px;
  width: 100%;
}

.field select:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 4px rgba(196, 22, 28, .25); }
.field input[type="date"], .field input[type="time"] { color-scheme: dark; }

.field-row--3 { grid-template-columns: 1fr 1fr 1.4fr; }

.m-form-error {
  background: rgba(255, 107, 111, .12);
  border: 1px solid rgba(255, 107, 111, .6);
  color: #ffd3d4;
  padding: 12px 14px;
  border-radius: 4px;
  margin: 4px 0 16px;
  font-size: 15px;
}

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

/* Split-Layout für Login/Setup */
.m-split {
  min-height: calc(100vh - 76px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 480px);
  gap: clamp(36px, 6vw, 96px);
  align-items: center;
  padding-block: 60px;
}

.m-split-copy .label { display: block; margin-bottom: 18px; }
.m-lead { font-size: clamp(18px, 1.7vw, 21px); color: rgba(241, 236, 226, .8); max-width: 520px; margin: 26px 0 18px; }

.outline-dark {
  -webkit-text-fill-color: var(--black);
  -webkit-text-stroke: 2px var(--paper);
  paint-order: stroke fill;
}

@media (max-width: 860px) {
  .m-split { grid-template-columns: 1fr; min-height: 0; padding-block: 48px 72px; }
  .field-row--3 { grid-template-columns: 1fr 1fr; }
  .field-row--3 .field:last-child { grid-column: 1 / -1; }
}

/* Tabs */
.m-tabs {
  display: inline-flex;
  background: #0f0e0e;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px;
  margin-bottom: 24px;
}

.m-tab {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 17px;
  text-transform: uppercase;
  letter-spacing: .04em;
  background: none;
  border: 0;
  color: var(--muted);
  padding: 9px 20px 8px;
  border-radius: 999px;
  cursor: pointer;
  transition: background .2s, color .2s;
}

.m-tab:hover { color: var(--paper); }
.m-tab.is-active { background: var(--red); color: #fff; }

/* Kopf nach Anmeldung */
.m-app-head {
  border-bottom: 1px solid var(--line);
  padding: clamp(40px, 6vw, 72px) 0 0;
  background:
    linear-gradient(180deg, transparent, rgba(196, 22, 28, .08)),
    var(--black);
}

.m-app-head .label { display: block; margin-bottom: 14px; }
.m-app-head h1 { margin-bottom: 28px; }
.m-tabs--main { margin-bottom: -1px; border-radius: 8px 8px 0 0; border-bottom: 0; padding: 6px 6px 0; }
.m-tabs--main .m-tab { border-radius: 6px 6px 0 0; padding: 12px 22px 11px; }

.m-panel { padding-block: clamp(36px, 5vw, 64px) 120px; }

/* Nächster Termin */
.next-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: clamp(20px, 3vw, 40px);
  align-items: center;
  background: var(--red);
  color: #fff;
  border-radius: 10px;
  padding: clamp(22px, 3.5vw, 40px);
  margin-bottom: clamp(40px, 6vw, 72px);
  position: relative;
  overflow: hidden;
  isolation: isolate;
  animation: fade-up .7s cubic-bezier(.2, .8, .2, 1);
}

.next-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: repeating-linear-gradient(-45deg, rgba(0, 0, 0, .08) 0 2px, transparent 2px 14px);
}

.next-card .label { color: rgba(255, 255, 255, .8); }

.date-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 96px;
  height: 104px;
  background: var(--black);
  color: var(--paper);
  border-radius: 8px;
  text-transform: uppercase;
  flex: none;
}

.date-block b { font-family: var(--f-display); font-weight: 900; font-size: 48px; line-height: .9; }
.date-block span { font-family: var(--f-mono); font-size: 12px; letter-spacing: .14em; margin-top: 4px; }
.date-block small { font-family: var(--f-mono); font-size: 10px; letter-spacing: .1em; color: var(--muted); margin-top: 2px; }

.next-card .date-block { width: 120px; height: 132px; }
.next-card .date-block b { font-size: 64px; }

.next-card h2 {
  font-family: var(--f-display);
  font-weight: 900;
  text-transform: uppercase;
  font-size: clamp(30px, 4vw, 52px);
  line-height: .92;
  margin: 8px 0 10px;
}

.next-meta { font-size: 17px; opacity: .92; }

.countdown { display: flex; gap: 8px; }
.countdown div {
  background: rgba(0, 0, 0, .25);
  border-radius: 6px;
  min-width: 72px;
  padding: 10px 8px 8px;
  text-align: center;
}
.countdown b { display: block; font-family: var(--f-display); font-weight: 900; font-size: 38px; line-height: 1; font-variant-numeric: tabular-nums; }
.countdown span { font-family: var(--f-mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; opacity: .8; }

.next-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.next-card .btn--dark { background: var(--black); border-color: var(--black); color: #fff; }
.next-card .btn--dark:hover { background: transparent; border-color: #fff; }

@media (max-width: 900px) {
  .next-card { grid-template-columns: auto minmax(0, 1fr); }
  .countdown { grid-column: 1 / -1; }
}

@media (max-width: 520px) {
  .next-card { grid-template-columns: 1fr; }
  .next-card .date-block { width: 96px; height: 104px; }
  .next-card .date-block b { font-size: 48px; }
  .countdown div { min-width: 0; flex: 1; }
}

/* Terminliste */
.m-list-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin-bottom: 22px;
}

.m-filters { margin: 0; }
.m-filters .filter { border-color: rgba(241, 236, 226, .3); color: var(--paper); }
.m-filters .filter:hover { background: rgba(241, 236, 226, .08); }
.m-filters .filter.is-active { background: var(--paper); color: var(--black); border-color: var(--paper); }

.event-list { display: grid; gap: 10px; }

.event {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 22px;
  align-items: start;
  background: #181616;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  transition: border-color .2s, transform .3s cubic-bezier(.2, .8, .2, 1);
  animation: fade-up .5s cubic-bezier(.2, .8, .2, 1) backwards;
}

.event:hover { border-color: rgba(196, 22, 28, .7); transform: translateX(4px); }

.event-tag {
  display: inline-block;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 6px;
}

.event h3 {
  font-family: var(--f-display);
  font-weight: 900;
  font-size: 28px;
  text-transform: uppercase;
  line-height: 1;
  margin: 0 0 8px;
}

.event-meta { display: flex; flex-wrap: wrap; gap: 4px 18px; color: rgba(241, 236, 226, .75); font-size: 15px; }
.event-meta span { display: inline-flex; gap: 6px; align-items: center; }
.event-meta svg { width: 15px; height: 15px; color: var(--red); }
.event-desc { margin: 10px 0 0; color: rgba(241, 236, 226, .7); font-size: 15px; line-height: 1.55; }

.ics-btn {
  background: none;
  border: 1px solid var(--line);
  color: var(--paper);
  border-radius: 6px;
  padding: 9px 12px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color .2s, background .2s;
}

.ics-btn:hover { border-color: var(--paper); background: rgba(241, 236, 226, .06); }

.event-list--past .event { opacity: .55; }
.event-list--past .event:hover { opacity: .85; }
.m-past-toggle { margin-top: 28px; }
.event-list--past { margin-top: 18px; }

.m-empty {
  border: 1.5px dashed var(--line);
  border-radius: 8px;
  padding: 36px;
  text-align: center;
  color: var(--muted);
}

@media (max-width: 640px) {
  .event { grid-template-columns: auto minmax(0, 1fr); gap: 16px; }
  .event .ics-btn { grid-column: 2; justify-self: start; }
  .event .date-block { width: 72px; height: 80px; }
  .event .date-block b { font-size: 36px; }
  .event h3 { font-size: 23px; }
}

/* Verwaltung */
.m-subtabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.m-subtabs .filter { border-color: rgba(241, 236, 226, .3); color: var(--paper); }
.m-subtabs .filter:hover { background: rgba(241, 236, 226, .08); }
.m-subtabs .filter.is-active { background: var(--red); border-color: var(--red); color: #fff; }

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

.m-admin-head .m-help { margin-bottom: 0; }

.m-editor { margin-bottom: 22px; border-color: rgba(196, 22, 28, .6); animation: fade-up .4s cubic-bezier(.2, .8, .2, 1); }

.admin-list { display: grid; gap: 8px; }

.admin-row {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  background: #181616;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 14px 16px;
}

.admin-row .when { font-family: var(--f-mono); font-size: 12px; letter-spacing: .06em; color: var(--muted); }
.admin-row .when b { display: block; color: var(--paper); font-size: 14px; }
.admin-row h4 { margin: 0; font-family: var(--f-display); font-weight: 800; font-size: 21px; text-transform: uppercase; line-height: 1.05; }
.admin-row p { margin: 2px 0 0; font-size: 14px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-row.is-past { opacity: .55; }

.row-actions { display: flex; gap: 6px; }
.icon-btn {
  background: none;
  border: 1px solid var(--line);
  color: var(--paper);
  border-radius: 6px;
  padding: 8px 12px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color .2s, background .2s, color .2s;
}
.icon-btn:hover { border-color: var(--paper); }
.icon-btn--danger:hover { border-color: #ff6b6f; color: #ff6b6f; }

.admin-list--compact .admin-row { grid-template-columns: minmax(0, 1fr) auto; }

@media (max-width: 640px) {
  .admin-row { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .admin-row p { white-space: normal; }
}

.m-admin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: start;
}

.m-card--wide { grid-column: 1 / -1; }

.m-inline-form {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: 0 12px;
  align-items: end;
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.m-inline-form .btn { margin-bottom: 18px; }
.m-inline-form .m-form-error { grid-column: 1 / -1; }

@media (max-width: 860px) {
  .m-admin-grid { grid-template-columns: 1fr; }
  .m-inline-form { grid-template-columns: 1fr; }
}

/* Hinweis-Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  background: var(--paper);
  color: var(--black);
  padding: 12px 18px;
  border-radius: 6px;
  font-weight: 500;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .4);
  z-index: 120;
  animation: fade-up .3s ease;
  max-width: calc(100% - 32px);
}

.toast.is-error { background: #ff6b6f; color: #1a0000; }

@media (max-width: 560px) {
  .m-nav-actions .btn--ghost { display: none; }
}

/* =========================================================
   Einzel-Accounts, Passwort vergessen, Mitgliederverwaltung
   ========================================================= */
.m-form-actions--split { justify-content: space-between; align-items: center; }

.m-link {
  background: none;
  border: 0;
  padding: 4px 0;
  color: rgba(241, 236, 226, .75);
  font: inherit;
  font-size: 15px;
  cursor: pointer;
  border-bottom: 1px solid rgba(241, 236, 226, .3);
}
.m-link:hover { color: var(--paper); border-bottom-color: var(--red); }

.m-form-ok {
  background: rgba(46, 160, 90, .14);
  border: 1px solid rgba(46, 160, 90, .6);
  padding: 12px 14px;
  border-radius: 4px;
  margin: 4px 0 16px;
  font-size: 15px;
  line-height: 1.5;
}

.m-devlink { display: block; margin-top: 8px; color: #f4c15d; }
.m-devlink a, .m-devbox a { color: #f4c15d; word-break: break-all; }

.m-devbox {
  border: 1.5px dashed #f4c15d;
  border-radius: 8px;
  padding: 16px 18px;
  margin-bottom: 22px;
  display: grid;
  gap: 6px;
  font-size: 14px;
}
.m-devbox p { margin: 0; color: var(--muted); }
.m-devbox .icon-btn { justify-self: start; margin-top: 6px; }

/* Avatare & Badges */
.m-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  display: grid;
  place-items: center;
  font-family: var(--f-display);
  font-weight: 900;
  font-size: 18px;
  flex: none;
}

.m-avatar--lg { width: 72px; height: 72px; font-size: 30px; }

.m-profile { display: flex; align-items: center; gap: 20px; }
.m-profile .m-form-title { margin-bottom: 4px; }
.m-profile .m-help { margin: 0; }

.badge {
  display: inline-block;
  vertical-align: middle;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 4px 7px 3px;
  border-radius: 4px;
  border: 1px solid var(--line);
  color: var(--muted);
  margin-left: 6px;
  position: relative;
  top: -2px;
}
.badge--red { background: var(--red); border-color: var(--red); color: #fff; }
.badge--off { border-color: #ff6b6f; color: #ff6b6f; }
.badge--wait { border-color: #f4c15d; color: #f4c15d; }

/* Liste der Accounts */
.m-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.m-search {
  flex: 1 1 280px;
  max-width: 420px;
  font: inherit;
  font-size: 15px;
  color: var(--paper);
  background: #1c1a1a;
  border: 1.5px solid rgba(241, 236, 226, .16);
  border-radius: 999px;
  padding: 11px 18px;
}
.m-search:focus { outline: none; border-color: var(--red); }

.account-row { grid-template-columns: auto minmax(0, 1fr) auto; }
.account-row h4 { font-size: 20px; }
.account-row em { font-style: normal; color: #f4c15d; }
.account-row.is-inactive { opacity: .6; }
.account-row.is-inactive .m-avatar { background: #3a3535; }

.icon-btn--warn:hover { border-color: #f4c15d; color: #f4c15d; }
.icon-btn--ok { border-color: rgba(46, 160, 90, .7); color: #7fd3a0; }
.icon-btn--ok:hover { background: rgba(46, 160, 90, .15); }

.row-actions { flex-wrap: wrap; justify-content: flex-end; }

@media (max-width: 760px) {
  .account-row { grid-template-columns: auto minmax(0, 1fr); }
  .account-row .row-actions { grid-column: 1 / -1; justify-content: flex-start; }
}

/* Dialog */
.m-dialog {
  width: min(480px, calc(100% - 32px));
  background: #181616;
  color: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 28px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
}
.m-dialog::backdrop { background: rgba(10, 9, 9, .75); }
.m-dialog-option p { margin: 0 0 14px; font-size: 15px; color: rgba(241, 236, 226, .8); }
.m-dialog-or {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--muted);
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.m-dialog-or::before, .m-dialog-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.field input[readonly] { opacity: .6; cursor: not-allowed; }

/* =========================================================
   Veranstaltungsbilder & Rückblick
   ========================================================= */
.m-recap {
  border: 1px dashed rgba(241, 236, 226, .22);
  border-radius: 8px;
  padding: 18px 20px 6px;
  margin: 8px 0 18px;
}

.m-recap legend {
  font-family: var(--f-display);
  font-weight: 900;
  font-size: 20px;
  text-transform: uppercase;
  padding: 0 8px;
  margin-left: -8px;
}

.m-recap > .m-help { margin-top: 0; }

.img-manager {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px;
}

.img-tile {
  position: relative;
  aspect-ratio: 1;
  border-radius: 6px;
  overflow: hidden;
  background: #0f0e0e;
  border: 1px solid var(--line);
}

.img-tile-view { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.img-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.img-tile:hover img { transform: scale(1.05); }

.img-tile-del {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 0;
  background: rgba(15, 14, 14, .85);
  color: #fff;
  font-size: 13px;
  cursor: pointer;
  opacity: 0;
  transition: opacity .2s, background .2s;
}

.img-tile:hover .img-tile-del, .img-tile-del:focus-visible { opacity: 1; }
.img-tile-del:hover { background: #d0262c; }
@media (hover: none) { .img-tile-del { opacity: 1; } }

.img-tile--add {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  border: 1.5px dashed rgba(241, 236, 226, .3);
  background: transparent;
  color: var(--muted);
  transition: border-color .2s, color .2s;
}

.img-tile--add:hover { border-color: var(--red); color: var(--paper); }
.img-tile--add span { font-family: var(--f-display); font-weight: 900; font-size: 40px; line-height: 1; }
.img-tile--add small { font-family: var(--f-mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; text-align: center; padding: 0 6px; }

.img-progress { grid-column: 1 / -1; color: #f4c15d; font-size: 14px; }

/* Beitragsbilder: Markierung "schon in der Galerie" + Leiste zum Übernehmen */
.img-tile-badge {
  position: absolute;
  left: 6px;
  bottom: 6px;
  padding: 3px 7px 2px;
  border-radius: 4px;
  background: rgba(15, 14, 14, .85);
  color: #8fd19e;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: .06em;
  text-transform: uppercase;
  pointer-events: none;
}

.nw-gallery {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  margin-top: 4px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(241, 236, 226, .03);
}

.nw-gallery-text { flex: 1 1 220px; display: flex; flex-direction: column; gap: 2px; }
.nw-gallery-text .m-help { margin: 0; }
.nw-gallery select { flex: 1 1 200px; width: auto; min-width: 0; }
.nw-gallery[data-done] select, .nw-gallery[data-done] .btn { display: none; }

.event-thumbs { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }

.event-thumb {
  position: relative;
  width: 76px;
  height: 76px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--line);
  padding: 0;
  background: #0f0e0e;
  cursor: zoom-in;
}

.event-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.event-thumb:hover img { transform: scale(1.08); }
.event-thumb span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(15, 14, 14, .7);
  font-family: var(--f-display);
  font-weight: 900;
  font-size: 22px;
  color: #fff;
}

.event-report { border-left: 3px solid var(--red); padding-left: 12px; }

.badge--ok { border-color: rgba(46, 160, 90, .8); color: #7fd3a0; }
.icon-btn--pub { border-color: rgba(46, 160, 90, .7); color: #7fd3a0; }
.icon-btn--pub:hover { background: rgba(46, 160, 90, .18); border-color: #7fd3a0; }
.admin-row.is-public { border-color: rgba(46, 160, 90, .45); opacity: 1; }

@media (max-width: 640px) {
  .event-thumb { width: 60px; height: 60px; }
}

/* =========================================================
   Termin-Aktionen (Kalender)
   ========================================================= */
.event-actions { display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
.ics-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.ics-btn svg { width: 15px; height: 15px; }
.next-actions .btn svg { width: 16px; height: 16px; }

@media (max-width: 640px) {
  .event .event-actions { grid-column: 2; flex-direction: row; justify-self: start; }
}

/* =========================================================
   Verwaltung der Startseite
   ========================================================= */
.m-subtabs-sep {
  align-self: center;
  margin: 0 4px 0 10px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}

.m-editor-grid { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 22px; align-items: start; }
@media (max-width: 640px) { .m-editor-grid { grid-template-columns: 1fr; } }

.img-pick {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border: 1.5px dashed rgba(241, 236, 226, .3);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  overflow: hidden;
  margin-bottom: 8px;
}
.img-pick--portrait { aspect-ratio: 3 / 4; background: #0f0e0e; }
.img-pick img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.img-pick--portrait img { object-fit: cover; }
.img-pick span {
  position: relative;
  z-index: 1;
  background: rgba(15, 14, 14, .85);
  color: var(--paper);
  padding: 7px 12px;
  border-radius: 999px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.img-pick img:not([hidden]) + span { align-self: end; margin-bottom: 10px; }
.img-pick:hover { border-color: var(--red); }

.cms-row { grid-template-columns: 64px minmax(0, 1fr) auto; }
.cms-thumb { width: 64px; height: 64px; object-fit: contain; background: #fff; border-radius: 6px; }
.cms-thumb--round { object-fit: cover; border-radius: 50%; background: #0f0e0e; }
.cms-price { color: var(--paper); }
.icon-btn[disabled] { opacity: .3; cursor: default; }
.icon-btn.is-on { background: var(--paper); color: var(--black); border-color: var(--paper); }

@media (max-width: 640px) {
  .cms-row { grid-template-columns: 56px minmax(0, 1fr); }
  .cms-row .row-actions { grid-column: 1 / -1; justify-content: flex-start; }
}

/* Aufkleber */
.sticker-admin { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.sticker-tile {
  background: #181616;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.sticker-tile img { height: 110px; width: 100%; object-fit: contain; }
.sticker-tile img.round { border-radius: 50%; width: 110px; align-self: center; object-fit: cover; }
.sticker-actions { display: flex; justify-content: space-between; gap: 4px; }
.sticker-actions .icon-btn { padding: 7px 10px; }

/* Galerie-Alben */
.m-new-album { display: flex; gap: 8px; flex-wrap: wrap; }
.m-new-album input {
  font: inherit;
  font-size: 15px;
  color: var(--paper);
  background: #1c1a1a;
  border: 1.5px solid rgba(241, 236, 226, .16);
  border-radius: 4px;
  padding: 11px 14px;
  min-width: 260px;
}
.m-new-album input:focus { outline: none; border-color: var(--red); }

.album-list { display: grid; gap: 10px; }
.album-card { background: #181616; border: 1px solid var(--line); border-radius: 8px; }
.album-card[open] { border-color: rgba(196, 22, 28, .5); }
.album-card summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  cursor: pointer;
  list-style: none;
}
.album-card summary::-webkit-details-marker { display: none; }
.album-card summary::before { content: "▸"; color: var(--red); transition: transform .2s; }
.album-card[open] summary::before { transform: rotate(90deg); }
.album-name { font-family: var(--f-display); font-weight: 800; font-size: 22px; text-transform: uppercase; }
.album-tools { margin-left: auto; display: flex; flex-wrap: wrap; gap: 6px; }
.album-card .img-manager { padding: 0 16px 16px; }
.m-new-album input[type="date"] { min-width: 0; width: auto; color-scheme: dark; }

/* Datum eines Albums (bestimmt die Reihenfolge auf der Startseite) */
.album-date { display: inline-flex; align-items: center; gap: 8px; cursor: default; }
.album-date span { font-family: var(--f-mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.album-date input {
  font: inherit;
  font-size: 14px;
  color: var(--paper);
  background: #1c1a1a;
  border: 1.5px solid rgba(241, 236, 226, .16);
  border-radius: 4px;
  padding: 5px 8px;
  color-scheme: dark;
}
.album-date input:focus { outline: none; border-color: var(--red); }
.album-date--missing span { color: #f4c15d; }
.album-date--missing input { border-color: rgba(244, 193, 93, .6); }

@media (max-width: 640px) {
  .album-tools { margin-left: 0; width: 100%; }
  .m-new-album input { min-width: 0; flex: 1; }
}

@media (max-width: 640px) { .img-pick { max-width: 240px; } }

/* =========================================================
   Shop: Aufkleber-Preise & Bestellungen
   ========================================================= */
.m-subtabs .filter sup {
  font-family: var(--f-mono);
  font-size: 10px;
  background: #fff;
  color: var(--red);
  border-radius: 999px;
  padding: 1px 6px;
  margin-left: 4px;
  vertical-align: 2px;
}
.m-subtabs .filter:not(.is-active) sup { background: var(--red); color: #fff; }

.sticker-shop { display: flex; gap: 6px; align-items: center; }
.sticker-price {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 8px;
  min-width: 0;
}
.sticker-price span { color: var(--muted); font-size: 13px; }
.sticker-price input {
  width: 100%;
  min-width: 0;
  background: none;
  border: 0;
  color: var(--paper);
  font: inherit;
  font-size: 14px;
  padding: 7px 0;
}
.sticker-price input:focus { outline: none; }
.sticker-price:focus-within { border-color: var(--red); }
.sticker-shop .icon-btn { padding: 7px 8px; font-size: 10px; }

.order-filter { margin-bottom: 0; }

.order {
  background: #181616;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.order.is-open { border-color: rgba(241, 236, 226, .3); }
.order.is-cancelled { opacity: .55; }
.order-head {
  width: 100%;
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 14px 16px;
  background: none;
  border: 0;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.order-head .when { font-family: var(--f-mono); font-size: 12px; letter-spacing: .04em; color: var(--muted); }
.order-head .when b { display: block; color: var(--paper); font-size: 13px; }
.order-head h4 { margin: 0; font-family: var(--f-display); font-weight: 800; font-size: 21px; text-transform: uppercase; line-height: 1.05; }
.order-head p { margin: 2px 0 0; font-size: 14px; color: var(--muted); }
.order-sum { font-family: var(--f-display); font-weight: 800; font-size: 22px; text-align: right; white-space: nowrap; }
.order-sum small { display: block; font-family: var(--f-mono); font-weight: 500; font-size: 10px; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }
.order-head:focus-visible { outline: 2px solid var(--red); outline-offset: -2px; border-radius: 6px; }

.order-body { padding: 4px 16px 16px; border-top: 1px solid var(--line); }
.order-lines { width: 100%; border-collapse: collapse; margin: 10px 0 14px; font-size: 15px; }
.order-lines td { padding: 7px 0; border-bottom: 1px dashed var(--line); vertical-align: top; }
.order-lines td:first-child { width: 48px; font-family: var(--f-mono); color: var(--muted); }
.order-lines td:last-child { text-align: right; white-space: nowrap; }
.order-meta { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 6px 12px; margin: 0 0 16px; font-size: 14px; }
.order-meta dt { font-family: var(--f-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding-top: 2px; }
.order-meta dd { margin: 0; overflow-wrap: anywhere; }
.order-meta a { color: var(--paper); }
.order-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.order-actions .label { color: var(--muted); margin-right: 4px; }
.order-actions [data-odelete] { margin-left: auto; }

@media (max-width: 640px) {
  .order-head { grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; }
  .order-head .when { grid-column: 1 / -1; }
  .order-meta { grid-template-columns: 1fr; gap: 2px; }
  .order-meta dd { margin-bottom: 8px; }
  .order-actions [data-odelete] { margin-left: 0; }
}

.sticker-members { width: 100%; font-size: 10px; padding: 7px 8px; }
.sticker-members.is-on { background: #f4c15d; border-color: #f4c15d; color: var(--black); }

/* Shop ein-/ausblenden (Verwaltung → Fanartikel) */
.shop-switch {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 28px;
  margin-bottom: 28px;
  padding: 20px 24px;
  border-color: rgba(196, 22, 28, .55);
}
.shop-switch.is-off { border-color: var(--line); border-style: dashed; }
.shop-switch > div { flex: 1 1 320px; }
.shop-switch-title { margin: 0 0 6px; font-family: var(--f-display); font-size: 24px; text-transform: uppercase; letter-spacing: .01em; }
.shop-switch .m-help { margin: 0; }

.switch {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 6px 4px;
  background: none;
  border: 0;
  color: var(--paper);
  font: 600 14px/1 var(--f-body);
  cursor: pointer;
}
.switch:disabled { opacity: .5; cursor: progress; }
.switch-track {
  position: relative;
  width: 52px;
  height: 30px;
  flex: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, .16);
  transition: background .2s ease;
}
.switch-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--paper);
  transition: transform .2s cubic-bezier(.3, 1.4, .5, 1);
}
.switch[aria-checked="true"] .switch-track { background: var(--red); }
.switch[aria-checked="true"] .switch-knob { transform: translateX(22px); }
.switch:focus-visible .switch-track { outline: 2px solid var(--paper); outline-offset: 3px; }
.switch-label { min-width: 7.5em; text-align: left; }

/* Aufkleber: Verfügbarkeit */
.sticker-avail {
  flex: 1 1 auto;
  min-width: 0;
  padding: 7px 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: transparent;
  color: var(--paper);
  font: 600 10px/1.2 var(--f-mono);
  text-transform: uppercase;
  letter-spacing: .04em;
  cursor: pointer;
}
.sticker-avail option { background: #181616; color: var(--paper); }
.sticker-avail.is-unavailable { background: #f4c15d; border-color: #f4c15d; color: var(--black); }
.sticker-avail.is-soldout { background: var(--red); border-color: var(--red); color: #fff; }
.sticker-avail:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

/* Mitgliedschaft: Aufnahmeantrag & Beiträge */
#a-membership .m-card + .m-card { margin-top: 14px; }
.pdf-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.pdf-card .m-help { margin: 4px 0 0; }
.pdf-card-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.fee-rows { display: grid; gap: 10px; margin-bottom: 10px; }
.fee-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr) 120px auto;
  gap: 10px;
  align-items: end;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.fee-row .field { margin: 0; }
.fee-row .row-actions { display: flex; gap: 6px; padding-bottom: 4px; }
@media (max-width: 760px) {
  .fee-row { grid-template-columns: minmax(0, 1fr) 110px; }
  .fee-row .field:nth-child(2) { grid-column: 1 / -1; grid-row: 2; }
  .fee-row .row-actions { grid-column: 1 / -1; }
}
/* Spaltenüberschriften nur über der ersten Zeile zeigen (für Screenreader bleiben sie da) */
@media (min-width: 761px) {
  .fee-row + .fee-row label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* Texte der Startseite */
.texts-help { padding: 16px 22px; margin-bottom: 14px; }
.texts-help p { margin: 0; font-size: 14px; color: rgba(241, 236, 226, .8); }
.texts-groups { display: grid; gap: 10px; }
.text-group { background: #181616; border: 1px solid var(--line); border-radius: 8px; }
.text-group summary {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 22px; cursor: pointer; list-style: none;
  font-family: var(--f-display); font-weight: 800; font-size: 21px; text-transform: uppercase;
}
.text-group summary::-webkit-details-marker { display: none; }
.text-group summary::after { content: "▾"; color: var(--red); transition: transform .2s; }
.text-group[open] summary::after { transform: rotate(180deg); }
.text-group summary small {
  margin-left: auto; font-family: var(--f-mono); font-weight: 500; font-size: 11px;
  letter-spacing: .08em; color: var(--red); text-transform: uppercase;
}
.text-group-body { padding: 4px 22px 18px; border-top: 1px solid var(--line); display: grid; gap: 14px; }
.text-field .field { margin: 0; }
.text-field label { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.text-field .m-link { font-size: 13px; padding: 0; }
.text-field.is-changed input, .text-field.is-changed textarea { border-color: var(--red); }
.texts-savebar {
  position: sticky; bottom: 0; z-index: 5;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 14px;
  margin-top: 14px; padding: 14px 0; background: linear-gradient(to top, var(--black) 70%, transparent);
}
.texts-savebar .m-help { margin: 0 auto 0 0; }
.texts-savebar .m-form-error { margin: 0; }
.text-field textarea { min-height: 0; }

/* Verwaltung: Besucher-Statistik */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}
.stat-card { display: flex; flex-direction: column; gap: 4px; padding: 22px 22px 20px; }
.stat-label { font-family: var(--f-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.stat-num {
  font-family: var(--f-display);
  font-weight: 900;
  font-size: clamp(44px, 6vw, 60px);
  line-height: 1;
  margin-top: 10px;
  font-variant-numeric: tabular-nums;
}
.stat-unit { font-size: 15px; color: var(--paper-2); }
.stat-bar { height: 6px; border-radius: 3px; background: rgba(241, 236, 226, .1); margin: 16px 0 8px; overflow: hidden; }
.stat-bar i { display: block; height: 100%; background: var(--red); border-radius: 3px; }
.stat-members { font-size: 14px; color: var(--muted); }
.stat-members b { color: var(--paper); }
.stats-note { margin-top: 18px; max-width: 760px; line-height: 1.5; }

/* Verwaltung: Impressum */
.imp-list { display: grid; gap: 12px; }
.imp-section { display: grid; gap: 4px; padding: 20px 22px; }
.imp-section .field { margin: 0 0 10px; }
.imp-section .row-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.imp-section .icon-btn:disabled { opacity: .35; cursor: default; }
.imp-add { margin-top: 14px; }
#a-impressum .texts-help { margin-bottom: 14px; }
#imp-reset { font-size: 14px; }

/* Fußzeile & Datenschutz-Hinweis im Mitgliederbereich */
.m-privacy { margin: 18px 0 0; font-size: 13px; line-height: 1.5; }
.members-page .footer { border-top: 1px solid var(--line); }

/* Mitgliederwünsche */
.wish-grid { align-items: start; }
#wish-cats { display: flex; flex-wrap: wrap; gap: 8px; }
.wish-cats { margin-bottom: 18px; }
.wish-mine .h-md { margin: 0 0 14px; }
.wish-list { display: grid; gap: 12px; }
.wish { padding: 18px 20px; }
.wish-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 8px; }
.wish-meta .label { color: var(--muted); margin-left: auto; }
.wish h3 { margin: 0 0 6px; font-family: var(--f-display); font-weight: 800; font-size: 21px; text-transform: uppercase; line-height: 1.1; }
.wish p { margin: 0; font-size: 15px; color: rgba(241, 236, 226, .8); overflow-wrap: anywhere; }
.wish-answer { margin-top: 12px; padding: 10px 14px; border-left: 3px solid var(--red); background: rgba(196, 22, 28, .08); border-radius: 0 6px 6px 0; }
.wish-answer .label { display: block; color: var(--red); margin-bottom: 4px; }
.wish .m-link { margin-top: 10px; font-size: 13px; }
.wish-text { margin: 12px 0; font-size: 15px; overflow-wrap: anywhere; }
#admin-wishes .field textarea { min-height: 0; }
