:root {
  --bg-body: #050816;
  --bg-card: #001F18;      /* Grundfarbe der gesamten Tabelle */
  --bg-header: #01130F;
  --bg-row-alt: #001913;
  --border-subtle: #064E3B;
  --text-main: #e5e7eb;
  --text-muted: #9ca3af;
  --accent: #38bff8;
  --accent-soft: rgba(56, 189, 248, 0.15);
}

/* ===========================
   GLOBAL LAYOUT
=========================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top, #020617 0, #020617 50%, #000 100%);
  color: var(--text-main);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem 1rem;
}

.wrapper {
  width: 100%;
}

/* Card – Rahmen um Tabelle */

.card {
  background: var(--bg-card);
  border-radius: 18px;
  border: 1px solid rgba(0, 0, 0, 0.65);
  box-shadow:
    0 25px 80px rgba(0, 0, 0, 0.85),
    0 0 0 1px rgba(15, 23, 42, 0.5);
  padding: 1.6rem 1.6rem 1.1rem;
  width: fit-content;
  margin: 0 auto;
}

/* Header oben */

.card-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  grid-template-rows: 1fr;
  align-items: end;
  align-content: end;
  margin-bottom: 0.0rem !important;
  gap: 1rem !important;

  /* NEU: Breite an Tabellenbreite koppeln */
  max-width: 1150px;   /* gleiche Breite wie table */
  margin-left: auto;
  margin-right: auto;
  position: relative;
}

/* LAN-Info Container (links vom Banner) */
.lan-info-container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 0.3rem 1rem;
  background: rgba(10, 22, 40, 0.6);
  border: 1px solid rgba(30, 58, 95, 0.5);
  border-radius: 8px;
  min-width: 150px;
  grid-column: 1;
  justify-self: start;
  align-self: end;
  gap: 0.25rem;
}

.lan-info-content {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  width: 100%;
}

.lan-info-display {
  font-size: 0.9rem;
  font-weight: 600;
  color: #e5e7eb;
  line-height: 1.2;
}

.lan-info-dates {
  font-size: 0.75rem;
  color: #9ca3af;
  line-height: 1.2;
}

.lan-info-location {
  font-size: 0.75rem;
  color: #6b7280;
  line-height: 1.2;
}


.title-block {
  grid-column: 2;
  grid-row: 1;
  align-self: end;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-left: 1rem;
  justify-self: start;
}

.card-title {
  font-size: 1.4rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.logo-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: radial-gradient(circle, #38bdf8 0, #0ea5e9 40%, #0369a1 100%);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.9);
}

.card-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Tabellen-Container */

/* Tabellen nebeneinander */
.tables-wrapper {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  justify-content: center;
  margin-top: 0.2rem !important;
}

.table-container {
  border-radius: 14px;
  border: 1px solid var(--border-subtle);
  background: rgba(0, 31, 24, 0.98);
  overflow: hidden;
  width: fit-content;
  margin: 0 auto;
}

.table-scroll {
  max-height: 85vh;
  overflow-x: auto;
  overflow-y: auto;
}

/* Footer */

.table-footer {
  padding: 0.55rem 0.9rem 0.6rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #001612;
  gap: 1rem;
}

.badge {
  border: 1px solid rgba(148, 163, 184, 0.25);
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  display: flex;
  gap: 0.3rem;
  align-items: center;
}

.badge .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 6px rgba(34, 197, 94, 0.8);
}

/* Footer-Link nach außen */
.footer-link {
  color: #6ee7b7;
  font-size: 0.8rem;
  text-decoration: none;
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  border: 1px solid rgba(110, 231, 183, 0.25);
  transition: 0.25s ease;
}

.footer-link:hover {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(110, 231, 183, 0.7);
  color: #a7f3d0;
}


/* Scrollbar (WebKit) */

.table-scroll::-webkit-scrollbar {
  height: 8px;
  width: 8px;
}

.table-scroll::-webkit-scrollbar-track {
  background: #000f0b;
}

