﻿*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #08111f;
  --bg-elevated: #0d1628;
  --surface: rgba(15, 24, 42, 0.86);
  --surface-solid: #111c31;
  --surface-2: rgba(37, 54, 86, 0.7);
  --surface-3: rgba(72, 95, 138, 0.18);
  --border: rgba(148, 163, 184, 0.18);
  --border-strong: rgba(129, 140, 248, 0.34);
  --text: #eef2ff;
  --text-soft: #cdd8f5;
  --text-muted: #8ea2c9;
  --text-faint: #6f82ab;
  --radius: 18px;
  --radius-sm: 12px;
  --radius-xs: 10px;
  --accent: #7c6cff;
  --accent-strong: #5b7cff;
  --accent-soft: #8d9bff;
  --accent-cyan: #38bdf8;
  --danger: #f36d8d;
  --success: #46d39a;
  --warning: #ffb84d;
  --shadow-lg: 0 30px 70px rgba(2, 6, 23, 0.42);
  --shadow-md: 0 18px 42px rgba(2, 6, 23, 0.28);
  --shadow-sm: 0 10px 24px rgba(2, 6, 23, 0.18);
}

body {
  background:
    radial-gradient(circle at top left, rgba(124, 108, 255, 0.18), transparent 32%),
    radial-gradient(circle at top right, rgba(56, 189, 248, 0.14), transparent 28%),
    linear-gradient(180deg, #0a1222 0%, #08111f 46%, #070d18 100%);
  color: var(--text);
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ── Header ── */
.header {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.4rem;
  background: rgba(8, 14, 27, 0.78);
  backdrop-filter: blur(22px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  box-shadow: 0 14px 36px rgba(2, 6, 23, 0.18);
  flex-shrink: 0;
  gap: 1rem;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  min-width: 0;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--text-soft);
  font-size: 0.84rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.58rem 0.92rem;
  border-radius: 999px;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
  white-space: nowrap;
}
.back-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(129, 140, 248, 0.28);
  background: rgba(124, 108, 255, 0.12);
  color: #fff;
}

.header h1 {
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  font-weight: 800;
  color: #f7f9ff;
  letter-spacing: -0.02em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.board-filter-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(148, 163, 184, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.board-filter-btn {
  min-height: 38px;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.board-filter-btn:hover {
  color: #eef2ff;
  transform: translateY(-1px);
}

.board-filter-btn.active {
  color: #fff;
  background: linear-gradient(135deg, rgba(108, 99, 255, 0.92), rgba(129, 140, 248, 0.92));
  border-color: rgba(167, 139, 250, 0.36);
  box-shadow: 0 12px 26px rgba(99, 102, 241, 0.24);
}

.header button,
.btn-primary,
.assign-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.72rem 1.12rem;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 700;
  box-shadow: 0 16px 34px rgba(91, 124, 255, 0.24);
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.header button:hover,
.btn-primary:hover,
.assign-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 20px 40px rgba(91, 124, 255, 0.28);
  opacity: 0.96;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  padding: 0.32rem 0.75rem 0.32rem 0.32rem;
  flex-shrink: 0;
}

.logout-form {
  display: flex;
}

.user-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.06);
}

.user-info span {
  font-size: 0.88rem;
  font-weight: 600;
}

.profile-menu {
  position: relative;
  flex-shrink: 0;
}

.profile-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  background: rgba(255, 255, 255, 0.05) !important;
  color: var(--text) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 999px !important;
  padding: 0.34rem 0.85rem 0.34rem 0.34rem !important;
  min-height: 42px;
  box-shadow: none !important;
}

.profile-toggle:hover {
  opacity: 1 !important;
  background: rgba(124, 108, 255, 0.12) !important;
  border-color: rgba(129, 140, 248, 0.28) !important;
}

.profile-name {
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
}

