/* =========================================================================
   Ticketsystem Gymnasium Landsberg – Admin-Portal
   Baut auf base.css auf (Tokens + Komponenten). Keine Inline-Styles (CSP).
   Leitlinie: ruhig und dicht – 13px Grundschrift, Haarlinien, kaum Schatten,
   6–8px Radien, Blau nur für Primäraktion und aktive Navigation.
   ========================================================================= */
.adm {
  /* Admin-eigene Feinabstimmung der Basis-Tokens (gilt nur unterhalb von body.adm) */
  --c-ink: #141b26;
  --c-text: #2c3644;
  --c-muted: #5f6b7c;
  --c-faint: #8a94a3;
  --c-line: #e5e8ee;
  --c-line-strong: #d3d8e1;
  --c-bg: #f7f8fa;
  --c-hover: #f3f5f8;
  --c-primary-soft: #eaf2fa;
  --radius: 8px;
  --radius-sm: 6px;
  --shadow: none;
  --shadow-pop: 0 4px 16px rgba(16, 24, 40, .10), 0 0 0 1px rgba(16, 24, 40, .06);
  --tap: 32px;
  --adm-topbar: 48px;
  --adm-side: 208px;
  /* Datenfarben: feste Reihenfolge für Runden (nie zyklisch), VIP = Gold, Status-Farben bleiben reserviert */
  --d-sold: #00549f;
  --d-vip: #c9a227;
  --d-free: #e6e9ef;
  --d-checked: #1a7f43;
  --d-r1: #2a78d6;
  --d-r2: #eb6834;
  --d-r3: #1baf7a;
  --d-r4: #e87ba4;
  --d-r5: #008300;
  --d-r6: #6250d6;
  --d-rx: #7b8494;
  --d-rest: #b9c7da;
  --d-unalloc: #f1c4c0;
  min-height: 100vh;
  font-size: 13px;
  line-height: 1.5;
  background: var(--c-bg);
  color: var(--c-text);
}
@media (pointer: coarse) { .adm { --tap: 44px; } }

