:root {
  --primary: #4a90e2;
  --glass: rgba(255, 255, 255, 0.9);
  --blur: blur(10px);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

body {
  background: linear-gradient(45deg, #f3f4f6 0%, #e5e7eb 100%);
  min-height: 100vh;
  font-family: "Segoe UI", "Roboto", "system-ui", sans-serif;
  font-weight: 200;
}

.task-assignee {
  margin-bottom: 0.25rem;
}

/* Textarea im Editiermodus größer darstellen */
#taskForm[data-editing-id] #descriptionInput {
  min-height: 220px; /* oder 260/300px – wie du magst */
  height: 220px; /* fix, damit es sofort sichtbar größer wird */
  resize: vertical; /* User darf per Drag noch weiterziehen */
}

/* mobil etwas kompakter */
@media (max-width: 480px) {
  #taskForm[data-editing-id] #descriptionInput {
    min-height: 160px;
    height: 160px;
  }
}

.filter-bar {
  background: var(--glass);
  backdrop-filter: var(--blur);
  padding: 0.5rem 1rem;
  margin-left: 0.5rem;
  margin-right: 0.5rem;
  border-radius: 0.3rem;
  margin: 2rem auto;
  box-shadow: var(--shadow);
  display: flex;
  flex-wrap: wrap;
  font-size: 0.55rem;
  margin-top: 0.5rem;
}

.filter-bar input,
.filter-bar select {
  padding: 0.3rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.3);
  transition: all 0.2s;
  font-size: 0.65rem;
  max-width: 7rem;
}

.filter-bar input[type="text"] {
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 0.5rem;
  padding: 0.4rem 0.6rem;
  margin: 1rem 0.3rem;
  background: rgba(255, 255, 255, 0);
  outline: none;
  transition: border 0.2s, box-shadow 0.2s;
}

.filter-bar input[type="text"]:focus,
.filter-bar input[type="select"]:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.3);
}

.completed-filter,
.deleted-filter,
.private-filter,
.due-soon-filter {
  display: inline-flex;
  align-items: center;
  font-size: 0.65rem;
  padding: 0 0.5rem;
}

.task-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  padding: 1rem;
}

.deleted {
  opacity: 0.5;
  background: rgba(255, 255, 255, 0.5);
}

.attachment-thumbnail {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 0.25rem;
}

.attachments-container {
  display: flex;
  flex-direction: row;
  gap: 0.25rem;
  margin-top: 0.3rem;
  padding-top: 0.5rem;
}

.attachment-item {
  flex: 0 0 auto;
  min-height: auto;
  height: auto;
  text-align: center;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.attachments-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.5rem;
}

.attachment-link {
  text-decoration: none;
  font-size: 0.7rem;
  color: rgba(195, 188, 188, 0.885);
}

.attachment-link:hover {
  background: rgba(255, 255, 255, 0.5);
}

.attachment-link svg {
  width: 24px;
  height: 24px;
}

.attachment-item button {
  background: transparent;
  border: none;
  color: #d32f2f;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.2s;
}

.attachment-item button:hover {
  transform: scale(1.2);
}

#filterContainer {
  transition: max-height 0.3s ease, opacity 0.3s ease;
  overflow: hidden;
  font-size: 0.45rem;
}

#filterContainer.collapsed {
  max-height: 0;
  opacity: 0;
  pointer-events: none;
}

#filterContainer.expanded {
  max-height: 500px;
  opacity: 1;
  pointer-events: auto;
}
@media (max-width: 768px) {
  .filter-bar {
    flex-direction: column;
    gap: 0.3rem;
    padding: 0.5rem 0.5rem;
    margin: 0.5rem 1rem;
    border-radius: 0.5rem;
  }

  .filter-bar input,
  .filter-bar select,
  .filter-bar label {
    font-size: 0.75rem;
    margin-bottom: 0.2rem;
    max-width: 18rem;
  }

  .filter-bar label {
    gap: 0.1rem;
    align-items: center;
  }

  .logo-header {
    padding: 0.75rem;
    justify-content: center;
  }

  .logo-img {
    height: 30px;
    max-width: 130px;
  }

  .auf-zu {
    display: flex;
    flex-direction: column;
  }
  #toggleFilter {
    margin-top: 0.3rem;
  }
  #reset-filters-btn,
  #export-html-btn {
    font-size: 0.85rem;
    max-width: 8rem;
  }
}

