:root {
    --accent-color: #ffffff;
    --accent-fill-color: #1292ff;
    --accent-fill-rest: #146ae7;
    --accent-highlight-color: #ffffff;
    --accent-highlight-fill-color: #146ae7;
    --accent-highlight-hover-color: #ffffff;
    --accent-highlight-hover-fill-color: #1067e5;
    --svg-fillcolor-primary: #e60000;
    --svg-fillcolor-primary-dark: #c23636;
    --svg-fillcolor-secondary: #0a58ca;
    --svg-fillcolor-secondary-dark: #2e76df;
    --svg-fillcolor-tertiary: #6c757d;
    --svg-fillcolor-tertiary-dark: #afc7e0;
    --neutral-fill-input-rest: #ffffff;
    --neutral-stroke-input-rest: linear-gradient(#efefef calc(100% - 1px), #929292 calc(100% - 1px), #929292);
    --neutral-fill-input-focus: #ffffff;
    --neutral-stroke-focus: #d6d6d6;
    --error: #BC2F32;
}

:root {
    --surface: #ffffff;
    --surface1: #f6f8fc;
    --surface2: #f1f5fb;
    --surface3: #f0f4fc;
    --surface4: #eff2fd;
    --surface5: #eaf0fa;
    --surface-variant: #e0e3e0;
    --bs-primary: #0b57ce;
    --bs-primary-rgb: 11, 87, 206;
    --bs-on-primary: #ffffff;
    --bs-secondary: #00639b;
    --bs-secondary-rgb: 0, 99, 155;
    --bs-tertiary: #146c2f;
    --bs-tertiary-rgb: 20, 108, 47;
    --bs-body-bg: var(--surface);
    --nav-item-bg: #fbfbfb;
    --nav-itemhover-bg: #efefef;
}

    :root[data-bs-theme="dark"] {
        --accent-fill-rest: #8ec6e8;
        --accent-highlight-color: #ffffff;
        --accent-highlight-fill-color: #1c4785;
        --accent-highlight-hover-color: #ffffff;
        --accent-highlight-hover-fill-color: #265ba7;
        --surface: #1f1f1f;
        --surface1: #282a2e;
        --surface2: #2d2f33;
        --surface3: #31353b;
        --surface4: #31353b;
        --surface5: #35393f;
        --surface-variant: #454847;
        --bs-primary: #a8c8fc;
        --bs-on-primary: #062e6e;
        --nav-item-bg: #272727;
        --nav-itemhover-bg: #383838;
    }

[data-bs-theme="dark"] .btn-primary {
    --bs-btn-color: var(--bs-on-primary);
    --bs-btn-bg: var(--bs-primary);
    --bs-btn-hover-color: var(--bs-on-primary);
    --bs-btn-hover-bg: #92b9fb;
    /*        --bs-btn-border-color: #0d6efd;
        --bs-btn-hover-border-color: #0a58ca;
        --bs-btn-active-color: #fff;
        --bs-btn-active-bg: #0a58ca;
        --bs-btn-active-border-color: #0a53be;
        --bs-btn-disabled-bg: #0d6efd;
        --bs-btn-disabled-border-color: #0d6efd;
*/
}

.btn-link {
    --bs-btn-color: var(--bs-table-color-state, var(--bs-table-color-type, var(--bs-table-color)));
    /*--bs-btn-color: var(--bs-link-color);*/
    text-decoration: none;
}

html {
    position: relative;
    min-height: 100%;
}

.stack-horizontal {
    display: flex;
    flex-direction: row;
}

.stack-vertical {
    display: flex;
    flex-direction: column;
}

.layout {
    height: 100%;
    width: 100%;
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
}


.layout .app-header {
    display:flex;
    flex-direction: row;
    justify-content:space-between;
    width: 100%;
    min-height: 60px;
    max-height: 60px;
    background-color: var(--surface2);
}

.layout .navbar {
    min-height: 60px;
    max-height: 60px;
    background-color: var(--surface2);
}
    .layout .navbar ul {
        list-style: none;
        margin: 0;
        padding: 0;
    }

#navbarCollapse {
    background-color: var(--surface3);
}

