            :root {
                --primary: #000000;
                --bg-color: #fcfcfc;
                --text-color: #333333;
                --card-bg: #ffffff;
                --card-border: #e0e0e0;
                --nav-bg: #f5f5f5;
                --nav-hover: #e8e8e8;
            }

            body {
                background-color: var(--bg-color);
                color: var(--text-color);
                font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
                margin: 0;
                padding: 0;
                line-height: 1.6;
            }

            .main-wrapper {
                width: min(1360px, 80vw);
                margin: 0 auto;
            }

            .header {
                padding: 1.5rem 0;
                border-bottom: 2px solid var(--primary);
                display: flex;
                justify-content: space-between;
                align-items: flex-end;
                margin-bottom: 1.5rem;
            }

            .header-left {
                display: flex;
                align-items: center;
                gap: 1.5rem;
            }

            .header-left h1 {
                font-size: 1.5rem;
                margin: 0;
                color: var(--primary);
                text-transform: uppercase;
                letter-spacing: 2px;
                font-weight: 600;
            }

            .header-right {
                font-size: 0.85rem;
                color: #666;
                text-align: right;
            }

            .header-right a {
                color: var(--primary);
                text-decoration: none;
                font-weight: bold;
                margin-left: 0.5rem;
            }
            
            .header-right a:hover {
                text-decoration: underline;
            }

            .nav-menu {
                display: flex;
                flex-wrap: wrap;
                gap: 0.4rem;
                margin-bottom: 2rem;
                border-bottom: 1px solid var(--card-border);
                padding-bottom: 0.5rem;
                align-items: center;
            }

            .nav-menu a {
                padding: 0.5rem 0.6rem;
                background: var(--nav-bg);
                color: var(--text-color);
                text-decoration: none;
                font-weight: 600;
                font-size: 0.8rem;
                text-transform: uppercase;
                letter-spacing: 0.2px;
                border: 1px solid transparent;
                transition: all 0.2s ease;
            }

            .nav-menu a:hover {
                background: var(--nav-hover);
                border-color: var(--card-border);
            }

            .nav-menu a.active {
                background: var(--primary);
                color: #ffffff;
            }

            /* Red 1px border on a field flagged by client-side validation.
               position/z-index lifts it above overlapping neighbours (e.g. the
               −/+ stepper buttons, which use a -1px margin) so no side is covered. */
            .has-error {
                border-color: #d9534f !important;
                position: relative;
                z-index: 1;
            }
            /* Select2 replaces the native select; flag its visible box too. */
            .select2-container.has-error .select2-selection {
                border-color: #d9534f !important;
            }

            /* Password fields: the eye button is placed inside the field by the JS in
               base.html.twig, which wraps the input in .password-field. */
            .password-field {
                position: relative;
                display: block;
            }
            .password-field > input {
                padding-right: 2.4rem;
            }
            .password-toggle {
                position: absolute;
                top: 50%;
                right: 0.4rem;
                transform: translateY(-50%);
                display: flex;
                align-items: center;
                justify-content: center;
                width: 1.8rem;
                height: 1.8rem;
                padding: 0;
                background: none;
                border: 0;
                color: #888;
                cursor: pointer;
            }
            .password-toggle:hover {
                color: var(--primary);
            }
            .password-toggle svg {
                width: 18px;
                height: 18px;
                fill: currentColor;
            }

            /* Required-field asterisk in the label */
            .req {
                color: inherit;
                font-weight: bold;
            }

            .card {
                background: var(--card-bg);
                border: 1px solid var(--card-border);
                padding: 2.5rem;
            }

            .card h2 {
                margin-top: 0;
                font-size: 1.25rem;
                text-transform: uppercase;
                letter-spacing: 1px;
                border-bottom: 1px solid #eee;
                padding-bottom: 1rem;
                margin-bottom: 1.5rem;
            }

            .footer {
                margin-top: 2rem;
                text-align: center;
                font-size: 0.75rem;
                color: #555;
                padding-bottom: 1rem;
                border-bottom: 1px solid #ccc;
                margin-bottom: 2rem;
            }

            /* --- CORE FORM & TABLE STYLES --- */
            .admin-form {
                background-color: #f9f9f9;
                border: 1px solid var(--card-border);
                padding: 1rem 1.5rem;
                margin-bottom: 2rem;
            }

            .admin-form h3 {
                margin-top: 0;
                font-size: 1rem;
                border-bottom: 1px solid #ddd;
                padding-bottom: 0.5rem;
                margin-bottom: 1rem;
            }

            .form-row {
                display: flex;
                flex-wrap: wrap;
                align-items: flex-end;
                gap: 1.5rem;
            }

            .form-group {
                display: flex;
                flex-direction: column;
                gap: 0.3rem;
            }
            
            .col-large { width: 350px; }
            .col-small { width: 200px; }

            .form-group label {
                font-size: 0.8rem;
                font-weight: bold;
                color: #555;
            }

            .form-input {
                padding: 0.5rem;
                border: 1px solid var(--card-border);
                font-family: inherit;
                width: 100%;
                box-sizing: border-box;
                height: 38px;
                transition: border-color 0.2s;
            }
            
            .form-input:focus {
                border-color: #ccc;
                outline: none;
            }
            
            .btn-submit {
                display: inline-flex;
                align-items: center;
                justify-content: center;
                box-sizing: border-box;
                padding: 0.5rem 1.5rem;
                background: #fff;
                color: #333;
                border: 1px solid var(--card-border);
                cursor: pointer;
                font: inherit;
                text-decoration: none;
                height: 38px;
                min-width: 120px;
                white-space: nowrap;
                transition: all 0.2s;
            }

            .btn-submit:hover {
                background: #f9f9f9;
                border-color: #ccc;
            }

            /* Tinted hover only (neutral by default) */
            .btn-submit.btn-confirm:hover {
                background-color: #eeffee;
                color: #5cb85c;
                border-color: #5cb85c;
            }
            .btn-submit.btn-danger:hover {
                background-color: #ffe5e5;
                color: #d9534f;
                border-color: #d9534f;
            }

            /* Flatpickr Custom Black Theme Overrides */
            .flatpickr-day.selected, .flatpickr-day.startRange, .flatpickr-day.endRange, 
            .flatpickr-day.selected.inRange, .flatpickr-day.startRange.inRange, 
            .flatpickr-day.endRange.inRange, .flatpickr-day.selected:focus, 
            .flatpickr-day.startRange:focus, .flatpickr-day.endRange:focus, 
            .flatpickr-day.selected:hover, .flatpickr-day.startRange:hover, 
            .flatpickr-day.endRange:hover, .flatpickr-day.selected.prevMonthDay, 
            .flatpickr-day.startRange.prevMonthDay, .flatpickr-day.endRange.prevMonthDay, 
            .flatpickr-day.selected.nextMonthDay, .flatpickr-day.startRange.nextMonthDay,
            .flatpickr-day.endRange.nextMonthDay {
                background: var(--primary);
                border-color: var(--primary);
            }

            /* Match the square black/white theme: calendar, month dropdown, hover, arrows */
            .flatpickr-calendar,
            .flatpickr-day {
                border-radius: 0;
            }
            .flatpickr-day:hover,
            .flatpickr-day:focus,
            .flatpickr-day.prevMonthDay:hover,
            .flatpickr-day.nextMonthDay:hover {
                background: #f0f0f0;
                border-color: #f0f0f0;
            }
            .flatpickr-day.today {
                border-color: var(--card-border);
            }
            .flatpickr-day.today:hover {
                background: #f0f0f0;
                border-color: var(--card-border);
                color: #000;
            }
            /* Static month label (monthSelectorType: static): plain, not bold, like the year */
            .flatpickr-current-month span.cur-month {
                font-weight: normal;
            }
            .flatpickr-current-month span.cur-month:hover {
                background: rgba(0, 0, 0, 0.06);
            }
            .flatpickr-monthDropdown-months {
                background: transparent;
                border-radius: 0;
                font-weight: bold;
                padding: 2px 4px;
            }
            .flatpickr-monthDropdown-months:hover {
                background: rgba(0, 0, 0, 0.06);
            }
            .flatpickr-monthDropdown-months .flatpickr-monthDropdown-month {
                background: #fff;
                color: #000;
            }
            .numInputWrapper:hover,
            .numInputWrapper span:hover {
                background: rgba(0, 0, 0, 0.06);
            }
            .numInputWrapper span.arrowUp::after {
                border-bottom-color: #333;
            }
            .numInputWrapper span.arrowDown::after {
                border-top-color: #333;
            }
            .flatpickr-months .flatpickr-prev-month:hover svg,
            .flatpickr-months .flatpickr-next-month:hover svg {
                fill: var(--primary);
            }

            .data-table {
                width: 100%;
                border-collapse: collapse;
                margin-bottom: 1rem;
                font-size: 0.9rem;
            }
            
            .data-table th {
                background-color: #f3f3f3;
                padding: 0.8rem;
                text-align: left;
                border-bottom: 2px solid var(--card-border);
                font-weight: bold;
            }
            
            .data-table td {
                padding: 0.8rem;
                border-bottom: 1px solid var(--card-border);
                vertical-align: top;
            }

            .item-row {
                display: flex;
                justify-content: space-between;
                align-items: center;
                gap: 1rem; /* keeps the icons off the label when it fills the cell */
                margin-bottom: 0.5rem;
                min-height: 28px;
            }

            /* Wrapper for the row action icons. Flex (not inline) so the mixed
               <a>/<form> children can't drift on the text baseline. */
            .actions {
                display: flex;
                align-items: center;
                gap: 0.1rem;
            }

            /* action-link as a <button> (CSRF POST forms) looks identical to the <a>. */
            button.action-link {
                background: none;
                border: none;
                padding: 0;
                font: inherit;
                cursor: pointer;
            }

            .action-link {
                color: #666;
                text-decoration: none;
                display: inline-flex;
                align-items: center;
                justify-content: center;
                width: 30px;
                height: 30px;
                border-radius: 4px;
                transition: all 0.2s ease;
            }
            
            .action-link:hover {
                background: #f5f5f5;
                color: var(--primary);
            }

            /* Tinted icons keep their state colour on hover instead of turning black. */
            .action-link.delete-link:hover {
                background: #ffe5e5;
                color: #d9534f;
            }

            .action-link.icon-success:hover {
                background: #eeffee;
                color: #5cb85c;
            }

            .action-link.icon-danger:hover {
                background: #ffe5e5;
                color: #d9534f;
            }

            /* Unavailable action: holds the slot, no interaction. */
            .action-link.action-disabled,
            .action-link.action-disabled:hover {
                color: #dcdcdc;
                background: none;
                cursor: default;
            }

            .action-link svg {
                width: 20px;
                height: 20px;
                fill: currentColor;
            }

            /* Clickable day in Rapportkontrolle → Rapporte verwalten. */
            .day-link {
                color: inherit;
                text-decoration: none;
            }

            .day-link:hover {
                text-decoration: underline;
            }

            .inactive-text {
                color: #999;
            }

            .flash-messages {
                margin-bottom: 1.5rem;
            }

            .flash-success {
                padding: 1rem;
                background-color: #eeffee;
                border: 1px solid #5cb85c;
                color: #006600;
                margin-bottom: 0.5rem;
            }
            .flash-error {
                padding: 1rem;
                background-color: #ffeeee;
                border: 1px solid #cc0000;
                color: #990000;
                margin-bottom: 0.5rem;
            }
            .flash-warning {
                padding: 1rem;
                background-color: #fcf6e6;
                border: 1px solid #f0ad4e;
                color: #8a6d3b;
                margin-bottom: 0.5rem;
            }

            /* --- Select2 Overrides (Height & Styling) --- */
            .select2-container--default .select2-selection--single {
                border: 1px solid var(--card-border);
                border-radius: 0;
                height: 38px;
                box-sizing: border-box;
            }
            .select2-container--default .select2-selection--single .select2-selection__rendered {
                line-height: 36px;
            }
            .select2-container--default .select2-selection--single .select2-selection__arrow {
                height: 36px;
            }
            /* Clear (×) button — visible & clear of the dropdown arrow */
            .select2-container--default .select2-selection--single .select2-selection__clear {
                height: 36px;
                line-height: 34px;
                margin-right: 26px;
                padding: 0 4px;
                color: #999;
                font-size: 1.2rem;
                font-weight: bold;
                cursor: pointer;
            }
            .select2-container--default .select2-selection--single .select2-selection__clear:hover {
                color: #000;
            }
            .select2-container--default.select2-container--focus .select2-selection--single,
            .select2-container--default.select2-container--open .select2-selection--single {
                border: 1px solid var(--primary);
            }
            .select2-dropdown {
                border: 1px solid var(--primary);
                border-radius: 0;
            }
            
            /* HIDE PLACEHOLDER FROM DROPDOWN LIST */
            .select2-results__option[aria-disabled="true"],
            .select2-results__option--disabled {
                display: none !important;
            }

            .select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
                background-color: var(--primary);
                color: white;
            }
            .select2-container--default .select2-results__option--selected {
                background-color: #f0f0f0;
                color: var(--text-color);
            }
            .select2-container--default .select2-search--dropdown .select2-search__field {
                border: 1px solid var(--card-border);
                border-radius: 0;
            }
            .select2-container--default .select2-search--dropdown .select2-search__field:focus {
                border: 1px solid var(--primary);
                outline: none;
            }

            /* --- RESPONSIVE: fluid from desktop down to smaller tablets --------------
               Desktop (> 1024px) is left untouched; the rules below only take effect
               on narrower viewports. Phones inherit the same behaviour gracefully. */

            /* A wide table scrolls inside its own frame instead of pushing the whole
               page sideways. Harmless on desktop, where the table fits and no bar shows. */
            .table-wrap {
                overflow-x: auto;
            }

            /* Tablet: use the full width and let form fields wrap to their natural size
               instead of being squeezed thinner and thinner onto one line. */
            @media (max-width: 1024px) {
                .main-wrapper {
                    width: auto;
                    margin: 0;
                    padding: 0 1.5rem;
                }
            }

            /* Smaller tablets: stack each control on its own full-width line — clean,
               never cramped — and ease the generous desktop spacing a touch. */
            @media (max-width: 780px) {
                .main-wrapper {
                    padding: 0 1.25rem;
                }
                .form-row {
                    gap: 1rem;
                }
                .form-row > * {
                    flex-basis: 100% !important;
                    width: 100% !important;
                }
                .col-large,
                .col-small {
                    width: 100%;
                }
                .card {
                    padding: 1.5rem;
                }
                .admin-form {
                    padding: 1rem;
                }
                .header {
                    flex-wrap: wrap;
                    gap: 0.75rem 1.5rem;
                }
                .header-left h1 {
                    font-size: 1.25rem;
                    letter-spacing: 1px;
                }
            }

            @media print {
                body { background: #fff; color: #000; }
                .nav-menu, .header, .admin-form, .footer, button, .actions { display: none !important; }
                .card { border: none; padding: 0; box-shadow: none; }
                .data-table { border-collapse: collapse; width: 100%; font-size: 10pt; }
                .data-table th, .data-table td { border: 1px solid #000; padding: 4px; }
            }

            /* ---------------------------------------------------------------
               Shared component & utility classes (replace inline styles).
               --------------------------------------------------------------- */

            /* Helper / muted text */
            .hint { font-size: 0.85rem; color: #777; margin: 0 0 1rem; }
            .hint-narrow { max-width: 640px; }
            .muted { color: #777; }
            .text-grey { color: #555; }
            .text-sm { font-size: 0.9rem; }
            .text-sm-grey { font-size: 0.9rem; color: #555; }
            .text-info { font-size: 0.95rem; color: #555; line-height: 1.8; }
            .field-help { font-size: 0.8rem; color: #666; margin-top: 0.2rem; }
            .empty-state { text-align: center; padding: 2rem; color: #888; }

            /* Status colours (Soll-Ist / badges) */
            .bold { font-weight: bold; }
            .saldo-pos { color: #5cb85c; }
            .saldo-neg { color: #d9534f; }
            .saldo-zero { color: #999; }

            /* Table cells / rows */
            .num { text-align: right; }
            .row-active { background: #f5f5f5; }
            .row-muted { background: #f7f7f7; color: #999; }
            .total-row { border-top: 2px solid var(--card-border); font-weight: bold; }

            /* Links */
            /* <button> that should read as plain text: strip the native button chrome */
            .link-plain {
                background: none;
                border: none;
                padding: 0;
                font: inherit;
                font-size: 1rem;
                color: var(--text-color);
                text-decoration: underline;
                cursor: pointer;
            }
            .link-date { color: var(--primary); text-decoration: none; }

            /* Action-icon colours (post_action macro) */
            .icon-success { color: #5cb85c; }
            .icon-danger { color: #d9534f; }

            /* Layout helpers */
            .summary-row { display: flex; gap: 2rem; margin-bottom: 1.5rem; font-size: 0.95rem; }
            .h2-back { display: flex; align-items: center; gap: 0.7rem; }
            .items-end { align-items: flex-end; }
            .actions-row { display: flex; gap: 0.5rem; margin-top: 1rem; }
            .form-actions { padding-bottom: 0; }
            .inline-form { display: inline; }
            .icon-sprite { display: none; }
            .logo-img { max-height: 45px; }
            .logout-link { display: inline-flex; align-items: center; vertical-align: sub; }
            .admin-form--bare { background-color: transparent; border-color: transparent; padding: 0; }

            /* Flex sizing */
            .flex-1 { flex: 1; }
            .minw-150 { min-width: 150px; }
            .minw-200 { min-width: 200px; }
            .minw-220 { min-width: 220px; }
            .minw-640 { min-width: 640px; }
            .minw-680 { min-width: 680px; }
            .maxw-300 { max-width: 300px; }

            /* Fixed widths */
            .w-40 { width: 40px; }
            .w-80 { width: 80px; }
            .w-100 { width: 100px; }
            .w-150 { width: 150px; }
            .w-160 { width: 160px; }
            .w-220 { width: 220px; }
            .w-250 { width: 250px; }
            .w-350 { width: 350px; }

            /* Spacing */
            .m-0 { margin: 0; }
            .mb-1 { margin-bottom: 1rem; }
            .mb-15 { margin-bottom: 1.5rem; }
            .mb-2 { margin-bottom: 2rem; }
            .mt-1 { margin-top: 1rem; }
            .mt-2 { margin-top: 2rem; }

            /* Pensum (workload) — back-arrow, ±/stepper & day-target widget */
            .wp-back-arrow {
                display: inline-flex; align-items: center; justify-content: center;
                width: 1.8rem; height: 1.8rem; flex: none;
                font-size: 1.6rem; line-height: 1; text-decoration: none;
                color: #000; border: 1px solid var(--card-border);
                text-transform: none;
            }
            .wp-back-arrow span { display: block; transform: translateY(-0.06em); }
            .wp-back-arrow:hover { background: #f5f5f5; }
            .wp-days { display: flex; gap: 0.8rem; flex-wrap: wrap; }
            .wp-day { display: flex; flex-direction: column; }
            .wp-day label { font-size: 0.75rem; color: #555; margin-bottom: 0.2rem; }
            .wp-num { text-align: center; }
            /* hide native number spinners */
            .wp-num::-webkit-outer-spin-button,
            .wp-num::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
            .wp-num[type=number] { -moz-appearance: textfield; }
            /* custom −/+ stepper (segmented) */
            .stepper { display: inline-flex; align-items: stretch; }
            .stepper > * { margin-left: -1px; }
            .stepper > *:first-child { margin-left: 0; }
            .stepper input { border-radius: 0; }
            .stepper .step-btn {
                flex: none; width: 2rem;
                border: 1px solid var(--card-border); background: #fff;
                color: #000; font-size: 1.1rem; line-height: 1; cursor: pointer;
                display: inline-flex; align-items: center; justify-content: center;
                user-select: none; padding: 0;
            }
            .stepper .step-btn:hover { background: #f5f5f5; }
            .stepper .step-btn:active { background: #ebebeb; }
            .wp-percent-input { width: 4rem; }
            .wp-hours-input { width: 3.4rem; }
            .data-table td.wp-c, .data-table th.wp-c { text-align: right; width: 48px; }
            /* Right-align numeric headers too (plain .num loses to `.data-table th`). */
            .data-table th.num { text-align: right; }
            .wp-target { font-size: 0.85rem; padding: 0.45rem 0.8rem; display: inline-block; border: 1px solid var(--card-border); margin-bottom: 1rem; }
            .wp-ok  { background: #eef6ee; border-color: #5cb85c; color: #3c763d; }
            .wp-off { background: #fcf6e6; border-color: #f0ad4e; color: #8a6d3b; }
