body {
    font-family: Arial, sans-serif;
    margin: 0;
    background: #f4f6f3;
    color: #222;
}

.page {
    padding: 24px;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #2f4f3a;
    color: white;
    padding: 16px 24px;
}

.header h1 {
    margin: 0;
}

.header-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

button {
    cursor: pointer;
}

.hidden {
    display: none;
}

.nav {
    margin: 20px 0;
    display: flex;
    gap: 12px;
}

.nav a,
.nav button {
    padding: 8px 12px;
    background: white;
    border: 1px solid #ccc;
    text-decoration: none;
    color: #2f4f3a;
    border-radius: 4px;
    font-size: 14px;
}

.planner-controls {
    justify-content: space-between;
    align-items: center;
}

.week-nav {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.date-jump-form {
    display: flex;
    gap: 6px;
    align-items: center;
}

.date-jump-form input {
    padding: 7px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.week-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 12px;
}

.day-card {
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    min-height: 180px;
    padding: 12px;
}

.day-card h3 {
    margin-top: 0;
    font-size: 16px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 8px;
}

.assignment-card {
    background: #e8f1e5;
    border-left: 4px solid #2f4f3a;
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 4px;
}

.assignment-card strong {
    display: block;
    margin-bottom: 6px;
}

.muted {
    color: #777;
    font-size: 14px;
}

.admin-link {
    color: white;
}

.admin-actions {
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 16px;
    margin-bottom: 24px;
}

.admin-actions h2 {
    margin-top: 0;
}

.action-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.action-grid a {
    display: inline-block;
    padding: 10px 14px;
    background: #2f4f3a;
    color: white;
    text-decoration: none;
    border-radius: 4px;
}

.action-grid a:hover {
    background: #243d2c;
}

.planner-help {
    background: #fff8db;
    border: 1px solid #eadb8a;
    border-radius: 6px;
    padding: 12px 16px;
    margin-bottom: 20px;
}

.expanded-picker-panel {
    background: white;
    border: 1px solid #cfd8cc;
    border-left: 5px solid #2f4f3a;
    border-radius: 6px;
    padding: 16px;
    margin-bottom: 20px;
}

.expanded-picker-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 12px;
}

.expanded-picker-header h2 {
    margin: 0 0 4px 0;
}

.expanded-picker-section {
    margin-top: 12px;
}

.expanded-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
    max-height: 220px;
    overflow-y: auto;
    padding-right: 4px;
}

.planner-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 20px;
    align-items: start;
}

.planner-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sidebar-box {
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 12px;
}

.sidebar-box h2 {
    margin-top: 0;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    align-items: center;
}

.sidebar-header h2 {
    margin: 0 0 8px 0;
}

.small-button {
    padding: 6px 8px;
    font-size: 12px;
    background: white;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.palette-search {
    width: 100%;
    box-sizing: border-box;
    padding: 8px 10px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.scroll-list {
    max-height: 260px;
    overflow-y: auto;
    padding-right: 4px;
}

.small-scroll-list {
    max-height: 190px;
}

.palette-card {
    background: #f7f7f7;
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 10px;
    cursor: grab;
    user-select: none;
}

.palette-card:active {
    cursor: grabbing;
}

.project-palette-card {
    border-left: 4px solid #2f4f3a;
}

.employee-palette-card {
    border-left: 4px solid #587aa0;
}

.calendar-board {
    display: grid;
    grid-template-columns: repeat(7, minmax(150px, 1fr));
    gap: 12px;
    overflow-x: auto;
}

.calendar-board.hide-weekend {
    grid-template-columns: repeat(5, minmax(170px, 1fr));
}

.calendar-board.hide-weekend .weekend-day {
    display: none;
}

.planning-day {
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    min-height: 420px;
    padding: 10px;
}

.planning-day h3 {
    margin-top: 0;
    font-size: 15px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 8px;
}

.planning-day.drag-over {
    outline: 2px dashed #587aa0;
    background: white;
}

.day-drop-zone {
    min-height: 340px;
}

.project-plan-card {
    background: #e8f1e5;
    border: 1px solid #b8d0b1;
    border-left: 5px solid #2f4f3a;
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 12px;
}

.project-plan-card.drag-over {
    outline: 3px dashed #587aa0;
    background: #edf4fb;
}

.project-plan-header {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    align-items: center;
    margin-bottom: 6px;
}

.project-plan-header a {
    font-size: 13px;
}

.employee-drop-zone {
    margin-top: 10px;
    border-top: 1px solid #c7dcc2;
    padding-top: 8px;
    min-height: 50px;
}

.drop-hint {
    display: block;
    color: #777;
    font-size: 13px;
    margin-bottom: 6px;
}

.assigned-employees {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.assigned-employee,
.assigned-machine {
    background: white;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 6px 8px;
    font-size: 14px;
}

.assigned-employee:hover {
    outline: 2px dashed #9a3b3b;
}

.employee-notes-board {
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 16px;
    margin-top: 24px;
}

.employee-notes-board h2 {
    margin-top: 0;
}

.employee-notes-table-wrapper {
    overflow-x: auto;
    margin-top: 16px;
}

.employee-notes-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1000px;
}

.employee-notes-table th,
.employee-notes-table td {
    border: 1px solid #ddd;
    padding: 8px;
    vertical-align: top;
}

.employee-notes-table th {
    background: #f4f6f3;
    text-align: left;
}

.employee-notes-table textarea {
    width: 100%;
    box-sizing: border-box;
    resize: vertical;
    font-family: Arial, sans-serif;
    font-size: 14px;
}

.save-notes-button {
    margin-top: 16px;
    padding: 10px 14px;
    background: #2f4f3a;
    color: white;
    border: none;
    border-radius: 4px;
}

.weekend-note-column {
    background: #faf4e8;
}

.employee-notes-board.hide-weekend-notes .weekend-note-column {
    display: none;
}

/* ------------------------------------------------------------
   Zeitraum-Darstellung für mehrtägige Projekte
   ------------------------------------------------------------ */

.planning-day {
    position: relative;
    overflow: visible;
}

.day-drop-zone {
    overflow: visible;
}

.project-lane-placeholder {
    min-height: 112px;
    margin-bottom: 12px;
    visibility: hidden;
}

.project-plan-card {
    position: relative;
    overflow: visible;
    min-height: 92px;
    z-index: 2;
}

.project-plan-card.continues-left {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.project-plan-card.continues-right {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.project-plan-card::before,
.project-plan-card::after {
    content: "";
    position: absolute;
    top: 26px;
    height: 8px;
    background: #2f4f3a;
    z-index: 0;
    pointer-events: none;
}

.project-plan-card.continues-left::before {
    left: -18px;
    width: 18px;
}

.project-plan-card.continues-right::after {
    right: -18px;
    width: 18px;
}

.project-timeline {
    position: absolute;
    left: 0;
    right: 0;
    top: 26px;
    height: 8px;
    background: rgba(47, 79, 58, 0.18);
    pointer-events: none;
    z-index: 0;
}

.project-plan-header,
.project-plan-card .muted,
.employee-drop-zone {
    position: relative;
    z-index: 1;
}

.project-resize-handle,
.absence-resize-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 14px;
    background: rgba(47, 79, 58, 0.12);
    cursor: ew-resize;
    z-index: 5;
}

.project-resize-handle:hover,
.absence-resize-handle:hover {
    background: rgba(47, 79, 58, 0.32);
}

.project-resize-handle.resize-left,
.absence-resize-handle.resize-left {
    left: 0;
    border-top-left-radius: 6px;
    border-bottom-left-radius: 6px;
}

.project-resize-handle.resize-right,
.absence-resize-handle.resize-right {
    right: 0;
    border-top-right-radius: 6px;
    border-bottom-right-radius: 6px;
}

.project-duration {
    margin-top: 4px;
    font-size: 12px;
}

/* ------------------------------------------------------------
   Kompakte Abwesenheits-Wochenleiste
   ------------------------------------------------------------ */

.absence-board {
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 16px;
    margin-top: 24px;
    overflow: visible;
}

.absence-board h2 {
    margin-top: 0;
}

.absence-board-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
}

.absence-week-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(150px, 1fr));
    gap: 12px;
    overflow-x: auto;
    margin-top: 16px;
}

.absence-board.hide-weekend-notes .absence-week-grid {
    grid-template-columns: repeat(5, minmax(170px, 1fr));
}

.absence-board.hide-weekend-notes .weekend-day {
    display: none;
}

.absence-day-column {
    background: #fbfbfb;
    border: 1px solid #ddd;
    border-radius: 6px;
    min-height: 150px;
    padding: 10px;
    overflow: visible;
}

.absence-day-column h3 {
    margin: 0 0 10px 0;
    font-size: 14px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 8px;
}

.absence-day-column h3 span {
    display: block;
    font-weight: normal;
    color: #777;
    margin-top: 2px;
}

.absence-day-column.drag-over {
    outline: 3px dashed #8d6b2f;
    background: #fff8e8;
}

.absence-day-drop-zone {
    min-height: 95px;
    overflow: visible;
}

.absence-card {
    position: relative;
    background: #fff3d8;
    border: 1px solid #e2c989;
    border-left: 5px solid #8d6b2f;
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 10px;
    min-height: 74px;
    overflow: visible;
    z-index: 2;
}