.logo-header {
  padding: 1rem 1rem 1rem 1rem;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.logo-img {
  height: 40px;
  max-width: 160px;
  object-fit: contain;
  margin: 0 2rem;
}

body.dark-mode {
  background: #121212;
  color: #fff;
}

body.dark-mode .task-card,
body.dark-mode .filter-bar,
body.dark-mode .modal,
body.dark-mode .snackbar,
body.dark-mode #historyModal {
  background: rgba(30, 30, 30, 0.95);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

body.dark-mode .fab {
  background: linear-gradient(90deg, #00e5ff, #4b3aff);
}

body.dark-mode select,
body.dark-mode input,
body.dark-mode textarea {
  background: rgba(255, 255, 255, 0.05);
  color: #f1f1f1;
}

.task-project {
  font-size: 1.3rem;
  font-weight: 600;
}

.task-floor,
.task-room {
  font-size: 0.95rem;
  word-break: break-word;
  margin-bottom: 0.2rem;
}

.task-description {
  font-size: 0.95rem;
  word-break: break-word;
  background: #f0f0f0;
  font-size: 0.9rem;
  color: #333;
  white-space: pre-wrap;
  word-break: break-word;
  cursor: default;
  max-width: 21rem;
  margin-top: 0.5rem;
  padding: 0.5rem 0.5rem;
  border-radius: 0.1rem;
  border: 1px solid #ccc;
  border-radius: 0.3rem;
  line-height: 1.4;
}

#toggleFilters {
  background: transparent;
  border: none;
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0.3rem 0.6rem;
  color: inherit;
  transition: background 0.2s ease;
  margin-left: 1.5rem;
}

#toggleFilters:hover {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 0.4rem;
}

body.dark-mode {
  background: #121212;
  color: #fff;
}

body.dark-mode .task-card,
body.dark-mode .filter-bar,
body.dark-mode .modal,
body.dark-mode .snackbar {
  background: rgba(30, 30, 30, 0.95);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

body.dark-mode .fab {
  background: linear-gradient(90deg, #00e5ff, #4b3aff);
}

div.dark-mode {
  background: rgba(30, 30, 30, 0.95);
}

body.dark-mode select,
body.dark-mode input,
body.dark-mode textarea {
  background: rgba(30, 30, 30, 0.95);
  color: #f1f1f1;
  border: none;
}

.task-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  padding: 1rem;
  align-items: start;
}

.task-details div {
  word-break: break-word;
  overflow-wrap: break-word;
  white-space: pre-wrap;
}

.task-card {
  background: var(--glass);
  backdrop-filter: var(--blur);
  border-radius: 0.1rem;
  padding: 1.5rem;
  position: relative;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
  border: 1px solid rgba(255, 255, 255, 0.3);
  cursor: crosshair;
}

.task-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
  background: rgba(255, 255, 255, 0.95);
}

.status-badge {
  position: absolute;
  top: -12px;
  left: 1rem;
  padding: 6px 16px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(0, 0, 0, 0.7);
  background: #ccc;
}

.task-actions {
  position: absolute;
  top: 12.5%;
  right: -3.5%;
  flex-direction: column;
  gap: 0.2rem;
  align-items: center;
  display: flex;
}

.complete-btn,
.delete-btn,
.edit-btn {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: none;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.8rem;
  justify-content: center;
  align-items: center;
}

.complete-btn {
  background: #4caf4f9b;
  color: white;
}

.complete-btn:hover {
  background: #45a049;
  transform: scale(1.1);
}

.edit-btn {
  background: #2196f39b;
  color: white;
}

