/* Header */
.app-header {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    width: 100%;
    height: 60px;
    background-color: #30383c;
    -webkit-box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.3);
    -moz-box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.3);
    box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.3);
    transition: height 0.3s ease;
}

.header-scrolled .app-header {
    height: 40px;
}

.zoho-icon {
    background-image: url("/jakarta.faces.resource/images/zoho.png.xhtml;jsessionid=UoTP3geOBxKU4g2Uj-XLfsrqEHgxOFCRHmKg6pwt.a95364260aad");
    background-repeat: no-repeat;
    background-size: 16px 16px; /* Skaliert das Bild auf 16x16 */
    width: 16px; /* Breite des Icons */
    height: 16px; /* Höhe des Icons */
}

.color-dot {
    display:inline-block;
    width:13px;
    height:13px;
    border-radius:50%;
    border:1px solid rgba(0,0,0,.15); /* feine Kontur */
    margin-right:.5rem;
    vertical-align:middle;
}

.app-logo {
    padding: 8px;
    height: 60px;
    width: 60px;
    transition: all 0.3s ease;
}

.header-scrolled .app-logo {
    padding: 5px;
    height: 40px;
    width: 40px;
}

.header-panel-grid {
    width: 100%;
    height: 60px;
    background-color: transparent;
    border-spacing: 0;
    padding: 0;
    transition: height 0.3s ease;
}

.header-scrolled .header-panel-grid {
    height: 40px;
}

body .header-panel-grid .header-grid-icon {
    border: none;
    width: 60px;
    background-color: transparent;
    padding: 0;
    transition: width 0.3s ease;
}

body.header-scrolled .header-panel-grid .header-grid-icon {
    width: 40px;
}

body .header-panel-grid .header-grid-appname {
    border: none;
    width: calc(100% - 60px);
    background-color: transparent;
    padding: 0;
    transition: width 0.3s ease;
}

body.header-scrolled .header-panel-grid .header-grid-appname {
    width: calc(100% - 40px);
}

body .app-name {
    color: white;
    text-align: center;
    font-size: 1.8em;
    width: 100%;
    display: inline-block;
    padding-block: 5px;
    transition: font-size 0.3s ease, padding 0.3s ease;
}

body.header-scrolled .app-name {
    font-size: 1.2em;
    padding-block: 2px;
}

.sidebar {
    overflow: auto;
    position: fixed;
    top: 60px;
    left: 0;
    width: 300px;
    height: calc(100% - 60px);
    background-color: #ffffff;
    z-index: 1000;
    -webkit-box-shadow: 0 0px 10px rgba(0, 0, 0, 0.3);
    -moz-box-shadow: 0 0px 10px rgba(0, 0, 0, 0.3);
    box-shadow: 0 0px 10px rgba(0, 0, 0, 0.3);
    padding-bottom: 60px;
    transition: top 0.3s ease, height 0.3s ease, width 0.3s ease;
}

.header-scrolled .sidebar {
    top: 40px;
    height: calc(100% - 40px);
}

.sidebar-menu {
    width: 300px;
    font-size: 1.5em;
    transition: width 0.3s ease;
}

body .ui-menu .ui-menu-list .ui-menuitem .sidebar-menu-subitem {
    padding-left:  2.5em;
}

/* Sidebar Collapse */
.sidebar .ui-menuitem-text {
    transition: opacity 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
}

.sidebar .ui-menuitem-link {
    transition: padding 0.3s ease;
}

.sidebar .ui-menuitem-icon {
    transition: margin 0.3s ease;
}

body.sidebar-collapsed .sidebar {
    width: 60px;
    overflow: visible;
}

body.sidebar-collapsed .sidebar-menu {
    width: 60px;
}

body.sidebar-collapsed .sidebar .ui-menuitem-text {
    display: none;
}

body.sidebar-collapsed .sidebar .ui-submenu-header {
    display: none;
}

/* Gesamtes Submenu-Header <li> verstecken (PrimeFaces rendert es als ui-widget-header) */
body.sidebar-collapsed .sidebar .ui-menu .ui-menu-list > li.ui-widget-header {
    display: none !important;
}

