/**
 * Mühlentagebuch - Consolidated Stylesheet
 * 
 * Enthält alle Styles für:
 * - Frontend (Login, Dashboard, Einträge)
 * - Admin (Arbeitspläne, Einträge, Komponenten)
 * - Komponenten (UI-Elemente)
 * - Modals
 * 
 * @package Muehlentagebuch
 * @version 2.2.0
 */

/* =========================================
   MUEHLENTAGEBUCH - CONSOLIDATED CSS
   Extracted from inline styles
   ========================================= */

/* --- Block 1 --- */
.komponenten-management {
                max-width: 1200px;
                margin: 20px auto;
                background: white;
                border-radius: 15px;
                padding: 30px;
                box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
            }

            .komponenten-management h3 {
                color: #2c3e50;
                margin: 0 0 25px 0;
                font-size: 1.5em;
                text-align: center;
                padding-bottom: 15px;
                border-bottom: 2px solid #3498db;
            }

            .komponenten-grid-management {
                display: grid;
                grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
                gap: 20px;
            }

            .komponente-card {
                background: #f8f9fa;
                border: 2px solid #e9ecef;
                border-radius: 12px;
                padding: 20px;
                transition: all 0.3s ease;
            }

            .komponente-card:hover {
                border-color: #3498db;
                box-shadow: 0 5px 15px rgba(52, 152, 219, 0.2);
            }

            .komponente-header {
                display: flex;
                justify-content: space-between;
                align-items: center;
                margin-bottom: 20px;
                padding-bottom: 15px;
                border-bottom: 1px solid #ecf0f1;
            }

            .komponente-header h4 {
                margin: 0;
                color: #2c3e50;
                font-size: 1.2em;
            }

            .komponente-status-indicators {
                display: flex;
                gap: 5px;
            }

            .status-indicator {
                font-size: 18px;
                opacity: 0.8;
            }

            .komponente-controls {
                display: grid;
                gap: 15px;
            }

            .control-group {
                display: flex;
                align-items: center;
            }

            .toggle-label {
                display: flex;
                align-items: center;
                cursor: pointer;
                font-weight: 500;
                width: 100%;
                padding: 8px;
                border-radius: 6px;
                transition: background-color 0.3s ease;
            }

            .toggle-label:hover {
                background: rgba(52, 152, 219, 0.1);
            }

            .toggle-label input[type="checkbox"] {
                display: none;
            }

            .toggle-slider {
                width: 50px;
                height: 24px;
                background: #ccc;
                border-radius: 12px;
                position: relative;
                margin-right: 12px;
                transition: all 0.3s ease;
            }

            .toggle-slider::before {
                content: '';
                position: absolute;
                width: 20px;
                height: 20px;
                border-radius: 50%;
                background: white;
                top: 2px;
                left: 2px;
                transition: all 0.3s ease;
                box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
            }

            .toggle-label input[type="checkbox"]:checked+.toggle-slider {
                background: #3498db;
            }

            .toggle-label input[type="checkbox"]:checked+.toggle-slider::before {
                transform: translateX(26px);
            }

            .komponente-footer {
                margin-top: 15px;
                padding-top: 15px;
                border-top: 1px solid #ecf0f1;
                text-align: center;
                color: #7f8c8d;
            }

            .komponenten-message {
                margin-top: 20px;
                padding: 15px;
                border-radius: 8px;
                font-weight: 600;
                text-align: center;
                display: none;
            }

            .komponenten-message.success {
                background: #d4edda;
                color: #155724;
                border: 1px solid #c3e6cb;
            }

            .komponenten-message.error {
                background: #f8d7da;
                color: #721c24;
                border: 1px solid #f5c6cb;
            }

            .save-area {
                text-align: center;
                margin: 30px 0 20px 0;
                padding: 20px;
                background: #f8f9fa;
                border-radius: 10px;
            }

            .btn {
                display: inline-flex;
                align-items: center;
                padding: 12px 24px;
                border: none;
                border-radius: 8px;
                font-size: 16px;
                font-weight: 600;
                cursor: pointer;
                transition: all 0.3s ease;
                text-decoration: none;
            }

            .btn-primary {
                background: linear-gradient(135deg, #3498db, #2980b9);
                color: white;
            }

            .btn-primary:hover:not(:disabled) {
                background: linear-gradient(135deg, #2980b9, #1c5985);
                transform: translateY(-2px);
                box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
            }

            .btn:disabled {
                opacity: 0.5;
                cursor: not-allowed;
                transform: none;
            }

            .unsaved-indicator {
                margin-left: 15px;
                color: #e74c3c;
                font-weight: 600;
                animation: pulse 2s infinite;
            }

            @keyframes pulse {
                0% {
                    opacity: 1;
                }

                50% {
                    opacity: 0.5;
                }

                100% {
                    opacity: 1;
                }
            }

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

                .komponente-header {
                    flex-direction: column;
                    align-items: flex-start;
                    gap: 10px;
                }
            }

/* --- Block 2 --- */
/* Admin Bilder Quick View */
        .admin-bilder-quick-view {
            display: flex;
            gap: 8px;
            margin-bottom: 20px;
            padding: 15px;
            background: #f9f9f9;
            border-radius: 8px;
            flex-wrap: wrap;
        }

        .admin-quick-thumbnail {
            width: 60px;
            height: 60px;
            border-radius: 6px;
            overflow: hidden;
            cursor: pointer;
            position: relative;
            border: 2px solid #ddd;
            transition: all 0.3s ease;
        }

        .admin-quick-thumbnail:hover {
            border-color: #0073aa;
            transform: scale(1.1);
        }

        .admin-quick-thumbnail img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        .quick-overlay {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.7);
            display: flex;
            align-items: center;
            justify-content: center;
            opacity: 0;
            transition: opacity 0.3s ease;
        }

        .admin-quick-thumbnail:hover .quick-overlay {
            opacity: 1;
        }

        .quick-icon {
            color: white;
            font-size: 18px;
        }

        /* Admin Bilder Galerie */
        .admin-bilder-galerie {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
            gap: 25px;
            margin: 20px 0;
        }

        .admin-bild-item {
            background: white;
            border: 1px solid #ddd;
            border-radius: 12px;
            padding: 20px;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
            transition: transform 0.3s ease;
        }

        .admin-bild-item:hover {
            transform: translateY(-3px);
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
        }

        .admin-bild-thumbnail {
            position: relative;
            margin-bottom: 15px;
            border-radius: 8px;
            overflow: hidden;
            cursor: pointer;
            height: 200px;
            border: 2px solid #eee;
        }

        .admin-bild-thumbnail img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: transform 0.3s ease;
        }

        .admin-bild-thumbnail:hover img {
            transform: scale(1.05);
        }

        .admin-bild-overlay {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.7);
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            opacity: 0;
            transition: opacity 0.3s ease;
            color: white;
        }

        .admin-bild-thumbnail:hover .admin-bild-overlay {
            opacity: 1;
        }

        .admin-bild-icon {
            font-size: 32px;
            margin-bottom: 8px;
        }

        .admin-zoom-text {
            font-size: 14px;
            font-weight: 600;
        }

        .admin-bild-info {
            margin-bottom: 15px;
        }

        .admin-bild-title {
            margin-bottom: 10px;
            padding-bottom: 8px;
            border-bottom: 1px solid #eee;
        }

        .admin-bild-details {
            display: grid;
            gap: 6px;
        }

        .admin-detail-row {
            display: flex;
            justify-content: space-between;
            font-size: 13px;
        }

        .admin-detail-label {
            font-weight: 600;
            color: #555;
        }

        .admin-detail-value {
            color: #777;
        }

        .admin-bild-aktionen {
            display: flex;
            gap: 8px;
            flex-wrap: wrap;
        }

        .admin-bild-aktionen .button {
            flex: 1;
            min-width: 80px;
            text-align: center;
            font-size: 12px;
            padding: 8px 12px;
        }

        /* Admin Vollbild Modal */
        .admin-fullsize-modal {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.95);
            z-index: 100000;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 20px;
        }

        .admin-fullsize-content {
            background: white;
            border-radius: 10px;
            max-width: 95vw;
            max-height: 95vh;
            overflow: hidden;
            display: flex;
            flex-direction: column;
        }

        .admin-fullsize-header {
            background: #0073aa;
            color: white;
            padding: 15px 20px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .admin-fullsize-header h3 {
            margin: 0;
            font-size: 1.1em;
        }

        .admin-fullsize-nav {
            display: flex;
            align-items: center;
            gap: 15px;
        }

        .admin-nav-btn {
            background: rgba(255, 255, 255, 0.2);
            border: none;
            color: white;
            padding: 8px 12px;
            border-radius: 5px;
            cursor: pointer;
            transition: background 0.3s ease;
        }

        .admin-nav-btn:hover:not(:disabled) {
            background: rgba(255, 255, 255, 0.3);
        }

        .admin-nav-btn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }

        .admin-fullsize-controls {
            display: flex;
            gap: 10px;
        }

        .admin-control-btn,
        .admin-modal-close {
            background: rgba(255, 255, 255, 0.2);
            border: none;
            color: white;
            padding: 8px 12px;
            border-radius: 5px;
            cursor: pointer;
            transition: background 0.3s ease;
        }

        .admin-control-btn:hover,
        .admin-modal-close:hover {
            background: rgba(255, 255, 255, 0.3);
        }

        .admin-fullsize-body {
            background: #000;
            display: flex;
            align-items: center;
            justify-content: center;
            position: relative;
            max-height: 80vh;
            overflow: hidden;
        }

        .admin-fullsize-body img {
            max-width: 100%;
            max-height: 80vh;
            object-fit: contain;
        }

        #admin-fullsize-description {
            position: absolute;
            bottom: 20px;
            left: 20px;
            right: 20px;
            background: rgba(0, 0, 0, 0.8);
            color: white;
            padding: 10px 15px;
            border-radius: 5px;
            text-align: center;
            font-style: italic;
        }

        .admin-fullsize-footer {
            background: #f1f1f1;
            padding: 10px 20px;
            text-align: center;
            font-size: 14px;
            color: #666;
        }

        /* Responsive */
        @media (max-width: 768px) {
            .admin-bilder-galerie {
                grid-template-columns: 1fr;
            }

            .admin-fullsize-header {
                flex-direction: column;
                gap: 10px;
                text-align: center;
            }

            .admin-bild-aktionen {
                flex-direction: column;
            }

            .admin-bild-aktionen .button {
                flex: none;
            }
        }

