/* components.css – Karten, Buttons, Toast, Navigation, Modals für eDuCollector */

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
  min-height: var(--touch-target);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(26, 127, 168, 0.3);
}

.btn-primary:hover {
  background: var(--primary-dark);
  box-shadow: 0 4px 12px rgba(26, 127, 168, 0.4);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(26, 127, 168, 0.25);
}

.btn-secondary {
  background: var(--surface-2);
  color: var(--text);
  border: 1.5px solid var(--border);
}

.btn-secondary:hover {
  background: var(--border);
}

.btn-accent {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 8px rgba(240, 165, 0, 0.3);
}

.btn-accent:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  padding: 8px;
}

.btn-ghost:hover {
  background: var(--surface-2);
  color: var(--text);
}

.btn-danger {
  background: var(--error);
  color: #fff;
}

.btn-danger:hover {
  background: #b91c1c;
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.8rem;
  min-height: 36px;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 1rem;
  border-radius: var(--radius);
}

.btn-full {
  width: 100%;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* ===== FAB – Floating Action Button ===== */
.fab {
  position: fixed;
  bottom: calc(var(--nav-height) + 20px);
  right: 20px;
  width: var(--fab-size);
  height: var(--fab-size);
  border-radius: var(--radius-full);
  background: var(--primary);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(26, 127, 168, 0.45);
  transition: all var(--transition);
  z-index: 150;
  -webkit-tap-highlight-color: transparent;
}

.fab svg {
  width: 30px;
  height: 30px;
  transition: transform var(--transition);
}

.fab:hover {
  background: var(--primary-dark);
  box-shadow: 0 6px 20px rgba(26, 127, 168, 0.55);
  transform: scale(1.08);
}

.fab:active {
  transform: scale(0.95);
}

.fab.open svg {
  transform: rotate(45deg);
}

/* ===== KARTEN ===== */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
  overflow: hidden;
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-body {
  padding: 16px;
}

.card-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
}

/* Item-Karten */
.item-card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  margin-bottom: 12px;
  overflow: hidden;
  transition: box-shadow var(--transition), border-color var(--transition);
}

.item-card:hover {
  box-shadow: var(--shadow-md);
}

.item-card.selected {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(26, 127, 168, 0.2), var(--shadow-sm);
}

.item-card-top {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 16px 10px;
}

.item-checkbox {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-radius: 5px;
  background: var(--surface);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  margin-top: 2px;
}

.item-checkbox.checked {
  background: var(--primary);
  border-color: var(--primary);
}

.item-checkbox.checked::after {
  content: '';
  width: 10px;
  height: 6px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translateY(-1px);
}

.item-type-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.item-type-icon.link { background: rgba(26, 127, 168, 0.12); color: var(--primary); }
.item-type-icon.file { background: rgba(240, 165, 0, 0.12); color: var(--accent-dark); }
.item-type-icon.text { background: rgba(22, 163, 74, 0.12); color: var(--success); }

.item-type-icon svg {
  width: 18px;
  height: 18px;
}

.item-info {
  flex: 1;
  min-width: 0;
}

