/*
* custom.
 * Adiutor HUB Theme für AdminLTE
 * ==============================
 */
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;600;700&display=swap');

.skip-links {
    display: none !important;
}

/* -- 1. Farbpalette als CSS-Variablen definieren -- */
:root {
  --adiutor-bg-dark: #2d2d2d;
  --adiutor-card-bg: #16171b;
  --adiutor-text-primary: #f8f9fa;
  --adiutor-text-secondary: #adb5bd;
  --adiutor-accent-red: #e44d5c;
  --adiutor-accent-blue: #3498db;
  --adiutor-border-color: #444951;
}
.bg-body {

  background-color: #2d2d2d !important;
}

/* DURCH DIESEN BLOCK ERSETZEN: */
/* -- 2. Globale Stile für die Seite -- */
html[data-bs-theme="dark"],
html[data-bs-theme="dark"] body {
    background-color: var(--adiutor-bg-dark) !important; /* Solider Basis-Hintergrund für die ganze Seite */
    color: var(--adiutor-text-primary);
}

/* NEU: Hintergrund mit Tiefen-Effekt für den Haupt-Inhaltsbereich */
.app-main {
    /* Dieser Gradient erzeugt den "Spotlight"-Effekt von oben, genau wie bei der Klima-Seite */
    background: radial-gradient(ellipse at top, #313540, var(--adiutor-bg-dark, #2d2d2d) 70%) !important;
}


.next-events-list {
    width: 100%;
    margin: 0;
    padding: 0;
}

.next-event-item {
    background: #222527;
    margin-bottom: 8px;
    border-radius: 0 !important;         /* Ecken kantig! */
    box-shadow: none !important;         /* Optional, weniger "Card-Look" */
    border-left: 5px solid #adb5bd;      /* Kategorie-Farbe möglich */
    font-size: 1.06rem;
    padding: 14px 12px;
    transition: background 0.12s;
}
.next-event-item:hover {
    box-shadow: 0 6px 24px rgba(52,152,219,0.09);
}

.next-event-date {
    min-width: 136px;
    text-align: left;
    color: #34b67a;
    font-size: 1.05rem;
    letter-spacing: .02em;
    display: flex;
    gap: 7px;
}
.next-event-weekday {
    color: #fff;
    font-weight: 600;
    margin-right: 3px;
    letter-spacing: .03em;
    font-size: 1.11rem;
}
.next-event-date-main {
    color: #fff;
    font-weight: 500;
}
.next-event-time {
    color: #c5f4e0;
    font-size: 1.07rem;
    margin-left: 8px;
}

.next-event-title {
    color: #fff;
    font-size: 1.11rem;
    font-weight: 600;
    margin-right: 6px;
}
.next-event-location {
    color: #adb5bd;
    font-size: 0.98rem;
    margin-left: 8px;
}
.next-event-item .badge {
    font-size: 0.93rem;
    vertical-align: middle;
    padding: 0.33em 0.8em;
    border-radius: 6px;
    margin-left: 4px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

/* -- 3. Sidebar anpassen -- */
.app-sidebar {
    background-color: var(--adiutor-card-bg) !important;
}
/*
 * =========================================
 * NEUES DESIGN: Dashboard Info-Boxen ("Stat-Cards")
 * =========================================
 */

.stat-card {
background: var(--card-bg);
  border-radius: 8px;
  padding: 1.5rem 1.8rem;
  color: var(--text-color);
font-family: 'Open Sans', sans-serif;
  border: 1px solid rgba(255, 255, 255, 0.1);
    border-left-width: 1px;
    border-left-style: solid;
    border-left-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 140px;
  border-left-width: 5px;
  border-left-style: solid;
  transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Akzentfarben (wir nutzen deine bestehenden Farben) */
.stat-card--today { border-left-color: #00c6fb; }
.stat-card--week  { border-left-color: #3abb68; }
.stat-card--cat   { border-left-color: #ffc738; }

/* Das Icon - neu positioniert und gestylt */
.stat-card__icon {
    position: absolute;
    top: 1.25rem;
    right: 1.5rem;
    font-size: 2.2rem;
    line-height: 1;
    transition: color 0.2s ease;
}

/* Icon-Farben passend zum Akzent */
.stat-card--today .stat-card__icon { color: #00c6fb; }
.stat-card--week  .stat-card__icon { color: #3abb68; }
.stat-card--cat   .stat-card__icon { color: #ffc738; }

/* Inhalt der Karte */
.stat-card__number {
    font-size: 4rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.stat-card__label {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--adiutor-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Media Query für kleinere Bildschirme */
@media (max-width: 991px) {
    .stat-card {
        min-height: 140px;
        padding: 1.25rem;
    }
    .stat-card__number {
        font-size: 3rem;
    }
    .stat-card__icon {
        font-size: 1.8rem;
    }
}
/* Optional: Optik für .btn-primary an den Dashboard-Style angleichen */
.btn-primary {
    background-color: #00c6fb !important;
    border: none !important;
    font-weight: 600;
    border-radius: 8px !important;
    padding: 0.8rem 2.2rem !important;
    font-size: 1.1rem;
    transition: background 0.12s;
}
.btn-primary:hover {
    background-color: #0598bc !important;
}

@media (max-width: 991px) {
    .dashboard-box { min-height: 120px; padding: 1.2rem 1.2rem 1.2rem 1.2rem; }
    .dashboard-number { font-size: 2.1rem; }
    .dashboard-icon { font-size: 2.4rem; margin-left: 16px; }
}

/* DEINE ANPASSUNG FÜR DAS LOGO WURDE HIER ÜBERNOMMEN */
.brand-link { 
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;    
    background: transparent !important;
    border-bottom: 1px solid var(--adiutor-border-color) !important;
}
.brand-link .brand-image {
    max-height: 100%;  
    max-width: 100%;
    width: auto;
    height: auto;
    filter: none; 
    box-shadow: none !important; 
}

.nav-sidebar .nav-item > .nav-link {
    color: var(--adiutor-text-secondary) !important;
    border-radius: 0 !important;
}
.nav-sidebar .nav-item > .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.05) !important;
    color: var(--adiutor-text-primary) !important;
}
.nav-sidebar .nav-item > .nav-link.active {
    background-color: var(--adiutor-accent-red) !important;
    color: #fff !important;
}


/* -- 4. Haupt-Layout-Komponenten neu stylen -- */
.app-content-padding {
    padding: 1.5rem !important;
}
.card {
    background-color: var(--adiutor-card-bg) !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    margin-bottom: 1.5rem;
}
.card-header {
    background-color: transparent !important;
    border-bottom: 1px solid var(--adiutor-border-color) !important;
    padding: 1rem 1.25rem;
}
.card-body {
    padding: 1.25rem;
}
.table {
    --bs-table-bg: transparent;
    --bs-table-striped-bg: rgba(255, 255, 255, 0.03);
    --bs-table-color: var(--adiutor-text-secondary);
    --bs-table-border-color: var(--adiutor-border-color);
}
.table thead th {
    color: var(--adiutor-text-primary);
    font-weight: 600;
}


/* -- 5. Typografie und Texte -- */
.app-main h1, .app-main h2, .app-main h3 {
    color: var(--adiutor-text-primary);
    font-weight: 600;
}
.text-accent-red {
    color: var(--adiutor-accent-red) !important;
}


/* -- 6. Spezifische Komponenten anpassen -- */
.small-box {
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: center;
    min-height: 145px;
    /* Cards nebeneinander, Abstand gleichmäßig */
    padding: 0 24px;
    background: var(--adiutor-card-bg);
    box-shadow: 0 2px 14px rgba(0,0,0,0.09);
}

.small-box .inner {
    flex: 1 1 60%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    z-index: 2;
}
.small-box .inner h3 {
    font-size: 2.7rem;
    font-weight: 700;
    margin-bottom: 2px;
    letter-spacing: -1px;
    color: var(--adiutor-text-primary);
}
.small-box .inner p {
    font-size: 1.13rem;
    margin: 0;
    color: var(--adiutor-text-secondary);
    font-weight: 400;
}

.small-box .icon {
    flex: 0 0 auto;
    margin-left: 18px;
    margin-right: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    height: 100%;
}
.small-box .icon i {
    font-size: 4.5rem;    /* Macht das Icon wirklich groß! */
    opacity: 0.18;        /* Leicht transparent, damit Text im Fokus bleibt */
    color: var(--adiutor-text-primary);
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.18));
    transition: opacity 0.2s, color 0.2s;
    /* Animation beim Hover (optional) */
}
.small-box:hover .icon i {
    opacity: 0.35;
    color: var(--adiutor-accent-blue); /* oder für andere Boxen: var(--adiutor-accent-red/green/yellow) */
}
.small-box.text-bg-success {
    border-left: 7px solid #33d17a;
}
.small-box.text-bg-info {
    border-left: 7px solid #399efa;
}
.small-box.text-bg-warning {
    border-left: 7px solid #ffd666;
}
/* Responsive: ab 600px kleineres Icon */
@media (max-width: 600px) {
    .small-box .icon i {
        font-size: 2.8rem;
    }
    .small-box {
        padding: 10px 12px;
    }
}

/* Buttons */
.btn {
    border-radius: 0 !important;
}
.btn-primary {
    background-color: var(--adiutor-accent-blue) !important;
    border: none !important;
    font-weight: 600;
}

/* Badges */
.badge {
    border-radius: 0 !important;
}

/*
 * -- 7. Formulare verbessern (NEUER ABSCHNITT) --
 */

.form-group,
.form-check {
    margin-bottom: 1.5rem !important; /* Vergrößert den Abstand ZWISCHEN den Formularfeldern */
}

.form-control,
.form-select {
    background-color: var(--adiutor-bg-dark) !important; /* Hintergrund dunkler, für mehr Kontrast */
    border-color: var(--adiutor-border-color) !important;
    border-radius: 0 !important; /* Sicherstellen, dass sie kantig sind */
    color: var(--adiutor-text-primary) !important;
    padding: 0.75rem 1rem !important; /* Vergrößert das Feld selbst (mehr Innenabstand) */
}

.form-control:focus,
.form-select:focus {
    background-color: var(--adiutor-bg-dark) !important;
    border-color: var(--adiutor-accent-blue) !important; /* Blauer Rahmen bei Fokus */
    box-shadow: none !important;
}

.form-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--adiutor-text-secondary);
}
/* Rahmen für Dashboard-Kacheln */
.small-box.border-danger {
    border: 2px solid var(--adiutor-accent-red) !important;
}
.small-box.border-success {
    border: 2px solid #28a745 !important; /* Bootstrap-Erfolgsgrün */
}
    .login-page {
      background-image: 
        linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)),
        url('assets/img/church.jpg');
      background-size: cover;
      background-position: center;
    }
    .login-logo img {
        max-width: 80%;
        height: auto;
        margin-bottom: 1rem;
        /* Wir machen das Logo hell für besseren Kontrast auf dem dunklen Bild */
        filter: brightness(0) invert(1); 
    }
    .login-box {
        width: 400px;
    }
    /* KORREKTUR: Explizites Dark-Styling für die Login-Karte */

    .card-body {
        color: var(--adiutor-text-primary);
    }
    .login-box-msg {
        color: var(--adiutor-text-secondary);
    }
    .input-group .form-control {
        background-color: var(--adiutor-bg-dark) !important;
        border-color: var(--adiutor-border-color) !important;
        color: var(--adiutor-text-primary) !important;
        border-radius: 0 !important;
    }
      
.input-group .input-group-text {
    background-color: var(--adiutor-bg-dark) !important;
    border-color: var(--adiutor-border-color) !important;
    color: var(--adiutor-text-secondary);
    border-radius: 0 !important;
    border-left: none; /* Schließt die Lücke zwischen Input und Icon */
}

        .input-group .form-control:focus {
        border-color: var(--adiutor-accent-blue) !important;
        box-shadow: none !important;
    }
    .btn-primary {
        background-color: var(--adiutor-accent-blue) !important;
        border-color: var(--adiutor-accent-blue) !important;
        border-radius: 0 !important;
    }

    /*
 * =========================================
 * FIX: Modal-Hintergrund im Dark-Theme
 * =========================================
 * Stellt sicher, dass das Bootstrap-Modal einen soliden
 * Hintergrund hat und nicht durchsichtig ist.
 */

.modal-content {
    background-color: #212529; /* Ein Standard-Dunkelgrau, fast schwarz. Passt gut zum Dark-Theme. */
    border: 1px solid #495057;   /* Eine subtile, hellere graue Border */
    border-radius: 0.5rem;       /* Leicht abgerundete Ecken, wie im Ziel-Screenshot */
}

/* Optional: Header und Footer des Modals farblich leicht absetzen */
.modal-header {
    background-color: #2b3035; /* Ein ganz leicht helleres Grau als der Body */
    border-bottom: 1px solid #495057;
}

.modal-footer {
    background-color: #2b3035;
    border-top: 1px solid #495057;
}

/* Stelle sicher, dass die Schrift im Header gut lesbar ist */
.modal-title {
    color: #f8f9fa; /* Ein helles Grau / fast weiß */
}

/* Passe die Farbe des Schließen-Buttons (X) an, damit er sichtbar ist */
.modal-header .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

.table-dark {
    background-color: #212326 !important;
    color: #e5e6ea;
    font-size: 1.03em;
}
.table-dark th, .table-dark td {
    border-color: #37393c !important;
    vertical-align: middle;
    font-weight: 400;
}
.table-dark th {
    font-weight: 600;
    color: #fafbfc;
    background: #19191c;
    font-size: 1.07em;
}
.table-dark .fw-semibold {
    font-weight: 500 !important;
}
.table-dark .fw-bold {
    font-weight: 600 !important;
}
.table-dark .badge {
    border-radius: 0.4em;
    font-size: 0.93em;
    font-weight: 600;
}
.table-striped>tbody>tr:nth-of-type(odd) {
    background-color: #25262a !important;
}
.next-events-table th, .next-events-table td {
    border: none !important;
    vertical-align: middle;
    font-weight: 400;
    font-size: 1.02em;
    padding-top: 0.55em;
    padding-bottom: 0.55em;
}
.next-events-table tbody tr:nth-child(even) {
    background: #19191c;
}

.next-events-table th {
    color: #f9f9f9;
    font-weight: 600;
    font-size: 1.08em;
    background: #19191c;
    letter-spacing: .01em;
    border-bottom: 1px solid #23242a;
}

.next-events-table tr {
    transition: background 0.13s;
}
.next-events-table tr:hover {
    background: #28282c;
}
.next-events-table .next-event-sunday .text-secondary {
    color: #e44d5c !important;
    font-weight: bold;
}
.next-events-table td:first-child {
    min-width: 2px;
    max-width: 2px;
    width: 2px;
    padding: 0 !important;
    border-radius: 0;
    border: none;
}

.next-events-table .text-accent-blue {
    color: #21c0f6 !important;  /* Oder dein Akzentblau */
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* Kategorie weiß: */
.next-events-table .text-primary {
    color: #fff !important;
    font-weight: 500;
}
/*
 * =========================================
 * NEU: amCharts 5 Styling für Adiutor.Cloud
 * =========================================
 */

/* Verbessertes Tooltip, das zum Dark-Theme passt */
.am5-tooltip {
    background: var(--adiutor-card-bg, #16171b) !important;
    border: 1px solid var(--adiutor-border-color, #444951) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
    padding: 8px 12px !important;
    border-radius: 0 !important;
}

.am5-tooltip-label {
    color: var(--adiutor-text-primary, #faf8f8) !important;
    font-size: 0.9rem !important;
    line-height: 1.4 !important;
    text-align: left !important;
}

/*
 * =========================================
 * NEUES DESIGN: Termin-Liste
 * =========================================
 */

/* Die äußere "Glas"-Karte für die gesamte Liste */
.event-list-card {
    background: rgba(40, 43, 48, 0.45) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 0 !important;
}

.upcoming-events-list {
    display: flex;
    flex-direction: column;
}

.event-item {
    display: flex;
    align-items: stretch; /* Wichtig, damit beide Blöcke gleich hoch sind */
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    transition: background-color 0.2s ease;
}

.event-item:last-child {
    border-bottom: none;
}

.event-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

/* Der farbige Datums-Block links */
.event-item__date-box {
    flex-shrink: 0;
    width: 120px;
    padding: 1.25rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    font-family: 'Open Sans', sans-serif;
}

.event-item__day {
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    opacity: 0.8;
}

.event-item__date {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.1;
    margin: 0.25rem 0;
}

.event-item__time {
    font-size: 1rem;
    font-weight: 600;
    background: rgba(0, 0, 0, 0.2);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    margin-top: 0.25rem;
}

/* Der Detail-Block rechts */
.event-item__details {
    flex-grow: 1;
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.event-item__title {
    font-family: 'Open Sans', sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--adiutor-text-primary);
    margin: 0 0 0.5rem 0;
}

.event-item__meta-info {
    display: flex;
    gap: 1.5rem; /* Abstand zwischen Kategorie und Ort */
    font-size: 0.95rem;
    color: var(--adiutor-text-secondary);
}

.event-item__meta-info span {
    display: flex;
    align-items: center;
    gap: 0.5rem; /* Abstand zwischen Icon und Text */
}

/* Fallback-Nachricht, wenn keine Termine da sind */
.no-events-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    text-align: center;
    color: var(--adiutor-text-secondary);
}
.no-events-message i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}
.no-events-message span {
    font-size: 1.1rem;
    font-weight: 600;
}

/*
 * =========================================
 * NEUES DESIGN: Gebäude-Übersichts-Kachel
 * =========================================
 */

.building-card {
    background: var(--adiutor-card-bg, #16171b);
    border-radius: 0 !important;
    overflow: hidden; /* Wichtig, damit die abgerundeten Ecken des Headers funktionieren */
    box-shadow: 0 5px 25px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
}

/* NEUE REGELN (ERSETZEN) */
.building-card__header {
    position: relative;
    height: 120px;
    background-size: cover;
    background-position: center;
    color: #fff;
    /* Das Padding hier wird entfernt, da wir es spezifischer steuern */
}

.building-card__header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.2) 60%, rgba(0, 0, 0, 0) 100%);
    
    /* NEU: Flexbox und Padding hier anwenden! */
    display: flex;
    flex-direction: column;
    justify-content: flex-end; /* Richtet den Inhalt unten aus */
    padding: 1rem 1.5rem; /* Das alte Padding für oben/unten/rechts */
}

.building-card__title, .building-card__address {
    position: relative;
    text-shadow: 0 2px 4px rgba(0,0,0,0.6);
    /* NEU: Einrückung links für den Text */
    padding-left: 210px; /* Dieser Wert rückt den Text nach rechts */
}

/* Optional: Auf kleineren Bildschirmen die Einrückung reduzieren */
@media (max-width: 768px) {
    .building-card__title, .building-card__address {
        padding-left: 0; /* Auf Handys keine Einrückung */
    }
}
.building-card__title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.building-card__address {
    font-size: 0.9rem;
    margin: 0;
    opacity: 0.8;
}

.building-card__body {
    display: grid;
    grid-template-columns: 200px 1fr; /* Linke Spalte fix, rechte flexibel */
    border-top: 2px solid var(--adiutor-accent-blue); /* Ein schöner Akzent */
}

/* Linke Spalte: Wetter */
.building-card__weather {
    background: rgba(0,0,0,0.1);
    padding: 1.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-right: 1px solid var(--adiutor-border-color);
}

.weather-icon {
    font-size: 4rem;
    color: var(--adiutor-accent-blue);
    margin-bottom: 0.5rem;
}

.weather-temp {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
}

.weather-desc {
    font-size: 1rem;
    font-weight: 600;
    text-transform: capitalize;
    color: var(--adiutor-text-primary);
}

.weather-feels-like {
    font-size: 0.9rem;
    color: var(--adiutor-text-secondary);
    margin-top: 0.25rem;
}
.weather-nodata {
    color: var(--adiutor-text-secondary);
}

/* Rechte Spalte: Sensoren */
.building-card__sensors {
    padding: 1rem 1.5rem 1.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem; /* Abstand zwischen den Sensoren */
}

.sensor-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    padding: 0.75rem 1rem;
    transition: background 0.2s;
}
.sensor-item:hover {
    background: rgba(255, 255, 255, 0.06);
}

.sensor-item__name {
    font-size: 1.1rem;
    font-weight: 600;
}

.sensor-item__values {
    display: flex;
    gap: 1.5rem;
    font-size: 1.1rem;
    font-weight: 500;
}

.sensor-item__values .fa-fw {
    color: var(--adiutor-text-secondary);
}

.sensor-details-link {
    margin-top: auto; /* Schiebt den Link nach ganz unten */
    padding-top: 1rem;
    text-align: right;
    color: var(--adiutor-accent-blue);
    font-weight: 600;
    text-decoration: none;
}

.sensor-details-link:hover {
    text-decoration: underline;
}

@keyframes pulse-glow {
  0% { box-shadow: 0 0 8px 0px rgba(255, 159, 67, 0.3), 0 5px 25px rgba(0,0,0,0.2); }
  100% { box-shadow: 0 0 22px 7px rgba(255, 159, 67, 0.55), 0 8px 35px rgba(0,0,0,0.3); }
}

.building-card.heating-active {
  border-top-color: #ff9f43 !important; /* Akzentfarbe wie bei der Detailkachel */
  animation: pulse-glow 1.5s infinite alternate ease-in-out;
}
/* OPTIONALE VERBESSERUNG: Den Status-Text "Aktiv" ebenfalls grün färben */
.building-card.heating-active .building-card__footer .detail-item:nth-child(4) .detail-value {
    color: #48ff00;
    font-weight: 700;
}
/* Der neue Footer-Bereich für die Heizungsdetails */
.building-card__footer {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    background: rgba(0,0,0,0.2); /* Etwas dunklerer Hintergrund zur Abgrenzung */
    border-top: 1px solid #444951;
}

.building-card .detail-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.building-card .detail-item i {
    font-size: 1.2rem;
    color: #adb5bd;
    margin-bottom: 0.4rem;
}

.building-card .detail-item .detail-value {
    font-size: 1rem;
    font-weight: 700;
    color: #f8f9fa;
}

.building-card .detail-item .detail-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: #adb5bd;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.1rem;
}
.building-card__footer-header {
    padding: 0.75rem 1.5rem 0.5rem 1.5rem;
    background: rgba(0,0,0,0.1); /* Slightly different background to stand out */
    border-top: 1px solid #444951;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #adb5bd; /* Secondary text color */
}
.building-card__control-panel {
    /* Die Linie ist weg, stattdessen mehr Abstand oben für eine weiche Trennung */
    padding: 1.5rem 1.5rem 1rem 1.5rem; 
    background: rgba(0, 0, 0, 0.15); /* Subtiler Hintergrund zur Gruppierung bleibt */
}

.control-panel__title {
    margin: 0 0 1.25rem 0; /* Etwas mehr Abstand zwischen Titel und den Icons */
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--adiutor-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.building-card__control-panel .building-card__footer {
    border-top: none;
    background-color: transparent;
    padding: 0;
}
/*
 * =========================================
 * KALENDER SEITE STYLING (passend zum Dashboard)
 * =========================================
 */
/*
 * =========================================
 * KALENDER SEITE STYLING (FINAL & CORRECTED)
 * =========================================
 */

/*
 * =========================================
 * FINAL CALENDAR STYLING (matches the screenshot)
 * =========================================
 */

/* 1. HÖHEN-KORREKTUR: Flexbox-Layout für den Wrapper */
.calendar-wrapper-card {
    background: rgba(29, 31, 35, 0.75) !important; /* Passt besser zum Screenshot */
    backdrop-filter: blur(15px) !important;
    -webkit-backdrop-filter: blur(15px) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 12px !important;
    padding: 0 !important;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);

    /* Flexbox-Magie für die Höhe */
    display: flex !important;
    flex-direction: column !important;
    /* Höhe an den Viewport anpassen, abzüglich des Headers */
    height: calc(90vh - 60px); 
    min-height: 700px; /* Mindesthöhe für große Bildschirme */
}

.calendar-wrapper-card > .card-body {
    flex-grow: 1; /* Der Body füllt den restlichen Platz */
    padding: 0 !important;
    display: flex;
    flex-direction: column;
}
.calendar-glass-background {
    position: relative;
    background: rgba(30, 32, 36, 0.7); 
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}
.calendar-content-wrapper {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 120px); 
    min-height: 700px;
}