.main-body {
    min-height: calc(100dvh - 120px); /* 100% - navbar (60px) - footer (60px) */
    width: 100%;
    color: var(--bs-body-color);
    display: flex;
    flex-direction: row;
    row-gap: 10px;
    align-items: stretch;
    justify-content: start;
    column-gap: 10px;
}

/* Standard: Sidebar sichtbar */
.sidebar-menu-wrapper {
    transition: transform 0.25s ease, opacity 0.25s ease;
}

    /* Desktop: Sidebar ausgeblendet → nimmt keinen Platz ein */
    .sidebar-menu-wrapper.is-hidden {
        display: none;
    }

.sidebar-menu {
    width: 250px;
    padding: 0px 2px;
}
    .sidebar-menu.collapsed {
        max-width: 45px !important;
    }
        .sidebar-menu.collapsed .expand-collapse-button {
            display:none;
        }

.sidebar-menu-item {
    margin: 4px 0;
    -webkit-user-select: none;
    user-select: none;
}

    .sidebar-menu-item .positioning-region {
        display: flex;
        width: 100%;
        position: relative;
        align-items: center;
        box-sizing: border-box;
        background: var(--nav-item-bg);
        border: 1px solid transparent;
        border-radius: 4px;
        min-height: 33px;
    }

    .sidebar-menu-item:not(.disabled) .positioning-region:hover:not(:has(.disabled)) {
        cursor: pointer;
        background: var(--nav-itemhover-bg);
    }

    .sidebar-menu-item .active .positioning-region {
        background: var(--nav-itemhover-bg);
    }

        .sidebar-menu-item .active .positioning-region::before {
            content: "";
            display: block;
            position: absolute;
            right: unset;
            width: 3px;
            height: calc(((8 + 0) * 4 / 2) * 1px);
            background: var(--accent-fill-rest);
            border-radius: calc(4 * 1px);
            margin: 8px 2px;
            z-index: 5;
        }
    .sidebar-menu-item .positioning-region .content-region {
        display: flex;
        align-items: center;
        white-space: nowrap;
        width: 100%;
        margin-inline-start: 8px;
    }

.sidebar-menu-item-link {
    width: 100%;
    color: inherit;
    align-items: center;
    text-decoration: none;
    display: flex;
}
.sidebar-menu-item-text {
    margin-inline-start: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    width: calc(100% - 70px);
    font-size: 0.875rem;
}

.stage-wrapper {
    align-self: stretch;
    height: calc(100dvh - 120px) !important;
    display: flex;
    margin: 0;
    overflow-y: auto;
    overflow-x: hidden;
    align-items: flex-start;
    width: 100%;
}

.stage {
    width: 100%;
    height: 100%;
    padding-left:20px;
    padding-right:20px;
}


.main-footer {
    min-height: 60px;
    max-height: 60px;
    margin: 0;
    padding: 0 8px;
    overflow-x: hidden;
    background-color: var(--surface2);
}

/* Bis lg (wenn weniger als 992px) */
@media (max-width: 991.98px) {
    .main-body {
        flex-direction:column;
    }

    /* Mobile: Sidebar ist Off-Canvas */
    .sidebar-menu-wrapper {
        position: fixed;
        top: 60px;
        left: 0;
        /*height: calc(100dvh - 60px);*/
        width: 100%;
        background: var(--bs-body-bg);
        box-shadow: 2px 0 8px rgba(0,0,0,0.2);
        transform: translateX(-250px);
        opacity: 0;
        display: block;
        z-index: 2000;
    }

        /* Mobile: geöffnet */
        .sidebar-menu-wrapper.is-open {
            transform: translateX(0);
            opacity: 1;
        }

    .sidebar-menu {
        width: 100dvw !important;
        max-width: 100dvw !important;
    }
        .sidebar-menu.collapsed {
            width: 100dvw !important;
            max-width: 100dvw !important;
        }
    #sidebar-menu-expander {
        display: none;
    }
    .stage {
        padding-left: 10px;
        padding-right: 10px;
    }
}

