/* =========================================================
   CHIEFS – Dark Theme (Schwarz/Gold) – final (clean)
   Scope: body.dark  → greift nur für deine App
   ========================================================= */

/* ---------- Basis / Hintergrund ---------- */
body.dark, body.dark * { color-scheme: dark; }
body.dark { background:#000 !important; color:#f1f1f1 !important; }
body.dark::before{
  content:""; position:fixed; inset:0; z-index:0; pointer-events:none;
  background:url('https://eishockey-trostberg.de/wp-content/uploads/2025/05/Chiefs_Logo_schwarz_ohne-schrift.png')
            no-repeat center center / min(78vw,980px);
  filter:invert(1) grayscale(100%); opacity:.05;
}

/* ---------- Hauptcontainer ---------- */
body.dark main.container{
  position:relative; z-index:1; background:rgba(0,0,0,.85);
  padding:1.5rem; border-radius:10px; box-shadow:0 0 18px rgba(212,175,55,.25);
}

/* ---------- Navbar ---------- */
body.dark .navbar{
  background:rgba(0,0,0,.9) !important; border-bottom:1px solid rgba(212,175,55,.3);
  backdrop-filter:blur(4px); box-shadow:0 2px 10px rgba(0,0,0,.35);
}
body.dark .navbar-brand span{ color:#FFD700 !important; font-weight:700; text-transform:uppercase; letter-spacing:.5px; }
body.dark .navbar-dark .navbar-text{ color:#ccc !important; }
body.dark .btn-outline-light{ color:#FFD700 !important; border-color:#FFD700 !important; }
body.dark .btn-outline-light:hover{ background:#FFD700 !important; color:#000 !important; }

/* ---------- Überschriften ---------- */
body.dark h1, body.dark h2, body.dark h3, body.dark h4, body.dark h5, body.dark h6{
  color:#FFD700 !important; font-weight:600;
}

/* ---------- Tabs ---------- */
body.dark .nav-tabs .nav-link{ color:#FFD700 !important; font-weight:600; }
body.dark .nav-tabs .nav-link.active{
  background:#FFD700 !important; color:#000 !important;
  border-color:#FFD700 #FFD700 #000 !important;
}

/* ---------- Buttons ---------- */
body.dark .btn{ border-radius:6px; font-weight:700; text-transform:uppercase; }
body.dark .btn-primary{ background:#FFD700; border-color:#FFD700; color:#000; }
body.dark .btn-primary:hover{ background:#e1c760; border-color:#e1c760; color:#000; }
body.dark .btn-danger{ background:#b00020; border:none; }

/* ---------- Cards ---------- */
body.dark .card{
  background:#0d0d0d !important; color:#f1f1f1 !important;
  border:1px solid #333 !important; box-shadow:0 0 12px rgba(212,175,55,.15) !important;
}
body.dark .card-header{
  background:rgba(212,175,55,.15) !important; color:#FFD700 !important;
  font-weight:600; border-bottom:1px solid #FFD700 !important;
}
body.dark .card-body{ background:#111 !important; color:#f1f1f1 !important; }

/* Entfernt helle Utility-Klassen in Cards, falls gesetzt */
body.dark .card.bg-white,
body.dark .card .bg-white,
body.dark .card-header.bg-white,
body.dark .card-body.bg-white{ background-color:#0d0d0d !important; color:#f1f1f1 !important; }

/* =========================================================
   TABELLEN – robuste Dark-Überschreibung via BS-Variablen
   ========================================================= */
body.dark .table,
body.dark .table.table-striped,
body.dark .table-responsive table,
body.dark .card table,
body.dark #resv-table,
body.dark .table-resv{
  --bs-table-color:#f1f1f1 !important;
  --bs-table-bg:#111 !important;
  --bs-table-border-color:#222 !important;
  --bs-table-striped-bg:#181818 !important;
  --bs-table-striped-color:#f1f1f1 !important;
  --bs-table-hover-bg:rgba(212,175,55,.08) !important;
  --bs-table-hover-color:#f1f1f1 !important;
  background-color:#0d0d0d !important; color:#f1f1f1 !important; border-color:#333 !important;
}
body.dark .table thead th,
body.dark .table-responsive table thead th,
body.dark .card table thead th,
body.dark #resv-table thead th,
body.dark .table-resv thead th{
  background-color:rgba(212,175,55,.15) !important; color:#FFD700 !important;
  border-bottom:2px solid #FFD700 !important; font-weight:600 !important;
}
body.dark .table :is(th,td),
body.dark .table-responsive table :is(th,td),
body.dark .card table :is(th,td),
body.dark #resv-table :is(th,td),
body.dark .table-resv :is(th,td){
  border-color:#222 !important; color:#f1f1f1 !important;
}
body.dark .table > :not(caption) > * > *{
  background-color:var(--bs-table-bg) !important;
  color:var(--bs-table-color) !important;
  border-color:var(--bs-table-border-color) !important;
}

/* ---------- FullCalendar ---------- */
body.dark #calendar{ background:#0d0d0d !important; border-radius:10px; padding:12px; box-shadow:0 0 12px rgba(212,175,55,.25); }
body.dark .fc .fc-toolbar-title{ color:#FFD700 !important; font-weight:700; letter-spacing:.5px; }
body.dark .fc .fc-button-primary{ background:#FFD700 !important; border:none !important; color:#000 !important; font-weight:600; text-transform:uppercase; }
body.dark .fc .fc-button-primary:hover{ background:#e1c760 !important; color:#000 !important; }
body.dark .fc .fc-col-header, body.dark .fc .fc-col-header-cell{ background:#1a1a1a !important; border-color:#333 !important; }
body.dark .fc .fc-col-header-cell-cushion{ color:#FFD700 !important; }
body.dark .fc-theme-standard :is(td,th){ border-color:#333 !important; }
body.dark .fc .fc-daygrid-day{ background:#111 !important; }
body.dark .fc .fc-day-today{ background:rgba(212,175,55,.1) !important; outline:2px solid rgba(212,175,55,.4); outline-offset:-2px; }
body.dark .fc .fc-daygrid-day-number{ color:#f1f1f1 !important; }
body.dark .fc .fc-event{
  background:#FFD700; border:1px solid #FFD700; color:#000; font-weight:600; border-radius:4px; padding:2px 4px;
}

/* ===== Lesbarkeit & Inputs ===== */
.form-text{ color:#cbd5e1 !important; }
.text-muted, .small.text-muted{ color:#aab4c4 !important; }
::placeholder{ color:#9aa5b1 !important; opacity:.9; }
.form-control,.form-select,
input[type="text"],input[type="email"],input[type="date"],
input[type="datetime-local"],input[type="number"],textarea{
  background:#0f1218 !important; color:#f1f5f9 !important; border:1px solid #273142 !important;
}
.form-control:focus,.form-select:focus,textarea:focus{
  background:#121621 !important; color:#fff !important;
  border-color:#d4af37 !important; box-shadow:0 0 0 .2rem rgba(212,175,55,.15) !important;
}

/* Outline-Buttons */
.btn-outline-primary{ color:#ffd700 !important; border-color:#ffd700 !important; }
.btn-outline-primary:hover{ background:#ffd700 !important; color:#000 !important; }
.btn-outline-secondary{ color:#cbd5e1 !important; border-color:#3a4456 !important; }
.btn-outline-secondary:hover{ background:#3a4456 !important; color:#fff !important; }

/* Dropdowns */
.dropdown-menu,.dropdown-menu-dark{ background:#0f1218 !important; border:1px solid #273142 !important; }
.dropdown-item{ color:#e5e7eb !important; }
.dropdown-item:hover,.dropdown-item:focus{ background:rgba(212,175,55,.12) !important; color:#fff !important; }

/* Kleine Bus-Chips */
.bus-chip{ display:inline-flex; align-items:center; gap:.4rem; padding:.12rem .5rem; border-radius:.4rem;
  font-size:.85rem; line-height:1; border:1px solid rgba(255,255,255,.15); }

/* Bus-Farben */
#resv-table .row-bus{ border-left:5px solid var(--bus-color); }
.bus-dot{ display:inline-block; width:10px; height:10px; border-radius:50%; margin-right:.35rem; vertical-align:baseline; }

/* ---------- Mobile generisch ---------- */
@media (max-width:768px){
  body.dark .fc .fc-toolbar-chunk:nth-child(3){ display:none; }
  .table > :not(caption) > * > *{ padding:.45rem .5rem !important; }
}

/* Filterleiste Reservierungen */
#resv-card .card-header form input[type="datetime-local"],
#resv-card .card-header form .form-select{ min-width:150px; }
@media (max-width:1200px){
  #resv-card .card-header form input[type="datetime-local"]{ width:160px !important; }
  #resv-card .card-header form .form-select{ width:160px !important; }
}
@media (max-width:992px){
  #resv-card .card-header form{ gap:.5rem; }
  #resv-card .card-header form input[type="datetime-local"],
  #resv-card .card-header form .form-select{ width:100% !important; }
}

/* === Mobile/UX Extras ================================== */

/* Tabellen-Wrapper (optional, falls verwendet) */
.table-wrap{ position:relative; overflow-x:auto; -webkit-overflow-scrolling:touch; scrollbar-width:thin; }
.table-wrap::before,.table-wrap::after{
  content:""; position:sticky; top:0; width:18px; pointer-events:none; z-index:3; height:100%;
}
.table-wrap::before{ left:0; box-shadow:inset 12px 0 10px -10px rgba(0,0,0,.6); }
.table-wrap::after{ right:0; box-shadow:inset -12px 0 10px -10px rgba(0,0,0,.6); }
.table-wrap thead th{ position:sticky; top:0; z-index:2; }

/* Buttons kompakter & fingerfreundlich */
.btn,.btn-sm{ border-radius:8px; }
.btn-compact{ padding:.2rem .5rem; line-height:1.1; font-size:.9rem; }
@media (hover:hover){ .btn-outline-warning.btn-compact:hover{ filter:brightness(1.08); } }
.dropdown-menu .dropdown-item{ padding:.5rem .8rem !important; }

/* iOS Safe-Area */
@supports (padding:max(0px)){ .table-wrap{ padding-bottom:max(0px, env(safe-area-inset-bottom)); } }

/* FullCalendar XS kleiner */
@media (max-width:576px){
  .fc .fc-toolbar-title{ font-size:1rem; }
  .fc .fc-button{ padding:.25rem .4rem; font-size:.85rem; }
}

/* === Fahrtenbuch – stabil & kompakt ===================== */
#logbook .card-body{ overflow-x:auto; }

/* WICHTIG: Mindestbreite + definierte Spalten → kein „Springen“ */
#logbook .card-body table{
  width:100%; min-width:880px; table-layout:auto; border-collapse:separate; border-spacing:0;
}
#logbook .card-body table th, #logbook .card-body table td{ white-space:nowrap; }
#logbook .card-body table td:nth-child(3), /* Strecke */
#logbook .card-body table td:nth-child(9), /* Notizen */
#logbook .card-body table th:nth-child(3),
#logbook .card-body table th:nth-child(9){ white-space:normal; }

/* NIE letzte Spalte verstecken – entfernt die frühere XS-Regel */
#logbook .card-body table tr > *:last-child{ display:table-cell !important; white-space:nowrap; }

/* Kompakte Zellhöhen */
#logbook .card table th, #logbook .card table td{
  font-size:12px !important; padding:6px 8px !important; line-height:1.2 !important;
}
#logbook .card table th:nth-child(4), #logbook .card table td:nth-child(4){
  width:70px !important; text-align:right !important; white-space:nowrap !important;
}

/* Kopf-Filter: Desktop = flex, mobil = Grid */
@media (min-width:993px){
  #logbook .card-header form{ display:flex !important; gap:.5rem !important; grid-template-columns:none !important; }
}
@media (max-width:992px){
  #logbook .card-header form{
    display:grid !important; grid-template-columns:1fr 1fr; gap:.5rem;
  }
  #logbook .card-header form .form-select,
  #logbook .card-header form input[type="date"],
  #logbook .card-header form input[type="datetime-local"],
  #logbook .card-header form button,
  #logbook .card-header .btn{ width:100% !important; }
  #logbook .card-header .d-flex.align-items-center.gap-2{ flex-wrap:wrap; }
}

/* Optionale Breitenhilfe */
#logbook .card-body table th:nth-child(1){ width:120px; } /* Datum */
#logbook .card-body table th:nth-child(2){ width:140px; } /* Bus   */
#logbook .card-body table th:nth-child(5){ width:160px; } /* Fahrer*/

/* Deaktiviere Table-wrap-Effekte nur im Logbook */
#logbook .table-wrap::before, #logbook .table-wrap::after{ display:none; }
#logbook .table-wrap thead th{ position:static; }

/* === NAVBAR-ÜBERSCHRIFT – mobile kompakt ================= */
@media (max-width:576px){
  body.dark .navbar .container,
  body.dark .navbar .container-fluid{ display:flex; align-items:center; gap:.5rem; overflow-x:hidden; }

  body.dark .navbar-brand{
    display:flex; align-items:center; gap:.4rem; flex:1 1 auto;
    white-space:normal; line-height:1.1; max-width:100%;
    /* deutlich kleiner: */
    font-size: clamp(12px, 3.8vw, 15px);
  }
  body.dark .navbar-brand img, body.dark .navbar-brand svg{ height:18px; width:auto; }

  /* rechte Seite (Login/Logout) kompakt */
  body.dark .navbar .navbar-text{ font-size:12px; }
  body.dark .navbar .btn, body.dark .btn-outline-light{ font-size:12px; padding:4px 8px; }

  /* Tabs kleiner, damit 3 Stück nebeneinander passen */
  .nav-tabs .nav-link{ font-size:14px; padding:.35rem .6rem; }
}
/* Restore Bootstrap tab behavior (prevents hidden tabs from taking space) */
.tab-content > .tab-pane { 
  display: none !important; 
}
.tab-content > .active { 
  display: block !important; 
}
/* Tabs: Inaktive Panes wirklich verstecken (harte Bremse) */
.tab-content > .tab-pane:not(.active) {
  display: none !important;
}

/* Speziell der Kalender-Tab: nie Platz belegen, wenn inaktiv */
#calendarTab:not(.active) {
  display: none !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
}

/* Und wenn aktiv, ganz normal anzeigen */
#calendarTab.active {
  display: block !important;
}
/* ===== Reservierungen-Header (mobil optimiert) ===== */
#resv-card .card-header { row-gap: .5rem; }

#resv-card .resv-title {
  width: 100%;
  text-align: center;
  font-size: clamp(1rem, 2.8vw, 1.25rem);
  letter-spacing: .3px;
}

#resv-card .resv-filter {
  width: 100%;
  display: grid;
  gap: .5rem;
}

@media (min-width: 993px) {
  /* Desktop: Filter in einer Zeile */
  #resv-card .resv-filter {
    grid-template-columns: 180px 170px 190px 190px auto;
    align-items: center;
  }
}

@media (max-width: 992px) and (min-width: 577px) {
  /* Tablets: 2er Raster */
  #resv-card .resv-filter {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 576px) {
  /* Phones: untereinander */
  #resv-card .resv-filter {
    grid-template-columns: 1fr;
  }
}

/* Inputs kompakter */
#resv-card .resv-filter .form-select,
#resv-card .resv-filter input[type="datetime-local"],
#resv-card .resv-filter input[type="date"] {
  height: 36px;
  font-size: .95rem;
}

/* Kleine Buttons */
.btn-xs { padding: .28rem .55rem; font-size: .82rem; line-height: 1.1; border-radius: 6px; }
#resv-card .resv-actions { display: flex; gap: .5rem; }

/* Bus-Legende klein & inline */
.bus-chip-legend {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem 1rem;
  align-items: center;
  font-size: .95rem;
}
.bus-chip-legend .chip {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  white-space: nowrap;    /* kein Umbruch im Chip */
}
.bus-chip-legend .chip .dot {
  width: 10px; height: 10px; border-radius: 50%;
  display: inline-block; vertical-align: middle;
}

/* Versteckte Tabs reservieren keinen Platz (fix gegen „große Lücke“) */
.tab-content > .tab-pane:not(.active) { display: none !important; }

/* Reservierungen: Titel zentriert, Filter-Grid responsiv */
#resv-card .resv-title{
  width:100%;text-align:center;font-size:clamp(1rem,2.8vw,1.25rem);letter-spacing:.3px
}
#resv-card .resv-filter{width:100%;display:grid;gap:.5rem}
@media (min-width:993px){#resv-card .resv-filter{grid-template-columns:180px 170px 190px 190px auto;align-items:center}}
@media (max-width:992px) and (min-width:577px){#resv-card .resv-filter{grid-template-columns:1fr 1fr}}
@media (max-width:576px){#resv-card .resv-filter{grid-template-columns:1fr}}

/* Inputs kompakter */
#resv-card .resv-filter .form-select,
#resv-card .resv-filter input[type="datetime-local"]{height:36px;font-size:.95rem}

/* Mini-Buttons nebeneinander */
.btn-xs{padding:.28rem .55rem;font-size:.82rem;line-height:1.1;border-radius:6px}
#resv-card .resv-actions{display:flex;gap:.5rem}

/* Bus-Legende klein & inline */
.bus-chip-legend{display:flex;flex-wrap:wrap;gap:.35rem 1rem;align-items:center;font-size:.95rem}
.bus-chip-legend .chip{display:inline-flex;align-items:center;gap:.35rem;white-space:nowrap}
.bus-chip-legend .chip .dot{width:10px;height:10px;border-radius:50%;display:inline-block}

/* Versteckte Tabs reservieren keinen Platz (gegen die „Kalender-Lücke“) */
.tab-content > .tab-pane:not(.active){display:none !important}

/* =======================
   RESERVIERUNGEN – MOBILE
   2-Spalten-Paare je Reihe
   ======================= */
@media (max-width: 576px) {
  /* Kopf ausblenden, Zeilen als Grid */
  #resv-table thead { display: none; }

  #resv-table tbody tr {
    display: grid;
    grid-template-columns: 1fr 1fr;      /* links | rechts */
    gap: .35rem .75rem;
    padding: .6rem .65rem !important;
    border-bottom: 1px solid #222;
    font-size: 13.5px;                   /* kompakter */
    line-height: 1.25;
  }

  /* Zellen ent-tablen & kompakt */
  #resv-table tbody td {
    display: block;
    padding: 0 !important;
    border: 0 !important;
    text-align: left !important;
    white-space: normal !important;
  }

  /* Labels je Feld (statt thead) */
  #resv-table tbody td::before {
    display: block;
    font-size: .72rem;
    color: #9aa5b1;
    text-transform: uppercase;
    letter-spacing: .03em;
    margin-bottom: 2px;
    content: "";
  }
  #resv-table tbody td:nth-child(1)::before { content: "Bus"; }
  #resv-table tbody td:nth-child(2)::before { content: "Team"; }
  #resv-table tbody td:nth-child(3)::before { content: "Titel"; }
  #resv-table tbody td:nth-child(4)::before { content: "Ort"; }
  #resv-table tbody td:nth-child(5)::before { content: "Beginn"; }
  #resv-table tbody td:nth-child(6)::before { content: "Ende"; }
  #resv-table tbody td:nth-child(7)::before { content: "Von"; }
  #resv-table tbody td:nth-child(8)::before { content: "Aktion"; }

  /* Pärchen-Anordnung:
     1/2 = Bus | Team
     3/4 = Titel | Ort
     5/6 = Beginn | Ende
     7/8 = Von | Aktion */
  #resv-table tbody td:nth-child(1),
  #resv-table tbody td:nth-child(3),
  #resv-table tbody td:nth-child(5),
  #resv-table tbody td:nth-child(7) { grid-column: 1; }

  #resv-table tbody td:nth-child(2),
  #resv-table tbody td:nth-child(4),
  #resv-table tbody td:nth-child(6),
  #resv-table tbody td:nth-child(8) { grid-column: 2; }

  /* Bus-Name & Dot hübsch */
  #resv-table td.bus { display: flex; align-items: center; gap: .4rem; }
  #resv-table td.bus .bus-dot { flex: 0 0 10px; height: 10px; border-radius: 50%; }

  /* Aktions-Button kleiner */
  #resv-table td.act .btn,
  #resv-table td.act .btn-compact,
  #resv-table td.act .btn-sm {
    padding: .25rem .5rem !important;
    font-size: .8rem !important;
    line-height: 1.1 !important;
  }
}

/* etwas kompaktes Layout auch unter 768px */
@media (max-width: 768px) {
  #resv-table tbody tr { font-size: 14px; }
}

/* ===== Reservierungen – Toolbar fix Desktop/Mobil ===== */
#resv-card .card-header#resv-toolbar{
  display:flex; align-items:center; gap:.75rem; flex-wrap:wrap;
}
#resv-card #resv-toolbar > strong{ margin:0; }

#resv-card .toolbar-actions{
  margin-left:auto;
  display:flex; align-items:center; gap:.5rem; flex-wrap:wrap;
}

/* Filter-Form: sinnvolle Breiten */
#resv-card .resv-filter-form{
  display:flex; align-items:center; gap:.5rem; flex-wrap:wrap;
}
#resv-card .resv-filter-form .form-select,
#resv-card .resv-filter-form .form-control{
  width:auto; min-width:150px;
}
@media (min-width:1200px){
  #resv-card .resv-filter-form{ flex-wrap:nowrap; }
  #resv-card .toolbar-actions{ flex-wrap:nowrap; }
  #resv-card .resv-filter-form .form-select,
  #resv-card .resv-filter-form .form-control{ min-width:170px; }
}

/* ===== Reservierungen – Karten mittig auf Mobil ===== */
@media (max-width: 768px){
  /* Umhüller, die wir in dashboard.php mit .resv-cards versehen haben */
  #resv-card .resv-cards{
    max-width: 760px;         /* 2-Spalten-Grid bleibt hübsch */
    margin: 0 auto;           /* sauber mittig */
    padding-left: .25rem;
    padding-right: .25rem;
  }
}

/* Kleineres Typo-Tuning für die Karten */
@media (max-width: 576px){
  .resv-card-grid .cell .label{ font-size:.8rem; letter-spacing:.02em; }
  .resv-card-grid .cell .value{ font-size:1rem; }
  .resv-card-grid .cell .value strong{ font-size:1.05rem; }
}

/* === RESV-CARDS: bündig und nicht abgeschnitten (mobile + desktop) === */

/* Card-Body selbst: keine seitlichen Polster, kein Overflow */
#resv-card .card-body{
  padding-left: 0 !important;
  padding-right: 0 !important;
  overflow-x: hidden;
}

/* Der Wrapper der Karten: symmetrisches Innenpadding, keine negativen/externen Margins */
#resv-card .resv-cards{
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 12px !important;
  padding-right: 12px !important;
  max-width: 100%;
  box-sizing: border-box;
}

/* Einzelne Karte niemals nach außen schieben */
#resv-card .resv-card{
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* Grid in der Karte darf schrumpfen und bleibt 100% breit */
.resv-card-grid{
  width: 100%;
  box-sizing: border-box;
  grid-template-columns: minmax(0,1fr) minmax(0,1fr);
}

/* Inhalte dürfen umbrechen, damit nichts übersteht */
.resv-card-grid .cell{ min-width: 0; }
.resv-card-grid .value{ overflow-wrap: anywhere; word-break: break-word; }

/* Optional: auf kleinen Screens minimal enger, zentriert unter der gelben Linie */
@media (max-width: 768px){
  #resv-card .resv-cards{ padding-left: 10px !important; padding-right: 10px !important; }
}

/* Feintuning: Karten minimal weiter nach links (ohne Abschneiden) */
@media (max-width: 600px){
  #resv-card .resv-cards{
    padding-left: 4px !important;   /* vorher 10–12px */
    padding-right: 12px !important; /* rechts lassen wir etwas Luft */
  }
  /* ganz leicht ausgleichen */
  #resv-card .resv-card{ margin-left: -2px; }
}

/* === Kalender (mobil) – kompakter ==================================== */
@media (max-width: 576px) {
  /* obere Filterreihe: Select + HEUTE kleiner */
  #calendarTab .form-select { font-size: 13px; padding: .4rem .6rem; }
  #calendarTab .btn { font-size: 12px; padding: .35rem .6rem; border-radius: 6px; }

  /* Hinweistext – sehr klein, unter die Zeile umbrechen */
  #calendarTab .ms-auto.text-muted.small {
    order: 3;               /* springt in die nächste Zeile */
    flex: 1 1 100%;
    font-size: 12px !important;
    line-height: 1.2;
    margin-top: .25rem;
    color: #aab4c4 !important;
    white-space: normal;    /* Umbruch erlauben */
  }
}

/* FullCalendar – Dark + Gold Akzente (Liste/Woche/Tag) */
body.dark .fc,
body.dark .fc-theme-standard .fc-scrollgrid,
body.dark .fc-list,
body.dark .fc-list-table {
  background: #0f1013 !important;
  color: #f1f1f1 !important;
  border-color: #2a2e37 !important;
}

/* Toolbar: Titel/Buttons kompakter & passend */
body.dark .fc .fc-toolbar-title { color: #FFD700 !important; font-weight: 700; }
body.dark .fc .fc-button { background: #1a1d24; border: 1px solid #3a3f4a; color: #e5e7eb; }
body.dark .fc .fc-button:hover { filter: brightness(1.1); }
body.dark .fc .fc-button-primary { background: #FFD700 !important; border: none !important; color: #000 !important; }
@media (max-width: 576px) {
  body.dark .fc .fc-toolbar-title { font-size: 14px; }
  body.dark .fc .fc-button       { padding: .25rem .4rem; font-size: 12px; }
}

/* List-Ansicht Kopf (Tag/Datum) */
body.dark .fc .fc-list-day-cushion {
  background: rgba(212,175,55,.12) !important;
  border-top: 1px solid rgba(212,175,55,.35) !important;
  border-bottom: 1px solid rgba(212,175,55,.35) !important;
  color: #FFD700 !important;
  font-weight: 700;
}

/* List-Events */
body.dark .fc-list-event,
body.dark .fc-list-event td {
  background: #111418 !important;
  border-color: #232832 !important;
}
body.dark .fc-list-event:hover td { background: #141923 !important; }

/* Zeit/Beschreibung kleiner, dichter */
body.dark .evt-time   { font-weight: 700; }
body.dark .evt-who    { opacity: .85; }
body.dark .evt-what   { font-weight: 700; }
body.dark .evt-where  { opacity: .9; }

/* Zweizeiliges, kompaktes Layout im List-Event */
body.dark .evt-wrap { display: grid; grid-template-columns: 1fr; gap: 2px; }
body.dark .evt-row { display:flex; gap:.5rem; align-items:baseline; flex-wrap:wrap; }
body.dark .evt-bus { font-weight: 700; color:#FFD700; }
@media (max-width: 576px) {
  body.dark .evt-row { font-size: 13px; }
}

@media (max-width: 576px) {
  body.dark #calendarTab h5,              /* falls du dort eine h5 nutzt */
  body.dark .fc .fc-toolbar-title { 
    font-size: 14px !important; 
  }
}
/* ===== Kalender: kompakter, dunkler, ohne doppelte Zeit ===== */

/* Abstand direkt unter den Tabs kleiner */
.nav-tabs + .tab-content { padding-top: .5rem !important; }

/* Hinweistext rechts: wirklich klein und unaufdringlich, auch ausserhalb XS */
#calendarTab > .d-flex .text-muted.small {
  font-size: 12px !important;
  line-height: 1.25 !important;
  white-space: normal !important;
  margin-top: .25rem !important;
  color: #aab4c4 !important;
}

/* Filter/Buttons im Kalender generell kompakter */
#calendarTab .form-select { font-size: 13px; padding: .4rem .6rem; }
#calendarTab .btn        { font-size: 12px; padding: .35rem .6rem; border-radius: 6px; }

/* FullCalendar: Listen-Header (Tag/Datum) in Dark+Gold, Links nicht grell */
body.dark .fc-theme-standard .fc-list-day-cushion,
body.dark .fc .fc-list-day-cushion{
  background: #14161b !important;
  border-top: 1px solid rgba(212,175,55,.35) !important;
  border-bottom: 1px solid rgba(212,175,55,.35) !important;
}
body.dark .fc .fc-list-day-text,
body.dark .fc .fc-list-day-side,
body.dark .fc .fc-list-day-cushion a{
  color: #FFD700 !important;
  text-decoration: none !important;
}

/* FullCalendar: Eventzeilen dunkler und einheitliche Ränder */
body.dark .fc-list-event,
body.dark .fc-list-event td { background:#0f1218 !important; border-color:#232832 !important; }
body.dark .fc-list-event:hover td { background:#141923 !important; }

/* WICHTIG: in der List-Ansicht die separate Zeitspalte ausblenden
   (wir rendern die Zeit bereits in eventContent → sonst doppelt) */
body.dark .fc .fc-list-event-time { display:none !important; }
body.dark .fc .fc-list-event-title { width:100% !important; }

/* Unsere 2-Zeilen-Darstellung minimal kleiner */
body.dark .evt-wrap { display:grid; grid-template-columns:1fr; gap:2px; }
body.dark .evt-row { display:flex; gap:.5rem; align-items:baseline; flex-wrap:wrap; }
body.dark .evt-time { font-weight:700; }
body.dark .evt-bus  { font-weight:700; color:#FFD700; }
@media (max-width:576px){ body.dark .evt-row{ font-size:13px; } }

/* Toolbar-Titel + Buttons noch einen Tick kleiner auf Phones */
@media (max-width:576px){
  body.dark .fc .fc-toolbar-title { font-size:14px !important; }
  body.dark .fc .fc-button       { padding:.25rem .4rem; font-size:12px; }
}
/* ------------ Kalender-Toolbar mobil kompakt + Hinweis unten */
@media (max-width: 768px){
  #calendarTab .cal-toolbar { flex-wrap: wrap; }
  #calendarTab .cal-toolbar .form-select { font-size:13px; height:34px; padding:.35rem .55rem; }
  #calendarTab .cal-toolbar .btn        { font-size:12px; padding:.3rem .5rem; border-radius:6px; }

  /* Hinweis unter die Reihe, sehr klein */
  #calendarTab .cal-toolbar .help{
    order: 3;                /* in die nächste Zeile */
    flex: 1 1 100%;
    font-size: 12px !important;
    line-height: 1.25;
    margin-top: .25rem;
    white-space: normal !important;
    color: #aab4c4 !important;
    text-align: left;
  }
}

/* ------------ FullCalendar List-Ansicht dunkel, lesbar */
body.dark #calendar .fc,
body.dark #calendar .fc-theme-standard .fc-scrollgrid,
body.dark #calendar .fc-list,
body.dark #calendar .fc-list-table{
  background:#0f1013 !important;
  color:#f1f1f1 !important;
  border-color:#2a2e37 !important;
}

/* Toolbar (Titel + Pfeile) kleiner */
@media (max-width: 576px){
  body.dark #calendar .fc .fc-toolbar-title{ font-size:14px !important; }
  body.dark #calendar .fc .fc-button        { padding:.25rem .4rem; font-size:12px; }
}

/* Tageskopf (Tag/Datum) – dunkel mit Gold-Akzent */
body.dark #calendar .fc-list-day-cushion{
  background:rgba(212,175,55,.12) !important;
  border-top:1px solid rgba(212,175,55,.35) !important;
  border-bottom:1px solid rgba(212,175,55,.35) !important;
  color:#FFD700 !important;
  font-weight:700;
}

/* Event-Zeilen dunkel, Hover leicht */
body.dark #calendar .fc-list-event,
body.dark #calendar .fc-list-event td{
  background:#111418 !important;
  border-color:#232832 !important;
}
body.dark #calendar .fc-list-event:hover td{
  background:#141923 !important;
}

/* Linke Zeitspalte & Punkt ausblenden (wir rendern Zeit selbst) */
body.dark #calendar .fc-list-event-time,
body.dark #calendar .fc-list-event-graphic{
  display:none !important;
}

/* Unser kompaktes 2-Zeilen-Layout innerhalb der Event-Zeile */
body.dark #calendar .evt-wrap{ display:grid; grid-template-columns:1fr; gap:2px; }
body.dark #calendar .evt-row { display:flex; gap:.5rem; align-items:baseline; flex-wrap:wrap; }
body.dark #calendar .evt-time{ font-weight:700; }
body.dark #calendar .evt-who { opacity:.9; }
body.dark #calendar .evt-bus { font-weight:700; color:#FFD700; }
body.dark #calendar .evt-what{ font-weight:700; }
body.dark #calendar .evt-where{ opacity:.95; }
@media (max-width:576px){
  body.dark #calendar .evt-row{ font-size:13px; }
}

/* Monat/Week/Day Gitter (falls genutzt) farblich passend */
body.dark #calendar .fc .fc-col-header,
body.dark #calendar .fc .fc-col-header-cell{ background:#1a1a1a !important; border-color:#333 !important; }
body.dark #calendar .fc .fc-col-header-cell-cushion{ color:#FFD700 !important; }
body.dark #calendar .fc-theme-standard :is(td,th){ border-color:#333 !important; }
body.dark #calendar .fc .fc-daygrid-day{ background:#111 !important; }
body.dark #calendar .fc .fc-day-today{
  background:rgba(212,175,55,.1) !important;
  outline:2px solid rgba(212,175,55,.4); outline-offset:-2px;
}
/* -------- Kalender-Toolbar mobil kompakt + Hinweis unten ---------- */
@media (max-width: 768px){
  #calendarTab .cal-toolbar { flex-wrap: wrap; }
  #calendarTab .cal-toolbar .form-select { font-size:13px; height:34px; padding:.35rem .55rem; }
  #calendarTab .cal-toolbar .btn        { font-size:12px; padding:.3rem .5rem; border-radius:6px; }

  #calendarTab .cal-toolbar .help{
    order: 3;            /* in nächste Zeile */
    flex: 1 1 100%;
    font-size: 12px !important;
    line-height: 1.25;
    margin-top: .25rem;
    white-space: normal !important;
    color: #aab4c4 !important;
    text-align: left;
  }
}

/* -------- FullCalendar List-Ansicht dunkel & lesbar ---------------- */
body.dark #calendar .fc,
body.dark #calendar .fc-theme-standard .fc-scrollgrid,
body.dark #calendar .fc-list,
body.dark #calendar .fc-list-table{
  background:#0f1013 !important;
  color:#f1f1f1 !important;
  border-color:#2a2e37 !important;
}

/* Titel/Buttons kleiner auf Handy */
@media (max-width: 576px){
  body.dark #calendar .fc .fc-toolbar-title{ font-size:14px !important; }
  body.dark #calendar .fc .fc-button        { padding:.25rem .4rem; font-size:12px; }
}

/* Tageskopf (Tag/Datum) dunkel mit Gold */
body.dark #calendar .fc-list-day-cushion{
  background:rgba(212,175,55,.12) !important;
  border-top:1px solid rgba(212,175,55,.35) !important;
  border-bottom:1px solid rgba(212,175,55,.35) !important;
  color:#FFD700 !important;
  font-weight:700;
}

/* Eventzeilen dunkel */
body.dark #calendar .fc-list-event,
body.dark #calendar .fc-list-event td{
  background:#111418 !important;
  border-color:#232832 !important;
}
body.dark #calendar .fc-list-event:hover td{ background:#141923 !important; }

/* Linke Zeitspalte & Punkt ausblenden (Zeit rendern wir selbst) */
body.dark #calendar .fc-list-event-time,
body.dark #calendar .fc-list-event-graphic{ display:none !important; }

/* Unser 2-Zeilen Layout: 1) Uhrzeit|Wer  2) [KFZ]|Was — Wo */
body.dark #calendar .evt-wrap{ display:grid; grid-template-columns:1fr; gap:2px; }
body.dark #calendar .evt-row { display:flex; gap:.5rem; align-items:baseline; flex-wrap:wrap; }
body.dark #calendar .evt-time{ font-weight:700; }
body.dark #calendar .evt-who { opacity:.9; }
body.dark #calendar .evt-bus { font-weight:700; color:#FFD700; }
body.dark #calendar .evt-what{ font-weight:700; }
body.dark #calendar .evt-where{ opacity:.95; }
@media (max-width:576px){ body.dark #calendar .evt-row{ font-size:13px; } }

/* Monat/Woche/Tag Gitter (falls genutzt) passend färben */
body.dark #calendar .fc .fc-col-header,
body.dark #calendar .fc .fc-col-header-cell{ background:#1a1a1a !important; border-color:#333 !important; }
body.dark #calendar .fc .fc-col-header-cell-cushion{ color:#FFD700 !important; }
body.dark #calendar .fc-theme-standard :is(td,th){ border-color:#333 !important; }
body.dark #calendar .fc .fc-daygrid-day{ background:#111 !important; }
body.dark #calendar .fc .fc-day-today{
  background:rgba(212,175,55,.1) !important;
  outline:2px solid rgba(212,175,55,.4); outline-offset:-2px;
}

/* ---------- FullCalendar List: Chiefs-Dark --------------------- */
body.dark #calendar .fc,
body.dark #calendar .fc-theme-standard .fc-scrollgrid,
body.dark #calendar .fc-list,
body.dark #calendar .fc-list-table{
  background:#0f1013 !important;
  color:#f1f1f1 !important;
  border-color:#2a2e37 !important;
}

/* Titel/Buttons kompakt */
@media (max-width:576px){
  body.dark #calendar .fc .fc-toolbar-title{ font-size:14px !important; }
  body.dark #calendar .fc .fc-button{ padding:.25rem .4rem; font-size:12px; }
}

/* Tageskopf (Tag/Datum) */
body.dark #calendar .fc-list-day-cushion{
  background:#151515 !important;
  border-top:1px solid rgba(212,175,55,.35) !important;
  border-bottom:1px solid rgba(212,175,55,.35) !important;
  color:#FFD700 !important;
  font-weight:700;
}
body.dark #calendar .fc-list-day-cushion a{
  color:#FFD700 !important;
  text-decoration: underline;
}