/* --- Block 3 --- */
/* === NEUE STYLES FÜR ERLEDIGT-STATUS === */
            .erledigt-status-section {
                background: linear-gradient(135deg, #f8f9fa, #e9ecef);
                border: 2px solid #dee2e6;
                border-radius: 12px;
                padding: 25px;
                margin: 20px 0 30px 0;
                box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
            }

            .erledigt-toggle-admin {
                display: flex;
                align-items: center;
                margin-bottom: 20px;
            }

            .erledigt-toggle-label {
                display: flex;
                align-items: center;
                cursor: pointer;
                font-size: 18px;
                font-weight: 600;
            }

            .erledigt-toggle-label input[type="checkbox"] {
                display: none;
            }

            .admin-erledigt-slider {
                position: relative;
                width: 60px;
                height: 30px;
                background-color: #ccc;
                border-radius: 15px;
                margin-right: 15px;
                transition: .4s;
                cursor: pointer;
            }

            .admin-erledigt-slider:before {
                position: absolute;
                content: "";
                height: 24px;
                width: 24px;
                left: 3px;
                top: 3px;
                background-color: white;
                border-radius: 50%;
                transition: .4s;
                box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
            }

            .erledigt-toggle-label input:checked+.admin-erledigt-slider {
                background-color: #27ae60;
            }

            .erledigt-toggle-label input:checked+.admin-erledigt-slider:before {
                transform: translateX(30px);
            }

            .erledigt-text {
                font-size: 18px;
                font-weight: 600;
                color: #2c3e50;
                transition: color 0.3s ease;
            }

            .erledigt-toggle-label input:checked~.erledigt-text {
                color: #27ae60;
            }

            .erledigt-details-admin {
                border-top: 1px solid #dee2e6;
                padding-top: 20px;
            }

            .erledigt-info-card {
                background: white;
                border: 1px solid #dee2e6;
                border-radius: 8px;
                padding: 20px;
                box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
            }

            .erledigt-info-card h4 {
                margin: 0 0 15px 0;
                color: #27ae60;
                font-size: 1.1em;
            }

            .erledigt-info-card p {
                margin: 8px 0;
                color: #495057;
            }

            /* Bestehende Admin-Styles für andere Sektionen */
            .admin-detail-section {
                background: #f8f9fa;
                border: 1px solid #ddd;
                border-radius: 8px;
                padding: 20px;
                margin: 20px 0;
            }

            .admin-detail-section h3 {
                margin: 0 0 20px 0;
                color: #2c3e50;
                border-bottom: 2px solid #3498db;
                padding-bottom: 10px;
            }

            .admin-arbeitsplan-card {
                background: white;
                border-radius: 8px;
                margin-bottom: 15px;
                padding: 15px;
                box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
            }

            .admin-arbeitsplan-header {
                display: flex;
                justify-content: space-between;
                align-items: center;
                margin-bottom: 15px;
                padding-bottom: 10px;
                border-bottom: 1px solid #ecf0f1;
            }

            .admin-arbeitsplan-header h4 {
                margin: 0;
                color: #2c3e50;
                font-size: 1.2em;
            }

            .admin-progress-indicator {
                display: flex;
                align-items: center;
                gap: 10px;
            }

            .admin-progress-text {
                font-weight: 600;
                color: #34495e;
                min-width: 40px;
            }

            .admin-progress-bar {
                width: 120px;
                height: 10px;
                background: #ecf0f1;
                border-radius: 5px;
                overflow: hidden;
            }

            .admin-progress-fill {
                height: 100%;
                border-radius: 5px;
                transition: width 0.3s ease;
            }

            .admin-progress-percent {
                font-size: 12px;
                color: #7f8c8d;
                min-width: 35px;
            }

            .admin-arbeitsplan-content {
                padding: 0;
            }

            .admin-topic-section {
                margin-bottom: 15px;
            }

            .admin-topic-section h5 {
                margin: 0 0 10px 0;
                color: #34495e;
                font-size: 1.1em;
                padding-bottom: 5px;
                border-bottom: 1px solid #ecf0f1;
            }

            .admin-subtopic-list {
                display: grid;
                gap: 8px;
            }

            .admin-subtopic-item {
                display: flex;
                align-items: center;
                gap: 10px;
                padding: 8px 12px;
                border-radius: 5px;
                background: #f8f9fa;
            }

            .admin-subtopic-item.completed {
                background: #e8f5e8;
                color: #27ae60;
            }

            .admin-subtopic-item.incomplete {
                background: #ffeaea;
                color: #e74c3c;
            }

            .admin-subtopic-status {
                font-size: 16px;
                flex-shrink: 0;
            }

            .admin-subtopic-text {
                flex: 1;
                font-weight: 500;
            }

            .admin-completed-time {
                font-size: 11px;
                color: #7f8c8d;
                background: rgba(39, 174, 96, 0.1);
                padding: 2px 6px;
                border-radius: 8px;
            }

            /* Bestehende Bilder-Styles */
            .admin-bilder-galerie {
                display: grid;
                grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
                gap: 20px;
                margin: 20px 0;
            }

            .admin-bild-item {
                background: #f9f9f9;
                border: 1px solid #ddd;
                border-radius: 8px;
                padding: 15px;
                display: flex;
                flex-direction: column;
                gap: 10px;
            }

            .admin-bild-thumbnail {
                text-align: center;
            }

            .admin-bild-thumbnail img {
                max-width: 100%;
                max-height: 200px;
                border-radius: 6px;
                cursor: pointer;
                border: 2px solid #ddd;
                transition: border-color 0.3s ease;
            }

            .admin-bild-thumbnail img:hover {
                border-color: #0073aa;
            }

            .admin-bild-info {
                text-align: center;
                color: #666;
            }

            .admin-bild-aktionen {
                display: flex;
                gap: 10px;
                justify-content: center;
            }

            .admin-image-modal {
                position: fixed;
                top: 0;
                left: 0;
                width: 100%;
                height: 100%;
                background: rgba(0, 0, 0, 0.8);
                display: flex;
                justify-content: center;
                align-items: center;
                z-index: 100000;
            }

            .admin-image-modal-content {
                background: white;
                border-radius: 8px;
                max-width: 90vw;
                max-height: 90vh;
                overflow: hidden;
            }

            .admin-image-modal-header {
                background: #0073aa;
                color: white;
                padding: 15px 20px;
                display: flex;
                justify-content: space-between;
                align-items: center;
            }

            .admin-image-modal-header h3 {
                margin: 0;
            }

            .admin-modal-close {
                background: none;
                border: none;
                color: white;
                font-size: 20px;
                cursor: pointer;
                padding: 5px;
            }

            .admin-image-modal-body {
                padding: 20px;
                text-align: center;
                max-height: 70vh;
                overflow-y: auto;
            }

            .admin-image-modal-body img {
                max-width: 100%;
                max-height: 60vh;
                border-radius: 6px;
            }

            .admin-image-modal-body p {
                margin-top: 15px;
                color: #666;
                font-style: italic;
            }

            @media (max-width: 768px) {
                .admin-arbeitsplan-header {
                    flex-direction: column;
                    gap: 10px;
                    text-align: center;
                }

                .admin-progress-indicator {
                    justify-content: center;
                }

                .erledigt-toggle-label {
                    flex-direction: column;
                    gap: 10px;
                    text-align: center;
                }

                .admin-erledigt-slider {
                    margin-right: 0;
                    margin-bottom: 10px;
                }
            }

/* --- Block 4 --- */
.arbeitsplan-actions {
                margin: 20px 0;
            }

            .no-arbeitsplaene-admin {
                text-align: center;
                padding: 60px 20px;
                background: #f8f9fa;
                border-radius: 10px;
                margin: 20px 0;
            }

            .status-active {
                color: #27ae60;
                font-weight: 600;
            }

            .status-inactive {
                color: #e74c3c;
                font-weight: 600;
            }

/* --- Block 5 --- */
.topic-editor {
            background: #f8f9fa;
            border: 1px solid #ddd;
            border-radius: 8px;
            padding: 20px;
            margin-bottom: 20px;
        }

        .topic-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 15px;
            padding-bottom: 10px;
            border-bottom: 1px solid #ddd;
        }

        .topic-header h3 {
            margin: 0;
            color: #2c3e50;
        }

        .subtopics-container {
            margin-top: 20px;
            padding-top: 15px;
            border-top: 1px solid #eee;
        }

        .subtopics-container h4 {
            margin: 0 0 15px 0;
            color: #34495e;
        }

        .subtopic-editor {
            margin-bottom: 10px;
        }

        .subtopic-row {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .subtopic-row input[type="text"] {
            flex: 1;
        }

        .remove-topic,
        .remove-subtopic {
            color: #e74c3c;
            text-decoration: none;
            font-size: 14px;
        }

        .remove-topic:hover,
        .remove-subtopic:hover {
            color: #c0392b;
        }

        .custom-zeitraum {
            background: #f0f0f0;
            padding: 10px;
            border-radius: 5px;
            margin-top: 10px;
        }

        .custom-zeitraum label {
            font-weight: normal;
        }

        .zeitraum-typ-select {
            margin-bottom: 10px;
        }

/* --- Block 6 --- */
.admin-entry-editor { max-width: 1400px; }
            .editor-grid { display: grid; grid-template-columns: 1fr 400px; gap: 30px; margin-top: 20px; }
            @media (max-width: 1200px) { .editor-grid { grid-template-columns: 1fr; } }
            .editor-section { background: #fff; border: 1px solid #ccd0d4; border-radius: 8px; padding: 20px; margin-bottom: 20px; }
            .editor-section h3 { margin: 0 0 15px 0; padding-bottom: 10px; border-bottom: 1px solid #eee; font-size: 16px; }
            .editor-section h4 { margin: 15px 0 10px 0; font-size: 14px; }
            .editor-section h5 { margin: 10px 0 5px 0; font-size: 13px; color: #666; }
            .form-row { display: flex; gap: 20px; flex-wrap: wrap; }
            .form-group { flex: 1; min-width: 150px; }
            .form-group.full-width { flex: 100%; }
            .form-group label { display: block; margin-bottom: 5px; font-weight: 600; font-size: 13px; }
            .form-group input, .form-group select, .form-group textarea { width: 100%; padding: 8px 12px; border: 1px solid #8c8f94; border-radius: 4px; font-size: 14px; box-sizing: border-box; }
            .form-group textarea { resize: vertical; }
            .status-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
            .status-option { display: flex; align-items: center; gap: 8px; padding: 12px; border: 2px solid #ddd; border-radius: 8px; cursor: pointer; transition: all 0.2s; }
            .status-option:hover { border-color: #2271b1; }
            .status-option.selected { border-color: #2271b1; background: #f0f6fc; }
            .status-option input { display: none; }
            .status-icon { font-size: 20px; }
            .checkbox-label { display: flex; align-items: center; gap: 10px; cursor: pointer; padding: 10px; border-radius: 6px; transition: background 0.2s; }
            .checkbox-label:hover { background: #f0f0f1; }
            .checkbox-label input[type="checkbox"] { width: 18px; height: 18px; }
            .erledigt-toggle { background: #f0fff0; border: 1px solid #27ae60; }
            .erledigt-info { margin: 10px 0 0 0; font-size: 12px; color: #666; }
            .korn-eintrag-card { background: #f9f9f9; border: 1px solid #ddd; border-radius: 8px; padding: 15px; margin-bottom: 15px; }
            .korn-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
            .korn-nummer { font-weight: bold; color: #666; }
            .remove-korn-btn { background: #dc3545; color: white; border: none; border-radius: 50%; width: 24px; height: 24px; cursor: pointer; font-size: 16px; line-height: 1; }
            .korn-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
            .komponenten-list, .arbeitsplaene-list { max-height: 300px; overflow-y: auto; }
            .komponente-option, .arbeitsplan-option { display: flex; flex-direction: column; padding: 10px; margin-bottom: 6px; border: 1px solid #ddd; border-radius: 6px; cursor: pointer; transition: all 0.2s; }
            .komponente-option:hover, .arbeitsplan-option:hover { background: #f5f5f5; }
            .komponente-option.selected, .arbeitsplan-option.selected { background: #f0f6fc; border-color: #2271b1; }
            .komponente-option input[type="checkbox"], .arbeitsplan-option input[type="checkbox"] { 
                position: absolute; 
                right: 10px; 
                top: 50%; 
                transform: translateY(-50%);
                width: 18px; 
                height: 18px; 
                cursor: pointer;
            }
            .komponente-option, .arbeitsplan-option { position: relative; padding-right: 40px; }
            .komp-status { font-size: 11px; color: #666; margin-top: 2px; }
            .no-komponenten, .no-arbeitsplaene { color: #666; font-style: italic; font-size: 13px; padding: 10px; background: #f9f9f9; border-radius: 4px; }
            .no-komponenten a, .no-arbeitsplaene a { color: #2271b1; }
            .arbeitsplan-option { border-left-width: 4px; }
            .ap-name, .komp-name { font-weight: 600; }
            .ap-desc { font-size: 12px; color: #666; margin-top: 4px; }
            .existing-images-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 10px; }
            .existing-image-item { position: relative; background: #f5f5f5; border: 1px solid #ddd; border-radius: 8px; overflow: hidden; }
            .existing-image-item .image-preview { height: 80px; display: flex; align-items: center; justify-content: center; background: #eee; }
            .existing-image-item .image-preview img { max-width: 100%; max-height: 100%; object-fit: cover; }
            .existing-image-item .file-icon { font-size: 36px; }
            .existing-image-item .image-info { padding: 8px; font-size: 11px; }
            .existing-image-item .image-name { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
            .existing-image-item .image-size { color: #666; }
            .delete-image-btn { position: absolute; top: 4px; right: 4px; background: rgba(220, 53, 69, 0.9); color: white; border: none; border-radius: 50%; width: 22px; height: 22px; cursor: pointer; font-size: 14px; line-height: 1; opacity: 0; transition: opacity 0.2s; }
            .existing-image-item:hover .delete-image-btn { opacity: 1; }
            .existing-image-item.deleting { opacity: 0.5; pointer-events: none; }
            .upload-area { border: 2px dashed #ccc; border-radius: 8px; padding: 20px; text-align: center; transition: all 0.2s; }
            .upload-area:hover, .upload-area.dragover { border-color: #2271b1; background: #f0f6fc; }
            .upload-placeholder .upload-icon { font-size: 32px; display: block; margin-bottom: 10px; }
            .new-images-preview { display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 10px; margin-top: 15px; }
            .new-image-item { position: relative; background: #f5f5f5; border-radius: 6px; padding: 8px; text-align: center; }
            .new-image-item img { max-width: 100%; max-height: 60px; border-radius: 4px; }
            .new-image-item .file-icon { font-size: 32px; }
            .new-image-item .remove-new-image { position: absolute; top: -6px; right: -6px; background: #dc3545; color: white; border: none; border-radius: 50%; width: 20px; height: 20px; cursor: pointer; font-size: 12px; }
            .editor-actions { margin-top: 30px; padding: 20px; background: #f0f0f1; border-radius: 8px; display: flex; justify-content: flex-end; gap: 15px; }
            .no-images { color: #666; font-style: italic; }
            .description { font-size: 12px; color: #666; margin-top: 10px; }
            #edit-message { padding: 12px 20px; }
            #edit-message.notice-success { border-left-color: #00a32a; background: #f0fff0; }
            #edit-message.notice-error { border-left-color: #d63638; background: #fff0f0; }

/* --- Block 7 --- */
.filter-controls {
                background: #f8f9fa;
                border: 1px solid #ddd;
                border-radius: 8px;
                padding: 20px;
                margin: 20px 0;
                display: flex;
                align-items: center;
                gap: 15px;
                flex-wrap: wrap;
            }

            .filter-controls label {
                font-weight: 600;
                margin-right: 5px;
            }

            .filter-controls input[type="date"] {
                padding: 6px 10px;
                border: 1px solid #ddd;
                border-radius: 4px;
            }

            .arbeitsplan-matrix-container {
                overflow-x: auto;
                border: 1px solid #ddd;
                border-radius: 8px;
                margin: 20px 0;
                background: white;
            }

            .arbeitsplan-matrix {
                width: 100%;
                border-collapse: separate;
                border-spacing: 1px;
                background: #ecf0f1;
                min-width: 800px;
            }

            .arbeitsplan-matrix th,
            .arbeitsplan-matrix td {
                background: white;
                padding: 10px;
                text-align: center;
                vertical-align: middle;
            }

            .datum-column {
                min-width: 120px;
                background: #34495e !important;
                color: white;
                font-weight: 600;
            }

            .plan-column {
                min-width: 140px;
                max-width: 160px;
                background: #f8f9fa !important;
            }

            .plan-header {
                text-align: center;
            }

            .plan-name {
                font-weight: 600;
                font-size: 14px;
                margin-bottom: 8px;
                color: #2c3e50;
            }

            .subtopic-headers {
                display: flex;
                justify-content: space-around;
                flex-wrap: wrap;
                gap: 2px;
            }

            .subtopic-header {
                font-size: 10px;
                color: #7f8c8d;
                background: #ecf0f1;
                padding: 2px 4px;
                border-radius: 3px;
                min-width: 25px;
            }

            .datum-cell {
                background: #34495e !important;
                color: white;
            }

            .datum-info {
                text-align: center;
            }

            .datum-text {
                font-weight: 600;
                font-size: 14px;
            }

            .wochentag {
                font-size: 12px;
                opacity: 0.8;
            }

            .eintrag-count {
                font-size: 11px;
                opacity: 0.7;
                margin-top: 2px;
            }

            .plan-cell {
                padding: 8px !important;
            }

            .subtopic-status-grid {
                display: flex;
                justify-content: center;
                gap: 2px;
                margin-bottom: 8px;
                flex-wrap: wrap;
            }

            .subtopic-status {
                width: 12px;
                height: 12px;
                border-radius: 2px;
                border: 1px solid rgba(0, 0, 0, 0.1);
            }

            .subtopic-status.completed {
                background: #27ae60;
            }

            .subtopic-status.incomplete {
                background: #e74c3c;
            }

            .subtopic-status.not-used {
                background: #bdc3c7;
            }

            .plan-summary {
                cursor: pointer;
                padding: 4px 8px;
                border-radius: 4px;
                transition: background 0.2s;
                font-weight: 600;
            }

            .plan-summary:hover {
                background: rgba(52, 152, 219, 0.1);
            }

            .completed-count {
                color: #27ae60;
            }

            .total-count {
                color: #7f8c8d;
            }

            .no-plan {
                color: #bdc3c7;
                font-style: italic;
            }

            .no-data {
                text-align: center;
                padding: 40px;
                color: #7f8c8d;
                font-style: italic;
            }

            .matrix-legende {
                background: #f8f9fa;
                border: 1px solid #ddd;
                border-radius: 8px;
                padding: 20px;
                margin: 20px 0;
            }

            .matrix-legende h3 {
                margin: 0 0 15px 0;
                color: #2c3e50;
            }

            .legende-items {
                display: flex;
                gap: 20px;
                flex-wrap: wrap;
            }

            .legende-item {
                display: flex;
                align-items: center;
                gap: 8px;
            }

            .status-example {
                width: 16px;
                height: 16px;
                border-radius: 3px;
                border: 1px solid rgba(0, 0, 0, 0.1);
            }

            .status-example.completed {
                background: #27ae60;
            }

            .status-example.incomplete {
                background: #e74c3c;
            }

            .status-example.not-used {
                background: #bdc3c7;
            }

            .no-arbeitsplaene-notice {
                text-align: center;
                padding: 60px 20px;
                background: #f8f9fa;
                border-radius: 10px;
                margin: 20px 0;
            }

            @media (max-width: 768px) {
                .filter-controls {
                    flex-direction: column;
                    align-items: flex-start;
                }

                .arbeitsplan-matrix {
                    min-width: 1000px;
                }

                .subtopic-headers {
                    display: none;
                }

                .legende-items {
                    flex-direction: column;
                }
            }

/* --- Block 8 --- */
/* === ERWEITERTE ADMIN STYLES === */
            .eintraege-stats {
                display: grid;
                grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
                gap: 20px;
                margin: 20px 0 30px 0;
            }

            .stat-card {
                background: white;
                padding: 25px;
                border-radius: 10px;
                text-align: center;
                border-left: 4px solid;
                box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
                transition: transform 0.3s ease;
            }

            .stat-card:hover {
                transform: translateY(-3px);
            }

            .stat-card.total {
                border-left-color: #3498db;
            }

            .stat-card.offen {
                border-left-color: #e74c3c;
            }

            .stat-card.erledigt {
                border-left-color: #27ae60;
            }

            .stat-card.mahlbetrieb {
                border-left-color: #f39c12;
            }

            .stat-number {
                font-size: 2.5em;
                font-weight: bold;
                margin-bottom: 8px;
            }

            .stat-card.total .stat-number {
                color: #3498db;
            }

            .stat-card.offen .stat-number {
                color: #e74c3c;
            }

            .stat-card.erledigt .stat-number {
                color: #27ae60;
            }

            .stat-card.mahlbetrieb .stat-number {
                color: #f39c12;
            }

            .stat-label {
                font-size: 14px;
                color: #7f8c8d;
                text-transform: uppercase;
                letter-spacing: 1px;
            }

            /* Filter Controls */
            .filter-controls-extended {
                background: white;
                border: 1px solid #ddd;
                border-radius: 8px;
                padding: 25px;
                margin: 20px 0;
                box-shadow: 0 2px 8px rgba(0,0,0,0.1);
            }

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

            .filter-group {
                display: flex;
                flex-direction: column;
            }

            .filter-group label {
                font-weight: 600;
                color: #2c3e50;
                margin-bottom: 5px;
                font-size: 14px;
            }

            .filter-group select {
                padding: 8px 12px;
                border: 2px solid #e9ecef;
                border-radius: 5px;
                font-size: 14px;
                transition: border-color 0.3s ease;
                min-width: 200px;
                max-width: 300px;
            }

            .filter-group select:focus {
                outline: none;
                border-color: #3498db;
            }

            .filter-actions {
                display: flex;
                gap: 10px;
                justify-content: flex-start;
            }

            /* Tabellen-Styles */
            .entry-row.erledigt {
                background: #f8fff8;
                opacity: 0.8;
            }

            .entry-row.offen {
                background: white;
            }

            .erledigt-column {
                text-align: center;
                vertical-align: middle;
                width: 60px !important;
                min-width: 60px;
            }

            .erledigt-toggle {
                position: relative;
                display: inline-block;
                width: 44px;
                height: 22px;
            }

            .erledigt-toggle input {
                opacity: 0;
                width: 0;
                height: 0;
            }

            .erledigt-slider {
                position: absolute;
                cursor: pointer;
                top: 0;
                left: 0;
                right: 0;
                bottom: 0;
                background-color: #ccc;
                transition: .4s;
                border-radius: 22px;
            }

            .erledigt-slider:before {
                position: absolute;
                content: "";
                height: 16px;
                width: 16px;
                left: 3px;
                bottom: 3px;
                background-color: white;
                transition: .4s;
                border-radius: 50%;
            }

            .erledigt-toggle input:checked+.erledigt-slider {
                background-color: #27ae60;
            }

            .erledigt-toggle input:checked+.erledigt-slider:before {
                transform: translateX(22px);
            }

            .erledigt-info {
                min-width: 150px;
            }

            .erledigt-details {
                color: #27ae60;
                font-size: 12px;
            }

            .nicht-erledigt {
                color: #e74c3c;
                font-weight: 600;
                font-size: 12px;
            }

            .status-badge {
                padding: 4px 8px;
                border-radius: 4px;
                font-size: 12px;
                font-weight: bold;
                white-space: nowrap;
            }

            .status-einsatzbereit {
                background: #d4edda;
                color: #155724;
            }

            .status-eingeschraenkt_einsatzbereit {
                background: #fff3cd;
                color: #856404;
            }

            .status-nicht_einsatzbereit {
                background: #f8d7da;
                color: #721c24;
            }

            .type-badge {
                display: inline-block;
                padding: 4px 8px;
                border-radius: 12px;
                font-size: 11px;
                font-weight: bold;
                text-align: center;
                white-space: nowrap;
            }

            .type-Logbuch {
                background: #e3f2fd;
                color: #1565c0;
            }

            .type-Idee {
                background: #fff3e0;
                color: #ef6c00;
            }

            .type-ToDo {
                background: #e8f5e8;
                color: #2e7d32;
            }

            .type-Merkposten {
                background: #fce4ec;
                color: #c2185b;
            }

            .type-Handbuch {
                background: #f3e5f5;
                color: #7b1fa2;
            }

            .mahlbetrieb-badge {
                background: linear-gradient(135deg, #2ecc71, #27ae60);
                color: white;
                padding: 3px 8px;
                border-radius: 10px;
                font-size: 11px;
                font-weight: 600;
                white-space: nowrap;
            }

            .no-mahlbetrieb {
                color: #bdc3c7;
                font-style: italic;
            }

            .beschreibung-preview {
                color: #7f8c8d;
                line-height: 1.3;
            }

            /* Bulk Actions */
            .bulk-actions-panel {
                background: #f8f9fa;
                border: 1px solid #e9ecef;
                border-radius: 8px;
                padding: 20px;
                margin-top: 20px;
            }

            .bulk-actions-panel h3 {
                margin: 0 0 15px 0;
                color: #2c3e50;
                font-size: 1.1em;
            }

            .bulk-actions-controls {
                display: flex;
                gap: 10px;
                flex-wrap: wrap;
            }

            .button-delete {
                color: #e74c3c !important;
            }

            .button-delete:hover {
                background: #e74c3c !important;
                color: white !important;
            }

            /* Responsive Design */
            @media (max-width: 1200px) {
                .filter-row {
                    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
                }
            }

            @media (max-width: 768px) {
                .eintraege-stats {
                    grid-template-columns: repeat(2, 1fr);
                }

                .filter-row {
                    grid-template-columns: 1fr;
                }

                .bulk-actions-controls {
                    flex-direction: column;
                }

                .bulk-actions-controls .button {
                    width: 100%;
                    justify-content: center;
                }
            }

/* --- Block 9 --- */
.muehlentagebuch-login-status {
                        max-width: 400px;
                        margin: 20px auto;
                        background: linear-gradient(135deg, #2ecc71, #27ae60);
                        color: white;
                        padding: 25px;
                        border-radius: 12px;
                        text-align: center;
                        box-shadow: 0 4px 15px rgba(46, 204, 113, 0.3);
                    }

                    .muehlentagebuch-login-status p {
                        margin: 0 0 15px 0;
                        font-size: 16px;
                    }

                    .muehlentagebuch-login-status .button {
                        background: rgba(255, 255, 255, 0.2);
                        color: white;
                        border: 2px solid rgba(255, 255, 255, 0.3);
                        padding: 10px 20px;
                        border-radius: 8px;
                        font-weight: 600;
                        cursor: pointer;
                        transition: all 0.3s ease;
                    }

                    .muehlentagebuch-login-status .button:hover {
                        background: rgba(255, 255, 255, 0.3);
                        border-color: rgba(255, 255, 255, 0.5);
                    }

/* --- Block 10 --- */
.muehlentagebuch-login-form {
                    max-width: 400px;
                    margin: 20px auto;
                    background: white;
                    padding: 30px;
                    border-radius: 12px;
                    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
                }

                .muehlentagebuch-login-form h3 {
                    text-align: center;
                    color: #2c3e50;
                    margin: 0 0 25px 0;
                }

                .muehlentagebuch-login-form .form-group {
                    margin-bottom: 20px;
                }

                .muehlentagebuch-login-form label {
                    display: block;
                    margin-bottom: 8px;
                    font-weight: 600;
                    color: #34495e;
                }

                .muehlentagebuch-login-form input[type="text"],
                .muehlentagebuch-login-form input[type="password"] {
                    width: 100%;
                    padding: 12px 15px;
                    border: 2px solid #e9ecef;
                    border-radius: 8px;
                    font-size: 16px;
                    transition: all 0.3s ease;
                    background: #f8f9fa;
                    box-sizing: border-box;
                }

                .muehlentagebuch-login-form input:focus {
                    outline: none;
                    border-color: #3498db;
                    background: white;
                    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
                }

                .muehlentagebuch-login-form .button {
                    width: 100%;
                    padding: 12px 20px;
                    background: linear-gradient(135deg, #3498db, #2980b9);
                    color: white;
                    border: none;
                    border-radius: 8px;
                    font-size: 16px;
                    font-weight: 600;
                    cursor: pointer;
                    transition: all 0.3s ease;
                }

                .muehlentagebuch-login-form .button:hover:not(:disabled) {
                    background: linear-gradient(135deg, #2980b9, #1c5985);
                    transform: translateY(-2px);
                    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
                }

                .muehlentagebuch-login-form .button:disabled {
                    opacity: 0.7;
                    cursor: not-allowed;
                    transform: none;
                }

                #login-message {
                    margin-top: 15px;
                    padding: 12px;
                    border-radius: 6px;
                    text-align: center;
                    font-weight: 600;
                }

                #login-message.success {
                    background: #d4edda;
                    color: #155724;
                    border: 1px solid #c3e6cb;
                    display: block !important;
                }

                #login-message.error {
                    background: #f8d7da;
                    color: #721c24;
                    border: 1px solid #f5c6cb;
                    display: block !important;
                }

                .muehlentagebuch-login-form p {
                    text-align: center;
                    margin-top: 20px;
                    color: #7f8c8d;
                }

                /* Responsive Design */
                @media (max-width: 768px) {
                    .muehlentagebuch-login-form {
                        margin: 10px;
                        padding: 20px;
                    }
                }

/* --- Block 11 --- */
.dashboard-card.dark {
            background: #2d2d3a;
            color: white;
            border-radius: 12px;
            padding: 20px;
            margin-top: 20px;
        }
        .dashboard-card.dark ul {
            list-style: none;
            padding-left: 0;
        }
        .dashboard-card.dark ul li {
            border-bottom: 1px solid #444;
            padding: 6px 0;
        }

/* --- Block 12 --- */
.abgelaufene-topics-card {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 25px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.abgelaufene-topics-card h4 {
    margin: 0 0 20px 0;
    font-size: 1.3em;
}

.topics-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-height: 400px;
    overflow-y: auto;
}

.topic-item {
    background: rgba(255,255,255,0.2);
    padding: 15px;
    border-radius: 10px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 15px;
    align-items: center;
    transition: all 0.3s ease;
}

.topic-item:hover {
    background: rgba(255,255,255,0.3);
    transform: translateX(5px);
}

.topic-item.kritisch {
    animation: pulse 2s infinite;
    background: rgba(255,255,255,0.3);
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

.topic-info strong {
    display: block;
    font-size: 1.1em;
    margin-bottom: 5px;
}

.topic-name {
    opacity: 0.9;
    font-size: 0.95em;
}

.topic-status {
    text-align: right;
    font-size: 0.9em;
}

.last-done {
    display: block;
    margin-bottom: 5px;
}

.overdue-badge {
    background: #c0392b;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.85em;
    font-weight: bold;
    margin-left: 5px;
}

.never-done {
    display: block;
    font-weight: bold;
    color: #ffecb3;
}

.zeitraum {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 0.85em;
}

.topics-actions {
    margin-top: 20px;
    text-align: center;
}

.topics-actions .btn {
    background: rgba(255,255,255,0.2);
    border: 2px solid white;
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 8px;
    display: inline-block;
    transition: all 0.3s ease;
}

.topics-actions .btn:hover {
    background: white;
    color: #e74c3c;
}

/* --- Block 13 --- */
/* Bestehende Dashboard-Styles erweitert */
            .muehlentagebuch-dashboard {
                max-width: 1200px;
                margin: 20px auto;
                padding: 0 20px;
            }

            .muehlentagebuch-dashboard h3 {
                text-align: center;
                color: #2c3e50;
                margin-bottom: 30px;
                font-size: 2em;
            }

            .muehlen-status-card {
                background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
                color: white;
                padding: 25px;
                border-radius: 15px;
                margin-bottom: 25px;
                box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
            }

            .muehlen-status-card h4 {
                margin: 0 0 20px 0;
                font-size: 1.3em;
                font-weight: 600;
            }

            .status-display {
                display: flex;
                align-items: center;
                gap: 20px;
                flex-wrap: wrap;
            }

            .status-indicator-large {
                display: flex;
                flex-direction: column;
                align-items: center;
                min-width: 180px;
                padding: 15px;
                border-radius: 12px;
                text-align: center;
                background: rgba(255, 255, 255, 0.2);
                border: 2px solid rgba(255, 255, 255, 0.3);
            }

            .status-icon {
                font-size: 2em;
                margin-bottom: 8px;
            }

            .status-text {
                font-weight: bold;
                font-size: 1.1em;
                letter-spacing: 1px;
            }

            .status-details {
                flex: 1;
                min-width: 300px;
            }

            .last-entry-info {
                margin-bottom: 10px;
            }

            .mahlbetrieb-indicator,
            .erledigt-indicator,
            .offen-indicator {
                background: rgba(255, 255, 255, 0.2);
                padding: 4px 8px;
                border-radius: 10px;
                font-size: 12px;
                margin-left: 10px;
            }

            .status-meta {
                font-size: 14px;
                opacity: 0.9;
            }

            /* === ERWEITERTE DASHBOARD-STATISTIKEN === */
            .dashboard-stats {
                display: grid;
                grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
                gap: 20px;
                margin: 20px 0;
            }

            .stat-box {
                background: white;
                padding: 25px;
                border-radius: 12px;
                text-align: center;
                border-left: 4px solid #3498db;
                box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
                transition: transform 0.3s ease;
            }

            .stat-box:hover {
                transform: translateY(-3px);
            }

            .stat-box.stat-heute {
                border-left-color: #f39c12;
            }

            .stat-box.stat-gesamt {
                border-left-color: #3498db;
            }

            .stat-box.stat-komponenten {
                border-left-color: #9b59b6;
            }

            .stat-box.stat-mahlbetrieb {
                border-left-color: #2ecc71;
            }

            .stat-box h4 {
                margin: 0 0 10px 0;
                color: #7f8c8d;
                font-size: 14px;
                text-transform: uppercase;
                letter-spacing: 1px;
            }

            .stat-number {
                font-size: 2.5em;
                font-weight: bold;
                margin: 10px 0;
            }

            .stat-box.stat-heute .stat-number {
                color: #f39c12;
            }

            .stat-box.stat-gesamt .stat-number {
                color: #3498db;
            }

            .stat-box.stat-komponenten .stat-number {
                color: #9b59b6;
            }

            .stat-box.stat-mahlbetrieb .stat-number {
                color: #2ecc71;
            }

            .stat-label {
                color: #95a5a6;
                font-size: 14px;
                margin-bottom: 5px;
            }

            /* === NEUE: Stat-Sublabel für zusätzliche Informationen === */
            .stat-sublabel {
                font-size: 11px;
                color: #7f8c8d;
                margin-top: 5px;
                line-height: 1.2;
            }

            .dashboard-actions {
                margin: 30px 0;
                text-align: center;
            }

            .dashboard-actions .button {
                display: inline-flex;
                align-items: center;
                padding: 15px 30px;
                margin: 0 10px;
                background: linear-gradient(135deg, #3498db, #2980b9);
                color: white;
                text-decoration: none;
                border-radius: 10px;
                font-weight: 600;
                transition: all 0.3s ease;
                border: none;
                cursor: pointer;
                font-size: 16px;
            }

            .dashboard-actions .button:hover {
                background: linear-gradient(135deg, #2980b9, #1c5985);
                color: white;
                transform: translateY(-2px);
                box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
            }

            .kommende-events-card {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    color: white;
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 25px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.kommende-events-card h4 {
    margin: 0 0 20px 0;
    font-size: 1.3em;
}

.events-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.event-item {
    background: rgba(255,255,255,0.2);
    padding: 15px;
    border-radius: 10px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 15px;
    align-items: center;
}

.event-date {
    font-weight: bold;
    font-size: 1.1em;
}

.event-countdown .today {
    background: #e74c3c;
    padding: 5px 10px;
    border-radius: 15px;
    font-weight: bold;
}

.event-countdown .tomorrow {
    background: #e67e22;
    padding: 5px 10px;
    border-radius: 15px;
    font-weight: bold;
}

.event-countdown .days {
    background: rgba(255,255,255,0.3);
    padding: 5px 10px;
    border-radius: 15px;
}

            #entry-form-container,
            #recent-entries-container {
                margin-top: 30px;
                background: white;
                border-radius: 12px;
                box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
            }

            @media (max-width: 768px) {
                .muehlentagebuch-dashboard {
                    padding: 0 10px;
                }

                .status-display {
                    flex-direction: column;
                    text-align: center;
                }

                .dashboard-stats {
                    grid-template-columns: repeat(2, 1fr);
                }

                .dashboard-actions .button {
                    display: block;
                    margin: 10px auto;
                    width: 200px;
                }
            }

/* --- Block 14 --- */
.muehlentagebuch-detail {
                max-width: 800px;
                margin: 20px auto;
                background: white;
                border-radius: 12px;
                overflow: hidden;
                box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
            }

            .detail-header {
                background: linear-gradient(135deg, #3498db, #2980b9);
                color: white;
                padding: 25px;
                display: flex;
                justify-content: space-between;
                align-items: center;
            }

            .detail-header h2 {
                margin: 0;
                font-size: 1.5em;
            }

            .detail-status {
                background: rgba(255, 255, 255, 0.2);
                padding: 8px 15px;
                border-radius: 20px;
                font-weight: 600;
            }

            .detail-content {
                padding: 30px;
            }

            .detail-section {
                margin-bottom: 30px;
                padding-bottom: 20px;
                border-bottom: 1px solid #ecf0f1;
            }

            .detail-section:last-child {
                border-bottom: none;
            }

            .detail-section h3 {
                color: #2c3e50;
                margin-bottom: 15px;
                font-size: 1.2em;
            }

            .long-description {
                margin-top: 15px;
                padding: 15px;
                background: #f8f9fa;
                border-radius: 8px;
                line-height: 1.6;
            }

            .korn-grid {
                display: grid;
                grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
                gap: 15px;
            }

            .korn-item {
                background: #e8f5e8;
                border: 2px solid #27ae60;
                border-radius: 10px;
                padding: 15px;
                text-align: center;
            }

            .korn-art {
                font-weight: bold;
                font-size: 1.1em;
                color: #27ae60;
            }

            .korn-menge {
                font-size: 1.5em;
                font-weight: bold;
                margin: 5px 0;
            }

            .korn-sichter {
                background: #3498db;
                color: white;
                padding: 2px 8px;
                border-radius: 10px;
                font-size: 12px;
                margin: 5px 0;
            }

            .korn-notiz {
                font-size: 12px;
                color: #7f8c8d;
                margin-top: 5px;
            }

            .komponenten-list {
                display: flex;
                flex-wrap: wrap;
                gap: 10px;
            }

            .komponente-tag {
                background: #3498db;
                color: white;
                padding: 5px 12px;
                border-radius: 15px;
                font-size: 14px;
            }

            .detail-meta {
                background: #f8f9fa;
                padding: 15px;
                border-radius: 8px;
                color: #7f8c8d;
            }

            .detail-meta p {
                margin: 5px 0;
            }

/* --- Block 15 --- */
.muehlentagebuch-entry-form {
            max-width: 800px;
            margin: 20px auto;
            background: white;
            border-radius: 15px;
            box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
            overflow: hidden;
        }

        .muehlentagebuch-entry-form h3 {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            margin: 0;
            padding: 25px 30px;
            font-size: 1.5em;
            font-weight: 600;
        }

        .entry-form-modern {
            padding: 30px;
        }

        .form-section {
            margin-bottom: 30px;
            padding-bottom: 25px;
            border-bottom: 1px solid #ecf0f1;
        }

        .form-section:last-of-type {
            border-bottom: none;
        }

        .form-section h4 {
            color: #2c3e50;
            margin: 0 0 20px 0;
            font-size: 1.2em;
            font-weight: 600;
            padding-bottom: 8px;
            border-bottom: 2px solid #3498db;
            display: inline-block;
        }

        .form-row {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 20px;
        }

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

        .form-group label {
            display: block;
            margin-bottom: 8px;
            font-weight: 600;
            color: #34495e;
        }

        .form-group input,
        .form-group select,
        .form-group textarea {
            width: 100%;
            padding: 12px 15px;
            border: 2px solid #e9ecef;
            border-radius: 8px;
            font-size: 16px;
            transition: all 0.3s ease;
            background: #f8f9fa;
        }

        .form-group input:focus,
        .form-group select:focus,
        .form-group textarea:focus {
            outline: none;
            border-color: #3498db;
            background: white;
            box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
        }

        .form-group input:required:invalid {
            border-color: #e74c3c;
        }

        .form-group input:required:valid {
            border-color: #27ae60;
        }

        .description {
            font-size: 12px;
            color: #7f8c8d;
            margin-top: 5px;
        }

        /* Checkbox Styling */
        .checkbox-group {
            margin-bottom: 15px;
        }

        .checkbox-label {
            display: flex;
            align-items: center;
            cursor: pointer;
            font-weight: 500;
            padding: 10px;
            border-radius: 8px;
            transition: background-color 0.3s ease;
        }

        .checkbox-label:hover {
            background: #f8f9fa;
        }

        .checkbox-label input[type="checkbox"] {
            display: none;
        }

        .checkmark {
            width: 20px;
            height: 20px;
            border: 2px solid #bdc3c7;
            border-radius: 4px;
            margin-right: 12px;
            position: relative;
            transition: all 0.3s ease;
        }

        .checkbox-label input[type="checkbox"]:checked+.checkmark {
            background: #3498db;
            border-color: #3498db;
        }

        .checkbox-label input[type="checkbox"]:checked+.checkmark::after {
            content: "✓";
            position: absolute;
            top: -2px;
            left: 3px;
            color: white;
            font-size: 14px;
            font-weight: bold;
        }

        /* Korn-Einträge */
        .korn-eintrag-card {
            background: #e8f5e8;
            border: 2px solid #27ae60;
            border-radius: 12px;
            padding: 20px;
            margin-bottom: 15px;
            position: relative;
        }

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

        .korn-header h5 {
            margin: 0;
            color: #27ae60;
            font-size: 1.1em;
        }

        .remove-korn-btn {
            background: #e74c3c;
            color: white;
            border: none;
            border-radius: 50%;
            width: 30px;
            height: 30px;
            cursor: pointer;
            font-size: 18px;
            font-weight: bold;
        }

        .korn-form-row {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 15px;
            margin-bottom: 15px;
        }

        .korn-form-row:last-child {
            margin-bottom: 0;
        }

        /* Komponenten Grid */
        .komponenten-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 15px;
        }

        .komponente-item {
            background: #f8f9fa;
            border: 1px solid #e9ecef;
            border-radius: 8px;
            padding: 15px;
            transition: all 0.3s ease;
        }

        .komponente-item:hover {
            background: #e9ecef;
            border-color: #3498db;
        }

        /* Upload Area */
        .upload-area {
            border: 2px dashed #bdc3c7;
            border-radius: 8px;
            padding: 20px;
            text-align: center;
            transition: all 0.3s ease;
            background: #f8f9fa;
            cursor: pointer;
        }

        .upload-area:hover {
            border-color: #3498db;
            background: #e8f4f8;
        }

        .upload-area.dragover {
            background: #e3f2fd;
            border-color: #2196f3;
            box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
        }

        .upload-placeholder {
            padding: 20px;
        }

        .upload-icon {
            font-size: 3em;
            margin-bottom: 10px;
            opacity: 0.7;
        }

        .upload-placeholder p {
            margin: 10px 0;
            color: #7f8c8d;
        }

        /* Image Preview */
        #image-preview-container {
            margin-top: 20px;
        }

        #image-preview-container h5 {
            margin-bottom: 15px;
            color: #2c3e50;
        }

        #image-preview-list {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
            gap: 15px;
        }

        .image-preview-item {
            position: relative;
            background: #f8f9fa;
            border: 2px solid #e9ecef;
            border-radius: 8px;
            padding: 10px;
            text-align: center;
            transition: all 0.3s ease;
        }

        .image-preview-item:hover {
            border-color: #3498db;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        }

        .image-preview-item img {
            max-width: 100%;
            height: 80px;
            object-fit: cover;
            border-radius: 4px;
            margin-bottom: 8px;
        }

        .image-info {
            font-size: 12px;
            color: #7f8c8d;
            line-height: 1.3;
        }

        .remove-image {
            position: absolute;
            top: 5px;
            right: 5px;
            background: #e74c3c;
            color: white;
            border: none;
            border-radius: 50%;
            width: 24px;
            height: 24px;
            cursor: pointer;
            font-size: 16px;
            line-height: 1;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.3s ease;
        }

        .remove-image:hover {
            background: #c0392b;
            transform: scale(1.1);
        }

        .preview-loading {
            color: #7f8c8d;
            font-size: 12px;
            padding: 20px 0;
        }

        /* Buttons */
        .btn {
            display: inline-flex;
            align-items: center;
            padding: 12px 24px;
            border: none;
            border-radius: 8px;
            font-size: 16px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            text-decoration: none;
        }

        .btn-primary {
            background: linear-gradient(135deg, #3498db, #2980b9);
            color: white;
        }

        .btn-primary:hover {
            background: linear-gradient(135deg, #2980b9, #1c5985);
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
        }

        .btn-secondary {
            background: #95a5a6;
            color: white;
        }

        .btn-secondary:hover {
            background: #7f8c8d;
        }

        .btn-icon {
            margin-right: 8px;
            font-size: 1.1em;
        }

        .form-actions {
            display: flex;
            gap: 15px;
            justify-content: flex-end;
            margin-top: 30px;
            padding-top: 25px;
            border-top: 1px solid #ecf0f1;
        }

        /* Form Message */
        .form-message {
            margin-top: 20px;
            padding: 15px;
            border-radius: 8px;
            font-weight: 600;
            text-align: center;
            display: none;
        }

        .form-message.success {
            background: #d4edda;
            color: #155724;
            border: 1px solid #c3e6cb;
        }

        .form-message.error {
            background: #f8d7da;
            color: #721c24;
            border: 1px solid #f5c6cb;
        }

        /* Arbeitspläne */
        .arbeitsplaene-selection {
            display: grid;
            gap: 15px;
            margin: 15px 0;
        }

        .arbeitsplan-option {
            background: #f8f9fa;
            border: 2px solid #e9ecef;
            border-radius: 10px;
            padding: 15px;
            transition: all 0.3s ease;
        }

        .arbeitsplan-option:hover {
            border-color: #3498db;
            background: #e8f4f8;
        }

        .arbeitsplan-option .checkbox-label {
            display: flex;
            align-items: center;
            gap: 12px;
            margin-bottom: 8px;
        }

        .plan-name {
            font-weight: 600;
            color: #2c3e50;
            flex: 1;
        }

        .plan-color {
            width: 20px;
            height: 20px;
            border-radius: 50%;
            border: 2px solid #fff;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
        }

        .plan-description {
            margin: 8px 0 0 35px;
            font-size: 13px;
            color: #7f8c8d;
            line-height: 1.4;
        }

        .arbeitsplan-details {
            margin-top: 15px;
            padding: 15px;
            background: white;
            border-radius: 8px;
            border: 1px solid #ddd;
        }

        .topic-section {
            margin-bottom: 15px;
        }

        .topic-section h6 {
            margin: 0 0 10px 0;
            color: #34495e;
            font-size: 1.1em;
            padding-bottom: 5px;
            border-bottom: 1px solid #ecf0f1;
        }

        .subtopic-checklist {
            display: grid;
            gap: 8px;
        }

        .subtopic-item-form {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 8px;
            border-radius: 5px;
            cursor: pointer;
            transition: background 0.2s ease;
        }

        .subtopic-item-form:hover {
            background: #f8f9fa;
        }

        .subtopic-item-form input[type="checkbox"] {
            display: none;
        }

        .subtopic-item-form .custom-checkbox {
            width: 18px;
            height: 18px;
            border: 2px solid #bdc3c7;
            border-radius: 3px;
            position: relative;
            transition: all 0.3s ease;
            flex-shrink: 0;
        }

        .subtopic-item-form input[type="checkbox"]:checked+.custom-checkbox {
            background: #27ae60;
            border-color: #27ae60;
        }

        .subtopic-item-form input[type="checkbox"]:checked+.custom-checkbox::after {
            content: "✓";
            position: absolute;
            top: -2px;
            left: 2px;
            color: white;
            font-size: 12px;
            font-weight: bold;
        }

        .subtopic-text {
            flex: 1;
            font-weight: 500;
            color: #2c3e50;
        }

        .arbeitsplan-info {
            margin: 15px 0 0 0;
            padding: 10px 15px;
            background: #e8f4f8;
            border-left: 4px solid #3498db;
            border-radius: 6px;
            font-size: 14px;
            color: #2c3e50;
        }

        .no-arbeitsplaene {
            text-align: center;
            padding: 30px;
            color: #7f8c8d;
            background: #f8f9fa;
            border-radius: 10px;
            border: 2px dashed #bdc3c7;
        }

        /* Responsive Design */
        @media (max-width: 768px) {
            .muehlentagebuch-entry-form {
                margin: 10px;
                border-radius: 10px;
            }

            .entry-form-modern {
                padding: 20px;
            }

            .form-row,
            .korn-form-row {
                grid-template-columns: 1fr;
            }

            .komponenten-grid {
                grid-template-columns: 1fr;
            }

            .form-actions {
                flex-direction: column;
            }

            .btn {
                width: 100%;
                justify-content: center;
            }

            #image-preview-list {
                grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
            }
        }

/* --- Block 16 --- */
/* Erweiterte Frontend Styles für Einträge-Liste mit Bild-Unterstützung */
        .recent-entries {
            margin-top: 30px;
            background: white;
            border-radius: 12px;
            padding: 25px;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
        }

        .recent-entries h4 {
            margin: 0 0 20px 0;
            color: #2c3e50;
            font-size: 1.3em;
            padding-bottom: 10px;
            border-bottom: 2px solid #ecf0f1;
        }

        .entries-list {
            display: flex;
            flex-direction: column;
            gap: 15px;
        }

        .entry-item {
            background: #f8f9fa;
            padding: 20px;
            border-radius: 10px;
            border-left: 4px solid #3498db;
            transition: all 0.3s ease;
            position: relative;
        }

        .entry-item.entry-erledigt {
            background: #f8fff8;
            border-left-color: #27ae60;
            opacity: 0.85;
        }

        .entry-item.entry-offen {
            background: #f8f9fa;
            border-left-color: #e74c3c;
        }

        .entry-item:hover {
            transform: translateX(5px);
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
        }

        .entry-item.entry-erledigt:hover {
            background: #e8f5e8;
        }

        .entry-item.entry-offen:hover {
            background: #e8f4f8;
        }

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

        .entry-date {
            font-weight: 600;
            color: #34495e;
            font-size: 14px;
        }

        .entry-badges {
            display: flex;
            align-items: center;
            gap: 8px;
            flex-wrap: wrap;
        }

        .erledigt-status-badge {
            font-size: 16px;
            padding: 2px 6px;
            border-radius: 50%;
            font-weight: 600;
        }

        .erledigt-status-badge.erledigt {
            background: rgba(39, 174, 96, 0.1);
            color: #27ae60;
        }

        .erledigt-status-badge.offen {
            background: rgba(231, 76, 60, 0.1);
            color: #e74c3c;
        }

        .entry-type-badge {
            background: #ecf0f1;
            color: #34495e;
            padding: 2px 8px;
            border-radius: 10px;
            font-size: 11px;
            font-weight: 600;
        }

        .entry-type-badge.type-Logbuch {
            background: #e3f2fd;
            color: #1565c0;
        }

        .entry-type-badge.type-Idee {
            background: #fff3e0;
            color: #ef6c00;
        }

        .entry-type-badge.type-ToDo {
            background: #e8f5e8;
            color: #2e7d32;
        }

        .entry-type-badge.type-Merkposten {
            background: #fce4ec;
            color: #c2185b;
        }

        .entry-type-badge.type-Handbuch {
            background: #f3e5f5;
            color: #7b1fa2;
        }

        .entry-type-badge.type-Event {
            background: #fff8e1;
            color: #f57f17;
        }

        .entry-type-badge.type-Software_Idee {
            background: #e1f5fe;
            color: #01579b;
        }

        .mahlbetrieb-badge {
            background: linear-gradient(135deg, #2ecc71, #27ae60);
            color: white;
            padding: 3px 8px;
            border-radius: 10px;
            font-size: 11px;
            font-weight: 600;
            white-space: nowrap;
        }

        /* NEUE: Bilder-Badge Styles */
        .bilder-badge {
            background: linear-gradient(135deg, #9b59b6, #8e44ad);
            color: white;
            padding: 3px 8px;
            border-radius: 10px;
            font-size: 11px;
            font-weight: 600;
            white-space: nowrap;
            cursor: help;
        }

        /* NEUE: Entry Main Content mit Bild-Layout */
        .entry-main-content {
            display: flex;
            gap: 15px;
            margin-bottom: 12px;
            align-items: flex-start;
        }

        .entry-image-preview {
            position: relative;
            flex-shrink: 0;
            width: 80px;
            height: 80px;
            border-radius: 8px;
            overflow: hidden;
            border: 2px solid #e9ecef;
        }

        .entry-thumbnail {
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: transform 0.3s ease;
        }

        .entry-thumbnail:hover {
            transform: scale(1.1);
        }

        .image-count-overlay {
            position: absolute;
            bottom: 2px;
            right: 2px;
            background: rgba(0, 0, 0, 0.7);
            color: white;
            font-size: 10px;
            padding: 2px 5px;
            border-radius: 8px;
            font-weight: 600;
        }

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

        .entry-content strong {
            color: #2c3e50;
            font-size: 16px;
        }

        .entry-preview {
            margin-top: 8px;
            color: #7f8c8d;
            font-size: 14px;
            line-height: 1.4;
        }

        .entry-meta {
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-size: 12px;
            color: #95a5a6;
            flex-wrap: wrap;
            gap: 8px;
        }

        .author {
            font-weight: 500;
        }

        .status-indicator {
            font-size: 11px;
            padding: 2px 6px;
            border-radius: 8px;
            font-weight: 600;
        }

        .status-indicator.status-einsatzbereit {
            background: #d4edda;
            color: #155724;
        }

        .status-indicator.status-eingeschraenkt_einsatzbereit {
            background: #fff3cd;
            color: #856404;
        }

        .status-indicator.status-nicht_einsatzbereit {
            background: #f8d7da;
            color: #721c24;
        }

        .erledigt-info {
            background: rgba(39, 174, 96, 0.1);
            color: #27ae60;
            padding: 2px 8px;
            border-radius: 10px;
            font-size: 11px;
            font-weight: 600;
        }

        .arbeitsplan-info {
            display: flex;
            align-items: center;
            gap: 5px;
            font-size: 11px;
            color: #7f8c8d;
        }

        .arbeitsplan-colors {
            display: flex;
            gap: 2px;
        }

        .plan-color-dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            border: 1px solid rgba(255,255,255,0.8);
        }

        .view-hint {
            opacity: 0;
            transition: opacity 0.3s ease;
            background: #3498db;
            color: white;
            padding: 2px 8px;
            border-radius: 10px;
            font-size: 11px;
        }

        .entry-item:hover .view-hint {
            opacity: 1;
        }

        .load-more-section {
            margin-top: 20px;
            text-align: center;
            padding: 20px;
            background: #f8f9fa;
            border-radius: 10px;
        }

        .load-more-info {
            margin-bottom: 15px;
            color: #7f8c8d;
            font-size: 14px;
        }

        #load-more-entries {
            background: #95a5a6;
            color: white;
            border: none;
            padding: 10px 20px;
            border-radius: 8px;
            cursor: pointer;
            transition: background 0.3s ease;
        }

        #load-more-entries:hover:not(:disabled) {
            background: #7f8c8d;
        }

        #load-more-entries:disabled {
            opacity: 0.6;
            cursor: not-allowed;
        }

        .no-entries {
            text-align: center;
            padding: 60px 20px;
            color: #7f8c8d;
        }

        .no-entries-icon {
            font-size: 4em;
            margin-bottom: 20px;
            opacity: 0.5;
        }

        .no-entries p {
            font-size: 18px;
            margin-bottom: 25px;
        }

        .btn {
            display: inline-flex;
            align-items: center;
            padding: 12px 24px;
            border: none;
            border-radius: 8px;
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            text-decoration: none;
        }

        .btn-primary {
            background: linear-gradient(135deg, #3498db, #2980b9);
            color: white;
        }

        .btn-primary:hover {
            background: linear-gradient(135deg, #2980b9, #1c5985);
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
        }

        .btn-secondary {
            background: #95a5a6;
            color: white;
        }

        .btn-secondary:hover {
            background: #7f8c8d;
        }

        /* Responsive Design */
        @media (max-width: 768px) {
            .entry-header {
                flex-direction: column;
                align-items: flex-start;
                gap: 8px;
            }

            .entry-main-content {
                flex-direction: column;
                gap: 10px;
            }

            .entry-image-preview {
                width: 100%;
                height: 120px;
            }

            .entry-meta {
                flex-direction: column;
                align-items: flex-start;
                gap: 4px;
            }

            .view-hint {
                display: none;
            }

            .entry-badges {
                align-self: flex-end;
            }
        }

/* --- Block 17 --- */
.tag-details-modal-overlay {
                position: fixed;
                top: 0;
                left: 0;
                width: 100%;
                height: 100%;
                background: rgba(0, 0, 0, 0.8);
                display: flex;
                justify-content: center;
                align-items: center;
                z-index: 10000;
                padding: 20px;
                box-sizing: border-box;
            }

            .tag-details-modal-content {
                background: white;
                border-radius: 15px;
                max-width: 800px;
                max-height: 90vh;
                overflow: hidden;
                display: flex;
                flex-direction: column;
                box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
            }

            .tag-details-modal-header {
                background: linear-gradient(135deg, #3498db, #2980b9);
                color: white;
                padding: 20px 25px;
                display: flex;
                justify-content: space-between;
                align-items: center;
            }

            .tag-details-modal-body {
                padding: 25px;
                overflow-y: auto;
                max-height: 70vh;
            }

            .eintrag-arbeitsplan-detail {
                border: 1px solid #ecf0f1;
                border-radius: 10px;
                padding: 20px;
                margin-bottom: 20px;
                background: #f8f9fa;
            }

            .eintrag-info h4 {
                margin: 0 0 10px 0;
                color: #2c3e50;
            }

            .topic-detail {
                margin: 15px 0;
            }

            .topic-detail h5 {
                margin: 0 0 10px 0;
                color: #34495e;
                border-bottom: 1px solid #bdc3c7;
                padding-bottom: 5px;
            }

            .subtopic-detail {
                display: flex;
                align-items: center;
                gap: 10px;
                padding: 5px 0;
            }

            .subtopic-detail.completed {
                color: #27ae60;
            }

            .subtopic-detail.incomplete {
                color: #e74c3c;
            }

            .completed-time {
                margin-left: auto;
                font-size: 12px;
                color: #7f8c8d;
            }

/* --- Block 18 --- */
/* Container und Header */
        .entry-form-container {
            background: white;
            border-radius: 15px;
            box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
            margin: 20px 0;
            overflow: hidden;
            animation: slideDown 0.3s ease-out;
        }

        @keyframes slideDown {
            from {
                opacity: 0;
                transform: translateY(-20px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .entry-form-header {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            padding: 20px 25px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .entry-form-header h3 {
            margin: 0;
            font-size: 1.3em;
            font-weight: 600;
        }

        .form-close-btn {
            background: none;
            border: none;
            color: white;
            font-size: 24px;
            cursor: pointer;
            padding: 5px;
            border-radius: 50%;
            width: 35px;
            height: 35px;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: background-color 0.3s ease;
        }

        .form-close-btn:hover {
            background: rgba(255, 255, 255, 0.2);
        }

        /* Formular */
        .entry-form-ajax {
            padding: 25px;
        }

        .form-section {
            margin-bottom: 25px;
            padding-bottom: 20px;
            border-bottom: 1px solid #ecf0f1;
        }

        .form-section:last-of-type {
            border-bottom: none;
        }

        .form-section h4 {
            color: #2c3e50;
            margin: 0 0 15px 0;
            font-size: 1.1em;
            font-weight: 600;
            padding-bottom: 8px;
            border-bottom: 2px solid #3498db;
            display: inline-block;
        }

        .form-row {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 15px;
        }

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

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

        .form-group input,
        .form-group select,
        .form-group textarea {
            width: 100%;
            padding: 10px 12px;
            border: 2px solid #e9ecef;
            border-radius: 6px;
            font-size: 14px;
            transition: all 0.3s ease;
            background: #f8f9fa;
            box-sizing: border-box;
        }

        .form-group input:focus,
        .form-group select:focus,
        .form-group textarea:focus {
            outline: none;
            border-color: #3498db;
            background: white;
            box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
        }

        .description {
            font-size: 12px;
            color: #7f8c8d;
            margin-top: 5px;
        }

        /* Checkboxen */
        .checkbox-group {
            margin-bottom: 10px;
        }

        .checkbox-label {
            display: flex;
            align-items: center;
            cursor: pointer;
            font-weight: 500;
            padding: 8px;
            border-radius: 6px;
            transition: background-color 0.3s ease;
        }

        .checkbox-label:hover {
            background: #f8f9fa;
        }

        .checkbox-label input[type="checkbox"] {
            display: none;
        }

        .checkmark,
        .custom-checkbox {
            width: 18px;
            height: 18px;
            border: 2px solid #bdc3c7;
            border-radius: 3px;
            margin-right: 10px;
            position: relative;
            transition: all 0.3s ease;
            flex-shrink: 0;
        }

        .checkbox-label input[type="checkbox"]:checked + .checkmark,
        .checkbox-label input[type="checkbox"]:checked + .custom-checkbox,
        .subtopic-item-form input[type="checkbox"]:checked + .custom-checkbox {
            background: #3498db;
            border-color: #3498db;
        }

        .checkbox-label input[type="checkbox"]:checked + .checkmark::after,
        .checkbox-label input[type="checkbox"]:checked + .custom-checkbox::after,
        .subtopic-item-form input[type="checkbox"]:checked + .custom-checkbox::after {
            content: "✓";
            position: absolute;
            top: -2px;
            left: 2px;
            color: white;
            font-size: 12px;
            font-weight: bold;
        }

        /* Korn-Einträge */
        .korn-eintrag-card {
            background: #e8f5e8;
            border: 2px solid #27ae60;
            border-radius: 10px;
            padding: 15px;
            margin-bottom: 15px;
            position: relative;
        }

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

        .korn-header h5 {
            margin: 0;
            color: #27ae60;
            font-size: 1em;
        }

        .remove-korn-btn {
            background: #e74c3c;
            color: white;
            border: none;
            border-radius: 50%;
            width: 26px;
            height: 26px;
            cursor: pointer;
            font-size: 16px;
            font-weight: bold;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .remove-korn-btn:hover {
            background: #c0392b;
        }

        .korn-form-row {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 12px;
            margin-bottom: 12px;
        }

        .korn-form-row:last-child {
            margin-bottom: 0;
        }

        /* Komponenten */
        .komponenten-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
            gap: 12px;
        }

        .komponente-item {
            background: #f8f9fa;
            border: 1px solid #e9ecef;
            border-radius: 6px;
            padding: 12px;
            transition: all 0.3s ease;
        }

        .komponente-item:hover {
            background: #e9ecef;
            border-color: #3498db;
        }

        /* Arbeitspläne */
        .arbeitsplaene-selection {
            display: grid;
            gap: 15px;
            margin: 15px 0;
        }

        .arbeitsplan-option {
            background: #f8f9fa;
            border: 2px solid #e9ecef;
            border-radius: 10px;
            padding: 15px;
            transition: all 0.3s ease;
        }

        .arbeitsplan-option:hover {
            border-color: #3498db;
            background: #e8f4f8;
        }

        .plan-name {
            font-weight: 600;
            color: #2c3e50;
            flex: 1;
        }

        .plan-color {
            width: 20px;
            height: 20px;
            border-radius: 50%;
            border: 2px solid #fff;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
            margin-left: 10px;
        }

        .plan-description {
            margin: 8px 0 0 35px;
            font-size: 13px;
            color: #7f8c8d;
            line-height: 1.4;
        }

        .arbeitsplan-details {
            margin-top: 15px;
            padding: 15px;
            background: white;
            border-radius: 8px;
            border: 1px solid #ddd;
        }

        .topic-section {
            margin-bottom: 15px;
        }

        .topic-section:last-child {
            margin-bottom: 0;
        }

        .topic-section h6 {
            margin: 0 0 10px 0;
            color: #34495e;
            font-size: 1em;
            padding-bottom: 5px;
            border-bottom: 1px solid #ecf0f1;
        }

        .subtopic-checklist {
            display: grid;
            gap: 8px;
        }

        .subtopic-item-form {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 8px;
            border-radius: 5px;
            cursor: pointer;
            transition: background 0.2s ease;
        }

        .subtopic-item-form:hover {
            background: #f8f9fa;
        }

        .subtopic-item-form input[type="checkbox"] {
            display: none;
        }

        .subtopic-text {
            flex: 1;
            font-weight: 500;
            color: #2c3e50;
        }

        .arbeitsplan-info {
            margin: 15px 0 0 0;
            padding: 10px 15px;
            background: #e8f4f8;
            border-left: 4px solid #3498db;
            border-radius: 6px;
            font-size: 14px;
            color: #2c3e50;
        }

        /* Bilder Upload */
        .upload-area {
            border: 2px dashed #bdc3c7;
            border-radius: 8px;
            padding: 20px;
            text-align: center;
            transition: all 0.3s ease;
            background: #f8f9fa;
            cursor: pointer;
        }

        .upload-area:hover,
        .upload-area.dragover {
            border-color: #3498db;
            background: #e8f4f8;
        }

        .upload-placeholder {
            padding: 20px;
        }

        .upload-icon {
            font-size: 3em;
            margin-bottom: 15px;
            opacity: 0.7;
        }

        .upload-placeholder p {
            margin: 10px 0;
            color: #7f8c8d;
            font-size: 16px;
        }

        #image-preview-container {
            margin-top: 20px;
            text-align: left;
        }

        #image-preview-container h5 {
            margin-bottom: 15px;
            color: #2c3e50;
        }

        #image-preview-list {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
            gap: 15px;
        }

        .image-preview-item {
            position: relative;
            border: 2px solid #e9ecef;
            border-radius: 8px;
            overflow: hidden;
            background: white;
        }

        .image-preview-item img {
            width: 100%;
            height: 80px;
            object-fit: cover;
        }

        .image-preview-item .image-info {
            padding: 8px;
            font-size: 12px;
            color: #7f8c8d;
            text-align: center;
        }

        .image-preview-item .remove-image {
            position: absolute;
            top: 5px;
            right: 5px;
            background: #e74c3c;
            color: white;
            border: none;
            border-radius: 50%;
            width: 20px;
            height: 20px;
            cursor: pointer;
            font-size: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .image-preview-item .remove-image:hover {
            background: #c0392b;
        }

        /* Buttons */
        .btn {
            display: inline-flex;
            align-items: center;
            padding: 10px 20px;
            border: none;
            border-radius: 6px;
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            text-decoration: none;
        }

        .btn-primary {
            background: linear-gradient(135deg, #3498db, #2980b9);
            color: white;
        }

        .btn-primary:hover:not(:disabled) {
            background: linear-gradient(135deg, #2980b9, #1c5985);
            transform: translateY(-1px);
            box-shadow: 0 3px 10px rgba(52, 152, 219, 0.3);
        }

        .btn-secondary {
            background: #95a5a6;
            color: white;
        }

        .btn-secondary:hover {
            background: #7f8c8d;
        }

        .btn:disabled {
            opacity: 0.6;
            cursor: not-allowed;
            transform: none;
        }

        .form-actions {
            display: flex;
            gap: 12px;
            justify-content: flex-end;
            margin-top: 25px;
            padding-top: 20px;
            border-top: 1px solid #ecf0f1;
        }

        /* Nachrichten */
        .form-message {
            margin-top: 15px;
            padding: 12px;
            border-radius: 6px;
            font-weight: 600;
            text-align: center;
            display: none;
        }

        .form-message.success {
            background: #d4edda;
            color: #155724;
            border: 1px solid #c3e6cb;
            display: block !important;
        }

        .form-message.error {
            background: #f8d7da;
            color: #721c24;
            border: 1px solid #f5c6cb;
            display: block !important;
        }

        /* Responsive */
        @media (max-width: 768px) {
            .form-row,
            .korn-form-row {
                grid-template-columns: 1fr;
            }

            .komponenten-grid {
                grid-template-columns: 1fr;
            }

            .form-actions {
                flex-direction: column;
            }

            .btn {
                width: 100%;
                justify-content: center;
            }
        }


/* =========================================
   ARBEITSPLÄNE EDITOR - VOLLSTÄNDIGE DARSTELLUNG
   ========================================= */

.arbeitsplaene-editor-section {
    max-height: none !important;
}

.arbeitsplaene-full-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.arbeitsplan-full-card {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-left: 4px solid #2271b1;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.arbeitsplan-full-card.selected {
    border-color: #2271b1;
    background: #fff;
    box-shadow: 0 2px 8px rgba(34, 113, 177, 0.15);
}

.arbeitsplan-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: linear-gradient(135deg, #f8f9fa, #fff);
    border-bottom: 1px solid #e9ecef;
}

.arbeitsplan-full-card.selected .arbeitsplan-card-header {
    background: linear-gradient(135deg, #e8f4fc, #fff);
}

.arbeitsplan-checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 600;
    color: #2c3e50;
}

.arbeitsplan-checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.progress-indicator {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    color: white;
}

.arbeitsplan-card-desc {
    padding: 8px 15px;
    margin: 0;
    font-size: 13px;
    color: #666;
    background: #fafafa;
    border-bottom: 1px solid #e9ecef;
}

.arbeitsplan-details-content {
    padding: 15px;
}

.topic-group {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e9ecef;
}

.topic-group:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.topic-title {
    font-size: 13px;
    font-weight: 700;
    color: #2c3e50;
    text-transform: uppercase;
    margin: 0 0 10px 0;
    padding-bottom: 5px;
    border-bottom: 2px solid #e9ecef;
}

.subtopics-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-left: 5px;
}

.subtopic-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.subtopic-checkbox:hover {
    background: #f0f7ff;
    border-color: #2271b1;
}

.subtopic-checkbox.completed {
    background: #d4edda;
    border-color: #27ae60;
}

.subtopic-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    flex-shrink: 0;
}

.subtopic-checkmark {
    display: none;
}

.subtopic-name {
    font-size: 14px;
    color: #333;
    line-height: 1.4;
}

.subtopic-checkbox.completed .subtopic-name {
    color: #155724;
}

/* Toggle Animation */
.arbeitsplan-details-content {
    transition: max-height 0.3s ease, opacity 0.3s ease;
}

/* Responsive */
@media screen and (max-width: 768px) {
    .arbeitsplan-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .progress-indicator {
        align-self: flex-end;
    }
}

/* =========================================
   EDITOR ERLEDIGT-STATUS BOX
   ========================================= */

.erledigt-status-box {
    padding: 15px;
    border-radius: 8px;
    border: 2px solid #e9ecef;
}

.erledigt-status-box.is-erledigt {
    background: #d4edda;
    border-color: #27ae60;
}

.erledigt-status-box.is-offen {
    background: #fff3cd;
    border-color: #ffc107;
}

.erledigt-checkbox-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
}

.erledigt-checkbox-label input[type="checkbox"] {
    width: 24px;
    height: 24px;
    cursor: pointer;
    flex-shrink: 0;
}

.erledigt-checkbox-text {
    color: #333;
}

.erledigt-status-box .erledigt-info {
    margin: 10px 0 0 36px;
    font-size: 13px;
    color: #155724;
}

/* =========================================
   DASHBOARD FILTER BAR
   ========================================= */

.entries-filter-bar {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
}

.entries-filter-bar .filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 10px;
}

.entries-filter-bar .filter-row:last-child {
    margin-bottom: 0;
}

.entries-filter-bar .filter-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 8px 12px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    transition: all 0.2s;
}

.entries-filter-bar .filter-checkbox:hover {
    border-color: #2271b1;
    background: #f0f7ff;
}

.entries-filter-bar .filter-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.entries-filter-bar .filter-select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    min-width: 180px;
    background: white;
    cursor: pointer;
}

.entries-filter-bar .filter-select:focus {
    outline: none;
    border-color: #2271b1;
}

/* Nicht-erledigt Label im Frontend */
.nicht-erledigt-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.nicht-erledigt-label input[type="checkbox"] {
    margin-top: 3px;
}

@media screen and (max-width: 600px) {
    .entries-filter-bar .filter-row {
        flex-direction: column;
    }
    
    .entries-filter-bar .filter-select {
        width: 100%;
    }
}