.edit-btn:hover {
  background: #1976d2;
  transform: scale(1.1);
}

.delete-btn {
  background: #f443369b;
  color: white;
}

.delete-btn:hover {
  background: #d32f2f;
  transform: scale(1.1);
}

.modal {
  background: var(--glass);
  backdrop-filter: var(--blur);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.modal::-webkit-scrollbar {
  width: 8px;
}

.modal::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 4px;
}

body.dark-mode .modal::-webkit-scrollbar-thumb {
  background: #444;
}

.modal input,
select,
textarea {
  padding: 0.5rem 0.5rem;
}

.modal form button[type="submit"] {
  background: linear-gradient(45deg, var(--primary), #63a4ff);
  color: white;
  padding: 1rem;
  border: none;
  border-radius: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s;
  font-size: 1.2rem;
}

.modal form button[type="submit"]:hover {
  transform: scale(1.02);
}

.fab {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(90deg, #4b3aff, #00e5ff);
  color: white;
  border: none;
  font-size: 30px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s;
}

.fab:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

.snackbar {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--glass);
  backdrop-filter: var(--blur);
  padding: 1rem 2rem;
  border-radius: 0.5rem;
  box-shadow: var(--shadow);
  display: none;
  align-items: center;
  gap: 1rem;
  z-index: 99999;
}

.deleted {
  opacity: 0.5;
  background: rgba(255, 255, 255, 0.5);
}

.attachment-thumbnail {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 0.25rem;
}

#aboutBtn {
  position: absolute;
  top: 1.23rem;
  right: 3.3rem;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 999;
}

#adminPanelBtn {
  position: absolute;
  top: 1.2rem;
  right: 9rem;
  background: none;
  border: none;
  font-size: 0.9rem;
  cursor: pointer;
  z-index: 999;
  display: none;
}

#aboutModal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(3px);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

#aboutModal .about-content {
  background: white;
  padding: 2rem;
  border-radius: 0.2rem;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
  text-align: center;
}

#aboutModal .about-content p {
  margin-bottom: 0.8rem;
}

#aboutModal .about-content .author {
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: gray;
}

#aboutModal .about-content button {
  margin-top: 1rem;
  padding: 0.5rem 1rem;
  border: none;
  background: #4a90e2;
  color: white;
  border-radius: 0.5rem;
  cursor: pointer;
}

body.dark-mode #aboutModal .about-content {
  background: #1f1f1f;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

body.dark-mode #aboutModal .about-content .author {
  color: #aaa;
}

body.dark-mode #aboutModal .about-content button {
  background: #00e5ff;
  color: #000;
}
.verinf {
  position: absolute;
  margin-top: -0.2rem;
  margin-left: -3.5rem;
  font-size: 0.7rem;
  font-weight: 100;
}

#snackbarToken,
.snackbarToken {
  display: none;
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #323232;
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  z-index: 9999;
  font-size: 0.85rem;
}

#openTokenModalBtn {
  position: absolute;
  top: 1.2rem;
  right: 5.2rem;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 999;
}

#resetTokenBtn {
  position: absolute;
  top: 1.2rem;
  right: 7rem;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 999;
}

.description-preview {
  border: 1px solid #ccc;
  padding: 0.5rem;
  margin-top: 0.5rem;
  background: #f9f9f9;
  min-height: 2rem;
  font-family: inherit;
}

.task-dates {
  display: flex;
  justify-content: space-between;
  margin-top: 0.5rem;
  font-size: 0.65rem;
  color: #888;
}

.task-dates small {
  display: block;
}
.task-dates .owner {
  color: #888;
}

.modal.token {
  max-width: 400px;
  padding: 2rem;
  z-index: 55555;
}

#info {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: rgb(158, 152, 152);
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(5px);
  font-size: 1.5rem;
  z-index: 5555;
}

.modal {
  background: var(--glass);
  backdrop-filter: var(--blur);
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 24px;
  border-radius: 0.1rem;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);

  /* NEU: damit der Inhalt scrollbar wird */
  max-height: 90vh;
  overflow-y: auto;
}