/* Der Kalender selbst soll den restlichen Platz einnehmen */
#calendar {
    flex-grow: 1;
    padding: 0 1.5rem 1.5rem 1.5rem;
    background: transparent !important; /* Der Kalender selbst ist durchsichtig */
}

/* Ende Höhen-Korrektur */


/* Toolbar-Styling (bleibt größtenteils gleich) */
.calendar-toolbar {
    background: transparent;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}
.calendar-toolbar__left, .calendar-toolbar__right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}
.calendar-title { font-size: 1.5rem; font-weight: 600; color: var(--adiutor-text-primary); }
.calendar-nav .btn, .calendar-toolbar__right .btn-group .btn {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 6px !important;
    color: var(--adiutor-text-secondary) !important;
}
.calendar-toolbar__right .btn-group .btn.active {
    background-color: var(--adiutor-accent-blue) !important;
    border-color: var(--adiutor-accent-blue) !important;
    color: white !important;
}
/* ======================================================= */
/* NEU: Tom-select Styling für das Adiutor Dark Theme      */
/* ======================================================= */

/* Das Eingabefeld (geschlossen) */
.ts-control {
    background-color: var(--adiutor-bg-dark) !important;
    border-color: var(--adiutor-border-color) !important;
    border-radius: 0 !important;
    padding: 0.7rem 1rem !important;
}
.ts-control, .ts-control input {
    color: var(--adiutor-text-primary) !important;
}
.ts-control.plugin-dropdown_input.focus {
    border-color: var(--adiutor-accent-blue) !important;
    box-shadow: none !important;
}