.table-scroll::-webkit-scrollbar-thumb {
  background: #064E3B;
  border-radius: 999px;
}

.table-scroll::-webkit-scrollbar-thumb:hover {
  background: #16a34a;
}

/* LAN-Mode: Scrollbar-Farben anpassen */
body.lan-mode-active .table-scroll::-webkit-scrollbar-track {
  background: #0a1628;
}

body.lan-mode-active .table-scroll::-webkit-scrollbar-thumb {
  background: #1e3a5f;
}

body.lan-mode-active .table-scroll::-webkit-scrollbar-thumb:hover {
  background: #2d4f7a;
}

/* Firefox Scrollbar für LAN-Mode */
body.lan-mode-active .table-scroll {
  scrollbar-color: #1e3a5f #0a1628;
}

/* ===========================
   HISTORY-NAVIGATION / DROPDOWN
=========================== */

.card-header-controls button {
  background: #01271e;  
  border: 1px solid #065f47;
  color: #e5e7eb;
  padding: 0.3rem 0.75rem;
  border-radius: 6px;
  font-size: 0.8rem;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    transform 0.15s ease;
}

.card-header-controls button:hover:not(:disabled) {
  background: #033b2d;
  border-color: #1ea67a;
  transform: translateY(-1px);
}

.card-header-controls button:active:not(:disabled) {
  transform: translateY(1px);
}

.card-header-controls button:disabled {
  background: #001711;
  border-color: #033126;
  color: #355e52;
  cursor: default;
  transform: none;
}

#history-select {
  background: #01271e;
  border: 1px solid #065f47;
  color: #e5e7eb;
  padding: 0.25rem 0.9rem;
  border-radius: 999px;
  font-size: 0.8rem;
  outline: none;
  cursor: pointer;
  transition:
    background 0.2s ease,
    border-color 0.2s ease;
}

#history-select:hover {
  background: #033b2d;
  border-color: #1ea67a;
}

#history-select:focus {
  background: #033b2d;
  border-color: #32d8a5;
}

#history-select::-ms-expand {
  display: none;
}

/* ===========================
   MATCHLIST – Zeitraum-Dropdown
=========================== */

.matchlist-filters {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.2rem 0.9rem;
  border-radius: 999px;
  background: radial-gradient(circle at left, #02241b 0, #00130d 55%, #00140f 100%);
  border: 1px solid rgba(6, 95, 71, 0.8);
  box-shadow:
    0 0 10px rgba(0, 0, 0, 0.7),
    0 0 16px rgba(34, 197, 94, 0.18);
}

#map-filter-container,
#date-filter-container {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

/* Grundstil für alle Filter-Labels */
.matchlist-filters label {
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  position: relative;
  padding-left: 1.4rem; /* Platz für Icon links */
  height: 20px
}

/* Standard-Icon: KALENDER (für Zeitraum-Filter) */
.matchlist-filters label::before {
  content: "";
  position: absolute;
  left: 0;
  width: 14px;
  height: 14px;
  background-size: contain;
  background-repeat: no-repeat;
  top: 2px;

  /* Kalender-Icon (grünes Flat-Design) */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2322c55e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E");
}

/* MAP-FILTER: eigenes Karten-Icon (überschreibt Kalender) */
#map-filter-container label::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2322c55e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 3l-5 2v16l5-2 6 2 5-2V3l-5 2-6-2z'/%3E%3Cline x1='9' y1='5' x2='9' y2='19'/%3E%3Cline x1='15' y1='7' x2='15' y2='21'/%3E%3C/svg%3E");
}

/* LAN-DATEI-FILTER: Kalender-Icon (gleiches Icon wie Zeitraum) */
#date-filter-container label[for="lan-matchlist-select"]::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2322c55e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E");
}


/* Wrapper um das Select – für Custom-Pfeil */
.matchlist-select-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

#date-range-select,
#map-select,
#lan-matchlist-select {
  background: #001b13;
  border: 1px solid #065f47;
  color: #e5e7eb;
  padding: 0.25rem 2.0rem 0.25rem 0.8rem; /* rechts Platz für Pfeil */
  border-radius: 999px;
  display: flex;
  align-items: center;
  font-size: 0.72rem;
  outline: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.15s ease;
}

