:root {
  --bg:         #f4f6f9;
  --bg-card:    #ffffff;
  --bg-header:  #1a1f2e;
  --border:     #e2e6ed;
  --accent:     #2563eb;
  --accent-dark:#1d4ed8;
  --text:       #1a1f2e;
  --text-muted: #6b7280;
  --success:    #16a34a;
  --danger:     #dc2626;
  --warning:    #d97706;
  --radius:     10px;
  --shadow:     0 1px 4px rgba(0,0,0,0.08);
  --shadow-md:  0 4px 16px rgba(0,0,0,0.12);
}

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

html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  padding-bottom: max(80px, calc(72px + env(safe-area-inset-bottom)));
}

/* ── Header ── */
.header {
  background: var(--bg-header);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 200;
  padding: 0 16px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  text-decoration: none;
  color: #fff;
}
.header-logo img { width: 28px; height: 28px; border-radius: 6px; }
.header-nav { display: flex; gap: 4px; align-items: center; }
.header-nav a {
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 14px;
  transition: color 0.15s, background 0.15s;
  min-height: 44px;
  display: flex;
  align-items: center;
}
.header-nav a:hover, .header-nav a.active { color: #fff; background: rgba(255,255,255,0.12); }
.header-nav a svg { display: block; }
.header-user {
  display: flex;
  align-items: center;
  gap: 6px;
  color: rgba(255,255,255,0.85);
  font-size: 14px;
  flex-shrink: 0;
}

.nav-icon-btn {
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.75);
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
  flex-shrink: 0;
}
.nav-icon-btn:hover { color: #fff; background: rgba(255,255,255,0.12); }

/* Avatar als Link */
a.avatar {
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.15s, box-shadow 0.15s;
}
a.avatar:hover { opacity: 0.85; box-shadow: 0 0 0 2px rgba(255,255,255,0.4); }
.avatar--active { box-shadow: 0 0 0 2px #fff; }

/* Galerie-Aktions-Icons (Bearbeiten, Teilen, ZIP, Löschen) */
.action-icon-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
  flex-shrink: 0;
}
.action-icon-btn:hover { color: var(--accent); border-color: var(--accent); background: #eff6ff; }
.action-icon-btn svg { display: block; }
.action-icon-btn--danger:hover  { color: var(--danger);  border-color: var(--danger);  background: #fef2f2; }
.action-icon-btn--archive:hover { color: var(--warning); border-color: var(--warning); background: #fffbeb; }
.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ── Layout ── */
.container { max-width: 900px; margin: 0 auto; padding: 20px 16px; }

/* ── Cards ── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}
.card + .card { margin-top: 16px; }
.card-title { font-size: 17px; font-weight: 600; margin-bottom: 16px; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: 8px;
  border: none;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  min-height: 44px;
  text-decoration: none;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn-primary  { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-danger   { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #b91c1c; }
.btn-ghost    { background: transparent; color: var(--text-muted); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--bg); }
.btn-sm { padding: 6px 12px; font-size: 13px; min-height: 36px; }
.btn:disabled { opacity: 0.5; pointer-events: none; }

/* ── Forms ── */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 500; color: var(--text-muted); margin-bottom: 6px; }
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 15px;
  color: var(--text);
  background: var(--bg-card);
  transition: border-color 0.15s;
  min-height: 44px;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}
.form-group textarea { min-height: 80px; resize: vertical; }

/* ── Alerts ── */
.alert {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 16px;
  display: none;
}
.alert.show { display: block; }
.alert-error   { background: #fef2f2; color: var(--danger); border: 1px solid #fecaca; }
.alert-success { background: #f0fdf4; color: var(--success); border: 1px solid #bbf7d0; }
.alert-info    { background: #eff6ff; color: var(--accent); border: 1px solid #bfdbfe; }

/* ── Badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.badge-aktiv   { background: #dcfce7; color: #16a34a; }
.badge-archiv  { background: #f3f4f6; color: #6b7280; }
.badge-chef    { background: #fef3c7; color: #d97706; }

/* ── Gallery Grid ── */
.date-separator {
  grid-column: 1 / -1;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 18px 2px 6px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1px;
}
.date-separator:first-child { padding-top: 4px; }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 3px;
}
@media (min-width: 500px) { .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); } }

.gallery-thumb {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #111;
  cursor: pointer;
  border-radius: 4px;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}
.gallery-thumb img,
.gallery-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.2s;
}
.gallery-thumb:hover img,
.gallery-thumb:hover video { transform: scale(1.04); }

.gallery-thumb--selected {
  outline: 2.5px solid #2563eb;
  outline-offset: -2px;
}
.gallery-thumb--selected::after {
  content: '✓';
  position: absolute;
  top: 6px; left: 6px;
  background: #2563eb;
  color: #fff;
  width: 22px; height: 22px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
  z-index: 3;
  pointer-events: none;
}
.gallery-thumb .thumb-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
  opacity: 0;
  transition: opacity 0.2s;
  display: flex;
  align-items: flex-end;
  padding: 8px;
  gap: 6px;
}
.gallery-thumb:hover .thumb-overlay,
.gallery-thumb.selected .thumb-overlay { opacity: 1; }
.thumb-icon { font-size: 20px; position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); }
.video-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  background: rgba(0,0,0,0.7);
  color: #fff;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
}

