/* ── Variables ─────────────────────────────────── */
:root {
  --bg:          #080808;
  --surface:     #111111;
  --surface-2:   #191919;
  --surface-3:   #232323;
  --border:      #2a2a2a;
  --border-2:    #363636;
  --text:        #ededed;
  --text-mid:    #aaaaaa;
  --text-muted:  #616161;
  --accent:      #c8a96e;
  --red:         #c0392b;
  --red-soft:    rgba(192, 57, 43, 0.18);
  --yellow:      #c49a0a;
  --yellow-soft: rgba(196, 154, 10, 0.18);
  --green:       #27a257;
  --green-soft:  rgba(39, 162, 87, 0.18);
  --radius:      6px;
  --radius-lg:   12px;
  --transition:  0.18s ease;
}

/* ── Reset ─────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }
body {
  font-family: 'Outfit', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
img { display: block; max-width: 100%; }

/* ── Layout ─────────────────────────────────────── */
.page {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.page > footer { margin-top: auto; }

/* ── Header ─────────────────────────────────────── */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 0 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 48px;
}
.site-logo {
  font-family: 'Crimson Pro', serif;
  font-size: 1.6rem;
  font-weight: 300;
  letter-spacing: 0.02em;
  color: var(--text);
}
.site-logo span { color: var(--accent); }
.header-nav {
  display: flex;
  gap: 6px;
}
.nav-link {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: var(--radius);
  transition: color var(--transition), background var(--transition);
}
.nav-link:hover { color: var(--text); background: var(--surface-2); }
.nav-link.active { color: var(--accent); }

/* ── Breadcrumb ─────────────────────────────────── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 32px;
  flex-wrap: wrap;
}
.breadcrumb a {
  color: var(--text-muted);
  transition: color var(--transition);
}
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb-sep { color: var(--border-2); }
.breadcrumb-current { color: var(--text-mid); }

/* ── Gallery note ────────────────────────────────── */
.gallery-note {
  border-left: 2px solid var(--accent);
  padding: 2px 0 2px 14px;
  margin-bottom: 28px;
  font-size: 0.95rem;
  color: var(--text-mid);
  line-height: 1.7;
  max-width: 680px;
}

/* ── Page Title ─────────────────────────────────── */
.page-title {
  font-family: 'Crimson Pro', serif;
  font-size: 2.4rem;
  font-weight: 300;
  letter-spacing: 0.01em;
  margin-bottom: 8px;
  color: var(--text);
}
.page-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 40px;
}

/* ── Folder Grid (index + subfolder view) ───────── */
.folder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
}
.folder-card {
  display: block;
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0;
  overflow: hidden;
  cursor: pointer;
  transition: border-color var(--transition);
  text-decoration: none;
}
.folder-card:hover {
  border-color: var(--border-2);
}
.folder-card-preview {
  width: 100%;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--surface-2);
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 1px;
}
.folder-card-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.85);
  transition: filter var(--transition);
}
.folder-card-preview.single img { grid-column: span 2; grid-row: span 2; }
.folder-card:hover .folder-card-preview img { filter: brightness(1); }
.folder-card-preview-empty {
  width: 100%;
  aspect-ratio: 4/3;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--border-2);
  font-size: 2rem;
}
.folder-card-body {
  padding: 16px 18px 18px;
}
.folder-card-name {
  font-weight: 500;
  font-size: 0.95rem;
  margin-bottom: 4px;
  color: var(--text);
}
.folder-card-meta {
  font-size: 0.76rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 10px;
}
.folder-label-dots {
  display: flex;
  gap: 4px;
  align-items: center;
}
.label-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}
.label-dot.red    { background: var(--red);    }
.label-dot.yellow { background: var(--yellow); }
.label-dot.green  { background: var(--green);  }
.label-dot.count  {
  background: none;
  font-size: 0.68rem;
  color: var(--text-muted);
  width: auto;
  height: auto;
  border-radius: 0;
  letter-spacing: 0;
}