.profile-caret {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.profile-dropdown {
  position: absolute;
  top: calc(100% + 0.8rem);
  right: 0;
  width: min(340px, calc(100vw - 2rem));
  background: rgba(10, 18, 34, 0.96);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 22px;
  box-shadow: var(--shadow-lg);
  padding: 1rem;
  z-index: 80;
}

.profile-dropdown.hidden {
  display: none;
}

.profile-dropdown-head {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding-bottom: 0.95rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.profile-dropdown-avatar {
  width: 46px;
  height: 46px;
}

.profile-meta {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
  min-width: 0;
}

.profile-meta strong {
  font-size: 0.98rem;
}

.profile-meta span {
  font-size: 0.8rem;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-dropdown-section {
  padding: 0.95rem 0;
}

.profile-status-section {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.profile-status-field {
  display: flex;
  flex-direction: column;
  gap: 0.34rem;
  font-size: 0.78rem;
  color: var(--text-soft);
}

.profile-status-field select,
.profile-status-field input {
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  padding: 0.72rem 0.8rem;
  font: inherit;
}

.profile-vacation-range {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.profile-vacation-range.hidden {
  display: none;
}

.profile-status-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.profile-status-meta {
  color: var(--text-muted);
  font-size: 0.74rem;
}

.profile-status-save {
  min-width: 128px;
  padding: 0.7rem 0.9rem !important;
}

.profile-dropdown-label {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 0.7rem;
}

.profile-roles {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.profile-role-badge {
  --role-accent: #6c63ff;
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0.3rem 0.74rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--role-accent) 38%, transparent);
  background: color-mix(in srgb, var(--role-accent) 16%, rgba(255, 255, 255, 0.04));
  color: color-mix(in srgb, var(--role-accent) 70%, white);
  font-size: 0.77rem;
  font-weight: 700;
}

.profile-empty {
  color: var(--text-muted);
  font-size: 0.84rem;
}

.profile-logout-form {
  margin-top: 0.2rem;
}

.profile-logout-btn {
  width: 100%;
  justify-content: center;
  background: rgba(243, 109, 141, 0.08) !important;
  border: 1px solid rgba(243, 109, 141, 0.24) !important;
  color: #ffb3c4 !important;
  border-radius: 14px !important;
  padding: 0.78rem 1rem !important;
  box-shadow: none !important;
}

.profile-logout-btn:hover {
  opacity: 1 !important;
  background: rgba(243, 109, 141, 0.16) !important;
}

.logout-btn {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-decoration: none;
  margin-left: 0.25rem;
  transition: color 0.2s;
}
.logout-form .logout-btn {
  background: none;
  border: none;
  padding: 0;
}
.logout-btn:hover { color: var(--danger); }

/* ── Board ── */
.board-shell {
  display: block;
  padding: 1.5rem;
  flex: 1;
  min-height: 0;
  position: relative;
}

.board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.15rem;
  align-items: start;
  min-width: 0;
}

.team-sidebar {
  position: fixed;
  top: 6.4rem;
  right: 1.5rem;
  width: 340px;
  max-width: calc(100vw - 2rem);
  z-index: 40;
  transition: transform 0.24s ease;
}

.team-sidebar.is-collapsed {
  transform: translateX(calc(100% + 1.1rem));
}

.team-sidebar-toggle {
  position: absolute;
  top: 50%;
  left: -0.8rem;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: linear-gradient(180deg, rgba(18, 28, 48, 0.98), rgba(10, 18, 34, 0.98));
  color: #eef2ff;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 14px 28px rgba(2, 6, 23, 0.28);
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
  z-index: 2;
  transform: translateY(-50%);
}

.team-sidebar-toggle:hover {
  transform: translateY(calc(-50% - 1px)) scale(1.02);
  background: linear-gradient(180deg, rgba(28, 43, 78, 0.98), rgba(14, 24, 42, 0.98));
  border-color: rgba(129, 140, 248, 0.26);
}

.team-sidebar.is-collapsed .team-sidebar-toggle {
  transform: translateY(-50%) rotate(180deg);
}

.team-sidebar-card {
  position: sticky;
  top: 0;
  background: linear-gradient(180deg, rgba(15, 24, 42, 0.94), rgba(10, 18, 34, 0.92));
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 26px;
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-height: calc(100vh - 7rem);
  box-shadow: var(--shadow-md);
  transition: opacity 0.18s ease, filter 0.18s ease;
}

.team-sidebar.is-collapsed .team-sidebar-card {
  opacity: 0.62;
  filter: saturate(0.8);
}

.team-sidebar-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.team-sidebar-head h2 {
  font-size: 1.08rem;
  font-weight: 800;
}

.team-sidebar-eyebrow {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-faint);
  margin-bottom: 0.28rem;
}

.team-online-pill {
  background: rgba(124, 108, 255, 0.12);
  color: #d8d3ff;
  border: 1px solid rgba(129, 140, 248, 0.22);
  border-radius: 999px;
  padding: 0.38rem 0.7rem;
  font-size: 0.74rem;
  font-weight: 700;
  white-space: nowrap;
}

.team-sidebar-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  overflow-y: auto;
  padding-right: 0.2rem;
}

.team-sidebar-loading,
.team-sidebar-empty {
  color: var(--text-muted);
  font-size: 0.88rem;
  padding: 0.45rem 0.1rem;
}

.board,
.team-sidebar-list,
.drawer-body,
.assignee-results,
.tag-suggestions {
  scrollbar-width: thin;
  scrollbar-color: #6c63ff #1b1f2d;
}

.board::-webkit-scrollbar,
.team-sidebar-list::-webkit-scrollbar,
.drawer-body::-webkit-scrollbar,
.assignee-results::-webkit-scrollbar,
.tag-suggestions::-webkit-scrollbar {
  width: 11px;
  height: 11px;
}

.board::-webkit-scrollbar-track,
.team-sidebar-list::-webkit-scrollbar-track,
.drawer-body::-webkit-scrollbar-track,
.assignee-results::-webkit-scrollbar-track,
.tag-suggestions::-webkit-scrollbar-track {
  background: #1b1f2d;
  border-radius: 999px;
}

.board::-webkit-scrollbar-thumb,
.team-sidebar-list::-webkit-scrollbar-thumb,
.drawer-body::-webkit-scrollbar-thumb,
.assignee-results::-webkit-scrollbar-thumb,
.tag-suggestions::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #7d76ff 0%, #5f58eb 100%);
  border: 2px solid #1b1f2d;
  border-radius: 999px;
}