/* Das ausgewählte Element (Item) im Eingabefeld */
.ts-control > .item {
    background-color: var(--adiutor-accent-blue) !important;
    color: #fff !important;
    border-radius: 4px !important;
    padding: 0.2rem 0.6rem !important;
}

/* Die Dropdown-Liste (geöffnet) */
.ts-dropdown {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background-color: rgba(30, 32, 36, 0.95) !important;
    border: 1px solid var(--adiutor-border-color) !important;
    border-radius: 0 !important;
}

/* Ein einzelnes Element (Option) in der Dropdown-Liste */
.ts-dropdown .option {
    color: var(--adiutor-text-secondary);
    padding: 0.7rem 1.2rem;
    transition: background-color 0.2s ease, color 0.2s ease;
}
.ts-dropdown .option:hover, .ts-dropdown .option.active {
    background-color: rgba(255, 255, 255, 0.07) !important;
    color: var(--adiutor-text-primary) !important;
}
.ts-dropdown .option.selected {
    background-color: var(--adiutor-accent-blue) !important;
    color: #fff !important;
}

/* Styling für unsere Custom-Icons im Dropdown */
.ts-dropdown .option .category-color-dot,
.ts-control .item .category-color-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}
.ts-dropdown .option .fa-bell,
.ts-control .item .fa-bell {
    color: var(--adiutor-accent-blue); /* Fallback-Farbe */
    font-size: 0.9em;
    margin-left: 0.5rem;
}
.ts-dropdown .option .d-flex span:last-child,
.ts-control .item .d-flex span:last-child {
    margin-left: 0.5rem;
}