.absence-card.continues-left {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.absence-card.continues-right {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.absence-card::before,
.absence-card::after {
    content: "";
    position: absolute;
    top: 24px;
    height: 8px;
    background: #8d6b2f;
    z-index: 0;
    pointer-events: none;
}

.absence-card.continues-left::before {
    left: -18px;
    width: 18px;
}

.absence-card.continues-right::after {
    right: -18px;
    width: 18px;
}

.absence-timeline {
    position: absolute;
    left: 0;
    right: 0;
    top: 24px;
    height: 8px;
    background: rgba(141, 107, 47, 0.18);
    pointer-events: none;
    z-index: 0;
}

.absence-card strong,
.absence-comment,
.absence-actions,
.absence-continuation-label {
    position: relative;
    z-index: 1;
}

.absence-comment {
    width: 100%;
    box-sizing: border-box;
    resize: vertical;
    font-family: Arial, sans-serif;
    font-size: 13px;
    margin-top: 8px;
}

.absence-actions {
    display: flex;
    gap: 6px;
    margin-top: 6px;
}

.absence-continuation-label {
    margin-top: 8px;
    color: #777;
    font-size: 13px;
}

.absence-drop-hint {
    display: block;
    font-size: 13px;
    margin-top: 8px;
}

/* Alte Tabellen-Darstellung ausblenden, falls noch im Browser-Cache vorhanden. */
.absence-table-wrapper {
    overflow-x: auto;
}

/* ------------------------------------------------------------
   Nachbesserung: Projekt entfernen und Text auf Fortsetzungen
   ------------------------------------------------------------ */

.project-card-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    position: relative;
    z-index: 3;
}

.project-delete-button {
    border: 1px solid #b27b7b;
    background: #fff;
    color: #8a2f2f;
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 12px;
    line-height: 1.3;
}

.project-delete-button:hover {
    background: #fbecec;
}

.absence-continuation-label {
    color: #333;
    white-space: pre-wrap;
}

.absence-card strong {
    display: block;
    margin-bottom: 4px;
}


/* --- Projektplanung v3: nur rechte Projektkante ziehbar und robustere Mitarbeiter-Drops --- */
.project-resize-handle.resize-right {
    width: 18px;
    background: rgba(47, 79, 58, 0.18);
    border-left: 1px solid rgba(47, 79, 58, 0.25);
}

.project-resize-handle.resize-right::after {
    content: "›";
    position: absolute;
    top: 50%;
    right: 4px;
    transform: translateY(-50%);
    font-size: 22px;
    line-height: 1;
    color: #2f4f3a;
    pointer-events: none;
}

.project-plan-card:not(.is-end) .project-resize-handle {
    display: none;
}

.employee-drop-zone.drag-over {
    outline: 2px dashed #587aa0;
    background: rgba(88, 122, 160, 0.08);
    border-radius: 4px;
}

.project-plan-card.drag-over .employee-drop-zone {
    background: rgba(88, 122, 160, 0.06);
}

.drop-hint {
    pointer-events: none;
}


/* --- Projektplanung v4: Entfernen-Button und präzisere Drop-Flächen --- */
.project-card-actions {
    display: flex;
    gap: 6px;
    align-items: center;
    justify-content: flex-end;
    flex-shrink: 0;
}

.danger-button {
    border-color: #b87a7a;
    color: #8a2f2f;
    background: #fffafa;
}

.danger-button:hover {
    background: #f8e6e6;
}

.delete-project-plan {
    padding: 3px 6px;
    font-size: 11px;
    line-height: 1.2;
    position: relative;
    z-index: 8;
}

.project-plan-card.drag-over {
    outline: 2px dashed #587aa0;
    background: #edf4fb;
}

.planning-day.drag-over .project-plan-card.drag-over {
    outline-color: #587aa0;
}


/* --- v6: Projekt wird per Rechtsklick aus der Planung entfernt; sichtbarer Entfernen-Button wird nicht mehr verwendet. --- */
.project-plan-card {
    user-select: none;
}

.project-plan-card .project-card-actions .delete-project-plan {
    display: none;
}

.project-plan-card:hover {
    box-shadow: 0 0 0 1px rgba(47, 79, 58, 0.15);
}

/* --- Maschinen v8 --- */
.machine-palette-card {
    border-left: 4px solid #8d6b2f;
}

.machine-drop-zone {
    margin-top: 10px;
    border-top: 1px solid #d9c89d;
    padding-top: 8px;
    min-height: 44px;
    position: relative;
    z-index: 1;
}

.machine-drop-zone.drag-over {
    outline: 2px dashed #8d6b2f;
    background: rgba(141, 107, 47, 0.08);
    border-radius: 4px;
}

.project-plan-card.drag-over .machine-drop-zone {
    background: rgba(141, 107, 47, 0.05);
}

.assigned-machines {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.assigned-machine {
    background: #fff8e8;
    border: 1px solid #d9c89d;
    border-left: 4px solid #8d6b2f;
    border-radius: 4px;
    padding: 6px 8px;
    font-size: 14px;
}

.assigned-machine:hover {
    outline: 2px dashed #8d6b2f;
}

/* ------------------------------------------------------------
   v9: Projektfarben, Kontextmenü, bessere Layout-Ausrichtung
   ------------------------------------------------------------ */

.absence-layout {
    margin-top: 24px;
}

.planner-sidebar-placeholder {
    min-width: 0;
}

.absence-layout .absence-board {
    margin-top: 0;
}

.project-plan-card,
.project-palette-card {
    --project-border: #2f4f3a;
    --project-bg: rgba(47, 79, 58, 0.12);
    --project-bg-strong: rgba(47, 79, 58, 0.22);
}

.project-plan-card {
    background: var(--project-bg);
    border-color: var(--project-bg-strong);
    border-left-color: var(--project-border);
}

.project-palette-card {
    border-left-color: var(--project-border);
    background: color-mix(in srgb, var(--project-bg) 65%, white);
}

.project-plan-card::before,
.project-plan-card::after {
    background: var(--project-border);
}

.project-timeline {
    background: var(--project-bg-strong);
}

.project-resize-handle.resize-right {
    background: color-mix(in srgb, var(--project-border) 18%, transparent);
    border-left-color: color-mix(in srgb, var(--project-border) 30%, transparent);
}

.project-resize-handle.resize-right::after {
    color: var(--project-border);
}

.project-color-green {
    --project-border: #2f4f3a;
    --project-bg: rgba(47, 79, 58, 0.12);
    --project-bg-strong: rgba(47, 79, 58, 0.22);
}

.project-color-blue {
    --project-border: #2f5f8f;
    --project-bg: rgba(47, 95, 143, 0.12);
    --project-bg-strong: rgba(47, 95, 143, 0.22);
}

.project-color-red {
    --project-border: #8f3a3a;
    --project-bg: rgba(143, 58, 58, 0.12);
    --project-bg-strong: rgba(143, 58, 58, 0.22);
}

.project-color-purple {
    --project-border: #6a4a8f;
    --project-bg: rgba(106, 74, 143, 0.12);
    --project-bg-strong: rgba(106, 74, 143, 0.22);
}

.project-color-orange {
    --project-border: #9a642e;
    --project-bg: rgba(154, 100, 46, 0.13);
    --project-bg-strong: rgba(154, 100, 46, 0.23);
}

.project-color-yellow {
    --project-border: #9a812e;
    --project-bg: rgba(154, 129, 46, 0.13);
    --project-bg-strong: rgba(154, 129, 46, 0.23);
}

.project-color-gray {
    --project-border: #58615d;
    --project-bg: rgba(88, 97, 93, 0.12);
    --project-bg-strong: rgba(88, 97, 93, 0.22);
}

.custom-context-menu {
    position: fixed;
    z-index: 10000;
    min-width: 220px;
    max-width: 280px;
    background: white;
    border: 1px solid #c9d1c7;
    border-radius: 8px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
    padding: 6px;
}

.custom-context-menu button {
    display: block;
    width: 100%;
    border: 0;
    background: transparent;
    color: #222;
    padding: 8px 10px;
    text-align: left;
    border-radius: 5px;
    font-size: 13px;
}

.custom-context-menu button:hover {
    background: #eef3eb;
}

.custom-context-menu .danger-menu-item {
    color: #8a2f2f;
}

.custom-context-menu .danger-menu-item:hover {
    background: #f8e6e6;
}

.context-menu-separator {
    height: 1px;
    background: #e1e5df;
    margin: 5px 0;
}

.context-menu-heading {
    padding: 6px 10px 4px 10px;
    color: #666;
    font-size: 12px;
    font-weight: bold;
}

.color-menu-item::before {
    content: "";
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 8px;
    vertical-align: -1px;
    border: 1px solid rgba(0, 0, 0, 0.18);
    background: #2f4f3a;
}

.color-dot-green::before { background: #2f4f3a; }
.color-dot-blue::before { background: #2f5f8f; }
.color-dot-red::before { background: #8f3a3a; }
.color-dot-purple::before { background: #6a4a8f; }
.color-dot-orange::before { background: #9a642e; }
.color-dot-yellow::before { background: #9a812e; }
.color-dot-gray::before { background: #58615d; }

.employee-drop-zone,
.machine-drop-zone {
    position: relative;
    z-index: 3;
}

.project-plan-card.drag-over {
    outline-color: var(--project-border);
}


/* --- v11: Mitarbeiter und Maschinen über mehrere Projekttage ziehen --- */
.assigned-employee,
.assigned-machine {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 6px;
}

.assigned-employee-name,
.assigned-machine-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.assignment-resize-handle,
.machine-assignment-resize-handle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 18px;
    align-self: stretch;
    margin: -6px -8px -6px 4px;
    border-left: 1px solid rgba(88, 122, 160, 0.25);
    background: rgba(88, 122, 160, 0.12);
    color: #2f4f3a;
    font-size: 18px;
    line-height: 1;
    cursor: ew-resize;
    user-select: none;
}

.assignment-resize-handle:hover,
.machine-assignment-resize-handle:hover {
    background: rgba(88, 122, 160, 0.28);
}


.assignment-resize-handle::after,
.machine-assignment-resize-handle::after {
    content: "›";
}


/* --- v12: neutral drag highlighting, no green day background --- */
.planning-day.drag-over {
    outline: 2px dashed #587aa0;
    background: white;
}
.project-plan-card.drag-over {
    outline: 2px dashed #587aa0;
}

.project-chat-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid rgba(47, 79, 58, 0.22);
    background: rgba(255, 255, 255, 0.72);
    color: #2f4f3a;
    border-radius: 999px;
    padding: 4px 9px;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.project-chat-button:hover {
    background: white;
    border-color: rgba(47, 79, 58, 0.45);
}

.chat-badge {
    min-width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #b42318;
    color: white;
    border-radius: 999px;
    font-size: 11px;
    line-height: 1;
    padding: 0 5px;
}

.project-chat-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    justify-content: flex-end;
    background: rgba(16, 24, 20, 0.42);
}

.project-chat-overlay.hidden {
    display: none;
}

.project-chat-panel {
    width: min(560px, 100vw);
    height: 100vh;
    background: #f5f7f3;
    box-shadow: -18px 0 45px rgba(0, 0, 0, 0.22);
    display: grid;
    grid-template-rows: auto auto 1fr auto;
}

.project-chat-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    padding: 18px 20px;
    background: #2f4f3a;
    color: white;
}

.project-chat-header h2 {
    margin: 0;
    font-size: 22px;
}

.project-chat-header .muted {
    color: rgba(255, 255, 255, 0.78);
}

.project-chat-kicker {
    margin: 0 0 4px 0;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.68);
}

.project-chat-close {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
    color: white;
    font-size: 28px;
    line-height: 1;
}

.project-chat-close:hover {
    background: rgba(255, 255, 255, 0.24);
}

.project-chat-toolbar {
    padding: 10px 16px;
    border-bottom: 1px solid #d9dfd5;
    background: white;
    text-align: center;
}

.project-chat-toolbar .small-button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.project-chat-messages {
    overflow-y: auto;
    padding: 18px 16px 24px 16px;
    background:
        radial-gradient(circle at top left, rgba(47, 79, 58, 0.08), transparent 26%),
        #eef2ea;
}

.project-chat-empty {
    text-align: center;
    padding: 32px 16px;
}

.chat-message {
    display: flex;
    margin-bottom: 10px;
}

.chat-message.own-message {
    justify-content: flex-end;
}

.chat-message.other-message {
    justify-content: flex-start;
}

.chat-message-bubble {
    max-width: min(78%, 420px);
    padding: 10px 12px;
    border-radius: 16px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.chat-message.own-message .chat-message-bubble {
    background: #dff0d8;
    border-bottom-right-radius: 4px;
}

.chat-message.other-message .chat-message-bubble {
    background: white;
    border-bottom-left-radius: 4px;
}

.chat-message-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 4px;
    color: #667064;
    font-size: 11px;
}

.chat-message-text {
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.4;
}

.chat-attachments {
    display: grid;
    gap: 8px;
    margin-top: 8px;
}

.chat-attachment {
    display: block;
    text-decoration: none;
    color: inherit;
}

.chat-image-attachment img {
    display: block;
    max-width: 100%;
    max-height: 260px;
    border-radius: 12px;
    object-fit: cover;
    background: #d8ddd4;
}

.chat-video-attachment video {
    display: block;
    width: 100%;
    max-height: 300px;
    border-radius: 12px;
    background: #111;
}

.chat-video-attachment a {
    display: inline-block;
    margin-top: 5px;
    color: #2f4f3a;
    font-weight: 700;
}

.chat-file-attachment {
    border: 1px solid #d6ded2;
    border-radius: 12px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.72);
}

.chat-file-attachment strong,
.chat-file-attachment span,
.chat-file-attachment small {
    display: block;
}

.chat-file-attachment small {
    margin-top: 3px;
    color: #777;
}

.project-chat-composer {
    padding: 12px 14px 14px 14px;
    border-top: 1px solid #d9dfd5;
    background: white;
}

.project-chat-input-row {
    display: grid;
    grid-template-columns: 42px 1fr auto;
    gap: 8px;
    align-items: end;
}

.project-chat-file-button {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #edf3ea;
    color: #2f4f3a;
    border: 1px solid #cbd9c6;
    border-radius: 50%;
    font-size: 26px;
    font-weight: 700;
    cursor: pointer;
}

.project-chat-file-button:hover {
    background: #e1ebdd;
}

#projectChatFiles {
    display: none;
}

#projectChatText {
    resize: none;
    min-height: 42px;
    max-height: 120px;
    padding: 10px 12px;
    border: 1px solid #cfd8cc;
    border-radius: 16px;
    font-family: inherit;
    font-size: 14px;
}

#sendProjectChatMessage {
    height: 42px;
    padding: 0 14px;
    border: 0;
    border-radius: 999px;
    background: #2f4f3a;
    color: white;
    font-weight: 700;
}

#sendProjectChatMessage:disabled {
    opacity: 0.65;
    cursor: wait;
}

.project-chat-selected-files {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.project-chat-selected-files.hidden {
    display: none;
}

.project-chat-selected-files span {
    display: inline-flex;
    gap: 5px;
    align-items: center;
    max-width: 100%;
    padding: 5px 8px;
    border-radius: 999px;
    background: #eef3eb;
    border: 1px solid #d8e1d4;
    font-size: 12px;
}

.project-chat-hint {
    margin: 8px 4px 0 50px;
    font-size: 12px;
}

body.chat-open {
    overflow: hidden;
}

@media (max-width: 720px) {
    .project-chat-panel {
        width: 100vw;
    }

    .chat-message-bubble {
        max-width: 88%;
    }

    .project-chat-input-row {
        grid-template-columns: 40px 1fr;
    }

    #sendProjectChatMessage {
        grid-column: 2;
        justify-self: end;
    }
}

.project-chat-standalone-wrap {
    display: flex;
    justify-content: center;
}

.project-chat-standalone {
    width: min(760px, 100%);
    height: calc(100vh - 130px);
    min-height: 560px;
    border: 1px solid #d6ded2;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}


/* Standalone project chat page */
.project-chat-page-wrap {
    max-width: 980px;
    margin: 0 auto;
}

.project-chat-page-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.project-chat-back-link {
    display: inline-flex;
    align-items: center;
    width: fit-content;
}

.project-chat-button {
    text-decoration: none;
    cursor: pointer;
}

.project-chat-standalone-wrap {
    display: flex;
    justify-content: center;
}

.project-chat-standalone {
    margin: 0 auto;
}

@media (max-width: 720px) {
    .project-chat-page-nav {
        align-items: flex-start;
        flex-direction: column;
    }
}


/* === Project chat redesign v3: standalone page and compact red notification button === */
.project-card-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}

.project-chat-button,
a.project-chat-button:visited {
    position: relative;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 30px;
    padding: 6px 10px !important;
    border: 1px solid rgba(180, 35, 24, 0.22) !important;
    border-radius: 999px !important;
    background: #fff5f4 !important;
    color: #8f1f16 !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    text-decoration: none !important;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.08);
}

.project-chat-button::before {
    content: "💬";
    font-size: 14px;
    line-height: 1;
}

.project-chat-button:hover {
    background: #ffe8e5 !important;
    border-color: rgba(180, 35, 24, 0.42) !important;
    transform: translateY(-1px);
}

.chat-badge {
    min-width: 20px !important;
    height: 20px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 6px !important;
    border-radius: 999px !important;
    background: #d92d20 !important;
    color: #fff !important;
    font-size: 11px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    box-shadow: 0 0 0 2px #fff;
}

.chat-badge.hidden {
    display: none !important;
}

body.project-chat-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(47, 79, 58, 0.12), transparent 34%),
        linear-gradient(180deg, #f4f7f1 0%, #e9efE6 100%);
}

body.project-chat-page .header {
    position: sticky;
    top: 0;
    z-index: 20;
    min-height: 76px;
    padding: 0 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 8px 24px rgba(16, 24, 40, 0.12);
}

body.project-chat-page .header h1 {
    margin: 0;
    font-size: 30px;
}

.project-chat-page-wrap {
    width: min(1120px, calc(100vw - 32px));
    max-width: none;
    margin: 28px auto;
}

.project-chat-page-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.project-chat-back-link,
a.project-chat-back-link:visited {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    padding: 10px 14px;
    border-radius: 999px;
    background: #2f4f3a;
    color: #fff !important;
    text-decoration: none;
    font-weight: 800;
    box-shadow: 0 3px 10px rgba(47, 79, 58, 0.22);
}

.project-chat-back-link:hover {
    background: #243d2d;
}

.project-chat-page-meta {
    color: #667064;
    font-size: 14px;
}

.project-chat-standalone {
    width: min(920px, 100%);
    height: calc(100vh - 188px);
    min-height: 640px;
    margin: 0 auto;
    border: 1px solid rgba(47, 79, 58, 0.14);
    border-radius: 22px;
    overflow: hidden;
    background: #f7faf5;
    box-shadow: 0 18px 48px rgba(16, 24, 40, 0.16);
    display: grid;
    grid-template-rows: auto auto 1fr auto;
}

.project-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 22px;
    background: linear-gradient(135deg, #2f4f3a 0%, #426b4f 100%);
    color: #fff;
}

.project-chat-header h2 {
    margin: 0;
    font-size: 25px;
    color: #fff;
}

.project-chat-kicker {
    margin: 0 0 5px 0;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.11em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.72);
}

.project-chat-header .muted,
#projectChatStatus {
    margin: 4px 0 0 0;
    color: rgba(255, 255, 255, 0.78) !important;
}

.project-chat-header-avatar {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.22);
    font-size: 22px;
}

.project-chat-toolbar {
    padding: 10px 18px;
    border-bottom: 1px solid rgba(47, 79, 58, 0.12);
    background: rgba(255, 255, 255, 0.86);
    text-align: center;
}

.project-chat-toolbar .small-button {
    border-radius: 999px;
    border: 1px solid #d2ddce;
    background: #fff;
    color: #2f4f3a;
    padding: 7px 12px;
    font-weight: 750;
}

.project-chat-toolbar .small-button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.project-chat-messages {
    min-height: 0;
    overflow-y: auto;
    padding: 22px 24px 28px 24px;
    background:
        linear-gradient(rgba(255,255,255,0.72), rgba(255,255,255,0.72)),
        radial-gradient(circle at 20% 10%, rgba(47, 79, 58, 0.10), transparent 28%),
        radial-gradient(circle at 80% 70%, rgba(180, 35, 24, 0.06), transparent 24%),
        #edf3ea;
}

.project-chat-empty {
    width: fit-content;
    margin: 42px auto;
    padding: 14px 18px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
    color: #667064;
    text-align: center;
}

.chat-message {
    display: flex;
    margin: 0 0 14px 0;
}

.chat-message.own-message {
    justify-content: flex-end;
}

.chat-message.other-message {
    justify-content: flex-start;
}

.chat-message-bubble {
    position: relative;
    max-width: min(72%, 620px);
    padding: 11px 13px 10px 13px;
    border-radius: 18px;
    box-shadow: 0 2px 8px rgba(16, 24, 40, 0.10);
    border: 1px solid rgba(16, 24, 40, 0.06);
}

.chat-message.own-message .chat-message-bubble {
    background: #dff3d5;
    border-bottom-right-radius: 5px;
}

.chat-message.other-message .chat-message-bubble {
    background: #fff;
    border-bottom-left-radius: 5px;
}

.chat-message-meta {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 6px;
    font-size: 12px;
}

.chat-message-meta strong {
    color: #a5271d;
    font-weight: 900;
}

.chat-message.own-message .chat-message-meta strong {
    color: #2f4f3a;
}

.chat-message-meta span {
    color: #7a8478;
    white-space: nowrap;
    font-size: 11px;
}

.chat-message-text {
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.46;
    color: #18221b;
    font-size: 15px;
}

.chat-attachments {
    display: grid;
    gap: 9px;
    margin-top: 10px;
}

.chat-attachment {
    display: block;
    text-decoration: none;
    color: inherit;
}

.chat-image-attachment img {
    display: block;
    max-width: 100%;
    max-height: 320px;
    border-radius: 14px;
    object-fit: cover;
    background: #d8ddd4;
    border: 1px solid rgba(16, 24, 40, 0.08);
}

.chat-video-attachment video {
    display: block;
    width: 100%;
    max-height: 340px;
    border-radius: 14px;
    background: #111;
}

.chat-video-attachment a {
    display: inline-block;
    margin-top: 6px;
    color: #2f4f3a;
    font-weight: 800;
}

.chat-file-attachment {
    border: 1px solid #d6ded2;
    border-radius: 14px;
    padding: 11px 12px;
    background: rgba(255, 255, 255, 0.76);
}

.chat-file-attachment strong,
.chat-file-attachment span,
.chat-file-attachment small {
    display: block;
}

.chat-file-attachment strong {
    color: #2f4f3a;
    font-size: 13px;
    margin-bottom: 2px;
}

.chat-file-attachment small {
    margin-top: 3px;
    color: #777;
}

.project-chat-composer {
    padding: 13px 16px 15px 16px;
    border-top: 1px solid rgba(47, 79, 58, 0.14);
    background: rgba(255, 255, 255, 0.94);
}

.project-chat-input-row {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: end;
}

.project-chat-file-button {
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #edf3ea;
    color: #2f4f3a;
    border: 1px solid #cbd9c6;
    border-radius: 50%;
    font-size: 28px;
    font-weight: 800;
    cursor: pointer;
}

.project-chat-file-button:hover {
    background: #e1ebdd;
}

