/* SuperBase (.base) — dateinative Datenbank (base/index.js, base/views.js).
   Nutzt die App-Tokens (--bg/--panel/--line/--text/--muted/--accent). */

.bs-root { display: flex; flex-direction: column; height: 100%; overflow: hidden; }
.bs-main { flex: 1; min-height: 0; display: flex; flex-direction: column; position: relative; }
.bs-head { padding: 10px 14px 0; border-bottom: 1px solid var(--line); flex: 0 0 auto; }
.bs-titlebar { display: flex; align-items: center; gap: 8px; min-height: 30px; }
.bs-ico .ico { width: 20px; height: 20px; }
.bs-title { font-size: 17px; font-weight: 650; max-width: 55vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bs-count { font-size: 12px; margin-left: 4px; white-space: nowrap; }
.bs-dim { color: var(--muted); }

/* Volltext-Schnellsuche (Name + Inhalt) — in der Aktionsleiste, auf einer Y-Höhe
   mit Vorschau/Filter/Spalten/…; align-items:stretch von .bs-actions gleicht die
   Höhe automatisch an die Buttons an, der Inhalt wird darin zentriert. */
.bs-search {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 0 5px 0 8px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--panel2, var(--panel)); max-width: 300px;
}
.bs-search.bs-search-on { border-color: var(--accent); }
.bs-search-ico { display: inline-flex; color: var(--muted); flex-shrink: 0; }
.bs-search-ico .ico { width: 14px; height: 14px; }
.bs-search.bs-search-on .bs-search-ico { color: var(--accent); }
.bs-search-input {
  border: 0; background: none; color: var(--text); font: inherit; font-size: 13px;
  padding: 3px 2px; width: 168px; min-width: 90px; outline: none;
}
.bs-search-input::placeholder { color: var(--muted); }
.bs-search-input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.bs-search-clear { padding: 2px; color: var(--muted); flex-shrink: 0; cursor: pointer; }
.bs-search-clear .ico { width: 14px; height: 14px; }
.bs-search-clear:hover { color: var(--text); }
.bs-search-clear.hidden { display: none; }
@media (max-width: 768px) {
  .bs-search { max-width: 200px; }
  .bs-search-input { width: 110px; }
}

.bs-toolbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin-top: 4px; flex-wrap: wrap; }
.bs-tabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.bs-tab {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 11px; border: 0; background: none; color: var(--muted);
  border-bottom: 2px solid transparent; cursor: pointer; font: inherit;
  font-size: 13px; white-space: nowrap;
}
.bs-tab .ico { width: 15px; height: 15px; }
.bs-tab:hover { color: var(--text); }
.bs-tab.on { color: var(--text); border-bottom-color: var(--accent); }
.bs-tab-add { padding: 7px 8px; }
.bs-actions { display: flex; gap: 6px; padding-bottom: 6px; }
.bs-actions .btn .ico { width: 15px; height: 15px; }
.bs-btn-filter.bs-active { color: var(--accent); border-color: var(--accent); }
.bs-btn-openmode.bs-active { color: var(--accent); border-color: var(--accent); }

/* Filter-Sets als Tabs oben im Filter-Dialog (editFilter). */
.bs-filter-wrap { display: flex; flex-direction: column; gap: 12px; }
.bs-fp-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  flex-wrap: wrap; padding-bottom: 10px; border-bottom: 1px solid var(--line);
}
.bs-fp-tabs { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-width: 0; }
.bs-fp-tab {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 11px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--panel2, var(--panel)); color: var(--muted);
  cursor: pointer; font: inherit; font-size: 13px; white-space: nowrap;
}
.bs-fp-tab:hover { color: var(--text); border-color: var(--muted); }
.bs-fp-tab.bs-on {
  color: #fff; background: var(--accent); border-color: var(--accent); font-weight: 600;
}
.bs-fp-name { max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
.bs-fp-x { display: inline-flex; opacity: .55; border-radius: 50%; }
.bs-fp-x .ico { width: 13px; height: 13px; }
.bs-fp-x:hover { opacity: 1; }
.bs-fp-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.bs-fp-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--panel2, var(--panel)); color: var(--text);
  cursor: pointer; font: inherit; font-size: 12.5px;
}
.bs-fp-btn:hover { border-color: var(--muted); }
.bs-fp-btn .ico { width: 14px; height: 14px; }
.bs-fp-icon { padding: 6px 8px; }
.bs-fp-save { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }

/* --------------------------------------------- Vorschau-Panel (Zeilen-Klick) */
/* Zentriert in der Mitte der Datenbank (früher rechts angedockt). Ein dezenter
   Backdrop hebt die Vorschau vom Tabellen-Hintergrund ab; ←/→ blättern durch
   die Zeilen der aktuellen Ansicht. */
.bs-peek {
  position: absolute; inset: 3.5% 4%;
  display: flex; flex-direction: column;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 22px 60px rgba(0, 0, 0, .38);
  overflow: hidden;
  z-index: 6;
}
/* „Fenster"-Modus: freie Position/Größe kommt inline (left/top/width/height). */
.bs-peek.bs-peek-windowed { inset: auto; }
.bs-peek.bs-peek-grabbing { user-select: none; }
.bs-peek.hidden { display: none; }
.bs-peek-backdrop {
  position: absolute; inset: 0;
  background: rgba(0, 0, 0, .34);
  z-index: 5;
}
.bs-peek-backdrop.hidden { display: none; }
.bs-peek-head {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 8px; border-bottom: 1px solid var(--line);
  background: var(--panel2); flex: 0 0 auto;
  cursor: grab; user-select: none; touch-action: none;
}
.bs-peek-windowed .bs-peek-head { cursor: grab; }
.bs-peek-grabbing .bs-peek-head { cursor: grabbing; }
.bs-peek-head .icon-btn { cursor: pointer; }
.bs-peek-nav { display: inline-flex; gap: 2px; flex-shrink: 0; }
.bs-peek-nav .icon-btn:disabled { opacity: .3; cursor: default; }
.bs-peek-name {
  display: inline-flex; align-items: center; gap: 7px;
  flex: 1; min-width: 0; font-size: 13px; font-weight: 550;
}
.bs-peek-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bs-peek-name .ico { width: 15px; height: 15px; flex-shrink: 0; }
.bs-peek-stage { position: relative; flex: 1; min-height: 0; display: flex; }
.bs-peek-frame { flex: 1; width: 100%; height: 100%; border: 0; background: var(--bg); }
/* Shield über dem iframe WÄHREND Ziehen/Resizen — sonst schluckt das iframe die
   pointermove-Events und das Fenster bliebe hängen. */
