/* =========================================================
   style.css — Komponenten & Layout (NUR var(--tokens))
   ========================================================= */

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }

body{
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  font-size: var(--font-size-base);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Links */
a{ color: var(--link); text-decoration: none; }
a:visited{ color: var(--link-visited); }
a:hover{ color: var(--link-hover); text-decoration: underline; }

/* Focus */
:focus{ outline: none; }
:focus-visible{
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
  border-radius: 6px;
}

/* Layout */
.container{ max-width: 980px; margin: 2rem auto; padding: 0 1.25rem; }
.row{ display: flex; gap: .75rem; align-items: center; }
.grid{ display: grid; gap: 1rem; }

/* =========================================================
   HEADER
   ========================================================= */
header.header-bar{
  background: linear-gradient(135deg, var(--header-grad-1), var(--header-grad-2));
  color: var(--header-text);
  border-bottom: 4px solid var(--border);
  box-shadow: var(--shadow);
}

header.header-bar a{
  color: var(--header-text);
  text-decoration: none;
}

header.header-bar a:hover{
  text-decoration: underline;
}

/* Header-Innenlayout */
.header-inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  width: 100%;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.header-inner > *{
  min-width: 0;
}

/* Linker Bereich */
.user-info{
  flex: 1 1 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.user-block{
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.header-company-logo{
  height: 128px;
  width: auto;
  display: block;
  flex-shrink: 0;
  object-fit: contain;
}

.user-text{
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.user-status{
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

header.header-bar .user-medal{
  width: var(--user-medal-size);
  height: var(--user-medal-size);
  object-fit: contain;
  display: inline-block;
  vertical-align: middle;
}

.user-count,
.release-info{
  display: block;
}

.release-info{
  opacity: .9;
}

/* Mittlerer Bereich */
.header-video{
  flex: 0 0 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

/* Video */
header.header-bar .header-video-player{
  width: var(--header-video-width) !important;
  max-width: var(--header-video-width) !important;
  aspect-ratio: var(--header-video-aspect);
  height: auto !important;
  display: block;
  object-fit: var(--header-video-fit);
  object-position: center;
  border-radius: var(--header-video-radius);
  background: #000;
}

.header-video-frame{
  width: var(--header-video-width);
  aspect-ratio: var(--header-video-aspect);
}

.header-video-frame > video,
.header-video-frame > img{
  width: 100%;
  height: 100%;
  object-fit: var(--header-video-fit);
  border-radius: var(--header-video-radius);
  background: #000;
}

.header-video-fallback{
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  font-size: .85rem;
  color: var(--muted);
  padding: .5rem;
  text-align: center;
}

/* Rechter Bereich */
.language-links{
  flex: 1 1 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: .35rem;
  text-align: right;
  white-space: normal;
  overflow-wrap: anywhere;
}

/* Flags */
.lang-flag{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  line-height: 1;
}

.lang-flag img,
.lang-flag .lang-flag-icon{
  width: 22px !important;
  height: 16px !important;
  max-width: 22px !important;
  max-height: 16px !important;
  object-fit: cover;
  display: inline-block;
  vertical-align: middle;
  border-radius: 2px;
}

.lang-flag:hover img,
.lang-flag:hover .lang-flag-icon{
  transform: scale(1.08);
  transition: transform .15s ease;
}

/* Mobile Header */
@media (max-width: 1100px){
  .header-inner{
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }

  .user-info,
  .header-video,
  .language-links{
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .user-block{
    justify-content: center;
  }

  .language-links{
    justify-content: center;
  }
}

@media (max-width: 720px){
  :root{ --user-medal-size: 44px; }

  .header-company-logo{
    height: 96px;
  }
}

/* =========================================================
   CARDS / SURFACES
   ========================================================= */
.card{
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.card-notice{
  background: var(--warn-bg);
  color: #111;
  border-left: 4px solid #f59e0b;
}

/* =========================================================
   BUTTONS
   ========================================================= */
.btn,
.app-btn,
.btn-nav,
button,
input[type="button"],
input[type="submit"]{
  display: inline-block;
  padding: var(--btn-py) var(--btn-px);
  border-radius: var(--btn-radius);
  border: 1px solid transparent;
  text-decoration: none;
  font-weight: 700;
  line-height: 1.1;
  font-size: var(--btn-font-size);
  cursor: pointer;
  user-select: none;
}

.btn:hover,
.app-btn:hover,
.btn-nav:hover,
button:hover{
  filter: brightness(1.03);
}

.btn:disabled,
.app-btn[aria-disabled="true"],
button:disabled{
  opacity: .55;
  pointer-events: none;
}

.app-btn,
.btn.btn-primary,
.btn-primary{
  background: var(--btn-primary-bg);
  color: var(--btn-primary-fg);
}

a.app-btn,
a.app-btn:visited,
a.app-btn:hover,
a.app-btn:active,
a.app-btn:focus{
  color: var(--btn-primary-fg);
  text-decoration: none;
}

.app-btn.secondary,
.btn.secondary,
.btn-outline-secondary,
.btn-link{
  background: var(--btn-secondary-bg);
  color: var(--btn-secondary-fg);
  border-color: var(--btn-secondary-border);
}

a.app-btn.secondary,
a.app-btn.secondary:visited,
a.app-btn.secondary:hover,
a.app-btn.secondary:active,
a.app-btn.secondary:focus{
  color: var(--btn-secondary-fg);
  text-decoration: none;
}

/* Bootstrap Primary koppeln */
.btn-primary{
  --bs-btn-bg: var(--btn-primary-bg);
  --bs-btn-border-color: var(--btn-primary-bg);
  --bs-btn-color: var(--btn-primary-fg);
  --bs-btn-hover-bg: var(--btn-primary-bg);
  --bs-btn-hover-border-color: var(--btn-primary-bg);
  --bs-btn-hover-color: var(--btn-primary-fg);
  --bs-btn-active-bg: var(--btn-primary-bg);
  --bs-btn-active-border-color: var(--btn-primary-bg);
  color: var(--btn-primary-fg);
  background: var(--btn-primary-bg);
}

/* Auth grün */
.card:has(.form) button[type="submit"].btn,
button[type="submit"].btn{
  background-color: #b9f6b3 !important;
  color: #0b5d1e !important;
  border-color: #0b5d1e !important;
}

.card:has(.form) button[type="submit"].btn:hover,
button[type="submit"].btn:hover{
  background-color: #a6f0a0 !important;
  color: #084a18 !important;
  border-color: #084a18 !important;
}

.card:has(.form) button[type="submit"].btn:focus-visible,
button[type="submit"].btn:focus-visible{
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(11, 93, 30, 0.25) !important;
}

.form .row > button.btn{
  width: auto;
  flex: 0 0 auto;
}

/* Negative / Rosa */
.actions .btn[name="action"][value="cancel"],
button.btn[data-danger],
button.btn.btn-danger,
button.btn[value="remove"],
button.btn.minus,
button[type="submit"].btn.btn-cancel-registration,
a.btn.btn-cancel-upgrade,
a.btn.secondary.btn-cancel-upgrade,
a.btn.btn-cancel-reset{
  background-color: #f8c8dc !important;
  color: #7f1d1d !important;
  border-color: #7f1d1d !important;
  text-decoration: none !important;
}

.actions .btn[name="action"][value="cancel"]:hover,
button.btn[data-danger]:hover,
button.btn.btn-danger:hover,
button.btn[value="remove"]:hover,
button.btn.minus:hover,
button[type="submit"].btn.btn-cancel-registration:hover,
a.btn.btn-cancel-upgrade:hover,
a.btn.secondary.btn-cancel-upgrade:hover,
a.btn.btn-cancel-reset:hover{
  background-color: #f4b4cd !important;
  color: #5f1414 !important;
  border-color: #5f1414 !important;
}

.actions .btn[name="action"][value="cancel"]:focus-visible,
button[type="submit"].btn.btn-cancel-registration:focus-visible,
a.btn.btn-cancel-upgrade:focus-visible,
a.btn.secondary.btn-cancel-upgrade:focus-visible,
a.btn.btn-cancel-reset:focus-visible{
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(127,29,29,0.25) !important;
}

/* Bestand remove */
form:has(input[name="action"][value="remove"]) > button[type="submit"].btn{
  background-color: #f8c8dc !important;
  color: #7f1d1d !important;
  border-color: #7f1d1d !important;
}

form:has(input[name="action"][value="remove"]) > button[type="submit"].btn:hover{
  background-color: #f4b4cd !important;
  color: #5f1414 !important;
  border-color: #5f1414 !important;
}

/* Search grün */
#searchForm .btn-search{
  background: #b9f6b3;
  color: #0b5d1e;
  border: 1px solid #0b5d1e;
}

#searchForm .btn-search:hover{
  background: #a6f0a0;
  color: #084a18;
  border-color: #084a18;
}

#searchForm .btn-search:focus,
#searchForm .btn-search:focus-visible{
  outline: none;
  box-shadow: 0 0 0 3px rgba(11, 93, 30, 0.25);
}

/* =========================================================
   FORMS
   ========================================================= */
label{ font-weight: 600; }

input,
select,
textarea{
  width: 100%;
  padding: var(--control-py) var(--control-px);
  border-radius: var(--control-radius);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: var(--control-font-size);
}

input::placeholder,
textarea::placeholder{
  color: var(--muted);
}

.form input,
.form select,
.form textarea{
  width: 100%;
  max-width: var(--control-max-width);
  display: block;
  margin-inline: auto;
}

.form label,
.form small{
  display: block;
  max-width: var(--control-max-width);
  margin-inline: auto;
}

.form .row{
  justify-content: center;
  flex-wrap: wrap;
  align-items: flex-start;
}
.form .form-group{ margin-bottom: .9rem; }

.form .col{
  flex: 1 1 320px;
  min-width: 280px;
  max-width: 560px;
}

.form .col .form-group{
  width: 100%;
}

.form .col input,
.form .col select,
.form .col textarea{
  width: 100%;
  max-width: 100%;
  margin-inline: 0;
}

.form .col label,
.form .col small{
  max-width: 100%;
  margin-inline: 0;
}
.form fieldset{ margin-top: 1rem; padding-top: .5rem; }
.form .actions{ margin-top: 1rem; }

.form-row{
  display: flex;
  gap: .75rem;
  justify-content: center;
  align-items: baseline;
  flex-wrap: wrap;
}

.form-row > .field{
  flex: 1 1 320px;
  max-width: var(--control-max-width);
}

.form-row > .form-actions{
  flex: 0 0 100%;
  display: flex;
  justify-content: center;
  gap: .75rem;
  margin-top: .5rem;
  flex-wrap: wrap;
}

/* Card mit Form */
.card:has(.form){
  padding: 1.25rem 1.5rem;
}

.card:has(.form) > h1{
  margin-bottom: .75rem;
}

@media (max-width: 520px){
  .card:has(.form){
    padding: 1rem;
  }
}

/* Nur Filter-Formular schmaler */
.card.card-filter{
  max-width: 490px;
  margin: 0 auto 1rem;
}

/* Reset Password */
#np_new,
#np_confirm{
  width: 100%;
  max-width: 560px;
  display: block;
  margin-inline: auto;
  padding: .9rem 1rem;
  font-size: 1.1rem;
  line-height: 1.5;
  background: #fff;
  color: #111;
  border: 2px solid #94a3b8;
  border-radius: 10px;
  letter-spacing: .02em;
  box-shadow: inset 0 1px 2px rgba(0,0,0,.04);
}

#np_new:focus,
#np_confirm:focus,
#np_new:focus-visible,
#np_confirm:focus-visible{
  border-color: #4f46e5;
  box-shadow: 0 0 0 4px rgba(79,70,229,.18);
  outline: none;
}

#np_new{ margin-bottom: .35rem; }
#np_confirm{ margin-top: .15rem; }

label[for="np_new"],
label[for="np_confirm"]{
  display: block;
  max-width: 560px;
  margin: .4rem auto .35rem;
  font-size: 1rem;
  font-weight: 700;
  color: #111827;
}

small.muted{
  display: block;
  max-width: 560px;
  margin: .2rem auto .75rem;
  font-size: .95rem;
  color: #475569 !important;
}

/* =========================================================
   HERO
   ========================================================= */
.hero{
  max-width: 980px;
  margin: 1.5rem auto;
  padding: 0 1.25rem;
}

.hero > h1,
.hero > h2,
.hero > p{
  width: min(100%, var(--measure));
  margin: 0;
  text-align: left;
}

.hero > h2{ margin-top: .25rem; }
.hero > p{ margin-top: .75rem; }

/* =========================================================
   ALERTS
   ========================================================= */
.alert{
  padding: .85rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
}

.alert.success{ background: var(--ok-bg); color: #111; }
.alert.warning{ background: var(--warn-bg); color: #111; }
.alert.info{ background: var(--accent); color: #111; }
.alert.error{ background: var(--err-bg); color: #7f1d1d; }

/* =========================================================
   TABLES
   ========================================================= */
.tbl,
.shape-table{
  width: 100%;
  border-collapse: collapse;
}

.tbl th,
.tbl td,
.shape-table th,
.shape-table td{
  border-bottom: 1px solid var(--border);
  padding: .55rem .6rem;
  vertical-align: middle;
  color: var(--text);
}

/* =========================================================
   MEDIA
   ========================================================= */
img, video{ max-width: 100%; height: auto; }

.media-frame{
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 2px;
  overflow: hidden;
  display: grid;
  place-items: center;
}

.media-frame > img,
.media-frame > video{
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.media-thumb{
  width: 140px;
  height: 140px;
}

@media (max-width: 480px){
  .media-thumb{
    width: 110px;
    height: 110px;
  }
}

/* Bestand Thumbs */
.bestand-thumb-cell{
  width: 4cm;
  min-width: 4cm;
  max-width: 4cm;
  height: 4cm;
  padding: .4rem;
  text-align: center;
  vertical-align: middle;
}

.bestand-thumb{
  display: block;
  width: 4cm;
  height: 4cm;
  object-fit: contain;
  object-position: center;
  margin: 0 auto;
}

/* =========================================================
   BADGES
   ========================================================= */
.badge{
  background: var(--badge-bg) !important;
  color: var(--badge-fg) !important;
  --bs-badge-color: var(--badge-fg);
}

/* =========================================================
   INDEX / CARDS
   ========================================================= */
.cards{
  max-width: 980px;
  margin: 1.5rem auto;
  padding: 0 1.25rem;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 1.5rem;
}

.cards > .card{
  width: 100%;
  min-width: 0;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
}

.cards .card img{
  width: 100%;
  height: 150px;
  object-fit: contain;
  background: transparent !important;
  border-radius: 0 !important;
  display: block;
}

/* =========================================================
   MODALS
   ========================================================= */
.modal-content{
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}

.help-modal__panel,
.modal-shape__dialog{
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}

body[data-theme="2"] .btn-close,
body[data-theme="3"] .btn-close{
  filter: invert(1) grayscale(100%);
  opacity: .9;
}

/* Help Modal */
.help-modal{
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1055;
}

.help-modal.is-open{ display: block; }

.help-modal__backdrop{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.45);
}

.help-modal__panel{
  position: absolute;
  left: 50%;
  top: 10vh;
  transform: translateX(-50%);
  width: min(960px, calc(100% - 2rem));
  max-height: 80vh;
  overflow: auto;
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.help-modal__head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .75rem 1rem;
  border-bottom: 1px solid var(--border);
}

.help-modal__body{ padding: 1rem; }

.help-modal__close{
  border: 0;
  background: transparent;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: var(--text);
}

body.modal-open{ overflow: hidden; }

/* Layout Config Modal */
#layoutConfigModal{ display: none; }
#layoutConfigModal.show{ display: block; }
#layoutConfigModal[aria-hidden="true"]:not(.show){ display: none !important; }

/* ABO Modal */
.abo-modal{
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.abo-modal.is-open{ display: flex; }

.abo-modal__backdrop{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(2px);
  z-index: 1990;
  display: none;
}

.abo-modal__backdrop.is-open{ display: block; }

.abo-modal__dialog{
  position: relative;
  width: min(720px, 92%);
  max-height: 85vh;
  overflow-y: auto;
  background: var(--surface);
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: 0 25px 60px rgba(0,0,0,.35);
  padding: 1.5rem;
}

#aboDisagree{
  background: #f8c8dc;
  color: #7f1d1d;
  border: 1px solid #7f1d1d;
}

#aboDisagree:hover{
  background: #f4b4cd;
  color: #5f1414;
  border-color: #5f1414;
}

#aboDisagree:focus-visible{
  outline: none;
  box-shadow: 0 0 0 3px rgba(127, 29, 29, 0.25);
}

#aboAgree{
  background: #b9f6b3;
  color: #0b5d1e;
  border: 1px solid #0b5d1e;
}

#aboAgree:hover{
  background: #a6f0a0;
  color: #084a18;
  border-color: #084a18;
}

#aboAgree:focus-visible{
  outline: none;
  box-shadow: 0 0 0 3px rgba(11, 93, 30, 0.25);
}

/* Print Modal */
.print-list{
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: .75rem;
  max-height: 280px;
  overflow: auto;
  background: var(--surface-2);
}

.print-item{
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  padding: .25rem 0;
}

.print-item input[type="checkbox"]{
  width: auto;
  margin-top: .2rem;
}

#printModal .abo-modal__dialog{
  z-index: 2001;
}

#printModal input[type="checkbox"]{
  width: auto;
  display: inline-block;
}