#projectChatFiles {
    display: none;
}

#projectChatText {
    resize: none;
    min-height: 46px;
    max-height: 140px;
    padding: 12px 14px;
    border: 1px solid #cfd8cc;
    border-radius: 18px;
    outline: none;
    font-family: inherit;
    font-size: 15px;
    line-height: 1.35;
    background: #fff;
}

#projectChatText:focus {
    border-color: #709479;
    box-shadow: 0 0 0 3px rgba(47, 79, 58, 0.12);
}

#sendProjectChatMessage {
    height: 46px;
    padding: 0 18px;
    border: 0;
    border-radius: 999px;
    background: #2f4f3a;
    color: white;
    font-weight: 900;
    cursor: pointer;
}

#sendProjectChatMessage:hover {
    background: #243d2d;
}

#sendProjectChatMessage:disabled {
    opacity: 0.65;
    cursor: wait;
}

.project-chat-selected-files {
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
    margin-bottom: 9px;
}

.project-chat-selected-files.hidden {
    display: none;
}

.project-chat-selected-files span {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    max-width: 100%;
    padding: 6px 9px;
    border-radius: 999px;
    background: #eef3eb;
    border: 1px solid #d8e1d4;
    font-size: 12px;
}

.project-chat-hint {
    margin: 8px 4px 0 56px;
    font-size: 12px;
    color: #6c756a;
}

@media (max-width: 720px) {
    body.project-chat-page .header {
        padding: 14px 16px;
        min-height: auto;
        align-items: flex-start;
        flex-direction: column;
    }

    .project-chat-page-wrap {
        width: min(100vw - 16px, 100%);
        margin: 8px auto;
    }

    .project-chat-page-nav {
        align-items: flex-start;
        flex-direction: column;
    }

    .project-chat-standalone {
        height: calc(100vh - 154px);
        min-height: 520px;
        border-radius: 16px;
    }

    .project-chat-messages {
        padding: 16px 12px 22px 12px;
    }

    .chat-message-bubble {
        max-width: 88%;
    }

    .project-chat-input-row {
        grid-template-columns: 42px 1fr;
    }

    #sendProjectChatMessage {
        grid-column: 2;
        justify-self: end;
    }

    .project-chat-hint {
        margin-left: 52px;
    }
}

/* === Project chat v4: larger chat typography and employee-week badges === */
body.project-chat-page .project-chat-messages {
    font-size: 17px;
}

body.project-chat-page .chat-message {
    margin-bottom: 18px;
}

body.project-chat-page .chat-message-bubble {
    padding: 14px 16px 13px 16px;
    border-radius: 20px;
    max-width: min(74%, 680px);
}

body.project-chat-page .chat-message-text {
    font-size: 18px;
    line-height: 1.55;
}

body.project-chat-page .chat-message-meta {
    font-size: 14px;
    margin-bottom: 8px;
}

body.project-chat-page .chat-message-meta span {
    font-size: 13px;
}

body.project-chat-page #projectChatText {
    font-size: 17px;
    line-height: 1.45;
    min-height: 52px;
}

.my-week-page {
    padding-bottom: 48px;
}

.my-week-topbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 22px;
}

.my-week-topbar h2 {
    margin: 0;
    font-size: 34px;
    line-height: 1.15;
}

.page-kicker {
    margin: 0 0 6px 0;
    color: #667064;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.my-week-chat-summary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #f0c9c4;
    color: #9f241b;
    box-shadow: 0 5px 16px rgba(159, 36, 27, .12);
    font-weight: 800;
    white-space: nowrap;
}

.my-week-chat-summary[hidden] {
    display: none;
}

.my-week-chat-summary-dot {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #b42318;
    color: #fff;
}

.my-week-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(280px, 1fr));
    gap: 18px;
    overflow-x: auto;
    padding-bottom: 14px;
}

.my-week-day-card {
    min-height: 260px;
    padding: 18px;
    border: 1px solid #d8ddd7;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(16,24,40,.04);
}

.my-week-day-header {
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid #d9ded6;
}

.my-week-day-header h3 {
    margin: 0;
    font-size: 20px;
}

.my-week-project-list {
    display: grid;
    gap: 14px;
}

.my-week-project-card {
    position: relative;
    padding: 15px 16px 15px 18px;
    border-radius: 10px;
    background: #e9f3e4;
    border: 1px solid #d9e4d4;
    border-left: 6px solid #2f6f46;
}

.my-week-project-card.project-color-blue { background: #e7f0f8; border-left-color: #2f6fa3; }
.my-week-project-card.project-color-red { background: #f8e9e7; border-left-color: #a33a32; }
.my-week-project-card.project-color-purple { background: #f0eaf7; border-left-color: #7251a2; }
.my-week-project-card.project-color-orange { background: #f8eee2; border-left-color: #b16b1f; }
.my-week-project-card.project-color-yellow { background: #faf4dc; border-left-color: #b99822; }
.my-week-project-card.project-color-gray { background: #ecefed; border-left-color: #6e766f; }

.my-week-project-main {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.my-week-project-card h4 {
    margin: 0 0 4px 0;
    font-size: 22px;
    line-height: 1.15;
}

.my-week-project-customer,
.my-week-project-address,
.my-week-project-note {
    margin: 5px 0 0 0;
    color: #3f493f;
    font-size: 16px;
    line-height: 1.35;
}

.my-week-project-address {
    margin-top: 10px;
}

.my-week-chat-button,
a.my-week-chat-button:visited {
    position: relative;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 38px;
    padding: 8px 13px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #d9e1d5;
    color: #2f4f3a;
    text-decoration: none;
    font-weight: 900;
    box-shadow: 0 2px 8px rgba(16,24,40,.08);
}

.my-week-chat-button:hover {
    background: #f7faf5;
    transform: translateY(-1px);
}

.my-week-chat-button.has-unread {
    border-color: #f0b8b2;
    color: #9f241b;
    box-shadow: 0 3px 12px rgba(180, 35, 24, .16);
}

.my-week-chat-icon {
    font-size: 17px;
}

.my-week-chat-label {
    font-size: 14px;
}

.my-week-chat-badge {
    position: absolute;
    top: -9px;
    right: -9px;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #b42318;
    color: #fff;
    font-size: 12px;
    font-weight: 950;
    border: 2px solid #fff;
    box-shadow: 0 3px 10px rgba(180,35,24,.26);
}

.my-week-chat-badge.hidden {
    display: none;
}

.my-week-empty {
    margin: 0;
    color: #70786f;
    font-size: 18px;
}

@media (max-width: 900px) {
    .my-week-topbar {
        flex-direction: column;
        align-items: stretch;
    }

    .my-week-grid {
        grid-template-columns: minmax(280px, 1fr);
        overflow-x: visible;
    }
}

/* --- v5: Meine Woche wieder als klare Wochen-/Projektübersicht --- */
.main-content.my-week-page,
.my-week-page {
    padding: 32px 38px 54px;
    max-width: none;
    box-sizing: border-box;
}

.week-navigation.my-week-navigation {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin: 18px 0 28px;
}

.button,
a.button,
a.button:visited,
.secondary-button,
a.secondary-button:visited {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 7px;
    border: 1px solid #cbd3c8;
    background: #fff;
    color: #243d2c;
    text-decoration: none;
    font-weight: 800;
    font-size: 16px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}

.button:hover,
a.button:hover,
.secondary-button:hover {
    background: #f8faf7;
    border-color: #9fac9b;
}

.my-week-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(330px, 1fr));
    gap: 18px;
    overflow-x: auto;
    padding: 0 0 18px;
    align-items: stretch;
}

.my-week-day-card {
    min-height: 360px;
    padding: 18px;
    border: 1px solid #d8ddd7;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(16,24,40,.05);
}

.my-week-day-header {
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid #d9ded6;
}

.my-week-day-header h3 {
    margin: 0;
    font-size: 20px;
    line-height: 1.2;
}

.my-week-project-card {
    padding: 16px 16px 17px 18px;
    border-radius: 12px;
    border: 1px solid #d6e0d2;
    border-left: 7px solid #2f6f46;
    background: #e9f3e4;
    box-shadow: 0 1px 2px rgba(16,24,40,.04);
}

.my-week-project-main {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.my-week-project-title-block {
    min-width: 0;
}

.my-week-project-card h4 {
    margin: 0 0 4px;
    font-size: 22px;
    line-height: 1.15;
}

.my-week-project-customer {
    margin: 0;
    color: #5e675d;
    font-size: 16px;
    line-height: 1.3;
}

.my-week-project-detail-grid {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}

.my-week-project-detail-block {
    padding-top: 10px;
    border-top: 1px solid rgba(47, 79, 58, .14);
}

.my-week-detail-label {
    display: block;
    margin-bottom: 6px;
    color: #667064;
    font-size: 12px;
    font-weight: 950;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.my-week-project-address,
.my-week-project-note,
.my-week-muted {
    margin: 0;
    color: #303a31;
    font-size: 16px;
    line-height: 1.4;
}

.my-week-muted {
    color: #747c72;
}

.my-week-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.my-week-chip {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 10px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid rgba(47, 79, 58, .18);
    color: #263a2b;
    font-size: 14px;
    font-weight: 800;
}

.my-week-chip.is-current-user {
    background: #2f4f3a;
    border-color: #2f4f3a;
    color: #fff;
}

.my-week-chip.machine-chip {
    background: #fff8e8;
    border-color: #e7c476;
    color: #5a4214;
}

.my-week-chat-button,
a.my-week-chat-button:visited {
    position: relative;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 40px;
    padding: 8px 14px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #d9e1d5;
    color: #2f4f3a;
    text-decoration: none;
    font-weight: 950;
    box-shadow: 0 2px 8px rgba(16,24,40,.08);
}

.my-week-chat-button.has-unread {
    border-color: #f0b8b2;
    color: #9f241b;
    box-shadow: 0 3px 12px rgba(180, 35, 24, .16);
}

.my-week-chat-badge {
    position: absolute;
    top: -10px;
    right: -10px;
    min-width: 23px;
    height: 23px;
    padding: 0 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #b42318;
    color: #fff;
    font-size: 12px;
    font-weight: 950;
    border: 2px solid #fff;
    box-shadow: 0 3px 10px rgba(180,35,24,.26);
}

.my-week-chat-badge.hidden,
.hidden.my-week-chat-badge {
    display: none;
}

.my-week-empty {
    margin: 0;
    padding: 18px 0;
    color: #70786f;
    font-size: 18px;
}

body.project-chat-page .project-chat-message-text,
body.project-chat-page .chat-message-text,
body.project-chat-page .message-text,
body.project-chat-page .project-chat-bubble {
    font-size: 17px;
    line-height: 1.5;
}

@media (max-width: 1100px) {
    .my-week-grid {
        grid-template-columns: repeat(7, minmax(300px, 1fr));
    }
}

@media (max-width: 900px) {
    .main-content.my-week-page,
    .my-week-page {
        padding: 22px 18px 40px;
    }

    .my-week-topbar {
        flex-direction: column;
        align-items: stretch;
    }

    .my-week-grid {
        grid-template-columns: 1fr;
        overflow-x: visible;
    }
}

/* --- v8: kompaktere Planungsübersicht + Mitarbeiter-/Maschinen-Abwesenheiten --- */
.planner-layout {
    align-items: start;
}

.calendar-board {
    align-items: start;
}

.planning-day {
    min-height: 300px;
}

.day-drop-zone {
    min-height: 230px;
}

.project-lane-placeholder {
    min-height: 96px;
}

.absence-layout {
    display: block;
    margin-top: 12px;
}

.absence-stack {
    margin-top: 14px;
    display: grid;
    gap: 14px;
}

.compact-absence-board {
    margin-top: 0;
    padding: 14px 16px 16px;
}

.compact-absence-board .absence-board-header {
    margin-bottom: 8px;
}

.compact-absence-board h2 {
    margin: 0 0 6px 0;
    font-size: 22px;
}

.compact-absence-board .muted {
    margin: 0;
}

.compact-absence-grid {
    margin-top: 12px;
    grid-template-columns: repeat(7, minmax(170px, 1fr));
    gap: 10px;
}

.compact-absence-board.hide-weekend-notes .compact-absence-grid {
    grid-template-columns: repeat(5, minmax(190px, 1fr));
}

.compact-absence-day {
    min-height: 112px;
    padding: 8px;
}

.compact-absence-day h3 {
    margin-bottom: 7px;
    padding-bottom: 6px;
    font-size: 13px;
}

.compact-drop-zone {
    min-height: 70px;
}

.compact-absence-card {
    min-height: 0;
    margin-bottom: 7px;
    padding: 7px 20px 7px 10px;
    border-radius: 7px;
}

.compact-absence-card::before,
.compact-absence-card::after {
    top: 18px;
    height: 6px;
}

.compact-absence-card .absence-timeline {
    top: 18px;
    height: 6px;
}

.compact-absence-content {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(70px, auto) minmax(110px, 1fr);
    gap: 6px;
    align-items: center;
}

.compact-absence-name {
    margin: 0;
    font-size: 13px;
    line-height: 1.2;
    white-space: nowrap;
}

.compact-machine-id {
    color: #76571b;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.machine-downtime-content {
    grid-template-columns: minmax(70px, auto) auto minmax(110px, 1fr);
}

.compact-absence-input {
    width: 100%;
    box-sizing: border-box;
    min-height: 30px;
    padding: 5px 7px;
    border: 1px solid #d2d7cf;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.84);
    font-family: Arial, sans-serif;
    font-size: 12px;
    line-height: 1.2;
}

.compact-absence-input:focus {
    outline: none;
    border-color: #587aa0;
    box-shadow: 0 0 0 2px rgba(88, 122, 160, 0.12);
}

.compact-absence-reason {
    margin: 0;
    color: #4b4f48;
    font-size: 12px;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.employee-absence-card {
    background: #fff3d8;
    border-color: #e2c989;
    border-left-color: #8d6b2f;
}

.machine-downtime-card {
    background: #eef1f6;
    border-color: #c9d2df;
    border-left-color: #586f92;
}

.machine-downtime-card::before,
.machine-downtime-card::after {
    background: #586f92;
}

.machine-downtime-card .absence-timeline {
    background: rgba(88, 111, 146, 0.18);
}

.machine-downtime-day.drag-over {
    outline-color: #586f92;
    background: #f2f6fb;
}

.absence-actions {
    display: none;
}

.absence-drop-hint {
    font-size: 12px;
}

@media (max-width: 1100px) {
    .compact-absence-grid {
        grid-template-columns: repeat(7, minmax(160px, 1fr));
    }

    .compact-absence-content,
    .machine-downtime-content {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .compact-absence-input {
        min-height: 28px;
    }
}


/* --- v9: Abwesenheiten direkt unter dem Arbeitskalender rechts neben der Drag-Seitenleiste --- */
.planner-main-column {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}

.planner-main-column .absence-stack {
    margin-top: 0;
}

.planner-main-column .absence-board {
    width: 100%;
    box-sizing: border-box;
}

.planner-main-column .calendar-board,
.planner-main-column .absence-week-grid {
    min-width: 0;
}

/* Die Abwesenheitsbereiche sollen kompakt bleiben, damit kein unnötiger Leerraum entsteht. */
.planner-main-column .compact-absence-board {
    padding: 12px 14px 14px;
}

.planner-main-column .compact-absence-grid {
    margin-top: 10px;
}

.planner-main-column .compact-absence-day {
    min-height: 98px;
}

.planner-main-column .compact-drop-zone {
    min-height: 58px;
}

/* Alphabetische Listen wirken ruhiger, die Sortierung kommt zusätzlich aus dem Backend. */
.assigned-employees,
.assigned-machines {
    gap: 5px;
}

@media (max-width: 900px) {
    .planner-layout {
        grid-template-columns: 1fr;
    }
}

/* ------------------------------------------------------------
   v10: Eigene Verwaltungsseiten für Projekte, Mitarbeiter, Maschinen
   ------------------------------------------------------------ */
.management-page {
    max-width: 1400px;
    margin: 0 auto;
}

.management-hero {
    background: #ffffff;
    border: 1px solid #d8ddd7;
    border-radius: 14px;
    padding: 24px 28px;
    margin-bottom: 22px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
}

.management-hero h2,
.management-page-header h2 {
    margin: 0 0 8px 0;
    font-size: 30px;
    line-height: 1.15;
}

.management-hero p:last-child,
.management-page-header p:last-child {
    margin-bottom: 0;
}

.management-page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 18px;
}

.management-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(240px, 1fr));
    gap: 18px;
}

.management-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 18px;
    min-height: 180px;
    background: #ffffff;
    border: 1px solid #d8ddd7;
    border-left: 7px solid #2f4f3a;
    border-radius: 14px;
    padding: 22px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
}

.management-card h3 {
    margin: 0 0 8px 0;
    font-size: 24px;
}

.management-card p {
    margin: 0;
    color: #667064;
    font-size: 16px;
}

.management-card-actions,
.management-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.management-table-card,
.management-form-card {
    background: #ffffff;
    border: 1px solid #d8ddd7;
    border-radius: 14px;
    padding: 18px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
    overflow-x: auto;
}

.management-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 900px;
}

.management-table th,
.management-table td {
    border-bottom: 1px solid #e1e6de;
    padding: 12px 10px;
    text-align: left;
    vertical-align: top;
}

.management-table th {
    color: #5d685c;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: #f8faf7;
}

.management-table tr:last-child td {
    border-bottom: 0;
}

.management-table-actions {
    text-align: right;
    white-space: nowrap;
}

.management-status-pill,
.management-color-pill {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 4px 9px;
    border-radius: 999px;
    background: #eef3eb;
    border: 1px solid #d8e1d4;
    color: #2f4f3a;
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
}

.management-color-pill {
    border-color: var(--project-border, #2f4f3a);
    background: var(--project-bg, rgba(47, 79, 58, 0.12));
    color: #1f2a22;
}

.management-form-card {
    max-width: 860px;
    margin: 0 auto;
    padding: 26px;
}

.management-form {
    display: grid;
    gap: 18px;
}

.management-field {
    display: grid;
    gap: 7px;
}

.management-field label {
    color: #26342a;
    font-weight: 900;
}

.management-input,
.management-select,
.management-textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 11px 12px;
    border: 1px solid #cbd3c8;
    border-radius: 8px;
    background: #fff;
    color: #222;
    font: inherit;
}

.management-textarea {
    resize: vertical;
    min-height: 92px;
}

.management-input:focus,
.management-select:focus,
.management-textarea:focus {
    outline: none;
    border-color: #709479;
    box-shadow: 0 0 0 3px rgba(47, 79, 58, 0.12);
}

.management-checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
}

.management-checkbox {
    width: 18px;
    height: 18px;
}

.management-help-text {
    margin: 0;
    color: #667064;
    font-size: 13px;
    line-height: 1.35;
}

.management-field-errors,
.management-form-errors {
    color: #9f241b;
    background: #fff5f4;
    border: 1px solid #f0c9c4;
    border-radius: 8px;
    padding: 9px 10px;
    font-size: 13px;
}

.management-field-errors ul,
.management-form-errors ul {
    margin: 0;
    padding-left: 18px;
}

.management-form-note {
    margin-bottom: 18px;
    padding: 12px 14px;
    border: 1px solid #eadb8a;
    border-radius: 10px;
    background: #fff8db;
    color: #493f16;
}

.management-messages {
    display: grid;
    gap: 10px;
    margin-bottom: 18px;
}

.management-message {
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid #d8e1d4;
    background: #eef7ea;
    color: #243d2c;
    font-weight: 800;
}

.management-message-error {
    border-color: #f0c9c4;
    background: #fff5f4;
    color: #9f241b;
}

@media (max-width: 900px) {
    .management-card-grid {
        grid-template-columns: 1fr;
    }

    .management-page-header {
        flex-direction: column;
        align-items: stretch;
    }

    .management-form-card {
        padding: 18px;
    }
}


/* --- v11: Login und Passwortverwaltung --- */
.account-page {
    display: flex;
    justify-content: center;
}

.account-password-card {
    width: min(720px, 100%);
}

.compact-header {
    margin-bottom: 18px;
}

.management-warning-pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    background: #fff3cd;
    border: 1px solid #e5c56a;
    color: #6d4c00;
    font-weight: 800;
    font-size: 13px;
    white-space: nowrap;
}

.management-field input[type="password"],
.management-field input[type="text"],
.management-field input[type="email"] {
    box-sizing: border-box;
}

.management-messages .management-message-info {
    border-left-color: #2f5f8f;
    background: #e8f1fb;
}


/* --- v12: sichtbarer 6-Zeichen-Passwortgenerator für Mitarbeiter --- */
.temporary-password-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 8px;
    padding: 10px 12px;
    border: 1px solid #d7dfd3;
    border-radius: 10px;
    background: #f7faf5;
}

.temporary-password-main {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px;
    color: #4d584d;
    font-size: 14px;
}

.temporary-password-main strong {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 3px 10px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #cbd8c5;
    color: #1f3325;
    font-family: Consolas, Monaco, monospace;
    font-size: 16px;
    letter-spacing: .08em;
}

@media (max-width: 720px) {
    .temporary-password-box {
        align-items: stretch;
        flex-direction: column;
    }

    .temporary-password-box .small-button {
        width: fit-content;
    }
}

/* === v18: Archiv-Bereich === */
.archive-page {
    max-width: none;
}

.archive-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 18px;
    margin-top: 22px;
}