.bs-peek-shield { position: absolute; inset: 0; z-index: 3; background: transparent; }
.bs-peek-shield[hidden] { display: none; }
/* Resize-Griffe an Rändern (dünn) & Ecken (Quadrate) — in jede Richtung. */
.bs-peek-rs { position: absolute; z-index: 4; touch-action: none; }
.bs-peek-rs[data-dir="n"]  { top: 0; left: 15px; right: 15px; height: 6px; cursor: ns-resize; }
.bs-peek-rs[data-dir="s"]  { bottom: 0; left: 15px; right: 15px; height: 7px; cursor: ns-resize; }
.bs-peek-rs[data-dir="e"]  { right: 0; top: 15px; bottom: 15px; width: 7px; cursor: ew-resize; }
.bs-peek-rs[data-dir="w"]  { left: 0; top: 15px; bottom: 15px; width: 7px; cursor: ew-resize; }
.bs-peek-rs[data-dir="ne"] { top: 0; right: 0; width: 16px; height: 16px; cursor: nesw-resize; }
.bs-peek-rs[data-dir="nw"] { top: 0; left: 0; width: 16px; height: 16px; cursor: nwse-resize; }
.bs-peek-rs[data-dir="se"] { bottom: 0; right: 0; width: 16px; height: 16px; cursor: nwse-resize; }
.bs-peek-rs[data-dir="sw"] { bottom: 0; left: 0; width: 16px; height: 16px; cursor: nesw-resize; }
.bs-row.bs-peeked > .bs-td { background: color-mix(in srgb, var(--accent) 11%, transparent); }
.bs-card.bs-peeked { outline: 2px solid var(--accent); outline-offset: -2px; }
/* Vollbild (Fullscreen-API): das Fenster füllt den Bildschirm. Die inline-Größe
   (px aus dem Fenster-Modus) muss überschrieben werden → !important. Griffe/
   Ziehen im Vollbild aus. Getrennte Regeln (ein unbekannter Selektor würde sonst
   die ganze Gruppe verwerfen). */
.bs-peek:fullscreen {
  inset: 0 !important; left: 0 !important; top: 0 !important;
  width: 100% !important; height: 100% !important;
  border: 0; border-radius: 0; box-shadow: none;
}
.bs-peek:-webkit-full-screen {
  inset: 0 !important; left: 0 !important; top: 0 !important;
  width: 100% !important; height: 100% !important;
  border: 0; border-radius: 0; box-shadow: none;
}
.bs-peek:fullscreen .bs-peek-rs { display: none; }
.bs-peek:-webkit-full-screen .bs-peek-rs { display: none; }
.bs-peek:fullscreen .bs-peek-head { cursor: default; }
.bs-peek:-webkit-full-screen .bs-peek-head { cursor: default; }
.bs-peek-fs.bs-on { color: var(--accent); }
@media (max-width: 768px) {
  /* Handy: formatfüllend, kein schwebendes Fenster (Griffe/Ziehen aus). */
  .bs-peek { inset: 0; border: 0; border-radius: 0; }
  .bs-peek-head { cursor: default; }
  .bs-peek-rs { display: none; }
}
.bs-badge {
  background: var(--accent); color: #fff; border-radius: 999px;
  font-size: 11px; padding: 0 6px; margin-left: 2px;
}

.bs-body { flex: 1; overflow: auto; padding: 10px 14px 40px; }

/* ------------------------------------------------------------- Tabelle */
.bs-table { border-collapse: collapse; min-width: 100%; font-size: 13.5px; }
.bs-th {
  text-align: left; font-weight: 550; color: var(--muted); font-size: 12.5px;
  padding: 7px 10px; border-bottom: 1px solid var(--line);
  white-space: nowrap; cursor: pointer; user-select: none;
  position: sticky; top: -10px; background: var(--bg); z-index: 2;
}
.bs-th:hover { color: var(--text); }
.bs-th-add { width: 34px; text-align: center; }
.bs-th-add .ico { width: 14px; height: 14px; }
.bs-td {
  padding: 6px 10px; border-bottom: 1px solid var(--line);
  vertical-align: middle; max-width: 340px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap;
}
.bs-row:hover .bs-td { background: color-mix(in srgb, var(--panel) 55%, transparent); }
.bs-td:not(.bs-td-name):not(.bs-td-builtin):not(.bs-td-formula) { cursor: pointer; }
.bs-td-name { cursor: pointer; font-weight: 550; }
.bs-td-name .ico { width: 15px; height: 15px; margin-right: 7px; vertical-align: -2px; }
.bs-td-name:hover .bs-name { text-decoration: underline; text-underline-offset: 3px; }
.bs-cell-input {
  width: 100%; box-sizing: border-box; background: var(--panel);
  color: var(--text); border: 1px solid var(--accent); border-radius: 6px;
  padding: 3px 7px; font: inherit; outline: none;
}
.bs-add-row {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 8px;
  border: 0; background: none; color: var(--muted); cursor: pointer;
  font: inherit; font-size: 13px; padding: 6px 10px; border-radius: 8px;
}
.bs-add-row:hover { color: var(--text); background: var(--panel); }
.bs-add-row .ico { width: 15px; height: 15px; }