html[data-theme="2"] #printModal .btn,
body[data-theme="2"] #printModal .btn,
html[data-theme="3"] #printModal .btn,
body[data-theme="3"] #printModal .btn{
  background: var(--surface-2) !important;
  color: var(--text) !important;
  border: 1px solid var(--border) !important;
}

html[data-theme="2"] #printModal .btn:hover,
body[data-theme="2"] #printModal .btn:hover,
html[data-theme="3"] #printModal .btn:hover,
body[data-theme="3"] #printModal .btn:hover{
  filter: brightness(1.12) !important;
}

/* =========================================================
   NAV HELPER / FOOTER
   ========================================================= */
.nav-helper{
  position: sticky;
  bottom: 0;
  z-index: 1040;
  background: var(--helper-bg);
  color: var(--helper-fg);
  border-top: 1px solid var(--border);
  max-width: 980px;
  margin: 0 auto;
  padding: .75rem 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: .6rem;
  flex-wrap: wrap;
}

.nav-helper .btn,
.nav-helper a.btn{
  background: var(--helper-btn-bg);
  color: var(--helper-btn-fg);
  border: 1px solid var(--helper-btn-border);
  text-decoration: none;
}

.nav-helper .btn:hover,
.nav-helper a.btn:hover{
  filter: brightness(1.08);
}

