:root{
  --bg:#303030;
  --panel:#383838;
  --panel-alt:#474747;
  --panel-alt-2:#505050;
  --line:#383838;
  --table-line:#3a3a3a;
  --blue:#4b72a6;
  --blue-strong:#2373a8;
  --text:#f4f4f4;
  --muted:#a9a9a9;
  --green:#47c982;
  --yellow:#ffe9a2;
  --yellow-text:#855c04;
  --red:#ffa2aa;
  --red-text:#721c24;
  --page-gap:clamp(5px,.42vw,16px);
  --page-pad:clamp(6px,.55vw,22px);
  --radius:clamp(6px,.4vw,14px);
  --member-col:clamp(135px,11.6vw,445px);
  --header-height:clamp(62px,7.2vh,156px);
  --footer-height:clamp(100px,16.5vh,356px);
}

*{box-sizing:border-box}
html{background:var(--bg);color-scheme:dark}
body{margin:0;background:var(--bg);color:var(--text);font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif}

/* ======================================================================
   ÖFFENTLICHE MATRIX
   Optik bewusst an die bisherige DLK-Matrix angelehnt:
   #303030 / #383838, blaue Tabellenköpfe, gelbe und rote Statusfelder.
   ====================================================================== */
.display-page{
  width:100%;
  font-family:Arial,Helvetica,sans-serif;
  height:100dvh;
  overflow:hidden;
  padding:var(--page-pad);
  display:grid;
  grid-template-rows:auto minmax(0,1fr);
  gap:var(--page-gap);
}

/* Kopfbereich ---------------------------------------------------------- */
.display-header{
  min-width:0;
  display:grid;
  grid-template-columns:minmax(190px,1fr) max-content max-content max-content;
  align-items:stretch;
  gap:var(--page-gap);
}

.display-brand{
  min-width:0;
  min-height:var(--header-height);
  display:flex;
  align-items:center;
  gap:clamp(7px,.65vw,24px);
  padding:clamp(8px,.55vw,20px);
  background:var(--panel);
  border-radius:var(--radius);
  box-shadow:0 0 clamp(6px,.55vw,20px) rgba(0,0,0,.30);
}

.logo-box{
  flex:0 0 auto;
  width:clamp(120px,10.2vw,392px);
  display:flex;
  align-items:center;
  overflow:hidden;
  border-radius:clamp(4px,.28vw,10px);
}
.display-brand__logo{display:block;width:100%;height:auto}

.display-title{min-width:0}
.display-title__eyebrow{
  display:block;
  color:#c3c3c3;
  font-size:clamp(8px,.39vw,15px);
  line-height:1;
  font-weight:700;
  letter-spacing:.08em;
  text-transform:uppercase;
  white-space:nowrap;
}
.display-title__heading{
  margin:.22em 0 0;
  color:#fff;
  font-size:clamp(18px,1.12vw,43px);
  line-height:1;
  font-weight:700;
  white-space:nowrap;
}

.header-status{
  min-width:max-content;
  width:max-content;
  min-height:var(--header-height);
  display:grid;
  grid-template-columns:repeat(3,max-content);
  gap:clamp(4px,.3vw,11px);
}

