/* === Reset === */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* === Hidden override === */
[hidden] {
  display: none !important;
}

/* === Body === */
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background: #0f1117;
  color: #e0e0e6;
  min-height: 100vh;
}

/* === Login Screen === */
.login-screen {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

.login-box {
  text-align: center;
  width: 100%;
  max-width: 380px;
  padding: 2rem;
}

.login-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 2rem;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.login-error {
  color: #e5534b;
  font-size: 0.82rem;
  min-height: 1.2em;
}

/* === App Screen === */
.app-screen {
  height: 100vh;
  overflow: hidden;
}

/* === Main Area === */
.main-area {
  flex: 1;
  overflow-y: auto;
  padding: 2rem;
  display: flex;
  flex-direction: column;
}

.main-header {
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.user-display {
  color: #9ca3af;
  font-size: 0.85rem;
}

.btn-small {
  padding: 0.3rem 0.75rem;
  font-size: 0.8rem;
  background: #374151;
  color: #e0e0e6;
  border: 1px solid #4b5563;
  border-radius: 6px;
  cursor: pointer;
}

.btn-small:hover {
  background: #4b5563;
}

.main-title {
  font-size: 1.3rem;
  font-weight: 600;
  color: #fff;
}

/* === Inputs / Forms === */
.input, input[type="text"], input[type="password"], textarea, select {
  background: #1a1b23;
  border: 1px solid #2a2b35;
  color: #e0e0e6;
  padding: 0.6rem 0.85rem;
  border-radius: 8px;
  font-size: 0.88rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
  width: 100%;
}

.input:focus, input[type="text"]:focus, input[type="password"]:focus, textarea:focus, select:focus {
  border-color: #534AB7;
}

select {
  cursor: pointer;
  appearance: auto;
}

textarea {
  resize: vertical;
  min-height: 80px;
}

/* === Buttons === */
.btn {
  background: #534AB7;
  color: #fff;
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, opacity 0.2s;
  font-family: inherit;
}

.btn:hover {
  background: #6358c4;
}

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

.btn-outline {
  background: transparent;
  border: 1px solid #2a2b35;
  color: #b0b0b8;
}

.btn-outline:hover {
  border-color: #534AB7;
  color: #fff;
}

.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.78rem;
  border-radius: 6px;
}

/* === Tabs === */
.tabs {
  display: flex;
  border-bottom: 1px solid #2a2b35;
  margin-bottom: 1.5rem;
}

.tab {
  padding: 0.65rem 1.2rem;
  font-size: 0.88rem;
  color: #888;
  cursor: pointer;
  border: none;
  border-bottom: 2px solid transparent;
  background: none;
  font-family: inherit;
  transition: color 0.2s, border-color 0.2s;
}

.tab:hover {
  color: #c0c0c8;
}

.tab.active {
  color: #fff;
  border-bottom-color: #534AB7;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* === Cards === */
.card {
  background: #1a1b23;
  border: 1px solid #2a2b35;
  border-radius: 10px;
  padding: 1.1rem 1.3rem;
  margin-bottom: 0.75rem;
}

/* === Task Cards === */
.task-card {
  border: 1px solid #2a2b35;
  border-radius: 10px;
  padding: 1rem 1.2rem;
  margin-bottom: 0.6rem;
  border-left: 4px solid #555;
  transition: opacity 0.3s, transform 0.3s, background 0.3s;
}

.task-card.status-offen {
  border-left-color: #e5534b;
  background: linear-gradient(135deg, rgba(229, 83, 75, 0.08), #1a1b23 60%);
}

.task-card.status-in_arbeit {
  border-left-color: #3b82f6;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), #1a1b23 60%);
}

.task-card.status-erledigt {
  border-left-color: #4ade80;
  background: linear-gradient(135deg, rgba(74, 222, 128, 0.08), #1a1b23 60%);
}

.task-card.status-wiedervorlage {
  border-left-color: #eab308;
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.10), #1a1b23 60%);
}

.task-card.status-delegiert {
  border-left-color: #a78bfa;
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.08), #1a1b23 60%);
}

.task-card.erledigt {
  opacity: 0.5;
  transform: scale(0.97);
}

.task-card.erledigt .task-actions {
  pointer-events: none;
  display: none;
}

/* Task Header */
.task-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.78rem;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-dot.status-offen { background: #888; }
.status-dot.status-in_arbeit { background: #3b82f6; }
.status-dot.status-erledigt { background: #4ade80; }
.status-dot.status-wiedervorlage { background: #eab308; }
.status-dot.status-delegiert { background: #a78bfa; }

.task-seit {
  color: #888;
}

.task-created {
  margin-left: auto;
  color: #666;
  font-size: 0.75rem;
}

/* Task Body */
.task-body {
  font-size: 0.88rem;
  line-height: 1.55;
  color: #e0e0e6;
  margin-bottom: 0.5rem;
}

/* Task Meta */
.task-meta {
  display: flex;
  gap: 0.75rem;
  font-size: 0.78rem;
  color: #888;
  margin-bottom: 0.6rem;
  flex-wrap: wrap;
}

.task-meta-item {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.task-meta-label {
  color: #666;
}

/* Task Actions */
.task-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
  padding-top: 0.5rem;
  border-top: 1px solid #2a2b35;
}

.task-actions select {
  width: auto;
  padding: 0.3rem 0.5rem;
  font-size: 0.78rem;
  border-radius: 6px;
}

.task-actions .btn-sm {
  font-size: 0.75rem;
}

/* Delegate dropdown (inline) */
.delegate-dropdown {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.delegate-dropdown select {
  width: auto;
  padding: 0.3rem 0.5rem;
  font-size: 0.78rem;
}

/* === Task Comments === */
.task-comments {
  margin-top: 0.6rem;
  padding-top: 0.5rem;
  border-top: 1px solid #1f2029;
}

.comment {
  padding: 0.4rem 0;
  font-size: 0.8rem;
  color: #b0b0b8;
  border-bottom: 1px solid #1f2029;
}

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

.comment-time {
  font-size: 0.7rem;
  color: #666;
  margin-left: 0.5rem;
}

.comment-form {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.5rem;
}

.comment-form input {
  flex: 1;
  padding: 0.35rem 0.6rem;
  font-size: 0.78rem;
}

.comment-form .btn-sm {
  white-space: nowrap;
}

/* === Neue Aufgabe Form === */
.neue-aufgabe-form {
  background: #14151f;
  border: 1px solid #2a2b35;
  border-radius: 10px;
  padding: 1rem 1.2rem;
  margin-bottom: 1.25rem;
}

.neue-aufgabe-form h3 {
  font-size: 0.9rem;
  color: #fff;
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.form-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

.form-row .input, .form-row select {
  flex: 1;
  min-width: 140px;
}

.form-row .btn {
  flex-shrink: 0;
}

/* === Protocol Cards === */
.protocol-card {
  background: #1a1b23;
  border: 1px solid #2a2b35;
  border-radius: 10px;
  padding: 1.1rem 1.3rem;
  margin-bottom: 0.75rem;
}

.protocol-card-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

.protocol-card-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
}

.protocol-card-body {
  font-size: 0.85rem;
  color: #b0b0b8;
  line-height: 1.55;
  white-space: pre-wrap;
}

.todo-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #534AB7;
  flex-shrink: 0;
}

/* === Badges === */
.badge {
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-weight: 500;
  white-space: nowrap;
}

.badge-wiedervorlage { background: rgba(234, 179, 8, 0.15); color: #eab308; }
.badge-neu { background: rgba(83, 74, 183, 0.15); color: #8b83d6; }
.badge-bereich { background: rgba(255, 255, 255, 0.06); color: #888; font-size: 0.68rem; }

/* === Status Badges === */
.status-badge {
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-weight: 500;
}

.status-badge.status-offen { background: rgba(255,255,255,0.08); color: #b0b0b8; }
.status-badge.status-in_arbeit { background: rgba(59,130,246,0.15); color: #3b82f6; }
.status-badge.status-erledigt { background: rgba(74,222,128,0.15); color: #4ade80; }
.status-badge.status-wiedervorlage { background: rgba(234,179,8,0.15); color: #eab308; }
.status-badge.status-delegiert { background: rgba(167,139,250,0.15); color: #a78bfa; }

/* === Summary Box === */
.summary-box {
  background: #1a1b23;
  border: 1px solid #2a2b35;
  border-radius: 10px;
  padding: 1rem 1.2rem;
  margin-bottom: 1.5rem;
  font-size: 0.88rem;
  line-height: 1.5;
  color: #b0b0b8;
}

.summary-datum {
  font-size: 0.78rem;
  color: #666;
  margin-bottom: 0.3rem;
}

.summary-anwesend {
  font-size: 0.78rem;
  color: #666;
  margin-top: 0.5rem;
}

/* === Extra Sections (Unbekannte Personen, Offene Fragen) === */
.extra-section {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid #2a2b35;
}

.extra-title {
  font-size: 0.85rem;
  color: #888;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.extra-list {
  list-style: none;
  padding: 0;
}

.extra-item {
  font-size: 0.82rem;
  color: #b0b0b8;
  padding: 0.3rem 0 0.3rem 1rem;
  position: relative;
}

.extra-item::before {
  content: "\2022";
  position: absolute;
  left: 0;
  color: #534AB7;
}

/* === Copy Bar === */
.copy-bar {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid #2a2b35;
}

.copy-feedback {
  font-size: 0.82rem;
  color: #4ade80;
  opacity: 0;
  transition: opacity 0.3s;
}

.copy-feedback.visible {
  opacity: 1;
}

/* === Skeleton Tab === */
.skelett-section {
  margin-bottom: 1.5rem;
}

.skelett-section-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 0.75rem;
}

.skelett-card {
  background: #1a1b23;
  border: 1px solid #2a2b35;
  border-radius: 10px;
  padding: 0.9rem 1.1rem;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.skelett-card.removed {
  text-decoration: line-through;
  opacity: 0.4;
}

.skelett-card-content {
  flex: 1;
}

.skelett-card-title {
  font-size: 0.88rem;
  font-weight: 500;
  color: #e0e0e6;
  margin-bottom: 0.25rem;
}

.skelett-card-text {
  font-size: 0.8rem;
  color: #888;
  line-height: 1.4;
}

.skelett-card-person {
  font-size: 0.75rem;
  color: #a78bfa;
  margin-top: 0.2rem;
}

.skelett-remove-btn {
  background: transparent;
  border: 1px solid #2a2b35;
  color: #888;
  border-radius: 6px;
  padding: 0.25rem 0.5rem;
  font-size: 0.72rem;
  cursor: pointer;
  flex-shrink: 0;
  font-family: inherit;
}

.skelett-remove-btn:hover {
  border-color: #e5534b;
  color: #e5534b;
}

.skelett-add-form {
  background: #14151f;
  border: 1px solid #2a2b35;
  border-radius: 10px;
  padding: 1rem 1.2rem;
  margin-bottom: 1.5rem;
}

.skelett-add-form h3 {
  font-size: 0.9rem;
  color: #fff;
  margin-bottom: 0.75rem;
  font-weight: 600;
}

/* === Results Area === */
.results-area {
  flex: 1;
}

/* === Session Counts (sidebar) === */
.session-counts {
  font-size: 0.7rem;
  color: #666;
  margin-top: 0.2rem;
}

/* === Global Filter Bar === */
.global-filter-bar {
  background: #14151f;
  border: 1px solid #2a2b35;
  border-radius: 10px;
  padding: 1rem 1.2rem;
  margin-bottom: 1.25rem;
}

.filter-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.filter-row:last-of-type {
  margin-bottom: 0;
}

.filter-search {
  flex: 1;
  min-width: 200px;
}

.filter-select {
  width: auto;
  min-width: 150px;
}

.filter-date {
  width: auto;
  min-width: 130px;
}

input[type="date"], input[type="search"] {
  background: #1a1b23;
  border: 1px solid #2a2b35;
  color: #e0e0e6;
  padding: 0.6rem 0.85rem;
  border-radius: 8px;
  font-size: 0.88rem;
  font-family: inherit;
  outline: none;
}

input[type="date"]:focus, input[type="search"]:focus {
  border-color: #534AB7;
}

.filter-label {
  font-size: 0.82rem;
  color: #888;
  white-space: nowrap;
}

.filter-status-group {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.filter-status-label {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.78rem;
  color: #b0b0b8;
  cursor: pointer;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  border: 1px solid #2a2b35;
  transition: background 0.15s;
}

.filter-status-label:hover {
  background: rgba(255,255,255,0.05);
}

.filter-status-label input[type="checkbox"] {
  width: auto;
  accent-color: #534AB7;
}

.filter-counter {
  font-size: 0.82rem;
  color: #888;
  margin-top: 0.5rem;
}

.load-more-container {
  text-align: center;
  padding: 1rem;
}

/* === View Toggle === */
.view-toggle {
  display: flex;
  gap: 0;
  border: 1px solid #2a2b35;
  border-radius: 8px;
  overflow: hidden;
}

.view-toggle-btn {
  background: transparent;
  border: none;
  color: #888;
  padding: 0.4rem 1rem;
  font-size: 0.82rem;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.view-toggle-btn:not(:last-child) {
  border-right: 1px solid #2a2b35;
}

.view-toggle-btn.active {
  background: #534AB7;
  color: #fff;
}

.view-toggle-btn:hover:not(.active) {
  background: rgba(255,255,255,0.05);
  color: #e0e0e6;
}

/* === Kanban Board === */
.kanban-board {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding-bottom: 1rem;
  min-height: 400px;
}

.kanban-column {
  flex: 1;
  min-width: 200px;
  max-width: 280px;
  display: flex;
  flex-direction: column;
}

.kanban-column-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0.8rem;
  border-radius: 8px 8px 0 0;
  margin-bottom: 0;
}

.kanban-column-header.status-bg-offen {
  background: rgba(229, 83, 75, 0.15);
  border-bottom: 2px solid #e5534b;
}

.kanban-column-header.status-bg-in_arbeit {
  background: rgba(59, 130, 246, 0.15);
  border-bottom: 2px solid #3b82f6;
}

.kanban-column-header.status-bg-wiedervorlage {
  background: rgba(234, 179, 8, 0.15);
  border-bottom: 2px solid #eab308;
}

.kanban-column-header.status-bg-delegiert {
  background: rgba(167, 139, 250, 0.15);
  border-bottom: 2px solid #a78bfa;
}

.kanban-column-header.status-bg-erledigt {
  background: rgba(74, 222, 128, 0.15);
  border-bottom: 2px solid #4ade80;
}

.kanban-column-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: #e0e0e6;
}

.kanban-column-count {
  font-size: 0.72rem;
  background: rgba(255,255,255,0.1);
  color: #b0b0b8;
  padding: 0.1rem 0.45rem;
  border-radius: 10px;
  font-weight: 600;
}

.kanban-cards {
  flex: 1;
  background: rgba(20, 21, 31, 0.5);
  border: 1px solid #2a2b35;
  border-top: none;
  border-radius: 0 0 8px 8px;
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  overflow-y: auto;
  max-height: 600px;
}

.kanban-card {
  background: #1a1b23;
  border: 1px solid #2a2b35;
  border-left: 4px solid #eab308;
  border-radius: 8px;
  padding: 0.7rem 0.8rem;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}

.kanban-card:hover {
  background: #1e1f2a;
  transform: translateY(-1px);
}

.kanban-card-title {
  font-size: 0.82rem;
  color: #e0e0e6;
  line-height: 1.4;
  margin-bottom: 0.4rem;
}

.kanban-card-meta {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 0.3rem;
}

.kanban-card-person {
  font-size: 0.7rem;
  background: rgba(83, 74, 183, 0.2);
  color: #8b83d6;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  font-weight: 600;
}

.kanban-card-frist {
  font-size: 0.7rem;
  background: rgba(255,255,255,0.06);
  color: #888;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
}

.kanban-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.3rem;
}

.kanban-card-bereich {
  font-size: 0.68rem;
  color: #666;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kanban-prio-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.kanban-empty {
  font-size: 0.78rem;
  color: #555;
  text-align: center;
  padding: 1.5rem 0.5rem;
  font-style: italic;
}

/* === Badge Overdue === */
.badge-overdue {
  font-size: 0.68rem;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  background: rgba(229, 83, 75, 0.2);
  color: #e5534b;
  font-weight: 600;
}

/* === Inline Edit === */
.inline-edit-container {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.inline-edit-textarea {
  width: 100%;
  background: #14151f;
  border: 1px solid #534AB7;
  color: #e0e0e6;
  padding: 0.6rem;
  border-radius: 8px;
  font-size: 0.88rem;
  font-family: inherit;
  resize: vertical;
  min-height: 60px;
}

.inline-edit-buttons {
  display: flex;
  gap: 0.4rem;
}

/* === Modal === */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.modal-content {
  background: #1a1b23;
  border: 1px solid #2a2b35;
  border-radius: 12px;
  width: 100%;
  max-width: 700px;
  max-height: 85vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 1.5rem;
  border-bottom: 1px solid #2a2b35;
}

.modal-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
}

.modal-close {
  background: none;
  border: none;
  color: #888;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.modal-close:hover {
  color: #fff;
}

.modal-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.modal-section {
  padding-bottom: 1rem;
  border-bottom: 1px solid #2a2b35;
}

.modal-section:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.modal-section-label {
  font-size: 0.82rem;
  color: #888;
  font-weight: 600;
  margin-bottom: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.modal-textarea {
  width: 100%;
  background: #14151f;
  border: 1px solid #2a2b35;
  color: #e0e0e6;
  padding: 0.75rem;
  border-radius: 8px;
  font-size: 0.88rem;
  font-family: inherit;
  resize: vertical;
  min-height: 80px;
}

.modal-textarea:focus {
  border-color: #534AB7;
  outline: none;
}

.modal-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.modal-meta-row {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.modal-meta-label {
  font-size: 0.72rem;
  color: #666;
  text-transform: uppercase;
}

.modal-meta-value {
  font-size: 0.85rem;
  color: #e0e0e6;
}

.modal-actions-row {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}

.modal-actions-row select {
  width: auto;
  min-width: 130px;
}

.modal-comment {
  padding: 0.5rem 0;
  font-size: 0.82rem;
  color: #b0b0b8;
  border-bottom: 1px solid #1f2029;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
}

.modal-comment:last-of-type {
  border-bottom: none;
}

.modal-comment-time {
  font-size: 0.7rem;
  color: #666;
  white-space: nowrap;
}

.modal-comment-form {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.6rem;
}

.modal-comment-form input {
  flex: 1;
  padding: 0.4rem 0.6rem;
  font-size: 0.82rem;
}

.modal-empty {
  font-size: 0.82rem;
  color: #666;
  font-style: italic;
}

/* Timeline */
.modal-timeline {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.modal-timeline-entry {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.82rem;
  padding: 0.3rem 0;
}

.timeline-icon {
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.timeline-desc {
  color: #b0b0b8;
  flex: 1;
}

.timeline-time {
  color: #666;
  font-size: 0.72rem;
  white-space: nowrap;
}

/* === Dashboard === */
.dashboard-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.dashboard-card {
  background: #14151f;
  border: 1px solid #2a2b35;
  border-top: 3px solid #534AB7;
  border-radius: 10px;
  padding: 1.2rem;
  text-align: center;
}

.dashboard-card-number {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}

.dashboard-card-label {
  font-size: 0.82rem;
  color: #888;
}

.dashboard-section {
  margin-bottom: 2rem;
}

.dashboard-section-title {
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 1rem;
}

.dashboard-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.dashboard-table th {
  text-align: left;
  padding: 0.6rem 0.8rem;
  border-bottom: 2px solid #2a2b35;
  color: #888;
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
}

.dashboard-table td {
  padding: 0.6rem 0.8rem;
  border-bottom: 1px solid #1f2029;
  color: #e0e0e6;
}

.dashboard-table tbody tr:hover {
  background: rgba(83, 74, 183, 0.05);
}

/* Bar Chart */
.bar-chart {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.chart-legend {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.82rem;
  color: #888;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  display: inline-block;
}

.bar-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.bar-label {
  width: 70px;
  font-size: 0.78rem;
  color: #888;
  text-align: right;
  flex-shrink: 0;
}

.bar-bars {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.bar-fill {
  height: 18px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  padding-left: 0.4rem;
  min-width: 2%;
  transition: width 0.3s;
}

.bar-erstellt {
  background: rgba(83, 74, 183, 0.6);
}

.bar-erledigt {
  background: rgba(74, 222, 128, 0.4);
}

.bar-value {
  font-size: 0.7rem;
  color: #fff;
}

/* === Sitzungen Browse === */
.sitzung-browse-card {
  background: #1a1b23;
  border: 1px solid #2a2b35;
  border-radius: 10px;
  padding: 1rem 1.2rem;
  margin-bottom: 0.6rem;
  transition: background 0.15s;
}

.sitzung-browse-card:hover {
  background: #1e1f2a;
}

.sitzung-browse-card.active {
  border-color: #534AB7;
  background: rgba(83, 74, 183, 0.08);
}

.sitzung-browse-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.4rem;
}

.sitzung-browse-datum {
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
}

.sitzung-browse-counts {
  font-size: 0.75rem;
  color: #888;
}

.sitzung-browse-summary {
  font-size: 0.82rem;
  color: #b0b0b8;
  line-height: 1.5;
}

.sitzung-detail-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
  margin: 0.75rem 0 1rem;
}

/* === Thema-Kontext === */
.task-thema-kontext {
  font-size: 0.78rem;
  color: #888;
  background: rgba(83, 74, 183, 0.06);
  border-left: 2px solid #534AB7;
  padding: 0.4rem 0.6rem;
  margin-bottom: 0.5rem;
  border-radius: 0 6px 6px 0;
  line-height: 1.4;
}

/* === Print === */
@media print {
  body { background: #fff; color: #000; }
  .tabs, .global-filter-bar, .task-actions,
  .btn, .modal-overlay { display: none !important; }
  .main-area { padding: 0; }
  .task-card { background: #fff; border: 1px solid #ddd; }
  .dashboard-card { background: #f5f5f5; border: 1px solid #ddd; }
}

/* === Responsive === */
@media (max-width: 768px) {
  .main-area {
    padding: 1rem;
  }

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

  .task-actions {
    flex-direction: column;
    align-items: flex-start;
  }

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

  .modal-overlay {
    padding: 1rem;
  }

  .modal-meta-grid {
    grid-template-columns: 1fr;
  }

  .filter-row {
    flex-direction: column;
  }

  .filter-search, .filter-select, .filter-date {
    width: 100%;
    min-width: unset;
  }

  .kanban-board {
    flex-direction: row;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .kanban-column {
    min-width: 240px;
  }

  .activity-entry {
    flex-wrap: wrap;
  }
}

/* Activity Feed */
.activity-feed {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.activity-entry {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid #2a2a2a;
}

.activity-entry:last-child {
  border-bottom: none;
}

.activity-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.activity-task-link {
  color: #93c5fd;
  text-decoration: none;
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.activity-task-link:hover {
  text-decoration: underline;
  color: #bfdbfe;
}

.activity-person-badge {
  background: #334155;
  color: #e2e8f0;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
  align-self: flex-start;
}

.activity-more {
  margin-top: 1rem;
  align-self: center;
}

/* Meeting Management */
.meeting-phase-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 0;
  margin-bottom: 1rem;
  border-bottom: 1px solid #2a2a2a;
  flex-wrap: wrap;
}

.meeting-phase-indicator {
  font-weight: 700;
  font-size: 1rem;
  color: #e2e8f0;
}

.meeting-phase-indicator--active {
  color: #4ade80;
}

.meeting-phase-indicator--active::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4ade80;
  margin-right: 0.5rem;
  animation: pulse-dot 1.5s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.meeting-meta-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
  color: #888;
}

.meeting-meta-bar label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.meeting-meta-bar input[type="date"] {
  max-width: 180px;
}

.attendee-bar {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.attendee-chip {
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  border: 1px solid #444;
  background: transparent;
  color: #888;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.attendee-chip--selected {
  background: #334155;
  color: #e2e8f0;
  border-color: #4ade80;
}

.attendee-chip:hover {
  border-color: #888;
}

.agenda-card {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem;
  background: #1a1b23;
  border-radius: 6px;
  margin-bottom: 0.5rem;
  transition: opacity 0.2s;
}

.agenda-card--besprochen {
  opacity: 0.5;
}

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

.agenda-checkbox {
  margin-top: 0.25rem;
  cursor: pointer;
  accent-color: #4ade80;
}

.meeting-summary-form {
  background: #14151f;
  border-radius: 8px;
  padding: 1.5rem;
  margin-top: 1rem;
}

.meeting-summary-form textarea {
  margin-top: 0.75rem;
}

.skelett-card--editable {
  cursor: pointer;
  border-bottom: 1px dashed transparent;
  transition: border-color 0.15s;
}

.skelett-card--editable:hover {
  border-bottom-color: #555;
}

/* === Collapsible Blocks === */
.collapsible {
  margin-bottom: 1rem;
}

.collapsible-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.75rem;
  background: #1a1d27;
  border: 1px solid #2a2d3a;
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s;
}

.collapsible-header:hover {
  background: #22253a;
}

.collapsible-arrow {
  font-size: 0.7rem;
  color: #888;
  transition: transform 0.2s;
  width: 1rem;
  text-align: center;
}

.collapsible--open > .collapsible-header .collapsible-arrow {
  transform: rotate(90deg);
}

.collapsible-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: #c0c0cc;
}

.collapsible-count {
  font-size: 0.7rem;
  color: #888;
  background: #2a2d3a;
  padding: 0.1rem 0.5rem;
  border-radius: 10px;
}

.collapsible-master-cb {
  margin-left: auto;
  cursor: pointer;
  width: 16px;
  height: 16px;
}

.collapsible-body {
  overflow: hidden;
  max-height: 5000px;
  transition: max-height 0.3s ease, opacity 0.2s;
  opacity: 1;
  padding-top: 0.5rem;
}

.collapsible--collapsed > .collapsible-body {
  max-height: 0;
  opacity: 0;
  padding-top: 0;
}

/* === Verwaiste Themen === */
.orphan-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  background: #16181f;
  border: 1px solid #2a2d3a;
  border-radius: 6px;
  margin-bottom: 0.35rem;
  opacity: 0.7;
}

.orphan-card:hover {
  opacity: 1;
}

.orphan-card-text {
  flex: 1;
  font-size: 0.8rem;
  color: #aaa;
}

.orphan-card-thema {
  font-size: 0.7rem;
  color: #666;
}

.orphan-restore-btn {
  font-size: 0.7rem;
  padding: 0.2rem 0.6rem;
  background: transparent;
  border: 1px solid #4ade80;
  color: #4ade80;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
}

.orphan-restore-btn:hover {
  background: rgba(74, 222, 128, 0.1);
}

/* === Inline Meta Selects (Detail Popup) === */
.meta-inline-select {
  background: #1a1d27;
  color: #e0e0e6;
  border: 1px solid #2a2d3a;
  border-radius: 4px;
  padding: 0.15rem 0.3rem;
  font-size: 0.8rem;
  cursor: pointer;
}

.meta-inline-select:hover {
  border-color: #555;
}

.meta-inline-select:focus {
  outline: none;
  border-color: #3b82f6;
}