/* Event-Zeilen */
body.dark #calendar .fc-list-event,
body.dark #calendar .fc-list-event td{
  background:#111418 !important;
  border-color:#232832 !important;
  color:#f1f1f1 !important;            /* sicherheitshalber */
}
body.dark #calendar .fc-list-event:hover td{ background:#141923 !important; }

/* Standard-Listengrafik und linke Zeitspalte nicht doppelt zeigen */
body.dark #calendar .fc-list-event-time,
body.dark #calendar .fc-list-event-graphic{ display:none !important; }

/* Unser 2-Zeilen Layout + Farbdot */
body.dark #calendar .evt-wrap{ display:grid; grid-template-columns:1fr; gap:2px; }
body.dark #calendar .evt-row{ display:flex; gap:.5rem; align-items:baseline; flex-wrap:wrap; }
body.dark #calendar .evt-time{ font-weight:700; }
body.dark #calendar .evt-who{ opacity:.9; }
body.dark #calendar .evt-bus{ font-weight:700; color:#FFD700; }
body.dark #calendar .evt-what{ font-weight:700; }
body.dark #calendar .evt-where{ opacity:.95; }
body.dark #calendar .evt-dot{
  width:10px; height:10px; border-radius:50%; display:inline-block; margin-right:.15rem;
}
@media (max-width:576px){ body.dark #calendar .evt-row{ font-size:13px; } }

/* Monat/Woche/Tag Gitter (falls genutzt) */
body.dark #calendar .fc .fc-col-header,
body.dark #calendar .fc .fc-col-header-cell{ background:#1a1a1a !important; border-color:#333 !important; }
body.dark #calendar .fc .fc-col-header-cell-cushion{ color:#FFD700 !important; }
body.dark #calendar .fc-theme-standard :is(td,th){ border-color:#333 !important; }
body.dark #calendar .fc .fc-daygrid-day{ background:#111 !important; }
body.dark #calendar .fc .fc-day-today{
  background:rgba(212,175,55,.1) !important;
  outline:2px solid rgba(212,175,55,.4); outline-offset:-2px;
}
/* List-Kopf: Datum unter dem Tag linksbündig */
body.dark #calendar .fc-list-day-cushion{
  display:block !important;
  padding-top:.55rem; padding-bottom:.55rem;
}