.board::-webkit-scrollbar-thumb:hover,
.team-sidebar-list::-webkit-scrollbar-thumb:hover,
.drawer-body::-webkit-scrollbar-thumb:hover,
.assignee-results::-webkit-scrollbar-thumb:hover,
.tag-suggestions::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #918bff 0%, #6c63ff 100%);
}

.team-member-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 18px;
  padding: 0.82rem 0.9rem;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

.team-member-main {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.team-member-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.team-member-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.05);
}

.team-member-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.42rem;
}

.team-member-copy strong {
  font-size: 0.92rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.team-member-roles {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.team-member-role {
  --role-accent: #6c63ff;
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--role-accent) 42%, transparent);
  background: color-mix(in srgb, var(--role-accent) 18%, rgba(255, 255, 255, 0.04));
  color: color-mix(in srgb, var(--role-accent) 72%, white);
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.2;
}

.team-member-role-empty {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ── Column ── */
.column {
  background: linear-gradient(180deg, rgba(16, 27, 47, 0.96), rgba(11, 20, 37, 0.94));
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 24px;
  width: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  border-top: 1px solid rgba(255,255,255,0.05);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.column:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: rgba(129, 140, 248, 0.18);
}

.column.drag-over {
  box-shadow: 0 0 0 2px rgba(124, 108, 255, 0.4), var(--shadow-md);
}

.col-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.05rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
  background: linear-gradient(180deg, rgba(255,255,255,0.02), transparent);
}

.col-title {
  font-weight: 700;
  font-size: 0.98rem;
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.col-count {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 999px;
  padding: 0.15rem 0.58rem;
  font-size: 0.74rem;
  color: var(--text-muted);
}

.col-actions { display: flex; gap: 0.4rem; }

.col-actions button {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.95rem;
  padding: 0.28rem 0.45rem;
  border-radius: 10px;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.col-actions button:hover {
  background: rgba(124, 108, 255, 0.12);
  border-color: rgba(129, 140, 248, 0.2);
  color: #fff;
}

.col-body {
  padding: 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-height: 80px;
}

.column-empty-state {
  padding: 0.9rem 0.95rem;
  border-radius: 16px;
  border: 1px dashed rgba(148, 163, 184, 0.18);
  background: rgba(255, 255, 255, 0.025);
  color: var(--text-muted);
  font-size: 0.82rem;
  text-align: center;
}

/* ── Add task button ── */
.add-task-btn {
  padding: 0.78rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed rgba(129, 140, 248, 0.22);
  color: var(--text-soft);
  border-radius: 16px;
  cursor: pointer;
  font-size: 0.86rem;
  font-weight: 700;
  margin: 0.2rem 0.8rem 0.85rem;
  width: calc(100% - 1.6rem);
  transition: border-color 0.2s, color 0.2s, background 0.2s, transform 0.2s;
}
.add-task-btn:hover {
  border-color: rgba(129, 140, 248, 0.42);
  color: #fff;
  background: rgba(124, 108, 255, 0.08);
  transform: translateY(-1px);
}

/* ── Task Card ── */
.task-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.03));
  border-radius: 18px;
  padding: 0.85rem 0.92rem;
  cursor: pointer;
  user-select: none;
  border: 1px solid rgba(148, 163, 184, 0.1);
  border-left: 3px solid transparent;
  transition: box-shadow 0.18s, opacity 0.15s, transform 0.15s, border-color 0.18s;
  position: relative;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.02);
}
.task-card:hover {
  box-shadow: 0 18px 26px rgba(2, 6, 23, 0.18);
  transform: translateY(-2px);
  border-color: rgba(129, 140, 248, 0.16);
}
.task-card.dragging {
  opacity: 0.92;
  cursor: grabbing;
  background: linear-gradient(180deg, rgba(19, 31, 55, 0.98), rgba(11, 19, 35, 0.98));
  border-color: rgba(129, 140, 248, 0.34);
  box-shadow: 0 20px 36px rgba(2, 6, 23, 0.28);
}