.archive-area-card,
.archive-area-card:visited {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 22px;
    border: 1px solid #d8ddd7;
    border-radius: 14px;
    background: #fff;
    color: #1f2b22;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(16, 24, 40, 0.06);
}

.archive-area-card:hover {
    border-color: #9fac9b;
    box-shadow: 0 8px 22px rgba(16, 24, 40, 0.10);
    transform: translateY(-1px);
}

.archive-area-card-disabled {
    opacity: 0.72;
    cursor: default;
}

.archive-area-card-disabled:hover {
    transform: none;
    border-color: #d8ddd7;
    box-shadow: 0 2px 8px rgba(16, 24, 40, 0.06);
}

.archive-area-icon {
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #edf3ea;
    font-size: 22px;
    flex: 0 0 auto;
}

.archive-area-content {
    display: grid;
    gap: 5px;
}

.archive-area-content strong {
    font-size: 22px;
}

.archive-area-content span {
    color: #2f4f3a;
    font-weight: 800;
}

.archive-area-content small {
    color: #667064;
    line-height: 1.4;
}

.inline-management-form {
    display: inline-flex;
    margin: 0;
}

.danger-outline-button {
    border-color: #e8b7b1 !important;
    color: #9f241b !important;
    background: #fff8f7 !important;
}

.danger-outline-button:hover {
    background: #ffe9e6 !important;
}

.archive-project-table td {
    vertical-align: middle;
}

.archive-detail-hero {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
    padding: 24px;
    border-radius: 16px;
    border: 1px solid var(--project-bg-strong, #d8ddd7);
    border-left: 8px solid var(--project-border, #2f4f3a);
    background: color-mix(in srgb, var(--project-bg, rgba(47, 79, 58, 0.12)) 60%, white);
    box-shadow: 0 2px 8px rgba(16, 24, 40, 0.06);
    margin-bottom: 20px;
}

.archive-detail-hero h2 {
    margin: 0;
    font-size: 34px;
    line-height: 1.15;
}

.archive-detail-subtitle {
    margin: 8px 0 0 0;
    color: #4c574d;
    font-size: 17px;
}

.archive-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(260px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.archive-info-card {
    background: #fff;
    border: 1px solid #d8ddd7;
    border-radius: 14px;
    padding: 18px;
    box-shadow: 0 1px 3px rgba(16, 24, 40, 0.05);
}

.archive-info-card h3 {
    margin: 0 0 14px 0;
    font-size: 22px;
}

.archive-definition-list {
    display: grid;
    grid-template-columns: minmax(110px, 180px) 1fr;
    gap: 10px 14px;
    margin: 0;
}

.archive-definition-list dt {
    color: #667064;
    font-size: 12px;
    font-weight: 950;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.archive-definition-list dd {
    margin: 0;
    color: #202b22;
    line-height: 1.4;
}

.archive-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.archive-chip {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 6px 11px;
    border-radius: 999px;
    background: #edf3ea;
    border: 1px solid #cfd8cc;
    color: #243d2c;
    font-weight: 800;
}

.archive-chip-machine {
    background: #fff8e8;
    border-color: #e7c476;
    color: #5a4214;
}

.archive-plan-card,
.archive-chat-card {
    margin-top: 16px;
}

.archive-plan-list {
    display: grid;
    gap: 8px;
}

.archive-plan-item {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid #e2e7df;
    border-radius: 10px;
    background: #f8faf7;
}

.archive-section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 16px;
}

.archive-count-pill {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 6px 12px;
    border-radius: 999px;
    background: #edf3ea;
    border: 1px solid #cfd8cc;
    color: #2f4f3a;
    font-weight: 900;
    white-space: nowrap;
}

.archive-chat-log {
    display: grid;
    gap: 14px;
}

.archive-chat-message {
    padding: 14px 16px;
    border: 1px solid #e1e7dd;
    border-radius: 14px;
    background: #f8faf7;
}

.archive-chat-message-deleted {
    opacity: 0.7;
    background: #f4f4f4;
}

.archive-chat-message-meta {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 8px;
    color: #667064;
    font-size: 13px;
}

.archive-chat-message-meta strong {
    color: #2f4f3a;
    font-size: 15px;
}

.archive-chat-message-text {
    margin: 0;
    font-size: 16px;
    line-height: 1.5;
}

.archive-attachment-list {
    display: grid;
    gap: 8px;
    margin-top: 12px;
}

.archive-attachment-link,
.archive-attachment-link:visited {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 8px;
    align-items: center;
    padding: 10px 12px;
    border: 1px solid #d8ddd7;
    border-radius: 12px;
    background: #fff;
    color: #243d2c;
    text-decoration: none;
}

.archive-attachment-link:hover {
    border-color: #9fac9b;
    background: #f7faf5;
}

.archive-attachment-link small {
    color: #777;
    font-weight: 400;
}

@media (max-width: 900px) {
    .archive-detail-hero {
        flex-direction: column;
    }

    .archive-detail-grid {
        grid-template-columns: 1fr;
    }

    .archive-definition-list {
        grid-template-columns: 1fr;
    }

    .archive-section-header {
        flex-direction: column;
    }
}


/* --- v19: Projektarchiv Maschinen-Zeiträume --- */
.archive-machine-usage-list {
    display: grid;
    gap: 12px;
}

.archive-machine-usage-item {
    display: grid;
    grid-template-columns: minmax(180px, 280px) 1fr;
    gap: 12px;
    align-items: start;
    padding: 10px 0;
    border-bottom: 1px solid rgba(47, 79, 58, 0.12);
}

.archive-machine-usage-item:last-child {
    border-bottom: 0;
}

.archive-machine-name {
    font-weight: 900;
    color: #243d2c;
}

.archive-machine-periods {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

@media (max-width: 760px) {
    .archive-machine-usage-item {
        grid-template-columns: 1fr;
    }
}


/* === v20: Mitarbeiterarchiv, Ordner und Mehrfachupload === */
.employee-archive-page .management-page-header {
    align-items: flex-start;
}

.archive-folder-create-card,
.employee-archive-folder-card {
    background: #fff;
    border: 1px solid #d9ded6;
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(16, 24, 40, 0.06);
}

.archive-folder-create-card {
    padding: 18px;
    margin-bottom: 20px;
}

.archive-folder-create-card h3 {
    margin: 0 0 12px;
}

.archive-folder-create-form {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) auto;
    gap: 14px;
    align-items: end;
}

.archive-folder-create-form .management-form-field {
    margin: 0;
}

.employee-archive-folder-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
    gap: 18px;
}

.employee-archive-folder-card {
    padding: 18px;
}

.employee-archive-folder-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.employee-archive-folder-header h3 {
    margin: 0;
    font-size: 24px;
}

.archive-upload-form {
    margin-bottom: 16px;
}

.archive-drop-zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 128px;
    padding: 18px;
    border: 2px dashed #b9c9b4;
    border-radius: 14px;
    background: #f6faf4;
    color: #2f4f3a;
    text-align: center;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease, transform .15s ease;
}

.archive-drop-zone:hover,
.archive-drop-zone.is-drag-over {
    background: #edf6e9;
    border-color: #2f4f3a;
    transform: translateY(-1px);
}

.archive-drop-zone input[type="file"] {
    display: none;
}

.archive-drop-icon {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #2f4f3a;
    color: #fff;
    font-weight: 900;
}

.archive-selected-files {
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
    margin: 10px 0;
}

.archive-selected-files.hidden {
    display: none;
}

.archive-selected-files span {
    display: inline-flex;
    max-width: 100%;
    padding: 6px 10px;
    border-radius: 999px;
    background: #eef3eb;
    border: 1px solid #d7e0d3;
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.archive-upload-button {
    margin-top: 2px;
}

.employee-archive-file-list {
    display: grid;
    gap: 8px;
}

.employee-archive-file-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border: 1px solid #e0e5dc;
    border-radius: 10px;
    background: #fbfdf9;
}

.employee-archive-file-link,
.employee-archive-file-link:visited {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #152117;
    text-decoration: none;
}

.employee-archive-file-link:hover strong {
    text-decoration: underline;
}

.employee-archive-file-icon {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    background: #eef3eb;
}

.employee-archive-file-link strong,
.employee-archive-file-link small {
    display: block;
}

.employee-archive-file-link strong {
    overflow-wrap: anywhere;
}

.employee-archive-file-link small {
    margin-top: 3px;
    color: #6f776e;
}

.archive-empty-note {
    margin: 10px 0 0;
    padding: 12px;
    border-radius: 10px;
    background: #f7faf5;
}

@media (max-width: 760px) {
    .archive-folder-create-form {
        grid-template-columns: 1fr;
    }

    .employee-archive-folder-grid {
        grid-template-columns: 1fr;
    }

    .employee-archive-file-row {
        align-items: flex-start;
        flex-direction: column;
    }
}


/* === v22: Mitarbeiterarchiv als kompakte Ordneransicht === */
.archive-folder-create-card-compact {
    padding: 14px 16px;
    margin-bottom: 18px;
}

.archive-folder-create-card-compact h3 {
    font-size: 18px;
}

.employee-archive-folder-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    align-items: flex-start;
    margin: 8px 0 24px;
}

.employee-archive-folder-tile {
    width: 132px;
    min-height: 132px;
    border: 1px solid transparent;
    border-radius: 14px;
    background: transparent;
    color: #152117;
    cursor: pointer;
    padding: 10px 8px;
    text-align: center;
    display: grid;
    justify-items: center;
    align-content: start;
    gap: 7px;
}

.employee-archive-folder-tile:hover,
.employee-archive-folder-tile.is-active {
    background: #fff;
    border-color: #d9ded6;
    box-shadow: 0 4px 14px rgba(16, 24, 40, 0.08);
}

.employee-archive-folder-icon {
    position: relative;
    display: block;
    width: 74px;
    height: 54px;
    margin-top: 4px;
    border-radius: 7px 9px 9px 9px;
    background: linear-gradient(180deg, #f8d56b 0%, #e5ad2f 100%);
    box-shadow: inset 0 -8px 0 rgba(133, 83, 11, 0.08), 0 4px 9px rgba(16, 24, 40, 0.12);
}

.employee-archive-folder-icon::before {
    content: "";
    position: absolute;
    left: 0;
    top: -10px;
    width: 32px;
    height: 16px;
    border-radius: 7px 7px 0 0;
    background: #f2c75d;
}

.employee-archive-folder-icon::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 9px;
    height: 1px;
    background: rgba(255, 255, 255, 0.45);
}

.employee-archive-folder-name {
    max-width: 122px;
    color: #152117;
    font-size: 14px;
    font-weight: 850;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.employee-archive-folder-count {
    color: #6b746a;
    font-size: 12px;
    line-height: 1.2;
}

.employee-archive-folder-panels {
    display: grid;
    gap: 18px;
}

.employee-archive-folder-panel.hidden {
    display: none;
}

.employee-archive-folder-panel {
    padding: 18px;
}

.employee-archive-folder-panel-header {
    border-bottom: 1px solid #e1e6dd;
    padding-bottom: 12px;
    margin-bottom: 16px;
}

.archive-drop-zone-compact {
    min-height: 96px;
    padding: 14px;
}

.employee-archive-file-list {
    margin-top: 12px;
}

@media (max-width: 760px) {
    .employee-archive-folder-picker {
        gap: 12px;
    }

    .employee-archive-folder-tile {
        width: 112px;
        min-height: 120px;
    }

    .employee-archive-folder-icon {
        width: 62px;
        height: 46px;
    }
}

/* --- v23: Mitarbeiterarchiv mit echter Ordnerübersicht und separater Ordnerseite --- */
.archive-folder-create-card-compact {
    margin-bottom: 18px;
}

.archive-folder-create-form-inline {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: end;
}

.archive-folder-create-form-inline .archive-folder-name-field {
    margin-bottom: 0;
}

.archive-folder-create-button {
    min-height: 44px;
    margin-bottom: 0;
    white-space: nowrap;
}

.employee-archive-folder-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 150px));
    gap: 18px;
    align-items: start;
    margin-top: 18px;
}