body.dark #calendar .fc .fc-list-day-text{
  display:block;                /* "Montag" */
  font-weight:700;
  margin:0 0 .15rem 0;
  color:#FFD700 !important;
}

body.dark #calendar .fc .fc-list-day-side-text{
  display:block;                /* "29. September 2025" */
  font-weight:700;
  color:#FFD700 !important;
}

/* Event-Zeilen etwas dichter, damit KFZ direkt beim Dot sitzt */
body.dark #calendar .evt-row{ line-height:1.25; }
body.dark #calendar .evt-whatrow{ margin-top:2px; }

/* FC-Heute-Button generell ausblenden – wir nutzen den eigenen oben */
#calendar .fc .fc-today-button{ display:none !important; }

/* Kopf der List-Ansicht stacken + links */
body.dark #calendar .fc .fc-list-day-cushion{
  display:block !important;              /* statt flex */
  padding-top:.55rem; padding-bottom:.55rem;
}
body.dark #calendar .fc .fc-list-day-text{
  display:block !important;              /* Montag */
  margin:0 0 .15rem 0;
  font-weight:700; color:#FFD700 !important;
}
body.dark #calendar .fc .fc-list-day-side-text{
  display:block !important;              /* 29. September 2025 */
  margin:0; font-weight:700; color:#FFD700 !important;
}
/* kompakt, 4 Zeilen untereinander */
body.dark #calendar .evt-stack{ display:grid; gap:2px; }
body.dark #calendar .evt-row{ line-height:1.25; }

