/**
 * Kanban Board – Styles
 * Inhalte: Reset · Light/Dark Theme · Header · Buttons · Main/Toolbar · Board/Columns ·
 * Cards · Modal · Alert · Scrollbars · Utilities
 */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ========== Light Theme (Variablen) ========== */
:root,
[data-theme="light"] {
  --bg-deep: #e5eaf0;
  --bg-surface: #ffffff;
  --bg-elevated: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f5f9;
  --border-subtle: rgba(15, 23, 42, 0.08);
  --border-medium: rgba(15, 23, 42, 0.14);
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --accent: #2563eb;
  --accent-light: #3b82f6;
  --accent-soft: rgba(37, 99, 235, 0.14);
  --accent-glow: rgba(37, 99, 235, 0.2);
  --priority-low: #64748b;
  --priority-medium: #0284c7;
  --priority-high: #b45309;
  --priority-urgent: #b91c1c;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --shadow-sm: 0 1px 4px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 4px 14px rgba(15, 23, 42, 0.1);
  --shadow-lg: 0 12px 36px rgba(15, 23, 42, 0.12);
  --shadow-glow: 0 0 0 3px rgba(37, 99, 235, 0.18);
  --scrollbar-track: #bfdbfe;
  --scrollbar-thumb: linear-gradient(180deg, #93c5fd 0%, #60a5fa 25%, #3b82f6 75%, #2563eb 100%);
  --scrollbar-thumb-hover: linear-gradient(180deg, #60a5fa 0%, #3b82f6 50%, #2563eb 100%);
  --scrollbar-thumb-active: #1d4ed8;
  --scrollbar-thumb-accent: rgba(255, 255, 255, 0.4);
  --scrollbar-width: 10px;
  --scrollbar-radius: 8px;
}
[data-theme="light"] body,
:root:not([data-theme="dark"]) body {
  background-color: #e5eaf0;
  background-image:
    radial-gradient(ellipse 120% 70% at 50% -20%, rgba(37, 99, 235, 0.08), transparent 55%),
    radial-gradient(ellipse 70% 50% at 100% 20%, rgba(14, 165, 233, 0.06), transparent 50%),
    radial-gradient(ellipse 60% 40% at 0% 60%, rgba(99, 102, 241, 0.05), transparent 45%);
}
[data-theme="light"] .header,
:root:not([data-theme="dark"]) .header {
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid rgba(15, 23, 42, 0.1);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

/* ========== Dark Theme ========== */
[data-theme="dark"] {
  --bg-deep: #0f172a;
  --bg-surface: #1e293b;
  --bg-elevated: #1e293b;
  --bg-card: #1e293b;
  --bg-card-hover: #334155;
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-medium: rgba(255, 255, 255, 0.12);
  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --accent-soft: rgba(59, 130, 246, 0.2);
  --accent-glow: rgba(59, 130, 246, 0.25);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 0 3px rgba(59, 130, 246, 0.2);
  --scrollbar-track: #1e3a5f;
  --scrollbar-thumb: linear-gradient(180deg, #60a5fa 0%, #3b82f6 25%, #2563eb 75%, #1d4ed8 100%);
  --scrollbar-thumb-hover: linear-gradient(180deg, #93c5fd 0%, #60a5fa 50%, #3b82f6 100%);
  --scrollbar-thumb-active: #93c5fd;
  --scrollbar-thumb-accent: rgba(255, 255, 255, 0.15);
  --scrollbar-width: 10px;
  --scrollbar-radius: 8px;
}
[data-theme="dark"] body {
  background-image:
    radial-gradient(ellipse 120% 70% at 50% -20%, rgba(37, 99, 235, 0.12), transparent 55%),
    radial-gradient(ellipse 70% 50% at 100% 20%, rgba(14, 165, 233, 0.08), transparent 50%),
    radial-gradient(ellipse 60% 40% at 0% 60%, rgba(99, 102, 241, 0.06), transparent 45%);
}
[data-theme="dark"] .header {
  background: rgba(15, 23, 42, 0.92);
  border-bottom-color: var(--border-subtle);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04);
}

/* ========== Theme Toggle Button ========== */
.theme-toggle {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.22s ease;
  box-shadow: var(--shadow-sm);
}
.theme-toggle:hover {
  border-color: rgba(37, 99, 235, 0.4);
  color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent-soft);
}
.theme-toggle:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--accent); }
.theme-icon {
  position: absolute;
  font-size: 1.3rem;
  line-height: 1;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.theme-toggle .theme-icon-moon { opacity: 0; }
.theme-toggle .theme-icon-sun { opacity: 1; }
[data-theme="dark"] .theme-toggle .theme-icon-sun { opacity: 0; }
[data-theme="dark"] .theme-toggle .theme-icon-moon { opacity: 1; }

html { font-size: 16px; -webkit-font-smoothing: antialiased; }
body {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  background: var(--bg-deep);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
}

/* ========== Header ========== */
.header {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 1rem 30px;
  min-height: 64px;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}
.header-inner {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.logo::before {
  content: '';
  width: 30px;
  height: 30px;
  background: linear-gradient(145deg, var(--accent-light) 0%, var(--accent) 100%);
  border-radius: var(--radius-sm);
  box-shadow: 0 2px 12px var(--accent-glow);
}
.board-picker-wrap { position: relative; }
.board-picker-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.75rem 1.2rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font: inherit;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  min-width: 190px;
  transition: all 0.22s ease;
  box-shadow: var(--shadow-sm);
}
.board-picker-btn:hover {
  border-color: rgba(37, 99, 235, 0.4);
  color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent-soft);
}
.board-picker-btn:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--accent); }
.chevron {
  font-size: 0.55rem;
  opacity: 0.8;
  transition: transform 0.25s ease;
}
.board-picker-btn[aria-expanded="true"] .chevron { transform: rotate(180deg); }
.board-picker-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 260px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg), 0 0 0 1px var(--border-subtle);
  z-index: 100;
  overflow: hidden;
  animation: dropdownIn 0.2s ease;
}
@keyframes dropdownIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
.board-picker-dropdown[hidden] { display: none !important; }
.board-picker-list { max-height: 280px; overflow-y: auto; }
.board-picker-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.15rem;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.board-picker-item:hover { background: var(--bg-deep); }
.board-picker-item.active {
  background: var(--accent-soft);
  color: var(--accent);
}
.board-picker-item-actions { display: flex; gap: 4px; opacity: 0.6; }
.board-picker-item:hover .board-picker-item-actions { opacity: 1; }
.board-picker-item-actions button {
  padding: 8px 14px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  transition: all 0.2s ease;
}
.board-picker-item-actions button:hover { background: var(--border-subtle); color: var(--text-primary); }
.board-picker-item-actions .del:hover { color: #b91c1c; }
.board-picker-add {
  padding: 1.25rem 1.25rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.board-picker-add input {
  padding: 0.6rem 0.85rem;
  background: var(--bg-deep);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font: inherit;
  font-size: 0.9rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.board-picker-add input::placeholder { color: var(--text-muted); }
.board-picker-add input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

/* ========== Buttons ========== */
.btn {
  padding: 0.75rem 1.35rem;
  border: none;
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn:active { transform: scale(0.98); }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--accent); }
.btn-primary {
  background: linear-gradient(145deg, var(--accent-light) 0%, var(--accent) 100%);
  color: #fff;
  box-shadow: 0 2px 12px var(--accent-glow);
}
.btn-primary:hover {
  background: linear-gradient(145deg, #60a5fa 0%, var(--accent-light) 100%);
  box-shadow: 0 4px 18px rgba(37, 99, 235, 0.35);
  transform: translateY(-1px);
}
.btn-ghost {
  background: var(--bg-deep);
  color: var(--text-secondary);
  border: 1px solid var(--border-medium);
}
.btn-ghost:hover { background: var(--border-subtle); color: var(--text-primary); }
.btn-danger {
  background: transparent;
  color: #b91c1c;
  border: 1px solid rgba(185, 28, 28, 0.4);
}
.btn-danger:hover {
  background: rgba(185, 28, 28, 0.08);
  border-color: #b91c1c;
}
.is-hidden { display: none !important; }

/* ========== Main & Toolbar ========== */
.main {
  width: 100%;
  padding: 2rem 30px 2.5rem;
  min-height: calc(100vh - 64px);
}
.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.75rem;
  margin-top: 1rem;
  margin-bottom: 3.25rem;
}
.board-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}
.toolbar-filters { display: flex; gap: 0.75rem; flex: 1; min-width: 200px; }
.search-input {
  flex: 1;
  max-width: 280px;
  padding: 0.65rem 0.85rem 0.65rem 2.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font: inherit;
  font-size: 0.9rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 0.75rem center;
  background-size: 18px;
}
.search-input::placeholder { color: var(--text-muted); }
.search-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.filter-select {
  padding: 0.65rem 2.25rem 0.65rem 0.9rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font: inherit;
  font-size: 0.9rem;
  min-width: 140px;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.65rem center;
  transition: border-color 0.22s ease, box-shadow 0.22s ease;
}
.filter-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

/* ========== Board & Columns ========== */
.board-area {
  overflow-x: auto;
  scroll-behavior: smooth;
  min-height: 480px;
  margin-top: 0.5rem;
}
.board-area-inner {
  display: flex;
  gap: 1.75rem;
  align-items: flex-start;
  padding-bottom: 2rem;
  min-width: min-content;
}
.columns-wrap {
  display: flex;
  gap: 1.75rem;
  flex: 0 0 auto;
}
.column {
  flex: 0 0 288px;
  min-width: 288px;
  display: flex;
  flex-direction: column;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  transition: all 0.28s ease;
  box-shadow: var(--shadow-sm);
}
.column:hover {
  border-color: var(--border-medium);
  box-shadow: var(--shadow-md);
}
.column.drag-over {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-glow), var(--shadow-glow);
  background: var(--accent-soft);
}
.column-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.15rem 1.35rem;
  background: linear-gradient(180deg, var(--bg-deep) 0%, transparent 100%);
  border-bottom: 2px solid var(--col-color, var(--border-medium));
  flex-shrink: 0;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.column-title { font-weight: 600; font-size: 0.95rem; flex: 1; color: var(--text-primary); letter-spacing: -0.01em; }