.header-stat{
  min-width:max-content;
  width:max-content;
  height:100%;
  display:grid;
  grid-template-columns:auto minmax(0,1fr);
  grid-template-rows:1fr auto;
  align-items:center;
  column-gap:clamp(5px,.4vw,15px);
  padding:clamp(7px,.5vw,18px);
  background:var(--panel);
  border-radius:var(--radius);
  box-shadow:0 0 clamp(6px,.5vw,18px) rgba(0,0,0,.24);
}
.header-stat__dot{
  grid-row:1/3;
  width:clamp(20px,.75vw,25px);
  height:clamp(20px,.75vw,25px);
  border-radius:50%;
}
.header-stat--valid .header-stat__dot{background:var(--green)}
.header-stat--warning .header-stat__dot{background:#e6bc3f}
.header-stat--expired .header-stat__dot{background:#ef626d}
.header-stat__number{
  align-self:end;
  font-size:clamp(24px,1.42vw,55px);
  line-height:.88;
  font-weight:700;
  color:#fff;
}
.header-stat__copy{align-self:start;min-width:0}
.header-stat__label{
  display:block;
  margin-top:.18em;
  font-size:clamp(9px,.54vw,21px);
  line-height:1.04;
  font-weight:700;
  color:#fff;
  white-space:nowrap;
}
.header-stat__validity{
  display:block;
  margin-top:.34em;
  color:#bdbdbd;
  font-size:clamp(8px,0.62vw,25px);
  line-height:1;
  font-weight:400;
  white-space:nowrap;
}

.crew-box,
.header-qr{
  min-width:max-content;
  width:max-content;
  min-height:var(--header-height);
  background:var(--panel);
  border-radius:var(--radius);
  box-shadow:0 0 clamp(6px,.5vw,18px) rgba(0,0,0,.24);
}

.crew-box{
  display:flex;
  flex-direction:column;
  justify-content:center;
  padding:clamp(8px,.62vw,23px);
}
.crew-box__label{
  display:block;
  color:#c4c4c4;
  font-size:clamp(8px,.42vw,16px);
  line-height:1;
  font-weight:700;
  letter-spacing:.06em;
  text-transform:uppercase;
  white-space:nowrap;
}
.crew-box__value{
  display:block;
  margin-top:.34em;
  color:#fff;
  font-size:clamp(11px,.68vw,26px);
  line-height:1.08;
  font-weight:700;
  white-space:nowrap;
}
.crew-box__value--secondary{margin-top:.18em}

.header-qr{
  color:inherit;
  text-decoration:none;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:clamp(5px,.4vw,15px);
  padding:clamp(6px,.42vw,16px);
}
.header-qr__text{min-width:0}
.header-qr__label{
  display:block;
  color:#c4c4c4;
  font-size:clamp(8px,.38vw,15px);
  line-height:1;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.06em;
  white-space:nowrap;
}
.header-qr__title{
  display:block;
  margin-top:.28em;
  color:#fff;
  font-size:clamp(10px,.58vw,22px);
  line-height:1;
  font-weight:700;
  white-space:nowrap;
}
.header-qr__image{
  flex:0 0 auto;
  width:clamp(42px,3.6vw,138px);
  height:clamp(42px,3.6vw,138px);
  padding:clamp(2px,.12vw,5px);
  background:#fff;
  border-radius:clamp(4px,.22vw,8px);
}

/* Matrix --------------------------------------------------------------- */
.display-shell{min-width:0;min-height:0}
.group-grid{
  width:100%;
  height:100%;
  min-width:0;
  min-height:0;
  display:grid;
  grid-template-columns:minmax(0,7fr) minmax(0,5fr);
  gap:var(--page-gap);
}
.matrix-board{
  min-width:0;
  min-height:0;
  overflow:hidden;
  background:var(--panel-alt);
  border-radius:var(--radius);
  box-shadow:0 4px clamp(8px,.55vw,22px) rgba(0,0,0,.20);
}
.split-card{display:grid;grid-template-rows:minmax(0,1fr)}
.table-wrap{min-width:0;min-height:0;height:100%;overflow:hidden}
.matrix-table{
  width:100%;
  height:100%;
  table-layout:fixed;
  border-collapse:collapse;
  background:var(--panel-alt);
}
.matrix-table th,
.matrix-table td{
  border:1px solid var(--table-line);
  padding:0;
}

/* Tabellenkopf im Stil der Referenz */
.matrix-table__head{height:clamp(52px,6.2vh,134px)}
.matrix-table__group-head,
.matrix-table__module-head{
  background:var(--blue);
  color:#fff;
  text-align:center;
  font-weight:700;
}
.matrix-table__group-head{
  width:var(--member-col);
  padding:0 clamp(7px,.55vw,21px)!important;
  text-align:left;
}
.matrix-table__group-title{
  display:block;
  font-size:clamp(20px,.90vw,35px);
  line-height:1;
  font-weight:700;
  white-space:nowrap;
}
.matrix-table__module-head{padding:clamp(3px,.24vw,9px)!important}
.matrix-table__module-code,
.matrix-table__module-name,
.matrix-table__module-period{display:block;white-space:nowrap;overflow:hidden}
.matrix-table__module-code{
  font-size:clamp(20px,1.0vw,40px);
  line-height:1;
  font-weight:700;
}
.matrix-table__module-name{
  margin-top:.28em;
  font-size:clamp(16px,.6vw,25px);
  line-height:1;
  font-weight:700;
}
.matrix-table__module-period{
  margin-top:.34em;
  color:#dce7f5;
  font-size:clamp(15px,.5vw,25px);
  line-height:1;
  font-weight:400;
}

/* Mitgliederzeilen */
.matrix-table__body .matrix-table__member-row:nth-child(odd)>*{background:var(--panel-alt)}
.matrix-table__body .matrix-table__member-row:nth-child(even)>*{background:var(--panel-alt-2)}
.matrix-table__body .matrix-table__member-row{
  height:calc((100% - clamp(52px,6.2vh,134px) - var(--footer-height))/var(--row-count));
}
.matrix-table__member-cell{
  width:var(--member-col);
  padding:0 clamp(6px,.48vw,18px)!important;
  text-align:left;
}
.matrix-table__member{
  height:100%;
  min-width:0;
  display:flex;
  align-items:center;
  gap:clamp(5px,.34vw,13px);
}
.matrix-table__member-status{
  flex:0 0 auto;
  width:clamp(15px,.75vw,25px);
  height:clamp(15px,.75vw,25px);
  border-radius:50%;
  background:var(--green);
}
.matrix-table__member.warning .matrix-table__member-status{background:#e6bc3f}
.matrix-table__member.expired .matrix-table__member-status{background:#ef626d}
.matrix-table__member-name{
  min-width:0;
  color:#fff;
  font-size:clamp(8px,.72vw,28px);
  line-height:1;
  font-weight:700;
  white-space:nowrap;
}
.matrix-table__member.warning .matrix-table__member-name{color:#ffe9a2}
.matrix-table__member.expired .matrix-table__member-name{
  color:#ffa2aa;
  text-decoration:line-through;
  text-decoration-thickness:1px;
}

/* Modulstatus — gültig neutral wie Referenz, Warnung/Gefahr farbig */
.matrix-table__status-cell{
  text-align:center;
  vertical-align:middle;
  color:#fff;
}
.matrix-table__status-cell.warning{
  background:var(--yellow)!important;
  color:var(--yellow-text);
}
.matrix-table__status-cell.expired{
  background:var(--red)!important;
  color:var(--red-text);
}
.matrix-table__expiry-date{
  display:block;
  font-size:clamp(15px,0.9vw,45px);
  line-height:1;
  font-weight:700;
  white-space:nowrap;
}
.matrix-table__last-completion{
  display:block;
  margin-top:.38em;
  font-size:clamp(12px,.5vw,18px);
  line-height:1;
  font-weight:400;
  white-space:nowrap;
}
.matrix-table__status-cell.valid .matrix-table__last-completion{color:#b8b8b8}
.matrix-table__status-cell.warning .matrix-table__last-completion{color:#8a6712}
.matrix-table__status-cell.expired .matrix-table__last-completion{color:#7c3339}
.matrix-table__last-label{margin-right:.2em}
.matrix-table__status-cell.expired .matrix-table__expiry-date{text-decoration:line-through;text-decoration-thickness:1px}

/* Letzte Zeile: Erklärung der Module direkt in der Matrix */
/*.matrix-table__foot{height:var(--footer-height)}*/
.matrix-table__info-row>*{background:#3d3d3d}
.matrix-table__info-label{
  width:var(--member-col);
  padding:clamp(7px,.52vw,20px)!important;
  text-align:left;
  vertical-align:top;
}
.matrix-table__info-heading{
  display:block;
  color:#fff;
  font-size:clamp(10px,.60vw,23px);
  line-height:1;
  font-weight:700;
  white-space:nowrap;
}
.matrix-table__info-subheading{
  display:block;
  margin-top:.44em;
  color:#b8b8b8;
  font-size:clamp(7px,.36vw,14px);
  line-height:1;
  font-weight:400;
  white-space:nowrap;
}
.matrix-table__info-cell{
  padding:clamp(6px,.42vw,16px)!important;
  vertical-align:top;
  text-align:left;
}
.matrix-table__info-title{
  display:block;
  margin:0;
  padding:clamp(3px,.18vw,7px) clamp(4px,.28vw,11px);
  background:var(--blue-strong);
  border-radius:clamp(2px,.12vw,5px);
  color:#fff;
  line-height:1.08;
}
.matrix-table__info-code,
.matrix-table__info-name{
  display:inline;
  font-size:clamp(8px,.50vw,16px);
  line-height:1.08;
  font-weight:700;
}
.matrix-table__info-code::after{content:": ";}
.matrix-table__info-description{
  margin:.62em 0 0;
  color:#f1f1f1;
  font-size:clamp(15px,.4vw,22px);

  line-height:1.22;
  font-weight:400;
  overflow-wrap:anywhere;
}
.matrix-table__info-validity{
  display:block;
  margin-top:.55em;
  color:#bdbdbd;
  font-size:clamp(7px,0.6vw,22px);
  line-height:1;
  font-weight:700;
  white-space:nowrap;
}

.admin-url-helper{display:none!important}

/* Kleine Tablets bleiben bewusst im gleichen 2-Spalten-Aufbau. -------- */
@media (min-width:641px) and (max-width:1100px){
  :root{
    --page-pad:6px;
    --page-gap:5px;
    --member-col:clamp(122px,16vw,176px);
    --header-height:clamp(58px,8.4vh,86px);
    --footer-height:clamp(112px,18vh,170px);
  }
  .display-header{grid-template-columns:minmax(160px,1fr) max-content max-content max-content}
  .display-brand{padding:7px}
  .logo-box{width:clamp(92px,11vw,126px)}
  .display-title__heading{font-size:clamp(14px,1.75vw,19px)}
  .header-stat{padding:6px;column-gap:4px}
  .header-stat__number{font-size:clamp(18px,2.25vw,25px)}
  .header-stat__label{font-size:clamp(7px,.95vw,10px)}
  .header-stat__validity{font-size:clamp(6px,.78vw,8px)}
  .crew-box{padding:7px}.crew-box__value{font-size:clamp(8px,1vw,11px)}
  .header-qr{padding:5px}.header-qr__image{width:clamp(38px,5.5vw,58px);height:clamp(38px,5.5vw,58px)}
  .header-qr__label{font-size:7px}.header-qr__title{font-size:9px}
  .matrix-table__group-title{font-size:clamp(10px,1.45vw,15px)}
  .matrix-table__module-code{font-size:clamp(9px,1.25vw,13px)}
  .matrix-table__module-name{font-size:clamp(6px,.9vw,9px)}
  .matrix-table__module-period{font-size:clamp(5px,.75vw,8px)}
  .matrix-table__member-name{font-size:clamp(7px,1.03vw,11px)}
  .matrix-table__expiry-date{font-size:clamp(7px,.95vw,10px)}
  .matrix-table__last-completion{font-size:clamp(5px,.72vw,7px)}
  .matrix-table__info-heading{font-size:clamp(8px,1vw,11px)}
  .matrix-table__info-subheading{font-size:clamp(5px,.7vw,8px)}
  .matrix-table__info-code,.matrix-table__info-name{font-size:clamp(6px,.78vw,8px)}
  .matrix-table__info-description{font-size:clamp(5px,.67vw,7px);line-height:1.15}
  .matrix-table__info-validity{font-size:clamp(5px,.64vw,7px)}
}

/* Smartphone: erst hier Tabellen untereinander und horizontales Scrollen. */
@media (max-width:640px){
  :root{--member-col:180px;--footer-height:auto}
  .display-page{height:auto;min-height:100dvh;overflow:auto;padding:10px;display:block}
  .display-header{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:10px}
  .display-brand{grid-column:1/-1;min-height:74px}
  .logo-box{width:170px}
  .display-title__eyebrow{font-size:8px}
  .display-title__heading{font-size:19px}
  .header-status{grid-column:1/-1;min-height:78px;gap:5px}
  .header-stat{padding:7px 6px}.header-stat__number{font-size:21px}.header-stat__label{font-size:8px}.header-stat__validity{font-size:7px}
  .crew-box,.header-qr{min-height:72px}
  .crew-box{padding:8px}.crew-box__label{font-size:8px}.crew-box__value{font-size:10px}
  .header-qr{padding:6px 8px}.header-qr__image{width:58px;height:58px}.header-qr__label{font-size:8px}.header-qr__title{font-size:11px}
  .display-shell{height:auto}
  .group-grid{height:auto;grid-template-columns:1fr;gap:10px}
  .table-wrap{height:auto;overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch}
  .matrix-table{min-width:930px;height:auto}
  .matrix-table__head{height:68px}
  .matrix-table__body .matrix-table__member-row{height:56px}
  .matrix-table__foot{height:auto}
  .matrix-table__group-title{font-size:17px}
  .matrix-table__module-code{font-size:14px}.matrix-table__module-name{font-size:10px}.matrix-table__module-period{font-size:9px}
  .matrix-table__member-name{font-size:16px}
  .matrix-table__expiry-date{font-size:15px}.matrix-table__last-completion{font-size:10px}
  .matrix-table__info-label{padding:10px!important}.matrix-table__info-heading{font-size:14px}.matrix-table__info-subheading{font-size:10px}
  .matrix-table__info-cell{padding:9px!important}.matrix-table__info-code,.matrix-table__info-name{font-size:11px}.matrix-table__info-description{font-size:10px}.matrix-table__info-validity{font-size:9px}
}

/* ======================================================================
   ADMIN-BASIS
   Der Adminbereich nutzt zusätzlich admin/admin.css.
   ====================================================================== */
.topbar{position:sticky;top:0;z-index:30;display:flex;justify-content:space-between;align-items:center;padding:14px max(22px,calc((100vw - 1500px)/2));background:rgba(48,48,48,.94);backdrop-filter:blur(16px);border-bottom:1px solid rgba(255,255,255,.06)}
.brand{display:flex;gap:12px;align-items:center}.brand-link{color:inherit;text-decoration:none}.brand-logo-admin{height:40px;width:155px;border-radius:8px;overflow:hidden;display:flex;align-items:center}.brand-logo-admin img{display:block;width:100%;height:auto}.brand strong,.brand span{display:block}.brand strong{font-size:15px}.brand span{font-size:12px;color:var(--muted);margin-top:2px}
.admin-link{display:inline-flex;align-items:center;gap:9px;color:#fff;text-decoration:none;border:1px solid #4b4b4b;background:#383838;padding:10px 14px;border-radius:11px;font-size:13px;font-weight:700}.admin-link:hover{border-color:#777}
.panel{background:#383838;border:1px solid #4b4b4b;border-radius:16px;box-shadow:0 18px 45px rgba(0,0,0,.18)}
.eyebrow{margin:0 0 7px;color:#bfc3c7;font-size:11px;font-weight:800;letter-spacing:.12em;text-transform:uppercase}
.panel-head{display:flex;justify-content:space-between;align-items:flex-end;gap:20px;margin-bottom:16px}

/* ======================================================================
   V17 — SMARTPHONE-ANSICHT
   Desktop, TV und Tablet bleiben unverändert. Unter 640 px wird die
   Matrix durch eine kompakte Mitglieder-/Akkordeonansicht ersetzt.
   ====================================================================== */
.mobile-dashboard{display:none}

@media (max-width:640px){
  .display-page{
    height:auto;
    min-height:100dvh;
    overflow:auto;
    padding:10px;
    display:block;
  }

  /* Kopf am Smartphone bewusst einfacher und fingerfreundlicher. */
  .display-header{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:8px;
    margin-bottom:10px;
  }
  .display-brand{
    grid-column:1/-1;
    min-height:72px;
    padding:9px 10px;
  }
  .logo-box{width:155px}
  .display-title__eyebrow{font-size:8px}
  .display-title__heading{font-size:19px}

  .header-status{
    grid-column:1/-1;
    min-height:76px;
    height:auto;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:5px;
  }
  .header-stat{
    min-height:76px;
    padding:7px 6px;
    grid-template-columns:7px minmax(0,1fr);
    grid-template-rows:auto auto;
    column-gap:5px;
  }
  .header-stat__dot{grid-row:1/3;width:7px;height:7px}
  .header-stat__number{font-size:22px}
  .header-stat__label{font-size:8px;white-space:normal}
  .header-stat__validity{font-size:7px;white-space:normal}

  .crew-box,
  .header-qr{
    min-height:68px;
    height:68px;
  }
  .crew-box{grid-column:1;padding:8px 9px}
  .crew-box__label{font-size:8px}
  .crew-box__value{font-size:10px}

  .header-qr{
    grid-column:2;
    display:flex;
    justify-content:center;
    padding:8px 10px;
    text-align:center;
    background:var(--blue);
  }
  .header-qr__text{width:100%}
  .header-qr__label{font-size:8px;color:#dce7f5}
  .header-qr__title{font-size:15px;margin-top:5px}
  .header-qr__image{display:none}

  /* Die breite Matrix existiert weiterhin im DOM, ist mobil aber unsichtbar. */
  .display-shell{display:none!important}

  .mobile-dashboard{
    display:block;
    width:100%;
  }

  .mobile-group-tabs{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:6px;
    margin-bottom:8px;
    padding:4px;
    background:#383838;
    border-radius:9px;
  }
  .mobile-group-tab{
    min-height:44px;
    border:0;
    border-radius:7px;
    background:transparent;
    color:#c8c8c8;
    font:700 14px/1 Arial,Helvetica,sans-serif;
    cursor:pointer;
  }
  .mobile-group-tab.is-active{
    background:var(--blue);
    color:#fff;
  }

  .mobile-status-filters{
    display:flex;
    gap:6px;
    overflow-x:auto;
    padding:0 0 9px;
    scrollbar-width:none;
    -webkit-overflow-scrolling:touch;
  }
  .mobile-status-filters::-webkit-scrollbar{display:none}
  .mobile-status-filter{
    flex:0 0 auto;
    min-height:36px;
    padding:0 12px;
    border:1px solid #555;
    border-radius:18px;
    background:#383838;
    color:#d7d7d7;
    font:700 12px/1 Arial,Helvetica,sans-serif;
    cursor:pointer;
  }
  .mobile-status-filter.is-active{
    border-color:#6c91c2;
    background:#4b72a6;
    color:#fff;
  }

  .mobile-member-list{
    display:grid;
    gap:7px;
  }
  .mobile-member-list[hidden]{display:none!important}

  .mobile-member-card{
    overflow:hidden;
    border:1px solid #4a4a4a;
    border-radius:9px;
    background:#414141;
    box-shadow:0 2px 7px rgba(0,0,0,.18);
  }
  .mobile-member-card[hidden]{display:none!important}

  .mobile-member-card__toggle{
    width:100%;
    min-height:62px;
    display:grid;
    grid-template-columns:minmax(0,1fr) auto 22px;
    grid-template-rows:auto auto;
    align-items:center;
    gap:3px 8px;
    padding:10px 10px 9px;
    border:0;
    background:transparent;
    color:#fff;
    text-align:left;
    font-family:Arial,Helvetica,sans-serif;
    cursor:pointer;
  }
  .mobile-member-card__identity{
    min-width:0;
    display:flex;
    align-items:center;
    gap:8px;
    grid-column:1;
    grid-row:1;
  }
  .mobile-member-card__dot{
    flex:0 0 auto;
    width:10px;
    height:10px;
    border-radius:50%;
    background:var(--green);
  }
  .mobile-member-card.warning .mobile-member-card__dot{background:#e6bc3f}
  .mobile-member-card.expired .mobile-member-card__dot{background:#ef626d}

  .mobile-member-card__name{
    min-width:0;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    font-size:17px;
    line-height:1.1;
    font-weight:700;
  }
  .mobile-member-card.warning .mobile-member-card__name{color:#ffe9a2}
  .mobile-member-card.expired .mobile-member-card__name{color:#ffa2aa}

  .mobile-member-card__summary{
    grid-column:1;
    grid-row:2;
    padding-left:18px;
    color:#bdbdbd;
    font-size:11px;
    line-height:1.15;
    font-weight:400;
  }
  .mobile-member-card.valid .mobile-member-card__summary{color:#9edcb9}
  .mobile-member-card.warning .mobile-member-card__summary{color:#ffe9a2}
  .mobile-member-card.expired .mobile-member-card__summary{color:#ffb4bb}

  .mobile-member-card__chevron{
    grid-column:3;
    grid-row:1/3;
    align-self:center;
    justify-self:end;
    font-size:22px;
    line-height:1;
    color:#bbb;
    transform:rotate(0deg);
    transition:transform .18s ease;
  }
  .mobile-member-card__toggle[aria-expanded="true"] .mobile-member-card__chevron{
    transform:rotate(180deg);
  }

  .mobile-member-card__details{
    border-top:1px solid #555;
    background:#353535;
  }
  .mobile-member-card__details[hidden]{display:none!important}

  .mobile-module-row{
    min-height:62px;
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    align-items:center;
    gap:8px;
    padding:9px 11px;
    border-bottom:1px solid #494949;
  }
  .mobile-module-row:last-child{border-bottom:0}
  .mobile-module-row.warning{background:var(--yellow);color:var(--yellow-text)}
  .mobile-module-row.expired{background:var(--red);color:var(--red-text)}

  .mobile-module-row__main{min-width:0}
  .mobile-module-row__code{
    display:inline-block;
    min-width:38px;
    font-size:13px;
    line-height:1;
    font-weight:700;
  }
  .mobile-module-row__name{
    font-size:13px;
    line-height:1;
    font-weight:700;
  }
  .mobile-module-row__dates{text-align:right}
  .mobile-module-row__expiry{
    display:block;
    font-size:16px;
    line-height:1;
    font-weight:700;
    white-space:nowrap;
  }
  .mobile-module-row__last{
    display:block;
    margin-top:5px;
    color:#aaa;
    font-size:10px;
    line-height:1;
    white-space:nowrap;
  }
  .mobile-module-row.warning .mobile-module-row__last{color:#80600d}
  .mobile-module-row.expired .mobile-module-row__last{color:#79343a}
}

/* ======================================================================
   IPHONE / SMARTPHONE HEADER-FIX
   Statusfelder über volle Breite, darunter Besatzung links / Module rechts
   ====================================================================== */
@media (max-width:640px){

  .display-header{
    width:100%;
    grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  }

  /* Logo/Überschrift volle Breite */
  .display-brand{
    grid-column:1 / -1;
    width:100%;
    min-width:0;
  }

  /* Die drei Statusfelder nutzen gemeinsam exakt die volle Breite */
  .header-status{
    grid-column:1 / -1;
    width:100%;
    min-width:0;
    max-width:none;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:5px;
  }

  .header-stat{
    width:100%;
    min-width:0;
    max-width:none;
    padding:7px 6px;
  }

  .header-stat__copy{
    min-width:0;
  }

  .header-stat__label,
  .header-stat__validity{
    white-space:normal;
    overflow-wrap:anywhere;
  }

  /* Zweite Zeile: Besatzung links, Module erfassen rechts */
  .crew-box{
    grid-column:1;
    grid-row:auto;
    width:100%;
    min-width:0;
    max-width:none;
    justify-self:stretch;
  }

  .header-qr{
    grid-column:2;
    grid-row:auto;
    width:100%;
    min-width:0;
    max-width:none;
    justify-self:stretch;
  }
}


.matrix-table__info-description {
    white-space: pre-line;
}