.modal form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal input,
.modal select,
.modal textarea {
  font-size: 1.1rem;
  font-family: "Segoe UI", "Roboto", "system-ui", sans-serif;
}

.modal.token input {
  border: 1px solid rgb(185, 179, 179);
  border-radius: 0.3rem;
  padding: 0 0.5rem;
  font-size: 1rem;
  width: 100%;
}

.modal.token button {
  border: 1px solid;
  border-radius: 0.3rem;
  padding: 0.5rem 0.5rem;
  background-color: #4a90e2;
  color: white;
  width: 100%;
  justify-content: center;
  font-size: 1rem;
}

.modal-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 1rem;
}

.modal-buttons button {
  padding: 0.5rem 1rem;
  border-radius: 0.4rem;
  border: none;
  cursor: pointer;
  font-weight: bold;
}

.modal-buttons button[type="submit"] {
  background-color: #4caf50;
  color: white;
}

.modal-buttons button[type="button"] {
  background-color: #462423;
  color: white;
}

.modal-buttons button[type="token"] {
  background-color: #4caf50;
  color: black;
}

#date-till {
  font-size: 1.2rem;
}

/* Halte Overlay immer fullscreen und zentriert mit Flex */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem; /* für Abstand zum Rand */
  box-sizing: border-box;
}

/* Mobile‑Optimierung */
@media (max-width: 480px) {
  .modal {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    border-radius: 0;
    padding: 1.5rem 1rem;
  }
  .modal h2 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
  }
  .modal button {
    width: 100%;
    font-size: 1rem;
    padding: 0.75rem 0;
  }
  /* Spinner und Progress‑Bar breiter machen */
  #uploadProgress {
    width: 100%;
  }
  .spinner {
    width: 4rem;
    height: 4rem;
    border-width: 5px;
  }
}

/* Größere Touch‑Targets überall */
.modal button,
.modal input,
.modal select,
.modal textarea {
  font-size: 1rem;
  line-height: 1.4;
  margin-top: 0.5rem;
}

/* Damit Inputs und Buttons nicht zu schmal werden */
.modal input,
.modal select,
.modal textarea {
  width: 100%;
  box-sizing: border-box;
}

/* Optional: für sehr kleine Smartphones */
@media (max-width: 360px) {
  .modal {
    padding: 1rem 0.5rem;
  }
  .modal h2 {
    font-size: 1.1rem;
  }
}

/* Ansicht Grid - List */

.view-toggle {
  justify-content: flex-end;
  gap: 0.5rem;
  margin: 1rem 1rem;
}

#historyModal {
  position: fixed; /* Aus dem normalen Flow nehmen */
  top: 50%; /* Vertikal in die Mitte des Viewports */
  left: 50%; /* Horizontal in die Mitte des Viewports */
  transform: translate(-50%, -50%); /* Eigene Mitte auf diese Position */
  z-index: 1000; /* Über allem anderen liegen */
  /* optional: fixe Breite/Höhe oder max-width, padding, background, o.ä. */
  max-width: 90%;
  max-height: 90%;
  overflow: auto;
  background: #fff;
  padding: 1rem;
  border-radius: 0.5rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  display: none;
}

.history-btn {
  background: transparent;
  background-color: transparent;
  border: none;
  cursor: pointer;
}

#listViewBtn,
#gridViewBtn {
  border-radius: 0.1rem;
  border: 1px solid rgb(204, 204, 204);
  background: rgb(249, 250, 251);
  cursor: pointer;
}

#dueDateInput {
  color: rgb(143, 140, 140);
}

.task-grid.grid-view .task-card {
  width: 85%;
  max-width: 350px;
}

#created-filter,
#due-filter {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.65rem;
  background: rgba(255, 255, 255, 0);
  transition: all 0.2s;
}

.dates {
  display: flex; /* statt inline-block */
  flex-direction: row; /* horizontal anordnen */
  align-items: center;
}

#created-filter,
#due-filter label {
  white-space: nowrap;
  font-size: 1.1rem;
}

