/* TRA Checkbox Grid für tra-not-requestable-admin.php */
.tra-checkbox-grid {
  margin: 0.5em 0 1em 0;
}
.tra-checkbox-label {
  margin-bottom: 0.5em;
  font-weight: 500;
  padding: 2px 0 2px 2px;
  border-radius: 4px;
  transition: background 0.2s, color 0.2s;
}
.tra-checkbox-label input[type="checkbox"] {
  margin-right: 0.5em;
}
body.dark-mode .tra-checkbox-label {
  background: #232222;
  color: #bbb;
}
.tra-checkbox-label:hover {
  background: #e3f2fd;
  color: #1565c0;
}
body.dark-mode .tra-checkbox-label:hover {
  background: #333a4d;
  color: #7fc1ff;
}
/* Statistik-Tabellen als Card-Style */
.statistic-list {
  display: flex;
  flex-direction: column;
  margin: 2em 0 2.5em 0;
  width: 100%;
  max-width: 900px !important;
}
.statistic-summary-flex {
  display: flex;
  flex-direction: column;
  gap: 2em;
  width: 100%;
  max-width: 900px;
  margin: 2em 0 2.5em 0;
}
.statistic-summary-flex .statistic-summary-card.stat-gesamt {
  flex: 1 1 ;
  min-width: 200px;
  max-width: 260px;
  margin-right: 2em;
  align-self: flex-start;
}
.statistic-summary-flex .statistic-summary-right {
  display: flex;
  flex: 2 1 0;
  gap: 1.2em;
  justify-content: flex-end;
  align-items: stretch;
  width: 100%;
}
@media (max-width: 1200px) {
  .statistic-summary-flex { flex-direction: column; gap: 1.5em; }
  .statistic-summary-flex .statistic-summary-card.stat-gesamt {
    margin-right: 0;
    max-width: 900px;
    align-self: stretch;
    min-height: unset;
  }
  .statistic-summary-flex .statistic-summary-right {
    justify-content: flex-start;
    width: 100%;
  }
}
.statistic-card-table {
  background: #f8fafd;
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  border-left: 7px solid #bdbdbd;
  transition: box-shadow 0.2s, border-color 0.2s;
  overflow-x: auto;
  width: 100%;
  max-width: 900px;
}
.statistic-card-table .statistic-list-header,
.statistic-card-table .statistic-list-row {
  border-right: 1px solid #e0e0e0;
}
.statistic-card-table .statistic-list-header > div,
.statistic-card-table .statistic-list-row > div {
  border-left: 1px solid #e0e0e0;
  padding-top: 0.4em;
  padding-bottom: 0.4em;
}
.statistic-card-table .statistic-list-header > div:first-child,
.statistic-card-table .statistic-list-row > div:first-child {
  border-left: none;
}
body.dark-mode .statistic-card-table .statistic-list-header,
body.dark-mode .statistic-card-table .statistic-list-row {
  border-right: 1px solid #333;
}
body.dark-mode .statistic-card-table .statistic-list-header > div,
body.dark-mode .statistic-card-table .statistic-list-row > div {
  border-left: 1px solid #333;
}
body.dark-mode .statistic-card-table .statistic-list-header > div:first-child,
body.dark-mode .statistic-card-table .statistic-list-row > div:first-child {
  border-left: none;
}
.statistic-card-table.stat-aktivierungen { border-left-color: #4caf50; }
.statistic-card-table.stat-verlaengerungen { border-left-color: #2196f3; }
.statistic-card-table.stat-deaktivierungen { border-left-color: #ff9800; }
.statistic-card-table.stat-ablehnungen { border-left-color: #f44336; }
.statistic-card-table:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.10);
}
.statistic-card-table .statistic-list-header {
  background: transparent;
  border-bottom: 1px solid #e0e0e0;
  font-size: 1.08em;
  font-weight: 600;
}
.statistic-card-table .statistic-list-row {
  background: transparent;
  border-bottom: 1px solid #f0f0f0;
  transition: background 0.15s;
}
.statistic-card-table .statistic-list-row:last-child {
  border-bottom: none;
}
.statistic-card-table .statistic-list-row:hover {
  background: #e3f0ff;
}
body.dark-mode .statistic-card-table {
  background: #23272e;
  color: #eee;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
}
body.dark-mode .statistic-card-table .statistic-list-header {
  border-bottom: 1px solid #333;
}
body.dark-mode .statistic-card-table .statistic-list-row {
  border-bottom: 1px solid #222;
}
body.dark-mode .statistic-card-table .statistic-list-row:hover {
  background: #1a2233;
}
/* Zahlen in Statistik-Tabellen rechtsbündig */
.statistic-list-row > div:not(:first-child),
.statistic-list-header > div:not(:first-child) {
  text-align: right;
}

/* Gesamtstatistik Card-Style */
.statistic-summary-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5em;
  margin: 2em 0 2.5em 0;
}
.statistic-summary-card {
  flex: 1 1 180px;
  min-width: 160px;
  max-width: 220px;
  background: #f8fafd;
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  padding: 1.2em 1.2em 1em 1.2em;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  border-left: 7px solid #bdbdbd;
  position: relative;
  transition: box-shadow 0.2s;
}
.statistic-summary-card.stat-aktivierungen { border-left-color: #4caf50; }
.statistic-summary-card.stat-verlaengerungen { border-left-color: #2196f3; }
.statistic-summary-card.stat-deaktivierungen { border-left-color: #ff9800; }
.statistic-summary-card.stat-ablehnungen { border-left-color: #f44336; }
.statistic-summary-card .stat-card-label {
  font-size: 1.1em;
  color: #888;
  margin-bottom: 0.2em;
  display: flex;
  align-items: center;
  gap: 0.5em;
}
.statistic-summary-card .stat-card-value {
  font-size: 2.1em;
  font-weight: bold;
  color: #4e4e4e;
  margin-bottom: 0.1em;
}
.statistic-summary-card .stat-card-icon {
  font-size: 1.3em;
  margin-right: 0.3em;
  opacity: 0.8;
}
.statistic-summary-card.stat-aktivierungen .stat-card-value { color: #4caf50; }
.statistic-summary-card.stat-verlaengerungen .stat-card-value { color: #2196f3; }
.statistic-summary-card.stat-deaktivierungen .stat-card-value { color: #ff9800; }
.statistic-summary-card.stat-ablehnungen .stat-card-value { color: #f44336; }
body.dark-mode .statistic-summary-card {
  background: #23272e;
  color: #eee;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
}
body.dark-mode .statistic-summary-card .stat-card-label { color: #aaa; }
body.dark-mode .statistic-summary-card .stat-card-value { color: #9a9d9e; }
body.dark-mode .statistic-summary-card.stat-aktivierungen .stat-card-value { color: #7fff7f; }
body.dark-mode .statistic-summary-card.stat-verlaengerungen .stat-card-value { color: #7fc1ff; }
body.dark-mode .statistic-summary-card.stat-deaktivierungen .stat-card-value { color: #ffb74d; }
body.dark-mode .statistic-summary-card.stat-ablehnungen .stat-card-value { color: #ff8a65; }
/* Zentrierung für Statistikseite */
.statistic-center-wrapper {
  width: 100%;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}
.statistic-center-wrapper form,
.statistic-center-wrapper > h2,
.statistic-center-wrapper > canvas,
.statistic-center-wrapper .history-list {
  width: 100%;
  max-width: 100%;
  margin-left: 0;
  margin-right: 0;
  text-align: left;
}
.statistic-list-header > div {
  position: relative;
  padding-left: 0.7em;
}
.statistic-list-header > .stat-col-interaktionen::before {
  content: "";
  position: absolute;
  left: 0;
  top: 15%;
  bottom: 15%;
  width: 4px;
  background: #bdbdbd;
  border-radius: 2px;
}
.statistic-list-header > .stat-col-aktivierungen::before {
  content: "";
  position: absolute;
  left: 0;
  top: 15%;
  bottom: 15%;
  width: 4px;
  background: #4caf50;
  border-radius: 2px;
}
.statistic-list-header > .stat-col-verlaengerungen::before {
  content: "";
  position: absolute;
  left: 0;
  top: 15%;
  bottom: 15%;
  width: 4px;
  background: #2196f3;
  border-radius: 2px;
}
.statistic-list-header > .stat-col-deaktivierungen::before {
  content: "";
  position: absolute;
  left: 0;
  top: 15%;
  bottom: 15%;
  width: 4px;
  background: #ff9800;
  border-radius: 2px;
}
.statistic-list-header > .stat-col-ablehnungen::before {
  content: "";
  position: absolute;
  left: 0;
  top: 15%;
  bottom: 15%;
  width: 4px;
  background: #f44336;
  border-radius: 2px;
}
/* --- TRA Einzelaktionen: Light/Dark Mode Anpassung --- */
.tra-einzelaktion-block {
    margin-bottom: 1em;
    padding: 0.7em 1em;
    border-radius: 7px;
    background: #f8fafd;
    color: #222;
}
@media (prefers-color-scheme: dark) {
    .tra-einzelaktion-block {
        background: #232a33;
        color: #e6e6e6;
    }
    .tra-einzelaktion-block label,
    .tra-einzelaktion-block span {
        color: #e6e6e6;
    }
}

/* Breitere Zeitfelder für Start/Ende */
.tra-einzelaktion-block input[type="time"] {
    width: 180px !important;
    min-width: 120px;
    font-size: 1.1em;
}
.sticky-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}

@media (prefers-color-scheme: dark) {
  .sticky-header {
    background: #222;
    color: #fff;
  }
}
.history-list-row.deactivated-row { background: #f5f5f5 !important; color: #aaa !important; opacity: 0.7; }
body.dark-mode .history-list-row.deactivated-row { background: #232222 !important; color: #bbb !important; opacity: 0.7; }

@media (max-width: 700px) {
  .col-id, .col-status, .col-verein, .col-user { display: none; }
  .history-list-header > .col-id,
  .history-list-header > .col-status,
  .history-list-header > .col-verein,
  .history-list-header > .col-user {
    display: none;
  }
  .history-list-row > .col-id,
  .history-list-row > .col-status,
  .history-list-row > .col-verein,
  .history-list-row > .col-user {
    display: none;
  }
}
.history-list-header { position: sticky; top: 0; background: #fff; z-index: 2; }
.audit-list-row.audit-row-error {
  background: #ffeaea !important;
  border-left: 5px solid #e53935;
}
.audit-list-row.audit-row-login {
  background: #e3f2fd !important;
  border-left: 5px solid #1976d2;
}
.audit-list-row.audit-row-create {
  background: #e8f5e9 !important;
  border-left: 5px solid #43a047;
}
.audit-list-row.audit-row-update {
  background: #fffde7 !important;
  border-left: 5px solid #fbc02d;
}
.audit-list-row.audit-row-delete {
  background: #fbe9e7 !important;
  border-left: 5px solid #d84315;
}
body.dark-mode .audit-list-row.audit-row-error {
  background: #3a2323 !important;
  border-left: 5px solid #e57373;
}
body.dark-mode .audit-list-row.audit-row-login {
  background: #22304a !important;
  border-left: 5px solid #64b5f6;
}
body.dark-mode .audit-list-row.audit-row-create {
  background: #1b2a1b !important;
  border-left: 5px solid #81c784;
}
body.dark-mode .audit-list-row.audit-row-update {
  background: #2a2a1b !important;
  border-left: 5px solid #ffe082;
}
body.dark-mode .audit-list-row.audit-row-delete {
  background: #3a2323 !important;
  border-left: 5px solid #ff8a65;
}

.tra-aktivierung-reiter {
  display: block;
  font-weight: 600;
  background: #fafafa;
  border: 1px solid #e0e0e0;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 16px;
  padding: 0.7em 1.5em 0.5em 1.5em;
  margin: 0 0 0.2em 0;
  color: #1a4a7a;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
  letter-spacing: 0.01em;
  text-align: left;
  position: relative;
  z-index: 2;
  min-width: 140px;
  max-width: 300px;
}
body.dark-mode .tra-aktivierung-reiter {
  background: #23272e;
  border-color: #333;
  color: #7fc1ff;
}

.zeltweg-manned-timeinput-custom {
  background: #a6c3d8;
  border-radius: 10px;
  margin-top: 0.5em;
  padding: 0 1em 0 0;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
body.dark-mode .zeltweg-manned-timeinput-custom {
  background: #1a2633;
}
.zeltweg-manned-flex {
  display: flex;
  flex-direction: row;
  align-items: stretch;
}
.zeltweg-manned-label-col {
  min-width: 60px;
  max-width: 70px;
  background: #e3eaf6;
  color: #0d2a4a;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px 0 0 8px;
  font-weight: bold;
  font-size: 1.5em;
  letter-spacing: 0.1em;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  padding: 0.5em 0.2em;
  margin-right: 1.5em;
  flex-direction: column;
  gap: 0.2em;
  writing-mode: initial;
  text-orientation: initial;
}
body.dark-mode .zeltweg-manned-label-col {
  background: #22304a;
  color: #b3d1ff;
}

.zeltweg-manned-label-verticals {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: 100%;
  gap: 0.2em;
  min-height: 90px;
}
.zeltweg-manned-loxz {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  letter-spacing: 0.15em;
  font-size: 1em;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 90px;
}
.zeltweg-manned-label-sub-vertical {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-size: 0.65em;
  font-weight: 400;
  color: #4a5a7a;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: rotate(180deg);
}
body.dark-mode .zeltweg-manned-label-sub-vertical {
  color: #b3d1ff;
  opacity: 0.7;
}
.zeltweg-manned-input-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.zeltweg-manned-title {
  font-size: 1.1em;
  font-weight: 600;
  margin-bottom: 0.7em;
  color: #0d2a4a;
}
body.dark-mode .zeltweg-manned-title {
  color: #b3d1ff;
}
.zeltweg-manned-input-row {
  display: flex;
  gap: 1.2em;
  margin-bottom: 0.7em;
}
.zeltweg-manned-input-wrap {
  flex: 1;
}
.zeltweg-manned-input {
  background: #eaf3fb;
  border: 1px solid #b3c6e0;
  border-radius: 6px;
  padding: 0.4em 0.7em;
  font-size: 1em;
  color: #0d2a4a;
  width: 100%;
  box-sizing: border-box;
  margin-top: 0.2em;
}
body.dark-mode .zeltweg-manned-input {
  background: #22304a;
  border: 1px solid #3a4a6a;
  color: #b3d1ff;
}
.zeltweg-manned-aupinfo {
  background: #e3f2fd;
  color: #1565c0;
  padding: 0.8em 1em;
  margin: 1em 0 1em 0;
}
body.dark-mode .zeltweg-manned-aupinfo {
  background: #1b2a3a;
  color: #7bb6ff;
}

.aup-archive-center-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
}
.aup-archive-title {
  text-align: center;
}
.aup-archive-list {
  margin-left: auto;
  margin-right: auto;
}

.aup-archive-title {
  color: #398ce6;
  margin-bottom: 1.5rem;
}
.aup-archive-filter-form {
  display: flex;
  gap: 1em;
  align-items: flex-end;
  margin-bottom: 1.5em;
}
.aup-archive-filter-form label {
  font-weight: 500;
}
.aup-archive-filter-form input[type="date"] {
  width: 200px;
  font-size: 1.1rem;
  padding: 0.6rem;
}
.aup-archive-filter-btn {
  padding: 0.6rem 1.2rem;
  font-size: 1.1rem;
  background: #1d87f8;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s;
}
.aup-archive-filter-btn:hover,
.aup-archive-filter-btn:focus {
  background: #0056b3;
}
.aup-archive-reset-btn {
  padding: 0.6rem 1.2rem;
  font-size: 1.1rem;
  background: #eee;
  color: #333;
  border: none;
  border-radius: 4px;
  text-decoration: none;
  margin-left: 0.5em;
  transition: background 0.2s;
}
.aup-archive-reset-btn:hover,
.aup-archive-reset-btn:focus {
  background: #ccc;
}
.aup-archive-list {
  width: 100%;
  max-width: 700px;
  margin-top: 1em;
  border-radius: 6px;
  background: #c3d4e3;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  overflow: hidden;
}
.aup-archive-list-header {
  display: grid;
  grid-template-columns: 2fr 1fr;
  background: #f0f4fa;
  font-weight: 600;
  padding: 0.8em 1em;
  border-bottom: 1px solid #e0e0e0;
}
.aup-archive-list-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  align-items: center;
  padding: 0.7em 1em;
  border-bottom: 1px solid #f0f0f0;
}
.aup-archive-list-row:last-child {
  border-bottom: none;
}
.aup-archive-list-row a.link-button {
  padding: 0.4em 1em;
  font-size: 1rem;
  background: #1d87f8;
;
  color: #fff;
  border-radius: 4px;
  text-decoration: none;
  transition: background 0.2s;
}
.aup-archive-list-row a.link-button:hover,
.aup-archive-list-row a.link-button:focus {
  background: #0056b3;
}
body.dark-mode .aup-archive-list {
  background: #181a1b;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
}
body.dark-mode .aup-archive-list-header {
  background: #1a1d22;
  color: #7fc1ff;
  border-bottom: 1px solid #333;
}
body.dark-mode .aup-archive-list-row {
  border-bottom: 1px solid #222;
  color: #e0e0e0;
}
body.dark-mode .aup-archive-list-row a.link-button {
  background: #0056b3;
  color: #fff;
}
body.dark-mode .aup-archive-list-row a.link-button:hover,
body.dark-mode .aup-archive-list-row a.link-button:focus {
  background: #1d87f8;
;
}
body {
  font-family: sans-serif;
  background-color: #c3d4e3;
  color: #333;
  max-width: 1920px;
  margin-left: auto;
  margin-right: auto;
}

h1, h2, h3 {
  display: block;
  color: #1d87f8;
;
}

.main-wrapper {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.header-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.header-bar button {
  margin: 0;
}

.header-bar h1 {
  margin: 0;
  font-size: 2rem;
}

.footer-note {
  font-size: 0.9rem;
  color: #888;
  text-align: center;
  margin-top: 2rem;
}

.footer-note hr {
  margin-top: 3rem;
  margin-bottom: 1rem;
  border: none;
  border-top: 1px solid #ccc;
}

body.dark-mode .footer-note {
  color: #aaa;
}

body.dark-mode .footer-note hr {
  border-top-color: #444;
}

@media (min-width: 1000px) {
    .main-wrapper {
        flex-direction: row;
        justify-content: flex-start;
        align-items: flex-start;
    max-width: 1600px;
    }

    .form-wrapper {
    flex: 1 1 50%;
    max-width: 800px;
    padding-right: 2rem;
    }

  .output-wrapper {
    flex: 1 1 50%;
    max-width: 800px;
  }
}

#output {
  resize: none;
  overflow: hidden;
  min-height: 100px;
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.4;
}

#email_output {
  resize: none;
  overflow: hidden;
  height: auto;
  min-height: 100px;
  box-sizing: border-box;
}

#befristung_begruendung label {
  display: block;
  margin-bottom: -0.2rem;
}
form label {
  display: block;
  margin-top: 1rem;
  font-weight: 500;
}

input[type="date"],
input[type="time"],
input[type="text"],
input[type="password"],
input[type="email"],
input[type="tel"],
select,
textarea {
  width: 100%;
  max-width: 750px;
  padding: 0.6rem;
  font-size: 1.1rem;
  margin-top: 0.3rem;
  border: 1px solid #ccc;
  border-radius: 5px;
  box-sizing: border-box;
}

textarea {
  resize: vertical;
}

.textarea-whatsapp,
.textarea-mail {
  resize: none;
  overflow: hidden;
  min-height: 100px;
  box-sizing: border-box;
}

button, a.button-link {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  background: #1d87f8;
;
  color: white;
  text-decoration: none;
  border: none;
  border-radius: 5px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.3s ease;
}

button:hover, a.button-link:hover {
  background: #0056b3;
}

.hint {
  font-size: 0.9rem;
  font-style: italic;
  color: #666;
  margin-top: 0.3rem;
}
.warntext {
  color: red;
  font-size: 0.9rem;
  margin-top: 0.3rem;
}

.disabled-button {
  background-color: grey !important;
  cursor: not-allowed !important;
  pointer-events: none;
}

section {
  background: #fafafa;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  padding: 1.5em 2em;
  margin: 2em auto;
  max-width: 800px;
  color: #222;
}

body.dark-mode section {
  background: #23272e;
  border: 1px solid #444;
  color: #f1f1f1;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

@media (max-width: 768px) {
  body {
      font-size: 1.1rem;
  }

  input[type="date"],
  input[type="time"],
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  select,
  textarea {
      font-size: 1.1rem;
      padding: 0.8rem;
  }

  label {
      font-size: 1.05rem;
  }

  .textarea-whatsapp,
  .textarea-mail,
  textarea {
      width: 100%;
  }

  button, a.button-link {
      font-size: 1.1rem;
      padding: 0.8rem 1.2rem;
  }
}

body.dark-mode {
  background-color: #121212;
  color: #e0e0e0;
}

body.dark-mode section {
  background-color: #1e1e1e;
  color: #e0e0e0;
}

body.dark-mode input,
body.dark-mode select,
body.dark-mode textarea {
  background-color: #2c2c2c;
  color: #e0e0e0;
  border: 1px solid #555;
}

body.dark-mode button,
body.dark-mode a.button-link {
  background-color: #444;
  color: #fff;
}

body.dark-mode button:hover,
body.dark-mode a.button-link:hover {
  background-color: #666;
}

body.dark-mode .warntext {
  color: #ff6b6b;
}

.hint {
  font-size: 0.9rem;
  font-style: italic;
  color: #666;
  margin-top: 0.3rem;
}

.button-link {
  display: inline-block;
  padding: 0.4rem 0.8rem;
  background-color: #1d87f8;
;
  color: white;
  text-decoration: none;
  border-radius: 5px;
  font-size: 0.95rem;
  margin-left: 0.5rem;
  transition: background 0.2s ease;
}

.button-link:hover {
  background-color: #0056b3;
}

.danger-button {
  background-color: #dc3545;
}

.danger-button:hover {
  background-color: #a71d2a;
}

body.dark-mode .button-link {
  background-color: #555;
  color: #fff;
}

body.dark-mode .danger-button {
  background-color: #c62828;
}

body.dark-mode .danger-button:hover {
  background-color: #9a1b1b;
}

.warntext {
  color: red;
  font-size: 0.95rem;
  margin: 1rem 0;
}
body.dark-mode .warntext {
  color: #ff6b6b;
}

.two-column-layout {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}


.json-output-wrapper {
  flex: 1;
  background: #f9f9f9;
  border-radius: 8px;
  padding: 1rem;
  overflow-x: auto;
  max-height: 1200px;
  font-family: monospace;
  font-size: 0.85rem;
  color: #222;
}

body.dark-mode .json-output-wrapper {
  background: #111;
  color: #0f0;
}

a {
  color: #0056b3;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

body.dark-mode a {
  color: #4dabff;
}

.form-hint {
    font-size: 0.85em;
    color: #666;
    margin-top: 4px;
    margin-bottom: 10px;
}

.form-hint-with-icon {
    font-size: 0.85em;
    color: #666;
    margin-left: 1.8em;
    display: flex;
    align-items: flex-start;
    gap: 0.5em;
    margin-top: 4px;
    margin-bottom: 10px;
}

.hint-icon {
    flex-shrink: 0;
    font-size: 1em;
    margin-top: 2px;
}

.hint-text {
    line-height: 1.3;
}

.activation-list {
    list-style-type: none;
    padding-left: 0;
    margin-left: 0;
}

.activation-second-line {
    margin-top: 0.3rem;
}

.history-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 2rem;
}

.history-table th,
.history-table td {
    border: 1px solid #ccc;
    padding: 0.6rem 1rem;
    text-align: left;
    font-size: 0.95rem;
}

.history-table th {
    background-color: #f0f0f0;
    color: #333;
}

body.dark-mode .history-table th {
    background-color: #222;
    color: #eee;
}

body.dark-mode .history-table td {
    border-color: #444;
}

.pagination {
    margin-top: 1.5rem;
    text-align: center;
}

.pagination a {
    display: inline-block;
    margin: 0 5px;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    background: #ddd;
    color: #333;
    text-decoration: none;
    transition: background 0.2s ease;
}

.pagination a:hover {
    background: #bbb;
}

body.dark-mode .pagination a {
    background: #333;
    color: #eee;
}

body.dark-mode .pagination a:hover {
    background: #555;
}

.limit-select {
    margin-top: 1rem;
    font-size: 1rem;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    border: 1px solid #ccc;
}

body.dark-mode .limit-select {
    background-color: #2c2c2c;
    color: #e0e0e0;
    border-color: #555;
}

.modal-box {
  display: none;
  background: #fefefe;
  padding: 2rem;
  border-radius: 10px;
  border: 1px solid #ccc;
  max-width: 500px;
  margin-top: 2rem;
}
.modal-box.show {
  display: block;
}
body.dark-mode .modal-box {
  background-color: #222;
  border-color: #555;
}

.form-token {
  background-color: #f3f3f3;
  border: 1px dashed #ccc;
  padding: 1rem;
  margin-top: 1rem;
  font-size: 0.85rem;
  color: #333;
}
body.dark-mode .form-token {
  background-color: #1e1e1e;
  border-color: #555;
  color: #ccc;
}

.full-width-button-group {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-top: 1.2rem;
}

.full-width-button-group button {
    width: 100%;
    max-width: 450px;
}

form.inline {
  display: inline;
}

form.inline button {
  margin-right: 0.5rem;
}

nav {
    background: #e3f0ff;
    padding: 10px;
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    border-bottom: 2px solid #b6d4fe;
}

.nav-button,
.nav-dropdown button.nav-button {
    background-color: #3498ff;
    color: #fff;
    border: none;
    padding: 8px 12px;
    text-decoration: none;
    cursor: pointer;
    border-radius: 4px;
    font-size: 14px;
    transition: background 0.2s;
    margin: 0;
}

.nav-button:hover,
.nav-button:focus {
    background-color: #1976d2;
    color: #fff;
}

.nav-dropdown button.nav-button:hover,
.nav-dropdown button.nav-button:focus {
    background: #0056b3;
    color: #fff;
    outline: none;
}

body.dark-mode .nav-dropdown button.nav-button {
    background: #444;
    color: #fff;
}
body.dark-mode .nav-dropdown button.nav-button:hover,
body.dark-mode .nav-dropdown button.nav-button:focus {
    background: #666;
    color: #fff;
    outline: none;
}

.nav-dropdown-content {
    background: #e3f0ff;
    border: 1px solid #b6d4fe;
}

.nav-dropdown-content a {
    color: #1976d2;
}

.nav-dropdown-content a:hover {
    background: #b6d4fe;
    color: #0056b3;
}

body.dark-mode nav {
    background: #333;
    border-bottom: 2px solid #222;
}

.nav-button:hover {
    background-color: #777;
}

body.dark-mode .nav-button {
    background-color: #444;
    color: #fff;
}

body.dark-mode .nav-button:hover,
body.dark-mode .nav-button:focus {
    background-color: #666;
    color: #fff;
}

.nav-spacer {
    margin-left: auto;
    display: flex;
    gap: 10px;
    align-items: center;
}

.link-button {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    background: #1d87f8;
;
    color: #fff !important;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.3s;
}

.link-button:hover,
.link-button:focus {
    background: #0056b3;
    color: #fff !important;
    text-decoration: none;
}

body.dark-mode .link-button {
    background: #444;
    color: #fff !important;
}

body.dark-mode .link-button:hover,
body.dark-mode .link-button:focus {
    background: #666;
    color: #fff !important;
}

#pw-dialog {
    color: #222;
    border-radius: 8px;
    padding: 1.5rem;
    min-width: 320px;
    border: 1px solid #888;
}

#pw-dialog input[type="password"],
#pw-dialog input[type="text"] {
    background: #fff;
    color: #222;
    border: 1px solid #ccc;
}

#pw-dialog button {
    background: #1d87f8;
;
    color: #fff;
    border: none;
    border-radius: 5px;
    padding: 0.6rem 1.2rem;
    font-size: 1rem;
    cursor: pointer;
    margin-right: 0.5rem;
    transition: background 0.3s;
}

#pw-dialog button:hover {
    background: #0056b3;
}

.history-list-header,
.user-list-header,
.history-list-row,
.user-list-row {
    background: #fff;
    color:  #222;
}
.tra-list-row {
    background: #fff;
    color:  #222;
}

.history-list-header,
.user-list-header {
    font-weight: bold;
    background: #f0f0f0;
    border-bottom: 2px solid #ccc;
}

.history-list-row,
.user-list-row {
    border-bottom: 1px solid #eee;
}

.user-list-header.user-history, .user-list-row.user-history {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.2fr 3fr;
    gap: 0.5rem;
    align-items: center;
    padding: 0.7rem 1rem;
}

.audit-list-header,
.audit-list-row {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.2fr 3fr;
    gap: 0.5rem;
    align-items: center;
    padding: 0.7rem 1rem;
    background: #fff;
    color: #222;
    border-bottom: 1px solid #eee;
}

.audit-list-header {
    font-weight: bold;
    background: #f0f0f0;
    border-bottom: 2px solid #ccc;
}
.user-list-header, .user-list-row {
    display: grid;
    grid-template-columns:
        0.5fr   /* ID */
        0.5fr   /* Status */
        2fr   /* Benutzername */
        1fr     /* Rolle */
        2.5fr     /* Email */
        2fr   /* Telefon */
        1.2fr   /* Vorname */
        1.2fr   /* Nachname */
        3fr   /* Verein */
        2.5fr;  /* Aktionen */
    gap: 0.5rem;
    align-items: center;
    padding: 0.7rem 1rem;
}

.user-list-header.user-history, .user-list-row.user-history {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.2fr 3fr;
    gap: 0.5rem;
    align-items: center;
    padding: 0.7rem 1rem;
}

.audit-list-header, .audit-list-row {
    display: grid;
    grid-template-columns:
        1fr   /* time */
        1fr   /* user */
        2fr   /* verein */
        1fr     /* aktion */
        8fr;     /* details */
    gap: 0.5rem;
    align-items: center;
    padding: 0.7rem 1rem;
}
.audit-details-textarea {
    width: 100%;
    min-height: 16px;
    max-height: 550px;
    font-family: monospace;
    font-size: 0.98em;
    resize: vertical;
    overflow: auto;
    box-sizing: border-box;
    background: #f8f8f8;
    color: #222;
    border: 1px solid #ccc;
    border-radius: 5px;
    padding: 0.5em;
}
body.dark-mode .audit-details-textarea {
    background: #23272e;
    color: #eee;
    border-color: #444;
}
.tra-list-header, .tra-list-row {
    display: grid;
    grid-template-columns:
        0.3fr   /* ID */
        0.3fr   /* Status */
        1fr     /* Name */
        0.3fr   /* short-Name */
        1fr     /* Flughafen */
        2fr     /* Beschreibung */
        2.5fr   /* Verein */
        0.2fr   /* Info */
        0.2fr   /* AIC */
        0.5fr   /* Deaktivierbar */
        0.4fr   /* ATIS Import */
        0.4fr   /* JSON Export */
        0.5fr;  /* Aktionen */
    gap: 0.5rem;
    align-items: center;
    padding: 0.7rem 1rem;
}

.history-list-header, .history-list-row {
  display: grid;
  grid-template-columns:
    0.5fr   /* ID */
    0.5fr     /* Art */
    0.7fr   /* Erstelldatum */
    0.4fr   /* Zeit */
    1.2fr   /* TRA */
    0.8fr   /* Zeiten */
    1.5fr   /* Benutzer */
    0.3fr   /* Info */
    0.3fr   /* Zeltweg besetzt (lokal) */
    0.3fr   /* XContest Import */
    0.7fr;    /* Aktionen */
  gap: 0.5rem;
  align-items: center;
  padding: 0.7rem 1rem;
}

body.dark-mode .tra-list-header,
body.dark-mode .tra-list-row {
    background: #23272e !important;
    color: #eee !important;
    border-bottom: 1px solid #333 !important;
}

.verein-list-header, .verein-list-row {
    display: grid;
    grid-template-columns:
        0.2fr   /* ID */
        0.2fr   /* STATUS */
        2fr     /* Vereinsname */
        1.2fr     /* Obmann */
        2.5fr   /* E-Mail */
        1.5fr     /* Website */
        1.5fr     /* Hausberg */
        1.5fr     /* TRAs */
        0.7fr   /* Messenger */
        0.7fr   /* Mail */
        0.7fr   /* JSON */
        0.8fr;  /* Aktionen */
    gap: 0.5rem;
    align-items: center;
    padding: 0.7rem 1rem;
    background: #fff;
    color: #222;
}

.verein-list-header {
    font-weight: bold;
    background: #f0f0f0;
    border-bottom: 2px solid #ccc;
}

.verein-list-row {
    border-bottom: 1px solid #eee;
}

.col-messenger, .col-mail {
    max-width: 60px;
    min-width: 36px;
    width: 48px;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding-left: 0;
    padding-right: 0;
}

.ellipsis {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
  display: inline-block;
  vertical-align: top;
}
.col-email, .col-website {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.col-obmann .ellipsis {
    max-width: 180px;
    display: inline-block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: bottom;
}

.col-verein {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}
.verein-email-ellipsis {
    margin-top: 2px;
    max-width: 180px;
}
.verein-email-ellipsis .ellipsis {
    max-width: 180px;
    display: inline-block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: top;
}

body.dark-mode .verein-list-header {
    background: #2a3b5a !important;
    color: #fff !important;
    border-bottom: 2px solid #1a2233 !important;
}
body.dark-mode .verein-list-row {
    background: #23272e !important;
    color: #eee !important;
    border-bottom: 1px solid #333 !important;
}

body.dark-mode .history-list-header,
body.dark-mode .audit-list-header,
body.dark-mode .user-list-header {
    background: #2a3b5a !important;
    color: #fff !important;
    border-bottom: 2px solid #1a2233 !important;
}
body.dark-mode .history-list-row,
body.dark-mode .audit-list-row,
body.dark-mode .user-list-row {
    background: #23272e !important;
    color: #eee !important;
    border-bottom: 1px solid #333 !important;
}
body.dark-mode .user-list-row.inactive {
    background: #3a2323 !important;
    color: #bbb !important;
}
body.dark-mode .user-list-row a {
    color: #7abaff !important;
}

.reason-bubble {
    cursor: pointer;
    font-size: 1.3em;
    color: #1d87f8;
;
}
.reason-bubble:hover {
    color: #0056b3;
}

body.dark-mode #edit-dialog {
    background: #23272e;
    color: #eee;
    border: 1px solid #444;
}
body.dark-mode #edit-dialog input,
body.dark-mode #edit-dialog select {
    background: #333;
    color: #eee;
    border: 1px solid #555;
}
body.dark-mode #edit-dialog button {
    background: #444;
    color: #eee;
    border: 1px solid #666;
}
body.dark-mode #edit-dialog button:hover {
    background: #666;
}

.statistic-list-header,
.statistic-list-row {
    display: grid;
    grid-template-columns: 3fr 2fr 2fr 2fr 2fr 2fr;
    gap: 0.5rem;
    align-items: center;
    padding: 0.7rem 1rem;
    border-bottom: 1px solid #eee;
    background: #fff;
    color: #222;
}
body.dark-mode .statistic-list-header,
body.dark-mode .statistic-list-row {
    background: #23272e;
    color: #eee;
    border-bottom: 1px solid #333;
}
.statistic-list-header {
    font-weight: bold;
    background: #f0f0f0;
    border-bottom: 2px solid #ccc;
}
body.dark-mode .statistic-list-header {
    background: #2a3b5a;
    color: #fff;
    border-bottom: 2px solid #1a2233;
}

.statistic-list {
    max-width: 400px;
    margin: 0 auto 2rem auto;
}

.statistic-list-header,
.statistic-list-row {
    max-width: 1200px;
    width: 100%;
    box-sizing: border-box;
}

.nav-dropdown {
    display: inline-block;
    position: relative;
}

.nav-dropdown-content {
    display: none;
    position: absolute;
    left: 0;
    top: 100%;
    background: #fff;
    min-width: 180px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    z-index: 2000;
    border-radius: 4px;
    border: 1px solid #ccc;
    margin-top: 2px;
}

.nav-dropdown-content a {
    color: #1d87f8;
;
    padding: 10px 16px;
    text-decoration: none;
    display: block;
    border-radius: 0;
    background: none;
    transition: background 0.2s, color 0.2s;
}

.nav-dropdown-content a:hover {
    background: #e9ecef;
    color: #0056b3;
}

.nav-dropdown.open .nav-dropdown-content {
    display: block;
}


.nav-dropdown button.nav-button:hover,
.nav-dropdown button.nav-button:focus {
    background: #0056b3;
    color: #fff;
    outline: none;
}

body.dark-mode .nav-dropdown button.nav-button {
    background: #444;
    color: #fff;
}
body.dark-mode .nav-dropdown button.nav-button:hover,
body.dark-mode .nav-dropdown button.nav-button:focus {
    background: #666;
    color: #fff;
    outline: none;
}

body.dark-mode .nav-dropdown-content {
    background: #23272e;
    color: #eee;
    border: 1px solid #555;
    box-shadow: 0 8px 16px rgba(0,0,0,0.6);
}

body.dark-mode .nav-dropdown-content a {
    color: #7abaff;
    background: none;
}

body.dark-mode .nav-dropdown-content a:hover {
    background: #333;
    color: #fff;
}

body.dark-mode .nav-dropdown button.nav-button {
    background: #444;
    color: #fff;
}

body.dark-mode .nav-dropdown button.nav-button:hover,
body.dark-mode .nav-dropdown button.nav-button:focus {
    background: #666;
    color: #fff;
    outline: none;
}

.nav-prod {
    background: #e3f0ff !important;
    border-bottom: 2px solid #b6d4fe !important;
}
.nav-staging {
    background: #ffe3e3 !important;
    border-bottom: 2px solid #ffb6b6 !important;
}
body.dark-mode .nav-prod {
    background: #222f3a !important;
    border-bottom: 2px solid #1976d2 !important;
}
body.dark-mode .nav-staging {
    background: #3a2323 !important;
    border-bottom: 2px solid #a71d2a !important;
}

.hidden {
    display: none !important;
}

.hide-on-abgelehnt.hidden {
    display: none !important;
}

.hidden { display: none !important; }

.icon-button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1em;
    vertical-align: middle;
}
.icon-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.user-dropdown {
    display: inline-block;
    position: relative;
}

.user-dropdown-content {
    display: none;
    position: absolute;
    left: 0;
    top: 100%;
    background: #fff;
    min-width: 120px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    z-index: 1000;
    border-radius: 4px;
    border: 1px solid #ccc;
    margin-top: 2px;
}

.user-dropdown.open .user-dropdown-content {
    display: block;
}

.user-dropdown-content a {
    display: block;
    padding: 0.5em 1em;
    color: #333;
    text-decoration: none;
    white-space: nowrap;
    background: none;
    border-radius: 0;
    transition: background 0.2s, color 0.2s;
}

.user-dropdown-content a:hover {
    background: #f0f0f0;
    color: #1d87f8;
;
}

body.dark-mode .user-dropdown-content {
    background: #23272e;
    color: #eee;
    border: 1px solid #555;
    box-shadow: 0 8px 16px rgba(0,0,0,0.6);
}

body.dark-mode .user-dropdown-content a {
    color: #7abaff;
    background: none;
}

body.dark-mode .user-dropdown-content a:hover {
    background: #333;
    color: #fff;
}

.col-messenger, .col-mail {
    max-width: 120px;
    min-width: 36px;
    width: 80px;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding-left: 0;
    padding-right: 0;
}

.col-email, .col-website {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

dialog, dialog form {
    background: #fff;
    color: #222;
    border-radius: 8px;
}
body.dark-mode dialog, body.dark-mode dialog form {
    background: #23272e;
    color: #eee;
}

dialog input, dialog select, dialog textarea, dialog button {
    background: #fff;
    color: #222;
    border: 1px solid #bbb;
}
body.dark-mode dialog input,
body.dark-mode dialog select,
body.dark-mode dialog textarea,
body.dark-mode dialog button {
    background: #23272e;
    color: #eee;
    border: 1px solid #444;
}

.cancel-button {
    background: #bbb;
    color: #222;
    border: none;
    border-radius: 4px;
    padding: 8px 12px;
    min-width: 120px;
    cursor: pointer;
    transition: background 0.2s;
}
.cancel-button:hover {
    background: #999;
}

.textarea-whatsapp-messenger-site {
  width: 100%;
  min-height: 400px;
}

.copy-btn-messenger-site {
  display: block;
  margin: 0 0 0.5em 0;
  padding: 0.5em 1em;
  background: #1d87f8;
;
  color: #fff;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  text-align: left;
}

body.dark-mode .forgot-password-container {
    background: #23272e;
    color: #e0e0e0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

body.dark-mode .forgot-password-container input[type="email"] {
    background: #2c2c2c;
    color: #e0e0e0;
    border: 1px solid #555;
}

body.dark-mode .forgot-password-container button {
    background: #444;
    color: #fff;
}

body.dark-mode .forgot-password-container button:hover {
    background: #666;
}

.aktive-tras-box {
    background: #f9f9f9;
    color: #222;
    border-radius: 10px;
    padding: 1.5em 2em;
    margin: 2em auto;
    max-width: 500px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}
.aktive-tras-box h2 {
    margin-top: 0;
    color: #1d87f8;
;
}
.aktive-tras-box ul {
    margin: 0.5em 0 0 1em;
    padding: 0;
}
.aktive-tras-box li {
    margin-bottom: 0.5em;
}

body.dark-mode .aktive-tras-box {
    background: #23272e;
    color: #f1f1f1;
}
body.dark-mode .aktive-tras-box h2 {
    color: #4dabff;
}

.view-routing {
  padding-left: 25px;
  padding-right: 25px;
}

.tra-eintrag {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 1em 1.2em;
    margin-bottom: 1.2em;
    background: #f9f9f9;
    width: 100%;
    min-width: 550px;
    max-width: 550px;
    box-sizing: border-box;
}
.tra-title {
    font-size: 1.15em;
    margin-bottom: 0.3em;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5em;
}
.tra-title .tra-zeit {
  margin-left: 0.5em;
  white-space: nowrap;
}
@media (max-width: 550px) {
  .tra-title .tra-zeit {
    flex-basis: 100%;
    margin-left: 0;
    margin-top: 0.2em;
  }
}
.tra-zeit {
    color: #1d87f8;
;
    margin-left: 0.5em;
}
.tra-beschreibung {
    color: #555;
    font-size: 0.97em;
    margin-top: 0.2em;
}
body.dark-mode .tra-eintrag {
    background: #23272e;
    border-color: #444;
}
body.dark-mode .tra-beschreibung {
    color: #bbb;
}
body.dark-mode .tra-zeit {
    color: #4dabff;
}

.footer-note {
    font-size: 0.85rem;
    color: rgba(60, 60, 60, 0.65);
    text-align: center;
    margin-top: 2rem;
    line-height: 1.5;
    letter-spacing: 0.01em;
}

.footer-note a {
    color: rgba(0, 123, 255, 0.75);
    text-decoration: underline dotted;
    transition: color 0.2s;
}

.footer-note a:hover {
    color: rgba(0, 86, 179, 0.95);
}

body.dark-mode .footer-note {
    color: rgba(220, 220, 220, 0.55);
}

body.dark-mode .footer-note a {
    color: rgba(100, 180, 255, 0.7);
}

body.dark-mode .footer-note a:hover {
    color: rgba(100, 180, 255, 1);
}

.container {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.airport-block {
    background: #fafafa;
    border: 1px solid #e0e0e0;
    margin-bottom: 18px;
    border-radius: 6px;
    padding: 14px 18px;
    width: 650px;
}

.airport-title {
    font-weight: bold;
    font-size: 1.1em;
    margin-bottom: 8px;
}

.status {
    margin: 6px 0;
}

.dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 7px;
    vertical-align: middle;
}

.dot.green { background: #4caf50; }
.dot.gray  { background: #bbb; }

.atis-line {
    font-size: 0.98em;
    color: #444;
    margin-left: 20px;
    margin-bottom: 4px;
}

body.dark-mode {
    background-color: #181a1b;
    color: #e0e0e0;
}

body.dark-mode .container {
    background: #121212;
    box-shadow: 0 2px 10px rgba(0,0,0,0.4);
}

body.dark-mode .airport-block {
    background: #121212;
    border: 1px solid #333;
}

body.dark-mode .airport-title {
    color: #fff;
}

body.dark-mode .status {
    color: #e0e0e0;
}

body.dark-mode .dot.green { background: #7fff7f; }
body.dark-mode .dot.gray  { background: #555; }

body.dark-mode .atis-line {
    color: #b0b0b0;
}

body.dark-mode a {
    color: #80bfff;
}

body.dark-mode .message {
    color: #7fff7f;
}

body.dark-mode .error {
    color: #ff7f7f;
}

.form-section {
    margin-bottom: 2rem;
    background: #fff;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0,0,0,0.05);
    max-width: 800px;
    border: 2px solid #e0e0e0;
    transition: border-color 0.2s, background 0.2s;
}
.form-section.vereinsdaten {
    border-color: #1976d2;
    background: #f5faff;
}
.form-section.messenger {
    border-color: #43a047;
    background: #f7fff8;
}
.form-section.mail {
    border-color: #ffa000;
    background: #fffbe7;
}
.form-section.tras {
    border-color: #d32f2f;
    background: #fff5f5;
}

body.dark-mode .form-section {
    background: #23272e;
    color: #e0e0e0;
    border-color: #444;
}
body.dark-mode .form-section.vereinsdaten {
    border-color: #1976d2;
    background: #1a2233;
}
body.dark-mode .form-section.messenger {
    border-color: #43a047;
    background: #1e2a1e;
}
body.dark-mode .form-section.mail {
    border-color: #ffa000;
    background: #2a241a;
}
body.dark-mode .form-section.tras {
    border-color: #d32f2f;
    background: #2a1a1a;
}

.switch-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  user-select: none;
}

.mode-label {
  color: #fff;
}

.switch-slider {
  position: relative;
  width: 60px;
  height: 30px;
  background-color: #888;
  border-radius: 30px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.switch-slider i {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: white;
  font-size: 14px;
  z-index: 1;
}

.sun-icon {
  left: 8px;
}

.moon-icon {
  right: 8px;
}

.switch-handle {
  position: absolute;
  top: 3px;
  left: 4px;
  width: 24px;
  height: 24px;
  background-color: white;
  border-radius: 50%;
  transition: transform 0.3s;
  z-index: 2;
}

#darkmode-toggle:checked + .switch-slider {
  background-color: #34495e;
}

#darkmode-toggle:checked + .switch-slider .switch-handle {
  transform: translateX(30px);
}

body:not(.dark-mode) .mode-label {
  color: #333;
}

body.dark-mode .mode-label {
  color: #fff;
}

.tower-list {
    margin-bottom: 2em;
}

.tower-list-header, .tower-list-row {
    display: grid;
    grid-template-columns:
        0.5fr   /* ID */
        1.2fr   /* ICAO-Code */
        2.5fr   /* Name */
        1.2fr   /* Latitude */
        1.2fr   /* Longitude */
        1fr     /* Map */
        1.5fr;  /* Aktionen */
    gap: 0.5rem;
    align-items: center;
    padding: 0.7rem 1rem;
    background: #fff;
    color: #222;
}

.tower-list-header {
    font-weight: bold;
    background: #eaf4ff;
    border-bottom: 2px solid #b6d4fe;
}

.tower-list-row {
    border-bottom: 1px solid #eee;
}

.tower-list-row:last-child {
    border-bottom: none;
}

body.dark-mode .tower-list-header, body.dark-mode .tower-list-row {
    background: #23272e !important;
    color: #eee !important;
}

body.dark-mode .tower-list-header {
    background: #2a3b5a !important;
    color: #fff !important;
    border-bottom: 2px solid #1a2233 !important;
}

body.dark-mode .tower-list-row {
    border-bottom: 1px solid #333 !important;
}

.tower-dropdown {
    display: inline-block;
    position: relative;
}

.tower-dropdown-content {
    display: none;
    position: absolute;
    left: 0;
    top: 100%;
    background: #fff;
    min-width: 120px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    z-index: 1000;
    border-radius: 4px;
    border: 1px solid #ccc;
    margin-top: 2px;
}

.tower-dropdown.open .tower-dropdown-content {
    display: block;
}

.tower-dropdown-content a {
    display: block;
    padding: 0.5em 1em;
    color: #333;
    text-decoration: none;
    white-space: nowrap;
    background: none;
    border-radius: 0;
    transition: background 0.2s, color 0.2s;
}

.tower-dropdown-content a:hover {
    background: #f0f0f0;
    color: #1d87f8;
;
}

body.dark-mode .tower-dropdown-content {
    background: #23272e;
    color: #eee;
    border: 1px solid #555;
    box-shadow: 0 8px 16px rgba(0,0,0,0.6);
}

body.dark-mode .tower-dropdown-content a {
    color: #7abaff;
    background: none;
}

body.dark-mode .tower-dropdown-content a:hover {
    background: #333;
    color: #fff;
}

.history-list-header,
.user-list-header,
.tra-list-header,
.verein-list-header,
.tower-list-header,
.sys-pages-list-header,
.audit-list-header {
  display: grid;
  align-items: center;
  padding: 0.7rem 1rem;
  font-weight: bold;
  background: #f0f0f0;
  color: #222;
  border-bottom: 2px solid #ccc;
  border-radius: 8px 8px 0 0;
}

.history-list-row,
.user-list-row,
.tra-list-row,
.verein-list-row,
.tower-list-row,
.audit-list-row {
  display: grid;
  align-items: center;
  padding: 0.7rem 1rem;
  background: #fff;
  color: #222;
  border-bottom: 1px solid #eee;
  border-radius: 0;
  transition: background 0.2s;
}

.history-list-row:last-child,
.user-list-row:last-child,
.tra-list-row:last-child,
.verein-list-row:last-child,
.tower-list-row:last-child,
.audit-list-row:last-child {
  border-bottom: none;
}

.history-list-row:hover,
.user-list-row:hover,
.tra-list-row:hover,
.verein-list-row:hover,
.tower-list-row:hover,
.audit-list-row:hover {
  background: #f5faff;
}

body.dark-mode .history-list-header,
body.dark-mode .user-list-header,
body.dark_mode .tra-list-header,
body.dark_mode .verein-list-header,
body.dark_mode .tower-list-header,
body.dark_mode .audit-list-header {
  background: #2a3b5a !important;
  color: #fff !important;
  border-bottom: 2px solid #1a2233 !important;
}

body.dark-mode .history-list-row,
body.dark-mode .user-list-row,
body.dark-mode .tra-list-row,
body.dark-mode .verein-list-row,
body.dark-mode .tower-list-row,
body.dark-mode .audit-list-row {
  background: #23272e !important;
  color: #eee !important;
  border-bottom: 1px solid #333 !important;
}

body.dark-mode .history-list-row:hover,
body.dark-mode .user-list-row:hover,
body.dark-mode .tra-list-row:hover,
body.dark-mode .verein-list-row:hover,
body.dark-mode .tower-list-row:hover,
body.dark-mode .audit-list-row:hover {
  background: #28304a !important;
}

.sys-pages-list {
    margin-bottom: 2em;
}

.sys-pages-list-header, .sys-pages-list-row {
    display: grid;
    grid-template-columns:
        0.5fr   /* ID */
        1.2fr   /* route */
        2.5fr   /* Title */
        1.2fr   /* Dateipfad */
        3fr   /* extra_js */
        3fr     /* extra_css */
        1.2fr   /* status */
        1.5fr;  /* Aktionen */
    gap: 0.5rem;
    align-items: center;
    padding: 0.7rem 1rem;
    background: #fff;
    color: #222;
}

.sys-pages-list-header {
    font-weight: bold;
    background: #eaf4ff;
    border-bottom: 2px solid #b6d4fe;
}

.sys-pages-list-row {
    border-bottom: 1px solid #eee;
}

.sys-pages-list-row:last-child {
    border-bottom: none;
}

body.dark-mode .sys-pages-list-header, body.dark-mode .sys-pages-list-row {
    background: #23272e !important;
    color: #eee !important;
}

body.dark-mode .sys-pages-list-header {
    background: #2a3b5a !important;
    color: #fff !important;
    border-bottom: 2px solid #1a2233 !important;
}

body.dark-mode .sys-pages-list-row {
    border-bottom: 1px solid #333 !important;
}

.sys-pages-dropdown {
    display: inline-block;
    position: relative;
}

.sys-pages-dropdown-content {
    display: none;
    position: absolute;
    left: 0;
    top: 100%;
    background: #fff;
    min-width: 120px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    z-index: 1000;
    border-radius: 4px;
    border: 1px solid #ccc;
    margin-top: 2px;
}

.sys-pages-dropdown.open .sys-pages-dropdown-content {
    display: block;
}

.sys-pages-dropdown-content a {
    display: block;
    padding: 0.5em 1em;
    color: #333;
    text-decoration: none;
    white-space: nowrap;
    background: none;
    border-radius: 0;
    transition: background 0.2s, color 0.2s;
}

.sys-pages-dropdown-content a:hover {
    background: #f0f0f0;
    color: #1d87f8;
;
}

body.dark-mode .sys-pages-dropdown-content {
    background: #23272e;
    color: #eee;
    border: 1px solid #555;
    box-shadow: 0 8px 16px rgba(0,0,0,0.6);
}

body.dark-mode .sys-pages-dropdown-content a {
    color: #7abaff;
    background: none;
}

body.dark-mode .sys-pages-dropdown-content a:hover {
    background: #333;
    color: #fff;
}

.error-404-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 40vh;
    margin: 3em 0;
}
.error-404-title {
    font-size: 5em;
    font-weight: bold;
    color: #c00;
    margin-bottom: 0.2em;
}
.error-404-text {
    font-size: 2em;
    color: #444;
}

.tra-liste {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: center;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}
.tra-block {
    flex: 1 1;
    min-width: 550px;
    max-width: 550px;
    box-sizing: border-box;
}
@media (max-width: 900px) {
    .tra-liste {
        flex-direction: column;
        width: 100%;
        max-width: 100%;
        margin: 0 auto;
    }
    .tra-block {
        max-width: 100%;
        min-width: 300px;
    }
}

.atis-archive-title {
    margin-bottom: 1.2em;
    margin-left: auto;
    margin-right: auto;
    max-width: 1100px;
    padding-left: 0.5em;
}
.atis-archive-filter-form {
    display: flex;
    gap: 1em;
    align-items: flex-end;
    flex-wrap: wrap;
    margin-bottom: 1em;
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 0.5em;
}
.atis-archive-filter-form label {
    display: flex;
    flex-direction: column;
    font-weight: 500;
    margin-bottom: 0;
    gap: 0.2em;
}
.atis-archive-filter-form input[type="date"],
.atis-archive-filter-form select {
    width: 180px;
    max-width: 220px;
    padding: 0.6rem;
    font-size: 1.05rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    margin-top: 0.2em;
    box-sizing: border-box;
}
.atis-archive-filter-btn {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    font-size: 1rem;
    min-width: 90px;
    height: 2.5em;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    align-self: flex-end;
    margin-bottom: 0;
    text-align: center;
    box-sizing: border-box;
    line-height: 1.1em;
    transition: background 0.2s, color 0.2s;
    background: #1d87f8;
;
    color: #fff;
}
.atis-archive-filter-btn:hover,
.atis-archive-filter-btn:focus {
    background: #0056b3;
}
.atis-archive-reset-btn {
    margin-left: 0.2em;
    align-self: flex-end;
    min-width: 90px;
    height: 2.5em;
    line-height: 1.1em;
    text-align: center;
    box-sizing: border-box;
    padding: 0.6rem 1.2rem;
    font-size: 1rem;
}
.atis-archive-list {
    display: flex;
    flex-direction: column;
    max-width: 1100px;
    margin: 0 auto;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}
.atis-archive-list-header, .atis-archive-list-row {
    display: grid;
    grid-template-columns: 0.7fr 3fr 1.2fr;
    gap: 1em;
    align-items: flex-start;
    padding: 0.7rem 1rem;
    font-size: 1.05em;
    box-sizing: border-box;
    transition: background 0.2s, color 0.2s;
}
.atis-archive-list-header {
    font-weight: bold;
    background: #f0f0f0;
    border-bottom: 2px solid #ccc;
    color: #333;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}
.atis-archive-list-row {
    background: #fff;
    color: #222;
    border-bottom: 1px solid #eee;
    transition: background 0.2s, color 0.2s;
}
.atis-archive-list-row:last-child {
    border-bottom: none;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
}
.atis-archive-list-row:hover {
    background: #e9f2ff;
    color: #1d87f8;
;
}
body.dark-mode .atis-archive-list-header {
    background: #2a3b5a !important;
    color: #fff !important;
    border-bottom: 2px solid #1a2233 !important;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}
body.dark-mode .atis-archive-list-row {
    background: #23272e !important;
    color: #eee !important;
    border-bottom: 1px solid #333 !important;
}
body.dark-mode .atis-archive-list-row:last-child {
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
}
body.dark-mode .atis-archive-list-row:hover {
    background: #222f3a !important;
    color: #4dabff !important;
}

.reason-popup {
    position: fixed;
    z-index: 9999;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    min-width: 260px;
    max-width: 90vw;
    max-height: 60vh;
    background: #fff;
    color: #222;
    border: 1px solid #b3c6e0;
    border-radius: 10px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.18);
    padding: 1.2em 2em 2em 2em;
    font-size: 1.05em;
    line-height: 1.5;
    transition: background 0.2s, color 0.2s, border 0.2s;
    pointer-events: auto;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.reason-popup .popup-close {
    margin-top: 1.5em;
    background: #e3e3e3;
    border: none;
    color: #333;
    font-size: 1em;
    border-radius: 6px;
    padding: 0.5em 1.5em;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
.reason-popup .popup-close:hover {
    background: #1d87f8;
    color: #fff;
}
body.dark-mode .reason-popup {
    background: #23272e;
    color: #eee;
    border: 1px solid #444;
    box-shadow: 0 4px 24px rgba(0,0,0,0.45);
}
body.dark-mode .reason-popup .popup-close {
    background: #444;
    color: #eee;
}
body.dark-mode .reason-popup .popup-close:hover {
    background: #7abaff;
    color: #222;
}

#pwModal {
  --modal-bg: #222;
  --modal-fg: #fff;
}
body:not(.dark-mode) #pwModal {
  --modal-bg: #fff;

  --modal-fg: #222;
}
#pwModal {
  background: var(--modal-bg,#222) !important;
  color: var(--modal-fg,#fff) !important;
}
#pwModal input, #pwModal select, #pwModal textarea {
  background: var(--modal-bg,#222);
  color: var(--modal-fg,#fff);
  border: 1px solid #888;
}
body:not(.dark-mode) #pwModal input,
body:not(.dark-mode) #pwModal select,
body:not(.dark-mode) #pwModal textarea {
  background: #fff;
  color: #222;
  border: 1px solid #bbb;
}
#pwModal label { color: inherit; }
#pwModal button { cursor:pointer; }

.col-user, .col-verein {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

@media (max-width: 900px) {
  .col-user, .col-verein {
    max-width: 80px;
  }
}



.history-list-header > div,
.history-list-row > div {
  border-right: 1px solid #d0d6e0;
}
.history-list-header > div:last-child,
.history-list-row > div:last-child {
  border-right: none;
}

body.dark-mode .history-list-header > div,
body.dark-mode .history-list-row > div {
  border-right: 1px solid #444e5a;
}
body.dark-mode .history-list-header > div:last-child,
body.dark-mode .history-list-row > div:last-child {
  border-right: none;
}

.aup-archive-diff-header, .aup-archive-diff-row {
  display: grid !important;
  grid-template-columns: 1.2fr 1.2fr 1fr 1fr 1fr 1fr 1fr 1fr;
  align-items: center;
}
.aup-archive-diff-header > div, .aup-archive-diff-row > div {
  border-left: 1px solid #d0d0d0;
  padding: 0.45em 0.7em;
  background: inherit;
  min-width: 0;
  overflow-wrap: break-word;
}
.aup-archive-diff-header > div:first-child, .aup-archive-diff-row > div:first-child {
  border-left: none;
}
.aup-archive-diff-header {
  border-bottom: 1px solid #bdbdbd;
  font-weight: 600;
  background: #f8fafd !important;
  color: #1a4a7a;
}
.aup-archive-diff-row {
  border-bottom: 1px solid #e0e0e0;
  background: #fff;
}
.aup-archive-diff-row:last-child {
  border-bottom: none;
}
.aup-archive-diff-row.aup-diff-added { background: #eaffea; color: #1a5c1a; }
.aup-archive-diff-row.aup-diff-removed { background: #ffeaea; color: #a11; font-style: italic; text-decoration: line-through; }
.aup-archive-diff-row.aup-diff-changed { background: #fffbe6; }
@media (max-width: 1100px) {
  .aup-archive-diff-header, .aup-archive-diff-row {
    font-size: 0.97em;
    grid-template-columns: 1.5fr 1.5fr 1fr 1fr 1fr 1fr 1fr 1fr;
  }
}
@media (max-width: 800px) {
  .aup-archive-diff-header, .aup-archive-diff-row {
    font-size: 0.93em;
    grid-template-columns: 1.7fr 1.7fr 1fr 1fr 1fr 1fr 1fr 1fr;
  }
}
body.dark-mode .aup-archive-diff-header {
  background: #1a1d22 !important;
  color: #7fc1ff !important;
  border-bottom: 1px solid #333;
}
body.dark-mode .aup-archive-diff-row {
  background: #23272e;
  color: #eee;
  border-bottom: 1px solid #333;
}
.aup-label {
    color: #888;
    font-size: 0.97em;
    font-weight: 500;
    margin-right: 0.3em;
}
.aup-pdf-block-sep {
    margin-top: 22px;
    margin-bottom: 0;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0;
    height: 0;
    border-radius: 18px 18px 0 0;
    overflow: visible;
    position: relative;
    display: grid;
    grid-template-columns: 2fr 1fr;
    align-items: center;
    min-height: 38px;
}
.aup-pdf-block-sep:first-child {
    margin-top: 0;
}
.aup-archive-diff-block {
    margin: 0 0 2em 0;
    padding: 1.5em 0 0 0;
    background: #f8fafd;
    border-left: 4px solid #007bff;
    border-radius: 0 0 8px 8px;
    max-width: 1200px;
}
.aup-diff-added { background: #eaffea; color: #1a5c1a; }
.aup-diff-removed { background: #ffeaea; color: #a11; font-style: italic; text-decoration: line-through; }
.aup-diff-changed { background: #fffbe6; }
.aup-strike { color: #a11; font-style: italic; text-decoration: line-through; margin-right: 0.4em; }
.aup-green { color: #1a5c1a; font-weight: bold; }

body.dark-mode .aup-archive-diff-block {
    background: #1e1e1e;
    border-left: 4px solid #4dabff;
}
body.dark-mode .aup-archive-list-header {
    background: #1a1d22 !important;
    color: #7fc1ff !important;
}
body.dark-mode .aup-diff-added {
    background: #1e3a1e !important;
    color: #7fff7f !important;
}
body.dark-mode .aup-diff-removed {
    background: #3a1e1e !important;
    color: #ff7f7f !important;
}
body.dark-mode .aup-diff-changed {
    background: #3a3a1e !important;
    color: #ffe066 !important;
}
body.dark-mode .aup-strike {
    color: #ff7f7f !important;
}
body.dark-mode .aup-green {
    color: #7fff7f !important;
}
.aup-toggle-btn .fa-chevron-up, .aup-toggle-btn.open .fa-chevron-down { display: none; }
.aup-toggle-btn.open .fa-chevron-up { display: inline; }
.aup-toggle-btn .fa-chevron-down { display: inline; }
.aup-toggle-btn.open .fa-chevron-down { display: none; }

.tra-info-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #e3e6ed;
    border-radius: 10px 10px 0 0;
    border: 1px solid #b6c6e0;
    border-bottom: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    padding: 0.9em 0.9em 0.9em 0.9em;
    font-weight: 700;
    color: #1a4a7a;
    font-size: 1.3em;
    position: relative;
    z-index: 2;
}
.tra-info-toggle h1 {
    margin: 0;
    font-size: 1.2em;
    font-weight: 600;
    color: inherit;
    flex: 1 1 auto;
}
.tra-info-toggle-btn {
    background: #1d87f8;
    border: none;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 4px rgba(0,0,0,0.10);
    margin-left: 18px;
    transition: background 0.2s, box-shadow 0.2s;
    cursor: pointer;
    color: #fff;
    font-size: 1.3em;
    flex-shrink: 0;
}
.tra-info-toggle-btn:hover,
.tra-info-toggle-btn:focus {
    background: #0056b3;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
    outline: none;
}

.tra-info-content {
    border: 1px solid #b6c6e0;
    border-top: none;
    border-radius: 0 0 10px 10px;
    background: #f8f9fa;
    padding: 18px 22px 10px 22px;
    line-height: 1.7;
    color: #222;
    margin-top: 0;
    font-size: 1.08em;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    transition: background 0.2s, color 0.2s;
}
.tra-info-content[style*="display: none"] {
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
}

body.dark-mode .tra-info-toggle {
    background: #23272e;
    border-color: #333;
    color: #7fc1ff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
}
body.dark-mode .tra-info-toggle-btn {
    background: #1976d2;
    color: #fff;
}
body.dark-mode .tra-info-toggle-btn:hover,
body.dark-mode .tra-info-toggle-btn:focus {
    background: #0056b3;
}
body.dark-mode .tra-info-content {
    background: #23272e;
    color: #eee;
    border-color: #333;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
}

/* Button Farben für Light/Dark Mode */
.modus-btn {
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 0.6em 1.5em;
    font-weight: 600;
    transition: background 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}
/* Default: Aktivierung/Grün */
.modus-aktivierung {
    background: #2e7d32;
}
.modus-verlaengerung {
    background: #388e3c;
}
.modus-ablehnung {
    background: #c62828;
}
.modus-deaktivierung {
    background: #ef6c00;
}
.modus-speichern {
    background: #388e3c;
}
@media (prefers-color-scheme: dark) {
    .modus-aktivierung { background: #43a047 !important; }
    .modus-verlaengerung { background: #66bb6a !important; }
    .modus-ablehnung { background: #e53935 !important; }
    .modus-deaktivierung { background: #ffa726 !important; color: #222 !important; }
    .modus-speichern { background: #43a047 !important; }
}

.view-switch-toggle { position: relative; display: inline-block; width: 90px; height: 36px; }
.view-switch-toggle input { display: none; }
.view-switch-slider { position: relative; display: flex; align-items: center; background: #e0e7ef; border-radius: 18px; height: 36px; cursor: pointer; transition: background 0.2s; }
.view-switch-icon { z-index:2; color: #1e293b; font-weight: 500; transition: color 0.2s; justify-content: center; align-items: center; display: flex; font-size: 1.15em; }
.view-switch-handle { position: absolute; left: 2px; top: 2px; width: 42px; height: 32px; background: #fff; border-radius: 16px; box-shadow: 0 1px 4px rgba(0,0,0,0.08); transition: left 0.2s; z-index:1; }
.view-switch-toggle input:checked + .view-switch-slider .view-switch-handle { left: 46px; }
.view-switch-toggle input:not(:checked) ~ .view-switch-slider #view-switch-table { color: #2563eb; }
.view-switch-toggle input:checked ~ .view-switch-slider #view-switch-widget { color: #2563eb; }
.view-switch-toggle .fa { font-size: 1.25em; }

body.dark-mode .view-switch-slider {
  background: #23272f;
}
body.dark-mode .view-switch-handle {
  background: #2d3440;
  box-shadow: 0 1px 4px rgba(0,0,0,0.25);
}
body.dark-mode .view-switch-icon {
  color: #e0e7ef;
}
body.dark-mode .view-switch-toggle input:not(:checked) ~ .view-switch-slider #view-switch-table {
  color: #90b4fa;
}
body.dark-mode .view-switch-toggle input:checked ~ .view-switch-slider #view-switch-widget {
  color: #90b4fa;
}

.tra-today-list, .tra-inactive-list {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 1100px;
    margin: 40px auto 0 auto;
    border-radius: 8px;
    overflow: hidden;
    font-size: 1em;
    margin-bottom: 30px;
    background: var(--tra-today-bg, #f8fafc);
    color: var(--tra-today-fg, #1e293b);
}
.tra-today-header, .tra-today-row, .tra-inactive-header, .tra-inactive-row {
    display: grid;
    grid-template-columns: 0.5fr 2.2fr 1.7fr 0.9fr 1fr 0.7fr;
    align-items: center;
    padding: 8px 10px;
    border-bottom: 1px solid #e0e7ef;
}
.tra-today-header, .tra-inactive-header {
    font-weight: bold;
    background: #e0e7ef;
    position: sticky;
    top: 0;
    z-index: 2;
}
.tra-today-header .sortable, .tra-inactive-header .sortable {
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 0.3em;
    font-weight: 600;
    font-size: 1em;
}
.tra-today-header .sort-arrow, .tra-inactive-header .sort-arrow {
    font-size: 0.95em;
    margin-left: 0.2em;
    color: #888;
    min-width: 14px;
    display: inline-block;
    vertical-align: middle;
}
.tra-today-row, .tra-inactive-row {
    background: inherit;
    transition: background 0.15s;
}
.tra-today-row:hover, .tra-inactive-row:hover {
    background: rgba(39, 94, 254, 0.07);
}
@media (max-width: 900px) {
    .tra-today-header, .tra-today-row, .tra-inactive-header, .tra-inactive-row {
        grid-template-columns: 0.5fr 2.5fr 1.3fr 0.8fr 0.9fr 0.6fr;
        font-size: 0.97em;
    }
}
@media (max-width: 600px) {
    .tra-today-header, .tra-today-row, .tra-inactive-header, .tra-inactive-row {
        grid-template-columns: 0.5fr 2fr 1.1fr 0.7fr 0.8fr 0.5fr;
        font-size: 0.93em;
        padding: 6px 4px;
    }
}
body.dark-mode .tra-today-list, body.dark-mode .tra-inactive-list {
    --tra-today-bg: #23272f;
    --tra-today-fg: #e0e7ef;
}
body.dark-mode .tra-today-header, body.dark-mode .tra-inactive-header {
    background: #2d3440;
    color: #fff;
    border-bottom: 1px solid #333a47;
}
body.dark-mode .tra-today-row, body.dark-mode .tra-inactive-row {
    border-bottom: 1px solid #333a47;
}
body.dark-mode .tra-today-header .sort-arrow, body.dark-mode .tra-inactive-header .sort-arrow {
    color: #bbb;
}
body.dark-mode .tra-today-row:hover, body.dark-mode .tra-inactive-row:hover {
    background: #28304a;
}
.tra-inactive-row.inactive {
    color: #8a99b3;
    font-style: italic;
    opacity: 0.75;
}
.tra-inactive-dot {
    display: inline-block;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    margin-right: 8px;
    vertical-align: middle;
    background: #888;
}