.task-card.dragging .task-title,
.task-card.dragging .task-desc,
.task-card.dragging .task-author,
.task-card.dragging .task-assignee-label {
  color: #eef2ff;
}

.task-card[data-prio="hoch"]    { border-left-color: var(--danger); }
.task-card[data-prio="normal"]  { border-left-color: var(--accent); }
.task-card[data-prio="niedrig"] { border-left-color: var(--success); }

.task-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}

.task-meta-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem;
  margin-bottom: 0.45rem;
}

.task-meta-left {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  min-width: 0;
}

.task-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: pre-wrap;
  margin-bottom: 0.35rem;
  line-height: 1.5;
}

.task-due-date {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  padding: 0.34rem 0.55rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(148, 163, 184, 0.12);
  color: var(--text-soft);
  font-size: 0.74rem;
  font-weight: 700;
}

.task-tags,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.38rem;
}

.task-tags {
  margin: 0.55rem 0 0.2rem;
}

.task-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: rgba(124, 108, 255, 0.12);
  border: 1px solid rgba(129, 140, 248, 0.28);
  color: #e2ddff;
  border-radius: 999px;
  padding: 0.22rem 0.6rem;
  font-size: 0.7rem;
  line-height: 1.2;
}

.tag-chip {
  padding-right: 0.25rem;
}

.tag-remove-btn {
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  font-size: 0.8rem;
  line-height: 1;
  padding: 0;
}