.employee-archive-folder-tile,
a.employee-archive-folder-tile,
a.employee-archive-folder-tile:visited {
    width: 120px;
    min-height: 126px;
    display: grid;
    grid-template-rows: 64px auto auto;
    justify-items: center;
    align-items: start;
    gap: 6px;
    padding: 12px 10px 10px;
    border: 1px solid #dfe7dc;
    border-radius: 12px;
    background: #ffffff;
    color: #17251b;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(16, 24, 40, 0.06);
    cursor: pointer;
}

.employee-archive-folder-tile:hover {
    border-color: #9fb89d;
    box-shadow: 0 8px 18px rgba(16, 24, 40, 0.12);
    transform: translateY(-1px);
}

.employee-archive-folder-icon {
    position: relative;
    width: 68px;
    height: 50px;
    display: block;
    margin-top: 6px;
    border-radius: 7px 7px 8px 8px;
    background: linear-gradient(180deg, #ffd86e 0%, #f4b832 100%);
    box-shadow: inset 0 -5px 0 rgba(145, 97, 0, 0.08), 0 4px 8px rgba(145, 97, 0, 0.12);
}

.employee-archive-folder-icon::before {
    content: "";
    position: absolute;
    left: 0;
    top: -11px;
    width: 32px;
    height: 18px;
    border-radius: 7px 7px 0 0;
    background: #ffcf59;
}

.employee-archive-folder-name {
    width: 100%;
    color: #15251a;
    font-size: 13px;
    font-weight: 900;
    line-height: 1.2;
    text-align: center;
    overflow-wrap: anywhere;
}

.employee-archive-folder-count {
    color: #667064;
    font-size: 12px;
    line-height: 1.2;
    text-align: center;
}

.employee-archive-folder-panels {
    display: none;
}

.employee-archive-open-folder-card {
    background: #fff;
    border: 1px solid #d8ddd7;
    border-radius: 14px;
    padding: 18px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
}

.employee-archive-open-folder-header {
    padding-bottom: 14px;
    margin-bottom: 16px;
    border-bottom: 1px solid #e2e7df;
}

.employee-archive-open-folder-title {
    display: flex;
    gap: 14px;
    align-items: center;
}

.employee-archive-open-folder-title h3 {
    margin: 0;
    font-size: 26px;
}

.small-folder-icon {
    flex: 0 0 auto;
    transform: scale(0.72);
    transform-origin: center;
    margin: 0;
}

.employee-archive-folder-detail-page .archive-upload-form {
    margin-bottom: 18px;
}

.employee-archive-folder-detail-page .archive-drop-zone-compact {
    min-height: 110px;
}

.employee-archive-folder-detail-page .employee-archive-file-list {
    margin-top: 12px;
}

@media (max-width: 760px) {
    .archive-folder-create-form-inline {
        grid-template-columns: 1fr;
    }

    .archive-folder-create-button {
        justify-self: start;
    }

    .employee-archive-folder-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    }
}


/* === v24: Speicher & Backup Info-Seite === */
.storage-page {
    padding-bottom: 56px;
}

.storage-warning-card {
    margin: 18px 0 20px;
    padding: 16px 18px;
    border: 1px solid #eadb8a;
    border-radius: 12px;
    background: #fff8db;
    color: #3c3210;
    font-size: 16px;
    line-height: 1.45;
}

.storage-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 18px;
    margin-bottom: 20px;
}

.storage-card,
.storage-section-card {
    background: #fff;
    border: 1px solid #d9ded6;
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(16, 24, 40, .06);
}

.storage-card {
    padding: 22px;
}

.storage-card h3,
.storage-section-card h3 {
    margin: 0 0 16px;
    font-size: 26px;
}

.storage-section-card {
    padding: 22px;
    margin-bottom: 20px;
}

.storage-section-header {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
    margin-bottom: 16px;
}

.storage-total-pill {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    background: #eef7ea;
    border: 1px solid #d5e5cf;
    color: #2f4f3a;
    font-weight: 900;
    white-space: nowrap;
}

.storage-meta-list {
    display: grid;
    gap: 10px;
    margin: 0;
}

.storage-meta-list div {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 16px;
    padding: 9px 0;
    border-bottom: 1px solid #edf0eb;
}

.storage-meta-list.compact div {
    grid-template-columns: 210px minmax(0, 1fr);
}

.storage-meta-list div:last-child {
    border-bottom: 0;
}

.storage-meta-list dt {
    color: #667064;
    font-size: 12px;
    font-weight: 950;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.storage-meta-list dd {
    margin: 0;
    min-width: 0;
    overflow-wrap: anywhere;
    color: #162017;
    font-weight: 800;
}

.storage-table-wrapper {
    overflow-x: auto;
}

.storage-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 680px;
}

.storage-table th,
.storage-table td {
    padding: 13px 12px;
    border-bottom: 1px solid #e5eae3;
    text-align: left;
}

.storage-table th {
    color: #667064;
    font-size: 12px;
    font-weight: 950;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.storage-table td {
    font-size: 15px;
    font-weight: 750;
}

.storage-check-list {
    margin: 0;
    padding-left: 22px;
    display: grid;
    gap: 10px;
    color: #263427;
    font-size: 16px;
    line-height: 1.45;
}

.storage-check-list code {
    padding: 2px 5px;
    border-radius: 5px;
    background: #eef3eb;
}

@media (max-width: 760px) {
    .storage-card-grid {
        grid-template-columns: 1fr;
    }

    .storage-section-header {
        flex-direction: column;
    }

    .storage-total-pill {
        white-space: normal;
    }

    .storage-meta-list div,
    .storage-meta-list.compact div {
        grid-template-columns: 1fr;
        gap: 4px;
    }
}

/* Admin-/Mitarbeiteranfragen */
.request-nav-link {
    position: relative;
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
}

.admin-request-mini-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: #d92d20;
    color: #fff;
    font-size: 11px;
    font-weight: 900;
    line-height: 1;
}

.admin-request-mini-badge.mention {
    background: #7f56d9;
}

.admin-requests-page,
.admin-request-detail-page,
.admin-request-create-page {
    max-width: 1100px;
}

.admin-requests-header {
    align-items: flex-start;
}

.admin-request-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0;
}

.filter-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 13px;
    border: 1px solid #d0d5dd;
    border-radius: 999px;
    color: #344054;
    background: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 13px;
}

.filter-pill.active,
.filter-pill:hover {
    border-color: #2f855a;
    background: #ecfdf3;
    color: #166534;
}

.admin-request-employee-filter {
    margin-bottom: 16px;
}

.inline-filter-form {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.admin-request-list {
    display: grid;
    gap: 12px;
}

.admin-request-row {
    display: block;
    padding: 16px 18px;
    border: 1px solid #e4e7ec;
    border-radius: 16px;
    background: #fff;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 1px 3px rgba(16, 24, 40, 0.06);
}

.admin-request-row:hover {
    border-color: #98a2b3;
    box-shadow: 0 4px 14px rgba(16, 24, 40, 0.10);
}

.admin-request-title-line {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 5px;
}

.admin-request-status {
    display: inline-flex;
    padding: 4px 9px;
    border-radius: 999px;
    background: #f2f4f7;
    color: #344054;
    font-size: 12px;
    font-weight: 800;
}

.status-open .admin-request-status,
.admin-request-detail-header.status-open .admin-request-status {
    background: #fef3f2;
    color: #b42318;
}

.status-in_progress .admin-request-status,
.admin-request-detail-header.status-in_progress .admin-request-status {
    background: #fffaeb;
    color: #b54708;
}

.status-archived .admin-request-status,
.admin-request-detail-header.status-archived .admin-request-status {
    background: #f2f4f7;
    color: #475467;
}

.admin-request-at-badge,
.admin-request-unread-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 7px;
    border-radius: 999px;
    color: #fff;
    font-size: 12px;
    font-weight: 900;
}

.admin-request-at-badge {
    background: #7f56d9;
}

.admin-request-unread-badge {
    background: #d92d20;
}

.admin-request-snippet {
    margin: 10px 0 0;
    color: #475467;
    font-size: 14px;
}

.admin-request-detail-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 410px);
    gap: 18px;
    align-items: start;
    padding: 20px;
    border: 1px solid #e4e7ec;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(16, 24, 40, 0.06);
    margin-bottom: 18px;
}

.admin-request-status-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.admin-request-thread {
    display: grid;
    gap: 12px;
    margin: 18px 0;
}

.admin-request-message {
    max-width: 760px;
    padding: 14px 16px;
    border: 1px solid #e4e7ec;
    border-radius: 16px 16px 16px 4px;
    background: #fff;
}

.admin-request-message.own-message {
    justify-self: end;
    border-radius: 16px 16px 4px 16px;
    background: #ecfdf3;
    border-color: #abefc6;
}

.admin-request-message header {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    color: #667085;
    font-size: 12px;
    margin-bottom: 8px;
}

.admin-request-message p {
    margin: 0;
    color: #101828;
    line-height: 1.55;
}

.admin-request-reply-card,
.admin-request-danger-actions {
    padding: 18px;
    border: 1px solid #e4e7ec;
    border-radius: 18px;
    background: #fff;
    margin-top: 18px;
}

.admin-request-danger-actions {
    display: flex;
    justify-content: flex-end;
}

.special-folder .request-folder-icon::before {
    content: "@";
    position: absolute;
    inset: auto 10px 10px auto;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    background: #7f56d9;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
}

@media (max-width: 850px) {
    .admin-request-detail-header {
        grid-template-columns: 1fr;
    }

    .admin-request-message,
    .admin-request-message.own-message {
        max-width: 100%;
        justify-self: stretch;
    }
}


/* Employee archive: archived admin requests */
.employee-archive-requests-page .archive-request-folder-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 20px;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
}

.archive-request-folder-title {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
}

.archive-request-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.archive-request-row {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 14px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    color: inherit;
    text-decoration: none;
    background: #f8fafc;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.archive-request-row:hover {
    border-color: #cbd5e1;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    transform: translateY(-1px);
}

.archive-request-row-main {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.archive-request-row-main strong {
    font-size: 1rem;
}

.archive-request-row-meta {
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
    min-width: 160px;
}

.archive-request-status {
    width: fit-content;
    font-size: 0.78rem;
    font-weight: 700;
    border-radius: 999px;
    padding: 3px 8px;
    background: #e2e8f0;
    color: #334155;
}

.archive-request-latest-message {
    color: #475569;
    font-size: 0.9rem;
}


/* Employee archive request counters */
.employee-archive-table th,
.employee-archive-table td {
    white-space: nowrap;
}

.archive-count-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.8rem;
    padding: 0.18rem 0.45rem;
    border-radius: 999px;
    background: rgba(47, 86, 59, 0.12);
    color: #244a32;
    font-weight: 700;
    text-decoration: none;
}

.archive-count-link:hover {
    background: rgba(47, 86, 59, 0.2);
}

.secondary-small-button {
    margin-left: 0.35rem;
}

/* v32: Dialog zum Setzen eines Projekt-Enddatums */
.planner-dialog-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(0, 0, 0, 0.32);
}

.planner-dialog-backdrop.hidden {
    display: none;
}

.planner-dialog {
    width: min(420px, 100%);
    border: 1px solid #d7ded6;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.24);
    padding: 20px;
}

.planner-dialog h2 {
    margin: 0 0 8px;
    font-size: 1.25rem;
}

.planner-dialog-field {
    display: grid;
    gap: 8px;
    margin-top: 18px;
    font-weight: 700;
}

.planner-dialog-field input[type="date"] {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border: 1px solid #ccd8cc;
    border-radius: 8px;
    font: inherit;
}

.planner-dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

/* Read-only monitor planning view */
.display-view-body {
    margin: 0;
    min-height: 100vh;
    background: #f4f6f1;
    color: #1f2a22;
    overflow: hidden;
}

.display-view {
    height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px;
    box-sizing: border-box;
}

.display-view-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 10px 14px;
    border-radius: 14px;
    background: #2f553d;
    color: #fff;
    box-shadow: 0 2px 6px rgba(16, 24, 40, 0.16);
}

.display-view-header h1 {
    margin: 0;
    font-size: clamp(22px, 2.1vw, 36px);
    line-height: 1.1;
}

.display-view-kicker {
    margin-bottom: 3px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    opacity: .78;
}

.display-view-controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 6px;
    max-width: 58vw;
}

.display-view-controls a,
.display-view-controls button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 6px 9px;
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 999px;
    background: rgba(255, 255, 255, .12);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}

.display-view-controls a:hover,
.display-view-controls button:hover,
.display-view-controls .display-toggle.active {
    background: #fff;
    color: #2f553d;
}

.display-date-form {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin: 0;
}

.display-date-form input[type="date"] {
    width: 128px;
    min-height: 30px;
    padding: 5px 8px;
    border: 1px solid rgba(255, 255, 255, .35);
    border-radius: 999px;
    background: rgba(255, 255, 255, .95);
    color: #1f2a22;
    font-size: 12px;
}

.display-week-grid {
    flex: 1;
    min-height: 0;
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 8px;
}

.display-day-card {
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    border: 1px solid #d9e1d7;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(16, 24, 40, 0.08);
    overflow: hidden;
}

.display-weekend {
    background: #f9faf7;
}

.display-day-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 10px;
    border-bottom: 1px solid #dde5da;
    background: #edf3ea;
}

.display-day-header strong {
    font-size: clamp(12px, 1vw, 17px);
}

.display-day-header span {
    font-size: clamp(11px, .85vw, 14px);
    font-weight: 800;
    color: #5d6b61;
}

.display-day-content {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 7px;
    overflow: hidden;
}

.display-project {
    border-left: 5px solid #2f553d;
    border-radius: 11px;
    background: #edf3ee;
    padding: 7px 8px;
    box-shadow: inset 0 0 0 1px rgba(47, 85, 61, .12);
}

.display-project.continues-left {
    border-top-left-radius: 2px;
    border-bottom-left-radius: 2px;
}

.display-project.continues-right {
    border-top-right-radius: 2px;
    border-bottom-right-radius: 2px;
}

.display-project-title-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 3px;
}

.display-project-title-row strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: clamp(12px, .9vw, 16px);
}

.display-project-title-row span {
    flex: 0 0 auto;
    font-size: clamp(10px, .75vw, 12px);
    font-weight: 900;
    color: #536058;
}

.display-project-subline {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: clamp(10px, .72vw, 12px);
    color: #58645c;
}

.display-project-meta {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4px;
    margin-top: 6px;
    font-size: clamp(10px, .7vw, 12px);
}

.display-meta-label {
    display: block;
    margin-bottom: 2px;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #6b756e;
}

.display-pill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
}