/* ── Thumbnail Grid ─────────────────────────────── */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.filter-btn {
  font-family: 'Outfit', sans-serif;
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 99px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  background: none;
  transition: all var(--transition);
}
.filter-btn:hover { border-color: var(--border-2); color: var(--text); }
.filter-btn.active { border-color: var(--border-2); color: var(--text); background: var(--surface-2); }
.filter-btn.f-red.active    { border-color: var(--red);    color: var(--red);    background: var(--red-soft);    }
.filter-btn.f-yellow.active { border-color: var(--yellow); color: var(--yellow); background: var(--yellow-soft); }
.filter-btn.f-green.active  { border-color: var(--green);  color: var(--green);  background: var(--green-soft);  }
.filter-spacer { flex: 1; }
.filter-count {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.thumbnail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 3px;
}
.thumbnail-item {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  cursor: pointer;
  background: var(--surface-2);
}
.thumbnail-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease, filter 0.3s ease;
  filter: brightness(0.9);
  will-change: transform;
}
.thumbnail-item:hover img {
  transform: scale(1.04);
  filter: brightness(1);
}

/* Color borders */
.thumbnail-item::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 3px solid transparent;
  pointer-events: none;
  transition: border-color var(--transition);
  z-index: 2;
}
.thumbnail-item[data-color="red"]::after    { border-color: var(--red);    }
.thumbnail-item[data-color="yellow"]::after { border-color: var(--yellow); }
.thumbnail-item[data-color="green"]::after  { border-color: var(--green);  }

/* Color badge top-right – disabled (farbiger Rahmen reicht) */
.thumbnail-badge { display: none !important; }

/* Comment indicator */
.thumbnail-comment-dot {
  position: absolute;
  bottom: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.7);
  z-index: 3;
  display: none;
}
.thumbnail-item[data-has-comment="1"] .thumbnail-comment-dot { display: block; }

.thumbnail-filename {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 24px 8px 8px;
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 100%);
  font-size: 0.68rem;
  color: rgba(255,255,255,0.75);
  opacity: 0;
  transition: opacity var(--transition);
  z-index: 2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.thumbnail-item:hover .thumbnail-filename { opacity: 1; }

.thumbnail-item.hidden { display: none; }

/* ── Lightbox ───────────────────────────────────── */
#lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
#lightbox.active {
  opacity: 1;
  pointer-events: all;
}

.lb-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(4px);
}

.lb-layout {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: stretch;
}

.lb-image-area {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 60px 72px;
}

.lb-image-wrap {
  position: relative;
  max-width: 100%;
  max-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

#lb-image {
  max-width: 100%;
  max-height: calc(100vh - 120px);
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.6);
  transition: opacity 0.2s ease;
}

.lb-prev, .lb-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 50%;
  color: var(--text);
  font-size: 1.1rem;
  transition: all var(--transition);
  z-index: 10;
}
.lb-prev { left: 16px; }
.lb-next { right: 16px; }
.lb-prev:hover, .lb-next:hover {
  background: rgba(255,255,255,0.14);
  border-color: rgba(255,255,255,0.25);
}
.lb-prev:disabled, .lb-next:disabled {
  opacity: 0.2;
  pointer-events: none;
}

.lb-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 50%;
  color: var(--text-mid);
  font-size: 1rem;
  transition: all var(--transition);
  z-index: 20;
}
.lb-close:hover { background: rgba(255,255,255,0.12); color: var(--text); }

/* Sidebar */
.lb-sidebar {
  width: 300px;
  flex-shrink: 0;
  background: var(--surface);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 10;
  padding: 28px 24px;
  overflow-y: auto;
}

.lb-counter {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 20px;
}

.lb-filename {
  font-size: 0.85rem;
  color: var(--text-mid);
  margin-bottom: 28px;
  word-break: break-all;
  font-family: monospace;
  background: var(--surface-2);
  padding: 8px 10px;
  border-radius: var(--radius);
}

.lb-section-title {
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
}