.tag-editor {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.tag-input-row {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
}

.tag-suggest-wrap {
  position: relative;
  flex: 1;
}

.tag-input-row input {
  flex: 1;
}

.tag-suggestions {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: rgba(12, 20, 36, 0.98);
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 14px;
  box-shadow: var(--shadow-md);
  padding: 0.45rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  z-index: 20;
}

.tag-suggestions.hidden {
  display: none;
}

.tag-suggestion-item {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid transparent;
  border-radius: 999px;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.tag-suggestion-item:hover {
  border-color: rgba(129, 140, 248, 0.26);
  background: rgba(124, 108, 255, 0.08);
}

.tag-suggestion-pick,
.tag-suggestion-delete {
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  font-size: 0.78rem;
}

.tag-suggestion-pick {
  padding: 0.34rem 0.3rem 0.34rem 0.68rem;
}

.tag-suggestion-delete {
  color: var(--text-muted);
  padding: 0.34rem 0.58rem 0.34rem 0.2rem;
}

.tag-suggestion-delete:hover {
  color: var(--danger);
}

.tag-empty {
  color: var(--text-muted);
  font-size: 0.82rem;
  font-style: italic;
}

.task-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.55rem;
}

.prio-badge {
  font-size: 0.68rem;
  padding: 0.16rem 0.48rem;
  border-radius: 999px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.prio-badge.hoch    { background: rgba(243, 109, 141, 0.14); color: #ff9fb6; }
.prio-badge.normal  { background: rgba(124, 108, 255, 0.14); color: #c9c1ff; }
.prio-badge.niedrig { background: rgba(70, 211, 154, 0.14); color: #9cebc7; }

.task-author {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(148, 163, 184, 0.1);
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 600;
}

.task-author {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-left: 0.35rem;
}

.task-btns { display: none; gap: 0.35rem; }
.task-card:hover .task-btns { display: flex; }

.task-btns button {
  background: rgba(255,255,255,0.04);
  border: 1px solid transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.8rem;
  padding: 0.2rem 0.38rem;
  border-radius: 8px;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.task-btns button:hover {
  background: rgba(124, 108, 255, 0.12);
  border-color: rgba(129, 140, 248, 0.2);
  color: #fff;
}
.task-btns .del-btn:hover { color: #ffb3c4; }

/* ── Drag placeholder ── */
.drop-placeholder {
  height: 56px;
  border: 2px dashed rgba(129, 140, 248, 0.48);
  border-radius: 16px;
  opacity: 0.9;
  pointer-events: none;
  background: rgba(124, 108, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

/* ── Task Drawer ── */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.66);
  backdrop-filter: blur(4px);
  z-index: 150;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}
.drawer-overlay.open { opacity: 1; pointer-events: all; }

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 410px;
  max-width: 96vw;
  height: 100vh;
  background: linear-gradient(180deg, rgba(10, 18, 34, 0.98), rgba(8, 14, 27, 0.98));
  border-left: 1px solid rgba(148, 163, 184, 0.14);
  z-index: 151;
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(.4,0,.2,1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: -28px 0 60px rgba(2, 6, 23, 0.4);
}
.drawer.open { transform: translateX(0); }

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 1.25rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.drawer-header h3 {
  font-size: 1.1rem;
  font-weight: 800;
}

.drawer-close {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text-soft);
  width: 38px;
  height: 38px;
  border-radius: 12px;
  cursor: pointer;
}

.drawer-body {
  padding: 1.1rem 1.25rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
  overflow-y: auto;
}

.drawer-field,
.modal label {
  display: flex;
  flex-direction: column;
  gap: 0.42rem;
  font-size: 0.83rem;
  color: var(--text-muted);
}

input,
textarea,
select {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 14px;
  color: var(--text);
  padding: 0.78rem 0.92rem;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  resize: vertical;
  font-family: inherit;
}

.toast-stack {
  position: fixed;
  top: 1.1rem;
  right: 1.1rem;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  width: min(360px, calc(100vw - 2rem));
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  padding: 0.9rem 1rem;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(10, 15, 28, 0.94);
  box-shadow: 0 18px 55px rgba(3, 8, 20, 0.38);
  color: var(--text);
  transform: translateY(-8px);
  opacity: 0;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

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

.toast.is-success {
  border-color: rgba(76, 175, 125, 0.32);
}

.toast.is-error {
  border-color: rgba(224, 92, 106, 0.35);
}

.toast.is-info {
  border-color: rgba(108, 99, 255, 0.35);
}

.toast-icon {
  flex: 0 0 auto;
  width: 1.6rem;
  height: 1.6rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.07);
}

.toast.is-success .toast-icon {
  background: rgba(76, 175, 125, 0.16);
  color: #7ff0a5;
}

.toast.is-error .toast-icon {
  background: rgba(224, 92, 106, 0.16);
  color: #ff9baa;
}

.toast.is-info .toast-icon {
  background: rgba(108, 99, 255, 0.16);
  color: #b7b0ff;
}

.toast-copy {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
  min-width: 0;
}

.toast-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: #f7f9ff;
}

.toast-message {
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--text-muted);
  word-break: break-word;
}

select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-color: rgba(255, 255, 255, 0.05);
  background-image:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath fill='%23C9D6F4' d='M3.2 5.1a.75.75 0 0 1 1.06.04L7 8.09l2.74-2.95a.75.75 0 1 1 1.1 1.02l-3.3 3.56a.75.75 0 0 1-1.1 0l-3.3-3.56a.75.75 0 0 1 .04-1.06Z'/%3E%3C/svg%3E");
  background-repeat: no-repeat, no-repeat;
  background-position: 0 0, right 0.95rem center;
  background-size: auto, 14px 14px;
  padding-right: 2.8rem;
  cursor: pointer;
}

select:hover {
  background-color: rgba(124, 108, 255, 0.08);
  border-color: rgba(129, 140, 248, 0.24);
}

input::placeholder,
textarea::placeholder {
  color: #7890ba;
}

input:focus,
textarea:focus,
select:focus,
.modal input:focus,
.modal textarea:focus,
.modal select:focus {
  border-color: rgba(129, 140, 248, 0.44);
  box-shadow: 0 0 0 4px rgba(124, 108, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
}

select option,
select optgroup {
  background: #101a2d;
  color: #eef2ff;
}

.prio-selector {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}

.prio-btn {
  padding: 0.74rem 0.85rem;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(255,255,255,0.04);
  color: var(--text-soft);
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.prio-btn:hover,
.prio-btn.active {
  transform: translateY(-1px);
  border-color: rgba(129, 140, 248, 0.28);
  background: rgba(124, 108, 255, 0.1);
  color: #fff;
}

.assignee-wrap,
.assignee-selected,
.assignee-search-wrap,
.drawer-meta {
  border-radius: 16px;
}

.assignee-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.drawer-move-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
}

.drawer-move-note {
  margin: 0.1rem 0 0;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--text-muted);
}

.assignee-selected {
  min-height: 54px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(148, 163, 184, 0.12);
  padding: 0.55rem 0.65rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
}

.assignee-none {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  color: var(--text-muted);
  font-size: 0.84rem;
}

.assignee-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 40px;
  padding: 0.38rem 0.45rem 0.38rem 0.38rem;
  border-radius: 999px;
  background: rgba(124, 108, 255, 0.12);
  border: 1px solid rgba(129, 140, 248, 0.22);
  color: #eef2ff;
  font-size: 0.86rem;
  font-weight: 700;
}

.assignee-chip img {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
}

.assignee-chip-remove {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-soft);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
}

.assignee-search-wrap {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(148, 163, 184, 0.12);
  padding: 0.55rem;
}

.assignee-results {
  margin-top: 0.55rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  max-height: 280px;
  overflow-y: auto;
}

.assignee-result-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.72rem 0.8rem;
  border-radius: 16px;
  background: rgba(13, 22, 40, 0.86);
  border: 1px solid rgba(148, 163, 184, 0.12);
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.assignee-result-item:hover {
  transform: translateY(-1px);
  border-color: rgba(129, 140, 248, 0.24);
  background: rgba(19, 31, 55, 0.94);
  box-shadow: 0 14px 28px rgba(2, 6, 23, 0.2);
}

.assignee-result-item.is-selected {
  border-color: rgba(129, 140, 248, 0.32);
  background: rgba(28, 43, 78, 0.95);
}

.assignee-result-main {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
}

.assignee-result-item img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.05);
}