.display-pill-list span {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    padding: 2px 6px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #d9e1d7;
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.display-machine-pill-list span {
    background: #fff8e6;
    border-color: #ecd59b;
}

.display-empty {
    margin: 0;
    padding: 8px;
    border: 1px dashed #d7ded4;
    border-radius: 10px;
    color: #77827b;
    font-size: 12px;
}

.display-absence-box,
.display-downtime-box {
    margin-top: auto;
    padding: 6px;
    border-radius: 10px;
    background: #fff7dc;
    border: 1px solid #ecd59b;
}

.display-downtime-box {
    background: #eef2ff;
    border-color: #c7d2fe;
}

.display-absence-box h3,
.display-downtime-box h3 {
    margin: 0 0 5px;
    font-size: clamp(10px, .75vw, 12px);
    text-transform: uppercase;
    letter-spacing: .04em;
}

.display-absence-item {
    display: flex;
    flex-direction: column;
    gap: 1px;
    padding: 4px 0;
    border-top: 1px solid rgba(31, 42, 34, .08);
    font-size: clamp(10px, .72vw, 12px);
}

.display-absence-item:first-of-type {
    border-top: 0;
}

.display-absence-item span,
.display-absence-item small {
    color: #657168;
}

@media (max-width: 1300px) {
    .display-view-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .display-view-controls {
        justify-content: flex-start;
        max-width: none;
    }

    .display-week-grid {
        gap: 6px;
    }
}

@media print {
    .display-view-body {
        overflow: visible;
    }

    .display-view-controls {
        display: none;
    }
}

/* --- v34: Monitor-/View-Seite ohne Wochenende, mit Admin-gesteuerten Anzeigeoptionen und Auto-Refresh --- */
.display-settings-panel {
    margin-top: 14px;
    padding: 12px 14px;
    border: 1px solid #d7ded5;
    border-radius: 8px;
    background: #f9fbf8;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.display-settings-title {
    font-weight: 800;
    color: #2f4f3a;
    margin-right: 6px;
}

.display-setting-toggle {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    color: #34443a;
}

.display-setting-toggle input {
    transform: translateY(1px);
}

.display-settings-panel button {
    border: 1px solid #2f4f3a;
    border-radius: 6px;
    background: #2f4f3a;
    color: #fff;
    padding: 7px 10px;
    font-weight: 700;
}

.display-view-body {
    background: #eef3ed;
    overflow: hidden;
}

.display-view-readonly {
    width: 100vw;
    height: 100vh;
    box-sizing: border-box;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow: hidden;
}

.display-view-header {
    padding: 10px 14px;
    border-radius: 10px;
    background: #2f4f3a;
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.display-view-header h1 {
    margin: 0;
    font-size: clamp(20px, 2vw, 32px);
    line-height: 1.1;
}

.display-view-kicker {
    text-transform: uppercase;
    letter-spacing: .08em;
    font-size: 11px;
    font-weight: 800;
    opacity: .78;
    margin-bottom: 3px;
}

.display-view-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.display-view-controls a,
.display-view-controls button {
    border: 1px solid rgba(255,255,255,.45);
    border-radius: 7px;
    background: rgba(255,255,255,.12);
    color: #fff;
    text-decoration: none;
    padding: 6px 9px;
    font-weight: 800;
    font-size: 12px;
}

.display-date-form {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.display-date-form input {
    border: 1px solid rgba(255,255,255,.45);
    border-radius: 7px;
    padding: 5px 7px;
    font-size: 12px;
}

.display-info-line {
    flex-shrink: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    font-size: 12px;
    color: #3f4a42;
}

.display-info-line span {
    border: 1px solid #d8e0d5;
    border-radius: 999px;
    background: #fff;
    padding: 5px 9px;
}

.display-board-section {
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.display-board-section:first-of-type {
    flex: 1 1 auto;
}

.display-absence-board-section {
    flex: 0 0 auto;
    max-height: 22vh;
}

.display-section-heading {
    flex-shrink: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.display-section-heading h2 {
    margin: 0;
    color: #233528;
    font-size: clamp(15px, 1.2vw, 20px);
}

.compact-display-week-grid,
.display-absence-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    min-height: 0;
}

.compact-display-week-grid {
    flex: 1 1 auto;
    overflow: hidden;
}

.display-day-card,
.display-absence-column {
    min-width: 0;
    border: 1px solid #d8e0d5;
    border-radius: 10px;
    background: #fff;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.display-day-header,
.display-absence-column > header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 9px;
    background: #f6f8f5;
    border-bottom: 1px solid #d8e0d5;
    color: #233528;
    font-size: 13px;
    flex-shrink: 0;
}

.display-day-header span,
.display-absence-column > header span {
    color: #647063;
    font-weight: 700;
}

.display-day-content,
.display-absence-content {
    min-height: 0;
    overflow: hidden;
    padding: 7px;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.display-day-content {
    flex: 1 1 auto;
}

.display-project {
    position: relative;
    border: 1px solid #ccd9cc;
    border-left: 5px solid #2f4f3a;
    border-radius: 8px;
    padding: 7px 8px;
    background: #edf3ed;
    box-shadow: 0 1px 2px rgba(34, 51, 40, .08);
    font-size: clamp(11px, .85vw, 14px);
}

.display-project.continues-left::before,
.display-project.continues-right::after {
    content: "";
    position: absolute;
    top: 17px;
    width: 12px;
    height: 4px;
    background: #2f4f3a;
}

.display-project.continues-left::before {
    left: -14px;
}

.display-project.continues-right::after {
    right: -14px;
}

.display-project-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 6px;
    font-size: clamp(12px, 1vw, 16px);
}

.display-project-title-row span {
    flex-shrink: 0;
    font-size: .82em;
    color: #4a5b50;
    font-weight: 800;
}

.display-project-subline {
    margin-top: 3px;
    color: #59665c;
    font-size: .86em;
    line-height: 1.22;
}

.display-project-meta {
    margin-top: 6px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 5px;
}

.display-meta-label {
    display: block;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #657266;
    font-size: .72em;
    font-weight: 900;
    margin-bottom: 2px;
}

.display-pill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.display-pill-list span {
    display: inline-flex;
    align-items: center;
    border: 1px solid #cfd8ce;
    border-radius: 999px;
    background: #fff;
    padding: 2px 6px;
    font-size: .84em;
    line-height: 1.25;
}

.display-machine-pill-list span {
    border-color: #ead8ab;
    background: #fff8e5;
}

.display-empty {
    margin: 0;
    color: #7a837b;
    font-style: italic;
    font-size: 12px;
}

.display-absence-grid {
    flex: 1 1 auto;
    overflow: hidden;
}

.display-absence-column {
    min-height: 70px;
}

.display-absence-content {
    gap: 5px;
}

.display-absence-card {
    position: relative;
    border: 1px solid #e1c46f;
    border-left: 5px solid #8d6b2f;
    border-radius: 7px;
    background: #fff6d7;
    padding: 5px 7px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: clamp(10px, .78vw, 13px);
    line-height: 1.2;
}

.display-absence-card strong {
    color: #513f18;
}

.display-absence-card span {
    color: #6b5523;
}

.display-machine-absence-card {
    border-color: #d8c08d;
    background: #fff8e8;
}

.display-absence-card.continues-left::before,
.display-absence-card.continues-right::after {
    content: "";
    position: absolute;
    top: 12px;
    width: 10px;
    height: 3px;
    background: #8d6b2f;
}

.display-absence-card.continues-left::before {
    left: -12px;
}

.display-absence-card.continues-right::after {
    right: -12px;
}

@media (max-width: 1200px) {
    .display-view-readonly {
        overflow: auto;
    }

    .compact-display-week-grid,
    .display-absence-grid {
        min-width: 1000px;
    }
}


/* --- v35: Monitoransicht: Projektfarben übernehmen und Abwesenheiten als klare Tabellen anzeigen --- */
.display-view-readonly .display-project {
    --project-border: #2f4f3a;
    --project-bg: rgba(47, 79, 58, 0.12);
    --project-bg-strong: rgba(47, 79, 58, 0.22);
    border-color: var(--project-bg-strong);
    border-left-color: var(--project-border);
    background: color-mix(in srgb, var(--project-bg) 78%, white);
}

.display-view-readonly .display-project.continues-left::before,
.display-view-readonly .display-project.continues-right::after {
    background: var(--project-border);
}

.display-view-readonly .display-project-title-row span {
    color: var(--project-border);
}

.display-view-readonly .display-absence-board-section {
    margin-top: 14px;
    max-height: none;
}

.display-view-readonly .display-absence-table-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
    align-items: stretch;
}

.display-view-readonly .display-absence-column {
    border: 1px solid #d8e0d5;
    border-radius: 10px;
    background: #fff;
    min-height: 104px;
    box-shadow: 0 1px 3px rgba(34, 51, 40, .08);
}

.display-view-readonly .display-absence-column > header {
    min-height: 34px;
    background: #f6f8f5;
    border-bottom: 1px solid #d8e0d5;
}

.display-view-readonly .display-absence-table-content {
    min-height: 68px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.display-view-readonly .display-absence-card {
    width: 100%;
    min-height: 30px;
    box-sizing: border-box;
    border-radius: 7px;
    border: 1px solid #e1c46f;
    border-left: 5px solid #8d6b2f;
    background: #fff6d7;
    padding: 5px 7px;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
    box-shadow: 0 1px 2px rgba(90, 68, 24, .08);
}

.display-view-readonly .display-employee-absence-card strong,
.display-view-readonly .display-machine-absence-card strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.display-view-readonly .display-employee-absence-card span,
.display-view-readonly .display-machine-absence-card span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: .88em;
}

.display-view-readonly .display-machine-absence-card {
    border-color: #b7c7d3;
    border-left-color: #55758b;
    background: #eef5f8;
}

.display-view-readonly .display-machine-absence-card strong {
    color: #29465a;
}

.display-view-readonly .display-machine-absence-card span {
    color: #466173;
}

.display-view-readonly .display-machine-absence-card.continues-left::before,
.display-view-readonly .display-machine-absence-card.continues-right::after {
    background: #55758b;
}

@supports not (background: color-mix(in srgb, white, black)) {
    .display-view-readonly .display-project {
        background: var(--project-bg);
    }
}

/* --- v36: Monitoransicht lesbarer und datensparsamer --- */
.display-view-readonly {
    padding: 12px;
    gap: 12px;
}

.display-view-readonly .display-view-header h1 {
    font-size: clamp(26px, 2.45vw, 42px);
}

.display-view-readonly .display-view-kicker {
    font-size: clamp(12px, .8vw, 15px);
    letter-spacing: .09em;
}

.display-view-readonly .display-info-line {
    font-size: clamp(13px, .85vw, 16px);
}

.display-view-readonly .display-section-heading h2 {
    font-size: clamp(20px, 1.45vw, 28px);
}

.display-view-readonly .display-day-header,
.display-view-readonly .display-absence-column > header {
    padding: 10px 12px;
    font-size: clamp(15px, 1vw, 19px);
}

.display-view-readonly .display-day-content {
    padding: 10px;
    gap: 10px;
}

.display-view-readonly .display-project {
    min-height: clamp(118px, 8.8vw, 190px);
    padding: 12px 13px;
    border-left-width: 6px;
    font-size: clamp(15px, 1.02vw, 19px);
    line-height: 1.22;
}

.display-view-readonly .display-project-title-row {
    font-size: clamp(18px, 1.32vw, 25px);
    line-height: 1.12;
}

.display-view-readonly .display-project-title-row strong {
    font-weight: 800;
}

.display-view-readonly .display-project-title-row span {
    font-size: clamp(14px, .95vw, 18px);
    font-weight: 700;
}

.display-view-readonly .display-project-subline {
    margin-top: 5px;
    font-size: clamp(14px, .96vw, 18px);
    line-height: 1.25;
}

.display-view-readonly .display-project-meta {
    margin-top: 10px;
    gap: 8px;
}

.display-view-readonly .display-meta-label {
    margin-bottom: 4px;
    font-size: clamp(11px, .78vw, 14px);
    font-weight: 800;
    letter-spacing: .07em;
}

.display-view-readonly .display-pill-list {
    gap: 6px;
}

.display-view-readonly .display-pill-list span {
    padding: 4px 9px;
    border-radius: 999px;
    font-size: clamp(13px, .92vw, 17px);
    font-weight: 600;
    line-height: 1.22;
}

.display-view-readonly .display-project em {
    font-size: clamp(13px, .9vw, 17px);
    font-weight: 500;
}

.display-view-readonly .display-absence-board-section {
    margin-top: 12px;
}

.display-view-readonly .display-absence-table-grid {
    gap: 9px;
}

.display-view-readonly .display-absence-column {
    min-height: clamp(118px, 8.5vw, 172px);
}

.display-view-readonly .display-absence-table-content {
    min-height: clamp(76px, 5.8vw, 126px);
    padding: 10px;
    gap: 8px;
}

.display-view-readonly .display-absence-card {
    min-height: clamp(46px, 3.5vw, 66px);
    padding: 9px 10px;
    border-left-width: 6px;
    gap: 4px;
    font-size: clamp(14px, .98vw, 18px);
    line-height: 1.22;
}

.display-view-readonly .display-employee-absence-card strong,
.display-view-readonly .display-machine-absence-card strong {
    font-size: clamp(15px, 1.02vw, 19px);
    font-weight: 700;
}

.display-view-readonly .display-employee-absence-card span,
.display-view-readonly .display-machine-absence-card span {
    font-size: clamp(13px, .92vw, 17px);
    font-weight: 500;
}

.display-view-readonly .display-empty {
    font-size: clamp(13px, .9vw, 16px);
}

@media (min-width: 1600px) {
    .display-view-readonly .display-project {
        min-height: 176px;
    }

    .display-view-readonly .display-absence-column {
        min-height: 150px;
    }
}

/* --- v37: Monitoransicht wirklich bildschirmfüllend, farbtreu und kompakter bei Abwesenheiten --- */
.display-view-body {
    overflow: hidden !important;
}

.display-view-readonly {
    height: 100vh !important;
    max-height: 100vh !important;
    display: grid !important;
    grid-template-rows: auto auto minmax(0, 1fr) auto auto !important;
    gap: 7px !important;
    padding: 8px !important;
    overflow: hidden !important;
}

.display-view-readonly .display-view-header {
    min-height: 0 !important;
    padding: 8px 13px !important;
    border-radius: 10px !important;
}

.display-view-readonly .display-view-header h1 {
    font-size: clamp(24px, 1.9vw, 34px) !important;
    line-height: 1.03 !important;
}

.display-view-readonly .display-view-kicker {
    margin-bottom: 2px !important;
    font-size: clamp(11px, .62vw, 13px) !important;
}

.display-view-readonly .display-view-controls a,
.display-view-readonly .display-view-controls button,
.display-view-readonly .display-date-form input[type="date"] {
    min-height: 28px !important;
    font-size: 12px !important;
    padding-top: 5px !important;
    padding-bottom: 5px !important;
}

.display-view-readonly .display-info-line {
    min-height: 0 !important;
    gap: 5px !important;
    font-size: 12px !important;
    line-height: 1.1 !important;
}

.display-view-readonly .display-info-line span {
    padding: 4px 8px !important;
}

.display-view-readonly .display-project-board-section {
    min-height: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
}

.display-view-readonly .display-section-heading {
    min-height: 0 !important;
    margin: 0 0 5px !important;
    flex: 0 0 auto !important;
}

.display-view-readonly .display-section-heading h2 {
    margin: 0 !important;
    font-size: clamp(17px, 1.15vw, 22px) !important;
    line-height: 1.05 !important;
}

.display-view-readonly .compact-display-week-grid {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    height: 100% !important;
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    gap: 5px !important;
    overflow: hidden !important;
}

.display-view-readonly .display-day-card {
    min-height: 0 !important;
    border-radius: 9px !important;
}

.display-view-readonly .display-day-header,
.display-view-readonly .display-absence-column > header {
    min-height: 0 !important;
    padding: 6px 8px !important;
    font-size: clamp(12px, .78vw, 15px) !important;
    line-height: 1.05 !important;
}

.display-view-readonly .display-day-content {
    min-height: 0 !important;
    height: 100% !important;
    padding: 6px !important;
    gap: 5px !important;
    overflow: hidden !important;
}

.display-view-readonly .display-project {
    min-height: 0 !important;
    flex: 1 1 0 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    padding: 8px 9px !important;
    border-left-width: 5px !important;
    border-radius: 7px !important;
    font-size: clamp(12px, .82vw, 16px) !important;
    line-height: 1.17 !important;
    overflow: hidden !important;
}

.display-view-readonly .display-project-title-row {
    margin-bottom: 3px !important;
    font-size: clamp(14px, .98vw, 18px) !important;
    line-height: 1.06 !important;
}

.display-view-readonly .display-project-title-row strong {
    font-weight: 800 !important;
}

.display-view-readonly .display-project-title-row span {
    font-size: clamp(12px, .76vw, 14px) !important;
    font-weight: 700 !important;
}

.display-view-readonly .display-project-subline {
    margin-top: 2px !important;
    font-size: clamp(12px, .78vw, 15px) !important;
    line-height: 1.15 !important;
    white-space: normal !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
}

.display-view-readonly .display-project-meta {
    margin-top: 7px !important;
    gap: 4px !important;
    min-height: 0 !important;
}

.display-view-readonly .display-meta-label {
    margin-bottom: 2px !important;
    font-size: clamp(10px, .64vw, 12px) !important;
    font-weight: 750 !important;
    letter-spacing: .06em !important;
}

.display-view-readonly .display-pill-list {
    gap: 4px !important;
}

.display-view-readonly .display-pill-list span {
    padding: 2px 7px !important;
    font-size: clamp(12px, .76vw, 14px) !important;
    font-weight: 500 !important;
    line-height: 1.18 !important;
}

.display-view-readonly .display-project em {
    font-size: clamp(12px, .76vw, 14px) !important;
}

.display-density-medium .display-view-readonly .display-project {
    padding: 7px 8px !important;
    font-size: clamp(11px, .72vw, 14px) !important;
}

.display-density-medium .display-view-readonly .display-project-title-row {
    font-size: clamp(13px, .86vw, 16px) !important;
}

.display-density-medium .display-view-readonly .display-project-subline {
    -webkit-line-clamp: 1 !important;
    font-size: clamp(11px, .7vw, 13px) !important;
}

.display-density-compact .display-view-readonly .display-project-meta {
    margin-top: 4px !important;
}

.display-density-compact .display-view-readonly .display-meta-label {
    font-size: 9px !important;
}

.display-density-compact .display-view-readonly .display-pill-list span,
.display-density-compact .display-view-readonly .display-project em {
    font-size: 11px !important;
    padding: 1px 5px !important;
}

.display-view-readonly .display-absence-board-section {
    min-height: 0 !important;
    max-height: 9.4vh !important;
    margin-top: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
}

.display-view-readonly .display-absence-board-section .display-section-heading {
    margin-bottom: 3px !important;
}

.display-view-readonly .display-absence-board-section .display-section-heading h2 {
    font-size: clamp(15px, .95vw, 18px) !important;
}

.display-view-readonly .display-absence-table-grid {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    gap: 5px !important;
    overflow: hidden !important;
}

.display-view-readonly .display-absence-column {
    min-height: 0 !important;
    height: 100% !important;
    border-radius: 7px !important;
}

.display-view-readonly .display-absence-column > header {
    padding: 5px 7px !important;
    font-size: clamp(11px, .7vw, 13px) !important;
}

.display-view-readonly .display-absence-table-content {
    min-height: 0 !important;
    height: 100% !important;
    padding: 5px !important;
    gap: 4px !important;
    overflow: hidden !important;
}

.display-view-readonly .display-absence-card {
    min-height: 0 !important;
    padding: 5px 7px !important;
    border-left-width: 4px !important;
    gap: 1px !important;
    font-size: clamp(11px, .72vw, 13px) !important;
    line-height: 1.12 !important;
}

.display-view-readonly .display-employee-absence-card strong,
.display-view-readonly .display-machine-absence-card strong {
    font-size: clamp(12px, .76vw, 14px) !important;
    font-weight: 650 !important;
}

.display-view-readonly .display-employee-absence-card span,
.display-view-readonly .display-machine-absence-card span {
    font-size: clamp(11px, .68vw, 13px) !important;
    font-weight: 450 !important;
}

.display-view-readonly .display-empty {
    font-size: clamp(10px, .66vw, 12px) !important;
    padding: 4px !important;
}

/* Farbzuweisung in der Monitoransicht: spezifisch genug, damit die v35-Standardwerte überschrieben werden. */
.display-view-readonly .display-project.project-color-green {
    --project-border: #2f4f3a !important;
    --project-bg: rgba(47, 79, 58, 0.12) !important;
    --project-bg-strong: rgba(47, 79, 58, 0.22) !important;
}

.display-view-readonly .display-project.project-color-blue {
    --project-border: #2f5f8f !important;
    --project-bg: rgba(47, 95, 143, 0.12) !important;
    --project-bg-strong: rgba(47, 95, 143, 0.22) !important;
}

.display-view-readonly .display-project.project-color-red {
    --project-border: #8f3a3a !important;
    --project-bg: rgba(143, 58, 58, 0.12) !important;
    --project-bg-strong: rgba(143, 58, 58, 0.22) !important;
}

.display-view-readonly .display-project.project-color-purple {
    --project-border: #6a4a8f !important;
    --project-bg: rgba(106, 74, 143, 0.12) !important;
    --project-bg-strong: rgba(106, 74, 143, 0.22) !important;
}

.display-view-readonly .display-project.project-color-orange {
    --project-border: #9a642e !important;
    --project-bg: rgba(154, 100, 46, 0.13) !important;
    --project-bg-strong: rgba(154, 100, 46, 0.23) !important;
}

.display-view-readonly .display-project.project-color-yellow {
    --project-border: #9a812e !important;
    --project-bg: rgba(154, 129, 46, 0.13) !important;
    --project-bg-strong: rgba(154, 129, 46, 0.23) !important;
}

.display-view-readonly .display-project.project-color-gray {
    --project-border: #58615d !important;
    --project-bg: rgba(88, 97, 93, 0.12) !important;
    --project-bg-strong: rgba(88, 97, 93, 0.22) !important;
}

.display-view-readonly .display-project {
    border-color: var(--project-bg-strong) !important;
    border-left-color: var(--project-border) !important;
    background: color-mix(in srgb, var(--project-bg) 78%, white) !important;
}

.display-view-readonly .display-project.continues-left::before,
.display-view-readonly .display-project.continues-right::after {
    background: var(--project-border) !important;
}

.display-view-readonly .display-project-title-row span {
    color: var(--project-border) !important;
}

@supports not (background: color-mix(in srgb, white, black)) {
    .display-view-readonly .display-project {
        background: var(--project-bg) !important;
    }
}

/* --- v38: Monitoransicht Abwesenheiten als lesbare, scrollbare Kurzlisten --- */
.display-view-readonly .display-absence-board-section {
    max-height: 11.5vh !important;
    min-height: 92px !important;
}

.display-view-readonly .display-absence-table-content {
    overflow-y: auto !important;
    overflow-x: hidden !important;
    scrollbar-width: thin;
    scrollbar-color: #b9c8b9 #f6f8f5;
    padding: 4px !important;
    gap: 3px !important;
}

.display-view-readonly .display-absence-table-content::-webkit-scrollbar {
    width: 6px;
}

.display-view-readonly .display-absence-table-content::-webkit-scrollbar-track {
    background: #f6f8f5;
    border-radius: 999px;
}

.display-view-readonly .display-absence-table-content::-webkit-scrollbar-thumb {
    background: #b9c8b9;
    border-radius: 999px;
}

.display-view-readonly .display-absence-card {
    min-height: 22px !important;
    padding: 3px 6px !important;
    border-left-width: 4px !important;
    border-radius: 6px !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: center !important;
    column-gap: 6px !important;
    row-gap: 0 !important;
    font-size: clamp(10px, .66vw, 12px) !important;
    line-height: 1.05 !important;
}

.display-view-readonly .display-employee-absence-card strong,
.display-view-readonly .display-machine-absence-card strong {
    min-width: 0 !important;
    display: block !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    font-size: clamp(10px, .68vw, 12px) !important;
    font-weight: 650 !important;
}

.display-view-readonly .display-employee-absence-card span,
.display-view-readonly .display-machine-absence-card span {
    display: block !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    font-size: clamp(9px, .58vw, 11px) !important;
    font-weight: 450 !important;
    opacity: .88 !important;
}

.display-view-readonly .display-employee-absence-card span {
    color: #7a6125 !important;
}

.display-view-readonly .display-machine-absence-card span {
    color: #526d7f !important;
}

.display-view-readonly .display-absence-column > header {
    padding: 4px 7px !important;
    font-size: clamp(10px, .66vw, 12px) !important;
}

.display-view-readonly .display-absence-board-section .display-section-heading h2 {
    font-size: clamp(13px, .85vw, 16px) !important;
}

.display-view-readonly .display-absence-column {
    min-height: 0 !important;
}

.display-view-readonly .display-empty {
    font-size: clamp(9px, .58vw, 11px) !important;
    padding: 2px !important;
}

@media (min-height: 900px) {
    .display-view-readonly .display-absence-board-section {
        max-height: 12.5vh !important;
        min-height: 104px !important;
    }

    .display-view-readonly .display-absence-card {
        min-height: 25px !important;
    }
}

/* Login page */
.login-page-body {
    min-height: 100vh;
    margin: 0;
    background:
        radial-gradient(circle at top left, rgba(71, 113, 83, 0.18), transparent 34rem),
        linear-gradient(135deg, #edf3ed 0%, #f8faf7 46%, #e8efe8 100%);
    color: #17231a;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.login-shell {
    width: min(980px, 100%);
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(340px, 430px);
    border-radius: 28px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 24px 70px rgba(24, 54, 35, 0.18);
    border: 1px solid rgba(42, 78, 53, 0.14);
}

.login-brand-panel {
    background: linear-gradient(145deg, #244f34 0%, #2e6240 58%, #3d7650 100%);
    color: #fff;
    padding: 3.2rem;
    min-height: 480px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.login-brand-panel::after {
    content: "";
    position: absolute;
    right: -7rem;
    bottom: -7rem;
    width: 18rem;
    height: 18rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.09);
}

.login-brand-mark {
    width: 64px;
    height: 64px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.16);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 1.45rem;
    letter-spacing: 0.04em;
    margin-bottom: 1.6rem;
    border: 1px solid rgba(255, 255, 255, 0.28);
}

.login-kicker {
    margin: 0 0 0.45rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.76rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.78);
}

.login-brand-panel h1 {
    margin: 0;
    font-size: clamp(2.2rem, 4vw, 3.8rem);
    line-height: 0.98;
    letter-spacing: -0.05em;
}

.login-brand-text {
    margin: 1.3rem 0 0;
    max-width: 34rem;
    font-size: 1.04rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.84);
}

.login-feature-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 2rem;
}

.login-feature-list span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.13);
    border: 1px solid rgba(255, 255, 255, 0.22);
    padding: 0.48rem 0.75rem;
    font-size: 0.86rem;
    font-weight: 700;
}