/**************************
 Page Header
***************************/
.page-header {
    align-items: start;
    justify-content: start;
    column-gap: 10px;
    row-gap: 10px;
    width: 100%;
    padding-top: 3rem;
    padding-bottom: 3rem;
}
.page-header-headline {
    justify-content: center;
    align-items: center;
    column-gap: 10px;
    row-gap: 10px;
    width: 100%;
    margin-bottom: 0.5rem;
}
.page-header-icon {
    width: 42px; 
    height:42px;
}
.page-header-title {
    font-size: 40px;
    line-height: 52px;
    font-weight: 600;
    margin-block: 0px;
    margin-top: 0;
    margin-bottom: 0;
}
.page-header-subheadline {
    justify-content: center;
    align-items: center;
    column-gap: 10px;
    row-gap: 10px;
    width: 100%;
}
/**************************
 Input Styling
***************************/
.ad-input-container {
    z-index: 0;
    display: inline-block;
    width: 100%;
    font-family: var(--bs-body-font-family);
    /*font-size: var(--type-ramp-plus-1-font-size);
    line-height: var(--type-ramp-plus-1-line-height);
    font-variation-settings: var(--type-ramp-plus-1-font-variations);*/
    font-size: var(--bs-body-font-size);
    line-height: var(--bs-body-line-height);
    font-weight: initial;
    color: var(--bs-body-color);
    fill: currentcolor;
    user-select: none;
    position: relative;
    box-sizing: border-box;
    position: relative;
    border: 1px solid transparent;
    border-top: none;
    border-left: none;
    border-right: none;
    border-radius: 0;
    height: 32px;
    background: padding-box linear-gradient(var(--bs-body-bg),var(--bs-body-bg)),border-box var(--bs-border-color);
}


    .ad-input-container:focus-within {
        background: padding-box linear-gradient(var(--bs-gray-100), var(--bs-gray-100)), border-box var(--bs-border-color);
        border-bottom: none;
    }

[data-bs-theme='dark'] .ad-input-container:focus-within {
    background: padding-box linear-gradient(#161616, #161616), border-box var(--bs-border-color);
}

.ad-input-container:hover {
    background: padding-box linear-gradient(var(--bs-gray-100), var(--bs-gray-100)), border-box var(--bs-border-color);
}

[data-bs-theme='dark'] .ad-input-container:hover {
    background: padding-box linear-gradient(var(--surface1), var(--surface1)), border-box var(--bs-border-color);
}

.ad-input-container::after {
    z-index: 999;
    content: '';
    background-color: #006cd4;
    position: absolute;
    pointer-events: none;
    height: 2px;
    width: 0;
    bottom: 0;
    left: 0;
    border-bottom: 2px solid var(--accent-fill-rest);
    border-bottom-left-radius: 40px;
    border-bottom-right-radius: 40px;
    transition: all 300ms cubic-bezier(0.1,0.9,0.2,1)
}

.ad-input-container:has(.ad-input-text.input-validation-error) {
    border: solid 1px var(--error);
    /*border-color: var(--error);*/
}

.ad-input-text {
    z-index: 2;
    width: 100%;
    outline: none;
    -webkit-appearance: none;
    color: inherit;
    background: transparent;
    border: none;
    height: calc(100% - 4px);
    margin-top: auto;
    margin-bottom: auto;
    padding: 0 9px;
}

    .ad-input-text:focus + .ad-input-container::after,
    .ad-input-container:focus-within::after {
        width: 100%;
    }

    /*.ad-input-text.input-validation-error {
        border-color: var(--error);
    }*/


/* Theme Icons */
[data-bs-theme="light"] .theme-icon-sun,
html:not([data-bs-theme="dark"]) .theme-icon-sun {
    display: none;
}
[data-bs-theme="dark"] .theme-icon-moon {
    display: none;
}


.text-error{
    color:var(--error);
}

.btn {
    border-radius: 4px;
}

/*.validation-message {
    width: 100%;
    color: var(--error);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}*/
/* Container für das Icon vorbereiten */
.validation-message.field-validation-error {
    color: var(--error);
    font-size: .85rem;
    font-family: "Segoe UI", sans-serif;
    display: inline-flex;
    align-items: center;
    gap: 8px; /* Abstand zwischen Icon und Text */
    margin-top: 4px;
}

    /* Das Info-Icon vor dem Text einfügen */
    .validation-message.field-validation-error::before {
        content: "i";
        font-family: "Segoe UI", Arial, sans-serif;
        font-weight: bold;
        font-size: 10px;
        color: var(--error);
        border: 1px solid var(--error);
        border-radius: 50%;
        width: 14px;
        height: 14px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0; /* Verhindert das Verzerren des Icons */
    }

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}