.assignee-result-copy {
  min-width: 0;
}

.assignee-result-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: #eef2ff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.result-id {
  font-size: 0.74rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.assignee-result-side {
  flex-shrink: 0;
}

.assignee-role-badge {
  --role-accent: #6c63ff;
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0.18rem 0.62rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--role-accent) 36%, transparent);
  background: color-mix(in srgb, var(--role-accent) 15%, rgba(255, 255, 255, 0.04));
  color: color-mix(in srgb, var(--role-accent) 72%, white);
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.2;
}

.assignee-role-badge.is-empty {
  border-color: rgba(148, 163, 184, 0.16);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-soft);
}

.drawer-meta {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(148, 163, 184, 0.1);
  padding: 0.85rem 0.95rem;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.task-assignees {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 0.45rem;
  min-width: 0;
}

.task-assignee-avatars {
  display: inline-flex;
  align-items: center;
  padding-left: 0.1rem;
}

.task-assignee-avatars img {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  margin-left: -0.35rem;
  border: 2px solid rgba(10, 18, 34, 0.92);
  box-shadow: 0 8px 18px rgba(2, 6, 23, 0.2);
}

.task-assignee-avatars img:first-child {
  margin-left: 0;
}

.task-assignee-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.drawer-footer {
  padding: 1rem 1.25rem 1.25rem;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  display: flex;
  gap: 0.6rem;
  flex-shrink: 0;
  background: rgba(255,255,255,0.02);
}

.drawer-footer .btn-primary { flex: 1; }
.drawer-footer .btn-danger  { margin-right: auto; }

/* ── Modal ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 1.2rem;
}
.modal-overlay.hidden { display: none; }

.modal {
  background: linear-gradient(180deg, rgba(14, 22, 38, 0.98), rgba(10, 18, 34, 0.98));
  border-radius: 24px;
  padding: 1.5rem;
  width: min(420px, 100%);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  border: 1px solid rgba(148, 163, 184, 0.14);
  box-shadow: var(--shadow-lg);
}

.modal h2 { font-size: 1.16rem; font-weight: 800; }

.modal label {
  display: flex;
  flex-direction: column;
  gap: 0.38rem;
  font-size: 0.83rem;
  color: var(--text-muted);
}

.modal input,
.modal textarea,
.modal select {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 14px;
  color: var(--text);
  padding: 0.74rem 0.9rem;
  font-size: 0.95rem;
  outline: none;
  resize: vertical;
  font-family: inherit;
}

.modal-actions {
  display: flex;
  gap: 0.55rem;
  justify-content: flex-end;
}

.btn-primary {
  padding: 0.7rem 1.15rem;
}

.btn-ghost {
  padding: 0.7rem 1rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(148, 163, 184, 0.14);
  color: var(--text-soft);
  border-radius: 14px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.18s;
}
.btn-ghost:hover {
  background: rgba(124, 108, 255, 0.08);
  border-color: rgba(129, 140, 248, 0.24);
  color: #fff;
  transform: translateY(-1px);
}

.btn-danger {
  padding: 0.7rem 1rem;
  background: rgba(243, 109, 141, 0.08);
  border: 1px solid rgba(243, 109, 141, 0.2);
  color: #ffb3c4;
  border-radius: 14px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  transition: background 0.2s, border-color 0.2s, transform 0.18s;
  margin-right: auto;
}
.btn-danger:hover {
  background: rgba(243, 109, 141, 0.16);
  border-color: rgba(243, 109, 141, 0.3);
  transform: translateY(-1px);
}

/* ── Color Picker ── */
.color-picker { display: flex; gap: 0.55rem; flex-wrap: wrap; }

.color-swatch {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.color-swatch:hover {
  transform: scale(1.12);
  box-shadow: 0 10px 18px rgba(2, 6, 23, 0.18);
}
.color-swatch.selected { border-color: #fff; }

.site-footer {
  margin-top: auto;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
  background: rgba(7, 13, 24, 0.9);
  backdrop-filter: blur(18px);
  padding: 1rem 1.25rem;
  flex-shrink: 0;
}

.site-footer-inner {
  width: min(1180px, 100%);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.site-footer-nav {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.site-footer-nav a {
  color: var(--text-muted);
  transition: color 0.2s;
}

.site-footer-nav a:hover {
  color: #fff;
}

.legal-page {
  flex: 1;
  width: min(960px, 100%);
  margin: 0 auto;
  padding: 2.25rem 1.25rem;
}

.legal-card {
  background: linear-gradient(180deg, rgba(15,24,42,0.96), rgba(10,18,34,0.94));
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 28px;
  padding: 2.2rem;
  line-height: 1.8;
  box-shadow: var(--shadow-md);
}

.legal-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--text);
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 999px;
  padding: 0.56rem 0.94rem;
  margin-bottom: 1rem;
  transition: background 0.2s, transform 0.2s, border-color 0.2s;
}

.legal-back-btn:hover {
  background: rgba(124, 108, 255, 0.1);
  border-color: rgba(129, 140, 248, 0.22);
  transform: translateY(-1px);
}

.legal-card h1,
.legal-card h2 {
  margin-bottom: 0.8rem;
}

.legal-card h1 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.legal-card h2 {
  margin-top: 1.65rem;
  font-size: 1.08rem;
}

.legal-card p + p {
  margin-top: 0.8rem;
}

@media (max-width: 1080px) {
  .board-shell {
    padding-right: 1rem;
  }

  .team-sidebar {
    right: 1rem;
    top: 5.8rem;
    width: min(340px, calc(100vw - 1rem));
  }

  .team-sidebar-card {
    position: static;
    max-height: none;
  }
}

@media (max-width: 760px) {
  .header {
    flex-wrap: wrap;
    padding: 0.95rem 1rem;
  }

  .header-right,
  .header-left {
    width: 100%;
  }

  .header-right {
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .board-shell {
    padding: 1rem;
  }

  .team-sidebar {
    top: auto;
    bottom: 1rem;
    right: 1rem;
    width: min(340px, calc(100vw - 1rem));
  }

  .board {
    grid-template-columns: 1fr;
  }

  .prio-selector {
    grid-template-columns: 1fr;
  }

  .modal,
  .legal-card {
    padding: 1.2rem;
    border-radius: 20px;
  }
}