/* Zeile 2: Dot + KFZ nebeneinander */
body.dark #calendar .evt-bus-row{ display:flex; align-items:center; gap:.45rem; }
body.dark #calendar .evt-dot{
  width:.7rem; height:.7rem; border-radius:50%; display:inline-block; flex:0 0 .7rem;
}
body.dark #calendar .evt-bus{ font-weight:700; color:#FFD700; }

/* Feines Typo-Tuning */
body.dark #calendar .evt-time{ font-weight:700; }
body.dark #calendar .evt-what{ font-weight:700; }
body.dark #calendar .evt-who{ opacity:.9; }

/* FullCalendar – List-Header: Wochentag + Datum einzeilig, links/rechts */
#calendar .fc .fc-list-day-cushion{
  display:flex !important;
  align-items:baseline;
  justify-content:space-between;   /* Montag | 29. September 2025 */
  white-space:nowrap;
  padding-top:.55rem; padding-bottom:.55rem;
}
#calendar .fc .fc-list-day-text,
#calendar .fc .fc-list-day-side-text{
  font-size:clamp(13px, 3.6vw, 18px) !important;  /* wird kleiner statt umzubrechen */
  margin:0;
  font-weight:700; color:#FFD700 !important;
}
/* 4 Zeilen untereinander */
#calendar .evt-stack{ display:grid !important; gap:2px; }
#calendar .evt-row{ display:block !important; line-height:1.25; }

