/* Base Styles (ohne globalen Wildcard-Reset) */
html, body {
    margin: 0;
    padding: 0;
}

h1, h2, h3, h4, h5, h6,
p, dl, dd, figure, blockquote {
    margin: 0;
}



div, section, article, aside, nav, main, header, footer,
form, fieldset, input, textarea, select, button,
table, thead, tbody, tr, th, td,
ul, ol, li, a, span, p,
h1, h2, h3, h4, h5, h6,
img, svg {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #1f2937;
    background: linear-gradient(135deg, #f9fafb 0%, #ffffff 50%, #f9fafb 100%);
    overflow: hidden;
}

svg {
    width: 20px;
    height: 20px;
}

/* Layout */
.app-container {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* Sidebar */
.sidebar {
    width: 288px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    border-right: 1px solid rgba(229, 231, 235, 0.5);
    display: flex;
    flex-direction: column;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.sidebar-header {
    height: 80px;
    display: flex;
    align-items: center;
    padding: 0 24px;
    border-bottom: 1px solid rgba(229, 231, 235, 0.5);
}

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

.logo-icon {
    width: 45px;
    height: 45px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.logo-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.logo-title {
    font-weight: bold;
    font-size: 20px;
    color: #1f2937;
}

.logo-subtitle {
    font-size: 12px;
    color: #6b7280;
}

.nav {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 12px;
    color: #374151;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
    margin-bottom: 4px;
    position: relative;
}
.nav-module-indicator {
    margin-left: auto;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    background: #dc2626;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}

.nav-item:hover {
    background: #f3f4f6;
}

.nav-item.active {
    background: linear-gradient(90deg, #048072 0%, #036558 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(4, 128, 114, 0.2);
}

.nav-item.active .nav-icon {
    color: white;
}

.nav-icon {
    width: 20px;
    height: 20px;
    color: #9ca3af;
    transition: color 0.2s;
}

.nav-item:hover .nav-icon:not(.active .nav-icon) {
    color: #048072;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid rgba(229, 231, 235, 0.5);
}

.quick-actions {
    background: linear-gradient(135deg, #e6f4f1 0%, #d0ebe6 100%);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
}

.quick-actions-title {
    font-weight: 600;
    font-size: 14px;
    color: #1f2937;
    margin-bottom: 8px;
}

.quick-action-btn {
    width: 100%;
    text-align: left;
    font-size: 14px;
    color: #374151;
    background: none;
    border: none;
    padding: 4px 0;
    cursor: pointer;
    transition: color 0.2s;
}

.quick-action-btn:hover {
    color: #048072;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.2s;
}

.user-profile:hover {
    background: #f3f4f6;
}

.user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #048072 0%, #036558 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(4, 128, 114, 0.3);
}
.user-avatar.has-image {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: transparent;
}

.user-name {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
}

.user-role {
    font-size: 12px;
    color: #6b7280;
}

.user-role.btn-link,
.user-role .btn-link {
    padding: 5px 0 0 0;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Topbar */
.topbar {
    height: 80px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(229, 231, 235, 0.5);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.topbar-left {
    flex: 1;
    max-width: 600px;
}

.search-container {
    position: relative;
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: #9ca3af;
}

.search-input {
    width: 100%;
    height: 48px;
    padding-left: 48px;
    padding-right: 16px;
    border: 1px solid rgba(229, 231, 235, 0.5);
    border-radius: 12px;
    background: rgba(249, 250, 251, 0.5);
    font-size: 14px;
    outline: none;
    transition: all 0.2s;
}

.search-input:focus {
    border-color: #048072;
    box-shadow: 0 0 0 3px rgba(4, 128, 114, 0.1);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar-btn {
    position: relative;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: none;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.2s;
    color: #6b7280;
}

.topbar-btn:hover {
    background: #f3f4f6;
}

.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 20px;
    height: 20px;
    background: #ef4444;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 600;
}

.btn-logout {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border: none;
    background: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-logout:hover {
    background: #f3f4f6;
}

.btn-logout svg {
    width: 16px;
    height: 16px;
}

/* Page Container */
.page-container {
    flex: 1;
    overflow-y: auto;
    background: linear-gradient(135deg, #f9fafb 0%, #ffffff 50%, #f9fafb 100%);
}

.page {
    display: none;
    padding: 32px;
    max-width: 1500px;
    margin-right: auto;
    animation: fadeIn 0.3s;
}

.page.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
}

.page-title {
    font-size: 36px;
    font-weight: bold;
    color: #1f2937;
}

.page-subtitle {
    font-size: 18px;
    color: #6b7280;
    margin-top: 8px;
}

.page-actions {
    display: flex;
    gap: 12px;
}

/* Toolbar (Suche, Filter) */
.toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.toolbar .search-input {
    flex: 1;
    min-width: 200px;
    max-width: 400px;
}

.form-select {
    padding: 12px 14px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    font-size: 14px;
    min-width: 180px;
    background: #fff;
}

/* Mitarbeiterliste */
.employees-list {
    width: 100%;
    overflow-x: auto;
}

div.employees-list {
    overflow-x: auto;
}

.employees-list table,
table.employees-list {
    width: 100%;
    border-collapse: collapse;
}

.employees-list th,
.employees-list td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.employees-list th {
    font-weight: 600;
    color: #6b7280;
    font-size: 12px;
    text-transform: uppercase;
}

.employees-list tr:hover td {
    background: #f9fafb;
}

.employee-name-wrap {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.employees-list tr.employee-row-absent td {
    opacity: 0.6;
}

.employee-absent-icon {
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #b45309;
}

.employee-absent-icon svg {
    width: 16px;
    height: 16px;
}

.employee-absence-meta {
    margin-top: 2px;
    font-size: 12px;
    color: #b45309;
}

.employee-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #048072 0%, #036558 100%);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
}

.department-leader-star {
    color: #eab308;
    font-size: 14px;
    margin-left: 4px;
    cursor: help;
    position: relative;
}

.department-leader-star::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 50%;
    bottom: 100%;
    transform: translateX(-50%) translateY(-6px);
    padding: 6px 10px;
    background: #1f2937;
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    border-radius: 6px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s, visibility 0.15s;
    pointer-events: none;
    z-index: 100;
}

.department-leader-star::before {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 100%;
    transform: translateX(-50%) translateY(2px);
    border: 5px solid transparent;
    border-top-color: #1f2937;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s, visibility 0.15s;
    pointer-events: none;
    z-index: 100;
}

.department-leader-star:hover::after,
.department-leader-star:hover::before {
    opacity: 1;
    visibility: visible;
}

#departments-admin-list .department-admin-row {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 0;
    padding: 16px;
    background: #f9fafb;
    border-radius: 12px;
}

#departments-admin-list .departments-admin-top {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: end;
}

#departments-admin-list .departments-admin-bottom {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

#departments-admin-list .department-leader-field {
    position: relative;
}

#departments-admin-list .department-leader-field .rp-participant-suggestions {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 2px);
    z-index: 40;
}

#departments-admin-list .department-leader-selection {
    min-height: 28px;
}

#areas-admin-list .department-admin-row {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 0;
    padding: 16px;
    background: #f9fafb;
    border-radius: 12px;
}

#areas-admin-list .areas-admin-top {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: end;
}

#areas-admin-list .areas-admin-bottom {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

#areas-admin-list .area-selection {
    min-height: 28px;
}

#areas-admin-list .area-selection .rp-chip {
    margin-right: 6px;
}

#areas-admin-list .area-person-field {
    position: relative;
}

#areas-admin-list .area-person-field .rp-participant-suggestions {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 2px);
    z-index: 40;
}

#areas-admin-list .area-md-search,
#areas-admin-list .area-gm-search,
.area-admin-add .area-md-search,
.area-admin-add .area-gm-search {
    padding-right: 14px;
}

#areas-admin-list .department-admin-row + .department-admin-row {
    margin-top: 10px;
}

#departments-admin-list .department-admin-row + .department-admin-row {
    margin-top: 10px;
}

#locations-admin-list .department-admin-row {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 0;
    padding: 16px;
    background: #f9fafb;
    border-radius: 12px;
}

#locations-admin-list .department-admin-row + .department-admin-row {
    margin-top: 10px;
}

#locations-admin-list .departments-admin-top {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: end;
}

.department-admin-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.department-admin-label {
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
}

.department-admin-row .department-name-input,
.department-admin-row .department-leader-select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    font-size: 14px;
    color: #1f2937;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.department-admin-row .department-name-input:focus,
.department-admin-row .department-leader-select:focus {
    outline: none;
    border-color: #048072;
    box-shadow: 0 0 0 3px rgba(4, 128, 114, 0.12);
}

.department-admin-row .department-leader-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 18px;
    padding-right: 36px;
}

.department-admin-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.department-admin-add {
    display: flex;
    align-items: end;
    gap: 12px;
    flex-wrap: wrap;
}

.department-admin-add .department-admin-field {
    flex: 1;
    min-width: 200px;
    max-width: 280px;
}

.department-admin-add .department-admin-label {
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
}

.department-admin-add .department-name-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    font-size: 14px;
    box-sizing: border-box;
}

.department-admin-add .department-leader-select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    font-size: 14px;
    color: #1f2937;
    background: #fff;
    box-sizing: border-box;
}

.department-admin-add .department-leader-select:focus {
    outline: none;
    border-color: #048072;
    box-shadow: 0 0 0 3px rgba(4, 128, 114, 0.12);
}

#areas-admin-list .area-gm-select,
#area-new-gms {
    min-height: 120px;
    background-image: none;
    padding-right: 10px;
}

.area-admin-add .areas-admin-top {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: end;
    width: 100%;
}

.area-admin-add .areas-admin-bottom {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    width: 100%;
}

.area-admin-add {
    display: block;
}

@media (max-width: 900px) {
    #departments-admin-list .departments-admin-top,
    #departments-admin-list .departments-admin-bottom,
    #locations-admin-list .departments-admin-top,
    #areas-admin-list .areas-admin-top,
    #areas-admin-list .areas-admin-bottom,
    .area-admin-add .areas-admin-top,
    .area-admin-add .areas-admin-bottom {
        grid-template-columns: 1fr;
    }
}

.department-admin-add .department-name-input:focus {
    outline: none;
    border-color: #048072;
    box-shadow: 0 0 0 3px rgba(4, 128, 114, 0.12);
}

/* Room planning – Räume verwalten (eine Card pro Raum) */
.room-admin-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.modal.room-admin-modal .room-admin-list {
    max-height: 55vh;
    overflow-y: auto;
}