/* Hover / Focus */
#date-range-select:hover,
#map-select:hover,
#lan-matchlist-select:hover {
  background: #02251b;
  border-color: #1ea67a;
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.35);
  transform: translateY(-1px);
}

#date-range-select:focus-visible,
#map-select:focus-visible,
#lan-matchlist-select:focus-visible {
  border-color: #32d8a5;
  box-shadow: 0 0 0 1px rgba(50, 216, 165, 0.5);
}

/* Edge/IE-Pfeil */
#date-range-select::-ms-expand,
#map-select::-ms-expand,
#lan-matchlist-select::-ms-expand {
  display: none;
}


/* Custom-Pfeil, sauber zentriert */
.matchlist-select-wrap::after {
  content: "▾";
  position: absolute;
  right: 0.7rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.75rem;
  pointer-events: none;
  color: #6ee7b7;
  opacity: 0.9;
}


/* ===========================
   RESPONSIVE
=========================== */

.main-logo {
  height: 80px;
  width: auto;
  grid-column: 2;
  grid-row: 1;
  justify-self: center;
  align-self: end;
  margin: 0;
  filter: drop-shadow(0 0 14px rgba(0, 0, 0, 0.6));
}

@media (max-width: 768px) {
  body {
    padding: 1rem 0.5rem;
    align-items: flex-start;
  }

  .card {
    width: 100%;
    max-width: 100%;
    padding: 1.1rem 0.9rem 0.9rem;
  }

  .card-header {
    flex-direction: column;
    max-width: 100%;
    align-items: flex-start;
    gap: 0.3rem !important;
    margin-bottom: 0.2rem !important;
    margin-left: 0;
    margin-right: auto;
  }

  .card-title {
    font-size: 1.1rem;
  }

  .card-header-controls {
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 0.4rem;
  }

  .card-header-controls button {
    padding: 0.25rem 0.6rem;
    font-size: 0.75rem;
  }

  #history-select {
    font-size: 0.75rem;
    margin-left: 0.4rem;
    flex-shrink: 0;
  }

  .table-container {
    width: 100%;
    max-width: 100%;
    position: relative;
    z-index: 1;
  }

  .table-scroll {
    max-height: 85vh;
    overflow-x: auto;
    overflow-y: auto;
  }

  table {
    width: 100%;
    min-width: 480px;
    font-size: 0.7rem;
  }

  th,
  td {
    padding: 0.25rem 0.3rem;
    line-height: 1.1;
  }

  .table-footer {
    flex-direction: column;
    align-items: flex-start;
    font-size: 0.75rem;
  }

  .main-logo {
    display:none;
    height: 44px;
    margin-bottom: 0.5rem;
  }
  .matchlist-filters {
    padding: 0.15rem 0.6rem;
  }

  #date-range-select {
    font-size: 0.75rem;
    padding: 0.2rem 1.8rem 0.2rem 0.7rem;
  }

  .matchlist-filters label {
    font-size: 0.72rem;
  }

  .tables-wrapper {
    flex-direction: column;
    align-items: stretch;
    margin-top: 0.2rem !important;
    position: relative;
    z-index: 1;
  }

  /* Filterbar: Umbrechen statt ausrutschen */
  .filterbar {
    flex-wrap: wrap;
    gap: 0.5rem;
    height: auto !important;
    min-height: 35px;
    padding: 0.6rem 1rem 0.8rem !important;
    position: relative;
    z-index: 100;
    background: rgba(0, 39, 24, 0.98) !important; /* Sichtbarer Hintergrund */
    margin-bottom: 0.3rem !important; /* Abstand zur Tabelle */
    overflow: visible !important;
  }

  .filterbar-left,
  .filterbar-right {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .filterbar-right {
    width: 100%;
    justify-content: flex-start;
    margin-top: 0.5rem;
  }

  .navbar-user {
    flex-wrap: wrap;
    gap: 0.4rem;
  }

  /* LAN-Mode: Dunkelblaue Filterbar (Mobile) */
  body.lan-mode-active .filterbar {
    background: rgba(13, 27, 42, 0.98) !important;
  }

}


