/* ════════════════════════════════════════════════════════════════════════════
   Steuerlupe — Arbeitsplatz Kanban-Board
   Trello-ähnliches Layout, integriert sich visuell in /arbeitsplatz/
   ════════════════════════════════════════════════════════════════════════════ */

:root {
  --bg-page:        #f8fafc;
  --bg-column:      #ffffff;
  --bg-card:        #ffffff;
  --border-card:    #e5e7eb;
  --border-strong:  #cbd5e1;
  --ink-1:          #0f172a;
  --ink-2:          #475569;
  --ink-3:          #94a3b8;

  --accent:         #0097b2;
  --accent-soft:    #e0f7fb;
  --accent-strong:  #007a92;

  /* Status-Farben (linker Card-Streifen) */
  --status-backlog:    #94a3b8;   /* Slate-Gray */
  --status-in-arbeit:  #0097b2;   /* Cyan-Accent */
  --status-review:     #f59e0b;   /* Amber */
  --status-fertig:     #10b981;   /* Emerald */

  --shadow-card:    0 1px 2px rgba(15, 23, 42, 0.06), 0 1px 1px rgba(15, 23, 42, 0.04);
  --shadow-hover:   0 6px 20px rgba(15, 23, 42, 0.10), 0 2px 6px rgba(15, 23, 42, 0.06);
  --shadow-drag:    0 16px 36px rgba(15, 23, 42, 0.18), 0 4px 12px rgba(15, 23, 42, 0.10);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;

  --topbar-h:  56px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg-page);
  color: var(--ink-1);
  font-family: 'DM Sans', system-ui, sans-serif;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body[data-state="loading"] .board-columns { display: none; }

.serif-italic {
  font-family: 'DM Serif Display', Georgia, serif;
  font-style: italic;
  color: var(--accent);
  font-weight: 400;
}

/* ─── Top-Bar ──────────────────────────────────────────────────────────── */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 24px;
  height: var(--topbar-h);
  padding: 0 24px;
  background: #ffffff;
  border-bottom: 1px solid var(--border-card);
  backdrop-filter: saturate(180%) blur(8px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink-1);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--accent);
  color: #ffffff;
}

.brand-text { font-weight: 600; }
.brand-suffix {
  font-weight: 500;
  color: var(--ink-2);
  margin-left: 4px;
}

.topbar-nav {
  display: flex;
  gap: 4px;
  margin-left: 12px;
}

.tab-link {
  padding: 8px 14px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
  cursor: pointer;
}

.tab-link:hover { background: var(--bg-page); color: var(--ink-1); }

.tab-link.is-active {
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 600;
}

.topbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  background: #ffffff;
  color: var(--ink-1);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.btn-ghost:hover {
  background: var(--bg-page);
  border-color: var(--border-strong);
}

.btn-filter { position: relative; }
.filter-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: var(--accent);
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  margin-left: 2px;
}

.user-chip {
  padding: 6px 12px;
  border-radius: var(--radius-md);
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 600;
}

/* ─── Filter-Panel ────────────────────────────────────────────────────── */

.filter-panel {
  position: fixed;
  top: calc(var(--topbar-h) + 8px);
  right: 24px;
  z-index: 60;
  width: 320px;
  max-height: calc(100vh - var(--topbar-h) - 24px);
  overflow-y: auto;
  background: #ffffff;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.12), 0 4px 12px rgba(15, 23, 42, 0.06);
  padding: 16px;
  font-size: 13px;
}

.filter-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--ink-1);
}

.link-muted {
  background: none;
  border: 0;
  padding: 0;
  font-family: inherit;
  font-size: 12px;
  color: var(--ink-2);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.link-muted:hover { color: var(--accent-strong); }

.filter-section { margin-bottom: 16px; }
.filter-section-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 8px;
}

.filter-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  font-size: 13px;
  color: var(--ink-1);
  cursor: pointer;
}
.filter-toggle input { accent-color: var(--accent); width: 14px; height: 14px; }

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border: 1px solid var(--border-card);
  border-radius: 999px;
  background: #ffffff;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}
.filter-chip:hover { border-color: var(--border-strong); }
.filter-chip.is-active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-strong);
  font-weight: 600;
}

.filter-panel-foot {
  display: flex;
  justify-content: flex-end;
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid var(--border-card);
}

.btn-glass-accent {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 0;
  border-radius: var(--radius-md);
  background: var(--accent);
  color: #ffffff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.06s ease;
}
.btn-glass-accent:hover { background: var(--accent-strong); }
.btn-glass-accent:active { transform: translateY(1px); }
.btn-small { padding: 6px 12px; font-size: 12px; }

