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

        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
            padding: 20px;
            background: #f5f5f5;
            position: relative;
        }

        h1 {
            margin-bottom: 15px;
            color: #333;
        }

        /* ==================== Listen-Auswahl ==================== */

        .list-selector {
            display: flex;
            gap: 0;
            margin-bottom: 20px;
            border-bottom: 2px solid #ddd;
        }

        .list-tab {
            padding: 10px 20px;
            background: #e0e0e0;
            border: 1px solid #ccc;
            border-bottom: none;
            border-radius: 6px 6px 0 0;
            cursor: pointer;
            font-size: 14px;
            font-weight: 500;
            color: #555;
            margin-right: 4px;
            transition: background 0.2s, color 0.2s;
        }

        .list-tab:hover {
            background: #f0f0f0;
            color: #333;
        }

        .list-tab.active {
            background: white;
            color: #1976D2;
            border-color: #ddd;
            border-bottom: 2px solid white;
            margin-bottom: -2px;
            font-weight: 600;
        }

        /* ==================== Toolbar ==================== */

        .toolbar {
            margin-bottom: 15px;
            display: flex;
            gap: 10px;
            align-items: center;
            flex-wrap: wrap;
        }

        .toolbar button {
            padding: 8px 16px;
            background: #2196F3;
            color: white;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            font-size: 14px;
        }

        .toolbar button:hover {
            background: #1976D2;
        }

        .toolbar button.secondary {
            background: #78909c;
        }

        .toolbar button.secondary:hover {
            background: #546e7a;
        }

        .toolbar button.success {
            background: #43a047;
        }

        .toolbar button.success:hover {
            background: #2e7d32;
        }

        .toolbar .toggle-btn {
            background: #e0e0e0;
            color: #333;
        }

        .toolbar .toggle-btn:hover {
            background: #bdbdbd;
        }

        .toolbar .toggle-btn.active {
            background: #ff9800;
            color: white;
        }

        .toolbar .toggle-btn.active:hover {
            background: #f57c00;
        }

        .status {
            font-size: 13px;
            color: #666;
            margin-left: 10px;
        }

        .status.saving {
            color: #ff9800;
        }

        .status.saved {
            color: #4caf50;
        }

        .status.error {
            color: #f44336;
        }

        .status.conflict {
            color: #f44336;
            font-weight: bold;
        }

        /* Status-Toast: fixiert, beeinflusst das Layout nicht */
        .status-toast {
            position: fixed;
            bottom: 20px;
            right: 20px;
            z-index: 1100;
            padding: 10px 16px;
            border-radius: 6px;
            font-size: 14px;
            font-weight: 500;
            color: white;
            box-shadow: 0 4px 16px rgba(0,0,0,0.2);
            opacity: 0;
            transform: translateY(10px);
            transition: opacity 0.2s, transform 0.2s;
            pointer-events: none;
        }

        .status-toast.visible {
            opacity: 1;
            transform: translateY(0);
        }

        .status-toast.saving {
            background: #ff9800;
        }

        .status-toast.saved {
            background: #4caf50;
        }

        .status-toast.error {
            background: #f44336;
        }

        .status-toast.conflict {
            background: #f44336;
            font-weight: bold;
        }

        /* ==================== Tabelle ==================== */

        .table-container {
            overflow-x: auto;
            background: white;
            border-radius: 6px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        }

        table {
            border-collapse: collapse;
            width: 100%;
            table-layout: fixed;
        }

        th {
            background: #37474f;
            color: white;
            padding: 10px 8px;
            text-align: left;
            font-weight: 500;
            font-size: 14px;
            border: 1px solid #455a64;
        }

        th.actions-col {
            width: 190px;
            text-align: center;
        }

        td {
            padding: 0;
            border: 1px solid #ddd;
            height: 36px;
        }

        td.nr-cell {
            padding: 8px;
            text-align: center;
            background: #f9f9f9;
            color: #666;
            font-size: 13px;
        }

        td.actions-cell {
            padding: 4px;
            text-align: center;
            white-space: nowrap;
        }

        td input[type="text"],
        td input[type="date"] {
            width: 100%;
            height: 100%;
            padding: 8px;
            border: none;
            font-size: 14px;
            font-family: inherit;
            background: transparent;
            outline: none;
        }

        td input[type="checkbox"] {
            width: 18px;
            height: 18px;
            cursor: pointer;
            margin-top: 8px;
        }

        td select {
            width: 100%;
            height: 100%;
            padding: 6px 8px;
            border: none;
            font-size: 14px;
            font-family: inherit;
            background: transparent;
            outline: none;
            cursor: pointer;
        }

        td input:focus,
        td select:focus {
            background: #e3f2fd;
            box-shadow: inset 0 0 0 2px #2196F3;
        }

        tr:hover td {
            background: #fafafa;
        }

        tr:hover td input:not(:focus),
        tr:hover td select:not(:focus) {
            background: #fafafa;
        }

        /* Drag & Drop */
        td.actions-cell[draggable="true"] {
            cursor: grab;
        }

        td.actions-cell[draggable="true"]:active {
            cursor: grabbing;
        }

        tr.dragging {
            opacity: 0.4;
            background: #e3f2fd;
        }

        tr.drag-over {
            border-top: 3px solid #2196F3;
        }

        tr.drag-over td {
            background: #e3f2fd !important;
        }

        /* Erledigte Zeilen */
        tr.row-completed td {
            background: #c8e6c9;
        }

        tr.row-completed td input,
        tr.row-completed td select {
            color: #33691e;
            background: #c8e6c9;
        }

        tr.row-completed td.nr-cell {
            color: #33691e;
            background: #c8e6c9;
        }

        tr.row-hidden {
            display: none;
        }

        /* ==================== Action-Buttons ==================== */

        .row-btn {
            width: 24px;
            height: 24px;
            border: none;
            border-radius: 3px;
            cursor: pointer;
            font-size: 13px;
            line-height: 1;
            padding: 0;
            margin: 0 1px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
        }

        .row-btn.move-up {
            background: #e3f2fd;
            color: #1565c0;
        }

        .row-btn.move-up:hover {
            background: #bbdefb;
        }

        .row-btn.move-down {
            background: #e3f2fd;
            color: #1565c0;
        }

        .row-btn.move-down:hover {
            background: #bbdefb;
        }

        .row-btn.delete {
            background: #ffebee;
            color: #c62828;
        }

        .row-btn.delete:hover {
            background: #ffcdd2;
        }

        .row-btn.copy {
            background: #e8f5e9;
            color: #2e7d32;
        }

        .row-btn.copy:hover {
            background: #c8e6c9;
        }

        .row-btn.insert {
            background: #fff3e0;
            color: #e65100;
        }

        .row-btn.insert:hover {
            background: #ffe0b2;
        }

        .row-btn.erledigt {
            background: #e8f5e9;
            color: #2e7d32;
        }

        .row-btn.erledigt:hover {
            background: #c8e6c9;
        }

        .row-btn.erledigt.done {
            background: #c8e6c9;
            color: #1b5e20;
        }

        .row-btn:disabled {
            opacity: 0.3;
            cursor: not-allowed;
        }

        /* ==================== Priorität-Farben ==================== */

        select.prio-hoch {
            color: #c62828;
            font-weight: 600;
        }

        select.prio-mittel {
            color: #ef6c00;
            font-weight: 500;
        }

        select.prio-niedrig {
            color: #2e7d32;
        }

        /* ==================== Modal ==================== */

        .modal-overlay {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0,0,0,0.5);
            z-index: 1000;
            align-items: center;
            justify-content: center;
        }

        .modal-overlay.active {
            display: flex;
        }

        .modal {
            background: white;
            border-radius: 8px;
            padding: 24px;
            max-width: 500px;
            width: 90%;
            max-height: 80vh;
            overflow-y: auto;
            box-shadow: 0 8px 32px rgba(0,0,0,0.3);
            position: relative;
        }

        /* Schließen-Button oben rechts im Modal; bleibt beim Scrollen sichtbar */
        .modal-close {
            position: sticky;
            top: 0;
            float: right;
            margin: -8px -8px 0 12px;
            width: 32px;
            height: 32px;
            border: none;
            border-radius: 4px;
            background: #e0e0e0;
            color: #333;
            font-size: 16px;
            line-height: 1;
            cursor: pointer;
            z-index: 1;
        }

        .modal-close:hover {
            background: #bdbdbd;
        }

        .modal h2 {
            margin-bottom: 16px;
            font-size: 18px;
            color: #333;
        }

        .modal p {
            margin-bottom: 16px;
            color: #555;
        }

        .modal-buttons {
            display: flex;
            gap: 10px;
            justify-content: flex-end;
        }

        .modal-buttons button {
            padding: 8px 20px;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            font-size: 14px;
        }

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

        .btn-cancel:hover {
            background: #bdbdbd;
        }

        .btn-danger {
            background: #f44336;
            color: white;
        }

        .btn-danger:hover {
            background: #d32f2f;
        }

        .btn-primary {
            background: #2196F3;
            color: white;
        }

        .btn-primary:hover {
            background: #1976D2;
        }

        /* Text-Editor-Modal (Doppelklick auf Textzelle) */
        .comment-editor {
            width: 100%;
            min-height: 440px;
            padding: 12px;
            border: 1px solid #ccc;
            border-radius: 4px;
            font-family: inherit;
            font-size: 15px;
            line-height: 1.5;
            color: #333;
            resize: vertical;
            margin-bottom: 16px;
            box-sizing: border-box;
        }

        .comment-editor:focus {
            outline: none;
            border-color: #2196F3;
            box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.15);
        }

        /* Backup-Liste */
        .backup-list {
            list-style: none;
            max-height: 300px;
            overflow-y: auto;
            margin-bottom: 16px;
        }

        .backup-list li {
            padding: 8px 12px;
            border-bottom: 1px solid #eee;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .backup-list li:hover {
            background: #f5f5f5;
        }

        .backup-list .backup-date {
            font-size: 13px;
            color: #555;
        }

        .backup-list .btn-restore {
            padding: 4px 12px;
            font-size: 12px;
            background: #ff9800;
            color: white;
            border: none;
            border-radius: 3px;
            cursor: pointer;
        }

        .backup-list .btn-restore:hover {
            background: #f57c00;
        }

        /* Multi-User-Hinweis */
        .conflict-banner {
            display: none;
            background: #fff3e0;
            border: 1px solid #ff9800;
            border-radius: 4px;
            padding: 12px 16px;
            margin-bottom: 15px;
            font-size: 14px;
            color: #e65100;
        }

        .conflict-banner.active {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .conflict-banner button {
            padding: 6px 12px;
            font-size: 13px;
            background: #ff9800;
            color: white;
            border: none;
            border-radius: 4px;
            cursor: pointer;
        }