/* Zeile 2: Punkt + Kennzeichen in **einer** Zeile */
#calendar .evt-bus-row{
  display:flex !important;
  align-items:center !important;
  gap:.45rem !important;
}
#calendar .evt-dot{
  width:.7rem; height:.7rem; border-radius:50%;
  display:inline-block; flex:0 0 .7rem;
}

/* Typo */
#calendar .evt-time{ font-weight:700; }
#calendar .evt-bus { font-weight:700; color:#FFD700; }
#calendar .evt-what{ font-weight:700; }
#calendar .evt-who { opacity:.9; }

/* Einzeilig: Tag | Datum Kopf */
body.dark .fc .fc-list-day-cushion{
  display:flex; align-items:center; justify-content:space-between;
  gap:.75rem; white-space:nowrap;
  background:#141414 !important; border-top:1px solid rgba(212,175,55,.35) !important;
  border-bottom:1px solid rgba(212,175,55,.35) !important; color:#FFD700 !important;
}
@media (max-width:576px){
  body.dark .fc .fc-list-day-cushion{ font-size:14px; }
}

/* List-Event: 4 feste Zeilen */
body.dark .fc-list-event, body.dark .fc-list-event td{ background:#0f1115 !important; border-color:#262a33 !important; }
.evt-row{ display:block; margin:2px 0; line-height:1.25; }
.evt-time{ font-weight:700; }
.evt-busline{ display:flex; align-items:center; gap:.5rem; }
.evt-dot{ width:12px; height:12px; border-radius:50%; display:inline-block; }
.evt-bus{ font-weight:700; color:#FFD700; }
.evt-what{ font-weight:700; }
.evt-where{ opacity:.9; }
.evt-who{ opacity:.85; }

@media (max-width:576px){
  .evt-row{ font-size:13px; }
}

/* “Heute”-Button von FullCalendar komplett ausblenden (mobil & Desktop) */
#calendar .fc .fc-today-button{ display:none !important; }
/* Bus-Zeile: Dot + [KFZ] immer in EINER Zeile */
#calendar .evt-busline{
  display:flex !important;
  align-items:center !important;
  gap:.45rem !important;
  flex-wrap:nowrap !important;       /* kein Zeilenumbruch */
}
#calendar .evt-bus{
  white-space:nowrap !important;     /* [TS-EH 1973] bleibt zusammen */
  font-weight:700;
  color:#FFD700;
}
#calendar .evt-dot{
  flex:0 0 12px !important;
  width:12px !important;
  height:12px !important;
  border-radius:50% !important;
  display:inline-block !important;
}
/* List-Header: Montag | 29. September 2025 in einer Zeile */
#calendar .fc .fc-list-day-cushion{
  display:flex !important;
  align-items:baseline !important;
  justify-content:space-between !important;
  gap:.75rem !important;
  white-space:nowrap !important;
}
#calendar .fc .fc-list-day-text,
#calendar .fc .fc-list-day-side-text{
  margin:0 !important;
  font-weight:700 !important;
  color:#FFD700 !important;
  font-size:clamp(13px,3.6vw,18px) !important;  /* wird kleiner statt umzubrechen */
}
/* KM Start/Ende: immer nebeneinander, auch auf Handy */
#tripForm .km-row{ display:flex; gap:.5rem; }
#tripForm .km-row > .col-6{ flex:1 1 0; min-width:0; }
#tripForm .km-row label{ white-space:nowrap; }   /* verhindert Umbruch der Labels */
/* Fahrtenbuch-Tabelle: Kartenlayout auf Handy (≤ 768px) */
@media (max-width: 768px){
  #logbook .card-body table thead{ display:none; }       /* Kopf ausblenden */

  #logbook .card-body table tbody tr{
    display:grid;
    grid-template-columns: 1fr auto; /* links Inhalt | rechts Aktion */
    gap:.35rem .75rem;
    padding:.6rem .65rem;
    border-bottom:1px solid #222;
  }

  #logbook .card-body table tbody td{
    padding:0 !important; border:0 !important; background:transparent !important;
  }

  /* Zeile 1: Datum / Bus (Bus aus 2. Spalte wird in Datum eingeschoben) */
  #logbook .card-body table tbody td.lb-date{
    grid-column:1;
    font-weight:600;
  }
  #logbook .card-body table tbody td.lb-date::after{
    content:" / " attr(data-bus);
    margin-left:.35rem;
    font-weight:600;
    opacity:.95;
  }
  /* den originalen Bus auf Handy ausblenden */
  #logbook .card-body table tbody td:nth-child(2){ display:none; }

  /* Zeile 2: Strecke */
  #logbook .card-body table tbody td.lb-route{ grid-column:1; }

  /* Zeile 3: KM / Fahrer (Fahrer aus 5. Spalte wird in KM eingeschoben) */
  #logbook .card-body table tbody td.lb-km{
    grid-column:1;
    font-weight:600;
  }
  #logbook .card-body table tbody td.lb-km::after{
    content:" / " attr(data-user);
    margin-left:.35rem;
    font-weight:500;
    opacity:.9;
  }
  /* den originalen Fahrer auf Handy ausblenden */
  #logbook .card-body table tbody td:nth-child(5){ display:none; }

  /* Aktion ganz rechts, zentriert zur Zeilenhöhe */
  #logbook .card-body table tbody td:nth-child(6){
    grid-column:2; align-self:center; white-space:nowrap;
  }
}