/* Color buttons */
.lb-colors {
  display: flex;
  gap: 8px;
  margin-bottom: 28px;
}
.lb-color-btn {
  flex: 1;
  padding: 9px 4px;
  border-radius: var(--radius);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid var(--border);
  color: var(--text-muted);
  background: none;
  transition: all var(--transition);
  font-family: 'Outfit', sans-serif;
}
.lb-color-btn:hover {
  border-color: var(--border-2);
  color: var(--text);
}
.lb-color-btn[data-color="red"]:hover,
.lb-color-btn[data-color="red"].active {
  background: var(--red-soft);
  border-color: var(--red);
  color: var(--red);
}
.lb-color-btn[data-color="yellow"]:hover,
.lb-color-btn[data-color="yellow"].active {
  background: var(--yellow-soft);
  border-color: var(--yellow);
  color: var(--yellow);
}
.lb-color-btn[data-color="green"]:hover,
.lb-color-btn[data-color="green"].active {
  background: var(--green-soft);
  border-color: var(--green);
  color: var(--green);
}

/* Comment */
.lb-comment-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
#lb-comment {
  width: 100%;
  min-height: 100px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  line-height: 1.5;
  padding: 10px 12px;
  resize: vertical;
  transition: border-color var(--transition);
}
#lb-comment::placeholder { color: var(--text-muted); }
#lb-comment:focus {
  outline: none;
  border-color: var(--border-2);
}

.lb-save-status {
  font-size: 0.72rem;
  color: var(--text-muted);
  height: 16px;
  transition: color var(--transition);
  opacity: 0;
}
.lb-save-status.saving { color: var(--accent); opacity: 1; }
.lb-save-status.saved  { color: var(--green);  animation: lbSavedFade 2.2s ease forwards; }
@keyframes lbSavedFade {
  0%   { opacity: 0; }
  12%  { opacity: 1; }
  70%  { opacity: 1; }
  100% { opacity: 0; }
}

/* Download */
.lb-download {
  margin-top: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  transition: all var(--transition);
}
.lb-download:hover {
  border-color: var(--border-2);
  color: var(--text);
  background: var(--surface-2);
}

/* ── Admin ───────────────────────────────────────── */
.admin-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: var(--radius);
  font-family: 'Outfit', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}
.btn-primary {
  background: var(--accent);
  color: #1a1000;
  border: 1px solid var(--accent);
}
.btn-primary:hover { filter: brightness(1.1); }
.btn-outline {
  background: none;
  color: var(--text-mid);
  border: 1px solid var(--border);
}
.btn-outline:hover {
  border-color: var(--border-2);
  color: var(--text);
  background: var(--surface-2);
}

.stats-row {
  display: flex;
  gap: 2px;
  margin-bottom: 32px;
}
.stat-card {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
}
.stat-value {
  font-family: 'Crimson Pro', serif;
  font-size: 2rem;
  font-weight: 600;
  line-height: 1;
  margin-bottom: 4px;
}
.stat-label {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.stat-card.s-red    .stat-value { color: var(--red);    }
.stat-card.s-yellow .stat-value { color: var(--yellow); }
.stat-card.s-green  .stat-value { color: var(--green);  }
.stat-card.s-total  .stat-value { color: var(--accent); }

.admin-table-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}
.admin-table th {
  background: var(--surface-2);
  padding: 12px 16px;
  text-align: left;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}