.column-count {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-deep);
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
}
.column-actions { display: flex; gap: 2px; opacity: 0.5; }
.column:hover .column-actions { opacity: 1; }
.column-actions button {
  padding: 6px 10px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  transition: all 0.15s ease;
}
.column-actions button:hover { background: var(--border-subtle); color: var(--text-primary); }
.column-actions .del:hover { color: #b91c1c; }
.column-cards {
  flex: 1;
  min-height: 120px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  overflow-y: auto;
}
.column-cards.is-empty { justify-content: center; align-items: stretch; }
.column-empty-hint {
  padding: 1.25rem 1.1rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.5;
  border: 1px dashed var(--border-medium);
  border-radius: var(--radius-md);
  margin: 0.35rem;
  background: var(--bg-deep);
}
.column-add-card {
  flex-shrink: 0;
  margin: 0.75rem 0.85rem;
  padding: 0.9rem 1.2rem;
  border: 1px dashed var(--border-medium);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.22s ease;
}
.column-add-card:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.add-column-btn {
  flex: 0 0 220px;
  min-width: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 1.4rem 1.4rem;
  background: var(--bg-surface);
  border: 1px dashed var(--border-medium);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.22s ease;
}
.add-column-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 0 1px var(--accent-glow);
}
.add-column-btn:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--accent); }