.login-card {
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: rgba(255, 255, 255, 0.96);
}

.login-card-header .login-kicker {
    color: #2f5d3d;
}

.login-card h2 {
    margin: 0;
    font-size: 2rem;
    letter-spacing: -0.04em;
    color: #142219;
}

.login-card-header p:not(.login-kicker) {
    margin: 0.6rem 0 0;
    color: #637062;
}

.login-error-box {
    margin: 1.3rem 0 0;
    padding: 0.85rem 1rem;
    border-radius: 14px;
    background: #fff0ef;
    border: 1px solid #e7b8b3;
    color: #8a2b22;
    font-weight: 700;
}

.login-form {
    margin-top: 1.55rem;
    display: grid;
    gap: 0.7rem;
}

.login-form label {
    font-weight: 800;
    color: #26352b;
    margin-top: 0.25rem;
}

.login-form input[type="text"],
.login-form input[type="password"] {
    width: 100%;
    box-sizing: border-box;
    border-radius: 14px;
    border: 1px solid #cfd8cd;
    background: #f8faf7;
    padding: 0.95rem 1rem;
    font-size: 1rem;
    color: #162219;
    outline: none;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.login-form input[type="text"]:focus,
.login-form input[type="password"]:focus {
    background: #fff;
    border-color: #2d5b3d;
    box-shadow: 0 0 0 4px rgba(45, 91, 61, 0.13);
}

.login-submit-button {
    margin-top: 0.8rem;
    border: 0;
    border-radius: 15px;
    background: #274f35;
    color: #fff;
    padding: 1rem 1.2rem;
    font-size: 1rem;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 12px 24px rgba(39, 79, 53, 0.2);
}

.login-submit-button:hover {
    background: #1f412c;
}

.login-help-text {
    margin: 1.2rem 0 0;
    color: #697468;
    font-size: 0.92rem;
    line-height: 1.45;
}

@media (max-width: 800px) {
    .login-page-body {
        padding: 1rem;
    }

    .login-shell {
        grid-template-columns: 1fr;
    }

    .login-brand-panel {
        min-height: auto;
        padding: 2rem;
    }

    .login-card {
        padding: 2rem;
    }
}

/* --- v40: Eigene Ibbeken-Garten-Loginseite --- */
.ib-login-body {
    margin: 0;
    min-height: 100vh;
    font-family: Arial, Helvetica, sans-serif;
    background:
        radial-gradient(circle at 15% 10%, rgba(83, 124, 91, 0.28), transparent 32%),
        linear-gradient(135deg, #eff4ef 0%, #dfe9df 48%, #cbd9ce 100%);
    color: #12251a;
}

.ib-login-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(320px, 1.1fr) minmax(320px, 0.9fr);
    gap: 34px;
    align-items: center;
    max-width: 1120px;
    margin: 0 auto;
    padding: 42px 28px;
    box-sizing: border-box;
}

.ib-login-brand,
.ib-login-card {
    border-radius: 28px;
    box-shadow: 0 22px 60px rgba(25, 58, 39, 0.16);
}

.ib-login-brand {
    position: relative;
    overflow: hidden;
    min-height: 520px;
    padding: 48px;
    box-sizing: border-box;
    background: linear-gradient(145deg, #244f35 0%, #2f6545 58%, #3d7654 100%);
    color: #ffffff;
}

.ib-login-brand::after {
    content: "";
    position: absolute;
    right: -100px;
    bottom: -120px;
    width: 330px;
    height: 330px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.09);
}

.ib-login-logo {
    width: 76px;
    height: 76px;
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.28);
    font-size: 30px;
    font-weight: 800;
    letter-spacing: 0.06em;
    margin-bottom: 30px;
}

.ib-login-kicker {
    margin: 0 0 10px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    opacity: 0.78;
}

.ib-login-brand h1 {
    margin: 0;
    max-width: 560px;
    font-size: clamp(42px, 6vw, 72px);
    line-height: 0.98;
    letter-spacing: -0.05em;
}

.ib-login-intro {
    max-width: 520px;
    margin: 28px 0 0;
    color: rgba(255, 255, 255, 0.86);
    font-size: 19px;
    line-height: 1.55;
}

.ib-login-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 34px;
}

.ib-login-tags span {
    padding: 9px 13px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.13);
    border: 1px solid rgba(255, 255, 255, 0.22);
    font-size: 13px;
    font-weight: 700;
}

.ib-login-card {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(37, 79, 53, 0.12);
    padding: 42px;
    box-sizing: border-box;
}

.ib-login-card-head h2 {
    margin: 0;
    font-size: 36px;
    letter-spacing: -0.04em;
    color: #1f442e;
}

.ib-login-card-head p:not(.ib-login-kicker) {
    margin: 10px 0 0;
    color: #607064;
    font-size: 15px;
}

.ib-login-alert {
    margin: 24px 0 0;
    padding: 12px 14px;
    border-radius: 14px;
    background: #fff1f1;
    color: #8a1e1e;
    border: 1px solid #efb8b8;
    font-weight: 700;
}

.ib-login-form {
    display: grid;
    gap: 18px;
    margin-top: 28px;
}

.ib-login-field {
    display: grid;
    gap: 8px;
}

.ib-login-field label {
    color: #20372a;
    font-weight: 800;
    font-size: 14px;
}

.ib-login-field input {
    width: 100%;
    height: 48px;
    border-radius: 14px;
    border: 1px solid #cbd8ce;
    background: #f8fbf8;
    padding: 0 14px;
    box-sizing: border-box;
    font-size: 16px;
    color: #16251b;
    outline: none;
}

.ib-login-field input:focus {
    border-color: #2f6545;
    box-shadow: 0 0 0 4px rgba(47, 101, 69, 0.14);
    background: #ffffff;
}

.ib-login-submit {
    margin-top: 4px;
    height: 50px;
    border: 0;
    border-radius: 15px;
    background: #244f35;
    color: #ffffff;
    font-size: 16px;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 12px 26px rgba(36, 79, 53, 0.24);
}

.ib-login-submit:hover {
    background: #1b3f2a;
}

.ib-login-help {
    margin: 22px 0 0;
    color: #6b766d;
    font-size: 13px;
    line-height: 1.45;
}

@media (max-width: 820px) {
    .ib-login-page {
        grid-template-columns: 1fr;
        padding: 22px;
    }

    .ib-login-brand {
        min-height: auto;
        padding: 32px;
    }

    .ib-login-brand h1 {
        font-size: 44px;
    }

    .ib-login-card {
        padding: 30px;
    }
}