.adm :focus-visible { outline: 2px solid var(--c-primary); outline-offset: 2px; border-radius: 4px; }
.adm h1 { font-size: 20px; letter-spacing: -.015em; }
.adm h2 { font-size: 15px; }
.adm h3 { font-size: 14px; }
.adm p { margin: 0 0 .9em; }
.adm .small { font-size: 12px; }
.adm strong { font-weight: 600; }
.adm a { text-underline-offset: 2px; }
.icon { width: 16px; height: 16px; flex: none; vertical-align: -3px; }
.skip-link { position: absolute; left: -999px; top: 8px; z-index: 100; background: #fff; padding: 8px 12px; border-radius: 6px; box-shadow: var(--shadow-pop); }
.skip-link:focus { left: 8px; }
.breakall { overflow-wrap: anywhere; word-break: break-word; }
.pad { padding: 10px 16px; margin: 0; }
.errtext { color: var(--c-err); }
.note { color: var(--c-warn); }
.inline-form { display: inline-flex; margin: 0; }
.count { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 999px; background: #eef0f4; color: var(--c-muted); font-size: 11px; font-weight: 600; line-height: 18px; text-align: center; vertical-align: 1px; font-variant-numeric: tabular-nums; letter-spacing: 0; }
.tnum { font-variant-numeric: tabular-nums; }

/* ---------- Buttons ---------- */
.adm .btn { min-height: var(--tap); padding: 5px 12px; border-radius: 6px; font-size: 13px; font-weight: 500; gap: 6px; transition: background .12s, border-color .12s; }
.adm .btn:active { transform: none; }
.adm .btn .icon, .adm .btn svg { width: 15px; height: 15px; }
.adm .btn--ghost { color: var(--c-ink); border-color: var(--c-line-strong); background: #fff; }
.adm .btn--ghost:hover { background: var(--c-hover); color: var(--c-ink); border-color: #c3cad5; }
.adm .btn--danger-ghost { border-color: #ecc8c5; }
.adm .btn--sm { min-height: 28px; padding: 3px 9px; font-size: 12.5px; }
.adm .btn--lg { min-height: 34px; padding: 6px 16px; font-size: 13px; }
@media (pointer: coarse) { .adm .btn--sm { min-height: 40px; padding: 6px 12px; } .adm .btn--lg { min-height: 44px; } }
.iconbtn { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 6px; background: none; color: var(--c-muted); cursor: pointer; text-decoration: none; flex: none; list-style: none; }
.iconbtn::-webkit-details-marker { display: none; }
.iconbtn:hover, .menu[open] > .iconbtn { background: #eceff3; color: var(--c-ink); }
.iconbtn[disabled] { opacity: .35; cursor: default; background: none; }
.adm .iconbtn--bordered { width: var(--tap); padding: 0; color: var(--c-muted); }
.adm .btn--sm.iconbtn--bordered { width: 28px; }
@media (pointer: coarse) { .adm .btn--sm.iconbtn--bordered { width: 40px; } }
.iconbtn--danger:hover { background: var(--c-err-soft); color: var(--c-err); }
.iconbtn .icon { width: 16px; height: 16px; vertical-align: 0; }
@media (pointer: coarse) { .iconbtn { width: 44px; height: 44px; } .iconbtn .icon { width: 18px; height: 18px; } }

/* ---------- Overflow-Menü (details[data-menu]) ---------- */
.menu { position: relative; display: inline-block; }
.menu > summary { list-style: none; cursor: pointer; }
.menu > summary::-webkit-details-marker { display: none; }
.menu__list { position: absolute; right: 0; top: calc(100% + 4px); z-index: 70; min-width: 208px; padding: 4px; background: #fff; border-radius: 8px; box-shadow: var(--shadow-pop); text-align: left; }
.menu__list.is-fixed { position: fixed; right: auto; }
.menu__form { margin: 0; }
.menu__item { display: flex; align-items: center; gap: 8px; width: 100%; min-height: var(--tap); padding: 5px 10px; border: 0; border-radius: 5px; background: none; font: inherit; font-size: 13px; color: var(--c-ink); text-decoration: none; text-align: left; cursor: pointer; white-space: nowrap; }
.menu__item .icon { color: var(--c-muted); }
.menu__item:hover, .menu__item:focus-visible { background: var(--c-hover); color: var(--c-ink); }
.menu__item--danger, .menu__item--danger .icon { color: var(--c-err); }
.menu__item--danger:hover, .menu__item--danger:focus-visible { background: var(--c-err-soft); color: var(--c-err); }
.menu__sep { height: 1px; margin: 4px 0; background: var(--c-line); }

/* ---------- Forms ---------- */
.adm .field { margin-bottom: 14px; }
.adm .field > label, .adm .label { font-size: 12.5px; font-weight: 500; margin-bottom: 4px; }
.adm .field .hint, .adm .hint { display: block; font-size: 12px; line-height: 1.45; color: var(--c-muted); margin-top: 4px; }
.adm .field .error { font-size: 12px; font-weight: 500; }
.adm .input, .adm .select, .adm .textarea { min-height: var(--tap); padding: 5px 9px; font-size: 13px; border-color: var(--c-line-strong); border-radius: 6px; }
.adm .select { padding-right: 26px; }
.adm .textarea { min-height: 84px; line-height: 1.5; }
.adm .input:focus, .adm .select:focus, .adm .textarea:focus { box-shadow: 0 0 0 3px rgba(0, 84, 159, .14); }
.adm .input::placeholder, .adm .textarea::placeholder { color: var(--c-faint); }
.adm .input--pin { font-size: 14px; letter-spacing: .2em; text-align: left; max-width: 140px; }
@media (pointer: coarse) { .adm .input, .adm .select, .adm .textarea { font-size: 16px; } }
.adm .check { gap: 8px; min-height: 0; padding: 5px 0; }
.adm .check input { width: 15px; height: 15px; margin: 2px 0 0; }
.adm .field > label.check { display: flex; font-size: 13px; font-weight: 400; margin: 0; color: var(--c-text); }
.adm .check strong { font-weight: 500; color: var(--c-ink); }
.adm .check .hint { margin-top: 1px; }
@media (pointer: coarse) { .adm .check { min-height: 44px; align-items: center; } .adm .check input { width: 20px; height: 20px; margin: 0; } }
.adm legend { font-size: 12.5px; font-weight: 500; margin-bottom: 4px; }
.adm fieldset.field > legend + .check { padding-top: 2px; }
.inputrow { display: flex; flex-wrap: wrap; gap: 6px; align-items: stretch; }
.adm fieldset { min-width: 0; }
.adm .grid > * { min-width: 0; }
.adm .btn[data-set-fields] { white-space: normal; text-align: left; margin-top: 8px; }
.formgrid ~ .card { max-width: 900px; }
.inputrow .input { min-width: 0; flex: 1 1 0; }
.inputrow .input--pin { flex: 0 1 160px; }
.adm .inputrow .select { width: auto; flex: 1 1 140px; min-width: 0; max-width: 100%; }
.grid--zipcity { grid-template-columns: minmax(90px, 1fr) 2fr; }
.adm .grid { gap: 0 14px; }
.adm .grid.vipforms, .adm .grid.cols { gap: 16px; }
.field fieldset, fieldset.field { min-width: 0; }
.input.small { font-size: 12px; }

/* Formularseiten: eine Karte, Abschnitte mit kleiner Überschrift links, Felder rechts */
.formgrid { max-width: 900px; background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius); margin-bottom: 16px; }
.formgrid > section.card { margin: 0; padding: 18px 20px 8px; border: 0; border-top: 1px solid var(--c-line); border-radius: 0; background: none; }
.formgrid > section.card:first-of-type { border-top: 0; }
.formgrid > section.card > h2, .formgrid > section.card > h3 { font-size: 14px; margin: 0 0 12px; }
.formgrid > section.card > p.muted { font-size: 12px; }
@media (min-width: 860px) {
  .formgrid > section.card { display: grid; grid-template-columns: 190px minmax(0, 1fr); column-gap: 28px; align-content: start; }
  .formgrid > section.card > * { grid-column: 2; min-width: 0; }
  .formgrid > section.card > h2, .formgrid > section.card > h3 { grid-column: 1; grid-row: 1 / span 40; align-self: start; margin: 4px 0 0; line-height: 1.35; }
}
.formactions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; position: sticky; bottom: 0; z-index: 5; padding: 10px 20px; background: rgba(255, 255, 255, .96); border-top: 1px solid var(--c-line); border-radius: 0 0 var(--radius) var(--radius); }
.subform { max-width: 520px; }

/* ---------- Badges (Chips) + Status ---------- */
.adm .badge { gap: 5px; padding: 0 7px; border-radius: 5px; font-size: 11.5px; font-weight: 500; line-height: 20px; background: #eef0f4; color: #465163; }
.adm .badge--ok { background: #e7f5ec; color: #17693a; }
.adm .badge--warn { background: #fdf3dc; color: #8a5200; }
.adm .badge--err { background: #fdeceb; color: #a5231c; }
.adm .badge--info { background: var(--c-primary-soft); color: var(--c-primary-dark); }
.adm .badge--ok::before, .adm .badge--warn::before, .adm .badge--err::before, .adm .badge--info::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.adm .badge--vip { padding: 0 6px; font-size: 10.5px; line-height: 18px; letter-spacing: .06em; border-radius: 4px; }
.adm h1 .badge, .adm h2 .badge, .adm h3 .badge { vertical-align: 3px; margin-left: 4px; letter-spacing: 0; }
.badge .icon { width: 12px; height: 12px; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #b4bcc8; flex: none; }
.dot--ok { background: #22a05a; }
.dot--warn { background: #e8a015; }
.dot--err { background: #d6362d; }
.dot--info { background: #3b82d6; }
.dot--off { background: #c2c8d2; }
.status { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; color: var(--c-text); }

/* ---------- Alerts (schlanke Inline-Banner) ---------- */
.adm .alert { gap: 8px; padding: 8px 12px; font-size: 13px; line-height: 1.45; border-radius: 6px; }
.adm .alert > .icon { margin-top: 2px; width: 15px; height: 15px; }
.adm .alert a { color: inherit; font-weight: 500; }
.adm .alert--ok { background: #f1faf4; border-color: #c5e6d1; color: #14592f; }
.adm .alert--warn { background: #fffaed; border-color: #f0dba4; color: #6f4500; }
.adm .alert--err { background: #fef5f4; border-color: #f2cdc9; color: #8a1c16; }
.adm .alert--info { background: #f3f8fd; border-color: #c9ddf0; color: #0f4a82; }
.alert--stack { margin: 0 0 10px; }
.alert .check { min-height: 0; padding: 6px 0 0; }
.alerts { display: grid; gap: 6px; margin-bottom: 16px; }
.alerts .alert--stack { margin: 0; }

/* ---------- Top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 40; background: #fff; border-bottom: 1px solid var(--c-line); }
.topbar__row { display: flex; align-items: center; gap: 10px; height: var(--adm-topbar); padding: 0 12px; }
.topbar__menu { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 6px; color: var(--c-ink); flex: none; }
.topbar__menu:hover { background: var(--c-hover); }
.topbar__menu .icon { width: 20px; height: 20px; }
.topbar__brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; color: var(--c-ink); font-weight: 600; font-size: 14px; flex: none; }
.topbar__logo { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 6px; background: var(--c-primary); color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .02em; flex: none; box-shadow: inset 0 -3px 0 var(--c-accent); }
.topbar__name { display: flex; align-items: baseline; gap: 6px; line-height: 1; }
.topbar__name small { font-weight: 400; color: var(--c-muted); font-size: 12px; }
.topbar__search { position: relative; flex: 1 1 auto; min-width: 0; max-width: 360px; margin: 0 auto; }
.adm .topbar__search .input { min-height: 30px; height: 30px; padding: 4px 10px 4px 30px; background: var(--c-bg); border-color: var(--c-line); }
.adm .topbar__search .input:focus { background: #fff; border-color: var(--c-primary); }
.topbar__searchbtn { position: absolute; left: 2px; top: 2px; width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; border: 0; background: none; color: var(--c-faint); cursor: pointer; border-radius: 5px; padding: 0; }
.topbar__searchbtn:hover { color: var(--c-ink); }
.topbar__searchbtn .icon { width: 15px; height: 15px; vertical-align: 0; }
.usermenu { position: relative; flex: none; }
.usermenu summary { list-style: none; display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 6px 0 4px; border-radius: 6px; cursor: pointer; font-weight: 500; color: var(--c-ink); }
.usermenu summary::-webkit-details-marker { display: none; }
.usermenu summary:hover, .usermenu[open] summary { background: var(--c-hover); }
.usermenu summary .icon { width: 14px; height: 14px; color: var(--c-faint); }
.usermenu__avatar { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: #e3e8f0; color: #3b4658; font-size: 11px; font-weight: 600; }
.usermenu__name { max-width: 11em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.usermenu__panel { position: absolute; right: 0; top: calc(100% + 6px); width: 220px; background: #fff; border-radius: 8px; box-shadow: var(--shadow-pop); padding: 4px; z-index: 50; }
.usermenu__who { padding: 8px 10px; border-bottom: 1px solid var(--c-line); margin-bottom: 4px; line-height: 1.35; }
.usermenu__link { display: flex; align-items: center; gap: 8px; width: 100%; min-height: var(--tap); padding: 5px 10px; border: 0; background: none; font: inherit; color: var(--c-ink); text-decoration: none; border-radius: 5px; cursor: pointer; text-align: left; }
.usermenu__link .icon { color: var(--c-muted); }
.usermenu__link:hover { background: var(--c-hover); color: var(--c-ink); }
.usermenu__panel form { margin: 0; }
@media (max-width: 560px) { .usermenu__name, .topbar__name small { display: none; } }
@media (max-width: 400px) { .topbar__name { display: none; } }
@media (pointer: coarse) { .topbar__menu { width: 44px; height: 44px; } .adm .topbar__search .input { height: 36px; min-height: 36px; } .topbar__searchbtn { top: 5px; } .usermenu summary { height: 44px; } }

/* ---------- Shell + side navigation ---------- */
.shell { display: block; }
.sidenav { position: fixed; z-index: 60; inset: 0 auto 0 0; width: min(84vw, 280px); background: #fff; border-right: 1px solid var(--c-line); padding: 12px 10px; overflow-y: auto; transform: translateX(-105%); transition: transform .18s; display: flex; flex-direction: column; visibility: hidden; }
.sidenav.is-open, .sidenav:target { transform: none; visibility: visible; box-shadow: 0 0 40px rgba(16, 24, 40, .18); }
.sidenav ul { list-style: none; margin: 0; padding: 0; }
.sidenav__label { margin: 16px 0 4px; padding: 0 10px; font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--c-faint); }
.sidenav a { display: flex; align-items: center; gap: 9px; min-height: var(--tap); padding: 5px 10px; margin-bottom: 1px; border-radius: 6px; color: var(--c-text); text-decoration: none; font-size: 13px; font-weight: 500; }
.sidenav a .icon { color: var(--c-faint); }
.sidenav a:hover { background: #eceff3; color: var(--c-ink); }
.sidenav a.is-active { background: var(--c-primary-soft); color: var(--c-primary); font-weight: 600; }
.sidenav a.is-active .icon { color: var(--c-primary); }
.sidenav__foot { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--c-line); }
.sidenav__foot a { font-weight: 400; color: var(--c-muted); }
.nav-backdrop { position: fixed; inset: 0; z-index: 55; background: rgba(15, 23, 42, .4); border: 0; }
.main { padding: 16px 16px 56px; width: 100%; max-width: 1156px; margin: 0 auto; outline: none; }
.adm .main:focus-visible { outline: none; }
@media (min-width: 1000px) {
  .topbar__menu, .sidenav__close { display: none !important; }
  .topbar__row { padding: 0 20px 0 16px; }
  .topbar__brand { width: calc(var(--adm-side) - 16px); }
  .topbar__search { margin: 0 auto 0 12px; }
  .shell { display: grid; grid-template-columns: var(--adm-side) minmax(0, 1fr); align-items: start; }
  .sidenav { position: sticky; top: calc(var(--adm-topbar) + 1px); height: calc(100vh - var(--adm-topbar) - 1px); transform: none; visibility: visible; box-shadow: none; width: auto; z-index: 1; background: #fbfbfc; }
  .main { padding: 22px 28px 72px; }
}

/* ---------- Page head, sections ---------- */
.pagehead { display: flex; flex-wrap: wrap; gap: 10px 20px; align-items: flex-end; justify-content: space-between; margin-bottom: 16px; }
.pagehead > div:first-child { flex: 1 1 320px; min-width: 0; }
.pagehead h1, .pagehead h2 { margin: 0; overflow-wrap: anywhere; }
.pagehead h2 { font-size: 15px; }
.pagehead p { margin: 3px 0 0; max-width: 76ch; color: var(--c-muted); }
.pagehead--sub { margin: 0 0 12px; align-items: center; }
.sectiontitle { margin: 24px 0 8px; font-size: 14px; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12px; color: var(--c-faint); margin-bottom: 6px; min-height: 18px; }
.crumbs a, .backlink { color: var(--c-muted); text-decoration: none; }
.crumbs a:hover, .backlink:hover { color: var(--c-primary); text-decoration: underline; }
.crumbs__here { color: var(--c-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 40ch; }
.backlink { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; margin-bottom: 6px; }
.backlink .icon { width: 13px; height: 13px; }
.crumbs .backlink { margin: 0; }
.linkbtn { display: inline; padding: 0; border: 0; background: none; font: inherit; color: var(--c-primary); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.linkbtn:hover { color: var(--c-primary-dark); }
.main > .card, .main > section, .main > .alert, .main > details { margin-bottom: 16px; }
.adm .card { padding: 16px; box-shadow: none; }
.adm .card--flush { padding: 0; overflow: clip; }
.adm .card h2 { font-size: 14px; }
.adm .card h3 { font-size: 13.5px; }
.adm .card__head { padding: 10px 16px; min-height: 48px; gap: 8px 12px; }
.card__head h2, .card__head h3 { margin: 0; }
.adm .card__body { padding: 14px 16px; }
.card__body + .card__body { border-top: 1px solid var(--c-line); }
.card__body > :last-child { margin-bottom: 0; }
.adm .card__body h3 { margin: 16px 0 6px; }
.adm .card__body > h3:first-child, .adm .card__body > form:first-child > h3:first-child { margin-top: 0; }
.vipforms form > .btn, .card > form > .btn { margin-top: 8px; }
.card__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 10px 16px; border-top: 1px solid var(--c-line); font-size: 12px; color: var(--c-muted); }
.card--narrow { max-width: 460px; }
.actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.actions--center { justify-content: center; }
.actions--end { justify-content: flex-end; flex-wrap: nowrap; gap: 2px; }
.dangerzone h2 { color: var(--c-ink); }
.help summary, .chartdata summary, .details summary { cursor: pointer; font-weight: 500; color: var(--c-primary); }
.help ul { margin: 10px 0 0; padding-left: 18px; }
.help li { margin-bottom: 4px; }
.helppanel { margin: 0 0 12px; padding: 12px 16px; background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius); font-size: 12.5px; color: var(--c-text); }
.helppanel ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.pre { margin: 10px 0 0; padding: 12px; background: #141b26; color: #dbe4f0; border-radius: 6px; font-family: var(--mono); font-size: 12px; line-height: 1.5; overflow: auto; max-height: 380px; white-space: pre-wrap; overflow-wrap: anywhere; }
.code { font-size: 12px; letter-spacing: .02em; }
.adm .kv { grid-template-columns: minmax(96px, auto) 1fr; gap: 6px 14px; font-size: 13px; }
.adm .kv dt { font-size: 12.5px; color: var(--c-muted); }
.adm .kv dd { font-weight: 400; }
.adm .divider { margin: 14px 0; }

/* ---------- Flash messages (toasts) ---------- */
.flashes { display: grid; gap: 6px; margin-bottom: 14px; }
.flash { align-items: flex-start; }
.flash__text { flex: 1 1 auto; overflow-wrap: anywhere; }
.flash__close { flex: none; background: none; border: 0; font-size: 18px; line-height: 1; width: 22px; height: 22px; margin: -1px -4px 0 0; border-radius: 5px; cursor: pointer; color: inherit; opacity: .7; }
.flash__close:hover { background: rgba(0, 0, 0, .07); opacity: 1; }
@media (pointer: coarse) { .flash__close { width: 44px; height: 44px; margin: -10px -10px -10px 0; } }
.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 90; background: #141b26; color: #fff; padding: 7px 14px; border-radius: 6px; box-shadow: var(--shadow-pop); font-size: 13px; font-weight: 500; max-width: calc(100vw - 32px); }

/* ---------- Tabs (dünne Unterstreichung) ---------- */
.tabs { margin: 0 0 16px; border-bottom: 1px solid var(--c-line); overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs ul { display: flex; gap: 20px; list-style: none; margin: 0; padding: 0; min-width: max-content; }
.tabs a { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 1px; text-decoration: none; color: var(--c-muted); font-size: 13px; font-weight: 500; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a:hover { color: var(--c-ink); }
.tabs a.is-active { color: var(--c-primary); border-bottom-color: var(--c-primary); }
.adm .tabs a:focus-visible { outline-offset: -2px; }
@media (pointer: coarse) { .tabs a { height: 44px; } }
.eventhead { margin-bottom: 0; }
.eventhead__top { display: flex; flex-wrap: wrap; gap: 10px 20px; justify-content: space-between; align-items: flex-end; margin-bottom: 10px; }
.eventhead__top > div:first-child { flex: 1 1 300px; min-width: 0; }
.eventhead h1 { margin: 0 0 2px; overflow-wrap: anywhere; }
.eventhead__meta { margin: 0 !important; }
.eventhead__actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

/* ---------- Stats tiles (eine Leiste mit Haarlinien) ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius); overflow: hidden; margin-bottom: 16px; }
.stat { padding: 12px 16px; box-shadow: 1px 0 0 var(--c-line), 0 1px 0 var(--c-line); min-width: 0; }
.stat__label { font-size: 12px; color: var(--c-muted); font-weight: 500; }
.stat__value { font-size: 21px; font-weight: 600; color: var(--c-ink); line-height: 1.3; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.stat__sub { font-size: 12px; color: var(--c-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stats + .bar { margin: -8px 0 14px; }

/* ---------- Bars + legend ---------- */
.bar { display: block; width: 100%; height: 6px; border-radius: 999px; overflow: hidden; margin: 6px 0; }
.bar__bg { fill: #e9ecf1; }
.bar__seg--sold { fill: var(--d-sold); }
.bar__seg--full { fill: var(--c-err); }
.bar__seg--vip { fill: var(--d-vip); }
.bar__seg--free { fill: var(--d-free); }
.bar__seg--checked { fill: var(--d-checked); }
.bar__seg--r1 { fill: var(--d-r1); } .bar__seg--r2 { fill: var(--d-r2); } .bar__seg--r3 { fill: var(--d-r3); }
.bar__seg--r4 { fill: var(--d-r4); } .bar__seg--r5 { fill: var(--d-r5); } .bar__seg--r6 { fill: var(--d-r6); }
.bar__seg--rx { fill: var(--d-rx); }
.bar__seg--rest { fill: var(--d-rest); }
.bar__seg--unalloc { fill: var(--d-unalloc); }
.legend { display: flex; flex-wrap: wrap; gap: 2px 16px; list-style: none; margin: 0; padding: 0; font-size: 12px; color: var(--c-muted); }
.legend li { display: inline-flex; align-items: center; gap: 5px; }
.legend strong { font-variant-numeric: tabular-nums; color: var(--c-ink); font-weight: 500; }
.legend__key { width: 8px; height: 8px; border-radius: 2px; flex: none; background: #e7ebf1; }
.legend__key--sold { background: var(--d-sold); } .legend__key--vip { background: var(--d-vip); } .legend__key--free { background: var(--d-free); box-shadow: inset 0 0 0 1px #c2c9d4; }
.legend__key--checked { background: var(--d-checked); }
.legend__key--r1 { background: var(--d-r1); } .legend__key--r2 { background: var(--d-r2); } .legend__key--r3 { background: var(--d-r3); }
.legend__key--r4 { background: var(--d-r4); } .legend__key--r5 { background: var(--d-r5); } .legend__key--r6 { background: var(--d-r6); }
.legend__key--rx { background: var(--d-rx); } .legend__key--rest { background: var(--d-rest); } .legend__key--unalloc { background: var(--d-unalloc); box-shadow: inset 0 0 0 1px var(--c-err); }
.legend__key--none { display: none; }
.barcol { min-width: 150px; }
.barcol .bar { margin: 2px 0; max-width: 260px; }
.barcol .meter { max-width: 200px; }
.table td .status { margin-left: 8px; font-size: 12px; color: var(--c-muted); }
.meter { min-width: 0; }
.meter__num { display: block; font-size: 12.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.meter__num strong { color: var(--c-ink); }
.meter .bar { height: 4px; margin: 3px 0 0; }

/* ---------- Summary strip (Zahlen in einer Zeile) ---------- */
.summary { display: flex; flex-wrap: wrap; gap: 4px 22px; margin: 0; padding: 0; list-style: none; font-size: 12.5px; color: var(--c-muted); }
.summary strong { color: var(--c-ink); font-weight: 600; font-variant-numeric: tabular-nums; margin-left: 4px; }
.alloc { padding: 12px 16px; border-bottom: 1px solid var(--c-line); }
.alloc .bar { margin: 8px 0 7px; }
.alloc .alert { margin: 10px 0 0; }
.alloc .hint { margin-top: 8px; }

/* ---------- Listen mit Rasterzeilen: Runden + Veranstaltungen (Übersicht) ---------- */
.rlist, .elist { list-style: none; margin: 0; padding: 0; }
.rlist__head, .elist__head { display: none; }
.round, .erow { border-top: 1px solid var(--c-line); }
.rlist > .round:first-child, .elist > .erow:first-child { border-top: 0; }
.round__row { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name actions" "meta meta" "booked booked" "code order"; gap: 6px 12px; align-items: center; padding: 12px 14px; }
.round__order { grid-area: order; display: flex; gap: 2px; justify-content: flex-end; }
.round__order .inline-form { display: flex; }
.round__name { grid-area: name; min-width: 0; }
.round__meta { grid-area: meta; display: flex; flex-wrap: wrap; gap: 2px 14px; align-items: center; min-width: 0; }
.round__booked { grid-area: booked; max-width: 260px; }
.round__code { grid-area: code; min-width: 0; }
.round__actions { grid-area: actions; display: flex; align-items: center; gap: 2px; justify-content: flex-end; }
.round__title { display: block; font-weight: 600; color: var(--c-ink); overflow-wrap: anywhere; }
.round__desc { display: block; font-size: 12px; color: var(--c-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.round__period { font-variant-numeric: tabular-nums; white-space: nowrap; }
.round__limits { font-size: 12px; color: var(--c-muted); line-height: 1.35; }
.round__limits span { display: inline-block; white-space: nowrap; margin-right: 8px; }
.round--paused .round__title, .round--ended .round__title { color: var(--c-muted); }
.round__details { padding: 12px 16px 14px; background: #fafbfc; border-top: 1px solid var(--c-line); }
.round__details .kv { grid-template-columns: minmax(110px, auto) 1fr; max-width: 760px; }
.round__toggle .icon { transition: transform .15s; }
.round__toggle[aria-expanded="true"] .icon { transform: rotate(180deg); }
.pinchip { display: inline-flex; align-items: center; gap: 1px; height: 26px; padding: 0 2px 0 8px; border: 1px solid var(--c-line); border-radius: 6px; background: #fafbfc; max-width: 100%; }
.pinchip__code { font-family: var(--mono); font-size: 12.5px; letter-spacing: .1em; color: var(--c-ink); min-width: 4ch; margin-right: 6px; }
.pinchip__code.is-hidden { color: var(--c-faint); letter-spacing: .12em; user-select: none; }
.idchip { display: inline-flex; align-items: center; height: 26px; padding: 0 9px; border: 1px solid var(--c-line); border-radius: 6px; background: #fafbfc; font-family: var(--mono); font-size: 13px; font-weight: 600; color: var(--c-ink); }
.pinchip .iconbtn { width: 22px; height: 22px; border-radius: 4px; }
.pinchip .iconbtn .icon { width: 13px; height: 13px; }
.pinchip .iconbtn[aria-pressed="true"] { color: var(--c-primary); }
@media (pointer: coarse) { .pinchip { height: 46px; } .pinchip .iconbtn { width: 44px; height: 44px; } .pinchip .iconbtn .icon { width: 17px; height: 17px; } }
.wizardstep h3 { display: flex; align-items: center; gap: 8px; }
.stepno { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 5px; background: #eef0f4; color: var(--c-muted); font-size: 11px; font-weight: 600; }
@media (min-width: 1000px) {
  .rlist__head, .round__row { display: grid; grid-template-columns: 20px minmax(140px, 1fr) 92px 176px 132px 118px 112px 118px; grid-template-areas: none; column-gap: 14px; row-gap: 0; align-items: center; padding: 0 12px 0 10px; }
  .rlist--ro .rlist__head, .rlist--ro .round__row { grid-template-columns: minmax(160px, 1fr) 100px 190px 150px 150px 130px 28px; padding-left: 16px; }
  .rlist--ro .round__order { display: none; }
  .rlist__head { height: 34px; border-bottom: 1px solid var(--c-line); font-size: 12px; font-weight: 500; color: var(--c-muted); }
  .round__row { min-height: 50px; }
  .round__row > *, .round__meta > * { grid-area: auto; }
  .round__meta { display: contents; }
  .round__order { flex-direction: column; gap: 0; justify-content: center; }
  .round__order .iconbtn { width: 20px; height: 16px; border-radius: 4px; }
  .round__order .iconbtn .icon { width: 12px; height: 12px; }
  .round__booked { max-width: none; }
  .round__limits span { display: block; margin: 0; }
  .round__row:hover { background: #fafbfc; }
}

/* ---------- Dashboard ---------- */
.livedot { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--c-muted); white-space: nowrap; }
.livedot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #22a05a; animation: adm-pulse 2s infinite; }
@keyframes adm-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.erow { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name actions" "cap cap" "hint hint"; gap: 8px 12px; align-items: center; padding: 12px 14px; }
.erow__name { grid-area: name; min-width: 0; }
.erow__cap { grid-area: cap; min-width: 0; }
.erow__hint { grid-area: hint; min-width: 0; font-size: 12.5px; }
.erow__actions { grid-area: actions; display: flex; align-items: center; gap: 2px; justify-content: flex-end; }
.erow__title { font-weight: 600; color: var(--c-ink); text-decoration: none; overflow-wrap: anywhere; }
.erow__title:hover { color: var(--c-primary); text-decoration: underline; }
.erow__sub { display: block; font-size: 12px; color: var(--c-muted); }
.erow__name .badge { margin-left: 4px; vertical-align: 1px; }
.erow__cap .legend { margin-top: 0; }
.erow__cap .bar { margin: 4px 0 5px; }
.roundhint { display: flex; flex-wrap: wrap; gap: 2px 6px; align-items: center; line-height: 1.5; }
.roundhint strong { font-weight: 500; color: var(--c-ink); }
.roundhint + .roundhint, .roundhint + .checkin, .checkin + .roundhint { margin-top: 2px; }
.checkin { font-size: 12.5px; }
.checkin__label { display: flex; flex-wrap: wrap; gap: 2px 6px; align-items: center; }
.checkin .bar { height: 4px; margin: 3px 0 0; max-width: 260px; }
@media (min-width: 900px) {
  .erow { grid-template-columns: minmax(180px, 1.15fr) minmax(200px, 1fr) minmax(200px, 1.1fr) auto; grid-template-areas: none; gap: 0 20px; padding: 10px 12px 10px 16px; min-height: 58px; }
  .erow > * { grid-area: auto; }
  .erow:hover { background: #fafbfc; }
}

/* ---------- Empty state ---------- */
.empty { text-align: center; padding: 32px 20px; color: var(--c-muted); }
.empty > .icon { width: 24px; height: 24px; color: #a9b2c0; margin-bottom: 8px; stroke-width: 1.5; }
.adm .empty h3 { margin: 0 0 4px; font-size: 14px; color: var(--c-ink); }
.empty p { max-width: 52ch; margin: 0 auto 12px; }
.empty > p:last-child { margin-bottom: 0; }

/* ---------- Tables ---------- */
.adm .table { font-size: 13px; }
.adm .table th, .adm .table td { padding: 8px 12px; border-bottom: 1px solid var(--c-line); }
.adm .table th:first-child, .adm .table td:first-child { padding-left: 16px; }
.adm .table th:last-child, .adm .table td:last-child { padding-right: 16px; }
.adm .table th { height: 34px; padding-top: 0; padding-bottom: 0; font-size: 12px; font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--c-muted); background: #fbfbfc; }
.adm .table tbody tr:last-child td { border-bottom: 0; }
.adm .table tbody tr:hover { background: #fafbfc; }
.adm .table .small { line-height: 1.4; }
.table tr[data-href] { cursor: pointer; }
.rowtitle { font-weight: 600; color: var(--c-ink); text-decoration: none; }
.rowtitle:hover { color: var(--c-primary); text-decoration: underline; }
.rowtitle.mono { font-weight: 500; font-size: 12.5px; }
.rowlink { color: var(--c-ink); text-decoration: none; font-weight: 500; }
.rowlink:hover { color: var(--c-primary); text-decoration: underline; }
.table td .actions { gap: 4px; flex-wrap: nowrap; }
.table td.col-actions, .table th.col-actions { width: 1%; white-space: nowrap; text-align: right; }
.table tr.is-cancelled td { color: var(--c-faint); }
.table tr.is-cancelled .rowtitle, .table tr.is-cancelled .rowlink, .table tr.is-cancelled .code { text-decoration: line-through; color: var(--c-muted); }
.table tr.is-error { background: var(--c-err-soft); }
.sortlink { color: inherit; text-decoration: none; display: inline-flex; gap: 4px; align-items: center; min-height: 24px; }
.sortlink span { font-size: 9px; }
.sortlink:hover, .sortlink.is-active { color: var(--c-ink); }
.rowcheck { width: 15px; height: 15px; accent-color: var(--c-primary); vertical-align: middle; }
@media (pointer: coarse) { .rowcheck { width: 22px; height: 22px; } }
.tablefoot { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; border-top: 1px solid var(--c-line); background: #fbfbfc; padding: 10px 16px !important; }
.tablefoot .check { min-height: 0; padding: 0; align-items: center; }
.tablefoot .check input { margin: 0; }
.tablefoot .hint { flex: 1 1 100%; margin: 0; }
@media (min-width: 1100px) {
  /* Kopfzeile bleibt beim Scrollen der Seite stehen (die Karte clippt nur, sie scrollt nicht) */
  .table--sticky thead th { position: sticky; top: var(--adm-topbar); z-index: 2; box-shadow: 0 1px 0 var(--c-line); }
  .table-wrap--free { overflow: visible; }
}
@media (max-width: 760px) {
  .table--stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .table--stack, .table--stack tbody, .table--stack tr, .table--stack td { display: block; width: 100%; }
  .adm .table--stack tr { padding: 8px 14px; border-bottom: 1px solid var(--c-line); }
  .adm .table--stack tbody tr:last-child { border-bottom: 0; }
  .adm .table--stack td { position: relative; border: 0; padding: 3px 0 3px 38%; min-height: 26px; text-align: right; overflow-wrap: anywhere; }
  .adm .table--stack td:first-child, .adm .table--stack td:last-child { padding-left: 38%; padding-right: 0; }
  .table--stack td::before { content: attr(data-label); position: absolute; left: 0; top: 4px; width: 36%; text-align: left; font-size: 12px; color: var(--c-muted); }
  .table--stack td:empty { display: none; }
  .table--stack td .actions { justify-content: flex-end; flex-wrap: wrap; }
  .table--stack td.col-actions { width: 100%; }
  .table--stack .num { text-align: right; }
  .adm .table--stack td.cell-main, .adm .table--stack td.cell-main:first-child { padding-left: 0; text-align: left; }
  .table--stack td.cell-main::before { display: none; }
}

/* Buchungsliste auf dem Handy: kompakte Karte je Buchung statt neun Zeilen */
@media (max-width: 760px) {
  .adm .table--bookings tr { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 10px 14px; }
  .adm .table--bookings td, .adm .table--bookings td:first-child, .adm .table--bookings td:last-child { width: auto; min-height: 0; padding: 0; text-align: left; }
  .table--bookings td::before { display: none; }
  .table--bookings .b-name { order: 1; flex: 1 1 60%; min-width: 0; font-size: 14px; }
  .table--bookings .b-status { order: 2; margin-left: auto; }
  .table--bookings .b-number { order: 3; flex: 1 1 100%; }
  .table--bookings .b-round { order: 4; color: var(--c-muted); }
  .table--bookings .b-kind { order: 5; }
  .table--bookings .b-mail { order: 6; }
  .adm .table--bookings tr::after { content: ""; order: 6; flex: 1 1 100%; height: 0; }
  .adm .table--bookings .b-tickets, .adm .table--bookings .b-checked, .adm .table--bookings .b-date { color: var(--c-muted); font-size: 12px; }
  .table--bookings .b-tickets { order: 7; }
  .table--bookings .b-checked { order: 8; }
  .adm .table--bookings .b-date { order: 9; margin-left: auto; }
  .table--bookings .b-tickets::before { display: inline; position: static; content: "Tickets: "; font-size: 12px; }
  .table--bookings .b-checked::before { display: inline; position: static; content: "· eingelassen: "; font-size: 12px; }
  .table--bookings .b-round:empty { display: none; }
}
/* ---------- Filters + pager + chips ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 12px; border-bottom: 1px solid var(--c-line); background: #fff; align-items: center; }
.filters__search { flex: 1 1 200px; min-width: 0; }
.adm .filters .select { width: auto; flex: 0 1 auto; max-width: 100%; min-width: 0; }
.adm .filters .input, .adm .filters .select { min-height: 30px; }
.adm .filters .btn { min-height: 30px; }
@media (min-width: 761px) { .adm .filters .select { max-width: 230px; } }
@media (max-width: 760px) { .adm .filters .select { flex: 1 1 140px; } }
.table td a.mono { white-space: nowrap; }
@media (pointer: coarse) { .adm .filters .input, .adm .filters .select, .adm .filters .btn { min-height: 44px; } }
.pager { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; padding: 10px; border-top: 1px solid var(--c-line); }
.pager__link { display: inline-flex; align-items: center; justify-content: center; min-width: 28px; height: 28px; padding: 0 8px; border-radius: 6px; border: 1px solid transparent; text-decoration: none; font-weight: 500; font-size: 12.5px; color: var(--c-text); font-variant-numeric: tabular-nums; }
.pager__link:hover { background: var(--c-hover); color: var(--c-ink); }
.pager__link.is-current { background: var(--c-primary-soft); color: var(--c-primary); }
.pager__gap { align-self: center; color: var(--c-muted); }
@media (pointer: coarse) { .pager__link { min-width: 44px; height: 44px; } }
.chips { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0 0 14px; }
.chip { display: inline-flex; gap: 6px; align-items: center; height: 24px; padding: 0 9px; border-radius: 6px; background: #fff; border: 1px solid var(--c-line); text-decoration: none; color: var(--c-muted); font-size: 12px; }
.chip strong { color: var(--c-ink); font-weight: 500; font-variant-numeric: tabular-nums; }
.chip:hover { border-color: #c3cad5; color: var(--c-ink); }
.chip.is-active { border-color: var(--c-primary); color: var(--c-primary); background: var(--c-primary-soft); }
@media (pointer: coarse) { .chip { height: 40px; padding: 0 12px; } }

/* ---------- VIP ---------- */
.created { border-color: #c5e6d1; background: #f1faf4; }
.created h3 { display: flex; gap: 6px; align-items: center; color: #14592f; }
.createdlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.createdlist li { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; justify-content: space-between; background: #fff; border: 1px solid #c5e6d1; border-radius: 6px; padding: 7px 10px; }
.vipforms { align-items: start; margin-bottom: 16px; }
@media (min-width: 640px) and (max-width: 1160px) { .vipforms.grid--2 { grid-template-columns: 1fr; } }
.vipforms .grid--3 { grid-template-columns: 1fr; }
@media (min-width: 520px) { .vipforms .grid--3 { grid-template-columns: 1fr 1fr 1fr; } }
.vipforms .card > h3 { margin-bottom: 12px; }
.bulkconfirm { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.bulkconfirm .check { min-height: 0; padding: 0; }

/* ---------- Booking detail ---------- */
.detailgrid { display: grid; gap: 16px; align-items: start; }
.detailgrid > * { min-width: 0; }
.detailgrid .stack > * + * { margin-top: 16px; }
@media (min-width: 1040px) { .detailgrid { grid-template-columns: 320px minmax(0, 1fr); } }
@media (max-width: 1039px) { .detailgrid > aside { order: 2; } }
.sidecard h2 { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 10px; }
.sidecard .field:last-child { margin-bottom: 0; }
.mailframe { display: block; width: 100%; height: 70vh; min-height: 420px; border: 0; background: #fff; }

/* ---------- Charts ---------- */
.chart { display: block; width: 100%; height: auto; max-height: 260px; margin-top: 4px; }
.chart__grid { stroke: #eceff3; stroke-width: 1; }
.chart__grid--base { stroke: #c2c8d2; }
.chart__tick { font-size: 10.5px; fill: var(--c-muted); font-family: var(--font); }
.chart__value { font-size: 11px; font-weight: 600; fill: var(--c-ink); font-family: var(--font); }
.chart__bar { fill: var(--d-sold); }
.chart__hit { fill: transparent; }
.chart__hit:hover { fill: rgba(0, 84, 159, .06); }
.chart__line { fill: none; stroke: var(--d-checked); stroke-width: 1.75; stroke-linejoin: round; stroke-linecap: round; }
.chart__area { fill: rgba(26, 127, 67, .08); }
.chart__dot { fill: var(--d-checked); stroke: #fff; stroke-width: 1.5; }
.chartdata { margin-top: 8px; font-size: 12.5px; }
.chartdata .table-wrap { max-height: 280px; overflow: auto; margin-top: 8px; border: 1px solid var(--c-line); border-radius: 6px; }
.chartgrid { display: grid; gap: 16px; margin-bottom: 16px; }
.chartgrid > .card { margin: 0; min-width: 0; }
.chartgrid .card > h2 { margin-bottom: 2px; }
@media (min-width: 1040px) { .chartgrid { grid-template-columns: 1fr 1fr; } }

/* ---------- Dialogs ---------- */
.adm dialog.modal { border-radius: 10px; width: min(520px, calc(100vw - 24px)); font-size: 13px; }
.adm dialog.modal::backdrop { background: rgba(15, 23, 42, .4); }
dialog.modal[open] { display: flex; flex-direction: column; }
dialog.modal > form { display: flex; flex-direction: column; min-height: 0; margin: 0; }
dialog.modal .modal__body { min-height: 0; }
dialog.modal .modal__body > :last-child { margin-bottom: 0; }
dialog.modal .modal__foot form { margin: 0; }
.adm .modal__head { padding: 12px 16px; }
.adm .modal__head h3 { font-size: 14px; }
.adm .modal__foot { padding: 10px 16px; gap: 8px; background: #fbfbfc; }
.adm .modal__close { width: 28px; height: 28px; border-radius: 6px; font-size: 20px; }
@media (pointer: coarse) { .adm .modal__close { width: 44px; height: 44px; } }
/* Fallback ohne JavaScript / ohne <dialog>-Unterstützung: per Sprungmarke einblenden */
dialog.modal:not([open]):target { display: block; position: static; width: auto; max-height: none; margin: 16px 0; border: 1px solid var(--c-primary); }

/* ---------- Login / Setup ---------- */
.adm--bare > .brandbar { height: 2px; background: var(--c-primary); }
.auth { min-height: calc(100vh - 2px); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 16px; }
.adm .auth__card { width: 100%; max-width: 380px; padding: 24px; }
.auth__brand { display: flex; gap: 10px; align-items: center; margin-bottom: 20px; line-height: 1.3; }
.auth__brand .topbar__logo { width: 32px; height: 32px; font-size: 13px; border-radius: 8px; }
.adm .auth__card h1 { font-size: 18px; margin-bottom: 4px; }
.auth__card .alert { margin-bottom: 14px; }
.auth__card .stack > * + * { margin-top: 0; }
.auth__card .btn--block { margin-top: 6px; }
.auth__foot { margin-top: 14px; }

/* ---------- Zugangscode-Aushang (Druckansicht) ---------- */
.adm--print { background: #eef0f4; }
.adm--print > .brandbar { display: none; }
.printbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 8px 16px; background: #fff; border-bottom: 1px solid var(--c-line); }
.sheet { background: #fff; width: min(100% - 24px, 190mm); margin: 20px auto; padding: clamp(20px, 6vw, 20mm) clamp(18px, 5vw, 18mm); border: 1px solid var(--c-line); border-radius: 4px; text-align: center; color: #111; page-break-after: always; break-after: page; }
.sheet__brand { display: flex; align-items: center; justify-content: center; gap: 10px; font-weight: 600; color: var(--c-primary); letter-spacing: .08em; text-transform: uppercase; font-size: 12px; margin-bottom: 34px; }
.sheet__brand::before, .sheet__brand::after { content: ""; flex: 1 1 0; height: 1px; background: #d3d8e1; }
.adm .sheet h1 { font-size: clamp(24px, 5vw, 34px); font-weight: 600; letter-spacing: -.02em; margin-bottom: 8px; overflow-wrap: anywhere; color: #111; }
.sheet__when { font-size: 15px; color: #444; margin: 0 !important; }
.sheet__round { margin: 30px 0 22px; display: flex; flex-direction: column; gap: 3px; }
.sheet__round span, .sheet__label { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: #666; font-weight: 600; }
.sheet__round strong { font-size: clamp(20px, 4.5vw, 26px); font-weight: 600; overflow-wrap: anywhere; }
.sheet__round em { color: #555; font-style: normal; font-size: 14px; }
.sheet__grid { display: grid; gap: 22px; align-items: center; margin: 0 0 28px; }
@media (min-width: 620px) { .sheet__grid { grid-template-columns: 1.35fr 1fr; } }
.sheet__pinwrap { border: 1.5px solid #111; border-radius: 12px; padding: 22px 12px 18px; }
.sheet__pin { font-size: clamp(44px, 13vw, 76px); font-weight: 600; letter-spacing: .14em; padding-left: .14em; line-height: 1.15; margin: 4px 0 8px; overflow-wrap: anywhere; }
.sheet__period { font-size: 13px; color: #444; margin-top: 3px; }
.sheet__qr svg { width: min(100%, 200px); height: auto; display: block; margin: 0 auto 8px; }
.sheet__steps { text-align: left; max-width: 500px; margin: 0 auto 24px; padding-left: 22px; font-size: 15px; line-height: 1.55; }
.sheet__steps li { margin-bottom: 6px; padding-left: 4px; overflow-wrap: anywhere; }
.sheet__foot { color: #666; font-size: 12.5px; margin: 0 !important; padding-top: 16px; border-top: 1px solid #e3e6eb; }

@media print {
  .topbar, .sidenav, .flashes, .tabs, .formactions, .printbar, .crumbs { display: none !important; }
  .shell { display: block; }
  .main { padding: 0; max-width: none; }
  .adm, .adm--print { background: #fff; }
  .sheet { border: 0; margin: 0 auto; width: 100%; border-radius: 0; }
  .sheet:last-of-type { page-break-after: auto; break-after: auto; }
  .sheet__grid { grid-template-columns: 1.35fr 1fr; }
  a { color: inherit; text-decoration: none; }
}
