* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: #1a1a1a;
  background: #F5F5F5;
  font-size: 14px;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}
main { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.topbar {
  background: #fff;
  border-bottom: 1px solid #E0E0E0;
  padding: 10px 20px;
  display: flex;
  gap: 24px;
  align-items: center;
  flex-shrink: 0;
  z-index: 100;
}
.brand-title { font-weight: 700; font-size: 16px; border-bottom: 3px solid #FF6600; padding-bottom: 2px; display: inline-block; }
.brand-sub { font-size: 11px; color: #666; margin-top: 4px; }
.view-switch { display: flex; gap: 6px; }
.view-btn {
  padding: 6px 14px;
  border: 1px solid #E0E0E0;
  background: #fff;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-family: inherit;
}
.view-btn.active { background: #FF6600; color: #fff; border-color: #FF6600; }
.topbar-right { margin-left: auto; display: flex; gap: 12px; align-items: center; }
.identity input {
  border: 1px solid #E0E0E0;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 12px;
  width: 160px;
  font-family: inherit;
}
.presence { display: flex; gap: 4px; }
.avatar {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 600; font-size: 11px;
  border: 2px solid #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
.share { font-size: 11px; color: #666; }
.share code { background: #F5F5F5; padding: 2px 6px; border-radius: 4px; }
.share button { margin-left: 4px; cursor: pointer; border: none; background: transparent; }
.btn-ghost {
  background: transparent; border: 1px solid #E0E0E0; border-radius: 6px;
  padding: 5px 10px; cursor: pointer; font-size: 12px; font-family: inherit; color: #333;
  display: inline-block; text-decoration: none; line-height: 1.4;
}
.btn-ghost:hover { border-color: #FF6600; color: #FF6600; }

.view { display: none; padding: 16px 20px; }
.view.active { display: block; flex: 1 1 auto; min-height: 0; }
#view-board.active, #view-settings.active { overflow-y: auto; }

.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.4);
  display: flex; align-items: center; justify-content: center;
  z-index: 200;
}
.modal-overlay[hidden] { display: none; }
.modal {
  background: #fff; border-radius: 8px; padding: 20px;
  width: 480px; max-width: 90vw; max-height: 90vh; overflow: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.filter-bar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.filter-group { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.filter-label { font-weight: 600; font-size: 12px; color: #666; }
.filter-btn {
  padding: 4px 12px; border-radius: 14px; border: 1px solid #ddd;
  background: #fff; font-size: 11px; cursor: pointer; font-family: inherit;
}
.filter-btn.active { background: #1a1a1a; color: #fff; border-color: #1a1a1a; }
.search-input {
  padding: 4px 12px; border-radius: 14px; border: 1px solid #ddd;
  font-size: 12px; width: 200px; font-family: inherit;
}
.btn-primary {
  background: #FF6600; color: #fff; border: none; border-radius: 6px;
  padding: 6px 12px; font-size: 12px; font-weight: 600; cursor: pointer; font-family: inherit;
}
.btn-primary:hover { background: #E65C00; }
.stats { margin-left: auto; display: flex; gap: 8px; }
.stat-pill { background: #fff; border: 1px solid #E0E0E0; padding: 3px 10px; border-radius: 12px; font-size: 11px; color: #555; }

.stream { margin-bottom: 20px; border-radius: 8px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.stream-header {
  padding: 10px 16px; color: #fff; font-weight: 700; font-size: 14px;
  display: flex; justify-content: space-between; align-items: center;
}
.stream-foundation .stream-header { background: #1F4E79; }
.stream-usecases .stream-header { background: #538135; }
.stream-count { font-weight: 400; font-size: 11px; opacity: 0.85; background: rgba(255,255,255,0.2); padding: 2px 10px; border-radius: 10px; }
.stream-body { background: #fff; display: flex; overflow-x: auto; }

.phase { min-width: 260px; max-width: 300px; flex: 1; border-right: 1px solid #eee; display: flex; flex-direction: column; }
.phase:last-child { border-right: none; }
.phase-header { padding: 8px 12px; font-size: 12px; font-weight: 700; color: #555; background: #fafafa; border-bottom: 1px solid #eee; display: flex; justify-content: space-between; }
.phase-count { font-size: 10px; font-weight: 400; background: #eee; padding: 1px 8px; border-radius: 8px; }
.phase-cards { padding: 8px; display: flex; flex-direction: column; gap: 6px; min-height: 80px; }

.card {
  background: #fff; border-radius: 6px; padding: 8px 10px;
  border-left: 4px solid #ccc;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  position: relative; cursor: grab;
  transition: box-shadow 0.15s, transform 0.15s;
}
.card:hover { box-shadow: 0 3px 8px rgba(0,0,0,0.15); transform: translateY(-1px); }
.card.hidden { display: none; }
.card-title { font-weight: 600; font-size: 11.5px; line-height: 1.3; margin-bottom: 4px; padding-right: 36px; }
.card-meta { display: flex; gap: 4px; flex-wrap: wrap; }
.badge-effort { background: #f0f0f0; color: #555; padding: 1px 6px; border-radius: 4px; font-size: 9px; font-weight: 600; }
.badge-prio { padding: 1px 6px; border-radius: 4px; font-size: 9px; font-weight: 600; }
.badge-prio-Hoch { background: #FFEBEE; color: #C62828; }
.badge-prio-Mittel { background: #FFF3E0; color: #EF6C00; }
.badge-prio-Niedrig { background: #E8F5E9; color: #2E7D32; }
.badge-dep { padding: 1px 6px; border-radius: 4px; font-size: 9px; font-weight: 600; }
.badge-dep-system { background: #FFF2CC; color: #7F6000; border: 1px solid #BF9000; }
.badge-dep-vertrieb { background: #D9E8F5; color: #1F3F5E; border: 1px solid #2E75B6; }
.badge-dep-service { background: #E2D9F3; color: #4A1D7A; border: 1px solid #7030A0; }
.badge-dep-multi { background: #FFD6D6; color: #8B0000; border: 1px solid #C00000; }
.card.dep-system { border-left-color: #BF9000; }
.card.dep-vertrieb { border-left-color: #2E75B6; }
.card.dep-service { border-left-color: #7030A0; }
.card.dep-multi { border-left-color: #C00000; }
.card.dep-none { border-left-color: #4CAF50; }
.card-detail { margin-top: 6px; padding-top: 6px; border-top: 1px solid #eee; font-size: 10px; color: #666; line-height: 1.4; }

.card-delete, .card-edit {
  position: absolute; top: 4px; width: 18px; height: 18px; border-radius: 50%;
  border: none; background: #eee; color: #666; font-size: 11px; cursor: pointer;
  display: none; align-items: center; justify-content: center; line-height: 1;
}
.card-delete { right: 4px; }
.card-edit { right: 26px; }
.card:hover .card-delete, .card:hover .card-edit { display: flex; }
.card-delete:hover { background: #ffcdd2; color: #c62828; }
.card-edit:hover { background: #FFE0B2; color: #EF6C00; }

.modal h2 { font-size: 16px; margin-bottom: 14px; }
.modal label { display: block; font-size: 11px; font-weight: 600; color: #666; margin-top: 10px; margin-bottom: 3px; }
.modal input, .modal select, .modal textarea {
  width: 100%; padding: 7px 10px; border: 1px solid #E0E0E0; border-radius: 6px;
  font-size: 13px; font-family: inherit; background: #fff;
}
.modal input:focus, .modal select:focus, .modal textarea:focus { outline: none; border-color: #FF6600; }
.modal textarea { resize: vertical; min-height: 48px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; }
.card.dragging { opacity: 0.5; cursor: grabbing; }
.phase-cards.drag-over { background: #FFF4E6; outline: 2px dashed #FF6600; outline-offset: -2px; }

#view-timeline { overflow: hidden; }
#view-timeline.active {
  display: flex;
  flex-direction: column;
  padding: 16px 20px;
  box-sizing: border-box;
}
#timeline { flex: 0 1 auto; min-height: 200px; max-height: 70vh; overflow: auto; }
#backlog { flex: 1 1 auto; min-height: 180px; margin-top: 12px; display: flex; flex-direction: column; }
#backlog .backlog-body { max-height: none; flex: 1 1 auto; overflow-y: auto; }
.timeline-container { display: flex; min-width: 100%; }
.lane-labels { position: sticky; left: 0; width: 160px; background: #fff; border-right: 1px solid #E0E0E0; z-index: 10; flex-shrink: 0; }
.lane-label {
  height: 72px; display: flex; align-items: center; padding: 0 12px;
  font-size: 12px; font-weight: 600; border-left: 4px solid #ccc; border-bottom: 1px solid #eee;
}
.lane-label-dep { height: 40px; font-size: 11px; background: #FAFAFA; border-left-color: transparent; color: #555; }
.lane-labels::before { content: ''; display: block; height: 40px; background: #FAFAFA; border-bottom: 1px solid #eee; }

.timeline-canvas { position: relative; background: #fff; border-radius: 0 0 6px 0; overflow: hidden; }
.timeline-axis { position: absolute; top: 0; left: 0; right: 0; height: 40px; background: #FAFAFA; border-bottom: 1px solid #eee; }
.axis-week { position: absolute; top: 10px; font-size: 11px; font-weight: 600; color: #555; padding-left: 4px; }
.axis-tick { position: absolute; top: 0; bottom: -9999px; width: 1px; background: #EEE; }
.lane-row { position: absolute; left: 0; right: 0; border-bottom: 1px solid #EEE; }
.lane-row-dep { background: #FAFAFA; }
.today-line { position: absolute; top: 0; bottom: 0; width: 2px; background: #FF6600; z-index: 5; pointer-events: none; box-shadow: 0 0 8px rgba(255,102,0,0.4); }

.timeline-card {
  position: absolute;
  background: #fff;
  border-radius: 6px;
  padding: 6px 8px;
  border-left: 4px solid #ccc;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  overflow: hidden;
  cursor: grab;
  font-size: 11px;
  box-sizing: border-box;
}
.tl-weekend-overlay {
  position: absolute;
  top: 0; bottom: 0;
  background: repeating-linear-gradient(
    135deg,
    rgba(0,0,0,0.08) 0,
    rgba(0,0,0,0.08) 3px,
    rgba(0,0,0,0.14) 3px,
    rgba(0,0,0,0.14) 6px
  );
  pointer-events: none;
}
.tl-title { font-weight: 600; font-size: 11px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; position: relative; z-index: 2; }
.tl-meta { display: flex; gap: 3px; margin-top: 3px; flex-wrap: wrap; position: relative; z-index: 2; }

.dep-bar {
  position: absolute; height: 20px; border-radius: 4px; opacity: 0.9; cursor: pointer;
  border: 1px solid;
}
.dep-bar.dep-system { background: #FFF2CC; border-color: #BF9000; }
.dep-bar.dep-vertrieb { background: #D9E8F5; border-color: #2E75B6; }
.dep-bar.dep-service { background: #E2D9F3; border-color: #7030A0; }
.dep-bar.dep-multi { background: #FFD6D6; border-color: #C00000; }

#backlog { margin-top: 16px; background: #fff; border-radius: 6px; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.backlog-header { padding: 8px 12px; border-bottom: 1px solid #eee; display: flex; align-items: center; gap: 12px; }
.backlog-title { font-weight: 700; font-size: 13px; }
.backlog-body { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px; max-height: 220px; overflow-y: auto; align-items: flex-start; align-content: flex-start; }
.backlog-body.collapsed { display: none; }
.backlog-card {
  background: #fff; border: 1px solid #eee; border-left: 4px solid #ccc;
  border-radius: 6px; padding: 6px 8px; font-size: 11px;
  width: 220px; box-shadow: 0 1px 2px rgba(0,0,0,0.06); cursor: grab;
}
.backlog-card.dep-system { border-left-color: #BF9000; }
.backlog-card.dep-vertrieb { border-left-color: #2E75B6; }
.backlog-card.dep-service { border-left-color: #7030A0; }
.backlog-card.dep-multi { border-left-color: #C00000; }
.backlog-card.dep-none { border-left-color: #4CAF50; }
.lane-row.drag-over { background: rgba(255,102,0,0.08); }
#backlog.drag-over { outline: 2px dashed #FF6600; outline-offset: -4px; }

/* Task 14: Styling-Feinschliff */
body { line-height: 1.5; }
h1, h2, h3 { line-height: 1.2; }

.topbar { min-height: 56px; gap: 20px; }
.brand-title { font-size: 15px; }
.brand-sub { font-size: 10px; }

.filter-bar { background: #fff; padding: 10px 14px; border-radius: 6px; box-shadow: 0 1px 3px rgba(0,0,0,0.06); }

.card, .timeline-card, .backlog-card { transition: box-shadow 0.15s ease, transform 0.15s ease; }

:focus-visible { outline: 2px solid #FF6600; outline-offset: 2px; }

@media print {
  .topbar, .filter-bar, #backlog, .modal-overlay { display: none !important; }
  .view { display: block !important; }
}

.lane-admin { margin-top: 12px; background: #fff; border-radius: 6px; padding: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
.lane-admin-panel { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.lane-admin-panel[hidden] { display: none; }
.lane-admin-row { display: grid; grid-template-columns: 40px 1fr auto; gap: 8px; align-items: center; }
.lane-admin-row.add-row { grid-template-columns: 160px 1fr 40px auto; border-top: 1px solid #eee; padding-top: 8px; margin-top: 4px; }
.lane-admin-row input[type="text"] { padding: 5px 8px; border: 1px solid #E0E0E0; border-radius: 4px; font-size: 12px; }
.lane-admin-row button { padding: 5px 10px; border: 1px solid #E0E0E0; background: #fff; border-radius: 4px; cursor: pointer; font-size: 12px; }

.tl-resize-handle {
  position: absolute; right: 0; top: 0; bottom: 0; width: 6px;
  cursor: ew-resize; background: transparent;
}
.timeline-card:hover .tl-resize-handle { background: rgba(255,102,0,0.3); }

/* Settings View */
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 1200px; }
.settings-card { background: #fff; border-radius: 8px; padding: 14px; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.settings-card h3 { font-size: 14px; margin-bottom: 12px; color: #1a1a1a; }
.settings-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.settings-row { display: flex; gap: 6px; align-items: center; }
.settings-row input[type="text"] { flex: 1; padding: 5px 8px; border: 1px solid #E0E0E0; border-radius: 4px; font-size: 12px; font-family: inherit; }
.settings-row input[type="number"] { width: 60px; padding: 5px 8px; border: 1px solid #E0E0E0; border-radius: 4px; font-size: 12px; font-family: inherit; }
.settings-row button { padding: 4px 10px; border: 1px solid #E0E0E0; background: #fff; border-radius: 4px; cursor: pointer; font-size: 12px; }
.settings-row button:hover { background: #FFEBEE; border-color: #E53935; color: #C62828; }
.settings-phase-stream { margin-bottom: 14px; }
.settings-phase-head { font-weight: 600; font-size: 13px; margin-bottom: 6px; color: #333; }
.stream-generic .stream-header { background: #424242; }
@media (max-width: 900px) {
  .settings-grid { grid-template-columns: 1fr; }
}

#view-settings { padding: 20px; }

.phase-orphan .phase-header { background: #FFF4E6; color: #EF6C00; font-style: italic; }

.backlog-filter { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-left: 12px; }
.backlog-filter select,
.backlog-filter input[type="search"] {
  padding: 4px 8px; border: 1px solid #E0E0E0; border-radius: 4px;
  font-size: 11px; font-family: inherit; background: #fff;
}
.backlog-filter input[type="search"] { width: 160px; }
.backlog-filter select:focus, .backlog-filter input:focus { outline: none; border-color: #FF6600; }
.backlog-header { gap: 10px; flex-wrap: wrap; }

.badge-owner { background: #EDE7F6; color: #4527A0; padding: 1px 6px; border-radius: 4px; font-size: 9px; font-weight: 600; border: 1px solid #B39DDB; }

.qr-modal { width: 420px; max-width: 92vw; text-align: center; }
.qr-modal h2 { text-align: center; }
#qr-canvas { margin: 16px auto 8px; display: flex; justify-content: center; }
#qr-canvas svg { display: block; }
.qr-url { font-size: 12px; color: #555; margin: 12px 0; word-break: break-all; }
.qr-url code { background: #F5F5F5; padding: 4px 8px; border-radius: 4px; }

/* ===== Mobile-Optimierung ===== */
@media (max-width: 768px) {
  .topbar {
    flex-wrap: wrap;
    gap: 8px 12px;
    padding: 8px 12px;
    min-height: 0;
  }
  .topbar-brand { flex: 1 1 100%; order: 1; }
  .brand-title { font-size: 14px; }
  .brand-sub { font-size: 10px; display: none; }
  .view-switch { order: 2; flex: 1 1 100%; justify-content: space-between; }
  .view-switch .view-btn { flex: 1; padding: 7px 10px; font-size: 12px; }
  .topbar-right {
    order: 3;
    flex: 1 1 100%;
    flex-wrap: wrap;
    gap: 8px;
    margin-left: 0;
  }
  .identity { flex: 1 1 140px; font-size: 11px; }
  .identity input { width: 100%; }
  .presence { flex: 0 0 auto; }
  .avatar { width: 24px; height: 24px; font-size: 10px; }
  .share { flex: 1 1 100%; font-size: 10px; order: 10; }
  .share code { font-size: 10px; word-break: break-all; }
  #btn-export, #btn-import, #btn-reset { flex: 1; padding: 7px 6px; font-size: 11px; }

  .view { padding: 12px; }

  /* Board: Streams untereinander statt horizontal scrollbar */
  .stream-body { flex-direction: column; }
  .phase { min-width: 100%; max-width: 100%; border-right: none; border-bottom: 1px solid #eee; }
  .phase:last-child { border-bottom: none; }

  .filter-bar { gap: 6px; padding: 8px; }
  .filter-btn { padding: 5px 10px; font-size: 11px; }
  .search-input { flex: 1 1 100%; width: auto; }
  .btn-primary { width: 100%; padding: 8px 12px; }
  .stats { margin-left: 0; flex: 1 1 100%; justify-content: flex-end; }

  /* Timeline: bleibt horizontal scrollbar, aber Labels schmaler */
  #view-timeline.active { padding: 10px; }
  .lane-labels { width: 110px; }
  .lane-label { padding: 0 8px; font-size: 11px; }
  .lane-label span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

  /* Backlog: mehr Platz nehmen, weil auf Mobile wichtiger als die Gantt-Sicht */
  #backlog { max-height: 40vh; flex: 1 1 auto; }
  #timeline { max-height: 50vh; }
  .backlog-filter { gap: 4px; margin-left: 0; flex: 1 1 100%; }
  .backlog-filter select, .backlog-filter input[type="search"] {
    flex: 1 1 45%; width: auto; font-size: 12px; padding: 6px 8px;
  }
  .backlog-card { width: 100%; }

  /* Settings */
  .settings-grid { grid-template-columns: 1fr; gap: 10px; }
  .settings-card { padding: 10px; }

  /* Karten auf Touch: groessere Tap-Targets */
  .card-delete, .card-edit { width: 24px; height: 24px; display: flex !important; }
  .card-title { padding-right: 60px; }

  /* Modal full-width auf Mobile */
  .modal { width: 96vw; max-width: 96vw; max-height: 92vh; padding: 14px; }
  .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .brand-title { font-size: 13px; }
  .view-switch .view-btn { font-size: 11px; padding: 6px 8px; }
  .lane-labels { width: 92px; }
  .lane-label { font-size: 10px; padding: 0 6px; }
}

/* Filter-Toggle: auf Desktop unsichtbar, Body ist immer inline. Auf Mobile
   wird der Toggle sichtbar und der Body kann via hidden-Attribut kollabiert
   werden. */
.filter-toggle {
  display: none;
  padding: 6px 12px;
  border-radius: 14px;
  border: 1px solid #FF6600;
  background: #fff;
  color: #FF6600;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.filter-bar-body { display: contents; }
.filter-bar-body[hidden] { display: none; }

@media (max-width: 768px) {
  .filter-toggle { display: inline-block; flex: 1 1 auto; }
  .filter-bar-body {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    flex: 1 1 100%;
  }
  .filter-bar-body[hidden] { display: none; }
  .backlog-filter[hidden] { display: none; }
}

/* Timeline-Hintergrund: Tagesraster + Wochenend-Shading */
.timeline-grid { position: absolute; left: 0; right: 0; pointer-events: none; z-index: 0; }
.grid-weekend { position: absolute; top: 0; bottom: 0; background: rgba(0, 0, 0, 0.035); }
.grid-line { position: absolute; top: 0; bottom: 0; width: 1px; background: #F2F2F2; }
.grid-line-week { background: #DDD; }

/* Drop-Preview waehrend Drag */
.drop-preview {
  position: absolute;
  width: 2px;
  background: #FF6600;
  pointer-events: none;
  z-index: 6;
  box-shadow: 0 0 6px rgba(255, 102, 0, 0.5);
}
.drop-preview[hidden] { display: none; }
.drop-preview::before {
  content: attr(data-label);
  position: absolute;
  top: -22px;
  left: 4px;
  font-size: 10px;
  font-weight: 600;
  color: #fff;
  background: #FF6600;
  padding: 2px 6px;
  border-radius: 3px;
  white-space: nowrap;
}

/* Gezogene Timeline-Karte blockiert dragover-Events darunter nicht mehr,
   damit die Lane-Row den Drop-Preview aktualisieren kann. */
.timeline-card.tl-dragging { opacity: 0.35; cursor: grabbing; }

/* Tooltip fuer Timeline-Karten */
.tl-tooltip {
  position: fixed;
  z-index: 300;
  background: #1a1a1a;
  color: #fff;
  border-radius: 8px;
  padding: 10px 14px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
  max-width: 360px;
  font-size: 12px;
  line-height: 1.4;
  pointer-events: none;
}
.tl-tooltip[hidden] { display: none; }
.tl-tt-title { font-weight: 700; font-size: 13px; margin-bottom: 6px; line-height: 1.3; }
.tl-tt-meta { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 8px; }
.tl-tt-meta .badge-effort { background: rgba(255,255,255,0.15); color: #eee; }
.tl-tt-meta .badge-prio { background: rgba(255,255,255,0.1); color: #fff; }
.tl-tt-row { margin-top: 2px; color: #ddd; }
.tl-tt-row b { color: #fff; font-weight: 600; }
.tl-tt-desc {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,0.15);
  color: #ddd;
  font-size: 11px;
  line-height: 1.45;
  max-height: 200px;
  overflow-y: auto;
}

.tl-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.tl-actions button { font-size: 12px; padding: 5px 10px; }

/* Reset-Bestaetigungs-Modal */
.reset-modal { width: 520px; max-width: 92vw; }
.reset-modal h2 { color: #C62828; font-size: 17px; margin-bottom: 14px; }
.reset-warning { font-size: 13px; color: #333; margin-bottom: 8px; }
.reset-list { margin: 4px 0 16px 20px; font-size: 12px; color: #555; line-height: 1.7; }
.reset-confirm-label { font-size: 13px; margin-bottom: 6px; color: #333; }
.reset-confirm-label code {
  background: #FFF3E0;
  color: #C62828;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 700;
  letter-spacing: 0.05em;
}
#reset-confirm-input {
  width: 100%; padding: 10px 14px;
  border: 2px solid #E0E0E0;
  border-radius: 6px;
  font-size: 16px;
  font-family: inherit;
  letter-spacing: 0.1em;
  text-align: center;
  text-transform: uppercase;
}
#reset-confirm-input:focus { outline: none; border-color: #FF6600; }
.btn-danger {
  background: #C62828;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.btn-danger:hover:not(:disabled) { background: #8E1E1E; }
.btn-danger:disabled { background: #E0E0E0; color: #999; cursor: not-allowed; }

/* ---------- Auth-Seiten ---------- */
body.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: #f5f5f7;
  margin: 0;
}
.auth-card {
  background: #fff;
  padding: 32px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 320px;
}
.auth-card h1 { margin: 0 0 8px; font-size: 20px; }
.auth-card label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.auth-card input[type="email"],
.auth-card input[type="password"] {
  padding: 8px 10px; border: 1px solid #d0d0d6; border-radius: 6px; font-size: 14px;
}
.auth-card button {
  padding: 10px; background: #1a73e8; color: #fff; border: none;
  border-radius: 6px; font-weight: 500; cursor: pointer;
}
.auth-card button:hover { background: #1557b0; }
.auth-error {
  background: #fdecea; color: #b71c1c; padding: 8px 12px;
  border-radius: 6px; font-size: 13px;
}
.auth-hint { font-size: 13px; color: #555; margin: 0; }

/* ---------- Admin-Seite ---------- */
body.admin-page { background: #f5f5f7; margin: 0; font-family: inherit; }
.admin-header { padding: 16px 32px; background: #fff; border-bottom: 1px solid #e0e0e4; display: flex; justify-content: space-between; align-items: center; }
.admin-header h1 { margin: 0; font-size: 18px; }
.admin-main { padding: 24px 32px; max-width: 960px; margin: 0 auto; }
.admin-toolbar { margin-bottom: 16px; }
.admin-toolbar button { padding: 8px 16px; background: #1a73e8; color: #fff; border: none; border-radius: 6px; cursor: pointer; }
.admin-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,0.05); }
.admin-table th, .admin-table td { padding: 10px 14px; text-align: left; border-bottom: 1px solid #eee; font-size: 13px; }
.admin-table thead th { background: #fafafa; font-weight: 500; }
.admin-table button { margin-right: 4px; padding: 4px 8px; font-size: 12px; background: #f5f5f7; border: 1px solid #d0d0d6; border-radius: 4px; cursor: pointer; }
.admin-flash { margin: 0 0 16px; padding: 12px 16px; border-radius: 6px; font-size: 14px; display: flex; align-items: center; gap: 12px; }
.admin-flash-success { background: #e8f5e9; color: #1b5e20; border: 1px solid #a5d6a7; }
.admin-flash-error { background: #fdecea; color: #b71c1c; border: 1px solid #ef9a9a; }
.admin-flash button { padding: 4px 10px; background: #fff; border: 1px solid #d0d0d6; border-radius: 4px; cursor: pointer; }

/* ---------- Timeline-Toolbar (Filter) ---------- */
#tl-toolbar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 12px 12px;
  flex-shrink: 0;
}
.tl-filter-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #333;
}
.tl-filter-label select {
  padding: 4px 8px;
  border: 1px solid #D0D0D6;
  border-radius: 4px;
  font-size: 13px;
  background: #fff;
}
.tl-filter-hint {
  font-size: 12px;
  color: #FF6600;
}
.tl-filter-hint a {
  color: #FF6600;
  text-decoration: underline;
}
