﻿ /* Diese Regel erzwingt deine Wunschfarbe, egal was im 'style'-Attribut steht */
[style*="background-color: rgb(0, 158, 227)"] {
   /* background-color: #004a99 !important;  Deine neue Wunschfarbe */
    background-color: var(--color-blau-dunkel) !important;
    color: #ffffff !important;
    font-family: 'Segoe UI', Arial, sans-serif !important;
    height: 30px !important;
    line-height: 30px !important;
}


/* === Isolation Wrapper === */
#tms-web-portal-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--color-background);
}

/* === Navigation (Obere Leiste) === */
#tms-web-portal-wrapper .navbar {
    color: var(--color-sidebar-text);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 1030;
    padding: 0.4rem 1rem;
}

#tms-web-portal-wrapper .top-background {
    background-color: var(--color-blau-dunkel) !important;
}

#tms-web-portal-wrapper .navbar-light .navbar-nav .nav-link {
    color: var(--color-sidebar-text) !important;
    font-size: 1.1rem;
    font-weight: 500;
    padding: 0.4rem 1.2rem !important;
}


/* Hover-Effekt für die Sidebar-Links */
#tms-web-portal-wrapper .sidebar-left .nav-link:hover {
    background-color: var(--color-sidebar-left-active-background) !important;
    color: var(--color-primary) !important;
    transform: translateX(5px); /* Kleiner Bewegungseffekt nach rechts */
    border-radius: 4px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Optional: Hover-Effekt für die obere Navbar (Top) */
#tms-web-portal-wrapper .navbar-nav .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--color-primary) !important;
    border-radius: 4px;
}


#tms-web-portal-wrapper .navbar-brand {
    display: flex;
    align-items: center;
    color: var(--color-sidebar-text);
    font-weight: bold;
}

#tms-web-portal-wrapper .brand-logo {
    margin-left: 10px;
    height: 55px;
    width: auto;
}

#tms-web-portal-wrapper .brand-text {
    font-size: 2.2rem;
    font-weight: 700;
    margin-left: 20px;
}

/* === Sidebar (Links) === */
#tms-web-portal-wrapper .sidebar-left {
    width: 280px;
    flex-shrink: 0;
    color: var(--color-sidebar-text);
    padding-top: 1.5rem !important;
}

#tms-web-portal-wrapper .sidebar-left .nav-link {
    color: var(--color-sidebar-text);
    font-size: 1.2rem;
    padding: 15px 20px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    transition: all 0.2s ease;
}

#tms-web-portal-wrapper .sidebar-left .nav-link i {
    font-size: 1.4rem;
    margin-right: 15px;
}

#tms-web-portal-wrapper .sidebar-left .nav-link.active {
    background-color: var(--color-sidebar-left-active-background);
    font-weight: 600;
    border-left: 5px solid var(--color-sidebar-left-border-left-active-background);
    border-radius: 0 4px 4px 0;
    padding-left: 15px;
}

/* === Hauptinhalt === */
#tms-web-portal-wrapper .content {
    flex-grow: 1;
    overflow-y: auto;
}

#tms-web-portal-wrapper h1 {
    color: #0d6efd;
}

/* === Karten & Elemente === */
#tms-web-portal-wrapper .card {
    border: 1px solid #2071c2;
}

/* === Footer === */
#tms-web-portal-wrapper .bg-meinblau {
    background: linear-gradient(to right, var(--color-blau-dunkel), var(--color-blau-hell));
}

#tms-web-portal-wrapper footer {
    color: var(--color-footer-text) !important;
    flex-shrink: 0;
    font-size: 0.95rem;
    padding: 1rem 0;
}

#tms-web-portal-wrapper footer a {
    color: var(--color-sidebar-text);
    text-decoration: none;
    margin: 0 10px;
}