/* ========== Cards ========== */
.card {
  padding: 1rem 1.2rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-left: 3px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.22s ease;
  box-shadow: var(--shadow-sm);
}
.card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(37, 99, 235, 0.25);
  box-shadow: var(--shadow-md), 0 0 0 1px var(--accent-soft);
  transform: translateY(-1px);
}
.card.dragging {
  opacity: 0.96;
  box-shadow: var(--shadow-lg);
  transform: scale(1.02);
}
.card[draggable="true"] { cursor: grab; }
.card[draggable="true"]:active { cursor: grabbing; }
.card:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--accent); }
.card-priority {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  width: fit-content;
}
.card-priority.low { color: var(--text-muted); background: rgba(100, 116, 139, 0.15); }
.card-priority.medium { color: var(--priority-medium); background: rgba(2, 132, 199, 0.12); }
.card-priority.high { color: var(--priority-high); background: rgba(180, 83, 9, 0.12); }
.card-priority.urgent { color: var(--priority-urgent); background: rgba(185, 28, 28, 0.12); }
.card.border-priority-low   { border-left-color: var(--priority-low); }
.card.border-priority-medium { border-left-color: var(--priority-medium); }
.card.border-priority-high  { border-left-color: var(--priority-high); }
.card.border-priority-urgent { border-left-color: var(--priority-urgent); }
.card-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  line-height: 1.4;
  color: var(--text-primary);
}
.card-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 0.6rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; font-size: 0.75rem; }
.card-due { color: var(--text-muted); }
.card-due.overdue { color: #b91c1c; font-weight: 600; }
.card-tags { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.card-tag {
  background: var(--bg-deep);
  color: var(--text-secondary);
  padding: 0.25rem 0.55rem;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 500;
}

/* ========== Modal ========== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 2rem;
  animation: backdropIn 0.25s ease;
}
@keyframes backdropIn { from { opacity: 0; } to { opacity: 1; } }
.modal-backdrop[hidden] { display: none !important; }
.modal {
  background: var(--bg-elevated);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg), 0 0 0 1px var(--border-subtle);
  width: 100%;
  max-width: 460px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: modalIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.92) translateY(16px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 1.75rem;
  border-bottom: 1px solid var(--border-subtle);
  background: linear-gradient(180deg, rgba(255,255,255,0.02) 0%, transparent 100%);
}
.modal-header h3 { font-size: 1.15rem; font-weight: 700; color: var(--text-primary); letter-spacing: -0.02em; }
.modal-close {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}
.modal-close:hover { background: var(--bg-deep); color: var(--text-primary); }
.modal-close:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--accent); }
.modal-body {
  padding: 1.75rem 1.75rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.field { display: flex; flex-direction: column; gap: 0.45rem; }
.field span { font-size: 0.85rem; font-weight: 600; color: var(--text-secondary); }
.field input, .field textarea, .field select {
  padding: 0.7rem 0.9rem;
  background: var(--bg-deep);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font: inherit;
  font-size: 0.9rem;
  transition: border-color 0.22s ease, box-shadow 0.22s ease;
}
.field input::placeholder, .field textarea::placeholder { color: var(--text-muted); }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.field textarea { resize: vertical; min-height: 80px; }
.modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--border-subtle);
  gap: 1rem;
  flex-wrap: wrap;
  background: var(--bg-deep);
}
.modal-footer-right { display: flex; align-items: center; gap: 0.6rem; margin-left: auto; }
.modal-footer-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-right: 0.35rem;
}

/* ========== Alert / Confirm / Prompt ========== */
.alert-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1100;
  padding: 1.5rem;
  animation: backdropIn 0.2s ease;
}
.alert-backdrop[hidden] { display: none !important; }
.alert-box {
  background: var(--bg-elevated);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg), 0 0 0 1px var(--border-subtle);
  padding: 1.5rem 1.6rem;
  width: 100%;
  max-width: 380px;
  animation: modalIn 0.25s ease;
}
.alert-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.6rem;
  letter-spacing: -0.01em;
}
.alert-message {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 1.25rem;
}
.alert-message:last-of-type { margin-bottom: 1.25rem; }
.alert-input {
  width: 100%;
  padding: 0.7rem 0.9rem;
  margin-bottom: 1.25rem;
  background: var(--bg-deep);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font: inherit;
  font-size: 0.9rem;
  transition: border-color 0.22s ease, box-shadow 0.22s ease;
}
.alert-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.alert-input[hidden] { display: none !important; }
.alert-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.alert-actions .btn-danger {
  margin-right: auto;
}
.alert-actions .btn-primary.alert-btn-danger {
  background: linear-gradient(145deg, #dc2626 0%, #b91c1c 100%);
  color: #fff;
  box-shadow: 0 2px 10px rgba(185, 28, 28, 0.25);
}
.alert-actions .btn-primary.alert-btn-danger:hover {
  background: linear-gradient(145deg, #ef4444 0%, #dc2626 100%);
}

/* ========== Scrollbars – stylisch & breit ========== */
/* Standard-Scrollbar nur für Firefox (ohne Webkit). In Chrome 121+ würden
   scrollbar-width/scrollbar-color die ::-webkit-scrollbar-Breite überschreiben. */
@supports not selector(::-webkit-scrollbar) {
  html {
    scrollbar-width: auto;
    scrollbar-color: #3b82f6 var(--scrollbar-track);
  }
}
html {
  scrollbar-gutter: stable;
}
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: linear-gradient(180deg, #e0e7ff 0%, var(--scrollbar-track) 100%);
  border-radius: var(--scrollbar-radius, 16px);
  margin: 0;
  border: 1px solid rgba(59, 130, 246, 0.15);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.06), inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}
[data-theme="dark"] ::-webkit-scrollbar-track {
  background: linear-gradient(180deg, #1e293b 0%, var(--scrollbar-track) 100%);
  border: 1px solid rgba(96, 165, 250, 0.12);
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(0, 0, 0, 0.2);
}
::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: var(--scrollbar-radius, 16px);
  min-height: 80px;
  min-width: 80px;
  box-shadow:
    inset 0 3px 0 rgba(255, 255, 255, 0.35),
    inset 0 -2px 0 rgba(0, 0, 0, 0.15),
    inset 0 0 0 1px rgba(255, 255, 255, 0.1),
    0 4px 12px rgba(37, 99, 235, 0.25);
  transition: background 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
}
[data-theme="dark"] ::-webkit-scrollbar-thumb {
  box-shadow:
    inset 0 3px 0 rgba(255, 255, 255, 0.12),
    inset 0 -2px 0 rgba(0, 0, 0, 0.4),
    inset 0 0 0 1px rgba(255, 255, 255, 0.05),
    0 4px 16px rgba(0, 0, 0, 0.5);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--scrollbar-thumb-hover);
  box-shadow:
    inset 0 0 0 1px var(--scrollbar-thumb-accent),
    inset 0 3px 0 rgba(255, 255, 255, 0.4),
    inset 0 -2px 0 rgba(0, 0, 0, 0.12),
    0 6px 20px rgba(37, 99, 235, 0.35);
}
[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
  box-shadow:
    inset 0 0 0 1px var(--scrollbar-thumb-accent),
    inset 0 3px 0 rgba(255, 255, 255, 0.15),
    inset 0 -2px 0 rgba(0, 0, 0, 0.35),
    0 6px 24px rgba(59, 130, 246, 0.2);
}
::-webkit-scrollbar-thumb:active {
  background: var(--scrollbar-thumb-active);
  box-shadow:
    inset 0 2px 6px rgba(0, 0, 0, 0.25),
    inset 0 0 0 1px rgba(0, 0, 0, 0.1),
    0 2px 6px rgba(0, 0, 0, 0.15);
}
[data-theme="dark"] ::-webkit-scrollbar-thumb:active {
  box-shadow:
    inset 0 2px 8px rgba(0, 0, 0, 0.6),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04),
    0 2px 8px rgba(0, 0, 0, 0.4);
}
::-webkit-scrollbar-corner {
  background: var(--scrollbar-track);
  border-radius: 0 0 var(--scrollbar-radius, 16px) 0;
}