/* Fahrtenbuch – mobil: kein Horizontalscroll, 3 Zeilen Layout */
@media (max-width: 768px){

  /* Weg mit der erzwungenen Mindestbreite */
  #logbook .card-body table{
    min-width: 0 !important;
    width: 100% !important;
    table-layout: auto !important;
  }

  /* Kopf ausblenden, Zeilen als Grid */
  #logbook .card-body thead{ display:none !important; }

  #logbook .card-body tbody tr{
    display: grid !important;
    grid-template-columns: 1fr auto;   /* links Inhalt | rechts Aktion */
    align-items: start;
    gap: .35rem .75rem;
    padding: .6rem .65rem !important;
    border-bottom: 1px solid #222;
  }

  /* Zellen ent-tablen & umbrechen erlauben */
  #logbook .card-body tbody td{
    display:block !important;
    padding:0 !important;
    border:0 !important;
    text-align:left !important;
    white-space:normal !important;
    overflow-wrap:anywhere;
    word-break:break-word;
  }

  /* Spalten "Bus" (2) und "Fahrer" (5) ausblenden – stehen als Data-Attrs bereit */
  #logbook .card-body tbody td:nth-child(2),
  #logbook .card-body tbody td:nth-child(5){
    display:none !important;
  }

  /* Zeile 1: Datum / Bus (Bus aus data-bus anhängen) */
  #logbook .card-body tbody td.lb-date::after{
    content:" / " attr(data-bus);
    color:#FFD700;
    font-weight:600;
  }

  /* Zeile 2: Strecke (volle Breite) + optionale Getankt/Notizen darunter */
  #logbook .card-body tbody td.lb-route{
    grid-column: 1 / -1;     /* über beide Spalten */
  }
  #logbook .card-body tbody td.lb-route > strong{ display:block; }

  /* Zeile 3: KM / Fahrer (Fahrer aus data-user anhängen) */
  #logbook .card-body tbody td.lb-km::after{
    content:"  /  " attr(data-user);
    margin-left:.35rem;
    opacity:.9;
  }

  /* Aktion stets ganz rechts */
  #logbook .card-body tbody td:last-child{
    grid-column: 2;
    justify-self: end;
    white-space:nowrap !important;
  }
}
/* HEUTE von FullCalendar ausblenden (wir haben den eigenen Button) */
#calendar .fc .fc-today-button { display: none !important; }