/* Link oben rechts: MatchList */

.nav-link,
.nav-link:visited {
  display: inline-flex;
  align-items: center;
  width: auto;
  justify-content: center;
  padding: 0.3rem 0.9rem;
  border-radius: 999px;
  border: 1px solid #065f47;
  background: #01271e;
  color: #e5e7eb;
  font-size: 0.8rem;
  text-decoration: none;
  cursor: pointer;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    transform 0.15s ease;
}

.nav-link:hover {
  background: #033b2d;
  border-color: #1ea67a;
  color: #e5e7eb;
  transform: translateY(-1px);
}

.nav-link:active {
  transform: translateY(1px);
}

.nav-link:focus-visible {
  outline: 2px solid #22c55e;
  outline-offset: 2px;
}

/* --- MODERNE NAVIGATION --- */
@import url('https://fonts.googleapis.com/css2?family=Exo+2:wght@600;800&display=swap');

.navbar {
    width: 100%;
    height: 35px;
    background: rgba(255, 255, 255, 0.00); /* dezenter Glow wie im Popup */
    backdrop-filter: blur(6px);
    border-radius: 12px 12px 0px 0px;
    border-top: 1px solid rgba(14, 201, 185, 0.45);
    padding: 1.4em 1rem;


    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.2rem;

    text-transform: uppercase;
    color: #cce7ff;

    text-shadow:
        0 2px 4px rgba(0, 0, 0, 0.4),
        0 0 6px rgba(102, 193, 255, 0.45);
}

/* Linke Seite: Navigation */
.navbar-left {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* Logo */
.navbar-logo-link {
    display: flex;
    align-items: center;
}

.navbar-logo {
    height: 28px;
    width: auto;
    margin-right: 0.3rem;
    opacity: 0.9;
    transition: opacity 0.2s ease-in-out;
}

.navbar-logo:hover {
    opacity: 1;
}

/* Navigation Links */
.navbar a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 3.0px;
    padding: 0.35rem 0.6rem;
    border-radius: 6px;
    transition: all 0.18s ease-in-out;
}

/* Hover */
.navbar a:hover {
    background: var(--accent);
    color: black;
    transform: translateY(-1px);
}

/* Aktive Seite */
.navbar a.active {
    background: var(--accent);
    color: black;
    box-shadow: 0 0 6px rgba(255, 251, 120, 0.4);
}

/* Trenner "|" */
.nav-separator {
    color: rgba(255, 255, 255, 0.4);
    font-weight: 300;
    margin: 0 0.1rem;
    user-select: none;
}

/* Roter Indikator für deaktivierte Navbar-Links (nur für Admins) */
.nav-link-disabled-indicator {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: #ef4444;
    border-radius: 50%;
    margin-left: 4px;
    box-shadow: 0 0 4px rgba(239, 68, 68, 0.6);
    vertical-align: middle;
}

/* Rechte Seite (History / Filter) */
.navbar-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* History-Label in der Navbar etwas dezenter */
.navbar-history-label {
    font-size: 0.8rem;
    color: #9ca3af;
}

/* Matchlist-Filter in der Navbar in eine Zeile zwängen */
.navbar .matchlist-filter-group {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 0;
}

.navbar .matchlist-filters {
    margin: 0;
}

/* MATCHLIST FILTERS IN NAVBAR – OPTISCH WIE INDEX NAVBAR */
.navbar .matchlist-filters,
.navbar .matchlist-select-wrap {
    background: transparent !important;   /* kein eigener Hintergrund */
    box-shadow: none !important;
    padding: 0 !important;
    border-radius: 0 !important;
}

/* Selects leicht anheben wie History-Select */
.navbar .matchlist-select-wrap select {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.2);
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    color: var(--text-primary);
}

