/* ==========================================================================
   meldeportal.css — MP-DESIGN-V1 (25.09.2026)
   Gemeinsames Design-System des Judo-Meldeportals, abgeleitet vom Judo Event Manager
   (css/ui_v2.css, STATS-STD-V1, GTABTIP). Regeln:
   - Champagner-Gold #e5c07b (nie #ffd700), nur Dunkel-Flächen #0a0a0a…#1a1a1a
   - Schrift nie dunkler als #ccc auf dunklem Grund (Barriere-Prämisse, Hauptbediener sehbehindert)
   - bedienrelevante Schrift ≥ .74rem, kompakte Abstände, keine Fließtext-Hinweise:
     Erklärungen gehören in title= (GTABTIP) oder einen ?-Button (.mp-help)
   - Referenz: Full HD 1920×1080; mobil bis 360px nutzbar
   Öffentliche Seiten dürfen <html data-theme="auto"> setzen → Hellmodus bei hellem System.
   ========================================================================== */

:root {
  /* Gold */
  --gold: #e5c07b; --gold-hover: #f0d59a; --gold-soft: rgba(229,192,123,.18);
  --gold-bg: #2a2400; --gold-bd: #5a4a00; --gold-chip: #332b16;
  /* Flächen */
  --bg-deep: #050505; --bg: #0a0a0a; --bg-bar: #0d0d0d; --bg-section: #131313;
  --bg-card: #1a1a1a; --bg-hover: #222; --bg-modal: #1e1e1e; --bg-input: #0a0a0a;
  /* Rahmen */
  --bd-soft: #1a1a1a; --bd-section: #232323; --bd: #2a2a2a; --bd-input: #333; --bd-strong: #3a3a3a; --bd-btn: #444;
  /* Text (Untergrenze #ccc) */
  --text-strong: #fff; --text: #ddd; --text-2: #ccc;
  /* Signalfarben – nur mit Bedeutung */
  --ok: #80d99a; --ok-bg: #16361f; --ok-bd: #2a6a3a;
  --err: #ff8080; --err-bg: #2a1818; --err-bd: #5a2a2a;
  --warn: #f0c060; --warn-bg: #2e2610; --warn-bd: #6a5520;
  --info: #7cc0ee; --info-bg: #13283a; --info-bd: #28506e;
  --purple: #b99ae8; --pink: #e59ac0;
  /* Schrift */
  --font: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, 'Helvetica Neue', Arial, sans-serif;
  --fs-h1: 1.35rem; --fs-body: .9rem; --fs-input: .88rem; --fs-label: .78rem; --fs-small: .78rem; --fs-min: .74rem;
  /* Radien / Abstände */
  --r-sm: 3px; --r: 4px; --r-md: 6px; --r-lg: 10px; --r-pill: 999px;
  --gap: 8px; --pad-page: 14px 22px;
  --shadow: 0 10px 30px rgba(0,0,0,.55);
  color-scheme: dark;
}

/* ---------- Basis ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.mp {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font); font-size: var(--fs-body); line-height: 1.45;
}
.mp a { color: var(--gold); text-decoration: none; }
.mp a:hover { color: var(--gold-hover); text-decoration: underline; }
.mp h1, .mp h2, .mp h3, .mp h4 { color: var(--text-strong); margin: 0 0 .5em; line-height: 1.25; font-weight: 700; }
.mp h1 { font-size: var(--fs-h1); color: var(--gold); }
.mp h2 { font-size: 1.12rem; }
.mp h3 { font-size: .98rem; }
.mp h4 { font-size: .9rem; color: var(--gold); }
.mp p { margin: 0 0 .6em; }
.mp small, .mp .mp-small { font-size: var(--fs-small); color: var(--text-2); }
.mp hr { border: 0; border-top: 1px solid var(--bd); margin: 12px 0; }
.mp :focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.mp .muted { color: var(--text-2); }
.mp .gold { color: var(--gold); }
.mp .ok { color: var(--ok); } .mp .err { color: var(--err); } .mp .warn { color: var(--warn); }
.mp .nowrap { white-space: nowrap; }
.mp .num { font-variant-numeric: tabular-nums; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Seitenrahmen ---------- */
.mp-shell { max-width: 1600px; margin: 0 auto; padding: 0 22px 28px; }
.mp-shell.narrow { max-width: 1100px; }
.mp-topbar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 10px 22px; background: var(--bg-bar); border-bottom: 1px solid var(--bd);
}
.mp-topbar .brand { display: flex; align-items: center; gap: 10px; color: var(--gold); font-weight: 700; font-size: 1rem; }
.mp-topbar .brand img { height: 30px; width: auto; border-radius: 4px; }
.mp-topbar .spacer { flex: 1; }
.mp-topbar .who { color: var(--text-2); font-size: var(--fs-small); display: flex; align-items: center; gap: 8px; }
.mp-topbar .who img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; border: 1px solid var(--gold-bd); }

