.material-symbols-outlined {
            font-variation-settings:
                'FILL' 0,
                'wght' 400,
                'GRAD' 0,
                'opsz' 24;
            font-size: 1em;
            vertical-align: middle;
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        html {
            height: 100%;
        }

        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            min-height: 100%;
            min-height: 100vh;
            min-height: 100dvh;
            padding: 20px;
        }

        /* Eingeloggt: Hauptspalte füllt die Höhe bis zum Footer (weißer Block wächst mit). */
        body:not(.page-login) {
            display: flex;
            flex-direction: column;
        }

        body:not(.page-login) .container {
            flex: 1 1 auto;
            display: flex;
            flex-direction: column;
            min-height: 0;
            width: 100%;
        }

        body:not(.page-login) .content {
            flex: 1 1 auto;
            min-height: 0;
        }

        /* Nur Login-Formular: kein Header/Footer, Inhalt zentriert */
        body.page-login {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 24px 16px;
        }

        body.page-login .container {
            max-width: 500px;
            width: 100%;
            margin: 0 auto;
        }

        body.page-login .content {
            margin: 0;
        }

        .container {
            max-width: 1400px;
            margin: 0 auto;
        }

        header.site-header {
            background: white;
            border-radius: 12px;
            padding: 14px 22px;
            margin-bottom: 30px;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
            display: flex;
            align-items: center;
            gap: 16px 24px;
            flex-wrap: nowrap;
        }

        header.site-header h1 {
            color: #333;
            font-size: clamp(1.05rem, 2vw, 1.35rem);
            margin: 0;
            flex: 0 0 auto;
            white-space: nowrap;
            line-height: 1.2;
        }

        h1 .site-title-link {
            color: inherit;
            text-decoration: none;
            display: inline-flex;
            align-items: center;
            gap: 0.3em;
        }

        h1 .site-title-link:hover {
            color: #667eea;
        }

        header.site-header nav {
            display: flex;
            flex-wrap: nowrap;
            align-items: center;
            gap: 8px 12px;
            margin: 0;
            flex: 1 1 auto;
            min-width: 0;
            justify-content: flex-start;
            font-size: 1rem;
        }

        header.site-header nav>a,
        header.site-header nav>.nav-absence,
        header.site-header nav>.nav-xentral {
            flex-shrink: 0;
        }

        header.site-header nav a {
            color: #667eea;
            text-decoration: none;
            padding: 7px 12px;
            border-radius: 6px;
            transition: all 0.3s;
            font-weight: 500;
        }

        header.site-header nav a:hover,
        header.site-header nav a.active {
            background: #667eea;
            color: white;
        }

        .nav-xentral,
        .nav-absence {
            position: relative;
        }

        .nav-xentral-trigger {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 7px 12px;
            border-radius: 6px;
            border: none;
            background: transparent;
            font: inherit;
            font-weight: 500;
            color: #667eea;
            cursor: pointer;
            transition: all 0.3s;
        }

        .nav-absence-trigger {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            padding: 7px 12px;
            border-radius: 6px;
            border: none;
            background: transparent;
            font: inherit;
            font-weight: 500;
            color: #667eea;
            cursor: pointer;
            transition: all 0.3s;
        }

        .nav-xentral-trigger:hover,
        .nav-xentral.open .nav-xentral-trigger,
        .nav-absence-trigger:hover,
        .nav-absence.open .nav-absence-trigger {
            background: #667eea;
            color: white;
        }

        .nav-xentral.nav-xentral-active:not(.open) .nav-xentral-trigger,
        .nav-absence.nav-absence-active:not(.open) .nav-absence-trigger {
            background: #667eea;
            color: white;
        }

        .nav-xentral-chevron,
        .nav-absence-chevron {
            font-size: 20px;
            transition: transform 0.2s;
        }

        .nav-xentral.open .nav-xentral-chevron,
        .nav-absence.open .nav-absence-chevron {
            transform: rotate(180deg);
        }

        .nav-xentral-dropdown,
        .nav-absence-dropdown {
            display: none;
            position: absolute;
            left: 0;
            top: calc(100% + 8px);
            min-width: 240px;
            background: #fff;
            border-radius: 10px;
            box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
            border: 1px solid #e9ecef;
            z-index: 2000;
            overflow: hidden;
        }

        .nav-xentral.open .nav-xentral-dropdown,
        .nav-absence.open .nav-absence-dropdown {
            display: block;
            animation: slideUp 0.18s ease;
        }

        .nav-xentral-dropdown a,
        .nav-absence-dropdown a {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 10px 14px;
            color: #333;
            text-decoration: none;
            font-weight: 500;
            border-radius: 0;
        }

        .nav-xentral-dropdown a:hover,
        .nav-absence-dropdown a:hover {
            background: #f0f4ff;
            color: #667eea;
        }

        .nav-xentral-dropdown a.nav-xentral-current,
        .nav-absence-dropdown a.nav-absence-current {
            background: #e8edff;
            color: #667eea;
        }

        .nav-xentral-trigger .nav-xentral-logo-mark {
            width: 18px;
            height: 18px;
            flex-shrink: 0;
            border-radius: 4px;
            display: block;
        }

        .nav-xentral-trigger:hover .nav-xentral-logo-mark,
        .nav-xentral.open .nav-xentral-trigger .nav-xentral-logo-mark,
        .nav-xentral.nav-xentral-active:not(.open) .nav-xentral-trigger .nav-xentral-logo-mark {
            filter: brightness(0) invert(1);
        }

        header.site-header nav>a.nav-link-icon {
            display: inline-flex;
            align-items: center;
            gap: 6px;
        }

        header.site-header nav>a.nav-link-icon .material-symbols-outlined {
            font-size: 20px;
            line-height: 1;
        }

        .nav-user {
            position: relative;
            margin-left: auto;
            flex-shrink: 0;
        }

        .nav-user-trigger {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 4px 8px 4px 4px;
            border: none;
            background: rgba(102, 126, 234, 0.12);
            border-radius: 999px;
            cursor: pointer;
            font: inherit;
            color: #333;
            transition: background 0.2s;
        }

        .nav-user-trigger:hover,
        .nav-user.open .nav-user-trigger {
            background: rgba(102, 126, 234, 0.22);
        }

        .nav-user-avatar {
            width: 36px;
            height: 36px;
            border-radius: 50%;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: #fff;
            font-size: 13px;
            font-weight: 700;
            letter-spacing: 0.02em;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }

        .nav-user-avatar--image {
            padding: 0;
            overflow: hidden;
            background: #e9ecef;
        }

        .nav-user-avatar--image img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
        }

        .nav-user-chevron {
            font-size: 20px;
            color: #667eea;
            transition: transform 0.2s;
        }

        .nav-user.open .nav-user-chevron {
            transform: rotate(180deg);
        }

        .nav-user-dropdown {
            display: none;
            position: absolute;
            right: 0;
            top: calc(100% + 8px);
            min-width: 220px;
            background: #fff;
            border-radius: 10px;
            box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
            border: 1px solid #e9ecef;
            z-index: 2000;
            overflow: hidden;
        }

        .nav-user.open .nav-user-dropdown {
            display: block;
            animation: slideUp 0.18s ease;
        }

        .nav-user-dropdown-header {
            padding: 12px 14px;
            border-bottom: 1px solid #eee;
            background: #f8f9fa;
        }

        .nav-user-dropdown-name {
            display: block;
            font-weight: 600;
            font-size: 14px;
            color: #222;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .nav-user-dropdown-email {
            display: block;
            font-size: 12px;
            color: #666;
            margin-top: 2px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .nav-user-dropdown a {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 10px 14px;
            color: #333;
            text-decoration: none;
            font-weight: 500;
            border-radius: 0;
        }

        .nav-user-dropdown a:hover {
            background: #f0f4ff;
            color: #667eea;
        }

        .nav-user-dropdown a.nav-user-current {
            background: #e8edff;
            color: #4451c9;
        }

        .nav-user-dropdown a .material-symbols-outlined {
            font-size: 20px;
            color: #667eea;
        }

        .nav-user-logout {
            color: #c0392b !important;
            border-top: 1px solid #eee;
        }

        .nav-user-logout:hover {
            background: #fff5f5 !important;
            color: #a93226 !important;
        }

        .nav-header-right {
            margin-left: auto;
            display: flex;
            align-items: center;
            gap: 12px;
            flex-shrink: 0;
        }

        .nav-impersonation-bar {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            flex-wrap: nowrap;
            max-width: min(420px, 52vw);
            min-width: 0;
            padding: 4px 6px 4px 10px;
            background: #fff3cd;
            border: 1px solid #ffc107;
            border-radius: 8px;
            font-size: 13px;
            line-height: 1.2;
            color: #856404;
            white-space: nowrap;
        }

        .nav-impersonation-bar-text {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            min-width: 0;
            flex: 1 1 auto;
        }

        .nav-impersonation-bar-name {
            overflow: hidden;
            text-overflow: ellipsis;
            font-weight: 600;
            min-width: 0;
        }

        .nav-impersonation-bar-role {
            flex-shrink: 0;
            font-size: 11px;
            font-weight: 600;
            padding: 2px 7px;
            border-radius: 999px;
            background: rgba(255, 255, 255, 0.75);
            border: 1px solid rgba(133, 100, 4, 0.35);
            color: #664d03;
        }

        .nav-stop-impersonate-btn {
            padding: 6px 12px;
            border-radius: 6px;
            border: 1px solid #856404;
            background: #fff;
            color: #664d03;
            font-weight: 600;
            font-size: 13px;
            cursor: pointer;
            white-space: nowrap;
        }

        .nav-stop-impersonate-btn--icon {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 34px;
            height: 34px;
            padding: 0;
            border-radius: 8px;
            flex-shrink: 0;
        }

        .nav-stop-impersonate-btn--icon .material-symbols-outlined {
            font-size: 22px;
        }

        .nav-stop-impersonate-btn:hover {
            background: #664d03;
            color: #fff;
        }

        .breadcrumb-nav {
            margin: 0 0 18px 0;
            font-size: 13px;
            color: #6c757d;
        }

        .breadcrumb-nav ol {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            gap: 0;
            list-style: none;
            margin: 0;
            padding: 0;
        }

        .breadcrumb-nav li {
            display: inline-flex;
            align-items: center;
        }

        .breadcrumb-nav li:not(:last-child)::after {
            content: "/";
            margin: 0 10px;
            color: #ced4da;
            font-weight: 400;
            user-select: none;
        }

        .breadcrumb-nav a {
            color: #667eea;
            text-decoration: none;
            font-weight: 500;
        }

        .breadcrumb-nav a:hover {
            text-decoration: underline;
        }

        .breadcrumb-nav [aria-current="page"] {
            color: #495057;
            font-weight: 600;
        }

        .content {
            background: white;
            border-radius: 12px;
            padding: 30px;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        }

        .app-footer {
            margin-top: 24px;
            padding: 12px 0;
            text-align: center;
            font-size: 0.85rem;
            color: rgba(255, 255, 255, 0.85);
        }

        .app-footer span+span {
            margin-left: 0.5em;
            opacity: 0.9;
        }

        .stats {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 20px;
            margin-bottom: 30px;
        }

        .stat-card {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            padding: 20px;
            border-radius: 8px;
            text-align: center;
        }

        .stat-card h3 {
            font-size: 32px;
            margin-bottom: 5px;
        }

        .stat-card p {
            opacity: 0.9;
            font-size: 14px;
        }

        .badge {
            display: inline-block;
            padding: 4px 8px;
            border-radius: 4px;
            font-size: 12px;
            font-weight: 600;
        }

        .badge-active {
            background: #10b981;
            color: white;
        }

        .badge-inactive {
            background: #ef4444;
            color: white;
        }

        .btn {
            display: inline-block;
            padding: 8px 16px;
            background: #667eea;
            color: white;
            text-decoration: none;
            border-radius: 6px;
            transition: all 0.3s;
            border: none;
            cursor: pointer;
        }

        .btn:hover {
            background: #5568d3;
        }

        .btn-secondary {
            background: #6b7280;
        }

        .btn-secondary:hover {
            background: #4b5563;
        }

        /* Toast/Popup Styles */
        .toast-container {
            position: fixed;
            bottom: 20px;
            right: 20px;
            z-index: 10000;
            display: flex;
            flex-direction: column;
            gap: 10px;
            max-width: 800px;
        }

        .toast {
            background: white;
            border-radius: 8px;
            padding: 16px 20px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
            display: flex;
            align-items: flex-start;
            gap: 12px;
            animation: slideInRight 0.3s ease-out;
            min-width: 700px;
            max-width: 800px;
        }

        .toast.success {
            border-left: 4px solid #28a745;
        }

        .toast.error {
            border-left: 4px solid #dc3545;
        }

        .toast.info {
            border-left: 4px solid #667eea;
        }

        .toast.warning {
            border-left: 4px solid #ffc107;
        }

        .toast-icon {
            flex-shrink: 0;
            font-size: 24px;
        }

        .toast.success .toast-icon {
            color: #28a745;
        }

        .toast.error .toast-icon {
            color: #dc3545;
        }

        .toast.info .toast-icon {
            color: #667eea;
        }

        .toast.warning .toast-icon {
            color: #ffc107;
        }

        .toast-content {
            flex: 1;
        }

        .toast-title {
            font-weight: 600;
            margin-bottom: 4px;
            color: #333;
        }

        .toast-message {
            font-size: 14px;
            color: #666;
            line-height: 1.4;
        }

        .toast-progress {
            margin-top: 8px;
            height: 4px;
            background: #e0e0e0;
            border-radius: 2px;
            overflow: hidden;
        }

        .toast-progress-bar {
            height: 100%;
            background: #667eea;
            transition: width 0.3s ease;
        }

        .toast-close {
            background: none;
            border: none;
            color: #999;
            cursor: pointer;
            font-size: 20px;
            padding: 0;
            width: 24px;
            height: 24px;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }

        .toast-close:hover {
            color: #333;
        }

        @keyframes slideInRight {
            from {
                transform: translateX(100%);
                opacity: 0;
            }

            to {
                transform: translateX(0);
                opacity: 1;
            }
        }

        @keyframes slideOutRight {
            from {
                transform: translateX(0);
                opacity: 1;
            }

            to {
                transform: translateX(100%);
                opacity: 0;
            }
        }

        .toast.closing {
            animation: slideOutRight 0.3s ease-out forwards;
        }

        /* Count Update Animation */
        .count-update {
            animation: countHighlight 0.8s ease-out;
        }

        @keyframes countHighlight {
            0% {
                background-color: transparent;
                transform: scale(1);
            }

            50% {
                background-color: #d4edda;
                transform: scale(1.1);
            }

            100% {
                background-color: transparent;
                transform: scale(1);
            }
        }

        .count-value {
            display: inline-block;
            transition: all 0.3s ease;
        }

        /* Confirmation Modal Styles */
        .modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.5);
            z-index: 20000;
            display: flex;
            align-items: center;
            justify-content: center;
            animation: fadeIn 0.2s ease-out;
        }

        .modal-overlay.hidden {
            display: none;
        }

        .confirmation-modal {
            background: white;
            border-radius: 12px;
            padding: 24px;
            max-width: 500px;
            width: 90%;
            box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
            animation: slideUp 0.3s ease-out;
        }

        .modal-header {
            display: flex;
            align-items: center;
            gap: 12px;
            margin-bottom: 16px;
        }

        .modal-header .material-symbols-outlined {
            font-size: 32px;
            color: #667eea;
        }

        .modal-title {
            font-size: 20px;
            font-weight: 600;
            color: #333;
            margin: 0;
        }

        .modal-message {
            color: #666;
            margin-bottom: 24px;
            line-height: 1.5;
        }

        .modal-actions {
            display: flex;
            gap: 12px;
            justify-content: flex-end;
        }

        .modal-btn {
            padding: 10px 20px;
            border: none;
            border-radius: 6px;
            cursor: pointer;
            font-size: 14px;
            font-weight: 500;
            transition: all 0.2s;
            display: inline-flex;
            align-items: center;
            gap: 8px;
        }

        .modal-btn-primary {
            background: #667eea;
            color: white;
        }

        .modal-btn-primary:hover {
            background: #5568d3;
        }

        .modal-btn-secondary {
            background: #e0e0e0;
            color: #333;
        }

        .modal-btn-secondary:hover {
            background: #d0d0d0;
        }

        @keyframes fadeIn {
            from {
                opacity: 0;
            }

            to {
                opacity: 1;
            }
        }

        @keyframes slideUp {
            from {
                transform: translateY(20px);
                opacity: 0;
            }

            to {
                transform: translateY(0);
                opacity: 1;
            }
        }