/* FILTER in der Navbar: aussehen wie Index-History */
.navbar .matchlist-filter-group {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.navbar .matchlist-filters {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
}

/* Filter-Labels neutralisieren (kein Glow, keine Icons) */
.navbar .matchlist-filters label {
    padding-left: 0 !important;
}

.navbar .matchlist-filters label::before {
    display: none !important;
}

/* ===========================
   NAVBAR – MOBILE
   ========================== */
@media (max-width: 800px) {
  .navbar {
    height: auto;
    padding: 0.5rem 0.75rem;
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }

  /* obere Zeile: Logo + Tabs, zentriert / umbrechbar */
  .navbar-left {
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
  }

  .navbar-logo {
    height: 24px;
    margin-right: 0.1rem;
  }

  .navbar a {
    font-size: 0.85rem;
    padding: 0.25rem 0.5rem;
  }

  /* untere Zeile: History / Filter-Controls */
  .navbar-right {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
    row-gap: 0.4rem;
  }

  /* History-Buttons auf index.php */
  .navbar-history-controls button {
    padding: 0.25rem 0.55rem;
    font-size: 0.75rem;
  }

  .navbar-history-label {
    font-size: 0.75rem;
  }

  #history-select {
    font-size: 0.75rem;
    padding: 0.22rem 0.7rem;
  }

  /* Matchlist-Filter – untereinander, aber kompakt */
  .navbar .matchlist-filter-group {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
  }

  .navbar .matchlist-filters {
    width: 100%;
  }

  .navbar #map-select,
  .navbar #date-range-select {
    width: 100%;
    max-width: 260px;
  }

  /* Filterbar: Umbrechen statt ausrutschen */
  .filterbar {
    flex-wrap: wrap;
    gap: 0.5rem;
    height: auto !important;
    min-height: 35px;
    padding: 0.6rem 1rem 0.8rem !important;
    position: relative;
    z-index: 100;
    background: rgba(0, 39, 24, 0.98) !important; /* Sichtbarer Hintergrund */
    margin-bottom: 0.3rem !important; /* Abstand zur Tabelle */
    overflow: visible !important;
  }

  .filterbar-left,
  .filterbar-right {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .filterbar-right {
    width: 100%;
    justify-content: flex-start;
    margin-top: 0.5rem;
  }

  .navbar-user {
    flex-wrap: wrap;
    gap: 0.4rem;
  }

  /* LAN-Mode: Dunkelblaue Filterbar (Mobile) */
  body.lan-mode-active .filterbar {
    background: rgba(13, 27, 42, 0.98) !important;
  }

  /* Tabelle hat Abstand zur Filterbar */
  .tables-wrapper {
    margin-top: 0.2rem !important;
    position: relative;
    z-index: 1;
  }
}

/* ===========================
   LOGIN PAGE
=========================== */

body.login-page {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top, #020617 0, #020617 50%, #000 100%);
  color: var(--text-main);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem 1rem;
}

.login-wrapper {
  width: 100%;
  max-width: 420px;
}

.login-card {
  background: #001F18;
  border-radius: 18px;
  border: 1px solid rgba(0,0,0,0.65);
  box-shadow:
    0 25px 80px rgba(0, 0, 0, 0.85),
    0 0 0 1px rgba(15, 23, 42, 0.5);
  padding: 1.8rem 1.6rem 1.5rem;
}

.login-logo-row {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 1.2rem;
}

.login-logo {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.6);
}

.login-title {
  font-size: 1.4rem;
  font-weight: 600;
}

