/* ============================================================
   DashboardTasksTab — Vereinheitlichte Aufgabenliste
   ============================================================ */

.root {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* ── Header ── */

.header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-text);
  margin: 0;
}

.legend {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

.legendLabel {
  margin-right: 0.625rem;
}

/* ── Source Badges ── */

.badgeGroup {
  display: flex;
  gap: 3px;
  flex-shrink: 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.625rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 0.0625rem 0.4375rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
}

.badgeO365 {
  background: rgba(59, 130, 246, 0.12);
  color: var(--color-primary);
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.badgeCrm {
  background: rgba(249, 115, 22, 0.1);
  color: #f97316;
  border: 1px solid rgba(249, 115, 22, 0.3);
}

/* ── Liste ── */

.list {
  display: flex;
  flex-direction: column;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

/* ── Task-Zeile ── */

.taskRow {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--color-border);
  border-left: 3px solid transparent;
  transition: background 0.1s;
}

.taskRow:last-child {
  border-bottom: none;
}

.taskRow:hover {
  background: rgba(59, 130, 246, 0.03);
}

/* Farbige linke Linie je nach Quelle */
.taskRow_o365 {
  border-left-color: var(--color-primary);
}

.taskRow_crm {
  border-left-color: #f97316;
}

.taskRow_synced {
  border-left-color: #22c55e; /* Grün für synchronisiert */
}

/* ── Task Inhalt ── */

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

.taskTitle {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-text);
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.taskMeta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.taskMetaLink {
  font-size: 0.75rem;
  color: var(--color-primary);
  text-decoration: none;
  white-space: nowrap;
}

.taskMetaLink:hover {
  text-decoration: underline;
}

.taskDue {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  white-space: nowrap;
}

.taskDueOverdue {
  color: #ef4444;
  font-weight: 600;
}

.taskImportance {
  font-size: 0.75rem;
  font-weight: 700;
  color: #ef4444;
  flex-shrink: 0;
}

/* ── Aktions-Buttons ── */

.taskActions {
  display: flex;
  gap: 0.375rem;
  flex-shrink: 0;
}

.actionPush {
  padding: 0.25rem 0.625rem;
  background: rgba(249, 115, 22, 0.08);
  border: 1px solid rgba(249, 115, 22, 0.3);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  color: #f97316;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.actionPush:hover:not(:disabled) {
  background: rgba(249, 115, 22, 0.15);
  border-color: #f97316;
}

.actionPush:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.actionComplete {
  padding: 0.25rem 0.625rem;
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  color: #22c55e;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.actionComplete:hover:not(:disabled) {
  background: rgba(34, 197, 94, 0.15);
  border-color: #22c55e;
}

.actionComplete:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ── Status / Leer-Zustände ── */

.status {
  color: var(--color-text-muted);
  font-size: 0.9375rem;
  padding: 1rem 0;
}

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  text-align: center;
  gap: 0.5rem;
}

.emptyIcon {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.emptyTitle {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-text);
  margin: 0;
}

.emptySub {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  margin: 0;
}

/* ── Hinweis ── */

.hint {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin: 0;
}

.hintLink {
  color: var(--color-primary);
  text-decoration: none;
}

.hintLink:hover {
  text-decoration: underline;
}