.spinner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(255,255,255,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

[data-bs-theme="dark"] .spinner {
    background: rgba(55,55,55,0.3);
}

.spinner.hidden {
    display: none;
}

.spinner-circle {
    width: 48px;
    height: 48px;
    border: 6px solid #ccc;
    border-top-color: #0078d4;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.partial-container.loading {
    opacity: 0.5;
    position: relative;
}

    .partial-container.loading::after {
        content: "";
        position: absolute;
        top: 50%;
        left: 50%;
        width: 32px;
        height: 32px;
        margin-left: -16px;
        margin-top: -16px;
        border: 4px solid #ccc;
        border-top-color: #0078d4;
        border-radius: 50%;
        animation: spin 0.8s linear infinite;
    }

.expand-collapse-button {
    position: absolute;
    right: 8px;
    left: unset;
    border-radius: 4px;
    width: 24px;
    height: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}
    .expand-collapse-button svg {
        transition: transform 0.1s linear 0s;
        pointer-events: none;
    }
.rotate.expand-collapse-button svg {
    transform: rotate(90deg);
}

.btn-svg {
    width: 32px;
    height: 32px;
    margin: 0;
    padding: 0;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}

.btn-svg-circle {
    width: 32px;
    height: 32px;
    margin: 0;
    padding: 0;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    border-radius: 50% !important;
}


.table-active {
    --bs-table-active-bg: var(--accent-highlight-fill-color) !important;
    --bs-table-active-color: var(--accent-highlight-color) !important;
    --bs-table-hover-color: var(--accent-highlight-hover-color) !important;
    --bs-table-hover-bg: var(--accent-highlight-hover-fill-color) !important;
}

.table-action-header {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    column-gap: 10px;

}
.tablecell-action {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    column-gap: 10px;
}
    .tablecell-action button {
        display: inline-flex;
        align-items: center; /* Zentriert vertikal */
        justify-content: center; /* Zentriert horizontal */
    }
.tablecell-action-link {
    height: 100%;
    align-items: center;
}
.tablecell-action-icon {
    fill: var(--bs-table-color);
}
    .tablecell-action-icon:hover {
        fill: var(--accent-fill-rest);
    }
table.dataTable tr.selected .tablecell-action-icon {
    fill: rgb(var(--dt-row-selected-text)) !important;
}



/* Mitarbeitertabelle */


.tablecell-employee-status {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    column-gap: 10px;
    width:100%;
}
    .tablecell-employee-status button {
        display: inline-flex;
        align-items: center; /* Zentriert vertikal */
        justify-content: center; /* Zentriert horizontal */
    }
.tablecell-employee-status-icon {
    fill: var(--bs-table-color);
    
}

table.dataTable tr.selected .tablecell-employee-status-icon {
    fill: rgb(var(--dt-row-selected-text)) !important;
}

/* Überschreibt die Bootstrap 5 / DataTables Schatten- und Variablen-Überlagerung */
table.dataTable tbody tr.selected > * {
    --bs-table-bg: var(--bs-primary) !important; 
    box-shadow: inset 0 0 0 9999px var(--bs-primary) !important; 
    color: var(--bs-on-primary) !important; 
}
 
/* Pagination First/Last Buttons komplett entfernen */
.dt-paging button.page-link.first,
.dt-paging button.page-link.last {
    display: none !important;
}

/* Info ausgewhählte Zeile, Spalte, Zelle entfernen */
.dt-info .select-info{
    display:none !important;
}



/* Chevron-Icon im Standardzustand (geschlossen) */
.sidebar-menu-item-link[aria-expanded="false"] .menu-item-expand-icon {
    transform: rotate(0deg);
    transition: transform 0.2s ease-in-out; /* Optionale weiche Animation */
}

/* Chevron-Icon im geöffneten Zustand */
.sidebar-menu-item-link[aria-expanded="true"] .menu-item-expand-icon {
    transform: rotate(90deg);
}

/*************************
 Validierung
**************************/
.validation-summary-errors ul {
    list-style: none !important;
    padding: 0 !important;
}
.validation-summary-errors ul li {
    list-style: none !important;
    padding: 0 !important;
}