/* ─── Board Grid ──────────────────────────────────────────────────────── */

.board {
  position: relative;
  min-height: calc(100vh - var(--topbar-h));
  padding: 20px 24px 40px;
}

.board-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 80px 20px;
  color: var(--ink-2);
  font-size: 14px;
}

.spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--border-card);
  border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.board-error {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  max-width: 480px;
  margin: 80px auto;
  padding: 20px 24px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: var(--radius-lg);
  color: #991b1b;
  font-size: 14px;
}
.board-error strong { font-size: 15px; }

.board-columns {
  display: grid;
  grid-template-columns: repeat(4, minmax(280px, 320px));
  gap: 16px;
  align-items: flex-start;
  overflow-x: auto;
  padding-bottom: 12px;
}

/* ─── Spalten ─────────────────────────────────────────────────────────── */

.column {
  display: flex;
  flex-direction: column;
  background: var(--bg-column);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  max-height: calc(100vh - var(--topbar-h) - 56px);
  overflow: hidden;
}

.column-header {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: var(--bg-column);
  border-bottom: 1px solid var(--border-card);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-1);
}

.column-header-left {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.column-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.column[data-status="unbearbeitet"] .column-dot { background: var(--status-backlog); }
.column[data-status="in-arbeit"]    .column-dot { background: var(--status-in-arbeit); }
.column[data-status="baustelle"]    .column-dot { background: var(--status-review); }
.column[data-status="fertig"]       .column-dot { background: var(--status-fertig); }

.column-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 11px;
  background: var(--bg-page);
  color: var(--ink-2);
  font-size: 11px;
  font-weight: 600;
}

/* "Neue"-Bucket oben in jeder Spalte */
.column-new-bucket {
  padding: 10px 12px 6px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: linear-gradient(180deg, rgba(0, 151, 178, 0.05) 0%, rgba(0, 151, 178, 0) 100%);
}
.column-new-bucket-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-strong);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 2px;
}
.column-new-bucket-title::before {
  content: '';
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
}

.column-cards {
  flex: 1;
  overflow-y: auto;
  padding: 10px 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 60px;
}

.column-empty {
  text-align: center;
  padding: 18px 12px;
  color: var(--ink-3);
  font-size: 12px;
  font-style: italic;
}

/* ─── Karten ──────────────────────────────────────────────────────────── */

.card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 10px 12px 10px 16px;   /* Platz für linken Status-Streifen */
  box-shadow: var(--shadow-card);
  cursor: grab;
  transition: box-shadow 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
  user-select: none;
}

.card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  border-top-left-radius: var(--radius-md);
  border-bottom-left-radius: var(--radius-md);
  background: var(--status-backlog);
}
.card[data-status="unbearbeitet"]::before { background: var(--status-backlog); }
.card[data-status="in-arbeit"]::before    { background: var(--status-in-arbeit); }
.card[data-status="baustelle"]::before    { background: var(--status-review); }
.card[data-status="fertig"]::before       { background: var(--status-fertig); }

.card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-hover);
  transform: translateY(-1px);
}

.card.is-saving { opacity: 0.6; pointer-events: none; }
.card.is-error  { border-color: #fecaca; background: #fef2f2; }

.card-head {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-bottom: 4px;
}

.card-icon {
  flex-shrink: 0;
  font-size: 14px;
  line-height: 1.4;
  margin-top: 1px;
}

.card-label {
  flex: 1;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.35;
  color: var(--ink-1);
  word-break: break-word;
}

.card-strang {
  font-size: 11px;
  color: var(--ink-3);
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-strang-sep {
  margin: 0 4px;
  color: var(--ink-3);
}

.card-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  margin-top: 6px;
}

.card-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--bg-page);
  color: var(--ink-2);
  font-size: 10.5px;
  font-weight: 500;
  line-height: 1.4;
}