#created-filter,
#due-filter input[type="date"] {
  font-size: 0.65rem;
}

.optionBtns {
  font-size: 1.1rem;
}

.dark-toggle {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(30, 30, 30, 0);
  border: none;
  cursor: pointer;
  z-index: 999;
  font-size: 1rem;
}

#charCount {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.9rem;
}
#charCount.green {
  color: green;
}
#charCount.yellow {
  color: goldenrod;
}
#charCount.orange {
  color: orange;
}
#charCount.red {
  color: red;
}

.calendar {
  font-size: 0.7rem;
  position: absolute;
  top: 4.7rem;
  right: 1.8rem;
  display: block;
}

.user-display {
  font-size: 0.65rem;
  color: #555;
  position: absolute;
  right: 1.8rem;
  display: block;
}

body.dark-mode .user-display {
  color: #ccc;
}

.private label {
  display: inline-flex; /* inline‑Flexbox, damit Inhalt nebeneinander liegt */
  align-items: center; /* vertikal zentrieren */
  white-space: nowrap; /* kein Umbrechen */
  width: auto; /* Breite nach Inhalt */
  max-width: 25%; /* nicht über Parent hinausragen */
  font-size: 1rem;
}

.private label input[type="checkbox"] {
  flex: 0 0 auto; /* Checkbox behält ihre natürliche Größe */
  margin-right: 0.3rem; /* etwas Abstand zum Text */
}

/* Damit das .private‑Div nicht umbrechen muss */
.private {
  display: inline-block;
}

.private-badge {
  position: absolute;
  top: -0.6rem;
  right: 1rem;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  font-size: 0.7rem;
  padding: 0.25rem 0.5rem;
  border-radius: 0.4rem;
  z-index: 10;
  font-weight: 600;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.hidden-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-top: 0.3rem;
}

.red {
  background-color: rgba(255, 0, 0, 0.2);
  padding: 0 4px;
  border-radius: 3px;
}

.green {
  background-color: rgba(0, 128, 0, 0.2);
  padding: 0 4px;
  border-radius: 3px;
}

.yellow {
  background-color: rgba(255, 255, 0, 0.3);
  padding: 0 4px;
  border-radius: 3px;
}

#taskCounter {
  position: absolute;
  top: -0.5rem;
  left: 1rem;
  background: #eee;
  padding: 0.2rem 0.5rem;
  border-radius: 0.5rem;
  border: 1px solid #ccc;
  font-size: 0.65rem;
  color: #333;
}

/* einfacher, zentrierter Spinner */
.spinner {
  margin: 0 auto;
  width: 2rem;
  height: 2rem;
  border: 0.3rem solid #ccc;
  border-top: 0.3rem solid #333;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

#dueSoonCounter {
  position: absolute;
  top: -0.5rem;
  left: 6rem;
  background: #eee;
  padding: 0.2rem 0.5rem;
  border-radius: 0.5rem;
  border: 1px solid #ccc;
  font-size: 0.65rem;
  color: #333;
}

.desc-toggle-btn,
.toggle-attachments-btn {
  font-size: 0.6rem;
  align-items: center;
  padding: 0.2rem;
  background-color: #565858;
}

.desc-toggle-btn {
  position: absolute;
  bottom: 3rem;
  right: 1rem;
}

.toggle-btn {
  margin-top: -14%;
}

.desc-short {
  margin: -2.5rem 0 -0.5rem 0rem;
  margin-bottom: -4rem;
}

.desc-full {
  margin: -3.7rem 0 -0.5rem 0rem;
  margin-bottom: -2.5rem;
}

.aboutTable {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.9rem;
  border: 1px solid transparent;
  text-align: left;
  font-size: 0.7rem;
  line-height: 1rem;
}

#aboutModal p,
th {
  text-align: left;
  padding: 0.5rem 0rem;
}

#due-soon-days {
  display: none;
  transform: translateX(-50%);
  margin-left: 2rem;
}