.room-admin-card {
    margin-bottom: 0;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: visible !important;
}

.room-admin-card-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
}

.room-admin-fields {
    display: grid;
    grid-template-columns: 1fr 1fr 80px;
    gap: 12px;
    align-items: end;
    margin-bottom: 14px;
    flex-shrink: 0;
}

.room-admin-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.room-admin-field-capacity {
    max-width: 88px;
}

.room-admin-label {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.room-admin-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    font-size: 14px;
    color: #1f2937;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.room-admin-input::placeholder {
    color: #9ca3af;
}

.room-admin-input:focus {
    outline: none;
    border-color: #048072;
    box-shadow: 0 0 0 3px rgba(4, 128, 114, 0.12);
}

.room-admin-equipment-wrap {
    margin-bottom: 14px;
}

/* Ausstattung bei bestehenden Räumen: immer sichtbar, gleicher Stil wie „Neuen Raum anlegen“ */
.room-admin-card:not(.room-admin-add-card) .room-admin-equipment-wrap {
    display: block !important;
    visibility: visible !important;
    min-height: 52px;
    margin-top: 6px;
    padding: 12px 14px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}
.room-admin-card:not(.room-admin-add-card) .room-admin-equipment {
    display: flex !important;
    flex-wrap: wrap;
    gap: 12px 20px;
}

.room-admin-equipment-title {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 8px;
}

.room-admin-equipment {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
}

.room-admin-check-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 14px;
    color: #374151;
}

.room-admin-check-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: #048072;
    cursor: pointer;
}

.room-admin-actions {
    display: flex;
    gap: 8px;
    padding-top: 4px;
}

.room-admin-add-card {
    margin-top: 20px;
    border-style: dashed;
    border-color: #d1d5db;
    background: #fafafa;
}

.room-admin-add-title {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 12px;
}

.room-admin-add-card .room-admin-fields {
    margin-bottom: 14px;
}

.room-admin-add-card .room-admin-equipment-wrap {
    margin-bottom: 14px;
}

/* Room planning – meine Buchungen (Grid, gleiche Spaltenbreiten) */
#room-planning-my-bookings-list.room-booking-list-has-rows {
    display: block;
}
.room-booking-list-header {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 12px 16px;
    padding: 10px 16px 12px;
    font-weight: 600;
    font-size: 13px;
    color: #374151;
    border-bottom: 2px solid #e5e7eb;
    align-items: center;
}
.room-booking-item {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 12px 16px;
    align-items: center;
    padding: 12px 16px;
    background: #f9fafb;
    border-radius: 10px;
    margin-bottom: 8px;
}
.room-booking-item:last-child {
    margin-bottom: 0;
}
.room-booking-col {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 14px;
}
.room-booking-col.room-booking-actions {
    overflow: visible;
}

/* Button-Konvention: Hinzufügen = grün + Plus, Löschen = rot + Mülleimer */
.btn-add, .btn-green {
    background: #059669;
    color: #fff;
    border-color: #059669;
}
.btn-add:hover, .btn-green:hover {
    background: #047857;
    color: #fff;
    border-color: #047857;
}
.btn-add .btn-icon, .btn-green .btn-icon {
    width: 16px;
    height: 16px;
    margin-right: 6px;
    vertical-align: -3px;
}
.btn-delete {
    background: #dc2626;
    color: #fff;
    border-color: #dc2626;
}
.btn-delete:hover {
    background: #b91c1c;
    color: #fff;
    border-color: #b91c1c;
}
.btn-delete .btn-icon {
    width: 16px;
    height: 16px;
    margin-right: 6px;
    vertical-align: -3px;
}

.room-booking-meta {
    font-size: 13px;
    color: #6b7280;
}

/* Teilnehmer-Suche (Raumplanung) */
.rp-participant-suggestions {
    list-style: none;
    margin: 6px 0 0;
    padding: 0;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
    max-height: 200px;
    overflow-y: auto;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.rp-participant-suggestions li {
    padding: 10px 14px;
    cursor: pointer;
    font-size: 14px;
    border-bottom: 1px solid #f3f4f6;
}

.rp-participant-suggestions li:last-child {
    border-bottom: none;
}

.rp-participant-suggestions li:hover {
    background: #f0fdfa;
}

.rp-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: #e0f2f1;
    color: #0d9488;
    border-radius: 20px;
    font-size: 13px;
    margin: 4px 4px 0 0;
}

.rp-chip-remove {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0 2px;
    font-size: 16px;
    line-height: 1;
    color: #0d9488;
}

.rp-chip-remove:hover {
    color: #047857;
}

.employees-filter-label {
    font-size: 14px;
    color: #6b7280;
    margin-right: 8px;
}

/* Dokumentenverwaltung */
.documents-toolbar { margin-bottom: 12px; }
.documents-toolbar .filter-tag { margin-right: 8px; cursor: pointer; }

.documents-overview-wrap {
    margin-bottom: 24px;
}
.documents-overview-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}
.documents-overview-card.card {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    position: relative;
}
.documents-overview-card.card:hover {
    border-color: #048072;
    box-shadow: 0 4px 12px rgba(4, 128, 114, 0.12);
}
.documents-overview-card .card-body {
    padding: 20px;
}
.documents-overview-card-title {
    margin: 15px 0 10px 0;
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}
.documents-overview-title-icon {
    width: 18px;
    height: 18px;
    color: #048072;
    flex-shrink: 0;
    position: relative;
    top: 5px;
}
.documents-overview-card-desc {
    margin: 0 0 12px 0;
    font-size: 14px;
    color: #6b7280;
    line-height: 1.5;
}
.documents-overview-card-desc .documents-card-no-desc {
    color: #9ca3af;
    font-style: italic;
}
.documents-overview-card-count {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: #048072;
}
.documents-overview-doc-card.card {
    cursor: default;
}
.documents-overview-doc-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0 0 14px 0;
    font-size: 13px;
    color: #6b7280;
}
.documents-overview-doc-meta strong {
    color: #374151;
}
.documents-overview-doc-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.documents-overview-doc-status {
    margin: 0 0 10px 0;
}
.documents-category-status-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 0 10px 0;
}
.documents-category-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
}
.documents-category-status-badge--new {
    color: #991b1b;
    background: #fee2e2;
    border: 1px solid #fecaca;
}
.documents-category-status-badge--updated {
    color: #92400e;
    background: #fef3c7;
    border: 1px solid #fde68a;
}
.documents-read-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    vertical-align: middle;
}
.documents-overview-card .documents-read-pill {
    position: absolute;
    top: 10px;
    right: 10px;
}
.documents-read-pill-icon {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
}
.documents-read-pill--new {
    color: #991b1b;
    background: #fee2e2;
    border: 1px solid #fecaca;
}
.documents-read-pill--updated {
    color: #92400e;
    background: #fef3c7;
    border: 1px solid #fde68a;
}
.documents-read-pill--read {
    color: #065f46;
    background: #d1fae5;
    border: 1px solid #a7f3d0;
}
.documents-list-layout {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}
.documents-list-main {
    flex: 1;
    min-width: 0;
}
.documents-category-inline-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.documents-category-inline-actions .employees-filter-label {
    margin: 0;
}
.documents-category-inline-actions .form-select {
    min-width: 230px;
}
.documents-list-main #documents-list-wrap {
    width: 100%;
    overflow-x: auto;
}
.documents-list-main #documents-table {
    width: 100%;
}
.documents-sidebar {
    flex-shrink: 0;
    width: 260px;
}
.documents-sidebar-card .card-body {
    padding: 16px;
}
.documents-sidebar-title {
    margin: 0 0 12px 0;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}