.card-badge.type-node { background: #eef2ff; color: #4338ca; }
.card-badge.type-note { background: #fef3c7; color: #92400e; }

.card-badge.is-new {
  background: var(--accent);
  color: #ffffff;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.card-badge.due-date    { background: #fef3c7; color: #92400e; }
.card-badge.due-date.is-overdue { background: #fee2e2; color: #991b1b; }

.card-badge.priority-1 { background: #fee2e2; color: #991b1b; font-weight: 700; }
.card-badge.priority-2 { background: #fef3c7; color: #92400e; }

.card-owner {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.card-avatar {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  color: #ffffff;
  font-size: 9px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-transform: uppercase;
  letter-spacing: 0;
}

/* Drag-Ghost (das Element, das beim Drag entsteht) */
.card.sortable-chosen { cursor: grabbing; }
.card.sortable-ghost {
  opacity: 0.4;
  background: var(--accent-soft);
  border-style: dashed;
  border-color: var(--accent);
}
.card.sortable-drag {
  transform: rotate(2deg);
  box-shadow: var(--shadow-drag);
  opacity: 0.95;
}

/* Drop-Highlight an Spalten */
.column-cards.is-drop-target {
  background: var(--accent-soft);
  border-radius: var(--radius-sm);
  outline: 2px dashed var(--accent);
  outline-offset: -2px;
}

/* ─── Toast ───────────────────────────────────────────────────────────── */

.toast-region {
  position: fixed;
  bottom: 20px;
  right: 24px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 12px 16px;
  background: #ffffff;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-hover);
  font-size: 13px;
  color: var(--ink-1);
  max-width: 360px;
  animation: toast-in 0.18s ease both;
}
.toast.is-error  { border-left: 3px solid #ef4444; }
.toast.is-info   { border-left: 3px solid var(--accent); }
.toast.is-success{ border-left: 3px solid #10b981; }

@keyframes toast-in {
  from { transform: translateX(20px); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

/* ─── Auth-Gate (Fallback wenn /me 401) ──────────────────────────────── */

.auth-gate {
  position: fixed;
  inset: 0;
  background: rgba(248, 250, 252, 0.96);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
}

.auth-gate-card {
  max-width: 360px;
  background: #ffffff;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  box-shadow: var(--shadow-hover);
  text-align: center;
}
.auth-gate-card h2 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-weight: 400;
  margin: 0 0 8px;
  color: var(--ink-1);
}
.auth-gate-card p {
  margin: 0 0 18px;
  color: var(--ink-2);
  font-size: 14px;
}

/* ─── Responsiv ───────────────────────────────────────────────────────── */

@media (max-width: 920px) {
  .topbar { gap: 12px; padding: 0 16px; }
  .topbar-nav { display: none; }
  .board { padding: 16px; }
  .board-columns { grid-template-columns: repeat(4, 280px); gap: 12px; }
  .filter-panel { right: 16px; width: calc(100vw - 32px); max-width: 360px; }
}

@media (max-width: 540px) {
  .brand-suffix { display: none; }
  .board-columns { grid-template-columns: repeat(4, 260px); }
}

/* ─────────────────────────────────────────────────────────────────────────
   Auth-Gate Inline-Login (verhindert Redirect-Loop)
   ───────────────────────────────────────────────────────────────────────── */
.auth-gate-lead {
  font-size: 13px;
  color: var(--ink-2);
  margin: 4px 0 18px;
}
.auth-gate-form {
  display: flex; flex-direction: column; gap: 12px;
  margin: 0 0 16px;
}
.auth-gate-field {
  display: flex; flex-direction: column; gap: 4px;
  font-size: 12px; font-weight: 500; color: var(--ink-2);
  text-align: left;
}
.auth-gate-field input {
  padding: 9px 12px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md, 8px);
  font: inherit;
  font-size: 14px;
  color: var(--ink-1);
  background: white;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.auth-gate-field input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 151, 178, .15);
}
.auth-gate-error {
  font-size: 12px; color: #dc2626;
  margin: 0; padding: 8px 12px;
  background: rgba(220, 38, 38, .08);
  border-radius: var(--radius-md, 8px);
}
.auth-gate-alt {
  font-size: 12px; color: var(--ink-2);
  margin: 0; text-align: center;
}
.auth-gate-alt a { color: var(--accent-strong); text-decoration: none; font-weight: 500; }
.auth-gate-alt a:hover { text-decoration: underline; }

/* ─────────────────────────────────────────────────────────────────────────
   Dot-Grid Background (KI-Hochschule-Stil, dezent)
   ───────────────────────────────────────────────────────────────────────── */
body {
  background-color: var(--bg-page);
  background-image: radial-gradient(circle, rgba(15, 23, 42, 0.07) 1px, transparent 1px);
  background-size: 22px 22px;
  background-attachment: fixed;
}

/* ─── HTML5 [hidden]-Attribut hart durchsetzen ────────────────────────
   2026-05-07: .auth-gate hatte display:flex und ignorierte damit
   <div hidden>. Folge: Auth-Modal blieb nach erfolgreichem Login sichtbar.
   3 Vorgänger-Fix-Iterationen kämpften am Symptom (Doppellistener,
   location.reload) statt an der Ursache (CSS). !important zwingt den
   Default durch jede Klassen-Spezifität.
   ──────────────────────────────────────────────────────────────────── */
[hidden] { display: none !important; }

/* ═══════════════════════════════════════════════════════════════════════
   W6 — i-Icon-Legende (Aushang) — 2026-05-14
   ══════════════════════════════════════════════════════════════════════ */

/* ─── (i)-Trigger-Button ─────────────────────────────────────────────── */

.legend-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid var(--border-strong);
  background: #ffffff;
  color: var(--ink-2);
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 11px;
  font-weight: 700;
  font-style: normal;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  flex-shrink: 0;
  user-select: none;
}

/* Innerer Buchstabe */
.legend-icon::after {
  content: 'i';
}

.legend-icon:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-strong);
}

.legend-icon:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ─── Modal-Overlay ──────────────────────────────────────────────────── */

.legend-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(15, 23, 42, 0.40);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 60px 16px 40px;
  opacity: 0;
  /* Einzige Animation: 150ms Fade-In — kein Wackeln, kein Slide */
  transition: opacity 0.15s ease;
  overflow-y: auto;
}

.legend-modal-overlay.legend-modal-visible {
  opacity: 1;
}

/* ─── Modal-Content ──────────────────────────────────────────────────── */

.legend-modal-content {
  width: 100%;
  max-width: 480px;
  background: #ffffff;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.16), 0 4px 12px rgba(15, 23, 42, 0.08);
  overflow: hidden;
  /* Kein transform-Animation — nur Fade via Overlay */
}

/* ─── Modal-Header ───────────────────────────────────────────────────── */

.legend-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-card);
}

.legend-modal-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-1);
  letter-spacing: -0.01em;
}