/* ── Worker Picker (Galerie erstellen) ── */
.worker-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.worker-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  user-select: none;
  background: none;
  border: none;
  padding: 0;
}
.worker-chip-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--border);
  color: var(--text-muted);
  font-weight: 700;
  font-size: 17px;
  display: flex; align-items: center; justify-content: center;
  border: 3px solid transparent;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.worker-chip-name {
  font-size: 11px;
  color: var(--text-muted);
  max-width: 56px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.15s;
}
.worker-chip.selected .worker-chip-avatar {
  background: var(--accent);
  border-color: #1d4ed8;
  color: #fff;
}
.worker-chip.selected .worker-chip-name {
  color: var(--accent);
  font-weight: 600;
}

/* ── User Cards (admin) ── */
.user-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.user-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.user-card-avatar {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.user-card-info {
  flex: 1;
  min-width: 0;
}
.user-card-name {
  font-weight: 600;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-card-meta {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}
.user-card-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

/* ── Gallery Cards (list) ── */
.gallery-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 600px) { .gallery-cards { grid-template-columns: repeat(2, 1fr); } }

.gallery-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  cursor: pointer;
  transition: box-shadow 0.15s, border-color 0.15s;
  text-decoration: none;
  color: inherit;
  display: block;
}
.gallery-card:hover { box-shadow: var(--shadow-md); border-color: var(--accent); }
.gallery-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.gallery-card-name { font-weight: 600; font-size: 16px; flex: 1; }
.gallery-card-desc { font-size: 13px; color: var(--text-muted); margin-bottom: 10px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.gallery-card-meta { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-muted); flex-wrap: wrap; }