.documents-category-tiles {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.documents-category-tiles--vertical {
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 8px;
}
.documents-category-tiles--vertical .documents-category-tile {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    min-width: 0;
    width: 100%;
    padding: 10px 14px;
    text-align: left;
}
.documents-category-tiles--vertical .documents-category-tile-name {
    margin-bottom: 0;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.documents-category-tiles--vertical .documents-category-tile-count {
    flex-shrink: 0;
    margin-left: 8px;
}
.documents-category-tile {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 100px;
    padding: 14px 18px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
    color: #374151;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
    text-align: center;
}
.documents-category-tile:hover {
    border-color: #048072;
    background: #f0fdfa;
}
.documents-category-tile.active {
    border-color: #048072;
    background: #048072;
    color: #fff;
}
.documents-category-tile.active .documents-category-tile-count {
    color: rgba(255,255,255,0.9);
}
.documents-category-tile-name {
    display: block;
    margin-bottom: 4px;
}
.documents-category-tile-count {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
}
.documents-list-main .documents-filters { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.documents-filters-global { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.documents-filters .form-select { width: auto; min-width: 180px; }
.documents-filters .form-input { width: 220px; }

.documents-search-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}
.documents-search-wrap .documents-search-icon {
    position: absolute;
    left: 14px;
    width: 18px;
    height: 18px;
    color: #9ca3af;
    pointer-events: none;
}
.documents-search-input {
    width: 260px;
    height: 44px;
    padding: 0 16px 0 42px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #f9fafb;
    font-size: 14px;
    color: #1f2937;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    box-sizing: border-box;
}
.documents-search-input::placeholder {
    color: #9ca3af;
}
.documents-search-input:hover {
    background: #fff;
    border-color: #d1d5db;
}
.documents-search-input:focus {
    border-color: #048072;
    box-shadow: 0 0 0 3px rgba(4, 128, 114, 0.12);
    background: #fff;
}
.documents-search-wrap:focus-within .documents-search-icon {
    color: #048072;
}
.documents-detail-tabs { display: flex; gap: 0; border-bottom: 1px solid #e5e7eb; margin-bottom: 16px; list-style: none; padding: 0; margin-top: 0; }
.documents-detail-tabs .documents-tab { padding: 10px 16px; cursor: pointer; font-weight: 500; color: #6b7280; }
.documents-detail-tabs .documents-tab.active { color: #048072; border-bottom: 2px solid #048072; margin-bottom: -1px; }
.documents-tab-panel { padding: 8px 0; }

#documents-tab-versions.documents-tab-panel { width: 100%; max-width: 100%; }
.documents-tab-versions-wrap { width: 100%; overflow-x: auto; }
.documents-tab-versions-wrap .employees-list { width: 100%; table-layout: auto; }
.documents-tab-versions-wrap .equipment-tag { display: inline-block; }

.document-detail-layout { display: flex; gap: 24px; flex-wrap: wrap; align-items: flex-start; }
.document-detail-meta-wrap { flex: 0 0 360px; min-width: 0; }
.document-detail-meta-card .card-body { padding: 20px; }
.document-detail-content-wrap { flex: 1; min-width: 280px; }
#documents-detail-view .document-detail-layout { flex-wrap: nowrap; align-items: stretch; }
#documents-detail-view .document-detail-meta-wrap { flex: 0 0 360px; max-width: 360px; align-self: stretch; }
#documents-detail-view .documents-detail-meta-sticky { position: sticky; top: 16px; }
.documents-detail-search-card { margin-bottom: 12px; }
.documents-detail-search-card .card-body { padding: 12px 14px; }
.documents-detail-search-count { margin-top: 8px; font-size: 12px; color: #6b7280; }
.documents-detail-read-card { margin-bottom: 12px; }
.documents-detail-read-card .card-body { padding: 12px 14px; }
.documents-detail-read-title { margin: 0 0 8px 0; font-size: 12px; color: #6b7280; font-weight: 600; text-transform: uppercase; }
.documents-detail-read-status { margin-bottom: 10px; }
.btn-doc-mark-read,
.btn-doc-mark-unread {
    width: 100%;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    padding: 10px 14px;
}
.btn-doc-mark-read .btn-icon,
.btn-doc-mark-unread .btn-icon {
    width: 16px;
    height: 16px;
}
mark.documents-search-highlight { background: #fde047; color: #1f2937; padding: 0 1px; border-radius: 2px; }

.document-detail-meta { margin-bottom: 0; }
.document-detail-title { margin: 0 0 16px 0; font-size: 30px; color: #1f2937; }
.document-detail-meta-card h3 { margin: 0 0 14px 0; font-size: 15px; font-weight: 600; color: #374151; }
.document-detail-dl {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 0 14px;
    margin: 0;
    font-size: 14px;
}
.document-detail-dl dt,
.document-detail-dl dd {
    margin: 0;
    padding: 10px 0;
    border-bottom: 1px solid #eef2f7;
}
.document-detail-dl dt {
    color: #6b7280;
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}
.document-detail-dl dd {
    color: #1f2937;
    font-weight: 500;
    word-break: break-word;
}
.document-detail-dl dt:nth-last-child(-n+2),
.document-detail-dl dd:nth-last-child(-n+2) {
    border-bottom: 0;
}
.document-detail-content { padding-top: 0; border-top: none; }
.document-detail-content h3 { margin: 0 0 12px 0; font-size: 16px; color: #374151; }
.document-detail-version-content { font-size: 14px; line-height: 1.6; color: #374151; }
.document-detail-version-content h1,
.document-detail-version-content h2,
.document-detail-version-content h3,
.document-detail-version-content h4,
.document-detail-version-content h5,
.document-detail-version-content h6 {
    margin: 22px 0 10px 0;
    line-height: 1.3;
    color: #111827;
    font-weight: 600;
}
.document-detail-version-content h1 { font-size: 28px; }
.document-detail-version-content h2 { font-size: 24px; }
.document-detail-version-content h3 { font-size: 20px; }
.document-detail-version-content h4 { font-size: 18px; }
.document-detail-version-content h5 { font-size: 16px; }
.document-detail-version-content h6 { font-size: 14px; }
.document-detail-version-content h1:first-child,
.document-detail-version-content h2:first-child,
.document-detail-version-content h3:first-child,
.document-detail-version-content h4:first-child,
.document-detail-version-content h5:first-child,
.document-detail-version-content h6:first-child {
    margin-top: 0;
}
.document-detail-version-content p {
    margin: 0 0 12px 0;
}
.document-detail-version-content ul,
.document-detail-version-content ol {
    margin: 0 0 14px 0;
    padding-left: 24px;
}
.document-detail-version-content li {
    margin: 0 0 6px 0;
}
.document-detail-version-content li:last-child {
    margin-bottom: 0;
}
.document-detail-version-content img { max-width: 100%; height: auto; }

.document-detail-review-section { margin-top: 24px; padding-top: 20px; border-top: 1px solid #e5e7eb; background: #f9fafb; padding: 20px; border-radius: 8px; }
.document-detail-review-info { font-size: 13px; color: #6b7280; margin: 0 0 12px 0; }
.document-detail-review-content { margin-bottom: 16px; }
.document-detail-review-actions .form-group { margin-bottom: 12px; }
.document-detail-review-actions .form-group label { display: block; font-weight: 500; margin-bottom: 4px; color: #374151; font-size: 14px; }
.document-detail-review-actions .form-input { display: block; width: 100%; min-width: 0; box-sizing: border-box; }
.document-detail-review-buttons { display: flex; gap: 12px; margin-top: 12px; }
.document-detail-review-section--readonly .document-detail-review-info { margin-bottom: 8px; }
.document-detail-review-note-readonly { padding: 10px 12px; background: #f3f4f6; border: 1px solid #e5e7eb; border-radius: 6px; font-size: 14px; color: #374151; white-space: pre-wrap; }

.documents-version-meta { margin-bottom: 20px; }
.documents-edit-form .form-group { margin-bottom: 14px; }
.documents-edit-form .form-group label { display: block; font-weight: 500; margin-bottom: 4px; color: #374151; }
.documents-edit-row { display: flex; flex-wrap: wrap; gap: 16px 24px; margin-bottom: 14px; }
.documents-edit-row .form-group { flex: 1; min-width: 0; margin-bottom: 0; }
.documents-edit-row-meta .form-group { min-width: 160px; }
.documents-edit-row-persons .form-group { min-width: 180px; }
.documents-edit-actions { margin-top: 16px; margin-bottom: 8px; }
.documents-edit-hr { margin: 24px 0 16px 0; border: 0; border-top: 1px solid #e5e7eb; }
.documents-edit-versions-title { margin: 0 0 12px 0; font-size: 16px; color: #1f2937; }
.documents-version-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
    min-width: 640px;
}
#documents-edit-versions-table th:last-child,
#documents-edit-versions-table td:last-child {
    white-space: nowrap;
}
#documents-edit-versions-table th:nth-child(3),
#documents-edit-versions-table th:nth-child(4),
#documents-edit-versions-table th:nth-child(5),
#documents-edit-versions-table th:nth-child(6),
#documents-edit-versions-table td:nth-child(3),
#documents-edit-versions-table td:nth-child(4),
#documents-edit-versions-table td:nth-child(5),
#documents-edit-versions-table td:nth-child(6) {
    min-width: 140px;
}
.documents-version-date {
    display: inline-block;
    line-height: 1.35;
    white-space: normal;
}
.doc-edit-person-name { margin-left: 8px; }
#doc-edit-responsible-name,
#doc-edit-reviewer-name,
#doc-edit-approver-name {
    margin-top: 10px;
    font-size: 14px;
}
.doc-edit-person-tag {
    display: inline-block;
    padding: 4px 12px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    color: #6b7280;
    vertical-align: middle;
}
.dashboard-doc-item { padding: 6px 0; font-size: 14px; }
.dashboard-doc-item .text-warning { color: #b45309; }
.dashboard-doc-kpi-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}
.dashboard-doc-kpi-item {
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #f9fafb;
}
.dashboard-doc-kpi-label {
    margin: 0;
    font-size: 12px;
    color: #6b7280;
}
.dashboard-doc-kpi-value {
    margin: 6px 0 0;
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
    color: #1f2937;
}
.dashboard-doc-kpi-value.is-warning {
    color: #b45309;
}
.dashboard-doc-kpi-value.is-alert {
    color: #dc2626;
}
.dashboard-doc-section-title {
    margin: 30px 0 8px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #6b7280;
    font-weight: 600;
}
@media (max-width: 1200px) {
    .dashboard-doc-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
.dashboard-task-kpi-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
.dashboard-task-kpi-item {
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #f9fafb;
}
.dashboard-task-kpi-label {
    margin: 0;
    font-size: 12px;
    color: #6b7280;
}
.dashboard-task-kpi-value {
    margin: 6px 0 0;
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
    color: #1f2937;
}
.dashboard-task-kpi-value.is-alert {
    color: #dc2626;
}
.dashboard-task-kpi-value.is-warning {
    color: #b45309;
}
.dashboard-task-section-title {
    margin: 30px 0 8px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #6b7280;
    font-weight: 600;
}
.dashboard-task-list { margin-top: 8px; }
.dashboard-task-item { padding: 10px 0; border-top: 1px solid #e5e7eb; }
.dashboard-task-title {
    display: block;
    font-size: 14px;
    line-height: 1.35;
    color: #1f2937;
    text-decoration: none;
    font-weight: 600;
}
.dashboard-task-title:hover { color: #048072; }
.dashboard-task-meta {
    margin-top: 6px;
    font-size: 12px;
    color: #6b7280;
    display: flex;
    gap: 8px;
    align-items: center;
}
.dashboard-task-more { margin-top: 10px; font-size: 14px; color: #6b7280; }
.dashboard-doc-attention-list { margin-top: 10px; }
.dashboard-doc-attention-item { padding: 10px 0; border-top: 1px solid #e5e7eb; }
.dashboard-doc-attention-title {
    display: block;
    font-weight: 600;
    color: #1f2937;
    text-decoration: none;
}
.dashboard-doc-attention-title:hover { color: #048072; }
.dashboard-doc-attention-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
    font-size: 12px;
    color: #6b7280;
}
.dashboard-doc-attention-category,
.dashboard-doc-attention-date {
    white-space: nowrap;
}
.dashboard-doc-attention-status {
    margin-left: auto;
}
.dashboard-doc-more { margin-top: 10px; font-size: 14px; }
.doc-cat-count { font-size: 13px; color: #6b7280; margin: 8px 0; }
#news-categories-list .news-cat-card { margin-bottom: 10px; }
#news-cat-add { margin-top: 10px; }

/* Aufgabenverwaltung */
.tasks-toolbar {
    margin-bottom: 12px;
}
.tasks-toolbar .tasks-scope-tag {
    margin-right: 8px;
    cursor: pointer;
}
.tasks-filters {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}
#tasks-list-wrap {
    width: 100%;
}
.tasks-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}
.tasks-list-card {
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #fff;
    padding: 14px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
.tasks-list-card-head {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}
.tasks-list-card-title {
    margin: 0;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.tasks-reminder-indicator {
    font-size: 15px;
}
.tasks-list-card-actions {
    white-space: nowrap;
}
.tasks-list-card-desc {
    padding: 0 13px;
    margin: 0 0 19px;
    color: #4b5563;
    font-size: 14px;
}
.tasks-list-card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0 13px;
    margin-bottom: 10px;
}
.tasks-list-card-badges .badge {
    margin-bottom: 0;
}
.tasks-list-card-meta {
    display: grid;
    grid-template-columns: 40% 60%;
    gap: 10px;
    padding: 0 13px;
    font-size: 13px;
    color: #374151;
}
.tasks-list-card-meta-col {
    display: grid;
    gap: 10px;
}
.tasks-list-card-meta > .tasks-list-card-meta-col > span {
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 32px;
    line-height: 1.35;
}
.tasks-list-card-meta > .tasks-list-card-meta-col > span strong {
    min-width: 82px;
    color: #6b7280;
}
.tasks-list-card-meta .tasks-status-select {
    margin-left: 0;
    max-width: 170px;
    display: inline-block;
}
.tasks-person {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.tasks-person-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #e5e7eb;
    color: #374151;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    background-size: cover;
    background-position: center;
}
.tasks-person-avatar.has-image {
    color: transparent;
}
.tasks-person-name {
    color: #1f2937;
}
.tasks-status-select {
    min-width: 150px;
    padding: 7px 10px;
    border-radius: 8px;
    font-size: 13px;
}
.tasks-status-select:disabled {
    opacity: 0.7;
}
@media (max-width: 900px) {
    .tasks-cards-grid {
        grid-template-columns: 1fr;
    }
    .tasks-list-card-meta {
        grid-template-columns: 1fr;
    }
    .tasks-list-card-actions {
        white-space: normal;
    }
}
@media (max-width: 1400px) {
    .tasks-cards-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
.tasks-detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 0;
}
.tasks-detail-block {
    margin-top: 16px;
}
.tasks-subtask-create,
.tasks-comment-create {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-bottom: 14px;
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #f9fafb;
}
.tasks-subtask-create input,
.tasks-comment-create textarea {
    flex: 1;
}
.tasks-subtask-create .form-input,
.tasks-comment-create .form-input {
    border-radius: 10px;
    background: #fff;
}
#tasks-subtask-title {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    color: #1f2937;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}
#tasks-subtask-title::placeholder {
    color: #9ca3af;
}
#tasks-subtask-title:focus {
    outline: none;
    border-color: #048072;
    box-shadow: 0 0 0 3px rgba(4, 128, 114, 0.12);
}
.tasks-subtask-create .btn,
.tasks-comment-create .btn {
    align-self: stretch;
}
.tasks-comment-create {
    display: block;
}
.tasks-comment-create .btn {
    margin-top: 10px;
}
.tasks-comment-create .note-editor {
    border-radius: 10px;
    border-color: #d1d5db;
    background: #fff;
}
.tasks-comment-create .note-editor.note-frame:focus-within {
    border-color: #048072;
    box-shadow: 0 0 0 3px rgba(4, 128, 114, 0.12);
}
.tasks-subtask-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #f3f4f6;
}
.tasks-subtask-row:last-child {
    border-bottom: 0;
}
.tasks-comment-item {
    padding: 10px 0;
    border-bottom: 1px solid #f3f4f6;
}
.tasks-comment-item:last-child {
    border-bottom: 0;
}
.tasks-comment-meta {
    margin: 0 0 4px 0;
    font-size: 12px;
    color: #6b7280;
}
.tasks-comment-text {
    margin: 0;
    white-space: normal;
}
.tasks-comment-text p {
    margin: 0 0 8px 0;
}
.tasks-comment-text p:last-child {
    margin-bottom: 0;
}
.tasks-comment-text ul,
.tasks-comment-text ol {
    margin: 0 0 8px 18px;
    padding: 0;
}
.tasks-comment-actions {
    margin-top: 8px;
}
.tasks-activity-item {
    padding: 8px 0;
    border-bottom: 1px solid #f3f4f6;
    font-size: 13px;
    color: #374151;
}
.tasks-activity-item:last-child {
    border-bottom: 0;
}
.tasks-editor-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.tasks-editor-tag {
    display: inline-flex;
    align-items: center;
    position: relative;
    cursor: pointer;
    user-select: none;
}
.tasks-editor-tag input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    pointer-events: none;
}
.tasks-editor-tag span {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    background: #f9fafb;
    font-size: 13px;
    color: #374151;
    font-weight: 500;
    transition: all 0.2s;
}
.tasks-editor-tag:hover span {
    border-color: #94a3b8;
    background: #f3f4f6;
}
.tasks-editor-tag input[type="checkbox"]:checked + span {
    border-color: #048072;
    background: #e6f4f1;
    color: #03584e;
    box-shadow: 0 0 0 2px rgba(4, 128, 114, 0.12);
}
.tasks-editor-tag input[type="checkbox"]:focus-visible + span {
    outline: 2px solid #048072;
    outline-offset: 1px;
}

/* Kategorien-Modal: 2 Spalten für Name + Kurzbeschreibung */
.doc-cat-fields.room-admin-fields {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
.doc-cat-card .room-admin-input {
    border-radius: 10px;
    padding: 12px 14px;
}
.doc-cat-add-card .doc-cat-add-fields {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 16px;
}
.doc-cat-add-card .doc-cat-add-fields .room-admin-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.doc-cat-add-card .doc-cat-desc-textarea {
    min-height: 72px;
    resize: vertical;
    font-family: inherit;
}
.doc-cat-add-card .room-admin-input {
    border-radius: 10px;
    padding: 12px 14px;
    border: 1px solid #e5e7eb;
    font-size: 14px;
    color: #1f2937;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}
.doc-cat-add-card .room-admin-input:focus {
    outline: none;
    border-color: #048072;
    box-shadow: 0 0 0 3px rgba(4, 128, 114, 0.12);
}
.doc-cat-add-card .room-admin-input::placeholder {
    color: #9ca3af;
}
.doc-cat-add-card #doc-cat-add {
    margin-top: 0;
}

.doc-cat-add-card #tests-cat-add {
    margin-top: 0;
}

.tests-cat-card {
    margin-top: 10px;
}

.tests-cat-fields.room-admin-fields {
    grid-template-columns: 1fr;
}

.tests-cat-name {
    width: 100%;
}

.tests-cat-add-card .tests-cat-add-fields {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 16px;
}

.employees-view-toggle .btn-view-mode.active {
    background: #048072;
    color: #fff;
    border-color: #048072;
}

.employees-pagination-size .form-select-sm {
    width: auto;
    padding: 6px 10px;
    margin-left: 4px;
}

.employees-pagination {
    margin-top: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.employees-pagination-info {
    font-size: 14px;
    color: #6b7280;
}

.employees-pagination-btns {
    display: flex;
    align-items: center;
    gap: 6px;
}

.employees-pagination-btns .btn.disabled {
    pointer-events: none;
    opacity: 0.6;
}

.employees-accordion {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
}

.employees-accordion-item {
    border-bottom: 1px solid #e5e7eb;
}

.employees-accordion-item:last-child {
    border-bottom: none;
}

.employees-accordion-header {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 16px;
    background: #f9fafb;
    border: none;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    color: #1f2937;
    text-align: left;
}

.employees-accordion-header:hover {
    background: #f3f4f6;
}

.employees-accordion-title {
    flex: 1;
}

.employees-accordion-count {
    font-weight: 400;
    color: #6b7280;
    font-size: 14px;
}

.employees-accordion-icon {
    width: 20px;
    height: 20px;
    position: relative;
}

.employees-accordion-icon::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    border: solid #6b7280;
    border-width: 0 2px 2px 0;
    padding: 3px;
    transform: translate(-50%, -60%) rotate(45deg);
    transition: transform 0.2s;
}

.employees-accordion-header[aria-expanded="true"] .employees-accordion-icon::after {
    transform: translate(-50%, -40%) rotate(-135deg);
}

.employees-accordion-body {
    display: none;
    padding: 0;
    background: #fff;
}

.employees-accordion-body.open {
    display: block;
}

.employees-accordion-body .employees-list {
    width: 100%;
    margin: 0;
    border: none;
}

.employees-accordion-body .employees-list th,
.employees-accordion-body .employees-list td {
    padding: 10px 16px;
}

.employees-loading,
.employees-empty {
    padding: 24px;
    text-align: center;
    color: #6b7280;
}

/* Modaler Dialog (System-weit) */
.modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
}

.modal-content {
    position: relative;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Räume verwalten: breiteres Modal, damit Ausstattung gut sichtbar ist */
.modal.room-admin-modal .modal-content {
    max-width: 680px;
}
.modal.room-admin-modal .modal-body {
    max-height: 75vh;
}
.modal.room-admin-modal .room-admin-equipment-wrap {
    background: #f8fafc;
    padding: 12px 14px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}
.modal.room-admin-modal .room-admin-check-label {
    user-select: none;
}
.modal.room-admin-modal .room-admin-check-label input[type="checkbox"] {
    flex-shrink: 0;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    line-height: 1;
    color: #6b7280;
    cursor: pointer;
    padding: 0 4px;
}

.modal-close:hover {
    color: #1f2937;
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding: 16px 24px;
    border-top: 1px solid #e5e7eb;
}

.modal-actions .btn {
    min-width: 100px;
}

.notification-modal-intro {
    margin: 0 0 14px;
    color: #374151;
}
.notification-modal-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.notification-modal-item {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 12px;
    background: #f9fafb;
}
.notification-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}
.notification-modal-time {
    font-size: 12px;
    color: #6b7280;
}
.notification-modal-title {
    margin: 0 0 6px;
    font-size: 15px;
    color: #1f2937;
}
.notification-modal-text {
    margin: 0;
    font-size: 14px;
    color: #4b5563;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-weight: 500;
    color: #374151;
    margin-bottom: 6px;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    box-sizing: border-box;
}

.form-group textarea {
    min-height: 80px;
    resize: vertical;
    line-height: 1.5;
}

.form-group textarea.room-booking-description {
    min-height: 88px;
    padding: 12px 14px;
    border-radius: 12px;
    border-color: #e5e7eb;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group textarea.room-booking-description:focus {
    outline: none;
    border-color: #048072;
    box-shadow: 0 0 0 3px rgba(4, 128, 114, 0.12);
}

.form-group textarea.room-booking-description::placeholder {
    color: #9ca3af;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #048072;
}

/* Pflichtfeld-Validierung: Fehleranzeige (Konvention für alle Formulare) */
.form-group.has-error label {
    color: #b91c1c;
}

.form-group.has-error input,
.form-group.has-error select,
.form-group.has-error textarea {
    border-color: #dc2626;
    box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.15);
}

.form-group.has-error input:focus,
.form-group.has-error select:focus,
.form-group.has-error textarea:focus {
    border-color: #b91c1c;
    box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.2);
}

.form-group.has-error #news-quill-editor,
.form-group.has-error .ql-container {
    border-color: #dc2626;
}

/* Pflichtfeld-Fehler in Admin-Zeilen (Abteilungen, Räume) */
.department-admin-field.has-error .department-admin-label,
.room-admin-row .department-admin-field.has-error .department-admin-label,
.room-admin-card .room-admin-field.has-error .room-admin-label {
    color: #b91c1c;
}

.department-admin-field.has-error .department-name-input,
.department-admin-field.has-error .department-leader-select,
.room-admin-row .department-admin-field.has-error .room-admin-name,
.room-admin-row .department-admin-field.has-error .room-admin-building,
.room-admin-row .department-admin-field.has-error .room-admin-capacity,
.room-admin-card .room-admin-field.has-error .room-admin-input {
    border-color: #dc2626;
    box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.15);
}

.module-rights-table-wrap {
    overflow-x: auto;
    margin-top: 8px;
}

.module-rights-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.module-rights-table th,
.module-rights-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.module-rights-table th {
    font-weight: 600;
    color: #6b7280;
}

.module-rights-table td:not(:first-child) {
    text-align: center;
}

.module-rights-table input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.employees-admin-edit-layout {
    display: grid;
    grid-template-columns: minmax(260px, 30%) minmax(0, 70%);
    gap: 18px;
    align-items: start;
}

.employees-admin-edit-main,
.employees-admin-edit-rights {
    min-width: 0;
}

.employees-admin-edit-main {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.employees-admin-edit-rights {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.employees-admin-edit-content,
.employees-admin-edit-card-content {
    padding: 24px;
}

.employees-admin-edit-card-title {
    margin: 0 0 12px 0;
    font-size: 18px;
    color: #1f2937;
}

.employees-admin-profile-head {
    display: flex;
    justify-content: center;
    margin-bottom: 12px;
}

.employees-admin-profile-avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.employees-admin-profile-avatar-fallback {
    background: linear-gradient(135deg, #048072 0%, #036558 100%);
    color: #fff;
    font-size: 22px;
    font-weight: 700;
}

.employees-admin-profile-name {
    color: #111827;
    font-size: 18px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 4px;
}

.employees-admin-profile-meta {
    color: #4b5563;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
}

.form-hint {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #6b7280;
}

.employee-create-notify-wrap {
    margin-bottom: 16px;
    padding: 12px 14px;
    border: 1px solid #d1fae5;
    background: #f0fdf9;
    border-radius: 12px;
}

.employee-create-notify-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #065f46;
    cursor: pointer;
}

.employee-create-notify-label input[type="checkbox"] {
    margin-top: 2px;
}

.employee-create-notify-hint {
    display: block;
    margin-top: 6px;
    color: #047857;
    font-size: 12px;
    line-height: 1.45;
}

.employees-admin-doc-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.employees-admin-doc-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 10px 12px;
    background: #fff;
}

.employees-admin-doc-main {
    min-width: 0;
}

.employees-admin-doc-title {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
}

.employees-admin-doc-meta {
    font-size: 12px;
    color: #6b7280;
    margin-top: 2px;
}

.employees-admin-doc-table-wrap {
    overflow-x: auto;
}

.employees-admin-doc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

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

.employees-admin-doc-table th {
    color: #6b7280;
    font-weight: 600;
}

.employees-admin-doc-pagination {
    margin-top: 10px;
}

.employees-admin-doc-pagination-info {
    display: block;
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 8px;
}

.employees-admin-doc-pagination-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.employees-admin-absence-table-wrap {
    overflow-x: auto;
}

.employees-admin-absence-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

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

.employees-admin-absence-table th {
    font-weight: 600;
    color: #6b7280;
}

.employees-admin-absence-actions {
    white-space: nowrap;
}

.employees-admin-absence-actions .btn {
    margin-right: 8px;
}

.employees-admin-absence-actions .btn:last-child {
    margin-right: 0;
}

.employees-absence-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.employees-absence-time-wrap {
    margin-top: 8px;
}

.employees-admin-edit-rights .form-group {
    margin-bottom: 0;
}

.form-group label.block {
    display: block;
}

.form-group-inline .label-with-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0;
    cursor: pointer;
}

.form-group-inline .label-with-checkbox input[type="checkbox"] {
    width: auto;
    margin: 0;
    cursor: pointer;
}

.mb-2 { margin-bottom: 8px; }

@media (max-width: 1100px) {
    .employees-admin-edit-layout {
        grid-template-columns: 1fr;
    }
    .employees-absence-form-grid {
        grid-template-columns: 1fr;
    }
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn svg {
    width: 16px;
    height: 16px;
}

.btn-primary {
    background: linear-gradient(90deg, #048072 0%, #036558 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(4, 128, 114, 0.2);
}

.btn-primary:hover {
    box-shadow: 0 6px 16px rgba(4, 128, 114, 0.3);
    transform: translateY(-1px);
}

.btn-primary .btn-icon {
    width: 16px;
    height: 16px;
    margin-right: 6px;
    vertical-align: -3px;
}

.btn-outline {
    background: white;
    color: #374151;
    border: 1px solid #e5e7eb;
}

.btn-outline:hover {
    background: #f9fafb;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    margin-bottom: 5px;
}

.btn-indigo {
    background: linear-gradient(90deg, #6366f1 0%, #4f46e5 100%);
    color: white;
}

.btn-indigo:hover {
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-blue {
    background: linear-gradient(90deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

.btn-purple {
    background: linear-gradient(90deg, #a855f7 0%, #9333ea 100%);
    color: white;
}

.btn-green {
    background: linear-gradient(90deg, #10b981 0%, #059669 100%);
    color: white;
}

.btn-outline-indigo {
    background: white;
    color: #6366f1;
    border: 1px solid #6366f1;
}

.btn-outline-green {
    background: white;
    color: #10b981;
    border: 1px solid #10b981;
}

.btn-link {
    background: none;
    border: none;
    color: #048072;
    font-weight: 500;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-link:hover {
    background: #e6f4f1;
}

/* Cards */
.card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.card-header {
    padding: 24px;
    border-bottom: 1px solid #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.card-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, #048072 0%, #036558 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-icon svg {
    width: 20px;
    height: 20px;
    color: white;
}

.card-title {
    font-size: 20px;
    font-weight: bold;
    color: #1f2937;
}

.card-subtitle {
    font-size: 14px;
    color: #6b7280;
}

.card-header-gradient {
    background: linear-gradient(90deg, #048072 0%, #036558 100%);
    color: white;
}

.card-header-gradient .card-title,
.card-header-gradient .card-subtitle {
    color: white;
}

.card-header-gradient .card-subtitle {
    opacity: 0.8;
}

.card-body {
    padding: 24px;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.stat-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    position: relative;
}
.tests-template-edit-stat-link {
    cursor: pointer;
}
.tests-template-edit-stat-link:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.stat-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 1) 0%, rgba(249, 250, 251, 1) 100%);
}

.stat-content {
    position: relative;
    padding: 24px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.stat-label {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 4px;
}

.stat-value {
    font-size: 36px;
    font-weight: bold;
    color: #1f2937;
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.stat-icon svg {
    width: 28px;
    height: 28px;
    color: white;
}

.stat-icon-blue {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.stat-icon-purple {
    background: linear-gradient(135deg, #a855f7 0%, #9333ea 100%);
}

.stat-icon-orange {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
}

.stat-icon-green {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.stat-icon-gray {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
}

.stat-icon-red {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.stat-icon-indigo {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
}

.stat-change {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    padding: 0 20px 20px;
    margin-top: 0;
}

.stat-change svg {
    width: 16px;
    height: 16px;
}

.stat-change-positive {
    color: #10b981;
}

.stat-change-negative {
    color: #ef4444;
}

.stat-change-label {
    font-weight: 400;
    color: #6b7280;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    margin-bottom: 32px;
}

.dashboard-side-column {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Dashboard – Raumbelegungen (in Karte „Räume buchen“) */
.dashboard-rb-mine-section {
    margin-bottom: 16px;
    padding: 12px 14px;
    background: #f0fdfa;
    border: 1px solid #99f6e4;
    border-radius: 12px;
}

.dashboard-rb-mine-title {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #0d9488;
    margin-bottom: 10px;
}

.dashboard-rb-list-title {
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 10px;
}

.dashboard-room-bookings-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dashboard-rb-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 16px;
    padding: 10px 12px;
    background: #f9fafb;
    border-radius: 10px;
    border: 1px solid #f3f4f6;
    font-size: 14px;
}

.dashboard-rb-item-mine {
    margin-bottom: 10px;
    background: #ecfdf5;
    border-color: #99f6e4;
}

.dashboard-rb-room {
    font-weight: 600;
    color: #1f2937;
}

.dashboard-rb-building {
    font-weight: 400;
    color: #6b7280;
}

.dashboard-rb-date {
    color: #374151;
    font-weight: 500;
    min-width: 90px;
}

.dashboard-rb-time {
    color: #4b5563;
}

.dashboard-rb-persons {
    color: #6b7280;
    font-size: 13px;
}

.dashboard-rb-loading,
.dashboard-rb-empty {
    color: #6b7280;
    font-size: 14px;
    padding: 12px 0;
}

.modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

/* News – Links ohne Unterstreichung (Dashboard & Übersicht) */
.news-teaser-link,
.featured-news a,
.news-list .news-item a,
#dashboard-news-teasers a,
.dashboard-news a,
.card-header .btn-link {
    text-decoration: none;
}

.news-teaser-link:hover,
.featured-news a:hover,
.news-list .news-item a:hover,
#dashboard-news-teasers a:hover {
    text-decoration: none;
}

/* News */
.featured-news {
    position: relative;
    display: flex;
    flex-direction: column;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 16px;
    transition: box-shadow 0.3s, transform 0.3s;
}

.featured-news:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-4px);
}

.dashboard-news-teaser-card {
    cursor: pointer;
    border: 1px solid #f3f4f6;
    border-radius: 16px;
}

.featured-news.dashboard-news-teaser-card {
    border-radius: 16px;
}

.news-item.dashboard-news-teaser-card {
    border-radius: 12px;
}

/* Dashboard-News-Teaser: Höhe nur vom Text (news-item-content). Bild aus dem Fluss → Wrap bekommt Zeilenhöhe, Bild wird abgeschnitten und mittig. */
.news-item.dashboard-news-teaser-card .news-item-inner {
    align-items: stretch;
}
.news-item.dashboard-news-teaser-card .news-item-image-wrap {
    position: relative;
    width: 160px;
    flex-shrink: 0;
    min-height: 0;
    overflow: hidden;
    align-self: stretch;
}
.news-item.dashboard-news-teaser-card .news-item-image-wrap .news-item-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}
.news-item.dashboard-news-teaser-card .news-item-image-wrap .news-item-image-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    min-height: 0;
    background: #e5e7eb;
}

.featured-news-image-wrap {
    height: 160px;
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
}

.featured-news-image-wrap .featured-news-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.featured-news-image-wrap .featured-news-image-placeholder {
    width: 100%;
    height: 100%;
    min-height: 100%;
    background: #e5e7eb;
}

.featured-news-content {
    padding: 20px;
    background: white;
    border-radius: 0 0 12px 12px;
}

.featured-news-content h3 {
    font-size: 20px;
    font-weight: bold;
    color: #1f2937;
    margin-bottom: 8px;
    transition: color 0.2s;
}

.featured-news:hover .featured-news-content h3 {
    color: #048072;
}

.featured-news-content p {
    color: #4b5563;
    margin-bottom: 16px;
}

.news-teaser-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.news-teaser-actions .news-like-btn {
    margin-left: auto;
}

.news-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: #6b7280;
    padding-bottom: 10px;
}

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

.news-meta .news-date svg,
.news-card-meta .news-date svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    color: #6b7280;
}

.news-card-meta .news-date {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #6b7280;
}

.news-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.news-item {
    background: white;
    border: 1px solid #f3f4f6;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.2s;
}

.news-item:hover {
    background: #f9fafb;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.news-item-inner {
    display: flex;
    gap: 0;
    min-height: 0;
}

.news-item-image-wrap {
    width: 160px;
    flex-shrink: 0;
    display: flex;
    align-items: stretch;
    border-right: 1px solid #e5e7eb;
    overflow: hidden;
    position: relative;
}

.news-item-image {
    width: 100%;
    height: 100%;
    min-height: 100%;
    object-fit: cover;
    object-position: center;
}

.news-item-image-placeholder {
    width: 100%;
    min-height: 120px;
    background: #e5e7eb;
}

.news-item-content {
    flex: 1;
    padding: 16px 16px 16px 20px;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.news-item-content h4 {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 4px;
}

.news-item-content p {
    font-size: 14px;
    color: #6b7280;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.badge-primary {
    background: #048072;
    color: white;
}

.badge-outline {
    background: transparent;
    border: 1px solid #d1d5db;
    color: #6b7280;
}

.badge-blue {
    background: #3b82f6;
    color: white;
}

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

.badge-orange {
    background: #f97316;
    color: white;
}

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

.badge-purple {
    background: #a855f7;
    color: white;
}

.badge-indigo {
    background: #6366f1;
    color: white;
}

.badge-yellow {
    background: #eab308;
    color: white;
}

/* Events */
.event-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.event-item {
    display: flex;
    gap: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f3f4f6;
}

.event-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.event-date {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background: linear-gradient(135deg, #e6f4f1 0%, #d0ebe6 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.event-date.event-date-icon {
    justify-content: center;
}

.event-date.event-date-icon svg {
    width: 26px;
    height: 26px;
    stroke-width: 1.8;
    color: #048072;
}

.event-date.event-date-reason-krankheit {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
}

.event-date.event-date-reason-krankheit svg {
    color: #b91c1c;
}

.event-date.event-date-reason-urlaub {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
}

.event-date.event-date-reason-urlaub svg {
    color: #1d4ed8;
}

.event-date.event-date-reason-elternzeit {
    background: linear-gradient(135deg, #f3e8ff 0%, #e9d5ff 100%);
}

.event-date.event-date-reason-elternzeit svg {
    color: #7e22ce;
}

.event-date.event-date-reason-dienstreise {
    background: linear-gradient(135deg, #ffedd5 0%, #fed7aa 100%);
}

.event-date.event-date-reason-dienstreise svg {
    color: #c2410c;
}

.event-day {
    font-size: 20px;
    font-weight: bold;
    color: #048072;
}

.event-month {
    font-size: 12px;
    font-weight: 500;
    color: #048072;
}

.event-info h4 {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
}

.event-info p {
    font-size: 14px;
    color: #6b7280;
    margin-top: 4px;
}

.event-attendees {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #6b7280;
    margin-top: 8px;
}

/* Activities */
.activity-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.activity-item {
    display: flex;
    gap: 16px;
}

.activity-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #048072 0%, #036558 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    font-weight: 600;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(4, 128, 114, 0.3);
}

.activity-content {
    flex: 1;
    min-width: 0;
}

.activity-content p {
    font-size: 14px;
    color: #1f2937;
}

.activity-content strong {
    font-weight: 600;
}

.activity-doc {
    font-size: 14px;
    color: #048072;
    font-weight: 500;
    margin-top: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.activity-time {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #6b7280;
    margin-top: 4px;
}

/* Tests */
.test-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.test-item {
    padding: 16px;
    border-radius: 12px;
    border: 1px solid;
}

.test-item h4 {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 4px;
}

.test-item p {
    font-size: 14px;
    color: #6b7280;
}

.test-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    margin-bottom: 12px;
}

.test-deadline {
    font-size: 12px;
    color: #6b7280;
}

.test-item-red {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border-color: #fecaca;
}

.test-item-orange {
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
    border-color: #fed7aa;
}

.test-item-green {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-color: #bbf7d0;
}

/* Shifts */
.shift-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.shift-item {
    padding: 10px 12px;
    border-radius: 10px;
    background: linear-gradient(135deg, #f9fafb 0%, #ffffff 100%);
    border: 1px solid #f3f4f6;
    transition: all 0.2s;
}

.shift-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.shift-item div:first-child {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.shift-item h4 {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.shift-item p {
    font-size: 13px;
    color: #6b7280;
    margin: 0;
}

/* Rooms */
.room-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.room-item {
    padding: 16px;
    border-radius: 12px;
    border: 1px solid;
    transition: all 0.2s;
}

.room-item div:first-child {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.room-item h4 {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
}

.room-item p {
    font-size: 14px;
    color: #6b7280;
}

.room-time {
    font-size: 12px;
    color: #6b7280;
    margin-top: 4px;
}

.room-item-available {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-color: #bbf7d0;
}

.room-item-occupied {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border-color: #fecaca;
    opacity: 0.75;
}

/* News Page */
.news-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 32px;
}

.filter-tag {
    padding: 8px 16px;
    border-radius: 12px;
    border: 1px solid #d1d5db;
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-tag:hover {
    background: #f3f4f6;
    border-color: #048072;
}

.filter-tag-active {
    background: linear-gradient(90deg, #048072 0%, #036558 100%);
    color: white;
    border-color: #048072;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 24px;
}

.news-teasers-loading,
.news-loading {
    padding: 24px;
    text-align: center;
    color: #6b7280;
}

.news-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.news-pagination .btn {
    min-width: 40px;
}

.news-card {
    position: relative;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s;
}

.news-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-4px);
}

.news-card:active {
    transform: translateY(-4px);
}

.news-card img {
    width: 100%;
    height: 192px;
    object-fit: cover;
}

.news-card:hover img {
    transform: none;
}

.card-body {
    transition: none;
}

.card:active,
.card:active .card-body,
.news-card:active .card-body {
    transform: none;
}

.news-card-badge {
    position: absolute;
    top: 16px;
    left: 16px;
}

.featured-news .news-card-badge {
    z-index: 3;
}

.news-card-content {
    padding: 20px;
}

.news-card-content h3 {
    font-size: 18px;
    font-weight: bold;
    color: #1f2937;
    margin: 12px 0 8px;
    transition: color 0.2s;
}

.news-card:hover h3 {
    color: #048072;
}

.news-card-content p {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 16px;
}

.news-card-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 16px;
}

.news-card-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid #f3f4f6;
}

.news-action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: none;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s;
}

.news-action-btn:hover {
    background: #f3f4f6;
    color: #048072;
}

.news-action-btn.liked {
    color: #ef4444;
}

.news-action-btn svg {
    width: 20px;
    height: 20px;
}

/* Tests Page */
.tests-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 24px;
}

.tests-empty-state {
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    border-radius: 14px;
    padding: 20px;
    text-align: center;
}

.tests-empty-state-error {
    background: #fff7ed;
    border-color: #fed7aa;
}

.tests-empty-state-icon {
    font-size: 24px;
    line-height: 1;
    margin-bottom: 10px;
}

.tests-empty-state-title {
    margin: 0 0 6px;
    font-size: 17px;
    color: #1f2937;
}

.tests-empty-state-text {
    margin: 0;
    font-size: 14px;
    color: #6b7280;
}

.test-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    padding: 24px;
}

.test-card-red {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
}

.test-card-orange {
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
}

.test-card-green {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
}

.test-card-failed {
    background: linear-gradient(135deg, #fdf0f0 0%, #fcdcdc 100%);
}

.test-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.test-card h3 {
    font-size: 20px;
    font-weight: bold;
    color: #1f2937;
    margin-bottom: 8px;
}

.test-card p {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 16px;
}

.test-card-meta {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    padding: 16px 0;
    margin-bottom: 16px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.test-meta-label {
    display: block;
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 4px;
}

.test-meta-value {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
}

.test-passed {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: #10b981;
    color: white;
    border-radius: 12px;
    font-weight: 600;
}

.test-passed svg {
    width: 20px;
    height: 20px;
}

.test-failed {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: #ef4444;
    color: #ffffff;
    border-radius: 12px;
    font-weight: 600;
}

.test-failed svg {
    width: 20px;
    height: 20px;
}

.test-passed[role="button"] {
    cursor: pointer;
}

.test-failed[role="button"] {
    cursor: pointer;
}

.tests-toolbar {
    margin: 8px 0 20px;
}

#tests-templates-list-wrap {
    width: 100%;
    overflow-x: auto;
}

#tests-templates-table {
    width: 100%;
}

#tests-templates-table td .badge {
    margin-bottom: 0;
}

#tests-run-view .page-header,
#tests-result-view .page-header {
    margin-top: 20px;
    margin-bottom: 16px;
}

.tests-run-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

#tests-run-timer-badge {
    font-size: 15px;
    padding: 6px 14px;
    font-weight: 700;
    width: 96px;
    justify-content: center;
    font-variant-numeric: tabular-nums;
}

.tests-run-card,
.tests-result-card {
    margin-top: 0;
}

.tests-run-description {
    color: #6b7280;
    margin-bottom: 16px;
}

.tests-run-progress {
    margin: 10px 0 16px;
}

.tests-run-progress-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 8px;
}

.tests-run-progress-track {
    width: 100%;
    height: 10px;
    border-radius: 999px;
    background: #e5e7eb;
    overflow: hidden;
}

.tests-run-progress-bar {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #048072 0%, #0ea5a1 100%);
    transition: width 0.2s ease;
}

.tests-run-questions {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 14px;
}

.tests-question {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
    background: #f8fafc;
}

.tests-question-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.tests-question-title {
    font-weight: 700;
    color: #1f2937;
    font-size: 18px;
    line-height: 1.35;
    margin: 0;
}

.tests-question-points {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    background: #e0f2fe;
    color: #075985;
    font-weight: 700;
    font-size: 12px;
    line-height: 1;
}

.tests-option {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    padding: 10px 12px;
    border: 1px solid #dbe3ee;
    border-radius: 10px;
    background: #ffffff;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
    cursor: pointer;
}

.tests-option:hover {
    border-color: #b8c5d8;
    background: #f8fbff;
}

.tests-option:has(input:checked) {
    border-color: #0ea5a1;
    background: #f0fdfa;
    box-shadow: 0 0 0 2px rgba(14, 165, 161, 0.12) inset;
}

.tests-option input[type="radio"],
.tests-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #0ea5a1;
    margin: 0;
}

.tests-template-detail-deadline {
    min-width: 205px;
    height: 40px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    padding: 8px 10px;
    background: #ffffff;
    color: #111827;
    font-size: 14px;
    line-height: 1.2;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.tests-template-detail-deadline:hover {
    border-color: #9ca3af;
}

.tests-template-detail-deadline:focus {
    outline: none;
    border-color: #0ea5a1;
    box-shadow: 0 0 0 3px rgba(14, 165, 161, 0.15);
}

.tests-template-detail-deadline:disabled {
    background: #f3f4f6;
    color: #6b7280;
    border-color: #e5e7eb;
    cursor: not-allowed;
}

.tests-template-detail-deadline-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
}

.tests-template-detail-deadline-clear {
    width: 30px;
    min-width: 30px;
    height: 30px;
    padding: 0;
    border-radius: 999px;
    font-size: 16px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-tests-admin-assign-template {
    background: transparent;
    border-color: #d1d5db;
    color: #374151;
}

.btn-tests-admin-assign-template:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

.btn-tests-template-results {
    background: transparent;
    border-color: #d1d5db;
    color: #374151;
}

.btn-tests-template-results:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

.btn-tests-template-action-green {
    background: #048072;
    border-color: #048072;
    color: #ffffff;
}

.btn-tests-template-action-green:hover {
    background: #03665b;
    border-color: #03665b;
}

.tests-template-actions {
    display: inline-flex;
    flex-direction: column;
    gap: 6px;
    min-width: 340px;
}

.tests-template-actions-row {
    display: flex;
    gap: 6px;
    flex-wrap: nowrap;
}

#tests-templates-table th:last-child,
#tests-templates-table td:last-child {
    width: 300px;
    white-space: nowrap;
}

#tests-run-view .tests-question .form-input,
#tests-run-view .tests-question .form-select,
#tests-run-view .tests-question textarea {
    width: 100%;
    min-height: 44px;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    padding: 10px 12px;
    background: #fff;
    color: #111827;
    font-size: 15px;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

#tests-run-view .tests-question textarea {
    min-height: 90px;
    resize: vertical;
}

#tests-run-view .tests-question .form-input:focus,
#tests-run-view .tests-question .form-select:focus,
#tests-run-view .tests-question textarea:focus {
    outline: none;
    border-color: #0ea5a1;
    box-shadow: 0 0 0 3px rgba(14, 165, 161, 0.15);
}

.tests-run-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 18px;
}

.tests-result-kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}

.tests-result-item {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 12px;
    background: #ffffff;
}

.tests-result-item h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.tests-editor-questions-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 18px 0 12px;
}

.tests-editor-questions-footer {
    margin-top: 12px;
    display: flex;
    justify-content: flex-end;
}

.tests-editor-question-card {
    border: 1px solid #e5e7eb;
    margin-bottom: 12px;
}

.tests-editor-question-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.tests-editor-question-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.tests-editor-question-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
}

#tests-template-edit-view .form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}

#tests-template-edit-view .form-input,
#tests-template-edit-view .form-select,
#tests-template-edit-view textarea {
    width: 100%;
    min-height: 44px;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    padding: 10px 12px;
    background: #ffffff;
    color: #111827;
    font-size: 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

#tests-template-edit-view textarea {
    min-height: 96px;
    resize: vertical;
}

#tests-template-edit-view .form-input::placeholder,
#tests-template-edit-view textarea::placeholder {
    color: #9ca3af;
}

#tests-template-edit-view .form-input:focus,
#tests-template-edit-view .form-select:focus,
#tests-template-edit-view textarea:focus {
    outline: none;
    border-color: #0ea5a1;
    box-shadow: 0 0 0 3px rgba(14, 165, 161, 0.14);
}

.tests-editor-options-wrap {
    border-top: 1px solid #f3f4f6;
    margin-top: 6px;
    padding-top: 10px;
}

.tests-editor-option-row {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
}

#tests-template-edit-view .tests-editor-option-row .tests-option,
#tests-template-edit-view .tests-editor-options-actions .tests-option {
    margin-bottom: 0;
    align-self: center;
}

#tests-template-edit-view .tests-option input[type="radio"],
#tests-template-edit-view .tests-option input[type="checkbox"] {
    margin-right: 6px;
    position: relative;
    top: 1px;
}

.tests-editor-options-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

#tests-template-detail-controls {
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

#tests-template-detail-search {
    width: min(360px, 100%);
    min-width: 240px;
    height: 42px;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    background: #ffffff;
    color: #111827;
    box-shadow: 0 1px 2px rgba(17, 24, 39, 0.04);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

#tests-template-detail-search::placeholder {
    color: #9ca3af;
}

#tests-template-detail-search:focus {
    outline: none;
    border-color: #0ea5a1;
    box-shadow: 0 0 0 3px rgba(14, 165, 161, 0.14);
}

@media (max-width: 900px) {
    #tests-template-detail-search {
        min-width: 0;
        width: 100%;
    }
}

@media (max-width: 900px) {
    .tests-editor-option-row {
        grid-template-columns: 1fr;
    }
}

.tests-admin-block + .tests-admin-block {
    margin-top: 20px;
}

.tests-admin-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.tests-admin-list li {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid #f3f4f6;
}

.tests-assign-chip .tests-assign-remove {
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    margin-left: 4px;
    padding: 0;
}

/* Shift Schedule Page */
.shift-schedule-content {
    margin-top: 32px;
}
.shift-myshifts-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.shift-myshifts-nav {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
#shift-myweek-label {
    display: inline-flex;
    align-items: center;
    min-width: 110px;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}

.shift-myshifts-nav .btn {
    background: #ffffff;
    color: #374151;
    border-color: #d1d5db;
}

.shift-schedule-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.shift-schedule-list.shift-three-weeks {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.shift-myweek-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 14px;
    min-width: 0;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.shift-myweek-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.shift-myweek-card.is-active {
    border-color: #048072;
    box-shadow: 0 0 0 2px rgba(4, 128, 114, 0.18);
    transform: translateY(-1px);
}

.shift-myweek-card-head h4 {
    margin: 0;
    font-size: 15px;
    color: #111827;
}

.shift-myweek-card-head p {
    margin: 2px 0 10px 0;
    font-size: 12px;
    color: #6b7280;
}

.shift-myweek-card-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.shift-myweek-card .shift-details {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.shift-myweek-card .shift-detail-time {
    white-space: nowrap;
    overflow: visible;
    text-overflow: unset;
}

.shift-myweek-card .shift-detail-hours {
    margin-left: auto;
    text-align: right;
    white-space: nowrap;
}

.shift-myweek-card .shift-schedule-item {
    align-items: center;
}

.shift-myweek-day-line {
    font-size: 13px;
    color: #1f2937;
    line-height: 1.4;
}

.shift-myweek-day-line strong {
    color: #374151;
}

.shift-schedule-item {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

@media (max-width: 1200px) {
    .shift-schedule-list.shift-three-weeks {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .shift-schedule-list.shift-three-weeks {
        grid-template-columns: 1fr;
    }
}

.shift-date-large {
    text-align: center;
    min-width: 80px;
}

.shift-day-name {
    display: block;
    font-size: 14px;
    color: #6b7280;
}

.shift-date-num {
    display: block;
    font-size: 18px;
    font-weight: bold;
    color: #1f2937;
}

.shift-details {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.shift-detail-label {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 4px;
}

.shift-detail-value {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
}

/* Schichtplanung Modul */
.shift-weekday-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 10px;
}
.shift-weekday-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    background: #ffffff;
    color: #374151;
    cursor: pointer;
    user-select: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}
.shift-weekday-card:hover {
    border-color: #9ca3af;
    background: #f9fafb;
}
.shift-weekday-card input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.shift-weekday-card-short {
    width: 30px;
    height: 30px;
    margin-right: 10px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: #4b5563;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
}
.shift-weekday-card-label {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    white-space: nowrap;
}
.shift-weekday-card input[type="checkbox"]:checked ~ .shift-weekday-card-short {
    color: #0f766e;
    background: #ccfbf1;
    border-color: #99f6e4;
}
.shift-weekday-card input[type="checkbox"]:checked ~ .shift-weekday-card-label {
    color: #0f766e;
}
.shift-weekday-card:has(input[type="checkbox"]:checked) {
    border-color: #0ea5a1;
    background: #f0fdfa;
    box-shadow: 0 0 0 3px rgba(14, 165, 161, 0.12);
}
.shift-days-time-wrap {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 10px;
}
.shift-day-time-row {
    display: grid;
    grid-template-columns: 84px minmax(180px, 1fr);
    grid-template-rows: auto auto;
    gap: 8px;
    align-items: center;
    padding: 8px 10px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #f9fafb;
}
.shift-day-time-row strong {
    grid-column: 1;
    grid-row: 1 / 3;
    font-size: 12px;
    color: #374151;
    align-self: center;
}
.shift-day-time-row .shift-day-start,
.shift-day-time-row .shift-day-end {
    grid-column: 2;
    width: 100%;
    min-width: 180px;
    height: 40px;
    padding: 0 10px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    background: #fff;
    color: #111827;
    box-shadow: 0 1px 2px rgba(17, 24, 39, 0.05);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}
.shift-day-time-row .shift-day-start:hover,
.shift-day-time-row .shift-day-end:hover {
    border-color: #9ca3af;
}
.shift-day-time-row .shift-day-start:focus,
.shift-day-time-row .shift-day-end:focus {
    outline: none;
    border-color: #0ea5a1;
    box-shadow: 0 0 0 3px rgba(14, 165, 161, 0.14);
}
.shift-day-time-row > span {
    grid-column: 1;
    grid-row: 2;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    min-width: 0;
    height: 30px;
    padding: 0 2px;
    border-radius: 999px;
    background: transparent;
    color: #4b5563;
    font-size: 12px;
    font-weight: 600;
}
@media (max-width: 860px) {
    .shift-day-time-row {
        grid-template-columns: 1fr;
        gap: 6px;
    }
    .shift-day-time-row > span {
        width: fit-content;
    }
}
.shift-plan-form-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}
.shift-member-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 8px;
    background: #fff;
}
.shift-member-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.shift-member-name small {
    color: #6b7280;
}
.shift-member-hours-wrap,
.shift-member-info-wrap {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.shift-member-hours-wrap label,
.shift-member-info-wrap label {
    font-size: 12px;
    font-weight: 600;
    color: #4b5563;
}
.shift-member-target {
    width: 220px;
    max-width: 100%;
    height: 42px;
    padding: 0 12px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(17, 24, 39, 0.05);
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.shift-member-target:focus,
.shift-member-info:focus {
    outline: none;
    border-color: #0ea5a1;
    box-shadow: 0 0 0 3px rgba(14, 165, 161, 0.14);
}
.shift-member-info {
    min-height: 88px;
    padding: 10px 12px;
    resize: vertical;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(17, 24, 39, 0.05);
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
#shift-plan-member-suggestions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
}
#shift-plan-responsible-suggestions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
}
.shift-member-suggestion {
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    padding: 8px 10px;
    text-align: left;
    cursor: pointer;
}
.shift-responsible-suggestion {
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    padding: 8px 10px;
    text-align: left;
    cursor: pointer;
}
.shift-week-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.shift-week-open {
    display: flex;
    align-items: center;
    gap: 8px;
}
.shift-week-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 16px;
}
.shift-members-panel .card-body {
    max-height: 68vh;
    overflow: auto;
}
.shift-member-pool-item {
    border: 1px solid #dbeafe;
    border-radius: 10px;
    padding: 8px 10px;
    margin-bottom: 8px;
    background: #f8fbff;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.shift-member-pool-item[draggable="true"] {
    cursor: grab;
}
.shift-board-day-row {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 10px;
    margin-bottom: 10px;
}
.shift-week-members-overview {
    margin-bottom: 18px;
}
.shift-week-members-overview-title {
    margin: 0 0 10px 0;
    font-size: 14px;
    font-weight: 700;
    color: #374151;
}
.shift-week-members-overview-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.shift-member-week-card {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
    padding: 10px;
}
.shift-member-week-card.is-current-user {
    border-color: #048072;
    box-shadow: 0 0 0 2px rgba(4, 128, 114, 0.15);
    background: #f0fdfa;
}
.shift-member-week-head {
    margin-bottom: 8px;
}
.shift-member-week-slots {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.shift-member-slot-badge {
    display: inline-flex;
    align-items: center;
    height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    background: #eef2ff;
    color: #1e3a8a;
    font-size: 12px;
    font-weight: 600;
}
.shift-member-slot-badge.is-overlimit {
    background: #fee2e2;
    color: #991b1b;
}
.shift-member-slot-empty {
    color: #6b7280;
    font-size: 13px;
}
.shift-week-by-day-wrap {
    margin-top: 14px;
}
.shift-board-day-meta {
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.shift-board-day-meta small {
    color: #6b7280;
}
.shift-board-day-meta .badge {
    align-self: flex-start;
    width: fit-content;
    margin-top: 5px;
    font-size: 11px;
}
.shift-board-day-lane {
    border: 1px solid #d1d5db;
    border-radius: 10px;
    position: relative;
    background: linear-gradient(90deg, #f9fafb 0, #ffffff 50%, #f9fafb 100%);
}
.shift-lane-hours {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 22px;
    border-bottom: 1px dashed #e5e7eb;
    pointer-events: none;
}
.shift-lane-hour-mark {
    position: absolute;
    top: 0;
    transform: translateX(-50%);
}
.shift-lane-hour-mark::after {
    content: '';
    position: absolute;
    top: 12px;
    left: 50%;
    width: 1px;
    height: calc(100% + 8px);
    background: rgba(148, 163, 184, 0.35);
}
.shift-lane-hour-label {
    font-size: 11px;
    color: #64748b;
    background: #ffffff;
    padding: 1px 4px;
    border-radius: 6px;
}
.shift-board-day-lane.shift-lane-over {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}
.shift-slot-bar {
    position: absolute;
    height: 28px;
    background: #2563eb;
    color: #fff;
    border-radius: 8px;
    padding: 4px 28px 4px 8px;
    font-size: 12px;
    line-height: 20px;
    overflow: hidden;
    white-space: nowrap;
    cursor: grab;
}
.shift-slot-bar.is-current-user {
    background: #048072;
}
.shift-slot-bar.is-readonly {
    cursor: default;
    padding-right: 8px;
}
.shift-board-day-lane.is-readonly {
    background: linear-gradient(90deg, #f8fafc 0, #ffffff 50%, #f8fafc 100%);
}
.shift-slot-bar.shift-slot-moving { cursor: grabbing; opacity: 0.96; }
.shift-slot-text {
    pointer-events: none;
}
.shift-slot-delete {
    position: absolute;
    top: 3px;
    right: 16px;
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
}
.shift-slot-resize {
    position: absolute;
    top: 0;
    right: 0;
    width: 10px;
    height: 100%;
    cursor: ew-resize;
    background: rgba(255, 255, 255, 0.35);
}
.shift-my-time-row {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #f0f2f4;
}
@media (max-width: 900px) {
    #shift-schedule-page .tasks-filters .documents-search-wrap,
    #shift-schedule-page .tasks-filters .documents-search-input { width: 100%; }
}

/* Room Booking Page */
.room-planning-tabs {
    margin: 8px 0 12px;
}

#room-planning-date-wrap {
    margin-top: 0;
    gap: 8px;
    align-items: center;
}

#room-planning-date-wrap #room-planning-date {
    min-width: 170px;
}

#room-planning-date-prev,
#room-planning-date-next {
    min-width: 36px;
    padding: 6px 8px;
}

#room-planning-date-prev .btn-icon,
#room-planning-date-next .btn-icon {
    width: 16px;
    height: 16px;
}

.rooms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(450px, 1fr));
    gap: 24px;
}