/* Kategorie-Filter-Pills (passt zum Screenshot) */
/* -- 5. Stile für Tooltips (Tippy.js) & Popover -- */
/* -- 5. NEU: Styling für das Kategorie-Filter Dropdown -- */
#category-filter-dropdown .btn {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 6px !important;
    color: var(--adiutor-text-secondary) !important;
    font-weight: 600;
}

#category-filter-dropdown .btn:hover {
    background: rgba(255, 255, 255, 0.15) !important;
    color: var(--adiutor-text-primary) !important;
}

#category-filter-dropdown .dropdown-menu {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background-color: rgba(30, 32, 36, 0.9) !important;
    border: 1px solid var(--adiutor-border-color, #444951) !important;
    border-radius: 8px !important;
    padding: 0.5rem 0;
    margin-top: 0.5rem !important;
}

#category-filter-dropdown .dropdown-item {
    color: var(--adiutor-text-secondary) !important;
    font-weight: 500;
    padding: 0.5rem 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: background-color 0.2s ease, color 0.2s ease;
}
/* Styling für das Glocken-Icon im Kategorie-Filter */
#category-filter-dropdown .dropdown-item .fa-bell {
    /* Die Farbe wird von der CSS-Variable des Elternelements übernommen */
    color: var(--cat-color); 
    
    /* Eine gute Größe im Verhältnis zum Text */
    font-size: 0.85em; 
    
    /* Leichte Transparenz für eine subtile Optik */
    opacity: 0.9;
}
#category-filter-dropdown .dropdown-item:hover,
#category-filter-dropdown .dropdown-item:focus {
    background-color: rgba(255, 255, 255, 0.07) !important;
    color: var(--adiutor-text-primary) !important;
}