/* List-Kopf: Tag | Datum EINZEILIG, kein Umbruch */
#calendar .fc .fc-list-day-cushion{
  display:flex !important;
  align-items:baseline;
  justify-content:space-between;
  gap:.75rem;
  white-space:nowrap;
  padding-top:.55rem; padding-bottom:.55rem;
  background:#141414 !important;
  border-top:1px solid rgba(212,175,55,.35) !important;
  border-bottom:1px solid rgba(212,175,55,.35) !important;
  color:#FFD700 !important;
}
#calendar .fc .fc-list-day-cushion :is(.fc-list-day-text,.fc-list-day-side-text){
  font-size:clamp(13px, 2.2vw, 18px) !important;
  margin:0; font-weight:700; color:#FFD700 !important;
}

/* Doppelte Zeit in der List-Ansicht verhindern (wir rendern sie selbst) */
#calendar .fc-list-event-time,
#calendar .fc-list-event-graphic { display:none !important; }

/* 4-Zeilen-Layout */
#calendar .evt-stack{ display:grid !important; gap:2px; }
#calendar .evt-row{ display:block !important; line-height:1.25; }
#calendar .evt-bus-row{
  display:flex !important; align-items:center !important; gap:.45rem !important;
}
#calendar .evt-dot{
  width:.7rem; height:.7rem; border-radius:50%;
  display:inline-block; flex:0 0 .7rem;
}
#calendar .evt-bus{ font-weight:700; color:#FFD700; }
#calendar .evt-time, #calendar .evt-what{ font-weight:700; }