/* --- v42: Monitoransicht übernimmt die Wochenende-Anzeige aus der Planungsübersicht --- */
.display-view-readonly.display-view-readonly {
    --display-day-count: 5;
}

.display-show-weekend .display-view-readonly {
    --display-day-count: 7;
}

.display-view-readonly .compact-display-week-grid,
.display-view-readonly .display-absence-table-grid {
    grid-template-columns: repeat(var(--display-day-count), minmax(0, 1fr)) !important;
}

.display-show-weekend .display-view-readonly .display-view-header h1 {
    font-size: clamp(22px, 1.7vw, 32px) !important;
}

.display-show-weekend .display-view-readonly .display-view-controls a,
.display-show-weekend .display-view-readonly .display-view-controls button,
.display-show-weekend .display-view-readonly .display-date-form input[type="date"] {
    font-size: 11px !important;
    padding-left: 7px !important;
    padding-right: 7px !important;
}

.display-show-weekend .display-view-readonly .compact-display-week-grid,
.display-show-weekend .display-view-readonly .display-absence-table-grid {
    gap: 4px !important;
}

.display-show-weekend .display-view-readonly .display-day-header,
.display-show-weekend .display-view-readonly .display-absence-column > header {
    padding: 5px 6px !important;
    font-size: clamp(10px, .62vw, 13px) !important;
}

.display-show-weekend .display-view-readonly .display-day-content {
    padding: 5px !important;
    gap: 4px !important;
}

.display-show-weekend .display-view-readonly .display-project {
    padding: 7px 7px !important;
    font-size: clamp(10px, .64vw, 13px) !important;
    line-height: 1.14 !important;
}

.display-show-weekend .display-view-readonly .display-project-title-row {
    font-size: clamp(12px, .76vw, 15px) !important;
    gap: 4px !important;
}

.display-show-weekend .display-view-readonly .display-project-title-row span {
    font-size: clamp(10px, .6vw, 12px) !important;
}

.display-show-weekend .display-view-readonly .display-project-subline {
    font-size: clamp(10px, .62vw, 12px) !important;
    -webkit-line-clamp: 2 !important;
}

.display-show-weekend .display-view-readonly .display-meta-label {
    font-size: 9px !important;
}

.display-show-weekend .display-view-readonly .display-pill-list span,
.display-show-weekend .display-view-readonly .display-project em {
    font-size: clamp(10px, .58vw, 12px) !important;
    padding: 1px 5px !important;
}

.display-show-weekend .display-view-readonly .display-absence-table-content {
    padding: 3px !important;
    gap: 3px !important;
}

.display-show-weekend .display-view-readonly .display-absence-card {
    min-height: 20px !important;
    padding: 2px 5px !important;
    column-gap: 4px !important;
    font-size: clamp(9px, .55vw, 11px) !important;
}

.display-show-weekend .display-view-readonly .display-employee-absence-card strong,
.display-show-weekend .display-view-readonly .display-machine-absence-card strong {
    font-size: clamp(9px, .58vw, 11px) !important;
}

.display-show-weekend .display-view-readonly .display-employee-absence-card span,
.display-show-weekend .display-view-readonly .display-machine-absence-card span {
    font-size: clamp(8px, .52vw, 10px) !important;
}

/* --- v43: Monitoransicht Wochenende wirklich als 7-Spalten-Layout anzeigen --- */
.display-view-body.display-show-weekend .display-view-readonly {
    grid-template-rows: auto auto minmax(0, 1fr) auto auto !important;
}

.display-view-body.display-show-weekend .compact-display-week-grid,
.display-view-body.display-show-weekend .display-absence-table-grid {
    grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
    gap: 4px !important;
    width: 100% !important;
    min-width: 0 !important;
}

.display-view-body.display-show-weekend .display-day-card,
.display-view-body.display-show-weekend .display-absence-column {
    min-width: 0 !important;
}

.display-view-body.display-show-weekend .display-day-header,
.display-view-body.display-show-weekend .display-absence-column > header {
    padding: 4px 6px !important;
    font-size: clamp(9px, .55vw, 12px) !important;
}

.display-view-body.display-show-weekend .display-day-content {
    padding: 4px !important;
    gap: 4px !important;
}

.display-view-body.display-show-weekend .display-project {
    padding: 6px 7px !important;
    border-left-width: 4px !important;
    font-size: clamp(10px, .61vw, 13px) !important;
    line-height: 1.12 !important;
}

.display-view-body.display-show-weekend .display-project-title-row {
    font-size: clamp(11px, .72vw, 15px) !important;
    line-height: 1.05 !important;
    gap: 4px !important;
}

.display-view-body.display-show-weekend .display-project-title-row span {
    font-size: clamp(9px, .56vw, 12px) !important;
}

.display-view-body.display-show-weekend .display-project-subline {
    margin-top: 1px !important;
    font-size: clamp(9px, .58vw, 12px) !important;
    line-height: 1.1 !important;
    -webkit-line-clamp: 2 !important;
}

.display-view-body.display-show-weekend .display-project-meta {
    margin-top: 4px !important;
    gap: 3px !important;
}

.display-view-body.display-show-weekend .display-meta-label {
    margin-bottom: 1px !important;
    font-size: clamp(8px, .48vw, 10px) !important;
    letter-spacing: .055em !important;
}

.display-view-body.display-show-weekend .display-pill-list {
    gap: 2px !important;
}

.display-view-body.display-show-weekend .display-pill-list span,
.display-view-body.display-show-weekend .display-project em {
    padding: 1px 4px !important;
    font-size: clamp(9px, .54vw, 11px) !important;
    line-height: 1.1 !important;
}

.display-view-body.display-show-weekend .display-empty {
    font-size: clamp(8px, .5vw, 10px) !important;
}

.display-view-body.display-show-weekend .display-absence-board-section {
    min-height: 72px !important;
    max-height: 10vh !important;
}

.display-view-body.display-show-weekend .display-absence-board-section .display-section-heading h2 {
    font-size: clamp(11px, .72vw, 14px) !important;
}

.display-view-body.display-show-weekend .display-absence-table-content {
    padding: 3px !important;
    gap: 2px !important;
}

.display-view-body.display-show-weekend .display-absence-card {
    min-height: 18px !important;
    padding: 2px 4px !important;
    border-left-width: 3px !important;
    border-radius: 5px !important;
    column-gap: 4px !important;
}

.display-view-body.display-show-weekend .display-employee-absence-card strong,
.display-view-body.display-show-weekend .display-machine-absence-card strong {
    font-size: clamp(8px, .52vw, 10px) !important;
}

.display-view-body.display-show-weekend .display-employee-absence-card span,
.display-view-body.display-show-weekend .display-machine-absence-card span {
    font-size: clamp(7px, .46vw, 9px) !important;
}

.display-view-body.display-show-weekend .display-project.continues-left::before,
.display-view-body.display-show-weekend .display-project.continues-right::after {
    width: 7px !important;
}

.display-view-body.display-show-weekend .display-project.continues-left::before {
    left: -8px !important;
}

.display-view-body.display-show-weekend .display-project.continues-right::after {
    right: -8px !important;
}

@media (max-width: 1200px) {
    .display-view-body.display-show-weekend .compact-display-week-grid,
    .display-view-body.display-show-weekend .display-absence-grid {
        min-width: 0 !important;
    }
}

/* ------------------------------------------------------------
   v44: Planungsübersicht kompakter + großes Auswahlpanel zwischen Kalender und Abwesenheiten
   ------------------------------------------------------------ */

/* Das geöffnete Alle-öffnen-Panel liegt jetzt in der rechten Arbeitsfläche
   direkt unter der Projektwoche. Dadurch sind Projekte/Mitarbeiter/Maschinen
   gleichmäßig nach oben und unten ziehbar. */
.planner-main-column > .expanded-picker-panel {
    margin: 0;
    padding: 10px 12px 12px;
    border: 1px solid #d8ddd7;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 1px 4px rgba(25, 43, 30, 0.06);
}

.planner-main-column > .expanded-picker-panel.hidden {
    display: none;
}

.planner-main-column > .expanded-picker-panel .expanded-picker-header {
    margin-bottom: 8px;
    gap: 10px;
}

.planner-main-column > .expanded-picker-panel .expanded-picker-header h2 {
    margin: 0 0 2px 0;
    font-size: 18px;
}

.planner-main-column > .expanded-picker-panel .expanded-picker-header .muted {
    margin: 0;
    font-size: 12px;
}

.planner-main-column > .expanded-picker-panel .expanded-card-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 8px;
    max-height: 220px;
    overflow-y: auto;
    padding-right: 4px;
}

.planner-main-column > .expanded-picker-panel .palette-card {
    padding: 8px 9px;
    min-height: 0;
}

.planner-main-column > .expanded-picker-panel .palette-card strong {
    font-size: 13px;
}

/* Arbeitskalender etwas dichter, damit Ziehwege kürzer werden und weniger leerer Raum entsteht. */
.planner-main-column {
    gap: 8px;
}

.planner-main-column .calendar-board {
    gap: 8px;
}

.planner-main-column .planning-day {
    min-height: 255px;
    padding: 8px;
}

.planner-main-column .planning-day h3 {
    margin-bottom: 7px;
    padding-bottom: 6px;
    font-size: 13px;
}

.planner-main-column .day-drop-zone {
    min-height: 190px;
    gap: 8px;
}

.planner-main-column .project-plan-card {
    min-height: 108px;
    padding: 9px 10px;
    border-radius: 8px;
    font-size: 12px;
}

.planner-main-column .project-plan-header {
    gap: 8px;
}

.planner-main-column .project-plan-header strong {
    font-size: 14px;
    line-height: 1.15;
}

.planner-main-column .project-plan-card .muted,
.planner-main-column .project-duration {
    font-size: 11px;
    line-height: 1.25;
}

.planner-main-column .project-chat-button {
    padding: 5px 9px;
    font-size: 12px;
}

.planner-main-column .employee-drop-zone,
.planner-main-column .machine-drop-zone {
    min-height: 31px;
    padding: 5px 0 3px;
}

.planner-main-column .drop-hint {
    font-size: 11px;
}

.planner-main-column .assigned-employees,
.planner-main-column .assigned-machines {
    gap: 4px;
}

.planner-main-column .assigned-employee,
.planner-main-column .assigned-machine {
    min-height: 22px;
    padding: 3px 18px 3px 7px;
    font-size: 12px;
    border-radius: 5px;
}

.planner-main-column .project-lane-placeholder {
    min-height: 108px;
}

/* Abwesenheiten in der Planungsübersicht deutlich platzsparender.
   Die Detailinformation bleibt erhalten, nimmt aber weniger Raum ein. */
.planner-main-column .absence-stack {
    gap: 8px;
}

.planner-main-column .compact-absence-board {
    padding: 8px 10px 10px;
    border-radius: 10px;
}

.planner-main-column .compact-absence-board .absence-board-header {
    margin-bottom: 4px;
}

.planner-main-column .compact-absence-board h2 {
    margin: 0 0 2px 0;
    font-size: 18px;
    line-height: 1.15;
}

.planner-main-column .compact-absence-board .muted {
    font-size: 11px;
    line-height: 1.25;
}

.planner-main-column .compact-absence-grid {
    margin-top: 7px;
    gap: 6px;
}

.planner-main-column .compact-absence-day {
    min-height: 78px;
    padding: 5px;
    border-radius: 8px;
}

.planner-main-column .compact-absence-day h3 {
    margin-bottom: 5px;
    padding-bottom: 4px;
    font-size: 12px;
    line-height: 1.1;
}

.planner-main-column .compact-absence-day h3 span {
    font-size: 11px;
}

.planner-main-column .compact-drop-zone {
    min-height: 44px;
}

.planner-main-column .compact-absence-card {
    margin-bottom: 4px;
    padding: 4px 18px 4px 7px;
    border-radius: 6px;
}

.planner-main-column .compact-absence-card::before,
.planner-main-column .compact-absence-card::after,
.planner-main-column .compact-absence-card .absence-timeline {
    top: 14px;
    height: 5px;
}

.planner-main-column .compact-absence-content {
    grid-template-columns: minmax(58px, auto) minmax(80px, 1fr);
    gap: 4px;
}

.planner-main-column .machine-downtime-content {
    grid-template-columns: minmax(58px, auto) auto minmax(78px, 1fr);
}

.planner-main-column .compact-absence-name {
    font-size: 12px;
    line-height: 1.15;
}

.planner-main-column .compact-machine-id,
.planner-main-column .compact-absence-reason {
    font-size: 11px;
    line-height: 1.15;
}

.planner-main-column .compact-absence-input {
    min-height: 22px;
    padding: 3px 5px;
    font-size: 11px;
    line-height: 1.15;
}

.planner-main-column .absence-drop-hint {
    font-size: 10px;
}

@media (max-width: 1200px) {
    .planner-main-column .planning-day {
        min-height: 235px;
    }

    .planner-main-column .day-drop-zone {
        min-height: 175px;
    }

    .planner-main-column .project-plan-card,
    .planner-main-column .project-lane-placeholder {
        min-height: 98px;
    }

    .planner-main-column .compact-absence-content,
    .planner-main-column .machine-downtime-content {
        grid-template-columns: 1fr;
    }
}

/* v45: Planungsübersicht - kompakte, einheitliche Abwesenheiten mit Inline-Bearbeitung */
.planner-main-column .compact-absence-card {
    min-height: 28px;
    padding: 3px 18px 3px 7px;
    display: flex;
    align-items: center;
    overflow: visible;
}

.planner-main-column .compact-absence-card.continues-left,
.planner-main-column .compact-absence-card.continues-right {
    border-radius: 6px;
}

.planner-main-column .compact-absence-card::before,
.planner-main-column .compact-absence-card::after,
.planner-main-column .compact-absence-card .absence-timeline {
    top: 50%;
    transform: translateY(-50%);
    height: 4px;
}

.planner-main-column .compact-absence-card::before {
    left: -7px;
    width: 9px;
}

.planner-main-column .compact-absence-card::after {
    right: -7px;
    width: 9px;
}

.planner-main-column .compact-absence-content,
.planner-main-column .machine-downtime-content {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.planner-main-column .compact-absence-name {
    flex: 0 0 auto;
    max-width: 46%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 11px;
    line-height: 1.1;
}

.planner-main-column .compact-machine-id {
    flex: 0 0 auto;
    font-size: 10px;
    line-height: 1.1;
    color: #72551c;
    opacity: 0.88;
}

.planner-main-column .compact-absence-reason,
.planner-main-column .is-continuation-note {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 10px;
    line-height: 1.1;
    color: #5d6258;
}

.planner-main-column .compact-inline-edit-display {
    flex: 1 1 auto;
    min-width: 0;
    padding: 2px 4px;
    border: 1px solid transparent;
    border-radius: 4px;
    background: transparent;
    color: #5d6258;
    font: inherit;
    font-size: 10px;
    line-height: 1.1;
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: text;
}

.planner-main-column .compact-inline-edit-display:hover,
.planner-main-column .compact-inline-edit-display:focus-visible {
    border-color: rgba(88, 122, 160, 0.35);
    background: rgba(255, 255, 255, 0.7);
    outline: none;
}

.planner-main-column .compact-absence-input.compact-inline-edit-input {
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
    min-height: 20px;
    padding: 2px 5px;
    border-radius: 4px;
    font-size: 10px;
    line-height: 1.1;
}

.compact-inline-edit-display.is-hidden,
.compact-inline-edit-input.is-hidden {
    display: none !important;
}

.planner-main-column .absence-resize-handle {
    width: 9px;
    opacity: 0.38;
}

.planner-main-column .absence-resize-handle:hover {
    opacity: 0.85;
}

.planner-main-column .compact-drop-zone {
    min-height: 38px;
}

.planner-main-column .absence-drop-hint {
    display: block;
    margin-top: 3px;
    font-size: 10px;
    line-height: 1.1;
}

@media (max-width: 1450px) {
    .planner-main-column .compact-absence-name {
        max-width: 42%;
        font-size: 10px;
    }

    .planner-main-column .compact-machine-id,
    .planner-main-column .compact-inline-edit-display,
    .planner-main-column .compact-absence-input.compact-inline-edit-input,
    .planner-main-column .compact-absence-reason,
    .planner-main-column .is-continuation-note {
        font-size: 9px;
    }
}