#category-filter-dropdown .dropdown-item.active {
    background-color: var(--adiutor-accent-blue) !important;
    color: #fff !important;
}

/* Farbiger Punkt für die Kategorie im Dropdown-Menü */
#category-filter-dropdown .category-color-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}
/* FullCalendar Core Overrides */
#calendar {
    flex-grow: 1;
    padding: 1.5rem;
    min-height: 0;
}
.fc {
    height: 100%;
    background: transparent !important;
}
/* ======================================================= */
/* NEU: Sonntage rot hervorheben                           */
/* ======================================================= */
.fc .fc-day-sun .fc-col-header-cell-cushion,
.fc .fc-day-sun .fc-daygrid-day-number {
    color: var(--adiutor-accent-red) !important;
}
.fc .fc-day-today {
    background: rgba(52, 152, 219, 0.15) !important;
    border: 1px solid rgba(52, 152, 219, 0.3);
}

.fc-theme-standard td, .fc-theme-standard th {
    border-color: rgba(255, 255, 255, 0.15) !important;
}
.fc .fc-col-header-cell {
    background-color: transparent;
}
/* Allgemeine Regel für Wochentage (kommt ZUERST) */
.fc .fc-col-header-cell-cushion {
    font-weight: 600;
    padding: 0.75rem 0.5rem !important;
    color: var(--adiutor-text-secondary);
}