/* Monat/Woche besser lesbar, keine doppelte Zeit */
#calendar .fc-daygrid-event .fc-event-time { display:none; }   /* verhindert „08:00“ + Text doppelt */
#calendar .fc .fc-event{
  background:#FFD700; border:1px solid #FFD700; color:#000; font-weight:600;
  border-radius:4px; padding:2px 4px;
}

/* Mobile Typo leicht kleiner */
@media (max-width:576px){
  #calendar .fc .fc-toolbar-title{ font-size:14px !important; }
  #calendar .fc .fc-button{ padding:.25rem .4rem; font-size:12px; }
  #calendar .evt-row{ font-size:13px; }
}

/* Hinweiszeile rechts oben im Kalender wirklich klein halten */
#calendarTab .cal-toolbar .help{
  font-size:12px !important; line-height:1.25; color:#aab4c4 !important;
}

/* Fahrtenbuch: keine horizontale Scrollbar, Kopf passt zur Zeile */
#logbook .card-body { overflow-x: hidden; }

#logbook .card-body table{
  width:100%;
  min-width:0;              /* darf schrumpfen */
  table-layout:fixed;       /* stabile Spaltenbreiten */
  border-collapse:separate;
  border-spacing:0;
}

/* Standard: alles einzeilig … */
#logbook .card-body table th,
#logbook .card-body table td{
  white-space:nowrap;
}

/* … außer "Strecke": die darf umbrechen */
#logbook .card-body table th:nth-child(3),
#logbook .card-body table td:nth-child(3){
  white-space:normal;
  overflow-wrap:anywhere;   /* lange Texte sauber umbrechen */
}

/* optionale Fixbreiten für Ruhe */
#logbook .card-body table th:nth-child(1){ width:120px; } /* Datum  */
#logbook .card-body table th:nth-child(2){ width:150px; } /* Bus    */
#logbook .card-body table th:nth-child(4){ width:80px;  } /* KM     */
#logbook .card-body table th:nth-child(5){ width:160px; } /* Fahrer */
#logbook .card-body table th:nth-child(6){ width:90px;  } /* Aktion */

/* Aktion rechtsbündig wie im Kopf */
#logbook .card-body table th:nth-child(6),
#logbook .card-body table td:nth-child(6){
  text-align:right;
}

/* Loginseite mittig ausrichten */
body.dark.login-page main.container{
  min-height: 100vh;            /* volle Höhe, da keine Navbar */
  display: flex;                 /* Flex-Container */
  align-items: center;           /* vertikal zentrieren */
  justify-content: center;       /* horizontal zentrieren */
  padding-top: 0 !important;     /* Sicherheits-Tuning */
  padding-bottom: 0 !important;
}

/* Optional: maximale Breite der Login-Card */
body.dark.login-page .card{
  width: min(520px, 92vw);
}
/* Loginseite: kein großer Rahmen um das ganze <main> */
body.dark.login-page main.container{
  min-height: 100vh;                 /* für zentrieren */
  display: flex;
  align-items: center;
  justify-content: center;
  /* wichtig: den globalen Rahmen/Background abschalten */
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
}

/* Den schönen Glow nur an der Login-Card */
body.dark.login-page .card{
  width: min(520px, 92vw);
  background: #0d0d0d !important;
  border: 1px solid #333 !important;
  border-radius: 12px !important;
  box-shadow: 0 0 18px rgba(212,175,55,.25) !important;
}
body.dark .badge.bg-secondary { background:#3a3f4a !important; color:#e5e7eb !important; }
body.dark .badge.bg-success   { background:#0fa36b !important; }

/* resv-dark.css – Beispiel, falls nötig */
.body-login .card { background: var(--card-bg, #111); border-color: #333; }
.body-login .card-header { background: #0b5ed7; color: #fff; } /* wie im Dashboard */
.body-login .btn-success { background: #198754; border-color: #198754; }