/* ── Lightbox ── */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.95);
  z-index: 500;
  display: none;
  flex-direction: column;
}
.lightbox.open { display: flex; }
.lightbox-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  color: rgba(255,255,255,0.8);
  font-size: 14px;
  flex-shrink: 0;
}
.lightbox-body {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.lightbox-body img,
.lightbox-body video {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transform-origin: center center;
  will-change: transform;
  transition: transform 0.05s linear;
  -webkit-user-drag: none;
}
.lightbox-nav {
  position: absolute;
  bottom: 16px;
  z-index: 10;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, border-color 0.15s;
}
.lightbox-nav:hover { background: rgba(0,0,0,0.8); border-color: rgba(255,255,255,0.5); }
.lightbox-nav.prev { left: 12px; }
.lightbox-nav.next { right: 12px; }
.lb-comment-preview {
  padding: 0 16px 8px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex-shrink: 0;
}
.lb-preview-item {
  display: flex;
  gap: 6px;
  cursor: pointer;
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  overflow: hidden;
  line-height: 1.4;
}
.lb-preview-item:hover { color: rgba(255,255,255,0.8); }
.lb-preview-author {
  color: rgba(255,255,255,0.7);
  white-space: nowrap;
  flex-shrink: 0;
  font-weight: 500;
}
.lb-preview-author::after { content: ':'; }
.lb-preview-body {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lb-preview-more {
  font-size: 11px;
  color: var(--accent);
  cursor: pointer;
  opacity: 0.8;
}
.lb-preview-more:hover { opacity: 1; }

.lightbox-footer {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-shrink: 0;
}

.lb-icon-btn {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.85);
  width: 42px;
  height: 42px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  flex-shrink: 0;
}
.lb-icon-btn:hover { background: rgba(255,255,255,0.2); color: #fff; border-color: rgba(255,255,255,0.4); }
.lb-icon-btn svg { display: block; }
.lb-icon-btn--danger:hover { background: rgba(220,38,38,0.3); border-color: rgba(220,38,38,0.6); color: #fca5a5; }

/* ── FAB ── */
.fab {
  position: fixed;
  bottom: max(24px, calc(24px + env(safe-area-inset-bottom)));
  right: 20px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  border: none;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(37,99,235,0.4);
  cursor: pointer;
  z-index: 100;
  transition: background 0.15s, transform 0.1s;
}
.fab:active { transform: scale(0.94); }
.fab:hover { background: var(--accent-dark); }
.fab.fab-camera {
  right: 88px;
  background: #0f766e;
  box-shadow: 0 4px 16px rgba(15,118,110,0.4);
}
.fab.fab-camera:hover { background: #0d6460; }
.fab.fab-angebote {
  right: 156px;
  background: #7c3aed;
  box-shadow: 0 4px 16px rgba(124,58,237,0.4);
}
.fab.fab-angebote:hover { background: #6d28d9; }

/* ── Modal ── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 300;
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: env(safe-area-inset-bottom);
}
@media (min-width: 500px) { .modal-backdrop { align-items: center; } }
.modal-backdrop.open { display: flex; }
.modal {
  background: var(--bg-card);
  border-radius: var(--radius) var(--radius) 0 0;
  width: 100%;
  max-width: 480px;
  padding: 24px 20px;
  box-shadow: var(--shadow-md);
  max-height: 90vh;
  overflow-y: auto;
}
@media (min-width: 500px) { .modal { border-radius: var(--radius); } }
.modal-title { font-size: 18px; font-weight: 600; margin-bottom: 20px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }

/* ── Upload progress ── */
.upload-progress {
  position: fixed;
  bottom: max(90px, calc(90px + env(safe-area-inset-bottom)));
  left: 16px;
  right: 16px;
  background: var(--bg-header);
  color: #fff;
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  z-index: 150;
  display: none;
  box-shadow: var(--shadow-md);
}
.upload-progress.show { display: block; }
.progress-bar-wrap { background: rgba(255,255,255,0.2); border-radius: 4px; height: 4px; margin-top: 8px; overflow: hidden; }
.progress-bar { background: #60a5fa; height: 100%; border-radius: 4px; transition: width 0.3s; }

/* ── Table ── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; padding: 10px 12px; font-weight: 600; color: var(--text-muted); border-bottom: 2px solid var(--border); }
td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tr:last-child td { border-bottom: none; }

/* ── Filters ── */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.filter-btn {
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--bg-card);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  min-height: 36px;
  transition: all 0.15s;
}
.filter-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ── Page header ── */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 12px;
  flex-wrap: wrap;
}
.page-header h1 { font-size: 22px; font-weight: 700; }

/* ── Empty state ── */
.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
}
.empty-state .icon { font-size: 48px; margin-bottom: 12px; }
.empty-state p { font-size: 15px; }

/* ── Share list ── */
.share-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.share-item:last-child { border-bottom: none; }

/* ── Share worker toggle buttons ── */
.share-worker-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  min-width: 72px;
}
.share-worker-btn:hover { border-color: var(--accent); background: #eff6ff; }
.share-worker-btn--active {
  border-color: var(--accent);
  background: #eff6ff;
}
.share-worker-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  display: flex; align-items: center; justify-content: center;
}
.share-worker-btn--active .share-worker-avatar { background: var(--accent-dark); }
.share-worker-name {
  font-size: 12px;
  color: var(--text);
  text-align: center;
  max-width: 70px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.share-worker-level {
  font-size: 10px;
  color: var(--accent);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

/* ── Login page ── */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: var(--bg-header);
}
.login-card {
  background: var(--bg-card);
  border-radius: 14px;
  padding: 36px 28px;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.3);
}
.login-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 28px;
}
.login-logo img { width: 40px; height: 40px; border-radius: 8px; }
.login-logo span { font-size: 22px; font-weight: 700; }

/* ── Passwort-Feld mit Toggle ── */
.pw-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.pw-wrap input {
  padding-right: 44px;
}
.pw-toggle {
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  width: 44px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0 8px 8px 0;
}
.pw-toggle:hover { color: var(--accent); }

/* ── Kommentare ── */
.comment-badge {
  position: absolute;
  bottom: 6px;
  left: 6px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 6px 2px 4px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 3px;
  pointer-events: none;
  z-index: 3;
  line-height: 1;
}

.lb-icon-btn--commented {
  border-color: var(--accent);
  color: var(--accent);
}
.lb-icon-btn--commented:hover {
  background: rgba(37,99,235,0.2);
  border-color: var(--accent);
  color: #93c5fd;
}

.comment-panel {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  max-height: 55%;
  min-height: 220px;
  background: rgba(13,15,22,0.98);
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.25s ease;
  z-index: 510;
}
.comment-panel.open { transform: translateY(0); }

.comment-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}