/* Spezifische Regel für Sonntage (kommt DANACH und gewinnt) */
.fc .fc-day-sun .fc-col-header-cell-cushion,
.fc .fc-day-sun .fc-daygrid-day-number {
    color: var(--adiutor-accent-red) !important;
}
.fc .fc-day-today {
    background: rgba(52, 152, 219, 0.1) !important;
}


/* 5. EVENT-STYLING (KORRIGIERT FÜR FARBVERLAUF)
 * -------------------------------------------------------------------
 */

.fc-event-main {
    display: flex; /* Wichtig für die Ausrichtung von Zeit und Titel */
    align-items: center;
    gap: 6px;
    color: var(--adiutor-text-primary) !important;
    font-weight: 500 !important;
    font-size: 0.85em !important;
    padding: 4px 8px;
    border-radius: 5px;
    overflow: hidden;
    transition: all 0.2s ease;
    cursor: pointer;
    
    /* RAHMEN: Der linke Rand hat 100% der Kategorie-Farbe */
    border-left: 4px solid var(--event-color);
    
    /* HINTERGRUND-VERLAUF: Von der Kategorie-Farbe (mit Transparenz) zu komplett transparent */
    background: linear-gradient(
      to right, 
      color-mix(in srgb, var(--event-color) 30%, transparent), /* Start: 30% der Farbe, leicht durchsichtig */
      transparent 95%                                         /* Ende: Bei 95% der Breite komplett transparent */
    );

    /* Ein subtiler Rand oben/unten/rechts, der ebenfalls die Farbe aufnimmt */
    border-top: 1px solid color-mix(in srgb, var(--event-color) 20%, transparent);
    border-right: 1px solid color-mix(in srgb, var(--event-color) 10%, transparent);
    border-bottom: 1px solid color-mix(in srgb, var(--event-color) 10%, transparent);
}
/* Der linke Farbstreifen wird jetzt als ::before-Element realisiert */