.item-title {
  font-family: var(--font-headline);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-description {
  padding: 0 16px 10px;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.item-tags {
  padding: 0 16px 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.item-actions {
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

/* ===== TAGS ===== */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  background: var(--primary-light);
  color: var(--primary-dark);
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: default;
}

.tag.filter-tag {
  cursor: pointer;
  transition: all var(--transition);
}

.tag.filter-tag:hover,
.tag.filter-tag.active {
  background: var(--primary);
  color: #fff;
}

.tag.type-link { background: rgba(26, 127, 168, 0.12); color: var(--primary-dark); }
.tag.type-file { background: rgba(240, 165, 0, 0.12); color: var(--accent-dark); }
.tag.type-text { background: rgba(22, 163, 74, 0.12); color: var(--success); }

@media (prefers-color-scheme: dark) {
  .tag { background: rgba(26, 127, 168, 0.2); color: #5bb8d8; }
  .tag.filter-tag.active { background: var(--primary); color: #fff; }
  .tag.type-link { background: rgba(26, 127, 168, 0.2); color: #5bb8d8; }
  .tag.type-file { background: rgba(240, 165, 0, 0.15); color: #f0c040; }
  .tag.type-text { background: rgba(22, 163, 74, 0.15); color: #4ade80; }
}

/* ===== TOAST ===== */
.toast-container {
  position: fixed;
  top: calc(var(--header-height) + 12px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  width: min(340px, calc(100vw - 32px));
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--text);
  color: var(--bg);
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: var(--shadow-xl);
  animation: toastIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  pointer-events: auto;
}

.toast.toast-success { background: var(--success); color: #fff; }
.toast.toast-error { background: var(--error); color: #fff; }
.toast.toast-warning { background: var(--warning); color: #fff; }

.toast.hide {
  animation: toastOut 0.25s ease forwards;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(-12px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toastOut {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to { opacity: 0; transform: translateY(-8px) scale(0.95); }
}

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  animation: overlayIn 0.2s ease forwards;
}

.modal-overlay.closing {
  animation: overlayOut 0.2s ease forwards;
}

@media (min-width: 600px) {
  .modal-overlay {
    align-items: center;
    padding: 24px;
  }
}

.modal {
  background: var(--surface);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  width: 100%;
  max-height: 92vh;
  max-height: 92dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  animation: modalUp 0.3s cubic-bezier(0.34, 1.2, 0.64, 1) forwards;
  -webkit-overflow-scrolling: touch;
}

.modal-overlay.closing .modal {
  animation: modalDown 0.25s ease forwards;
}

@media (min-width: 600px) {
  .modal {
    border-radius: var(--radius-xl);
    max-width: 540px;
    max-height: 85vh;
  }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--surface);
  z-index: 1;
}

.modal-title {
  font-family: var(--font-headline);
  font-size: 1.1rem;
  font-weight: 700;
}

.modal-close {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: var(--surface-2);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all var(--transition);
  flex-shrink: 0;
}

.modal-close:hover {
  background: var(--border);
  color: var(--text);
}

.modal-body {
  padding: 20px;
}

.modal-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  position: sticky;
  bottom: 0;
  background: var(--surface);
}

@keyframes overlayIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes overlayOut { from { opacity: 1; } to { opacity: 0; } }
@keyframes modalUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes modalDown { from { transform: translateY(0); } to { transform: translateY(100%); } }

@media (min-width: 600px) {
  @keyframes modalUp { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }
  @keyframes modalDown { from { opacity: 1; transform: scale(1); } to { opacity: 0; transform: scale(0.95); } }
}

/* ===== DRAG & DROP ===== */
.drop-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 32px 20px;
  text-align: center;
  color: var(--text-muted);
  transition: all var(--transition);
  cursor: pointer;
}

.drop-zone:hover,
.drop-zone.drag-over {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
}

.drop-zone svg {
  width: 40px;
  height: 40px;
  margin: 0 auto 12px;
  opacity: 0.6;
}

.drop-zone p {
  font-size: 0.9rem;
  margin-bottom: 4px;
}

.drop-zone small {
  font-size: 0.75rem;
  color: var(--text-light);
}

/* ===== SUCHE & FILTER ===== */
.search-bar {
  position: relative;
  margin-bottom: 12px;
}

.search-bar svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 10px 14px 10px 42px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--text);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.search-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26, 127, 168, 0.12);
}

.filter-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

/* ===== LEER-ZUSTAND ===== */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}

.empty-state svg {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  opacity: 0.4;
}

.empty-state h3 {
  font-family: var(--font-headline);
  font-size: 1.1rem;
  color: var(--text);
  margin-bottom: 8px;
}

.empty-state p {
  font-size: 0.875rem;
  max-width: 280px;
  margin: 0 auto;
}

/* ===== EXPORT BEREICH ===== */
.export-section {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}

.export-section h3 {
  font-size: 1rem;
  margin-bottom: 4px;
}

.export-section p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.prompt-output {
  position: relative;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-top: 12px;
}

.prompt-output pre {
  padding: 14px;
  font-size: 0.78rem;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 300px;
  overflow-y: auto;
  color: var(--text);
  font-family: 'Courier New', monospace;
}

.prompt-output .copy-btn {
  position: absolute;
  top: 8px;
  right: 8px;
}

/* ===== BADGE ===== */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 700;
}

/* ===== TRENNLINIE ===== */
.divider {
  height: 1px;
  background: var(--border);
  margin: 16px 0;
}

/* ===== DATEI-VORSCHAU ===== */
.file-preview {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-size: 0.85rem;
}

.file-preview svg {
  width: 24px;
  height: 24px;
  color: var(--accent-dark);
  flex-shrink: 0;
}

.file-preview .file-name {
  flex: 1;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-preview .file-size {
  color: var(--text-muted);
  font-size: 0.75rem;
  flex-shrink: 0;
}

/* ===== STATISTIKEN ===== */
.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.stat-value {
  font-family: var(--font-headline);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ===== SCROLL BAR ===== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ===== PROJEKTE ===== */

.project-section {
  margin-bottom: 16px;
}

.project-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  gap: 8px;
}

/* Chip-Reihe */
.project-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  min-height: 36px;
}

/* Projekt-Chip */
.project-card {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px 5px 12px;
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-full, 999px);
  cursor: pointer;
  transition: all var(--transition);
  font-size: 0.82rem;
  min-height: 36px;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.project-card:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.project-card.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.project-card-inner {
  display: flex;
  align-items: center;
  gap: 5px;
  flex: 1;
  min-width: 0;
}

.project-check {
  flex-shrink: 0;
  color: #fff;
}

.project-card-name {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 130px;
}

.project-card-count {
  font-size: 0.72rem;
  opacity: 0.65;
  flex-shrink: 0;
}

.project-card.active .project-card-count {
  opacity: 0.85;
}

.project-card-actions {
  display: flex;
  align-items: center;
  gap: 1px;
  flex-shrink: 0;
  margin-left: 2px;
}

/* Ghost-Buttons in aktivem Chip weiß */
.project-card.active .project-card-actions .btn-ghost {
  color: rgba(255, 255, 255, 0.75);
}
.project-card.active .project-card-actions .btn-ghost:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

/* Inline-Formular neues Projekt */
.project-inline-form {
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  margin-bottom: 12px;
}

/* Speicherplatz-Hinweis */
.storage-hint {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 9px 12px;
  background: rgba(240, 165, 0, 0.08);
  border: 1px solid rgba(240, 165, 0, 0.3);
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-top: 4px;
}

.storage-hint svg {
  flex-shrink: 0;
  color: #f0a500;
  margin-top: 1px;
}

/* Aktives-Projekt-Banner */
.active-project-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--primary-light);
  border: 1.5px solid var(--primary);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 12px;
}

.active-project-banner svg {
  flex-shrink: 0;
}

.active-project-banner span {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-clear-project {
  background: none;
  border: none;
  cursor: pointer;
  padding: 3px;
  color: var(--primary);
  display: flex;
  align-items: center;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}

.btn-clear-project:hover {
  background: rgba(26, 127, 168, 0.15);
}

@media (prefers-color-scheme: dark) {
  .storage-hint {
    background: rgba(240, 165, 0, 0.06);
    border-color: rgba(240, 165, 0, 0.2);
  }
  .active-project-banner {
    color: #5bb8d8;
    border-color: #5bb8d8;
    background: rgba(91, 184, 216, 0.1);
  }
  .btn-clear-project {
    color: #5bb8d8;
  }
  .btn-clear-project:hover {
    background: rgba(91, 184, 216, 0.15);
  }
}

/* ===== LEHRER:IN-MODUS ===== */
.teacher-mode-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  margin: 0 0 4px;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.teacher-toggle-label {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  user-select: none;
}

.teacher-mode-hint {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--text-muted);
  margin-left: 2px;
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
}

.toggle-input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.toggle-slider {
  position: absolute;
  inset: 0;
  border-radius: 11px;
  background: var(--border);
  cursor: pointer;
  transition: background 0.2s;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  left: 3px;
  top: 3px;
  background: #fff;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

.toggle-input:checked + .toggle-slider {
  background: var(--primary);
}

.toggle-input:checked + .toggle-slider::before {
  transform: translateX(18px);
}

@media (prefers-color-scheme: dark) {
  .toggle-slider::before {
    background: #ccc;
  }
  .toggle-input:checked + .toggle-slider::before {
    background: #fff;
  }
}

/* ===== PROJEKT-ZUWEISUNGS-POPOVER ===== */
.project-assign-popover {
  position: fixed;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 6px;
  min-width: 190px;
  max-width: 280px;
  z-index: 1200;
}

.pap-title {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 4px 8px 8px;
}

.pap-option {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  border: none;
  background: none;
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.85rem;
  font-family: var(--font-body);
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: background var(--transition);
}

.pap-option:hover {
  background: var(--surface-2);
}

.pap-option.active {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
}

.pap-empty {
  font-size: 0.82rem;
  color: var(--text-muted);
  padding: 8px 10px;
}

/* ===== INTRO / ONBOARDING OVERLAY ===== */
.intro-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 14, 30, 0.72);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: introFadeIn 0.25s ease;
}

.intro-overlay.hidden {
  display: none !important;
}

@keyframes introFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.intro-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  padding: 28px 22px 22px;
  max-width: 460px;
  width: 100%;
  max-height: 92vh;
  overflow-y: auto;
  position: relative;
  animation: introSlideUp 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes introSlideUp {
  from { opacity: 0; transform: translateY(28px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0)   scale(1);    }
}

/* Schließen-Button */
.intro-close {
  position: absolute;
  top: 12px; right: 12px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 6px;
  border-radius: var(--radius-sm);
  line-height: 0;
  transition: color var(--transition), background var(--transition);
}
.intro-close:hover { color: var(--text); background: var(--surface-2); }

/* Kopfbereich */
.intro-header {
  text-align: center;
  margin-bottom: 22px;
}
.intro-logo {
  display: block;
  margin: 0 auto 12px;
}
.intro-title {
  font-family: var(--font-headline);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 5px;
}
.intro-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Schritte */
.intro-steps {
  display: flex;
  flex-direction: column;
  margin-bottom: 20px;
}

.intro-step {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--surface-2);
  border: 1.5px solid var(--border);
}