/* Erzeugt die Farben und Maße für die Combobox innerhalb des Wrappers */
#tms-web-portal-wrapper select.form-control {
    height: calc(2.25rem + 2px); /* Standard Bootstrap Höhe */
    cursor: pointer;
    background-color: #ffffff !important;
    color: #495057 !important; /* Ein dunkles Grau/Schwarz */
    border: 1px solid #ced4da !important;
}

/* Speziell für die Einträge (Items) in der Liste */
#tms-web-portal-wrapper select.form-control option {
    background-color: #ffffff   !important;
    color: #004a99 !important;
    padding: 5px;
}

/* Fokus-Zustand (wenn man reinklickt) */
#tms-web-portal-wrapper select.form-control:focus {
    background-color: #ffffff !important;
    color: #495057 !important;
    border-color: #80bdff !important;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25) !important;
}



#tms-web-portal-wrapper .card-header {
  padding-top: 0.25rem !important;
  padding-bottom: 0.25rem !important;
  background-color: #f8f9fa;
  border-bottom: 1px solid #dee2e6;
}

#tms-web-portal-wrapper .card-title {
  margin-bottom: 0 !important;
  font-size: 1.1rem !important;
  line-height: 1.2 !important;
  padding-top: 0.1rem !important;
  padding-bottom: 0.1rem !important;
}



/* Die Haupt-Kette auf volle Höhe setzen */


/* Der Bereich zwischen Navbar und Footer */
#tms-web-portal-wrapper main {
    flex: 1 0 auto; /* Erlaubt dem Hauptteil zu wachsen */
    display: flex;
}

/* Der rechte Inhaltsbereich */
#tms-web-portal-wrapper .content {
    display: flex;
    flex-direction: column;
    height: auto; /* Wichtig für Flexbox-Wachstum */
}

/* Die Card soll nun den Rest des Platzes einnehmen */
#tms-web-portal-wrapper .card-user {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    margin-bottom: 0.5rem; /* Kleiner Abstand zum Footer */
}

/* Der Body der Card muss ebenfalls ein Flex-Container sein,
   damit das Grid darin nach unten wachsen kann */
/* Verhindere, dass die Card-Body den Scrollvorgang schluckt */
#tms-web-portal-wrapper .card-body {
    display: flex;
    flex-direction: column;
    overflow: hidden !important; /* Card darf NIE scrollen */
}

/* Das Grid-Container Element füllt den restlichen Platz im Card-Body */
#gridContainer_id {
    flex-grow: 1;
    min-height: 300px; /* Mindesthöhe, damit es nicht kollabiert */
    overflow-y: auto;
}




/*09.02.2026*/
//* Der äußere Rahmen */
/* Den gesamten Wrapper auf die Fensterhöhe zwingen */
#tms-web-portal-wrapper {
    height: 100vh; /* Exakt 100% der Viewport-Höhe */
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Verhindert das Scrollen der gesamten Seite */
}

/* Der Main-Bereich füllt alles zwischen Navbar und Footer */
#tms-web-portal-wrapper main {
    flex: 1;
    overflow: hidden;
    display: flex;
}

/* Die Card muss sich im Inhaltsbereich strecken */
#tms-web-portal-wrapper .card-user {
    display: flex;
    flex-direction: column;
    height: 100%;
    margin-bottom: 0;
}

/* Der Card-Body hält oben das Formular und unten das Grid */
#tms-web-portal-wrapper .card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 1rem;
}

/* DAS GRID: Es bekommt den Rest-Platz */
#gridWrapper {
    flex: 1; /* Füllt den verbleibenden Platz in der Card */
    display: flex;
    flex-direction: column;
    min-height: 0; /* Wichtig für Flexbox-Berechnung! */
}

#gridContainer_id {
    flex: 1;
    overflow-y: auto !important;
    position: relative;
}

/* Footer fixieren */
#tms-web-portal-wrapper footer {
    flex-shrink: 0; /* Darf nicht zusammengedrückt werden */
}