.login-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.login-error {
  background: rgba(220, 38, 38, 0.12);
  border: 1px solid rgba(220, 38, 38, 0.6);
  color: #fecaca;
  border-radius: 8px;
  padding: 0.55rem 0.7rem;
  font-size: 0.85rem;
  margin-bottom: 0.9rem;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.login-form label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.login-form input,
.login-form select {
  background: #01271e;
  border: 1px solid #065f47;
  color: #e5e7eb;
  border-radius: 8px;
  padding: 0.45rem 0.7rem;
  font-size: 0.9rem;
  outline: none;
}

.login-form input:focus,
.login-form select:focus {
  border-color: #32d8a5;
}

.login-submit {
  margin-top: 0.5rem;
  background: #22c55e;
  border: none;
  border-radius: 999px;
  padding: 0.5rem 0.8rem;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  color: #022c1b;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.login-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(16, 185, 129, 0.45);
}

.login-hint {
  margin-top: 0.8rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
}

/* ===========================
   NAVBAR – USER PILL
=========================== */

.navbar-user {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-left: 1rem;
}

.navbar-user-avatar {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  object-fit: cover;
  border: none;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.7);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.navbar-user-avatar:hover {
  transform: scale(1.1);
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.6);
  filter: brightness(1.1);
  box-shadow: 0 0 8px rgba(0,0,0,0.7);
}

.navbar-user-name {
  font-size: 0.85rem;
}

.navbar-user-role {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.55rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  line-height: 1.2;
}

/* Rollen-Farben */
.navbar-user-role.role-admin {
  background: linear-gradient(135deg, #dc2626, #991b1b);
  color: #ffffff;
  box-shadow: 0 0 8px rgba(220, 38, 38, 0.4);
}

.navbar-user-role.role-lan-host {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #ffffff;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.4);
}

.navbar-user-role.role-viewer {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #ffffff;
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.4);
}

.navbar-logout-form {
  margin: 0;
}