/* Die Uhrzeit im Termin */
.fc-event-time {
    font-weight: 700;
    opacity: 0.9;
    margin-right: 0.4em;
}

 
/* Hover-Effekt: Der Verlauf und der Schatten werden stärker */
.fc-daygrid-event:hover .fc-event-main {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    background: linear-gradient(
      to right, 
      color-mix(in srgb, var(--event-color) 45%, transparent), /* Start wird intensiver */
      transparent 90%
    );
}


/* Der Titel-Text im Termin, mit Schutz vor Überlaufen */
.fc-event-title-text {
   
    overflow: hidden;
    text-overflow: ellipsis;
    flex-grow: 1; /* Nimmt den restlichen Platz ein */
}


/* Kleinere Korrekturen für das restliche Layout im Glas-Look */
.fc-theme-standard .fc-scrollgrid {
    background: transparent !important; /* Gitter soll durchsichtig sein */
}
.fc-theme-standard td, 
.fc-theme-standard th {
    border-color: rgba(255, 255, 255, 0.12) !important; /* Subtilere Gitterlinien */
}
.fc .fc-col-header-cell {
    background-color: rgba(255, 255, 255, 0.04); /* Header der Wochentage leicht abheben */
}
.fc .fc-day-today {
    background: rgba(52, 152, 219, 0.15) !important; /* "Heute"-Hervorhebung anpassen */
    border: 1px solid rgba(52, 152, 219, 0.3);
}
.fc-event-icon {
    margin-left: 0px;
    margin-right: 0px;
    opacity: 0.8;
}
.fc-event-icon .fa-solid {
    font-size: 0.9em; /* Macht die Icons etwas kleiner als der Text */
}
/* 3. DRAG & DROP-FIX */