.comment-list {
  flex: 1;
  overflow-y: auto;
  padding: 10px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.comment-list::-webkit-scrollbar { width: 4px; }
.comment-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 2px; }

.comment-placeholder {
  font-size: 13px;
  color: rgba(255,255,255,0.4);
  text-align: center;
  padding: 16px 0;
}

.comment-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.comment-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.comment-author {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,0.8);
}

.comment-date {
  font-size: 11px;
  color: rgba(255,255,255,0.35);
  flex: 1;
}

.comment-delete {
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.25);
  cursor: pointer;
  padding: 2px;
  display: flex;
  align-items: center;
  border-radius: 4px;
  transition: color 0.15s;
}
.comment-delete:hover { color: #fca5a5; }

.comment-edit {
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.25);
  cursor: pointer;
  padding: 2px;
  display: flex;
  align-items: center;
  border-radius: 4px;
  opacity: 0;
  transition: color 0.15s, opacity 0.15s;
}
.comment-item:hover .comment-edit { opacity: 1; }
.comment-edit:hover { color: var(--accent); }

.comment-body--editing {
  outline: 1px solid var(--accent);
  border-radius: 4px;
  padding: 4px 6px;
  cursor: text;
  min-height: 1.5em;
  caret-color: var(--accent);
}
.comment-edit-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  margin-top: 6px;
}

.comment-body {
  font-size: 13px;
  color: rgba(255,255,255,0.75);
  line-height: 1.5;
  word-break: break-word;
  white-space: pre-wrap;
}

.comment-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-top: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}

.comment-input-row input {
  flex: 1;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px;
  color: #fff;
  font-size: 14px;
  padding: 8px 12px;
  outline: none;
  transition: border-color 0.15s;
}
.comment-input-row input::placeholder { color: rgba(255,255,255,0.3); }
.comment-input-row input:focus { border-color: var(--accent); }

.comment-input-row button {
  background: var(--accent);
  border: none;
  border-radius: 8px;
  color: #fff;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s;
}
.comment-input-row button:hover { background: var(--accent-dark); }
.comment-input-row button:disabled { opacity: 0.5; cursor: default; }

/* ── Notification toggle ── */
.notify-toggle-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: default;
}
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--border);
  border-radius: 22px;
  transition: background 0.2s;
  cursor: pointer;
}
.toggle-slider::before {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
}
.toggle-switch input:checked + .toggle-slider { background: var(--accent); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(18px); }

/* ── Responsive tweaks ── */
@media (max-width: 380px) {
  .container { padding: 16px 12px; }
  .card { padding: 16px; }
}

/* Modal: auf kleinen Bildschirmen volle Breite, genug Innenabstand */
@media (max-width: 499px) {
  .modal {
    padding: 20px 16px;
    border-radius: 14px 14px 0 0;
  }
  .modal-actions {
    flex-direction: column-reverse;
    gap: 8px;
  }
  .modal-actions .btn {
    width: 100%;
    justify-content: center;
  }
}
