/*
 * M-Net – Gestaltung (Version 2.2)
 *
 * Wird als letzte Stilvorlage auf allen Verwaltungsseiten geladen
 * (<body class="ds">). Legt Schriften, Farben und das Seitengerüst fest
 * und vereinheitlicht die älteren Seiten. Farben kommen aus verein.jsonc:
 * #1c60ab (Hauptfarbe), #1d2327 (Kopfleiste), #c8102e (Signalfarbe) werden
 * beim Ausliefern ersetzt.
 *
 * Gerüst:
 *   ┌ .container1  Kopfleiste (dunkel) ───────────────────────────────┐
 *   ├──────── Streifen Hauptfarbe + Signalfarbe ──────────────────────┤
 *   │ .menu        │  Inhalt (weiße Fläche auf hellgrauem Grund)      │
 *   └──────────────┴──────────────────────────────────────────────────┘
 */

/* ------------------------------------------------------------ Schriften */
@font-face {
  font-family: 'Public Sans';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/public-sans-latin-wght-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Public Sans';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/public-sans-latin-ext-wght-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Public Sans';
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/public-sans-latin-wght-italic.woff2') format('woff2');
}
@font-face {
  font-family: 'Material Symbols Outlined';
  font-style: normal;
  font-weight: 100 700;
  font-display: block;
  src: url('/fonts/material-symbols-outlined.woff2') format('woff2');
}