.navbar-logout-btn {
  background: transparent;
  border-radius: 999px;
  border: 1px solid rgba(189, 96, 96, 0.541);
  color: var(--text-main);
  font-size: 0.75rem;
  padding: 0.25rem 0.7rem;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.navbar-logout-btn:hover {
  background: rgba(248, 113, 113, 0.16);
  border-color: rgba(248, 113, 113, 0.8);
  transform: translateY(-1px);
}

.login-avatar-preview {
  display: flex;
  justify-content: center;
  margin-bottom: 0.8rem;
  min-height: 68px; /* reserviert Platz, damit das Layout nicht springt */
}

.login-avatar {
  width: 64px;
  height: 64px;
  border-radius: 999px;
  object-fit: cover;
  border: 2px solid rgba(56, 189, 248, 0.7);
  box-shadow: 0 0 18px rgba(15, 23, 42, 0.9);
}

.navbar-user-main {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.navbar-user-main:hover .navbar-user-name {
  text-decoration: none;
}

/* Verhindere, dass der Link beim Klick auf den Admin-Role-Indicator navigiert */
.navbar-user-main .admin-role-clickable {
  pointer-events: auto;
}

.navbar-user-main:has(.admin-role-clickable) {
  pointer-events: none;
}

.navbar-user-main:has(.admin-role-clickable) > *:not(.admin-role-clickable) {
  pointer-events: auto;
}

/* ===========================
   Passwort-Stärke-Anzeige
=========================== */

.password-strength {
  margin-top: 0.4rem;
  margin-bottom: 0.6rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.password-strength-bar {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  overflow: hidden;
}

.password-strength-bar-fill {
  height: 100%;
  width: 0%;
  transition: width 0.2s ease, background 0.2s ease;
  background: #ef4444; /* default weak */
}

/* Farbcodes je nach Level */
.password-strength-bar-fill.pw-weak {
  background: #ef4444;
}

.password-strength-bar-fill.pw-medium {
  background: #f97316;
}

.password-strength-bar-fill.pw-good {
  background: #eab308;
}

.password-strength-bar-fill.pw-strong {
  background: #22c55e;
}

.password-strength-text {
  font-size: 0.78rem;
}

.password-rules {
  font-size: 0.7rem;
  color: var(--text-muted);
  opacity: 0.9;
}

.login-remember {
  margin-top: 0.3rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

/* =========================================
   FOOTER LINKS (Impressum / Datenschutz)
========================================= */

.footer-links {
  text-align: center;
  margin-top: 0.3rem;
  padding: 1rem 0 0.5rem;
  opacity: 0.55;
  font-size: 0.7rem;
}

.footer-links a {
  color: #9ca3af;
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.footer-links a:hover {
  color: #ffffff;
  opacity: 0.9;
}

/* ===============================
   FILTERBAR (unter der Navbar)
   =============================== */

.filterbar {
    display: flex;
    justify-content: space-between;
    align-items: center;

    width: 1150px;
    max-width: 95vw;
    height: 35px;
    background: rgba(255, 255, 255, 0.00); /* dezenter Glow wie im Popup */
    backdrop-filter: blur(6px);
    border-radius: 0 0 12px 12px;
    border-bottom: 1px solid rgb(14, 201, 185, 0.45);
    padding: 0.6rem 1rem;
    margin-top: -2px; /* an Navbar optisch andocken */
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

/* Linker Bereich */
.filterbar-left {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

/* Rechter Bereich (Avatar + Logout) */
.filterbar-right {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.filter-btn {
    background: #01271e;
    border: 1px solid #065f47;
    color: #e5e7eb;
    padding: 0.3rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease,
        transform 0.15s ease;
}

.filter-btn:hover:not(:disabled) {
    background: #033b2d;
    border-color: #1ea67a;
    transform: translateY(-1px);
}

.filter-btn:active:not(:disabled) {
    transform: translateY(1px);
}

.filter-btn:disabled {
    background: #001711;
    border-color: #033126;
    color: #355e52;
    cursor: default;
    transform: none;
}

.filter-select {
    background: #01271e;
    border: 1px solid #065f47;
    color: #e5e7eb;
    padding: 0.25rem 1rem;
    border-radius: 999px;
    font-size: 0.8rem;
}

.filter-label {
    font-size: 0.8rem;
    opacity: 0.7;
    color: #e5e7eb;
}

.filter-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

.filter-username {
    font-size: 0.85rem;
    color: #d1d5db;
}

.filter-logout {
    padding: 0.25rem 0.7rem;
    background: #5c1e1e;
    border-radius: 8px;
    color: #fff;
    font-size: 0.8rem;
}

.filter-logout:hover {
    background: #7a2020;
}

/* ===============================
   LAN-MODE SWITCH
   =============================== */

.lan-mode-control {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
    align-self: end;
    z-index: 10;
}

.prevote-button {
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    border: none;
    border-radius: 8px;
    color: #1f2937;
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(251, 191, 36, 0.3);
    display: inline-block;
}

.prevote-button:hover {
    background: linear-gradient(135deg, #fcd34d 0%, #fbbf24 100%);
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.5);
    transform: translateY(-1px);
    color: #111827;
}

/* Auf matchlist.php: Header hat spezielles Layout */
.page-matchlist .card-header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    grid-template-rows: 1fr;
    align-items: end;
    align-content: end;
    gap: 1rem;
    max-width: 1850px;
    margin: 0 auto 1.2rem;
    position: relative;
}

.page-matchlist .lan-info-container {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
    align-self: end;
}

/* Banner zentrieren */
.page-matchlist .main-logo {
    grid-column: 2;
    grid-row: 1;
    justify-self: center;
    align-self: end;
    margin: 0;
}

.page-matchlist .title-block {
    grid-column: 2;
    grid-row: 1;
    justify-self: start;
    align-self: end;
}

.page-matchlist .lan-mode-control {
    grid-column: 3;
    grid-row: 1;
    position: static;
    transform: none;
    justify-self: end;
    align-self: end;
}

.lan-mode-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
}

.lan-mode-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
}

.lan-mode-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.lan-mode-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #01271e;
    border: 1px solid #065f47;
    transition: 0.3s;
    border-radius: 24px;
}

.lan-mode-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 2px;
    bottom: 2px;
    background-color: #9ca3af;
    transition: 0.3s;
    border-radius: 50%;
}

.lan-mode-switch input:checked + .lan-mode-slider {
    background-color: #22c55e;
    border-color: #16a34a;
}

.lan-mode-switch input:checked + .lan-mode-slider:before {
    transform: translateX(24px);
    background-color: #ffffff;
}

.lan-mode-switch:hover .lan-mode-slider {
    border-color: #1ea67a;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.3);
}

/* LAN-Mode: Popup-Links in Navbar ausblenden */
body.lan-mode-active .nav-popup-link,
body.lan-mode-active .nav-separator-popup {
    display: none !important;
}

/* LAN-Mode: Dunkelblaue Grundfarben */
body.lan-mode-active {
    --bg-body: #0a1a2e;
    --bg-card: #0d1b2a;
    --bg-header: #0a1628;
    --bg-row-alt: #0f1e35;
    --border-subtle: #1e3a5f;
}

body.lan-mode-active {
    background: radial-gradient(circle at top, #0a1a2e 0, #0a1a2e 50%, #000 100%);
}

body.lan-mode-active .card {
    background: var(--bg-card);
}

body.lan-mode-active .table-container {
    background: rgba(13, 27, 42, 0.98);
    border-color: var(--border-subtle);
}

body.lan-mode-active .table-footer {
    background: #0a1628;
}

body.lan-mode-active .login-card {
    background: var(--bg-card);
}

body.lan-mode-active .filterbar {
    background: rgba(13, 27, 42, 0.98);
    border-bottom-color: rgba(30, 58, 95, 0.45);
}

body.lan-mode-active .navbar {
    border-top-color: rgba(30, 58, 95, 0.45);
}

body.lan-mode-active .card-header-controls button,
body.lan-mode-active #history-select,
body.lan-mode-active .filter-btn,
body.lan-mode-active .filter-select {
    background: #0a1628;
    border-color: #1e3a5f;
}

body.lan-mode-active .card-header-controls button:hover:not(:disabled),
body.lan-mode-active #history-select:hover,
body.lan-mode-active .filter-btn:hover:not(:disabled) {
    background: #0f1e35;
    border-color: #2d4a6f;
}

body.lan-mode-active #history-select:focus {
    background: #0f1e35;
    border-color: #2d4a6f;
}

body.lan-mode-active .matchlist-filters {
    background: radial-gradient(circle at left, #0a1628 0, #0a1a2e 55%, #0d1b2a 100%);
    border-color: rgba(30, 58, 95, 0.8);
    box-shadow:
        0 0 10px rgba(0, 0, 0, 0.7),
        0 0 16px rgba(30, 58, 95, 0.18);
}

body.lan-mode-active #date-range-select,
body.lan-mode-active #map-select,
body.lan-mode-active #lan-matchlist-select {
    background: #0a1628;
    border-color: #1e3a5f;
}

body.lan-mode-active #date-range-select:hover,
body.lan-mode-active #map-select:hover,
body.lan-mode-active #lan-matchlist-select:hover {
    background: #0f1e35;
    border-color: #2d4a6f;
    box-shadow: 0 0 12px rgba(30, 58, 95, 0.35);
}

body.lan-mode-active .nav-link {
    border-color: #1e3a5f;
    background: #0a1628;
}

body.lan-mode-active .nav-link:hover {
    background: #0f1e35;
    border-color: #2d4a6f;
}

body.lan-mode-active .login-form input,
body.lan-mode-active .login-form select {
    background: #0a1628;
    border-color: #1e3a5f;
}

body.lan-mode-active .login-form input:focus,
body.lan-mode-active .login-form select:focus {
    border-color: #2d4a6f;
}

/* ===============================
   NAVBAR + FILTERBAR Breite fixieren
   =============================== */

/* nur Breite steuern, Optik (Background etc.) kommt aus den jeweiligen Blöcken oben */
.navbar {
    /* Navbar soll die gleiche Breite wie die Tabelle haben (1150px) */
    width: 1150px;
    max-width: 95vw;
    margin: 0 auto;
    box-sizing: border-box;
}

/* MATCHLIST-FILTER IN FILTERBAR NEBENEINANDER */
.filterbar .matchlist-filter-group {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 1rem !important;
}

.filterbar .matchlist-filters {
    flex-direction: row !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.6rem !important;
}