.admin-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  color: var(--text-mid);
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: var(--surface-2); }
.admin-table td.td-file {
  font-family: monospace;
  font-size: 0.8rem;
  color: var(--text);
}
.admin-table td.td-path {
  color: var(--text-muted);
  font-size: 0.76rem;
}
.admin-table td.td-comment {
  max-width: 300px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.admin-table td.td-updated {
  white-space: nowrap;
  color: var(--text-muted);
  font-size: 0.75rem;
}

.color-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.color-chip.red    { background: var(--red-soft);    color: var(--red);    }
.color-chip.yellow { background: var(--yellow-soft); color: var(--yellow); }
.color-chip.green  { background: var(--green-soft);  color: var(--green);  }
.color-chip::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.empty-state {
  text-align: center;
  padding: 80px 24px;
  color: var(--text-muted);
}
.empty-state-icon { font-size: 2.5rem; margin-bottom: 16px; }
.empty-state h3 { font-family: 'Crimson Pro', serif; font-weight: 300; font-size: 1.4rem; margin-bottom: 8px; }
.empty-state p { font-size: 0.85rem; }

/* ── Responsive (Tablet ≤768px) ─────────────────── */
@media (max-width: 768px) {
  .page { padding: 0 16px 60px; }
  .thumbnail-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
  .folder-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .stats-row { flex-wrap: wrap; }

  /* Lightbox: column layout so bar sits as natural flex child at bottom */
  #lightbox { flex-direction: column; }
  .lb-layout { flex: 1; min-height: 0; height: auto; overflow: hidden; }
  .lb-sidebar { display: none; }
  .lb-image-area { padding: 48px 56px 16px; height: 100%; box-sizing: border-box; }
  #lb-image { max-height: 100%; }

  /* Backdrop: no pointer events on mobile – close button handles closing */
  .lb-backdrop { pointer-events: none; }

  /* Mobile bottom bar */
  .lb-mobile-bar {
    display: flex;
    flex-shrink: 0;
    height: 64px;
    background: var(--surface);
    border-top: 1px solid var(--border);
    align-items: center;
    padding: 0 20px;
    gap: 0;
    position: relative;
    z-index: 20;
  }
  .lb-mob-counter {
    font-size: 0.7rem;
    color: var(--text-muted);
    min-width: 44px;
    letter-spacing: 0.04em;
  }
  .lb-mob-colors {
    display: flex;
    gap: 16px;
    flex: 1;
    justify-content: center;
    align-items: center;
  }
  .lb-mob-dot {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.2);
    padding: 0;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.12s, border-color 0.12s;
  }
  .lb-mob-dot:active { transform: scale(0.85); }
  .lb-mob-clear  { background: rgba(255,255,255,0.18); }
  .lb-mob-red    { background: var(--red);    }
  .lb-mob-yellow { background: var(--yellow); }
  .lb-mob-green  { background: var(--green);  }
  .lb-mob-dot.active { border-color: #fff; transform: scale(1.2); }
  .lb-mob-actions { display: flex; gap: 8px; align-items: center; }
  .lb-mob-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--text-mid);
    font-size: 1rem;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
  }
  .lb-mob-btn.open,
  .lb-mob-btn.has-comment { color: var(--accent); }
  .lb-mob-btn.has-comment { background: #7a6535; color: #f0e6cc; border-color: #7a6535; }

  /* Mobile comment panel */
  .lb-mobile-comment-panel {
    display: none;
    flex-shrink: 0;
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 14px 20px 10px;
    position: relative;
    z-index: 20;
  }
  .lb-mobile-comment-panel.open { display: block; }
  #lb-mob-comment {
    width: 100%;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    line-height: 1.5;
    padding: 10px 12px;
    resize: none;
    box-sizing: border-box;
  }
  #lb-mob-comment::placeholder { color: var(--text-muted); }
  #lb-mob-comment:focus { outline: none; border-color: var(--border-2); }
  #lb-mob-save-status { font-size: 0.7rem; color: var(--text-muted); margin-top: 6px; height: 14px; }
}

/* ── Phone ≤650px: edge-to-edge image ───────────── */
@media (max-width: 650px) {
  .lb-image-area { padding: 52px 6px 0; }
  #lb-image { max-height: 100%; border-radius: 0; }
  .lb-prev { left: 6px; width: 36px; height: 36px; background: rgba(0,0,0,0.35); border-color: rgba(255,255,255,0.08); }
  .lb-next { right: 6px; width: 36px; height: 36px; background: rgba(0,0,0,0.35); border-color: rgba(255,255,255,0.08); }
  .lb-close { width: 44px; height: 44px; top: 10px; right: 10px; }
}

/* ── Desktop comment OK button ───────────────────── */
.lb-comment-ok {
  margin-top: 8px;
  width: 100%;
  padding: 6px;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-family: 'Outfit', sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: all var(--transition);
}
.lb-comment-ok:hover { border-color: var(--border-2); color: var(--text); background: var(--surface-2); }

/* ── Lightbox image color border ────────────────── */
#lightbox[data-lb-color="red"]    #lb-image { box-shadow: 0 0 0 2px var(--red),    0 24px 80px rgba(0,0,0,0.6); }
#lightbox[data-lb-color="yellow"] #lb-image { box-shadow: 0 0 0 2px var(--yellow), 0 24px 80px rgba(0,0,0,0.6); }
#lightbox[data-lb-color="green"]  #lb-image { box-shadow: 0 0 0 2px var(--green),  0 24px 80px rgba(0,0,0,0.6); }