/* ------------------------------------------------------------ Farben & Maße */
:root {
  --primaer: #1c60ab;
  --primaer-dunkel: color-mix(in srgb, var(--primaer) 82%, #000);
  --primaer-hell: color-mix(in srgb, var(--primaer) 9%, #fff);
  --primaer-mittel: color-mix(in srgb, var(--primaer) 22%, #fff);
  --kopf: #1d2327;
  --signal: #c8102e;
  --signal-hell: color-mix(in srgb, var(--signal) 9%, #fff);
  --ok: #2f7d4f;
  --ok-hell: #e5f2ea;
  --warn: #9a6200;
  --warn-hell: #fdf3dc;

  --tinte: #17232d;
  --tinte-2: #3d4c58;
  --tinte-3: #5b6873;
  --flaeche: #ffffff;
  --grund: #eef2f5;
  --grund-2: #f6f8fa;
  --linie: #d5dde4;
  --linie-2: #e7ecf0;

  --r-klein: 6px;
  --r-gross: 10px;
  --schatten: 0 1px 2px rgba(23, 35, 45, .06), 0 1px 1px rgba(23, 35, 45, .04);
  --schatten-hoch: 0 12px 32px rgba(23, 35, 45, .18), 0 2px 6px rgba(23, 35, 45, .08);

  --kopf-h: 60px;
  --streifen: 5px;
  --menue-b: 248px;

  /* Bezeichnungen aus app.css auf die neuen Werte umlenken */
  --blau: var(--primaer);
  --blau-dunkel: var(--primaer-dunkel);
  --blau-hell: var(--primaer-hell);
  --menue: var(--kopf);
  --gruen: var(--ok);
  --gruen-dunkel: #24623d;
  --rot: var(--signal);
  --grau: var(--tinte-3);
  --grau-hell: var(--grund-2);
  --rahmen: var(--linie);
  --text: var(--tinte);
  --radius: var(--r-klein);
}

/* ------------------------------------------------------------ Grundlagen */
html { -webkit-text-size-adjust: 100%; }
body.ds {
  font-family: 'Public Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: var(--tinte);
  background: var(--grund);
  margin: 0;
  padding: 0;
  display: block;
  height: auto;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  /* ältere Skripte setzen body auf display:flex */
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
}
body.ds *, body.ds *::before, body.ds *::after { box-sizing: border-box; }
/* ältere Stilvorlagen setzen Arial/Roboto an vielen Stellen */
body.ds .container2 :not(.material-symbols-outlined),
body.ds .modal :not(.material-symbols-outlined),
body.ds .formular :not(.material-symbols-outlined) { font-family: inherit; }
body.ds :where(h1, h2, h3, h4, p, label, td, th, li, a, button, input, select, textarea, legend) {
  font-family: inherit;
}
body.ds :where(h1, h2, h3, h4) { color: var(--tinte); letter-spacing: -0.01em; line-height: 1.25; }
body.ds :where(a) { color: var(--primaer); }
body.ds :where(a:hover) { color: var(--primaer-dunkel); }
body.ds ::selection { background: var(--primaer-mittel); }
body.ds :focus-visible { outline: 2px solid var(--primaer); outline-offset: 2px; }

body.ds .material-symbols-outlined {
  font-family: 'Material Symbols Outlined';
  font-weight: normal;
  font-style: normal;
  font-size: 20px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  direction: ltr;
  font-feature-settings: 'liga';
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  width: 1em;
  overflow: hidden;
  flex-shrink: 0;
  vertical-align: middle;
  margin: 0;
  -webkit-font-smoothing: antialiased;
}

/* ------------------------------------------------------------ Kopfleiste */
body.ds .container1 {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  max-width: none;
  height: calc(var(--kopf-h) + var(--streifen));
  margin: 0;
  padding: 0 20px var(--streifen);
  border-radius: 0;
  background: var(--kopf);
  color: #fff;
  box-shadow: none;
}
/* Streifen wie die Beklebung eines Einsatzboots */
body.ds .container1::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: var(--streifen);
  background: linear-gradient(to bottom, var(--primaer) 0 3px, var(--signal) 3px 100%);
}
body.ds .container1 > img,
body.ds .container1 > a > img {
  width: 40px;
  height: 40px;
  max-height: none;
  margin: 0;
  padding: 3px;
  border-radius: 8px;
  background: #fff;
  object-fit: contain;
  flex-shrink: 0;
}
body.ds .container1 .LV-Schrift {
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: auto;
  flex: 1;
  min-width: 0;
  place-self: auto;
}
body.ds .container1 h1,
body.ds .container1 h2 {
  margin: 0;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
body.ds .container1 h1 { font-size: 16px; font-weight: 650; letter-spacing: 0; }
body.ds .container1 h2 { font-size: 13px; font-weight: 400; color: rgba(255, 255, 255, .68); }

/* Schaltflächen rechts in der Kopfleiste */
body.ds .container1 .home_button,
body.ds .ds-kopf-aktionen {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 4px;
  margin: 0;
}
body.ds .container1 .home_button a,
body.ds .ds-kopf-aktionen a,
body.ds .ds-kopf-aktionen button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 10px;
  border: 0;
  border-radius: var(--r-klein);
  background: transparent;
  color: rgba(255, 255, 255, .86);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
}
body.ds .container1 .home_button a:hover,
body.ds .ds-kopf-aktionen a:hover,
body.ds .ds-kopf-aktionen button:hover { background: rgba(255, 255, 255, .1); color: #fff; }
body.ds .container1 .home_button .material-symbols-outlined,
body.ds .ds-kopf-aktionen .material-symbols-outlined {
  font-size: 22px;
  color: inherit;
  background: none;
  padding: 0;
  border-radius: 0;
  margin: 0;
}
body.ds .ds-kopf-aktionen .ds-name { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.ds .ds-menue-knopf { display: none !important; }
body.ds .container1 :focus-visible { outline-color: #fff; }

/* ------------------------------------------------------------ Gerüst */
body.ds .container2 {
  display: grid;
  grid-template-columns: var(--menue-b) minmax(0, 1fr);
  align-items: start;
  width: 100%;
  max-width: none;
  height: auto;
  min-height: calc(100vh - var(--kopf-h) - var(--streifen));
  margin: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
body.ds .container2:not(:has(> .menu)) { grid-template-columns: minmax(0, 1fr); }

/* Seitenleiste */
body.ds .container2 > .menu {
  position: sticky;
  top: calc(var(--kopf-h) + var(--streifen));
  align-self: stretch;
  display: block;
  width: auto;
  max-width: none;
  max-height: calc(100vh - var(--kopf-h) - var(--streifen));
  margin: 0;
  padding: 18px 12px 24px;
  overflow-y: auto;
  background: var(--flaeche);
  border-right: 1px solid var(--linie);
  color: var(--tinte-2);
}
body.ds .menu ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; font-size: 14px; font-weight: 500; }
body.ds .menu li { margin: 0; background: none; border-radius: var(--r-klein); }
body.ds .menu li a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 9px 12px;
  border-radius: var(--r-klein);
  color: var(--tinte-2);
  text-decoration: none;
  line-height: 1.3;
  white-space: normal;
}
body.ds .menu li a .material-symbols-outlined { color: var(--tinte-3); font-size: 20px; margin: 0; }
body.ds .menu li:hover a:hover,
body.ds .menu li a:hover { background: var(--grund-2); color: var(--tinte); }
body.ds .menu li.selected,
body.ds .selected { background: none; }
body.ds .menu li.selected a { background: var(--primaer-hell); color: var(--primaer-dunkel); font-weight: 650; }
body.ds .menu li.selected a .material-symbols-outlined { color: var(--primaer); font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24; }
body.ds .menu li.selected a::before {
  content: '';
  position: absolute;
  left: -12px; top: 8px; bottom: 8px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--primaer);
}
body.ds .menu .ds-menue-titel {
  display: block;
  padding: 0 12px 10px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--linie-2);
  font-size: 13px;
  font-weight: 650;
  color: var(--tinte);
}

/* Inhalt: jedes Element neben der Seitenleiste wird zur Arbeitsfläche */
body.ds .container2 > :not(.menu):not(script):not(.modal):not(.formular):not([class*="modal"]):not(dialog) {
  min-width: 0;
  width: auto;
  max-width: none;
  height: auto;
  margin: 24px 28px 28px;
  padding: 26px 30px 30px;
  background: var(--flaeche);
  border: 1px solid var(--linie);
  border-radius: var(--r-gross);
  box-shadow: var(--schatten);
  overflow-x: auto;
}
body.ds .container2 > :not(.menu) ~ :not(.menu):not(script):not(.modal):not([class*="modal"]) { margin-top: 0; }
/* Seiten, deren Inhalt aus mehreren Spalten-Elementen besteht */
body.ds .container2 > .ds-inhalt { display: block; }

/* app.css-Seiten: Inhaltsbereich */
body.ds .app-content { padding: 26px 30px 30px; }
body.ds.app .container2 > .app-content { overflow-x: visible; }

/* Übersichtsseiten ohne eigenen Inhalt (shell.js füllt sie) */
body.ds .ds-uebersicht h2 { margin: 0 0 4px; font-size: 24px; font-weight: 650; }
body.ds .ds-uebersicht > p { margin: 0 0 22px; color: var(--tinte-3); }

/* ------------------------------------------------------------ Kacheln (Bereiche) */
body.ds .ds-kacheln {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 12px;
}
body.ds .ds-kachel {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  min-height: 84px;
  padding: 16px;
  border: 1px solid var(--linie);
  border-radius: var(--r-gross);
  background: var(--flaeche);
  color: var(--tinte);
  text-decoration: none;
  transition: border-color .12s, box-shadow .12s;
}
body.ds .ds-kachel:hover { border-color: var(--primaer); box-shadow: 0 0 0 3px var(--primaer-hell); color: var(--tinte); }
body.ds .ds-kachel .material-symbols-outlined {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--primaer-hell);
  color: var(--primaer);
  font-size: 22px;
}
body.ds .ds-kachel strong { display: block; font-size: 15px; font-weight: 650; margin-bottom: 2px; }
body.ds .ds-kachel span.ds-kachel-text { display: block; font-size: 13px; color: var(--tinte-3); line-height: 1.4; }
body.ds .ds-kachel.extern .material-symbols-outlined { background: var(--grund-2); color: var(--tinte-2); }

/* ------------------------------------------------------------ Überschriften älterer Seiten */
body.ds .mec-month-divider { margin: 0 0 18px; text-align: left; position: static; }
body.ds .mec-month-divider::before,
body.ds .mec-month-divider::after,
body.ds .mec-month-divider h2::before,
body.ds .mec-month-divider span::before,
body.ds .mec-month-divider h2::after { display: none; content: none; }
body.ds .mec-month-divider h2,
body.ds .mec-month-divider span,
body.ds .table-container > h2,
body.ds .container2 h1#ueberschrift {
  display: block;
  margin: 0;
  padding: 0;
  background: none;
  border: 0;
  font-size: 24px;
  font-weight: 650;
  text-transform: none;
  letter-spacing: -0.01em;
  color: var(--tinte);
  text-align: left;
}
body.ds .headform h2, body.ds .form-container h2, body.ds .abnahme h2 {
  font-size: 22px; font-weight: 650; text-transform: none; text-align: left; color: var(--tinte); margin: 0 0 16px;
}

/* ------------------------------------------------------------ Formularelemente (gilt überall, geringe Spezifität) */
body.ds :where(input:not([type=checkbox], [type=radio], [type=file], [type=submit], [type=button], [type=range], [type=color], [type=image], [type=reset]), select, textarea) {
  font: inherit;
  font-size: 14px;
  min-height: 38px;
  padding: 7px 10px;
  border: 1px solid var(--linie);
  border-radius: var(--r-klein);
  background: var(--flaeche);
  color: var(--tinte);
  box-shadow: inset 0 1px 1px rgba(23, 35, 45, .03);
  max-width: 100%;
}
body.ds :where(textarea) { min-height: 90px; line-height: 1.45; }
body.ds :where(input, select, textarea):hover { border-color: #b9c4cd; }
body.ds :where(input, select, textarea):focus { outline: none; border-color: var(--primaer); box-shadow: 0 0 0 3px var(--primaer-mittel); }
body.ds :where(input, select, textarea):disabled { background: var(--grund-2); color: var(--tinte-3); cursor: not-allowed; }
body.ds :where(input[type=checkbox], input[type=radio]) { accent-color: var(--primaer); width: 16px; height: 16px; }
body.ds :where(input::placeholder, textarea::placeholder) { color: #8a96a0; }
body.ds :where(label) { color: var(--tinte-2); }
body.ds :where(fieldset) {
  border: 1px solid var(--linie);
  border-radius: var(--r-gross);
  padding: 14px 18px 18px;
  margin: 0 0 16px;
  background: var(--flaeche);
}
body.ds :where(legend) { padding: 0 6px; font-size: 14px; font-weight: 650; color: var(--tinte); }

/* Schaltflächen */
body.ds :where(button, input[type=submit], input[type=button]) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 7px 14px;
  border: 1px solid var(--linie);
  border-radius: var(--r-klein);
  background: var(--flaeche);
  color: var(--tinte);
  font: inherit;
  font-size: 14px;
  font-weight: 550;
  line-height: 1.2;
  cursor: pointer;
  box-shadow: var(--schatten);
  transition: background-color .12s, border-color .12s;
}
body.ds :where(button, input[type=submit], input[type=button]):hover { background: var(--grund-2); border-color: #b9c4cd; }
body.ds :where(button, input[type=submit], input[type=button]):disabled { opacity: .55; cursor: not-allowed; }
body.ds :where(button) .material-symbols-outlined { font-size: 19px; margin: 0; }

/* ------------------------------------------------------------ Komponenten aus app.css */
body.ds .page-head { margin-bottom: 20px; align-items: flex-end; }
body.ds .page-head h2 { font-size: 24px; font-weight: 650; color: var(--tinte); }
body.ds .btn { min-height: 36px; padding: 7px 14px; font-weight: 550; border-color: var(--linie); box-shadow: var(--schatten); }
body.ds .btn:hover { background: var(--grund-2); border-color: #b9c4cd; }
body.ds .btn-primary, body.ds .btn-success { background: var(--primaer); border-color: var(--primaer); color: #fff; }
body.ds .btn-primary:hover, body.ds .btn-success:hover { background: var(--primaer-dunkel); border-color: var(--primaer-dunkel); color: #fff; }
body.ds .btn-danger { color: var(--signal); border-color: color-mix(in srgb, var(--signal) 45%, #fff); }
body.ds .btn-danger:hover { background: var(--signal-hell); border-color: var(--signal); }
body.ds .btn-danger-solid { background: var(--signal); border-color: var(--signal); color: #fff; }
body.ds .btn-sm { min-height: 30px; padding: 4px 10px; font-size: 13px; }
body.ds .btn-link { box-shadow: none; min-height: 0; padding: 0; border: 0; background: none; color: var(--primaer); }
body.ds .filters {
  background: var(--grund-2);
  border: 1px solid var(--linie-2);
  border-radius: var(--r-gross);
  padding: 12px 14px;
  gap: 12px;
}
body.ds .filters label { font-size: 12.5px; font-weight: 550; color: var(--tinte-2); gap: 4px; }
body.ds .field > span, body.ds .field > label { font-size: 13px; font-weight: 600; color: var(--tinte-2); }
body.ds fieldset.box { border-radius: var(--r-gross); padding: 14px 18px 18px; }
body.ds fieldset.box legend { color: var(--tinte); font-size: 14px; font-weight: 650; }
body.ds .req::after { color: var(--signal); }

body.ds .table-wrap { border-color: var(--linie); border-radius: var(--r-gross); background: var(--flaeche); }
body.ds table.data { font-size: 14px; }
body.ds table.data th {
  background: var(--grund-2);
  color: var(--tinte-2);
  font-size: 12.5px;
  font-weight: 600;
  padding: 10px 12px;
  border-bottom: 1px solid var(--linie);
}
body.ds table.data td { padding: 11px 12px; border-bottom: 1px solid var(--linie-2); }
body.ds table.data tbody tr:last-child td { border-bottom: 0; }
body.ds table.data tbody tr:hover { background: color-mix(in srgb, var(--primaer) 3%, #fff); }
body.ds table.data td.num, body.ds table.data th.num { font-variant-numeric: tabular-nums; }
body.ds table.data .muted, body.ds .muted { color: var(--tinte-3); }

body.ds .badge { font-weight: 600; font-size: 12px; padding: 2px 9px; }
body.ds .badge-blau { background: var(--primaer-hell); color: var(--primaer-dunkel); }
body.ds .badge-gruen { background: var(--ok-hell); color: #1f5e39; }
body.ds .badge-gelb { background: var(--warn-hell); color: #7a4d00; }
body.ds .badge-orange { background: #fde7d3; color: #87420a; }
body.ds .badge-rot { background: var(--signal-hell); color: color-mix(in srgb, var(--signal) 80%, #000); }
body.ds .badge-grau { background: var(--linie-2); color: var(--tinte-2); }

body.ds .stat { border-color: var(--linie); border-radius: var(--r-gross); padding: 14px 16px; }
body.ds .stat .label { text-transform: none; letter-spacing: 0; font-size: 13px; font-weight: 550; color: var(--tinte-3); }
body.ds .stat .value { font-size: 26px; font-weight: 650; letter-spacing: -0.02em; }
body.ds .stat.pos .value { color: var(--ok); }
body.ds .stat.neg .value { color: var(--signal); }
body.ds .card { border-color: var(--linie); border-radius: var(--r-gross); padding: 16px 18px; box-shadow: var(--schatten); }
body.ds .card.wichtig { border-left: 3px solid var(--signal); }
body.ds .card.ungelesen { border-left: 3px solid var(--primaer); }
body.ds .card h3 { font-size: 17px; font-weight: 650; }

body.ds .alert { border-radius: var(--r-klein); }
body.ds .alert-info { background: var(--primaer-hell); border-color: var(--primaer-mittel); color: var(--primaer-dunkel); }
body.ds .alert-ok { background: var(--ok-hell); border-color: #bcdcc8; color: #1f5e39; }
body.ds .alert-warn { background: var(--warn-hell); border-color: #f0d79a; color: #6b4300; }
body.ds .alert-error { background: var(--signal-hell); border-color: color-mix(in srgb, var(--signal) 30%, #fff); color: color-mix(in srgb, var(--signal) 75%, #000); }
body.ds .tabs { border-bottom-color: var(--linie); gap: 2px; }
body.ds .tabs button { box-shadow: none; border-radius: 0; min-height: 0; padding: 10px 14px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--tinte-3); font-weight: 550; }
body.ds .tabs button:hover { background: none; color: var(--tinte); }
body.ds .tabs button.active { color: var(--primaer); border-bottom-color: var(--primaer); font-weight: 650; }
body.ds .dlg { border-radius: 12px; box-shadow: var(--schatten-hoch); }
body.ds .dlg header { padding: 16px 20px; border-bottom-color: var(--linie-2); }
body.ds .dlg header h3 { font-size: 18px; font-weight: 650; }
body.ds .dlg footer { border-top-color: var(--linie-2); background: var(--grund-2); border-radius: 0 0 12px 12px; }
body.ds .dlg .close { box-shadow: none; border: 0; min-height: 0; background: none; }
body.ds .dlg-backdrop { background: rgba(23, 35, 45, .5); }
body.ds .toast { background: var(--tinte); border-radius: var(--r-klein); }
body.ds .toast.ok { background: var(--ok); }
body.ds .toast.error { background: var(--signal); }
body.ds .spinner { border-color: var(--linie); border-top-color: var(--primaer); }
body.ds .progress > div { background: var(--primaer); }
body.ds .chart .bar.ein { background: var(--ok); }
body.ds .chart .bar.aus { background: var(--signal); }
body.ds .tile-badge { background: var(--signal); font-weight: 650; }
body.ds .empty-state h2 { color: var(--tinte); }

/* ------------------------------------------------------------ Tabellen älterer Seiten */
body.ds .abnahme { display: block; }
body.ds .table-body { width: 100%; }
body.ds .table-container,
body.ds .duplikat,
body.ds .abnahme,
body.ds .termin_liste {
  width: 100%;
  max-width: none;
  height: auto;
  margin: 0;
  padding: 0;
  border: 0;
  box-shadow: none;
  background: none;
}
body.ds :where(.table-container, .duplikat, .center, .center_table, .modal-content, .formular-content, .abnahme) table,
body.ds table.such-table,
body.ds table#stunden,
body.ds table#mitglied {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--linie);
  border-radius: var(--r-gross);
  overflow: hidden;
  background: var(--flaeche);
  font-size: 14px;
  margin: 0;
}
body.ds .container2 table th {
  background: var(--grund-2);
  color: var(--tinte-2);
  font-size: 12.5px;
  font-weight: 600;
  text-align: left;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid var(--linie);
  text-transform: none;
}
body.ds .container2 table td {
  padding: 9px 12px;
  border: 0;
  border-bottom: 1px solid var(--linie-2);
  color: var(--tinte);
  background: transparent;
  vertical-align: middle;
}
body.ds .container2 table tr:nth-child(even),
body.ds .table-container tr:nth-child(even),
body.ds .such-table tr:nth-child(even) { background: transparent; }
body.ds .container2 table tbody tr:hover { background: color-mix(in srgb, var(--primaer) 3%, #fff); }
body.ds .container2 table tbody tr:last-child td { border-bottom: 0; }
body.ds .container2 table.data th, body.ds .container2 table.data td { border-radius: 0; }

body.ds :where(td, th) { width: auto; }
body.ds .table-container h2 { font-size: 24px; }

/* Suche über älteren Tabellen */
body.ds #suchfeld, body.ds input#search, body.ds input#suche, body.ds .table-container > input, body.ds .duplikat > input {
  display: block;
  width: 100%;
  max-width: 360px;
  margin: 0 0 14px;
}

/* Kleine Schaltflächen in älteren Tabellen (Icon-Buttons) */
body.ds .container2 table td button,
body.ds .container2 table td a.button {
  min-height: 32px;
  padding: 4px 8px;
  background: var(--flaeche);
  color: var(--tinte-2);
  border: 1px solid var(--linie);
  box-shadow: none;
}
body.ds .container2 table td button:hover { background: var(--primaer-hell); color: var(--primaer-dunkel); border-color: var(--primaer-mittel); }
body.ds .container2 table td button .material-symbols-outlined { font-size: 19px; color: inherit; }

/* Status-Kennzeichen älterer Seiten (rot/grün gefüllte Felder) */
body.ds .container2 td span[style*="background-color: red"],
body.ds .container2 td span[style*="background-color:red"],
body.ds .container2 td .rot { border-radius: 999px; }

/* Benannte Schaltflächen älterer Seiten */
body.ds #speichern, body.ds #save, body.ds #download, body.ds #login, body.ds .add, body.ds #new,
body.ds .footerform button[type=submit], body.ds .footer button, body.ds #support button[type=submit] {
  background: var(--primaer);
  border: 1px solid var(--primaer);
  color: #fff;
  border-radius: var(--r-klein);
  min-height: 38px;
  padding: 8px 16px;
  font-weight: 600;
  font-size: 14px;
  box-shadow: var(--schatten);
  cursor: pointer;
  text-decoration: none;
  width: auto;
  height: auto;
}
body.ds #speichern:hover, body.ds #save:hover, body.ds #download:hover, body.ds #login:hover, body.ds .add:hover, body.ds #new:hover {
  background: var(--primaer-dunkel);
  border-color: var(--primaer-dunkel);
  color: #fff;
}
/* Statuskennzeichen älterer Seiten (bezahlt, Beitrag, Anmeldung, Region) */
body.ds #ja, body.ds #nein, body.ds #gemahnt, body.ds #zuruck, body.ds #ja_mgbeitrag, body.ds #nein_mgbeitrag,
body.ds #angemldet, body.ds #abgemeldet, body.ds #wartent {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: auto;
  min-height: 0;
  margin: 0;
  padding: 3px 10px;
  border: 0;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
  text-decoration: none;
  box-shadow: none;
  width: auto;
}
body.ds #ja, body.ds #ja_mgbeitrag, body.ds #angemldet { background: var(--ok-hell); color: #1f5e39; }
body.ds #nein, body.ds #nein_mgbeitrag, body.ds #abgemeldet { background: var(--signal-hell); color: color-mix(in srgb, var(--signal) 80%, #000); }
body.ds #gemahnt, body.ds #wartent { background: var(--warn-hell); color: #7a4d00; }
body.ds #zuruck { background: var(--linie-2); color: var(--tinte-2); }
body.ds #angemldet, body.ds #abgemeldet, body.ds #ja_mgbeitrag, body.ds #nein_mgbeitrag { cursor: pointer; }
body.ds #angemldet:hover, body.ds #abgemeldet:hover { box-shadow: 0 0 0 2px var(--linie); }

/* Symbol-Schaltflächen in älteren Tabellen und Listen */
body.ds #quit, body.ds #check, body.ds #barbeiten .material-symbols-outlined, body.ds #anmelden, body.ds #abmelden {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  min-height: 0;
  margin: 0 2px;
  padding: 0;
  border: 1px solid var(--linie);
  border-radius: var(--r-klein);
  background: var(--flaeche);
  color: var(--tinte-2);
  font-size: 19px;
  box-shadow: var(--schatten);
  cursor: pointer;
  overflow: hidden;
}
body.ds #quit:hover, body.ds #check:hover, body.ds #barbeiten .material-symbols-outlined:hover { background: var(--primaer-hell); color: var(--primaer-dunkel); border-color: var(--primaer-mittel); }
body.ds #anmelden { color: var(--ok); }
body.ds #anmelden:hover { background: var(--ok-hell); border-color: #bcdcc8; }
body.ds #abmelden { color: var(--signal); }
body.ds #abmelden:hover { background: var(--signal-hell); border-color: color-mix(in srgb, var(--signal) 30%, #fff); }
body.ds #anmelden .material-symbols-outlined, body.ds #abmelden .material-symbols-outlined { font-size: 20px; margin: 0; }
body.ds .add .material-symbols-outlined, body.ds #anmelden .material-symbols-outlined, body.ds #abmelden .material-symbols-outlined { color: inherit; font-size: 19px; }
body.ds .centerbutton { display: flex; justify-content: flex-start; gap: 8px; }
body.ds .centerbutton #plus { color: var(--primaer); font-size: 28px; width: 1em; }

/* Seitenwechsel-Schaltflächen unter älteren Listen */
body.ds .pagination, body.ds #pagination { display: flex; gap: 8px; justify-content: center; margin-top: 14px; }

/* ------------------------------------------------------------ Formulare älterer Seiten */
body.ds .headform, body.ds .bodyform, body.ds .footerform, body.ds .form-container, body.ds .mitgliederform, body.ds .supportform {
  width: 100%;
  max-width: 980px;
  margin: 0;
  padding: 0;
  background: none;
  border: 0;
  box-shadow: none;
  text-align: left;
}
body.ds .headform { margin-bottom: 18px; }
body.ds .headform h2 { margin: 0; padding: 0; font-size: 24px; font-weight: 650; color: var(--tinte); background: none; text-align: left; }
body.ds .bodyform fieldset, body.ds .form-container fieldset { text-align: left; }
body.ds .bodyform fieldset input, body.ds .bodyform fieldset select { margin: 4px 6px 4px 0; }
body.ds .footerform { display: flex; gap: 10px; justify-content: flex-start; margin-top: 16px; }
body.ds .abschnitt h3 {
  margin: 26px 0 12px;
  padding: 0 0 8px;
  background: none;
  border-bottom: 1px solid var(--linie-2);
  font-size: 16px;
  font-weight: 650;
  color: var(--tinte);
}
body.ds .abschnitt:first-child h3 { margin-top: 0; }
body.ds .blocks-data { text-align: left; }
body.ds .blocks-data fieldset > div { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
body.ds .blocks-data fieldset input, body.ds .blocks-data fieldset select { margin: 0; }
body.ds .blocks-container { flex-wrap: wrap; justify-content: flex-start; gap: 10px; }
body.ds .block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 76px;
  margin: 0;
  padding: 10px 8px;
  border: 1px solid var(--linie);
  border-radius: var(--r-klein);
  background: var(--flaeche);
}
body.ds .block:has(input:checked) { border-color: var(--primaer); background: var(--primaer-hell); }
body.ds .block img { width: 28px; height: 28px; object-fit: contain; }
body.ds .block span { font-size: 13px; font-weight: 600; }
body.ds .row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 10px; }
body.ds .row label { min-width: 120px; font-weight: 550; color: var(--tinte-2); }

/* ------------------------------------------------------------ Dialoge älterer Seiten */
body.ds .modal { background: rgba(23, 35, 45, .5); z-index: 1000; }
body.ds .modal-content, body.ds .formular-content {
  background: var(--flaeche);
  border: 0;
  border-radius: 12px;
  box-shadow: var(--schatten-hoch);
  padding: 22px 24px;
  max-width: min(960px, calc(100vw - 32px));
}
body.ds .modal .head, body.ds .formular .head { border-bottom: 1px solid var(--linie-2); padding-bottom: 12px; margin-bottom: 14px; }
body.ds .close, body.ds .close span { color: var(--tinte-3); background: none; box-shadow: none; border: 0; }
body.ds .close:hover, body.ds .close span:hover { color: var(--tinte); }

/* ------------------------------------------------------------ Dashboard-Kästen älterer Seiten */
body.ds .grid-container { gap: 14px; }
body.ds .box {
  border: 1px solid var(--linie);
  border-radius: var(--r-gross);
  background: var(--flaeche);
  box-shadow: var(--schatten);
  overflow: hidden;
}
body.ds .box-head { background: var(--grund-2); color: var(--tinte); border-bottom: 1px solid var(--linie-2); font-weight: 650; }
body.ds .Nachricht { border-radius: var(--r-klein); border: 1px solid var(--linie-2); }

/* Terminliste */
body.ds .termin {
  border: 1px solid var(--linie);
  border-radius: var(--r-gross);
  background: var(--flaeche);
  box-shadow: var(--schatten);
  margin-bottom: 10px;
  overflow: hidden;
}
body.ds .termin { height: auto; min-height: 72px; align-items: stretch; border-radius: var(--r-gross); }
body.ds .termin hr { display: block; width: 1px; height: auto; margin: 0; border: 0; background: var(--linie-2); }
body.ds .termin_date {
  display: flex; flex-direction: column; justify-content: center; gap: 2px;
  padding: 10px 14px;
  background: var(--primaer-hell); color: var(--primaer-dunkel); font-weight: 650;
}
body.ds .termin_date a { color: inherit; }
body.ds .termin_date { flex: 0 0 140px; }
body.ds .termin_date a, body.ds .termin_date #date_time { font-size: 15px; white-space: nowrap; }
body.ds .termin_date a + a, body.ds .termin_date #date_time + #date_time { font-weight: 500; font-size: 13px; }
body.ds .termin_beschreibung {
  display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 4px;
  padding: 10px 16px; text-align: left;
}
body.ds .termin_beschreibung:hover { background: var(--grund-2); }
body.ds #termin_titel { font-weight: 650; font-size: 15px; color: var(--tinte); }
body.ds #termin_treff { font-size: 13px; color: var(--tinte-3); }
body.ds #bereitschaftdienst, body.ds #uebung, body.ds #ausbilung, body.ds #training {
  font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px;
}
body.ds .termin_teilnehmer, body.ds .termin_bestaetigung { display: flex; align-items: center; justify-content: center; padding: 8px 12px; }
body.ds #anmeldungen {
  height: auto; margin: 0; padding: 6px 10px; flex-direction: row; gap: 4px;
  background: var(--grund-2); color: var(--tinte); border: 1px solid var(--linie); border-radius: var(--r-klein);
  font-variant-numeric: tabular-nums; font-weight: 600; cursor: pointer;
}
body.ds #anmeldungen:hover { border-color: var(--primaer); }
body.ds #anmeldungen_text { color: inherit; }
body.ds #wagrechter_strich::before { content: '/'; color: var(--tinte-3); }
body.ds #wagrechter_strich { border: 0; background: none; width: auto; height: auto; margin: 0; }
body.ds #termin_block > h2#Monat, body.ds h2#Monat { margin: 22px 0 8px; font-size: 17px; font-weight: 650; text-align: left; }
body.ds #wochenzahl {
  margin: 14px 0 8px; padding: 0; background: none; color: var(--tinte-3);
  font-size: 12.5px; font-weight: 600; border-radius: 0;
}
body.ds .center_termin { width: 100%; max-width: none; margin: 0; }
body.ds .termin_liste hr, body.ds .container2 hr { border: 0; border-top: 1px solid var(--linie-2); }

/* ------------------------------------------------------------ Hilfsklassen */
body.ds [hidden] { display: none !important; }
body.ds .ds-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ------------------------------------------------------------ Schmale Bildschirme */
@media (max-width: 960px) {
  :root { --kopf-h: 56px; }
  body.ds .container1 { padding: 0 8px var(--streifen) 12px; gap: 10px; }
  body.ds .container1 > img { width: 34px; height: 34px; }
  body.ds .container1 h1 { font-size: 15px; }
  body.ds .container1 h2 { font-size: 12px; }
  body.ds .ds-kopf-aktionen .ds-name { display: none; }
  body.ds .ds-menue-knopf { display: inline-flex !important; }

  body.ds .container2 { grid-template-columns: minmax(0, 1fr); }
  body.ds .container2 > .menu {
    position: fixed;
    top: calc(var(--kopf-h) + var(--streifen));
    left: 0;
    bottom: 0;
    z-index: 40;
    width: min(300px, 84vw);
    max-height: none;
    transform: translateX(-102%);
    transition: transform .2s ease;
    box-shadow: var(--schatten-hoch);
  }
  body.ds.ds-menue-offen .container2 > .menu { transform: none; }
  body.ds.ds-menue-offen::after {
    content: '';
    position: fixed;
    inset: calc(var(--kopf-h) + var(--streifen)) 0 0 0;
    background: rgba(23, 35, 45, .35);
    z-index: 30;
  }
  body.ds .container2 > :not(.menu):not(script):not(.modal):not(.formular):not([class*="modal"]):not(dialog) {
    margin: 12px 10px 16px;
    padding: 18px 16px 20px;
  }
  body.ds .app-content { padding: 18px 16px 20px; }
  body.ds .page-head h2, body.ds .mec-month-divider h2, body.ds .table-container > h2 { font-size: 21px; }
  body.ds .ds-kacheln { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  body.ds *, body.ds *::before, body.ds *::after { transition: none !important; animation: none !important; }
}
@media print {
  body.ds { background: #fff; }
  body.ds .container1 { position: static; background: #fff; color: #000; }
  body.ds .container1 h1, body.ds .container1 h2 { color: #000; }
  body.ds .container1::after, body.ds .menu, body.ds .ds-kopf-aktionen, body.ds .home_button { display: none !important; }
  body.ds .container2 { display: block; }
  body.ds .container2 > * { border: 0 !important; box-shadow: none !important; margin: 0 !important; padding: 0 !important; }
}

/* ------------------------------------------------------------ Weitere Elemente älterer Seiten */
body.ds .settings .material-symbols-outlined {
  display: inline-grid; place-items: center;
  width: 34px; height: 34px; padding: 0; margin: 0;
  border: 1px solid var(--linie); border-radius: var(--r-klein);
  background: var(--flaeche); color: var(--tinte-2); font-size: 19px;
  box-shadow: var(--schatten); cursor: pointer;
}
body.ds .settings .material-symbols-outlined:hover { background: var(--primaer-hell); color: var(--primaer-dunkel); border-color: var(--primaer-mittel); }
body.ds #hrefteilnehmer {
  display: inline-flex; padding: 4px 10px; border: 1px solid var(--linie); border-radius: 999px;
  background: var(--grund-2); color: var(--tinte); font-weight: 600; font-size: 13px;
  font-variant-numeric: tabular-nums; box-shadow: none; text-decoration: none;
}
body.ds #hrefteilnehmer:hover { border-color: var(--primaer); color: var(--primaer-dunkel); background: var(--primaer-hell); }
body.ds #checkCell { white-space: nowrap; text-align: right; }
body.ds #checkbutton, body.ds #quitbutton { display: inline-block; margin: 0; }
body.ds #prev-page, body.ds #next-page {
  display: inline-flex; align-items: center; min-height: 34px; padding: 6px 14px;
  border: 1px solid var(--linie); border-radius: var(--r-klein);
  background: var(--flaeche); color: var(--tinte); font-size: 14px; font-weight: 550;
  box-shadow: var(--schatten); cursor: pointer; text-decoration: none;
}
body.ds #prev-page:hover, body.ds #next-page:hover { background: var(--grund-2); border-color: #b9c4cd; color: var(--tinte); }
body.ds #pagination-container { display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px; }
body.ds #tbcenter { text-align: left; }
body.ds .abschnitt-titel { margin: 26px 0 10px; font-size: 16px; font-weight: 650; color: var(--tinte); }
body.ds .cards { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }

/* ------------------------------------------------------------ Formularseiten älterer Bereiche: linksbündig */
body.ds .container2 > .center,
body.ds .container2 > .center > div,
body.ds .terminform, body.ds .boddyform, body.ds .bodyform {
  display: block;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  text-align: left;
  background: none;
  border: 0;
  box-shadow: none;
}
body.ds .container2 > .center:has(> .empty-state) { display: flex; justify-content: center; }
body.ds .boddyform > label, body.ds .terminform > label { font-weight: 600; margin-right: 8px; }
body.ds .form-container { max-width: 860px; margin-top: 20px; }
body.ds .form-container h2 { font-size: 18px; margin: 0 0 14px; }
body.ds .form-container .row {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr) 140px minmax(0, 1fr);
  gap: 10px 14px;
  align-items: center;
}
body.ds .form-container .row > * { margin: 0; width: 100%; max-width: none; }
body.ds .form-container .row label { min-width: 0; }
body.ds .form-container .row:has(> :only-child) { grid-template-columns: 1fr; }
body.ds br + br { display: none; }
body.ds #suchfeld {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
  max-width: 640px;
  margin: 0 0 18px;
  padding: 0;
  background: none;
  box-shadow: none;
  border: 0;
}
body.ds #suchfeld .field { flex: 1; min-width: 220px; }
body.ds #suchfeld input { width: 100%; max-width: none; margin: 0; }
body.ds .duplikat .center { display: block; }
@media (max-width: 760px) {
  body.ds .form-container .row { grid-template-columns: minmax(0, 1fr); }
}
body.ds .form-container .row > select, body.ds .form-container #vehicle, body.ds .form-container #location_fahrzeug { width: 100%; }
body.ds #suchfeld { height: auto; width: 100%; border-radius: 0; text-align: left; }
body.ds #suchfeld .field > span { text-align: left; }
body.ds #support { padding: 0; background: none; border-radius: 0; box-shadow: none; }
body.ds .supportform, body.ds #support form { text-align: left; }
body.ds .empty-state {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 48px 16px; color: var(--tinte-3); max-width: 520px; margin: 0 auto;
}
body.ds .empty-state .material-symbols-outlined {
  width: 56px; height: 56px; display: grid; place-items: center; font-size: 28px;
  border-radius: 14px; background: var(--grund-2); color: var(--tinte-3); margin-bottom: 14px;
}
body.ds .empty-state h2 { margin: 0 0 6px; font-size: 18px; font-weight: 650; }
body.ds .empty-state p { margin: 0; }
@media (max-width: 760px) {
  body.ds .termin { flex-wrap: wrap; }
  body.ds .termin > hr { display: none; }
  body.ds .termin_date { flex: 1 0 100%; flex-direction: row; gap: 10px; align-items: baseline; }
  body.ds .termin_beschreibung { flex: 1 1 auto; }
  body.ds .container2 table { font-size: 13px; }
}
body.ds .empty-state .btn { margin-top: 16px; }