/* Chips (Select/Multiselect/Relation) */
.bs-chip {
  display: inline-flex; align-items: center; gap: 4px;
  background: color-mix(in srgb, var(--accent) 16%, var(--panel));
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line));
  color: var(--text); border-radius: 999px; padding: 1px 9px;
  font-size: 12px; margin: 1px 3px 1px 0; max-width: 100%;
}
.bs-chip .ico { width: 12px; height: 12px; }
.bs-chip button { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 13px; padding: 0 0 0 2px; }
.bs-chip button:hover { color: var(--err); }
.bs-rel { cursor: pointer; }
.bs-rel:hover { border-color: var(--accent); }
.bs-check .ico { width: 16px; height: 16px; color: var(--muted); }
.bs-check.on .ico { color: var(--ok); }
.bs-formula { color: var(--muted); font-variant-numeric: tabular-nums; }
.bs-date { font-variant-numeric: tabular-nums; }
a.bs-url { color: var(--accent); text-decoration: none; }
a.bs-url:hover { text-decoration: underline; }

/* ------------------------------------------------------------- Popover */
.bs-pop {
  position: fixed; z-index: 700; min-width: 200px; max-width: 320px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 10px 32px rgba(0, 0, 0, .35); padding: 5px;
  max-height: 340px; overflow: auto;
}
.bs-pop-item {
  display: flex; align-items: center; gap: 7px; width: 100%;
  padding: 7px 10px; border: 0; background: none; color: var(--text);
  cursor: pointer; font: inherit; font-size: 13px; border-radius: 7px; text-align: left;
}
.bs-pop-item:hover { background: color-mix(in srgb, var(--accent) 14%, transparent); }
.bs-pop-item.on { color: var(--accent); font-weight: 600; }
.bs-pop-item .ico { width: 14px; height: 14px; }
.bs-pop-clear { color: var(--muted); }
.bs-pop-check { display: flex; align-items: center; gap: 8px; padding: 6px 10px; font-size: 13px; cursor: pointer; border-radius: 7px; }
.bs-pop-check:hover { background: color-mix(in srgb, var(--accent) 14%, transparent); }
.bs-pop-newrow { padding: 4px 6px; }
.bs-pop-new, .bs-pop-search {
  width: 100%; box-sizing: border-box; background: var(--bg); color: var(--text);
  border: 1px solid var(--line); border-radius: 7px; padding: 5px 9px; font: inherit; font-size: 13px;
}
.bs-pop-search { margin: 4px 0 6px; }
.bs-pop-chips { padding: 4px 4px 2px; }
.bs-pop-list { max-height: 200px; overflow: auto; }