/* Submenu-Liste immer sichtbar + Padding/Margin entfernen */
body.sidebar-collapsed .sidebar .ui-menu .ui-menu-list .ui-submenu-list {
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
}

body.sidebar-collapsed .sidebar .ui-menuitem-link {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0.6em 0;
    position: relative;
}

/* Submenu-Items: Einrueckung komplett entfernen */
body.sidebar-collapsed .sidebar .ui-menuitem .sidebar-menu-subitem {
    padding-left: 0 !important;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0.6em 0 !important;
}

body.sidebar-collapsed .sidebar .ui-menuitem-icon {
    margin-right: 0;
    font-size: 1.3em;
}

/* Tooltip: Menutext als Hover-Tooltip rechts neben Icon anzeigen */
body.sidebar-collapsed .sidebar .ui-menuitem-link:hover .ui-menuitem-text {
    display: block;
    position: absolute;
    left: 60px;
    top: 50%;
    transform: translateY(-50%);
    background-color: #333;
    color: #ffffff !important;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 0.7em;
    white-space: nowrap;
    z-index: 1100;
    pointer-events: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

body.sidebar-collapsed .content {
    margin-left: 60px;
}

body.sidebar-collapsed .footer {
    margin-left: 60px;
}

body.sidebar-collapsed .footer-panel-grid {
    margin-left: 60px;
    width: calc(100% - 60px);
}

.sidebar-toggle {
    position: absolute;
    bottom: 10px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: flex-end;
    padding-right: 10px;
}

body.sidebar-collapsed .sidebar-toggle {
    justify-content: center;
    padding-right: 0;
}

.sidebar-toggle-btn {
    width: 36px;
    height: 36px;
    background-color: #f4f4f4;
    border: 1px solid #d0d0d0;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1em;
    color: #555;
    transition: background-color 0.2s ease;
}

.sidebar-toggle-btn:hover {
    background-color: #e0e0e0;
    color: #333;
}
/* Whole Page */

.main-container {
    min-height: 100vh;
}

/* Wenn PrimeFaces-Icon benutzt wird */
body .ui-menubar .ui-menuitem-link.loading .ui-menuitem-icon,
.ui-button.loading .ui-button-icon-left {
    /* Normales Icon ausblenden */
    display: none !important;
}

body .ui-menubar .ui-menuitem-link.loading,
.ui-button.loading {
    /* Optional: Text ausgrauen, Button deaktiviert aussehen lassen */
    opacity: 0.8;
    pointer-events: none; /* kein weiterer Klick */
}

/* Zusätzlich einen Spinner als Background-Icon anzeigen */
body .ui-menubar .ui-menuitem-link.loading::before,
.ui-button.loading::before {
    font-family: "primeicons";
    content: "\e926"; /* pi-spinner */
    display: inline-block;
    margin-right: .5rem;
    animation: spin 1s linear infinite;
}

/* Spinner-Animation */
@keyframes spin {
    0%   { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* normales Menuitem-Icon */
body .ui-menubar .ui-menuitem-link .ui-menuitem-icon {
    transition: opacity .2s;
}

body .ui-menu .ui-menu-list .ui-menuitem .ui-menuitem-link.ui-menubar-end {
    display: block; /* Macht den `<a>`-Tag blockartig, um ihn leicht zu stylen */
    padding: 5px 10px; /* Innenabstand des Links */
    text-decoration: none; /* Entfernt Unterstreichung */
}

body .ui-panel.collapsablePanel>div {
    border-top: none;
    padding: 0;
}

body .ui-panel.collapsablePanel>div>table>tbody>tr>td {
    border: none;
}

.content {
    margin-left: 300px;
    padding: 60px 0 0 0;
    transition: padding-top 0.3s ease, margin-left 0.3s ease;
}

.header-scrolled .content {
    padding-top: 40px;
}

.page-description {
    background-image: -moz-linear-gradient(277deg, #1b81d7 0%, #1f4869 100%);
    background-image: -webkit-gradient(linear, left bottom, right top, color-stop(0%, #1b81d7), color-stop(100%, #1f4869));
    background-image: -webkit-linear-gradient(277deg, #1b81d7 0%, #1f4869 100%);
    background-image: -o-linear-gradient(277deg, #1b81d7 0%, #1f4869 100%);
    background-image: -ms-linear-gradient(277deg, #1b81d7 0%, #1f4869 100%);
    background-image: linear-gradient(277deg, #1b81d7 0%, #1f4869 100%);
    filter: progid:DXImageTransform.Microsoft.gradient( endColorstr='#1b81d7', startColorstr='#1f4869',GradientType=1 );
    height: auto;
    padding: 32px;
}

.page-description-name {
    font-size: 1.2em;
    color: white;
    font-weight: bold;
}

.page-description-text {
    color: white;
    font-style: italic;
}

.page-content {
    padding: 32px;
    background-color: #ffffff;
    border: solid 1px #e1e7e8;
}


/* Footer */
.footer {
    margin-left: 300px;
    transition: margin-left 0.3s ease;
}

.footer-panel-grid {
    margin-left: 300px;
    width: calc(100% - 300px);
    transition: margin-left 0.3s ease, width 0.3s ease;
}

body .footer-panel-grid .footer-left {
    border: none;
    width: 50%;
    float: left;
    padding: .5em;
    font-size: 0.75em;
    color: #666;
    font-family: 'Open Sans', sans-serif;
    font-size: 14px;
}

body .footer-panel-grid .footer-right{
    border: none;
    width: 50%;
    float: right;
    padding: .5em;
    font-size: 0.75em;
    color: #666;
    font-family: 'Open Sans', sans-serif;
    font-size: 14px;
    text-align: right
}

.errorRow .ui-column-filter, .errorRow td {
    background-color: #ffcccc; /* Rot für Fehler */
}
.warningRow .ui-column-filter, .warningRow td {
    background-color: #ffffcc; /* Gelb für Warnungen */
}

.icon-warning {
    color: #ffd700;
}

.icon-error {
    color: red;
}

.icon-info {
    color: #2196f3;
}

.dezente-scrollbar {
    max-height: 6em; /* Höhe anpassen, um genau 2 Zeilen Text zu zeigen */
    overflow-y: auto; /* Vertikales Scrollen erlauben */
    transition: all 0.3s; /* Weiche Übergänge für das Erscheinen der Scrollbar */
}

.dezente-scrollbar::-webkit-scrollbar {
    width: 2px; /* Breite der Scrollbar */
}

.dezente-scrollbar::-webkit-scrollbar-thumb {
    background-color: transparent; /* Scrollbar unsichtbar machen, wenn nicht gehovered */
    border-radius: 15px;
}

.dezente-scrollbar:hover::-webkit-scrollbar-thumb {
    background-color: #ccc; /* Farbe der Scrollbar beim Hover */
}

.ui-datatable table {
    border-collapse: collapse; /* Ermöglicht das Anzeigen von Rahmen zwischen Zellen */
    width: 100%; /* Optional: Stellt sicher, dass die Tabelle die volle Breite einnimmt */
    border: 1px solid #ddd; /* Rahmenfarbe und -stärke für die gesamte Tabelle */
    font-size: 12px;
}

.ui-datatable tbody tr:nth-child(even) {
    background-color: #f2f2f2; /* Graue Farbe für jede zweite Zeile */
}

.ui-datatable thead th {
    border-bottom: 2px solid #ddd; /* Stärkerer unterer Rahmen für Kopfzeilen */
    border-right: 1px solid #ddd; /* Fügt einen rechten Rahmen zu den Kopfzeilen hinzu */
    font-size: 14px;
}

.ui-datatable tbody td {
    border-right: 1px solid #ddd; /* Fügt einen rechten Rahmen zu den Tabellenzellen hinzu */
    padding-top: 0.5rem; /* Reduziert das obere Padding */
    padding-bottom: 0.5rem; /* Reduziert das untere Padding */
}

/* Entfernt den rechten Rahmen der letzten Spalte, um doppelte Rahmen zu vermeiden */
.ui-datatable tbody td:last-child,
.ui-datatable thead th:last-child {
    border-right: none;
}

.ui-datatable-resizable thead th,
.ui-datatable-resizable tbody td,
.ui-datatable-resizable tfoot td {
    white-space: normal;
}

body .ui-datatable .ui-datatable-data > tr > td {
    padding: 0.5rem;
    border-width: 0px 1px 1px 0;
}