/* Global layout primitives shared by all routes. */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", "Segoe UI", Arial, sans-serif;
  line-height: 1.5;
  background-color: #ffffff;
  color: #1f2933;
}

a {
  color: inherit;
}

a:hover {
  color: inherit;
}

img,
svg,
video {
  max-width: 100%;
  height: auto;
}

button,
input,
select,
textarea {
  font: inherit;
}

@media (prefers-color-scheme: dark) {
  .sticky-header {
    background: #222;
    color: #fff;
  }

  .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;
  }

}

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

body.dark-mode .hint {
  color: #e8b02e;
}

.warntext {
  margin-top: 0.3rem;
  color: red;
  font-size: 0.95rem;
  margin: 1rem 0;
}

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

.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-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;
}

.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;
}

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

.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;
}

.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;
}

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

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

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

.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;
}

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

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

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;
}

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

@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;
  }

}

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

}

.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;
}

.tra-aktivierung-reiter {
  display: block;
  font-weight: 600;
  background: #fafafa;
  padding: 0.7em 1.5em 0.5em 1.5em;
  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;
}

body.dark-mode .tra-aktivierung-reiter {
  background: #23272e;
  border-color: #333;
  color: #7fc1ff;
}

.zeltweg-manned-flex {
  display: flex;
  flex-direction: row;
  align-items: stretch;
}

.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-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-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;
}

.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;
}

.sponsor-banner {
  width: 100vw;
  max-width: 100vw;
  background: #e6edf7;
  padding: 2rem 0;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

body.dark-mode .sponsor-banner {
  background: #e6edf7;
}

.sponsor-banner__inner {
  width: 100%;
  margin: 0 auto;
  position: relative;
  padding: 0 3vw;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.6rem;
}

.sponsor-banner__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.4rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #0b2e4e;
}

.sponsor-banner__legend-item {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

body.dark-mode .sponsor-banner__legend {
  color: #d7e2f7;
}

.sponsor-banner__track {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 220px));
  justify-content: flex-start;
  align-items: center;
  gap: 2.4rem 3.5rem;
  width: 100%;
}

.sponsor-banner__item {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.sponsor-banner__item img {
  display: block;
  max-height: 110px;
  max-width: 100%;
  width: auto;
  height: auto;
}

.sponsor-banner__item:focus-visible {
  outline: 2px solid rgba(29, 135, 248, 0.45);
  outline-offset: 4px;
}

@media (max-width: 680px) {
  .sponsor-banner__inner {
    align-items: stretch;
    gap: 1.2rem;
  }

  .sponsor-banner__legend {
    justify-content: center;
    text-align: center;
  }

  .sponsor-banner__track {
    justify-content: center;
  }
}

.site-footer {
  background: linear-gradient(0deg, #253446 0%, #2f4560 100%);
  color: #f5f8ff;
  padding: 2.2rem 1.6rem 2.6rem;
}

body.dark-mode .site-footer {
  background: linear-gradient(0deg, #131c2a 0%, #1c2d3e 100%);
  color: #d7e2f7;
}

.site-footer__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
}

.site-footer__section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  font-size: 0.98rem;
  line-height: 1.7;
}

.site-footer__nav {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
  color: rgba(222, 231, 247, 0.88);
}

body.dark-mode .site-footer__nav {
  color: rgba(207, 219, 244, 0.82);
}

.site-footer__links {
  font-weight: 500;
  font-size: 1rem;
  line-height: 1.6;
}

.site-footer__links-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: center;
  margin: 0;
  text-align: center;
}

.site-footer__links-row a {
  color: inherit;
  text-decoration: underline;
}

.site-footer__divider {
  color: rgba(219, 231, 255, 0.35);
}

body.dark-mode .site-footer__divider {
  color: rgba(210, 222, 247, 0.25);
}

.site-footer__columns {
  display: grid;
  gap: 2rem;
  width: 100%;
}

.site-footer__columns .site-footer__section {
  background: rgba(247, 250, 255, 0.92);
  color: #1b2736;
  padding: 1.6rem;
  border-radius: 16px;
  box-shadow: 0 18px 38px rgba(9, 17, 30, 0.08);
}

body.dark-mode .site-footer__columns .site-footer__section {
  background: rgba(11, 20, 32, 0.55);
  color: #dfe8ff;
  box-shadow: 0 16px 32px rgba(3, 6, 12, 0.6);
}

.site-footer__columns .site-footer__section p,
.site-footer__columns .site-footer__section a {
  color: inherit;
}

.site-footer__disclaimer a {
  color: #aedbff;
}

body.dark-mode .site-footer__disclaimer a {
  color: #82b8ff;
}

.site-footer__support-text {
  margin: 0;
  font-weight: 600;
  font-size: 1rem;
  color: #aedbff;
}

body.dark-mode .site-footer__support-text {
  color: #aedb34;
}

.site-footer__donation-form {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  justify-content: center;
}

.site-footer__donation-form input[type="image"] {
  border-radius: 999px;
  overflow: hidden;
}

.site-footer__donation-form img {
  display: none;
}

@media (max-width: 768px) {
  .sponsor-banner {
    padding: 1.2rem 0;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
  }

  .sponsor-banner__track {
    gap: 1.5rem;
  }

  .sponsor-banner__item img {
    max-height: 120px;
  }

  .site-footer {
    padding: 2rem 1.2rem 2.2rem;
  }

  .site-footer__links-row {
    justify-content: center;
    text-align: center;
  }

  .site-footer__support-text {
    text-align: center;
  }

  .site-footer__donation-form {
    flex-direction: column;
  }
}

@media (min-width: 900px) {
  .site-footer__columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-footer__section {
    min-height: 100%;
    justify-content: center;
  }

  .site-footer__support {
    align-items: center;
    justify-content: center;
  }
}

@media (max-width: 899px) {
  .site-footer__columns {
    grid-template-columns: 1fr;
  }
}