/* Hide mobile elements on desktop */
@media (min-width: 769px) {
  .lb-mobile-bar,
  .lb-mobile-comment-panel { display: none !important; }
}


/* ── Client list (index.php) ────────────────────── */
.client-list { display: flex; flex-direction: column; gap: 8px; max-width: 640px; margin-top: 16px; }
.client-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 32px;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  color: var(--text);
  font-family: 'Crimson Pro', serif;
  font-size: 1.9rem;
  font-weight: 300;
  letter-spacing: 0.02em;
  transition: all 0.18s ease;
  text-decoration: none;
  background: transparent;
}
.client-btn::after { content: '›'; color: var(--accent); font-size: 1.6rem; opacity: 0.6; transition: opacity 0.18s, transform 0.18s; }
.client-btn:hover { background: rgba(200,169,110,0.07); color: var(--accent); }
.client-btn:hover::after { opacity: 1; transform: translateX(4px); }
.client-lock { font-size: 0.9rem; opacity: 0.5; margin-left: 12px; }

/* ── Folder card ZIP icon ───────────────────────── */
.folder-card-wrap { position: relative; border-radius: 0; overflow: hidden; }
.folder-card-zip {
  position: absolute;
  bottom: 16px;
  right: 14px;
  padding: 3px 10px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 99px;
  color: var(--text-muted);
  font-family: 'Outfit', sans-serif;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  z-index: 10;
  text-decoration: none;
  transition: all var(--transition);
}
.folder-card-zip:hover { border-color: var(--border-2); color: var(--text); background: var(--surface-2); }

/* ── Thumbnail overlays – layout:
   top-left:     ampel (color dots)
   top-right:    comment icon
   bottom-left:  filename
   bottom-right: download button          ─────────── */

/* Ampel */
.thumb-ampel {
  position: absolute;
  top: 8px;
  left: 8px;
  display: flex;
  gap: 5px;
  background: rgba(0,0,0,0.55);
  padding: 5px 8px;
  border-radius: 99px;
  opacity: 0;
  transition: opacity 0.15s;
  z-index: 6;
}

.ampel-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.3);
  cursor: pointer;
  transition: transform 0.12s, border-color 0.12s;
  padding: 0;
  flex-shrink: 0;
}
.ampel-dot:hover { transform: scale(1.3); border-color: rgba(255,255,255,0.9); }
.ampel-dot.clear  { background: rgba(255,255,255,0.25); border-color: rgba(255,255,255,0.4); }
.ampel-dot.red    { background: var(--red);    }
.ampel-dot.yellow { background: var(--yellow); }
.ampel-dot.green  { background: var(--green);  }
.thumbnail-item[data-color="red"]    .ampel-dot.red    { border-color: #fff; }
.thumbnail-item[data-color="yellow"] .ampel-dot.yellow { border-color: #fff; }
.thumbnail-item[data-color="green"]  .ampel-dot.green  { border-color: #fff; }

/* Comment icon – top right */
.thumb-comment-icon {
  position: absolute;
  top: 7px;
  right: 7px;
  font-size: 0.85rem;
  line-height: 1;
  z-index: 5;
  display: none;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.6));
}
.thumbnail-item[data-has-comment="1"] .thumb-comment-icon { display: block; }

/* Download button – bottom right */
.thumb-dl {
  position: absolute;
  bottom: 6px;
  right: 6px;
  width: 26px;
  height: 26px;
  background: rgba(0,0,0,0.6);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.9);
  font-size: 0.85rem;
  opacity: 0;
  transition: opacity 0.15s, background 0.15s;
  z-index: 6;
  text-decoration: none;
  border: 1px solid rgba(255,255,255,0.2);
  line-height: 1;
}

/* Filename – bottom left (override old bottom-gradient style) */
.thumbnail-filename {
  position: absolute;
  bottom: 6px;
  left: 6px;
  right: 32px;
  padding: 0;
  background: none;
  font-size: 0.65rem;
  color: rgba(255,255,255,0.7);
  opacity: 0;
  transition: opacity 0.18s;
  z-index: 4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}