.room-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    padding: 24px;
    transition: all 0.3s;
}

.room-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.room-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 16px;
}

.room-card h3 {
    font-size: 20px;
    font-weight: bold;
    color: #1f2937;
}

.room-card-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 14px;
    color: #6b7280;
    margin-top: 8px;
}

.room-card-equipment {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.equipment-tag {
    padding: 4px 12px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    color: #6b7280;
}

.equipment-tag--status-korrektur {
    background: #fef2f2;
    border-color: #fecaca;
    color: #b91c1c;
}

.equipment-tag--status-geprueft {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
}

.equipment-tag--status-zur-pruefung {
    background: #fefce8;
    border-color: #fef08a;
    color: #a16207;
}

.equipment-tag--status-zur-freigabe {
    background: #f3e8ff;
    border-color: #e9d5ff;
    color: #7c3aed;
}

.equipment-tag--status-freigegeben {
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: #047857;
}

.equipment-tag--status-veroeffentlicht {
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: #047857;
}

.equipment-tag--status-veroeffentlicht::before {
    content: "\2713";
    margin-right: 6px;
    font-weight: 700;
}

.room-card-slots {
    margin-top: 16px;
}

.room-slots-title {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 12px;
}

.room-slot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 8px;
}

.room-slot:last-child {
    margin-bottom: 0;
}