.nav-helper .btn:focus-visible,
.nav-helper a.btn:focus-visible{
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

@media (max-width: 720px){
  .nav-helper{
    padding: .6rem .75rem;
    gap: .5rem;
  }
}

/* =========================================================
   PAYSELECT
   ========================================================= */
.payselect{
  max-width: var(--control-max-width);
  margin-inline: auto;
  position: relative;
}

select.is-hidden-native{
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.payselect__btn{
  width: 100%;
  max-width: var(--control-max-width);
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: var(--control-py) var(--control-px);
  border-radius: var(--control-radius);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.payselect__label{
  flex: 1 1 auto;
  text-align: left;
}

.payselect__chev{
  flex: 0 0 auto;
  opacity: .8;
}

.payselect__svg{
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.payselect__svg svg,
.payselect__svg img{
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  display: block;
}

.payselect__list{
  display: none;
  position: absolute;
  z-index: 50;
  left: 0;
  right: 0;
  margin-top: .35rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  max-height: 280px;
  overflow: auto;
}

.payselect.is-open .payselect__list{
  display: block;
}

.payselect__item{
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .55rem .75rem;
  cursor: pointer;
}

.payselect__item:hover{
  background: var(--surface-2);
}

/* =========================================================
   GATEKEEPER
   ========================================================= */
.card.gate-card{
  padding: 1.25rem 1.5rem;
  max-width: 760px;
  margin: 0 auto;
}

.gate-head{
  display: flex;
  gap: .9rem;
  align-items: flex-start;
}

.gate-icon{
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 1.2rem;
  flex: 0 0 auto;
}

.gate-titles h1{
  margin: 0;
  line-height: 1.2;
}

.gate-subtitle{
  margin-top: .25rem;
  color: var(--muted);
}

.gate-msg{ margin-top: .9rem; }
.gate-code{ margin-top: .5rem; }

.gate-actions{
  margin-top: 1.2rem;
  display: flex;
  gap: .8rem;
  flex-wrap: wrap;
  align-items: center;
}

.gate-hint{
  margin-top: .75rem;
}

/* =========================================================
   UTILITIES
   ========================================================= */
.muted{
  color: var(--muted) !important;
  opacity: 1 !important;
}

.card .truncate[style*="opacity"]{
  opacity: 1 !important;
  color: var(--muted) !important;
}

.truncate{
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* =========================================================
   SPEZIALFÄLLE DUNKLE THEMES
   ========================================================= */
body[data-theme="2"] .membership-bank-note,
body[data-theme="3"] .membership-bank-note{
  background: #cfe3f1 !important;
  color: #10212f !important;
  border: 1px solid #8fb6d1 !important;
}

body[data-theme="2"] .membership-bank-note a,
body[data-theme="3"] .membership-bank-note a{
  color: #0b4f8a !important;
}

body[data-theme="2"] .membership-bank-note code,
body[data-theme="3"] .membership-bank-note code{
  background: rgba(255,255,255,.45);
  color: #10212f;
  padding: .1rem .35rem;
  border-radius: 6px;
}

body[data-theme="2"] .container > div > .btn,
body[data-theme="3"] .container > div > .btn{
  background: var(--surface-2) !important;
  color: var(--text) !important;
  border: 1px solid var(--border) !important;
}

body[data-theme="2"] .container > div > .btn:hover,
body[data-theme="3"] .container > div > .btn:hover{
  filter: brightness(1.15);
}

.btn-close-page{
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid #9aa0a6;
}

.btn-close-page:hover{
  filter: brightness(1.15);
}

/* =========================================================
   RESEND CARD
   ========================================================= */
#resend.card{
  width: min(980px, calc(100% - 2.5rem));
  margin: 1rem auto 0;
  padding: 1.25rem 1.5rem;
}

#resend.card > h2{
  margin-bottom: .75rem;
}

@media (max-width: 520px){
  #resend.card{
    width: calc(100% - 2rem);
    padding: 1rem;
  }
}
/* =========================================================
   FIX: Lesbarkeit in hellen Content-Boxen bei Dark Theme
   ========================================================= */

html[data-theme="3"] .card,
body[data-theme="3"] .card,
html[data-theme="3"] .notice-modal,
body[data-theme="3"] .notice-modal,
html[data-theme="3"] .notice-box,
body[data-theme="3"] .notice-box,
html[data-theme="3"] .sponsor-card,
body[data-theme="3"] .sponsor-card,
html[data-theme="3"] .sponsor-page,
body[data-theme="3"] .sponsor-page {
  color: #111 !important;
}

html[data-theme="3"] .card h1,
html[data-theme="3"] .card h2,
html[data-theme="3"] .card h3,
html[data-theme="3"] .card h4,
html[data-theme="3"] .card h5,
html[data-theme="3"] .card h6,
body[data-theme="3"] .card h1,
body[data-theme="3"] .card h2,
body[data-theme="3"] .card h3,
body[data-theme="3"] .card h4,
body[data-theme="3"] .card h5,
body[data-theme="3"] .card h6,
html[data-theme="3"] .notice-modal h1,
html[data-theme="3"] .notice-modal h2,
html[data-theme="3"] .notice-modal h3,
body[data-theme="3"] .notice-modal h1,
body[data-theme="3"] .notice-modal h2,
body[data-theme="3"] .notice-modal h3,
html[data-theme="3"] .sponsor-card h1,
html[data-theme="3"] .sponsor-card h2,
html[data-theme="3"] .sponsor-card h3,
body[data-theme="3"] .sponsor-card h1,
body[data-theme="3"] .sponsor-card h2,
body[data-theme="3"] .sponsor-card h3 {
  color: #111 !important;
}

html[data-theme="3"] .card p,
html[data-theme="3"] .card li,
html[data-theme="3"] .card span,
html[data-theme="3"] .card label,
html[data-theme="3"] .card small,
body[data-theme="3"] .card p,
body[data-theme="3"] .card li,
body[data-theme="3"] .card span,
body[data-theme="3"] .card label,
body[data-theme="3"] .card small,
html[data-theme="3"] .notice-modal p,
html[data-theme="3"] .notice-modal li,
html[data-theme="3"] .notice-modal span,
html[data-theme="3"] .notice-modal label,
html[data-theme="3"] .notice-modal small,
body[data-theme="3"] .notice-modal p,
body[data-theme="3"] .notice-modal li,
body[data-theme="3"] .notice-modal span,
body[data-theme="3"] .notice-modal label,
body[data-theme="3"] .notice-modal small,
html[data-theme="3"] .notice-box p,
html[data-theme="3"] .notice-box li,
html[data-theme="3"] .notice-box span,
body[data-theme="3"] .notice-box p,
body[data-theme="3"] .notice-box li,
body[data-theme="3"] .notice-box span,
html[data-theme="3"] .sponsor-card p,
html[data-theme="3"] .sponsor-card li,
html[data-theme="3"] .sponsor-card span,
html[data-theme="3"] .sponsor-card label,
html[data-theme="3"] .sponsor-card small,
body[data-theme="3"] .sponsor-card p,
body[data-theme="3"] .sponsor-card li,
body[data-theme="3"] .sponsor-card span,
body[data-theme="3"] .sponsor-card label,
body[data-theme="3"] .sponsor-card small {
  color: #222 !important;
  opacity: 1 !important;
}

html[data-theme="3"] .card a,
html[data-theme="3"] .notice-modal a,
html[data-theme="3"] .notice-box a,
html[data-theme="3"] .sponsor-card a,
body[data-theme="3"] .card a,
body[data-theme="3"] .notice-modal a,
body[data-theme="3"] .notice-box a,
body[data-theme="3"] .sponsor-card a {
  color: #0a58ca !important;
  opacity: 1 !important;
}

html[data-theme="3"] .card input,
html[data-theme="3"] .card select,
html[data-theme="3"] .card textarea,
html[data-theme="3"] .notice-modal input,
html[data-theme="3"] .notice-modal select,
html[data-theme="3"] .notice-modal textarea,
body[data-theme="3"] .card input,
body[data-theme="3"] .card select,
body[data-theme="3"] .card textarea,
body[data-theme="3"] .notice-modal input,
body[data-theme="3"] .notice-modal select,
body[data-theme="3"] .notice-modal textarea {
  color: #111 !important;
  background: #fff !important;
  border-color: #bbb !important;
}

html[data-theme="3"] .card input::placeholder,
html[data-theme="3"] .card textarea::placeholder,
html[data-theme="3"] .notice-modal input::placeholder,
html[data-theme="3"] .notice-modal textarea::placeholder,
body[data-theme="3"] .card input::placeholder,
body[data-theme="3"] .card textarea::placeholder,
body[data-theme="3"] .notice-modal input::placeholder,
body[data-theme="3"] .notice-modal textarea::placeholder {
  color: #666 !important;
  opacity: 1 !important;
}

/* =========================================================
   FINAL FIX: Lesbarkeit in hellen Boxen im Dark Theme
   ========================================================= */

html[data-theme="3"] .sponsor-card,
html[data-theme="3"] .sponsor-card *,
body[data-theme="3"] .sponsor-card,
body[data-theme="3"] .sponsor-card *,

html[data-theme="3"] .sponsor-text,
html[data-theme="3"] .sponsor-text *,
body[data-theme="3"] .sponsor-text,
body[data-theme="3"] .sponsor-text *,

html[data-theme="3"] .sponsor-contact,
html[data-theme="3"] .sponsor-contact *,
body[data-theme="3"] .sponsor-contact,
body[data-theme="3"] .sponsor-contact *,

html[data-theme="3"] .notice-modal,
html[data-theme="3"] .notice-modal *,
body[data-theme="3"] .notice-modal,
body[data-theme="3"] .notice-modal *,

html[data-theme="3"] .notice-box,
html[data-theme="3"] .notice-box *,
body[data-theme="3"] .notice-box,
body[data-theme="3"] .notice-box *,

html[data-theme="3"] .card,
html[data-theme="3"] .card *,
body[data-theme="3"] .card,
body[data-theme="3"] .card * {
  color: #111 !important;
  opacity: 1 !important;
}

html[data-theme="3"] .sponsor-card a,
html[data-theme="3"] .sponsor-text a,
html[data-theme="3"] .sponsor-contact a,
html[data-theme="3"] .notice-modal a,
html[data-theme="3"] .notice-box a,
html[data-theme="3"] .card a,
body[data-theme="3"] .sponsor-card a,
body[data-theme="3"] .sponsor-text a,
body[data-theme="3"] .sponsor-contact a,
body[data-theme="3"] .notice-modal a,
body[data-theme="3"] .notice-box a,
body[data-theme="3"] .card a {
  color: #0a58ca !important;
  opacity: 1 !important;
}

html[data-theme="3"] .card input,
html[data-theme="3"] .card select,
html[data-theme="3"] .card textarea,
html[data-theme="3"] .notice-modal input,
html[data-theme="3"] .notice-modal select,
html[data-theme="3"] .notice-modal textarea,
body[data-theme="3"] .card input,
body[data-theme="3"] .card select,
body[data-theme="3"] .card textarea,
body[data-theme="3"] .notice-modal input,
body[data-theme="3"] .notice-modal select,
body[data-theme="3"] .notice-modal textarea {
  color: #111 !important;
  background: #fff !important;
  border-color: #bbb !important;
}

html[data-theme="3"] .card input::placeholder,
html[data-theme="3"] .card textarea::placeholder,
html[data-theme="3"] .notice-modal input::placeholder,
html[data-theme="3"] .notice-modal textarea::placeholder,
body[data-theme="3"] .card input::placeholder,
body[data-theme="3"] .card textarea::placeholder,
body[data-theme="3"] .notice-modal input::placeholder,
body[data-theme="3"] .notice-modal textarea::placeholder {
  color: #666 !important;
  opacity: 1 !important;
}
/* =========================================================
   HARD RESET für Content-Boxen im Dark Theme
   ========================================================= */

html[data-theme="3"] .sponsor-card,
body[data-theme="3"] .sponsor-card,
html[data-theme="3"] .notice-modal,
body[data-theme="3"] .notice-modal,
html[data-theme="3"] .notice-box,
body[data-theme="3"] .notice-box,
html[data-theme="3"] .card,
body[data-theme="3"] .card {
  background: #ffffff !important;
  color: #111111 !important;

  /* 🔥 DAS IST DER WICHTIGE TEIL */
  opacity: 1 !important;
  filter: none !important;
}

/* ALLE KINDER RESETTEN */
html[data-theme="3"] .sponsor-card *,
body[data-theme="3"] .sponsor-card *,
html[data-theme="3"] .notice-modal *,
body[data-theme="3"] .notice-modal *,
html[data-theme="3"] .notice-box *,
body[data-theme="3"] .notice-box *,
html[data-theme="3"] .card *,
body[data-theme="3"] .card * {
  color: #111111 !important;
  opacity: 1 !important;
  filter: none !important;
}

/* Buttons sichtbar */
html[data-theme="3"] .sponsor-card button,
body[data-theme="3"] .sponsor-card button {
  color: #000 !important;
}

/* Mail Icon / SVG sichtbar */
html[data-theme="3"] .sponsor-card svg,
body[data-theme="3"] .sponsor-card svg {
  opacity: 1 !important;
  filter: none !important;
}

/* =========================================================
   PAGE-SPECIFIC FIX: Sponsor / 24h Access text readability
   ========================================================= */

/* Sponsor_werden.php */
body[data-theme] .sponsor-card,
body[data-theme] .sponsor-card .sponsor-title,
body[data-theme] .sponsor-card .sponsor-text,
body[data-theme] .sponsor-card .sponsor-text p,
body[data-theme] .sponsor-card .sponsor-text span,
body[data-theme] .sponsor-card .sponsor-text div,
body[data-theme] .sponsor-card .sponsor-contact,
body[data-theme] .sponsor-card .sponsor-contact span,
body[data-theme] .sponsor-card .sponsor-contact div,
body[data-theme] .sponsor-card .mail-address {
  color: #111 !important;
  opacity: 1 !important;
  filter: none !important;
  text-shadow: none !important;
}

body[data-theme] .sponsor-card a,
body[data-theme] .sponsor-card .mail-address a {
  color: #0a58ca !important;
  opacity: 1 !important;
}

/* 24hr_Access.php */
body[data-theme] .notice-modal,
body[data-theme] .notice-modal h1,
body[data-theme] .notice-modal h2,
body[data-theme] .notice-modal h3,
body[data-theme] .notice-box,
body[data-theme] .notice-box p,
body[data-theme] .notice-box span,
body[data-theme] .notice-box div,
body[data-theme] .notice-box li {
  color: #111 !important;
  opacity: 1 !important;
  filter: none !important;
  text-shadow: none !important;
}

body[data-theme] .notice-modal a,
body[data-theme] .notice-box a {
  color: #0a58ca !important;
  opacity: 1 !important;
}

.email-reveal-button {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  color: inherit;
  text-decoration: underline;
  cursor: pointer;
  font: inherit;
}
<style>
.admin-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,.04);
}

.admin-card h2 {
    margin-top: 0;
}

.cron-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.cron-table th,
.cron-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
    vertical-align: top;
}

.cron-table th {
    background: #f9fafb;
    font-weight: 600;
}

.cron-table code {
    background: #f3f4f6;
    padding: 2px 5px;
    border-radius: 5px;
    font-size: 13px;
}

.cron-table tr:hover {
    background: #f9fafb;
}
</style>