.sd-page-header {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 14px 0 10px; border-bottom: 1px solid var(--bd); margin-bottom: 12px;
}
.sd-page-header h1 { margin: 0; font-size: var(--fs-h1); color: var(--gold); display: flex; align-items: center; gap: 10px; }
.sd-page-header h1 .icon, .sd-page-header h1 i { font-size: 1.2rem; }
.sd-page-header .sub { color: var(--text-2); font-size: var(--fs-small); }
.sd-page-header .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------- Buttons ---------- */
.btn, .btn-gold, .mp button.btn, .mp a.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 32px; padding: 6px 14px; border-radius: var(--r);
  background: var(--gold); color: #000; border: 1px solid var(--gold);
  font: 600 .84rem/1.2 var(--font); cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background .12s, color .12s, border-color .12s;
}
.btn:hover, .btn-gold:hover { background: var(--gold-hover); color: #000; text-decoration: none; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.btn-sec { background: #2a2a2a !important; color: var(--text-2) !important; border-color: var(--bd-btn) !important; }
.btn-sec:hover { background: #333 !important; color: #fff !important; }
.btn-edit { background: var(--gold-bg) !important; color: var(--gold) !important; border-color: var(--gold-bd) !important; }
.btn-edit:hover { background: #3a3200 !important; color: var(--gold-hover) !important; }
.btn-danger { background: var(--err-bg) !important; color: var(--err) !important; border-color: var(--err-bd) !important; }
.btn-danger:hover { background: #3a1e1e !important; color: #ffa0a0 !important; }
.btn-ok { background: var(--ok-bg) !important; color: var(--ok) !important; border-color: var(--ok-bd) !important; }
.btn-ok:hover { background: #1d4a29 !important; }
.btn-info { background: var(--info-bg) !important; color: var(--info) !important; border-color: var(--info-bd) !important; }
.btn-sm { min-height: 26px; padding: 3px 9px; font-size: .78rem; }
.btn-icon { min-width: 30px; padding: 4px 8px; }
.btn-block { width: 100%; }
.btn-group { display: inline-flex; gap: 4px; flex-wrap: wrap; }

/* ?-Hilfe-Button: Erklärung steckt im title (GTABTIP zeigt sie groß) */
.mp-help {
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
  width: 20px; height: 20px; border-radius: 50%; padding: 0; margin-left: 4px; vertical-align: middle;
  background: var(--gold-bg); color: var(--gold); border: 1px solid var(--gold-bd);
  font: 800 .78rem/1 var(--font); cursor: help;
}
.mp-help:hover, .mp-help:focus-visible { background: var(--gold); color: #000; }

/* ---------- Abschnitte / Karten ---------- */
.dt-section, .mp-card {
  background: var(--bg-section); border: 1px solid var(--bd-section); border-radius: var(--r-md);
  padding: 10px 12px; margin-bottom: 10px;
}
.dt-section > h3, .mp-card > h3, .mp-section-title {
  display: flex; align-items: center; gap: 7px; margin: 0 0 8px;
  font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-2);
}
.dt-section > h3 i, .mp-card > h3 i, .mp-section-title i { color: var(--gold); }
.mp-card.accent { border-left: 3px solid var(--gold); }
.mp-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.mp-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.mp-row.between { justify-content: space-between; }
.mp-stack > * + * { margin-top: 8px; }

/* ---------- Formulare ---------- */
.mp input[type=text], .mp input[type=email], .mp input[type=tel], .mp input[type=password],
.mp input[type=number], .mp input[type=date], .mp input[type=datetime-local], .mp input[type=url],
.mp input[type=search], .mp input:not([type]), .mp select, .mp textarea {
  width: 100%; min-height: 32px; padding: 5px 9px;
  background: var(--bg-input); color: var(--text); border: 1px solid var(--bd); border-radius: var(--r-sm);
  font: var(--fs-input)/1.3 var(--font);
}
.mp textarea { min-height: 70px; resize: vertical; }
.mp input:focus, .mp select:focus, .mp textarea:focus { outline: none; border-color: var(--gold); }
.mp input::placeholder, .mp textarea::placeholder { color: #9a9a9a; }
.mp input[type=checkbox], .mp input[type=radio] { width: 16px; height: 16px; accent-color: var(--gold); vertical-align: middle; }
.mp input[type=file] { color: var(--text-2); font-size: .82rem; }
.mp input[readonly], .mp input:disabled, .mp select:disabled { opacity: .75; }
.dt-form-grid, .mp-form-grid { display: grid; gap: 8px 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.dt-field, .mp-field { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.dt-field > label, .mp-field > label, .mp label.mp-label {
  font-size: var(--fs-label); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-2);
  display: flex; align-items: center; gap: 4px;
}
.mp-field .req { color: var(--gold); }
.mp-check { display: flex; gap: 8px; align-items: flex-start; font-size: .86rem; color: var(--text); }
.mp-check input { margin-top: 2px; flex: 0 0 auto; }
.fset { border: 1px solid var(--bd); border-radius: var(--r-md); padding: 8px 10px 6px; margin: 0 0 10px; }
.fset > legend, .fset-t { padding: 0 6px; font-size: var(--fs-min); font-weight: 700; color: var(--gold); text-transform: uppercase; letter-spacing: .05em; }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 36px; }
.pw-wrap .pw-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--text-2); cursor: pointer; padding: 4px; }

/* ---------- Tabellen ---------- */
table.sd, .mp table.mp-table { width: 100%; border-collapse: collapse; font-size: .84rem; }
table.sd th, .mp table.mp-table th {
  text-align: left; padding: 6px 8px; font-size: var(--fs-min); font-weight: 700; text-transform: uppercase;
  letter-spacing: .04em; color: var(--gold); border-bottom: 1px solid var(--bd-input); background: var(--bg-bar);
  position: sticky; top: 0; z-index: 1;
}
table.sd td, .mp table.mp-table td { padding: 6px 8px; border-bottom: 1px solid #262626; color: var(--text); vertical-align: middle; }
table.sd tbody tr:hover td, .mp table.mp-table tbody tr:hover td { background: #161616; }
table.sd tr.clickable, .mp tr.clickable { cursor: pointer; }
table.sd td.num, table.sd th.num { text-align: right; font-variant-numeric: tabular-nums; }
.mp-table-wrap { overflow-x: auto; border: 1px solid var(--bd-section); border-radius: var(--r-md); }

/* ---------- Tabs ---------- */
.dt-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--bd); margin: 0 0 12px; flex-wrap: wrap; }
.dt-tab {
  display: inline-flex; align-items: center; gap: 7px; padding: 9px 14px; margin-bottom: -1px;
  background: none; border: 0; border-bottom: 2px solid transparent; color: var(--text-2);
  font: 600 .86rem/1.2 var(--font); cursor: pointer; text-decoration: none !important; white-space: nowrap;
}
.dt-tab:hover { color: #fff; }
.dt-tab.active, .dt-tab[aria-selected="true"] { color: var(--gold); border-bottom-color: var(--gold); }
.dt-tab .tab-badge { background: var(--gold-chip); color: var(--gold); border-radius: var(--r-pill); padding: 1px 7px; font-size: var(--fs-min); font-weight: 700; }

/* ---------- Stats-Kacheln (STATS-STD-V1) ---------- */
.ev-ministats { display: flex; flex-wrap: wrap; gap: 5px; margin: 0 0 10px; }
.ev-mini {
  flex: 0 1 auto; min-width: 140px; max-width: 300px; height: 52px;
  display: flex; align-items: center; gap: 9px; padding: 4px 12px 4px 10px;
  background: var(--bg-card); border: 1px solid var(--bd); border-radius: var(--r-md);
}
.ev-mini.has-sub { height: 64px; }
.ev-mini .ico { font-size: .95rem; color: var(--gold); width: 18px; text-align: center; flex: 0 0 auto; }
.ev-mini .txt { display: flex; flex-direction: column; min-width: 0; }
.ev-mini .lab { font-size: var(--fs-min); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-2); white-space: nowrap; }
.ev-mini .val { font-size: 1rem; font-weight: 700; color: var(--gold); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ev-mini .sub { font-size: var(--fs-min); color: var(--text-2); white-space: nowrap; }
.ev-mini .val.ok { color: var(--ok); } .ev-mini .val.err { color: var(--err); } .ev-mini .val.warn { color: var(--warn); }
.ev-mini[onclick], .ev-mini[data-href], a.ev-mini { cursor: pointer; text-decoration: none !important; }
.ev-mini[onclick]:hover, .ev-mini[data-href]:hover, a.ev-mini:hover { border-color: var(--gold); }

/* ---------- Chips / Status ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: var(--r-pill);
  font-size: var(--fs-min); font-weight: 700; line-height: 1.5; white-space: nowrap; border: 1px solid transparent;
}
.chip.c-gold { background: var(--gold-chip); color: var(--gold); border-color: #6a5a2a; }
.chip.c-green { background: var(--ok-bg); color: var(--ok); border-color: var(--ok-bd); }
.chip.c-red { background: var(--err-bg); color: var(--err); border-color: var(--err-bd); }
.chip.c-warn { background: var(--warn-bg); color: var(--warn); border-color: var(--warn-bd); }
.chip.c-blue { background: var(--info-bg); color: var(--info); border-color: var(--info-bd); }
.chip.c-grey { background: #242424; color: var(--text-2); border-color: var(--bd-btn); }

/* ---------- Meldungen / Flash ---------- */
.mp-flash { padding: 8px 12px; border-radius: var(--r-md); margin: 0 0 10px; font-weight: 600; display: flex; gap: 8px; align-items: flex-start; border: 1px solid; }
.mp-flash.ok { background: var(--ok-bg); color: var(--ok); border-color: var(--ok-bd); }
.mp-flash.err { background: var(--err-bg); color: var(--err); border-color: var(--err-bd); }
.mp-flash.warn { background: var(--warn-bg); color: var(--warn); border-color: var(--warn-bd); }
.mp-flash.info { background: var(--info-bg); color: var(--info); border-color: var(--info-bd); }

/* ---------- Filter / Suche ---------- */
.sd-filter-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 8px 10px; background: var(--bg-bar); border: 1px solid var(--bd-section); border-radius: var(--r-md); margin-bottom: 10px; }
.sd-filter-bar select, .sd-filter-bar input { width: auto; min-width: 150px; }
.sd-search { position: relative; flex: 1 1 240px; }
.sd-search i { position: absolute; left: 9px; top: 50%; transform: translateY(-50%); color: var(--text-2); font-size: .8rem; }
.sd-search input { padding-left: 28px !important; }

/* ---------- Modal ---------- */
.mp-modal-overlay {
  position: fixed; inset: 0; z-index: 1000; display: none; align-items: center; justify-content: center;
  background: rgba(0,0,0,.72); padding: 16px;
}
.mp-modal-overlay.active, .mp-modal-overlay.is-active, .mp-modal-overlay.visible { display: flex; }
.mp-modal {
  background: var(--bg-modal); border: 1px solid var(--bd-strong); border-top: 3px solid var(--gold);
  border-radius: var(--r-lg); box-shadow: var(--shadow); width: 100%; max-width: 560px; max-height: 90vh;
  display: flex; flex-direction: column;
}
.mp-modal.wide { max-width: 900px; }
.mp-modal-head { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--bd); }
.mp-modal-head h3 { margin: 0; color: var(--gold); font-size: 1rem; }
.mp-modal-head .x { margin-left: auto; background: none; border: 0; color: var(--text-2); font-size: 1.3rem; cursor: pointer; line-height: 1; padding: 2px 6px; }
.mp-modal-head .x:hover { color: #fff; }
.mp-modal-body { padding: 12px 14px; overflow: auto; }
.mp-modal-foot { display: flex; gap: 8px; justify-content: flex-end; padding: 10px 14px; border-top: 1px solid var(--bd); }

/* ---------- Login-Karte ---------- */
.mp-center { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; }
.mp-login {
  width: 100%; max-width: 400px; background: var(--bg-card); border: 1px solid var(--bd);
  border-top: 3px solid var(--gold); border-radius: var(--r-lg); padding: 20px 22px; box-shadow: var(--shadow);
}
.mp-login.role-admin { border-top-color: var(--err); }
.mp-login.role-event { border-top-color: var(--gold); }
.mp-login.role-trainer { border-top-color: var(--info); }
.mp-login h1 { font-size: 1.2rem; display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.mp-login .lead { color: var(--text-2); font-size: .84rem; margin-bottom: 14px; }
.mp-login .mp-field { margin-bottom: 10px; }
.mp-login .links { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-top: 12px; font-size: .84rem; }
.mp-or { display: flex; align-items: center; gap: 8px; color: var(--text-2); font-size: .78rem; margin: 12px 0; }
.mp-or::before, .mp-or::after { content: ""; flex: 1; border-top: 1px solid var(--bd); }

/* ---------- Sprach-Umschalter ---------- */
.mp-lang { display: inline-flex; gap: 2px; }
.mp-lang a { padding: 3px 7px; border-radius: var(--r-sm); color: var(--text-2); font-size: .78rem; font-weight: 700; border: 1px solid transparent; }
.mp-lang a.active, .mp-lang a:hover { color: var(--gold); border-color: var(--gold-bd); background: var(--gold-bg); text-decoration: none; }

/* ---------- Fortschritt ---------- */
.mp-bar { height: 6px; background: #262626; border-radius: var(--r-pill); overflow: hidden; }
.mp-bar > span { display: block; height: 100%; background: var(--gold); }
.mp-bar.m > span { background: var(--info); } .mp-bar.w > span { background: var(--pink); }

/* ---------- Kompakte Event-Übersicht (Klick auf Listeneintrag) ---------- */
.mp-evov { background: var(--bg-deep); border: 1px solid var(--bd-section); border-left: 3px solid var(--gold); border-radius: var(--r-md); padding: 10px 12px; margin: 4px 0 8px; }
.mp-evov .ak-grid { display: grid; gap: 5px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); margin-top: 6px; }
.mp-evov .ak { background: var(--bg-card); border: 1px solid var(--bd); border-radius: var(--r-md); padding: 5px 8px; font-size: .8rem; }
.mp-evov .ak b { color: var(--gold); }

/* ---------- Toast ---------- */
.mp-toast-wrap { position: fixed; right: 16px; bottom: 16px; z-index: 2000000; display: flex; flex-direction: column; gap: 6px; }
.mp-toast { background: var(--bg-modal); border: 1px solid var(--bd-strong); border-left: 4px solid var(--gold); color: var(--text); padding: 9px 14px; border-radius: var(--r-md); box-shadow: var(--shadow); font-weight: 600; max-width: 380px; }
.mp-toast.ok { border-left-color: var(--ok); } .mp-toast.err { border-left-color: var(--err); }

/* ---------- Footer ---------- */
.mp-footer { margin-top: 18px; padding: 10px 0; border-top: 1px solid var(--bd); color: var(--text-2); font-size: .78rem; display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }

/* ---------- Responsiv ---------- */
@media (max-width: 700px) {
  .mp-shell { padding: 0 12px 20px; }
  .mp-topbar { padding: 8px 12px; }
  .sd-page-header .actions { margin-left: 0; width: 100%; }
  .ev-mini { min-width: calc(50% - 5px); max-width: none; flex: 1 1 calc(50% - 5px); }
  .dt-tab { padding: 8px 10px; }
  table.sd { font-size: .8rem; }
}

/* ---------- Hellmodus (nur Seiten mit data-theme="auto", z. B. öffentliche Seiten) ---------- */
@media (prefers-color-scheme: light) {
  html[data-theme="auto"] {
    color-scheme: light;
    --gold: #8a6414; --gold-hover: #6e4f0e; --gold-soft: rgba(138,100,20,.14);
    --gold-bg: #fbf3df; --gold-bd: #e0c98f; --gold-chip: #f6ead0;
    --bg-deep: #eceae6; --bg: #f5f4f1; --bg-bar: #ffffff; --bg-section: #ffffff; --bg-card: #ffffff;
    --bg-hover: #f0eee9; --bg-modal: #ffffff; --bg-input: #ffffff;
    --bd-soft: #ebe8e2; --bd-section: #e3dfd7; --bd: #d9d4ca; --bd-input: #cfc9bd; --bd-strong: #bdb6a8; --bd-btn: #c9c2b4;
    --text-strong: #111; --text: #1f1f1f; --text-2: #444;
    --ok: #1e7a3c; --ok-bg: #e5f5ea; --ok-bd: #9fd3b0;
    --err: #b3261e; --err-bg: #fbe9e8; --err-bd: #ecb1ad;
    --warn: #8a5a00; --warn-bg: #fdf3dc; --warn-bd: #e8cf8f;
    --info: #1d5f93; --info-bg: #e6f0f8; --info-bd: #a9c8e2;
    --shadow: 0 8px 24px rgba(0,0,0,.12);
  }
  html[data-theme="auto"] .btn, html[data-theme="auto"] .btn-gold { color: #fff; }
  html[data-theme="auto"] .btn:hover { color: #fff; }
  html[data-theme="auto"] .btn-sec { background: #efece6 !important; color: #333 !important; }
  html[data-theme="auto"] table.sd td { border-bottom-color: #ece8e1; }
  html[data-theme="auto"] table.sd tbody tr:hover td { background: #faf8f4; }
  html[data-theme="auto"] .mp-bar { background: #e6e2da; }
  html[data-theme="auto"] .mp-modal-overlay { background: rgba(0,0,0,.45); }
  html[data-theme="auto"] .chip.c-grey { background: #efece6; }
  html[data-theme="auto"] .mp input::placeholder { color: #777; }
}

/* ---------- Druck: immer hell, ohne Bedienelemente ---------- */
@media print {
  body.mp { background: #fff !important; color: #000 !important; }
  .mp .no-print, .mp-topbar, .dt-tabs, .btn, .mp-help, .mp-footer { display: none !important; }
  .dt-section, .mp-card { border-color: #ccc; background: #fff; }
  table.sd th { color: #000; background: #eee; }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ==========================================================================
   MP-DESIGN-V1.1 (25.09.2026) — gesammelte Ergänzungen aus der Seiten-Migration
   ========================================================================== */
.mp [hidden] { display: none !important; }
.mp a.dt-tab { color: var(--text-2); }
.mp a.dt-tab:hover { color: #fff; }
.mp a.dt-tab.active, .mp a.dt-tab[aria-selected="true"] { color: var(--gold); }
.mp a.btn:hover, .mp a.btn-gold:hover { text-decoration: none; }
.btn.on, .btn.is-active { outline: 2px solid var(--gold); outline-offset: 1px; }

/* Datei-Auswahl im Portal-Stil statt nativem hellem Knopf */
.mp input[type=file]::file-selector-button {
  margin-right: 10px; padding: 5px 12px; border-radius: var(--r); cursor: pointer;
  background: #2a2a2a; color: var(--text-2); border: 1px solid var(--bd-btn); font: 600 .8rem var(--font);
}
.mp input[type=file]::file-selector-button:hover { color: #fff; background: #333; }

/* Felder in einer Reihe bündig, auch mit ?-Button im Label */
.mp-field > label { min-height: 22px; }

/* Umschalter (Checkbox als Schalter) */
.mp-switch { position: relative; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: .84rem; }
.mp-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.mp-switch .track { width: 34px; height: 18px; border-radius: 999px; background: #333; border: 1px solid var(--bd-btn); position: relative; transition: background .15s; flex: 0 0 auto; }
.mp-switch .track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: var(--text-2); transition: left .15s, background .15s; }
.mp-switch input:checked + .track { background: var(--gold-bg); border-color: var(--gold-bd); }
.mp-switch input:checked + .track::after { left: 18px; background: var(--gold); }
.mp-switch input:focus-visible + .track { outline: 2px solid var(--gold); outline-offset: 2px; }

/* Aufklappbare Tabellenzeilen */
table.sd tr.detail > td { background: var(--bg-deep); padding: 8px 12px 10px; border-bottom: 1px solid var(--bd); }
table.sd tr.expandable { cursor: pointer; }
table.sd tr.expandable .caret { transition: transform .15s; color: var(--text-2); }
table.sd tr.expandable.open .caret { transform: rotate(90deg); color: var(--gold); }

/* Sprachwahl als Auswahlfeld (mobil bedienbar) */
.mp-langsel { width: auto !important; min-width: 64px; min-height: 28px !important; padding: 2px 6px !important; font-size: .8rem !important; }

/* Liste mit Aktionen je Zeile */
.sa-list { display: flex; flex-direction: column; gap: 4px; }
.sa-item { display: flex; align-items: center; gap: 10px; padding: 7px 10px; background: var(--bg-card); border: 1px solid var(--bd); border-radius: var(--r-md); }
.sa-item .grow { flex: 1; min-width: 0; }
.sa-item .actions { display: flex; gap: 4px; flex-wrap: wrap; }

@media (max-width: 700px) {
  .dt-tabs { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .mp-topbar .who, .mp-topbar .lbl, .mp .lbl-desk { display: none; }
  /* Tabellen als Karten: <table class="sd cards"> + <td data-l="Spalte"> */
  table.sd.cards thead { display: none; }
  table.sd.cards, table.sd.cards tbody, table.sd.cards tr, table.sd.cards td { display: block; width: 100%; }
  table.sd.cards tr { border: 1px solid var(--bd); border-radius: var(--r-md); margin-bottom: 6px; background: var(--bg-card); }
  table.sd.cards td { border: 0; padding: 4px 10px; text-align: left !important; }
  table.sd.cards td[data-l]::before { content: attr(data-l); display: block; font-size: var(--fs-min); font-weight: 700; text-transform: uppercase; color: var(--text-2); }
}
@media (prefers-color-scheme: light) {
  html[data-theme="auto"] .mp input[type=file]::file-selector-button { background: #efece6; color: #333; border-color: var(--bd-btn); }
  html[data-theme="auto"] .mp input[type=file]::file-selector-button:hover { background: #e4e0d8; color: #111; }
}

/* ---------- Ansprechpartner (MP-CONTACT-V1) ---------- */
.mp-contact-event { color: var(--gold); font-weight: 700; font-size: .92rem; margin: 0 0 8px; display: flex; gap: 8px; align-items: center; }
.mp-contact-row, .contact-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--bd); font-size: .95rem; color: var(--text); }
.mp-contact-row:last-of-type, .contact-row:last-of-type { border-bottom: 0; }
.mp-contact-row > i, .contact-row > i { width: 18px; text-align: center; color: var(--gold); flex: 0 0 auto; }
.mp-contact-row .v { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.mp-contact-card { background: var(--bg-card); border: 1px solid var(--bd); border-left: 3px solid var(--gold); border-radius: var(--r-md); padding: 8px 12px; margin: 8px 0; }
