/* --- Global Styles --- */
body {
  font-family: Arial, sans-serif;
  background-color: #ECF0F1; /* Sehr helles Grau – Hintergrund für Legacy-Seiten */
  color: #333;
  margin: 0;
  padding: 0;
}

/* --- Cards / Tasks (generische Card-Optik, nicht Kanban-spezifisch) --- */
.cards-container {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 5px;
  border: 1px dashed #ccc;
  min-height: 150px; /* Sorgt für eine konstante Drop-Zone */
  position: relative;
}

.card {
  background-color: #FFFFFF;
  border-radius: 4px;
  padding: 10px;
  margin-bottom: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  position: relative;
  transition: transform 0.2s;
}

.card h3 {
  margin: 0 0 5px;
}

.card p {
  margin: 0;
  font-size: 0.9em;
  color: #555;
}

/* Kartenakzente – je nach Typ */
.card-critical {
  border-left: 4px solid #E74C3C; /* Kräftiges Rot */
}

.card-normal {
  border-left: 4px solid #3498DB; /* Sattes Blau */
}

.card-optional {
  border-left: 4px solid #27AE60; /* Frisches Grün */
}

/* --- Icons in Cards --- */
.fa {
  padding-bottom: 15px;
  /* color: #4582ff; */
  font-size: 24px;
}

.card .drag-handle {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #7F8C8D; /* Neutrales Dunkelgrau */
  cursor: move;
  font-size: 16px;
}

.card .close-icon {
  position: absolute;
  right: 10px;
  top: 10px;
  color: #95A5A6; /* Neutrales Grau */
  cursor: pointer;
  font-size: 16px;
  transition: color 0.2s;
}

.card .close-icon:hover {
  color: #E74C3C;
}

.card .card-content {
  margin-left: 30px;
  margin-right: 30px;
}

/* Task-Actions (Legacy) */
.task-actions {
  /* Beispiel: Anheben um 4px */
  transform: translateY(-8px);
}

/* --- Karten-Hinzufügen-Button (generisch) --- */
.card-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0.1);
  border: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.card-button:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 8px rgba(0,0,0,0.4);
}

/* --- Goals Section (Legacy-Zielübersicht als Liste) --- */
.goals-section {
  padding: 20px;
}

.goals-section .list-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
}

.goals-section .list-group-item {
  flex: 1 1 calc(33.333% - 10px);
  box-sizing: border-box;
  padding: 10px;
  background: #f5f5f5;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.goals-section .list-group-item h5 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 10px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* --- Formulare --- */
form {
  margin-bottom: 0px;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 20px;
}

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

label {
  display: block;
  margin-bottom: 5px;
}

select,
button,
input[type="text"],
input[type="email"],
input[type="password"] {
  width: 100%;
  padding: 8px;
  box-sizing: border-box;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.form-actions {
  text-align: center;
}

/* --- Modal Styles (allgemeines Modal, NICHT WYSIWYG) --- */
.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  width: 90%;
  max-width: 600px;
  max-height: 90vh; /* maximal 90% der Viewport-Höhe */
  overflow-y: auto; /* Inhalt scrollbar, wenn zu lang */
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  padding: 20px;
  z-index: 1000;
  display: none; /* standardmäßig versteckt */
}

.modal h3 {
  margin-top: 0;
  text-align: center;
}

.modal .form-group {
  margin-bottom: 15px;
  display: flex;
  flex-direction: column;
}

.modal .form-group label {
  margin-bottom: 5px;
  font-weight: bold;
}

.modal .form-group input[type="text"],
.modal .form-group input[type="datetime-local"],
.modal .form-group input[type="url"],
.modal .form-group select,
.modal .form-group textarea,
.modal .form-group input[type="file"] {
  padding: 8px;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.modal .form-actions {
  text-align: right;
}

.modal .form-actions button {
  padding: 10px 15px;
  font-size: 1rem;
  margin-left: 10px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.modal .form-actions button[type="submit"] {
  background-color: #3572ef;
  color: #fff;
}

.modal .form-actions button[type="button"] {
  background-color: #ccc;
  color: #000;
}

/* Responsive Anpassungen für Modal */
@media (max-width: 480px) {
  .modal {
    padding: 15px;
    width: 95%;
  }

  .modal .form-actions {
    text-align: center;
  }

  .modal .form-actions button {
    margin: 5px 0;
    width: 100%;
  }
}

/* --- Fehlermeldungen & Warnungen --- */
.error,
.message {
  padding: 15px;
  margin-bottom: 20px;
  border: 1px solid transparent;
  border-radius: 4px;
}

.error {
  color: #a94442;
  background-color: #f2dede;
  border-color: #ebccd1;
}

.message {
  color: #3c763d;
  background-color: #dff0d8;
  border-color: #d6e9c6;
}

.alert {
  padding: 15px;
  margin-bottom: 20px;
  border: 1px solid transparent;
  border-radius: 4px;
}

.alert-success {
  color: #3c763d;
  background-color: #dff0d8;
  border-color: #d6e9c6;
}

.alert-danger {
  color: #a94442;
  background-color: #f2dede;
  border-color: #ebccd1;
}

.warning {
  font-weight: bold;
  color: #d9534f;
}

/* --- Login Container --- */
.login-container {
  width: 300px;
  margin: 100px auto;
  background: #fff;
  padding: 20px;
  border: 1px solid #ccc;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

/* --- Notification Form & Table (Admin-Bereich) --- */
.notification-form,
.notification-table {
  margin: 20px auto;
  max-width: 800px;
  padding: 15px;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #f9f9f9;
}

.notification-form h2,
.notification-table h2 {
  text-align: center;
}

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

.notification-form label {
  display: block;
  margin-bottom: 5px;
}

.notification-form input[type="text"],
.notification-form textarea,
.notification-form select {
  width: 100%;
  padding: 8px;
  box-sizing: border-box;
}

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

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

table,
th,
td {
  border: 1px solid #ccc;
}

th,
td {
  padding: 8px;
  text-align: left;
}

/* --- Responsive Anpassungen für Goals-Liste --- */
@media (max-width: 768px) {
  .goals-section .list-group-item {
    flex: 1 1 calc(50% - 10px);
  }
}

@media (max-width: 480px) {
  .goals-section .list-group-item {
    flex: 1 1 100%;
  }
}

/* --- Allgemeine mobile Anpassungen --- */
@media (max-width: 600px) {
  .modal {
    left: 5%;
    width: 90%;
  }

  .admin-nav ul,
  .user-nav ul {
    flex-direction: column;
    display: none;
  }

  .admin-nav.mobile-active ul,
  .user-nav.mobile-active ul {
    display: block;
  }

  .admin-nav .menu-toggle,
  .user-nav .menu-toggle {
    display: block;
  }
}

/* --- Gruppenmanagement --- */
.group-filter {
  margin-bottom: 20px;
}

.group-filter select {
  padding: 8px 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 16px;
  width: 100%;
  max-width: 300px;
}