.tippy-box[data-theme~='adiutor-dark'] {
    background: #1e2024;
    border: 1px solid var(--adiutor-border-color);
    border-radius: 8px;
    color: var(--adiutor-text-primary);
}

.tippy-box[data-theme~='adiutor-dark'][data-placement^='top'] > .tippy-arrow::before {
    border-top-color: #1e2024;
}
#eventModal .ql-toolbar.ql-snow {
    background: #2b3035;
    border: 1px solid #495057; border-bottom: none;
    border-radius: .375rem .375rem 0 0;
}
#eventModal .ql-container.ql-snow {
    background: #212529; border: 1px solid #495057;
    color: #f8f9fa; min-height: 120px;
}
#eventModal .ql-snow .ql-stroke { stroke: #f8f9fa; }
#eventModal .ql-snow .ql-picker-label { color: #f8f9fa; }





/* =================================================================== */
/* FINALER KALENDER-FIX (VERSION 3) - BITTE ALLE ANDEREN FIXES ERSETZEN */
/* =================================================================== */

/* 1. Events auf volle Breite strecken */
.fc .fc-daygrid-event-harness {
    display: block !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

.fc .fc-daygrid-event {
    width: 100% !important;
    padding: 0px 5px !important;

    margin: 2px 0 0 0 !important; /* Kleiner Abstand nur oben */
    border-radius: 0 !important;
}

.fc .fc-event-main {
    width: 100% !important;
    border-radius: 0 !important;
}

/* 2. Drag & Drop Korrektur für transformierte Layouts (AdminLTE etc.) */
.fc-event-dragging {
  /* Zwingt das Element, sich am Fenster auszurichten */
  position: fixed !important;

  /* Stellt sicher, dass es über allem schwebt */
  z-index: 9999 !important;

  /* Visueller "Anhebe"-Effekt */
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5) !important;
  transform: scale(1.05);
  background: #36383f; /* Solider Hintergrund für das gezogene Element */
}