/* pfad: repair_backoffice/app/admin_panel/static/css/admin.css */
/*.tooltip .tooltip-inner {
    background-color: #8c9f9f; // #5ea78a;
    color: #0c0909;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  }

  .tooltip.bs-tooltip-bottom .tooltip-arrow::before {
    border-top-color: #4e73df;
  }*/

/* body.bg-body-tertiary {
  background: #f7f8f9 !important;
} */
/* ===== Hell MODE ===== */
header {
  margin-bottom: 40px;
}
/* alle Zeilen einheitlich hoch, Hintergrund weiß, grauer Hover */
.table-hover tbody tr {
  background-color: #fff; /* immer weiß */
  height: 3rem; /* fixe Höhe */
}
.table-hover tbody tr:hover {
  background-color: #f2f2f2; /* hellgrau beim Überfahren */
}

/* Zellen-Inhalt abschneiden, falls zu lang */
.table-hover tbody td {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* Fixed-Layout für Ellipsis */
.table-fixed {
  table-layout: fixed;
  width: 100%;
}

/* Spalte „Beschreibung“ (3. Spalte) bekommt 60% der Gesamtbreite * /
.table-fixed th:nth-child(3),
.table-fixed td:nth-child(3) {
  width: 60%;
}

/* Ellipsis grundsätzlich aktivieren */
.table-fixed th,
.table-fixed td {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* Alle Zeilen immer weiß */
.table-fixed tbody tr {
  background-color: #fff;
}

/* Hover-Hintergrund für alle Zeilen */
.table-fixed tbody tr:hover {
  background-color: #f2f2f2; /* oder eine andere dezente Grau-Nuance */
}
.btn-outline-light:hover,
.btn-outline-light:focus,
.btn-outline-light:active {
  background-color: #a9abab;
}
.weekend-header {
  background-color: #f8d7da !important;
  color: #721c24;
}
/*.form-label{
  color: #04055bc1;
}*/
.form-control,
.form-select {
  background-color: var(--bs-dark-bg-subtle);
  border: 1px solid var(--bs-dark-border-subtle);
}

/* Events / Maßnahmen Badges nach Bereich */
.badge-area-allgemein {
  background: #eef2ff;
  color: #3730a3;
} /* indigo */
.badge-area-hygiene {
  background: #d1fae5;
  color: #065f46;
} /* grün */
.badge-area-pest {
  background: #ffedd5;
  color: #9a3412;
} /* orange */
.badge-area-wartung {
  background: #cffafe;
  color: #155e75;
} /* türkis */

.sidebar-btn {
  text-align: left !important;
  justify-content: flex-start;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

#menuSidebar {
  --bs-offcanvas-width: 300px;
}
/* ==========================================================
   ================ DARK MODE BRANDING ======================
   ========================================================== */

/* Dashboard-Boxen & Sidebar */
[data-bs-theme="dark"] .dashboard-block,
[data-bs-theme="dark"] .sidebar-section {
  background: #2a2a2a;
  border-color: rgba(255, 255, 255, 0.1);
  color: #e5e7eb;
  /*color: #d1d5db;*/
}
/* Farbe von den Menüpunkten */
[data-bs-theme="dark"] .sidebar-btn {
  color: #ccd0d6;
}
/*Farbe von Bearbeitungs-Form wie Ereignis bearbeiten und Störungsmeldung bearbeiten */
[data-bs-theme="dark"] .form-label {
  color: #949496;
}
/* Versuch die Überschrift hell zu machen [data-bs-theme="dark"] .mb-3 pt-3{
  color: #949496;
} */

/* ==========================================================
   ========== DARK MODE - Tabellenkopf (verbessert) ==========
   ========================================================== */
[data-bs-theme="dark"] table thead {
  background-color: #111827 !important; /* tieferes Dunkelgrau */
  color: #d1d5db !important; /* helles Grau, kein hartes Weiß */
  font-weight: 600;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

[data-bs-theme="dark"] table thead th {
  color: #d1d5db !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

/* Alternative: Tabellen-Header in Markenfarbe (optional) */
/*
[data-bs-theme="dark"] table thead {
  background-color: #064e3b !important;  
  color: #fff !important;
}
*/

/* Listenelemente */
[data-bs-theme="dark"] .list-item {
  background: #2f2f2f;
  border-color: rgba(255, 255, 255, 0.1);
}
[data-bs-theme="dark"] .list-item:hover {
  background: #3a3a3a;
  border-color: rgba(255, 255, 255, 0.2);
}

/* Pagination Branding */
[data-bs-theme="dark"] .page-item.active .page-link {
  background-color: #246248 !important; /* dein Grün */
  border-color: #246248 !important;
  color: #fff !important;
}

/* Gefüllte Buttons (Primary, Success) */
[data-bs-theme="dark"] .btn-primary,
[data-bs-theme="dark"] .btn-success {
  background-color: #246248 !important;
  border-color: #246248 !important;
  color: #fff !important;
}
[data-bs-theme="dark"] .btn-primary:hover,
[data-bs-theme="dark"] .btn-success:hover {
  background-color: #246248 !important;
}

/* Navbar & Footer Branding */
[data-bs-theme="dark"] .navbar-dark.bg-dark,
[data-bs-theme="dark"] footer.bg-dark {
  background-color: #246248 !important;
}
/* ==========================================================
   ========== FIX: Dark Mode überschreibt .table-light =======
   ========================================================== */
[data-bs-theme="dark"] .table-light {
  background-color: #111827 !important; /* gleich wie dein Dark-Hintergrund */
  color: #d1d5db !important; /* heller Text */
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

[data-bs-theme="dark"] .table-light th {
  background-color: #111827 !important;
  color: #d1d5db !important;
}
/* Sidebar kompakt machen */
[data-bs-theme="dark"] .sidebar-section {
  height: auto !important; /* 👈 verhindert das Strecken */
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 8px;
  /*background: #fff;*/
  padding: 0.3rem 0.4rem; /* 👈 weniger Innenabstand */
  margin-bottom: 0.3rem; /* 👈 weniger Abstand nach außen */
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Überschriften vom Menü */
[data-bs-theme="dark"] .sidebar-section .card-title {
  font-size: 0.8rem; /* 👈 kleinerer Titel */
  font-weight: 600;
  margin-bottom: 0.25rem; /* 👈 enger unter Titel */
  /*color: #cbd2df;*/
  color: #f2ec38;
}

[data-bs-theme="dark"] .sidebar-section .d-grid {
  /* 👈 enger unter Titel */
  color: #cbd2df;
}

/* --- Sidebar als Overlay rechts --- */
.dashboard-sidebar-overlay {
  position: fixed;
  top: 56px; /* Höhe deiner Navbar */
  right: 0;
  width: 260px;
  height: calc(100% - 56px);
  background: var(--bs-body-bg);
  border-left: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: -2px 0 8px rgba(0, 0, 0, 0.15);
  padding: 0.75rem;
  overflow-y: auto;
  z-index: 1050;

  /* Animation */
  transform: translateX(100%);
  opacity: 0;
  transition:
    transform 0.25s ease-out,
    opacity 0.2s ease-out;
}

/* Sichtbar */
.sidebar-visible #globalSidebar {
  transform: translateX(0);
  opacity: 1;
}

/* Overlay-Hintergrund */
#sidebarBackdrop {
  position: fixed;
  top: 56px;
  left: 0;
  width: 100%;
  height: calc(100% - 56px);
  background: rgba(0, 0, 0, 0.35);
  display: none;
  z-index: 1040;
  backdrop-filter: blur(2px);
  transition: opacity 0.25s ease-out;
}
.sidebar-visible #sidebarBackdrop {
  display: block;
}
/* =========================================================
   FIX: Custom-Autocomplete Dropdowns im Dark Theme
   (Gebäude/Räume/Artikel) - überschreibt hartes Weiß
   ========================================================= */

html[data-bs-theme="dark"] .dropdown-list,
html[data-bs-theme="dark"] #from_building_dropdown,
html[data-bs-theme="dark"] #to_building_dropdown,
html[data-bs-theme="dark"] #from_room_dropdown,
html[data-bs-theme="dark"] #to_room_dropdown,
html[data-bs-theme="dark"] #item_autofill_dropdown {
  background-color: #1f2937 !important; /* dunkel */
  color: #e5e7eb !important; /* heller Text */
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35) !important;
}

/* Items (egal ob div, li, button, a usw.) */
html[data-bs-theme="dark"] .dropdown-list > *,
html[data-bs-theme="dark"] .dropdown-list div,
html[data-bs-theme="dark"] .dropdown-list li,
html[data-bs-theme="dark"] .dropdown-list a,
html[data-bs-theme="dark"] .dropdown-list button,
html[data-bs-theme="dark"] .dropdown-list .dropdown-item,
html[data-bs-theme="dark"] .dropdown-list .item {
  background-color: transparent !important;
  color: #e5e7eb !important;
}

/* Hover / Active */
html[data-bs-theme="dark"] .dropdown-list > *:hover,
html[data-bs-theme="dark"] .dropdown-list .active,
html[data-bs-theme="dark"] .dropdown-list .selected {
  background-color: #374151 !important;
  color: #ffffff !important;
}

/* Trennlinien */
html[data-bs-theme="dark"] .dropdown-list > * + * {
  border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
}

/* =========================================================
   GLOBAL FIX FOR SCROLL WITH FIXED HEADER / FOOTER / SIDEBAR
   ========================================================= */

body.dashboard {
  overflow-y: auto !important;
}
#mainContent {
  padding-bottom: 60px;
}
/* =========================================================
   FIX: Weiße Balken in Dark Mode → dunkelblau wie Tabellenkopf
   ========================================================= */

html[data-bs-theme="dark"] .card-header.bg-light,
html[data-bs-theme="dark"] .autocomplete-dropdown {
  background-color: #111827 !important;
  color: #d1d5db !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}