#dueSoonSettingsBtn {
  background: none;
  border: none;
  cursor: pointer;
  margin-top: -1rem;
  margin-left: -0.5rem;
}

/* Modal für große Beschreibung */
.desc-modal {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  justify-content: center;
  align-items: center;
}
.desc-modal-content {
  background: white;
  padding: 1rem;
  max-width: 80%;
  max-height: 80%;
  overflow-y: auto;
  border-radius: 0.3rem;
  position: relative;
}
.desc-modal-close {
  position: absolute;
  top: 0.5rem;
  right: 1rem;
  font-size: 1.5rem;
  cursor: pointer;
}
.desc-modal-text {
  white-space: pre-wrap;
  word-break: break-word;
}

@media (max-width: 900px) {
  /* List-View bei kleinen Breiten um 50 % verkleinern */
  .task-grid.list-view {
    font-size: 35%; /* reduziert alle Schriftgrößen */
    gap: 0.5rem; /* halbe Abstände */
  }
  .task-grid.list-view .task-card {
    padding: 0.5rem; /* halbes Padding (statt z.B. 1rem) */
    gap: 0.5rem; /* halbe Lücken zwischen Elementen */
  }
  .task-grid.list-view .task-details {
    gap: 0.1rem; /* reduziere falls nötig */
  }
  .task-grid.list-view .task-dates small,
  .task-grid.list-view .task-project,
  .task-grid.list-view .task-floor,
  .task-grid.list-view .task-room {
    font-size: 1.1em; /* passe individuelle Unterüberschriften an */
  }
  .task-grid.list-view .task-details {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 2fr auto auto;
    grid-gap: 0.5rem;
    /* align-items: start; */
    margin-bottom: 1rem;
  }
  .task-grid.list-view .task-actions {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.1rem; /* Abstand zwischen den Buttons */
    margin-right: -0.5rem;
    margin-top: -1.5rem;
  }
}
.task-grid.list-view .task-actions {
  display: flex !important;
  flex-direction: column !important;
  gap: 0.1rem; /* Abstand zwischen den Buttons */
  margin-right: -9.7rem;
  margin-top: -1.5rem;
}

/* Allgemein kleinere Schrift in Listview */
.task-grid.list-view {
  font-size: 0.6rem;
  display: block;
}

.task-grid.list-view .task-description,
.task-grid.list-view .task-project,
.task-grid.list-view .task-floor,
.task-grid.list-view .task-room,
.task-grid.list-view .status-badge,
.task-grid.list-view .attachment-link {
  font-size: 0.55rem;
  flex-wrap: wrap;
}

.task-grid.list-view .history-btn {
  position: absolute;
  top: 1.5rem;
  right: 4.5rem;
}

.task-grid.task-grid.list-view .task-card {
  max-height: 2rem;
  margin: 1rem 0;
}

.task-grid.task-grid.list-view .complete-btn, /* task-btns mobile */
.task-grid.task-grid.list-view .delete-btn,
.task-grid.task-grid.list-view .edit-btn {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: none;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.8rem;
  justify-content: center;
  align-items: center;
}

.task-grid.task-grid.list-view .due-by {
  position: absolute;
  top: 50%;
  right: 1%;
}

.task-grid.task-grid.list-view .created-at {
  position: absolute;
  top: 30%;
  right: 1%;
}

.task-grid.list-view .task-card {
  width: 100%;
  padding: 0.7rem 1rem;
  max-width: none;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  padding: 1rem;
  gap: 1rem;
}

.task-grid.list-view .task-details {
  display: flex;
  gap: 3rem;
  align-items: center;
}

.task-grid.list-view .task-description {
  padding: 0.5rem 0.5rem;
}

.task-grid.list-view .task-actions {
  display: flex; /* statt inline-block */
  flex-direction: row; /* horizontal anordnen */
  align-items: center;
  gap: 0.3rem;
  position: absolute;
  top: 1.6rem;
  right: 9.2rem;
  flex-shrink: 0;
}