.legend-close-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ink-3);
  cursor: pointer;
  padding: 0;
  transition: background 0.15s ease, color 0.15s ease;
}

.legend-close-btn:hover {
  background: var(--bg-page);
  color: var(--ink-1);
}

/* ─── Modal-Body ─────────────────────────────────────────────────────── */

.legend-modal-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-height: calc(100vh - 180px);
  overflow-y: auto;
}

/* ─── Sektionen ──────────────────────────────────────────────────────── */

.legend-section-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 10px;
}

/* ─── Tabelle ─────────────────────────────────────────────────────────── */

.legend-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.legend-table tbody tr + tr td {
  border-top: 1px solid var(--border-card);
}

.legend-table td {
  padding: 7px 6px;
  vertical-align: top;
  color: var(--ink-1);
  line-height: 1.4;
}

.legend-cell-icon {
  font-size: 15px;
  width: 28px;
  padding-right: 4px;
}

.legend-cell-label {
  white-space: nowrap;
  padding-right: 12px;
  font-size: 13px;
}

.legend-cell-desc {
  color: var(--ink-2);
  font-size: 12px;
}

.legend-cell-muted {
  color: var(--ink-3);
  font-size: 11px;
  font-family: 'DM Mono', 'Fira Code', 'Cascadia Code', monospace;
}

/* ─── Status-Pillen (farbige Chips in der Legende) ──────────────────── */

.legend-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  color: #ffffff;
  white-space: nowrap;
  line-height: 1.4;
}

/* Dunkle Pillen brauchen hellen Text — light Pillen dunklen */
.legend-pill[style*="#86efac"],
.legend-pill[style*="#fef3c7"] {
  color: #1e293b;
}

/* ─── Mobile ─────────────────────────────────────────────────────────── */

@media (max-width: 540px) {
  .legend-modal-overlay {
    padding: 20px 8px 20px;
    align-items: flex-end;
  }
  .legend-modal-content {
    max-width: 100%;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
  }
}

/* ─── Board-Tabs (Aufgaben | Redaktion) ──────────────────────────────── */

.board-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 10px 24px;
  background: #ffffff;
  border-bottom: 1px solid var(--border-card);
  overflow-x: auto;
  scrollbar-width: thin;
}

.board-tab {
  padding: 6px 14px;
  border: none;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--ink-2);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.1s ease, color 0.1s ease;
}

.board-tab:hover {
  background: var(--bg-page);
  color: var(--ink-1);
}

.board-tab.is-active {
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 600;
}

.board-tab:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ─── Spalten-Kopf: "manuell"-Tag für is_manual_added ────────────────── */

.column-header-manual-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 4px;
  background: #f1f5f9;
  color: var(--ink-3);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