.room-slot-available {
    background: linear-gradient(90deg, #f0fdf4 0%, #dcfce7 100%);
    border: 1px solid #bbf7d0;
}

.room-slot-occupied {
    background: linear-gradient(90deg, #fef2f2 0%, #fee2e2 100%);
    border: 1px solid #fecaca;
}

.room-slot-time {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
}

.room-slot-title {
    font-size: 12px;
    color: #6b7280;
    margin-top: 4px;
}

/* Placeholder Content */
.placeholder-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    text-align: center;
}

.placeholder-content svg {
    width: 80px;
    height: 80px;
    color: #d1d5db;
    margin-bottom: 24px;
}

.placeholder-content h2 {
    font-size: 24px;
    font-weight: bold;
    color: #1f2937;
    margin-bottom: 8px;
}

.placeholder-content p {
    font-size: 16px;
    color: #6b7280;
}

/* Icon helpers */
.icon-sm {
    width: 20px;
    height: 20px;
}

.icon-blue {
    color: #3b82f6;
}

.icon-purple {
    color: #a855f7;
}

.icon-indigo {
    color: #6366f1;
}

/* Responsive */
@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .modules-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 240px;
    }

    .page {
        padding: 24px;
    }

    .stats-grid,
    .news-grid,
    .tests-grid,
    .rooms-grid {
        grid-template-columns: 1fr;
    }
    #documents-detail-view .document-detail-layout {
        flex-wrap: wrap;
    }
    #documents-detail-view .document-detail-meta-wrap {
        flex: 1 1 100%;
        max-width: none;
    }
    #documents-detail-view .documents-detail-meta-sticky {
        position: static;
    }

    .document-detail-dl {
        grid-template-columns: 1fr;
        gap: 0;
    }
    .document-detail-dl dt {
        border-bottom: 0;
        padding: 10px 0 2px 0;
    }
    .document-detail-dl dd {
        padding: 0 0 10px 0;
        border-bottom: 1px solid #eef2f7;
    }
    .document-detail-dl dd:last-child {
        border-bottom: 0;
    }
}