.intro-step-badge {
  position: relative;
  width: 50px;
  height: 50px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  border-radius: var(--radius-sm);
  line-height: 1;
}

.intro-step-num {
  position: absolute;
  top: -7px; right: -7px;
  width: 18px; height: 18px;
  color: #fff;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 800;
  font-family: var(--font-headline);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--surface);
}

.intro-step-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}

.intro-step-title {
  font-family: var(--font-headline);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}

.intro-tab-chip {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  background: var(--primary-light);
  color: var(--primary);
  white-space: nowrap;
  font-family: var(--font-body);
}

.intro-step-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.55;
}
.intro-step-desc strong { color: var(--text); font-weight: 600; }

/* Verbindungspfeil zwischen Schritten */
.intro-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 22px;
  color: var(--border);
}
.intro-arrow svg { display: block; }

/* CTA */
.intro-start-btn {
  width: 100%;
  padding: 14px;
  font-size: 1rem;
  font-family: var(--font-headline);
  font-weight: 700;
  margin-bottom: 12px;
}

.intro-note {
  text-align: center;
  font-size: 0.74rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.intro-note strong { color: var(--text); }

/* Hilfe-Button im Header */
.help-btn {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1.5px solid var(--border);
  border-radius: 50%;
  cursor: pointer;
  color: var(--text-muted);
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}
.help-btn:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: var(--primary-light);
}