/* --------------------------------------------------------------- Board */
.bs-board { display: flex; gap: 12px; align-items: flex-start; min-height: 100%; }
.bs-col {
  flex: 0 0 265px; background: color-mix(in srgb, var(--panel) 65%, transparent);
  border: 1px solid var(--line); border-radius: 12px; padding: 8px;
}
.bs-col-over { border-color: var(--accent); }
.bs-col-head { display: flex; align-items: center; gap: 8px; padding: 2px 4px 8px; }
.bs-col-count { color: var(--muted); font-size: 12px; }
.bs-col-body { display: flex; flex-direction: column; gap: 8px; min-height: 24px; }
.bs-col-more { font-size: 12px; padding: 4px 2px; }
.bs-card {
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
  padding: 9px 11px; cursor: pointer; font-size: 13px;
}
.bs-card:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.bs-card.dragging { opacity: .45; }
.bs-card-title { display: flex; align-items: center; gap: 7px; font-weight: 550; }
.bs-card-title .ico { width: 14px; height: 14px; flex: 0 0 auto; }
.bs-card-prop { margin-top: 5px; color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bs-card-add {
  display: inline-flex; align-items: center; gap: 5px; margin-top: 8px;
  border: 0; background: none; color: var(--muted); cursor: pointer;
  font: inherit; font-size: 12.5px; padding: 5px 8px; border-radius: 7px;
}
.bs-card-add:hover { color: var(--text); background: var(--bg); }
.bs-card-add .ico { width: 13px; height: 13px; }

/* ------------------------------------------------------------- Galerie */
.bs-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.bs-gcard { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; cursor: pointer; }
.bs-gcard:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.bs-gcover { height: 120px; background: var(--bg); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.bs-gcover img { width: 100%; height: 100%; object-fit: cover; }
.bs-gcover-icon .ico { width: 42px; height: 42px; }
.bs-gbody { padding: 9px 11px; font-size: 13px; }

/* --------------------------------------------------------------- Liste */
.bs-list { display: flex; flex-direction: column; }
.bs-list-item {
  display: flex; align-items: center; gap: 9px; padding: 8px 8px;
  border-bottom: 1px solid var(--line); cursor: pointer; font-size: 13.5px;
}
.bs-list-item:hover { background: color-mix(in srgb, var(--panel) 60%, transparent); }
.bs-list-item .ico { width: 15px; height: 15px; flex: 0 0 auto; }
.bs-list-item .bs-name { font-weight: 550; }
.bs-list-props { margin-left: auto; display: flex; gap: 10px; color: var(--muted); font-size: 12px; overflow: hidden; }

/* ------------------------------------------------------------ Kalender */
.bs-cal-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.bs-cal-month { font-weight: 650; min-width: 150px; text-align: center; }
.bs-cal-prev .ico { transform: scaleX(-1); }
.bs-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.bs-cal-dow { color: var(--muted); font-size: 12px; padding: 2px 6px; }
.bs-cal-day {
  min-height: 86px; background: color-mix(in srgb, var(--panel) 55%, transparent);
  border: 1px solid var(--line); border-radius: 9px; padding: 4px 6px; overflow: hidden;
}
.bs-cal-day.today { border-color: var(--accent); }
.bs-cal-num { font-size: 12px; color: var(--muted); margin-bottom: 2px; }
.bs-cal-day.today .bs-cal-num { color: var(--accent); font-weight: 700; }
.bs-cal-item {
  display: block; width: 100%; text-align: left; border: 0; cursor: pointer;
  background: color-mix(in srgb, var(--accent) 16%, var(--panel)); color: var(--text);
  border-radius: 6px; padding: 2px 6px; font: inherit; font-size: 11.5px;
  margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.bs-cal-item:hover { background: color-mix(in srgb, var(--accent) 30%, var(--panel)); }

/* ---------------------------------------------------------------- Graph */
.bs-view-graph { padding: 0; }
.bs-graph-host { height: 100%; }

/* ---------------------------------------------------- Hinweise & Modals */
.bs-hint {
  margin: 26px auto; max-width: 480px; text-align: center; color: var(--muted);
  background: color-mix(in srgb, var(--panel) 65%, transparent);
  border: 1px dashed var(--line); border-radius: 14px; padding: 22px; font-size: 13.5px;
  line-height: 1.75;
}
.bs-hint .ico { width: 18px; height: 18px; vertical-align: -4px; }
.bs-hint .btn { margin-top: 10px; }

.bs-filter-rule { display: flex; gap: 6px; margin-bottom: 8px; align-items: center; }
.bs-filter-rule select, .bs-filter-rule input {
  background: var(--bg); color: var(--text); border: 1px solid var(--line);
  border-radius: 7px; padding: 6px 8px; font: inherit; font-size: 13px; min-width: 0;
}
.bs-filter-rule .bs-f-prop { flex: 1.2; }
.bs-filter-rule .bs-f-op { flex: 1; }
.bs-filter-rule .bs-f-val { flex: 1.4; }
.bs-filter-rule .bs-f-size { flex: 1.4; }
.bs-filter-rule .bs-f-unit { flex: 0 0 58px; }
.bs-filter-rule .bs-f-folder {
  flex: 1.4; min-width: 0; font-size: 13px; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  padding: 6px 8px; border: 1px dashed var(--line); border-radius: 7px;
}
.bs-filter-rule .bs-f-folderpick { flex: 0 0 auto; font-size: 12.5px; padding: 6px 9px; }
.bs-filter-rule .bs-f-folderpick svg.ico { width: 14px; height: 14px; }

/* Boolescher Filter-Baum: Gruppen (UND/ODER/NICHT), beliebig verschachtelt */
.bs-fg { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.bs-fg-nested { margin: 8px 0; background: color-mix(in srgb, var(--panel2) 55%, transparent); }
.bs-fg-negated { border-color: var(--err); }
.bs-fg-head { display: flex; align-items: center; gap: 7px; margin-bottom: 8px; }
.bs-fg-op {
  background: var(--bg); color: var(--text); border: 1px solid var(--line);
  border-radius: 7px; padding: 5px 7px; font: inherit; font-size: 13px;
}
.bs-fg-hint { color: var(--muted); font-size: 12.5px; flex: 1; }
.bs-fg-not-btn, .bs-f-not-btn {
  border: 1px solid var(--line); background: var(--bg); color: var(--muted);
  border-radius: 7px; cursor: pointer; font: inherit; font-weight: 650; flex: 0 0 auto;
}
.bs-fg-not-btn { padding: 5px 9px; font-size: 11px; letter-spacing: .03em; }
.bs-f-not-btn { padding: 4px 8px; font-size: 14px; line-height: 1; }
.bs-fg-not-btn.on, .bs-f-not-btn.on { background: var(--err); color: #fff; border-color: var(--err); }
.bs-fg-nested > .bs-fg-body { border-left: 2px solid var(--line); padding-left: 10px; margin-left: 2px; }
.bs-fg-empty { padding: 4px 2px 8px; font-size: 12.5px; }
.bs-fg-actions { display: flex; gap: 6px; margin-top: 4px; }
.bs-fg-actions .btn { font-size: 12.5px; padding: 5px 9px; }

/* Spalten-Auswahl (welche Spalten die View zeigt / sortierbar macht) */
.bs-cols-box { display: flex; flex-direction: column; gap: 1px; min-width: 300px; }
.bs-cols-group {
  font-size: 11.5px; font-weight: 600; color: var(--muted); text-transform: uppercase;
  letter-spacing: .04em; margin: 12px 0 4px;
}
.bs-cols-group:first-child { margin-top: 0; }
.bs-cols-row {
  display: flex; align-items: center; gap: 9px; padding: 6px 8px;
  border-radius: 7px; font-size: 13.5px;
}
.bs-cols-row:hover { background: var(--panel2); }
.bs-cols-row input { width: 15px; height: 15px; accent-color: var(--accent); flex-shrink: 0; }
.bs-cols-check { display: flex; align-items: center; gap: 9px; flex: 1; min-width: 0; cursor: pointer; }
.bs-cols-check span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bs-cols-fixed { color: var(--muted); }
.bs-cols-fixed .bs-cols-check { cursor: default; }
.bs-cols-fixed:hover { background: none; }

/* Sortier-Zusammenfassung + „Zurücksetzen" oben im Modal */
.bs-cols-hint {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  flex-wrap: wrap; font-size: 12px; color: var(--muted); padding: 0 8px 8px;
  border-bottom: 1px solid var(--line); margin-bottom: 4px;
}
.bs-cols-hint-text { flex: 1; min-width: 0; }
.bs-cols-sortclear {
  background: none; border: 0; color: var(--accent); cursor: pointer;
  font: inherit; font-size: 12px; padding: 2px 6px; border-radius: 6px; flex-shrink: 0;
}
.bs-cols-sortclear:hover { background: var(--panel2); }

/* Sortier-Buttons (↑/↓) pro Attribut-Zeile */
.bs-cols-sort { display: flex; align-items: center; gap: 1px; flex-shrink: 0; }
.bs-cols-sortbtn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; padding: 0; border: 0; border-radius: 6px;
  background: none; color: var(--muted); cursor: pointer; opacity: .5;
}
.bs-cols-row:hover .bs-cols-sortbtn { opacity: 1; }
.bs-cols-sortbtn:hover { background: var(--panel2); color: var(--text); }
.bs-cols-sortbtn svg { width: 15px; height: 15px; }
.bs-cols-sortbtn.active {
  color: var(--accent); opacity: 1;
  background: color-mix(in srgb, var(--accent) 15%, transparent);
}
.bs-cols-rank {
  min-width: 13px; font-size: 10.5px; font-weight: 700; color: var(--accent);
  text-align: center;
}

.bs-s-row { display: flex; align-items: center; gap: 9px; margin-bottom: 9px; font-size: 13.5px; flex-wrap: wrap; }
.bs-s-row > label { flex: 0 0 110px; color: var(--muted); font-size: 12.5px; }
.bs-s-row input[type=text], .bs-s-row input:not([type]) {
  flex: 1; background: var(--bg); color: var(--text); border: 1px solid var(--line);
  border-radius: 7px; padding: 6px 9px; font: inherit; font-size: 13px; min-width: 120px;
}
.bs-s-folder, .bs-s-tpl { color: var(--text); font-size: 13px; }
.bs-schema-box hr { border: 0; border-top: 1px solid var(--line); margin: 12px 0; }
.bs-s-prop { display: flex; gap: 6px; align-items: center; margin-bottom: 7px; flex-wrap: wrap; }
.bs-s-prop input, .bs-s-prop select {
  background: var(--bg); color: var(--text); border: 1px solid var(--line);
  border-radius: 7px; padding: 6px 8px; font: inherit; font-size: 13px;
}
.bs-s-prop .bs-sp-id { flex: 1.1; min-width: 130px; }
.bs-s-prop .bs-sp-id[readonly] { color: var(--muted); }
.bs-s-prop .bs-sp-detail { flex: 1.6; display: flex; gap: 6px; align-items: center; min-width: 150px; }
.bs-s-prop .bs-sp-detail input { width: 100%; }

/* ---------------------------------------------------- Person (Avatare) */
.bs-avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 17px; height: 17px; border-radius: 50%; flex: 0 0 auto;
  background: hsl(var(--ph, 210) 55% 45%); color: #fff;
  font-size: 9px; font-weight: 700; letter-spacing: .02em;
}
.bs-person { padding-left: 3px; }

/* ------------------------------------------------- Teilaufgaben (Baum) */
.bs-twisty {
  border: 0; background: none; color: var(--muted); cursor: pointer;
  padding: 0 2px; margin-right: 2px; vertical-align: -3px;
}
.bs-twisty .ico { width: 14px; height: 14px; transition: transform .12s; }
.bs-twisty.closed .ico { transform: rotate(-90deg); }
.bs-twisty:hover { color: var(--text); }
.bs-twisty-pad { display: inline-block; width: 18px; }
.bs-subcount { font-size: 11px; margin-left: 6px; }

/* ------------------------------------------------------ Timeline/Gantt */
.bs-view-timeline { padding: 10px 0 0; display: flex; flex-direction: column; overflow: hidden; }
.bs-tl { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.bs-tl-bar { display: flex; align-items: center; gap: 6px; padding: 0 14px 8px; }
.bs-tl-spacer { flex: 1; }
.bs-tl-zoom.bs-active { color: var(--accent); border-color: var(--accent); }
.bs-tl-scroll { flex: 1; overflow: auto; min-height: 0; border-top: 1px solid var(--line); }
.bs-tl-canvas { position: relative; }
.bs-tl-axis { position: sticky; top: 0; z-index: 3; background: var(--bg); border-bottom: 1px solid var(--line); }
.bs-tl-months, .bs-tl-days { display: flex; }
.bs-tl-axis-label { flex: 0 0 220px; position: sticky; left: 0; background: var(--bg); z-index: 2; }
.bs-tl-month {
  flex: 0 0 auto; font-size: 11.5px; color: var(--muted); padding: 4px 0 2px 6px;
  border-left: 1px solid var(--line); white-space: nowrap; overflow: hidden;
}
.bs-tl-dayhead {
  flex: 0 0 auto; text-align: center; font-size: 10.5px; color: var(--muted);
  padding: 1px 0 3px;
}
.bs-tl-dayhead.we { background: color-mix(in srgb, var(--panel) 70%, transparent); }
.bs-tl-rows { position: relative; }
.bs-tl-we { position: absolute; top: 0; bottom: 0; background: color-mix(in srgb, var(--panel) 55%, transparent); pointer-events: none; }
.bs-tl-row { display: flex; height: 34px; align-items: center; position: relative; }
.bs-tl-label {
  flex: 0 0 220px; position: sticky; left: 0; z-index: 2; background: var(--bg);
  display: flex; align-items: center; gap: 7px; padding: 0 10px; height: 100%;
  font-size: 13px; cursor: pointer; overflow: hidden; white-space: nowrap;
  border-right: 1px solid var(--line);
}
.bs-tl-label:hover span { text-decoration: underline; text-underline-offset: 3px; }
.bs-tl-label .ico { width: 14px; height: 14px; flex: 0 0 auto; }
.bs-tl-track { position: relative; flex: 1; height: 100%; }
.bs-tl-bar.bs-tl-tw {
  position: absolute; top: 6px; height: 22px; border-radius: 7px;
  background: color-mix(in srgb, var(--accent) 75%, var(--panel));
  display: flex; align-items: center; cursor: grab; user-select: none;
  touch-action: none;
}
.bs-tl-bar.bs-tl-past { background: color-mix(in srgb, var(--muted) 45%, var(--panel)); }
.bs-tl-bar.dragging { opacity: .8; cursor: grabbing; z-index: 4; }
.bs-tl-bar-body {
  flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  color: #fff; font-size: 11.5px; padding: 0 8px; pointer-events: none;
}
.bs-tl-h {
  width: 8px; align-self: stretch; cursor: ew-resize; flex: 0 0 auto;
  border-radius: 7px 0 0 7px;
}
.bs-tl-h-r { border-radius: 0 7px 7px 0; }
.bs-tl-h:hover { background: rgba(255, 255, 255, .25); }
.bs-tl-todayline {
  position: absolute; top: 0; bottom: 0; width: 2px; z-index: 1;
  background: var(--err); opacity: .65; pointer-events: none;
}
.bs-tl-deps { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none; }
.bs-tl-deps path { fill: none; stroke: var(--muted); stroke-width: 1.5; opacity: .8; }
.bs-tl-deps marker path { fill: var(--muted); stroke: none; }
.bs-tl-nodate { padding: 10px 14px 20px; border-top: 1px solid var(--line); }
.bs-tl-nodate-item {
  display: inline-flex; align-items: center; gap: 6px; margin: 6px 8px 0 0;
  background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
  color: var(--text); padding: 5px 10px; cursor: pointer; font: inherit; font-size: 12.5px;
}
.bs-tl-nodate-item:hover { border-color: var(--accent); }
.bs-tl-nodate-item .ico { width: 13px; height: 13px; }

/* --------------------------------------------------- Aufgaben (::tasks) */
.bs-tasks { max-width: 860px; margin: 0 auto; padding: 22px 18px 60px; }
.bs-tasks-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.bs-tasks-head h1 { font-size: 20px; margin: 0; }
.bs-tasks-ico .ico { width: 22px; height: 22px; }
.bs-tasks-me {
  background: var(--panel); color: var(--text); border: 1px solid var(--line);
  border-radius: 8px; padding: 6px 9px; font: inherit; font-size: 13px;
}
.bs-tasks-done-toggle { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; cursor: pointer; }
.bs-tasks-sec { margin-bottom: 18px; }
.bs-tasks-sec h2 {
  display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--muted);
  margin: 0 0 6px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em;
}
.bs-tasks-sec h2 .ico { width: 14px; height: 14px; }
.bs-tasks-overdue h2 { color: var(--err); }
.bs-task {
  display: flex; align-items: center; gap: 9px; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: 10px; margin-bottom: 6px;
  background: color-mix(in srgb, var(--panel) 55%, transparent); font-size: 13.5px;
}
.bs-task.done { opacity: .55; }
.bs-task.done .bs-task-name span { text-decoration: line-through; }
.bs-task-check {
  width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--muted);
  background: none; cursor: pointer; color: transparent; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center; padding: 0;
}
.bs-task-check .ico { width: 12px; height: 12px; }
.bs-task-check:hover { border-color: var(--ok); color: var(--ok); }
.bs-task-check.on { background: var(--ok); border-color: var(--ok); color: #fff; }
.bs-task-check:disabled { opacity: .35; cursor: default; }
.bs-task-name {
  display: flex; align-items: center; gap: 7px; cursor: pointer; min-width: 0;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.bs-task-name .ico { width: 14px; height: 14px; flex: 0 0 auto; }
.bs-task-name:hover span { text-decoration: underline; text-underline-offset: 3px; }
.bs-task-due {
  font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; flex: 0 0 auto;
}
.bs-task-due.overdue { color: var(--err); font-weight: 650; }
.bs-task-people { display: flex; gap: 2px; flex: 0 0 auto; }
.bs-task-base {
  margin-left: auto; display: inline-flex; align-items: center; gap: 5px;
  border: 0; background: none; cursor: pointer; font: inherit; font-size: 12px;
  padding: 3px 7px; border-radius: 7px; flex: 0 0 auto;
}
.bs-task-base:hover { background: var(--panel); color: var(--text); }
.bs-task-base .ico { width: 12px; height: 12px; }

/* --------------------------------------------- Automationen (::flows) */
.fl-root { max-width: 900px; margin: 0 auto; padding: 22px 18px 60px; }
.fl-head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.fl-head h1 { font-size: 20px; margin: 0; }
.fl-ico .ico { width: 22px; height: 22px; }
.fl-rule {
  display: flex; gap: 12px; align-items: flex-start;
  border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px;
  margin-bottom: 10px; background: color-mix(in srgb, var(--panel) 55%, transparent);
}
.fl-rule.off { opacity: .55; }
.fl-rule-main { flex: 1; min-width: 0; }
.fl-rule-name { font-weight: 650; font-size: 14.5px; }
.fl-rule-desc { font-size: 12.5px; margin-top: 2px; }
.fl-rule-stats { font-size: 12px; margin-top: 6px; }
.fl-ok { color: var(--ok); }
.fl-err { color: var(--err); }
.fl-err .ico, .fl-log-msg .ico { width: 12px; height: 12px; vertical-align: -2px; }
.fl-hook { display: flex; align-items: center; gap: 6px; margin-top: 6px; min-width: 0; }
.fl-hook code {
  background: var(--bg); border: 1px solid var(--line); border-radius: 6px;
  padding: 3px 8px; font-size: 11px; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; max-width: 100%;
}
.fl-rule-btns { display: flex; gap: 4px; flex: 0 0 auto; }
.fl-rule-btns .ico { width: 15px; height: 15px; }

/* Schalter */
.fl-toggle { position: relative; display: inline-block; width: 34px; height: 20px; flex: 0 0 auto; margin-top: 2px; cursor: pointer; }
.fl-toggle input { opacity: 0; width: 0; height: 0; }
.fl-knob {
  position: absolute; inset: 0; border-radius: 999px; background: var(--line);
  transition: background .15s;
}
.fl-knob::before {
  content: ''; position: absolute; width: 14px; height: 14px; border-radius: 50%;
  background: #fff; top: 3px; left: 3px; transition: transform .15s;
}
.fl-toggle input:checked + .fl-knob { background: var(--ok); }
.fl-toggle input:checked + .fl-knob::before { transform: translateX(14px); }

/* Protokoll */
.fl-log-sec { margin-top: 26px; }
.fl-log-sec h2 {
  display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--muted);
  font-weight: 600; text-transform: uppercase; letter-spacing: .04em; margin: 0 0 8px;
}
.fl-log-sec h2 .ico { width: 14px; height: 14px; }
.fl-log-row {
  display: flex; gap: 10px; font-size: 12.5px; padding: 5px 4px;
  border-bottom: 1px solid var(--line); align-items: baseline;
}
.fl-log-row.err .fl-log-msg { color: var(--err); }
.fl-log-time { color: var(--muted); flex: 0 0 auto; font-variant-numeric: tabular-nums; }
.fl-log-name { font-weight: 600; flex: 0 0 auto; }
.fl-log-msg { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Editor */
.fl-editor .fl-in, .fl-editor .fl-name, .fl-editor select, .fl-editor input[type=time], .fl-editor input[type=number] {
  background: var(--bg); color: var(--text); border: 1px solid var(--line);
  border-radius: 7px; padding: 6px 9px; font: inherit; font-size: 13px;
}
.fl-editor .fl-in, .fl-editor .fl-name { flex: 1; min-width: 140px; }
.fl-editor hr { border: 0; border-top: 1px solid var(--line); margin: 12px 0; }
.fl-sec-h { font-weight: 650; font-size: 13px; margin-bottom: 8px; }
.fl-inline { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; }
.fl-act {
  border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px;
  margin-bottom: 8px; background: color-mix(in srgb, var(--panel) 50%, transparent);
}
.fl-act-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.fl-act-n { color: var(--muted); font-size: 12px; }
.fl-act-head select { flex: 1; }
.fl-ta {
  width: 100%; box-sizing: border-box; background: var(--bg); color: var(--text);
  border: 1px solid var(--line); border-radius: 7px; padding: 6px 9px;
  font: inherit; font-size: 13px; resize: vertical; margin-top: 4px;
}

/* --------------------------------------------------------------- Mobil */
@media (max-width: 768px) {
  .bs-body { padding: 8px 8px 60px; }
  .bs-actions .btn { padding: 6px 9px; font-size: 12.5px; }
  .bs-col { flex-basis: 230px; }
  .bs-cal-day { min-height: 62px; }
  .bs-s-row > label { flex-basis: 100%; }
  /* Timeline-Labelbreite NICHT ändern — LABEL_W (timeline.js) rechnet damit */
  .bs-task { flex-wrap: wrap; }
  .bs-task-base { margin-left: 30px; }
}

/* ===================== Dashboards (.dash) + Charts ====================== */
/* Validierte 8-Slot-Palette (dataviz, geprüft gegen beide App-Surfaces:
   scripts/validate_palette.js PASS auf #f4f4f6 hell / #0f0f11 dunkel).
   Dunkel ist Default (wie die App-Tokens), hell via [data-theme=light]. */
:root {
  --viz-1: #3987e5; --viz-2: #199e70; --viz-3: #c98500; --viz-4: #008300;
  --viz-5: #9085e9; --viz-6: #e66767; --viz-7: #d55181; --viz-8: #d95926;
}
[data-theme="light"] {
  --viz-1: #2a78d6; --viz-2: #1baf7a; --viz-3: #eda100; --viz-4: #008300;
  --viz-5: #4a3aa7; --viz-6: #e34948; --viz-7: #e87ba4; --viz-8: #eb6834;
}

.dash-root { height: 100%; overflow: auto; padding: 16px 18px 60px; }
.dash-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.dash-head .dash-title { font-size: 18px; font-weight: 650; flex: 1; }
.dash-ico .ico { width: 20px; height: 20px; }
.dash-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 12px; }
.dash-w {
  background: color-mix(in srgb, var(--panel) 60%, transparent);
  border: 1px solid var(--line); border-radius: 14px;
  min-width: 0; overflow: hidden; display: flex; flex-direction: column;
}
.dash-w-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 13px 0; gap: 8px;
}
.dash-w-title { font-size: 13px; font-weight: 650; color: var(--muted); }
.dash-w-menu .ico { width: 15px; height: 15px; }
.dash-w-body { padding: 8px 13px 13px; overflow: auto; max-height: 460px; min-height: 0; }
.dash-w-body.md { font-size: 13.5px; }
@media (max-width: 768px) { .dash-w { grid-column: 1 / -1 !important; } }

/* Kennzahl-Kachel (Stat) */
.dash-stat { padding: 8px 2px 4px; }
.dash-stat-v { font-size: 34px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.1; }
.dash-stat-sub { font-size: 12px; margin-top: 4px; }

/* Aufgaben-Widget */
.dash-task {
  display: flex; align-items: center; gap: 8px; padding: 6px 4px;
  border-bottom: 1px solid var(--line); cursor: pointer; font-size: 13px;
}
.dash-task:hover .dash-task-name { text-decoration: underline; text-underline-offset: 3px; }
.dash-task .ico { width: 14px; height: 14px; flex: 0 0 auto; }
.dash-task-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Button-Widget */
.dash-btn { margin: 6px 0 4px; }
.dash-btn .ico { width: 15px; height: 15px; }
.dash-btn-out { font-size: 12px; margin-top: 6px; word-break: break-word; }

/* ---- Charts (dataviz-Specs: Text in Text-Tokens, Grid dezent) ---- */
.viz-svg { width: 100%; height: auto; display: block; }
.viz-label { fill: var(--muted); font-size: 11px; }
.viz-value { fill: var(--text); font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; }
.viz-hero { fill: var(--text); font-size: 22px; font-weight: 700; }
.viz-axis { stroke: var(--line); stroke-width: 1; }
.viz-grid { stroke: var(--line); stroke-width: 1; opacity: .6; }
.viz-line { fill: none; stroke: var(--viz-1); stroke-width: 2; stroke-linejoin: round; }
.viz-dot { fill: var(--viz-1); }
.viz-seg { stroke: var(--panel); stroke-width: 2; }   /* 2px Surface-Lücke */
.viz-donut-wrap { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.viz-donut-wrap svg { flex: 0 0 170px; max-width: 180px; }
.viz-legend { flex: 1; min-width: 140px; }
.viz-leg-row { display: flex; align-items: center; gap: 8px; padding: 3px 0; font-size: 12.5px; }
.viz-leg-chip { width: 10px; height: 10px; border-radius: 3px; flex: 0 0 auto; }
.viz-leg-label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.viz-leg-val { color: var(--muted); font-variant-numeric: tabular-nums; }
.viz-tip {
  position: fixed; z-index: 900; display: none; pointer-events: none;
  background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
  padding: 5px 10px; font-size: 12px; color: var(--text);
  box-shadow: 0 6px 22px rgba(0, 0, 0, .3); max-width: 260px;
}

/* Token-Anzeige (Settings → API) */
.tok-secret {
  display: block; margin-top: 8px; padding: 8px 10px; border-radius: 8px;
  background: var(--bg); border: 1px solid var(--line);
  font-size: 12.5px; user-select: all; word-break: break-all;
}

/* =============================== Kommentare ============================= */
.cmt-badge {
  position: absolute; top: 1px; right: 1px; min-width: 14px; height: 14px;
  border-radius: 999px; background: var(--accent); color: #fff;
  font-size: 9.5px; font-weight: 700; line-height: 14px; padding: 0 3px;
  pointer-events: none;
}
#btn-comments { position: relative; }
.cmt-panel {
  position: fixed; top: 0; right: -360px; width: 340px; height: 100%;
  z-index: 650; background: var(--panel); border-left: 1px solid var(--line);
  display: flex; flex-direction: column; transition: right .18s ease;
  box-shadow: -12px 0 34px rgba(0, 0, 0, .25);
}
.cmt-panel.open { right: 0; }
.cmt-head {
  display: flex; align-items: center; gap: 8px; padding: 12px 14px;
  border-bottom: 1px solid var(--line); flex: 0 0 auto;
}
.cmt-head .ico { width: 16px; height: 16px; }
.cmt-file { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.cmt-new { padding: 12px 14px; border-bottom: 1px solid var(--line); flex: 0 0 auto; }
.cmt-input {
  width: 100%; box-sizing: border-box; background: var(--bg); color: var(--text);
  border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px;
  font: inherit; font-size: 13px; resize: vertical; margin-bottom: 7px;
}
.cmt-quote-preview, .cmt-quote {
  border-left: 3px solid var(--accent); padding: 4px 9px; margin-bottom: 7px;
  color: var(--muted); font-size: 12.5px; font-style: italic;
  background: color-mix(in srgb, var(--accent) 7%, transparent);
  border-radius: 0 7px 7px 0; word-break: break-word;
}
.cmt-quote-x { border: 0; background: none; color: var(--muted); cursor: pointer; }
.cmt-list { flex: 1; overflow: auto; padding: 10px 14px 30px; }
.cmt-empty { padding: 12px 2px; }
.cmt-sec-h { margin: 14px 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.cmt-thread {
  border: 1px solid var(--line); border-radius: 11px; padding: 10px 12px;
  margin-bottom: 10px; background: color-mix(in srgb, var(--bg) 55%, transparent);
}
.cmt-thread.resolved { opacity: .6; }
.cmt-msg { margin-bottom: 6px; }
.cmt-reply { margin-left: 12px; padding-left: 10px; border-left: 2px solid var(--line); }
.cmt-author { font-weight: 650; font-size: 12.5px; margin-right: 6px; }
.cmt-time { font-size: 11px; }
.cmt-text { font-size: 13px; margin-top: 2px; white-space: pre-wrap; word-break: break-word; }
.cmt-actions { display: flex; gap: 4px; margin-top: 6px; }
.cmt-actions button {
  display: inline-flex; align-items: center; gap: 4px; border: 0; background: none;
  color: var(--muted); cursor: pointer; font: inherit; font-size: 12px;
  padding: 3px 7px; border-radius: 6px;
}
.cmt-actions button:hover { color: var(--text); background: var(--panel); }
.cmt-actions .ico { width: 12px; height: 12px; }
.cmt-reply-box { margin-top: 6px; }
@media (max-width: 768px) { .cmt-panel { width: 100%; right: -100%; } }

/* Konten (Settings → Freigaben) */
.set-share-row { display: flex; align-items: center; gap: 8px; padding: 8px 4px; border-bottom: 1px solid var(--line); }
.set-share-main { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.set-share-main .muted { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Galerie-Cover: alle Dateitypen (base/covers.js) */
.bs-gcover { position: relative; }
.bs-gcover video { width: 100%; height: 100%; object-fit: cover; }
.bs-gcover canvas { width: 100%; height: 100%; object-fit: contain; background: var(--bg); }
.bs-gplay {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  pointer-events: none;
}
.bs-gplay .ico {
  width: 30px; height: 30px; color: #fff; background: rgba(0, 0, 0, .45);
  border-radius: 50%; padding: 7px;
}
.bs-gcover-text { align-items: flex-start !important; overflow: hidden; }
.bs-gsnippet {
  font-size: 10.5px; line-height: 1.5; color: var(--muted);
  padding: 10px 12px; white-space: pre-wrap; word-break: break-word;
  width: 100%; height: 100%; overflow: hidden;
  mask-image: linear-gradient(180deg, #000 60%, transparent);
}