.thumbnail-item:hover .thumbnail-filename { opacity: 1; }
.thumbnail-item:hover .thumb-ampel        { opacity: 1; }
.thumbnail-item:hover .thumb-dl           { opacity: 1; }

/* Hide old comment dot */
.thumbnail-comment-dot { display: none !important; }

/* Disable hover effects on touch devices (class set by JS) */
.no-hover .thumbnail-item img               { transform: none !important; filter: brightness(0.9) !important; transition: none !important; }
.no-hover .thumbnail-item .thumbnail-filename,
.no-hover .thumbnail-item .thumb-ampel,
.no-hover .thumbnail-item .thumb-dl        { opacity: 0 !important; transition: none !important; }
.no-hover .folder-card                     { border-color: var(--border) !important; }
.no-hover .folder-card .folder-card-preview img { filter: brightness(0.85) !important; transition: none !important; }

/* Landscape on phones: hide bottom bar, scale image to fit */
@media (orientation: landscape) and (max-height: 500px) {
  .lb-mobile-bar,
  .lb-mobile-comment-panel { display: none !important; }
  #lb-image { max-height: 100svh; max-width: 100%; }
}

/* ── Canvas Paint Overlay ───────────────────────────────── */
.lb-image-wrap { position: relative; }
#paint-canvas,
#paint-canvas-preview {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
}
.canvas-drawing #paint-canvas   { pointer-events: all; cursor: crosshair; }
.canvas-drawing.tool-eraser #paint-canvas { cursor: cell; }

/* ── Canvas Tool Panel ──────────────────────────────────── */
.lb-canvas-tools { margin-bottom: 32px; }
.lb-canvas-tools-body { display: none; }
.lb-canvas-tools.is-expanded .lb-canvas-tools-body { display: block; }

.lb-tool-buttons {
  display: flex;
  gap: 4px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.lb-tool-btn {
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  color: var(--text-mid);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 5px 8px;
  transition: border-color 0.15s, color 0.15s;
}
.lb-tool-btn:hover  { border-color: var(--text-muted); color: var(--text); }
.lb-tool-btn.active { border-color: var(--accent); color: var(--accent); }

.lb-paint-colors {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.lb-paint-color-btn {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  padding: 0;
  transition: border-color 0.15s, transform 0.1s;
}
.lb-paint-color-btn:hover  { transform: scale(1.15); }
.lb-paint-color-btn.active { border-color: #fff; }
.lb-paint-color-btn[data-color="red"]    { background: #ee5533; }
.lb-paint-color-btn[data-color="yellow"] { background: #ffdd00; }
.lb-paint-color-btn[data-color="green"]  { background: #44aa44; }
.lb-paint-color-btn[data-color="black"]  { background: #111111; border-color: #555; }
.lb-paint-color-btn[data-color="black"].active { border-color: #fff; }
.lb-paint-color-btn[data-color="white"]  { background: #ffffff; border-color: #888; }
.lb-paint-color-btn[data-color="white"].active { border-color: var(--accent); }
.lb-paint-color-btn[data-color="blue"]   { background: #3366ee; }

.lb-stroke-width-wrap { display: none; }

.lb-paint-actions {
  display: flex;
  gap: 6px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}
.lb-paint-actions button {
  flex: 1;
  padding: 5px 6px;
  font-size: 0.76rem;
  font-family: inherit;
  border-radius: var(--radius);
  border: 1px solid var(--border-2);
  background: var(--surface-2);
  color: var(--text-mid);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
  white-space: nowrap;
}
.lb-paint-actions button:hover { border-color: var(--text-muted); color: var(--text); }
.lb-paint-actions button:disabled { opacity: 0.4; cursor: default; }
#paint-save {
  background: var(--accent);
  color: #1a1000;
  border-color: var(--accent);
  font-weight: 600;
}
#paint-save:hover { background: #dbb96e; border-color: #dbb96e; }

/* ── Grid: paint indicator ──────────────────────────────── */
.thumbnail-item.has-paint .thumbnail-badge::after {
  content: '\270F';
  position: absolute;
  bottom: 26px;
  right: 4px;
  font-size: 11px;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,0.9);
  pointer-events: none;
}