.task-grid.list-view .attachments-container {
  width: 100%;
  display: flex; /* statt inline-block */
  flex-direction: row; /* horizontal anordnen */
  align-items: center;
  gap: 0.5rem;
  position: absolute;
  top: 1.8rem;
  right: -50%;
  flex-shrink: 0;
}
/* 1) Container als Grid definieren */
.task-grid.list-view .task-details {
  display: grid;
  grid-template-columns:
    2fr /* Projekt */
    1fr /* Stockwerk */
    1fr /* Raum */
    4fr /* Beschreibung */
    auto /* Aktionen */
    auto; /* Owner / Fälligkeits-Icon etc. */
  grid-gap: 1rem; /* gleichmäßiger Abstand */
  margin-bottom: 1rem; /* Abstand zur nächsten Card */
}

.task-grid.list-view .task-assignee {
  position: absolute;
  top: 0rem;
  left: 19rem;
  font-size: 0.5rem;
}

/* 2) Jede Zelle bekommt ihren Bereich */
.task-grid.list-view .task-project {
  grid-column: 1;
}
.task-grid.list-view .task-floor {
  grid-column: 2;
}
.task-grid.list-view .task-room {
  grid-column: 3;
}
.task-grid.list-view .task-description {
  grid-column: 4;
  /* damit Lange Texte umgebrochen werden */
  white-space: pre-wrap;
  max-height: 2em; /* Optional: begrenzt die Card-Höhe */
  overflow: hidden; /* schneidet Überlauf ab */
  margin-top: -0.3rem;
}
.task-grid.list-view .task-actions {
  grid-column: 5;
}
.task-grid.list-view .task-dates {
  grid-column: 6;
}

/* 3) Einheitliche Mindesthöhe für alle Cards */
.task-grid.list-view .task-card {
  display: block; /* nicht mehr flex, sondern statisch */
  padding: 1rem;
  min-height: 4rem; /* z.B. Höhe, die alle Felder aufnehmen kann */
  box-sizing: border-box;
}

.task-grid.list-view .task-dates small,
.task-grid.list-view .owner {
  font-size: 0.5rem;
}

.task-grid.list-view .owner {
  position: absolute;
  top: 0rem;
  left: 12.8rem;
}

.task-grid.list-view .task-project {
  font-size: 0.9rem;
}

/* Optional: Etwas mehr Reduktion auf sehr kleinen Screens */
@media (max-width: 600px) {
  .task-grid.list-view .task-project {
    font-size: 0.7rem;
  }

  /* Optional: Etwas mehr Reduktion auf sehr kleinen Screens */
  @media (max-width: 400px) {
    .task-grid.list-view .task-project {
      font-size: 0.5rem;
    }
    .task-grid.list-view .task-floor,
    .task-grid.list-view .task-room {
      font-size: 0.4rem;
    }
  }
}

#notifContainer {
  position: absolute;
  top: -0.5rem;
  left: 12rem;
  display: flex; /* <-- Flexbox aktivieren */
  align-items: center; /* <-- Vertikal zentrieren */
  background: #eee;
  padding: 0.2rem 0.5rem;
  border-radius: 0.5rem;
  border: 1px solid #ccc;
  font-size: 0.65rem;
  color: #333;
  gap: 0.5rem; /* optional: Abstand zw. Glocke und Label */
}

#notifContainer label {
  font-size: 0.65rem;
  display: inline-flex;
  align-items: center;
}

#notifBell {
  position: relative;
  cursor: pointer;
  display: inline-flex; /* sorgt dafür, dass das Icon und Badge schön sitzen */
  align-items: center;
}

#notifCount {
  margin-left: 0.2rem;
  font-weight: bold;
}

/* Tooltip weiter so, keine Änderung nötig */
#notifBell::after {
  content: attr(data-tooltip);
  position: absolute;
  top: -2.5rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  padding: 0.3rem 0.6rem;
  border-radius: 0.3rem;
  white-space: nowrap;
  font-size: 0.8rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease-in-out;
}

#notifBell:hover::after {
  opacity: 1;
}
