/* ===== Startseite ===== */
.home { max-width: 860px; margin: 0 auto; padding: 36px 28px 60px; }
.home-title { font-size: 26px; margin: 0 0 22px; }
.home-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 30px; }
.home-action {
  display: flex; align-items: center; gap: 8px; padding: 12px 16px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  cursor: pointer; font-size: 13.5px;
}
.home-action:hover { border-color: var(--accent); }
.home-action span { font-size: 17px; }
.home-sec h2 { font-size: 14px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin: 24px 0 10px; }
.home-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.home-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 12px; cursor: pointer; overflow: hidden;
}
.home-card:hover { border-color: var(--accent); }
.home-card .hc-ico { font-size: 22px; margin-bottom: 8px; }
.home-card .hc-name { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-card .hc-meta { font-size: 11px; color: var(--muted); margin-top: 3px; }
.home-card { position: relative; }
.hc-x {
  position: absolute; top: 5px; right: 5px; width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  border: 0; border-radius: 6px; background: var(--panel2); color: var(--muted);
  cursor: pointer; opacity: 0; transition: opacity .12s;
}
.hc-x svg { width: 14px; height: 14px; }
.home-card:hover .hc-x, .hc-x:focus-visible { opacity: 1; }
.hc-x:hover { color: var(--err); }
.home-empty { color: var(--muted); font-size: 13px; padding: 8px 2px; }

/* ===== Ordner-Ansicht ===== */
.fv { display: flex; flex-direction: column; height: 100%; }
.fv-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap;
}
.fv-title { font-weight: 700; font-size: 15px; }
.fv-count { color: var(--muted); font-weight: 400; font-size: 12.5px; margin-left: 8px; }
.fv-controls { display: flex; align-items: center; gap: 6px; }
.fv-sort {
  background: var(--panel); color: var(--text); border: 1px solid var(--line);
  border-radius: 7px; padding: 4px 8px; font: inherit; font-size: 12.5px;
}
.fv-modes { display: flex; gap: 2px; border: 1px solid var(--line); border-radius: 8px; padding: 2px; }
.fv-modes .icon-btn.on { background: var(--accent-dim); color: var(--text); }
.fv-body { flex: 1; overflow: auto; padding: 10px 16px 40px; }

.fv-list { display: flex; flex-direction: column; }
.fv-row {
  display: flex; align-items: center; gap: 10px; padding: 7px 10px;
  border-radius: 8px; cursor: pointer; border-bottom: 1px solid var(--line);
}
.fv-row:hover { background: var(--panel); }
.fv-row-ico { font-size: 16px; }
.fv-row-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fv-row-size { color: var(--muted); font-size: 12px; width: 80px; text-align: right; }
.fv-row-date { color: var(--muted); font-size: 12px; width: 130px; text-align: right; }

.fv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.fv-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  overflow: hidden; cursor: pointer;
}
.fv-card:hover { border-color: var(--accent); }
.fv-card-thumb {
  height: 100px; display: grid; place-items: center; background: var(--panel2);
  overflow: hidden;
}
.fv-card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.fv-card-ico { font-size: 34px; }
.fv-card-name {
  padding: 8px 10px; font-size: 12.5px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap;
}

/* Datenbank-Ansicht */
.fv-db-filter { max-width: 280px; margin-bottom: 10px; }
.fv-db-cap { color: var(--warn); font-size: 12px; margin-bottom: 8px; }
.fv-table { border-collapse: collapse; width: 100%; font-size: 13px; }
.fv-table th {
  text-align: left; padding: 7px 10px; border-bottom: 2px solid var(--line);
  cursor: pointer; user-select: none; color: var(--muted); font-size: 12px;
  text-transform: uppercase; letter-spacing: .04em; white-space: nowrap;
}
.fv-table th:hover { color: var(--text); }
.fv-table td { padding: 6px 10px; border-bottom: 1px solid var(--line); }
.fv-db-name { cursor: pointer; white-space: nowrap; }
.fv-db-name:hover { color: var(--accent); }
.fv-db-cell { cursor: default; min-width: 90px; }
.fv-db-edit { padding: 3px 7px; font-size: 13px; }

/* ===== Versionen ===== */
.versions-list { display: flex; flex-direction: column; gap: 2px; }
.version-row {
  display: flex; align-items: center; gap: 12px; padding: 7px 10px;
  border-radius: 8px; border-bottom: 1px solid var(--line);
}
.vr-date { flex: 1; font-weight: 600; font-size: 13px; }
.vr-size { color: var(--muted); font-size: 12px; }
.vr-actions { display: flex; gap: 6px; }
.vr-actions .btn { padding: 4px 10px; font-size: 12px; }
.version-preview { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.vp-head { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.vp-pre {
  background: var(--bg); border: 1px solid var(--line); border-radius: 8px;
  padding: 10px; max-height: 320px; overflow: auto; font-size: 12px; white-space: pre-wrap;
}

/* ===== Papierkorb ===== */
.trash-hint { color: var(--muted); font-size: 12px; margin-bottom: 10px; }
.trash-row {
  display: flex; align-items: center; gap: 10px; padding: 7px 6px;
  border-bottom: 1px solid var(--line);
}
.trash-name { flex: 1; overflow: hidden; }
.trash-origin { display: block; color: var(--muted); font-size: 11px; }
.trash-date, .trash-size { color: var(--muted); font-size: 12px; white-space: nowrap; }
.trash-row .btn { padding: 4px 10px; font-size: 12px; flex-shrink: 0; }

/* ===== Aktivität ===== */
.act-row {
  display: flex; align-items: center; gap: 12px; padding: 7px 6px;
  border-bottom: 1px solid var(--line); cursor: pointer; border-radius: 6px;
}
.act-row:hover { background: var(--panel2); }
.act-ico { font-size: 15px; width: 22px; text-align: center; }
.act-main { flex: 1; min-width: 0; }
.act-name { display: block; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.act-detail { display: block; color: var(--muted); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.act-date { color: var(--muted); font-size: 11.5px; white-space: nowrap; }
.act-more { margin-top: 10px; width: 100%; }

/* ===== Eigenschaften / Tags / Teilen / Pickup ===== */
.props-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.props-table td { padding: 6px 8px; border-bottom: 1px solid var(--line); }
.props-table .pt-key { color: var(--muted); width: 110px; }
.props-table .pt-val { word-break: break-all; }
.props-table .pt-pathtext { user-select: text; }
.pt-copy {
  border: 0; background: var(--panel2); color: var(--muted); cursor: pointer;
  border-radius: 6px; padding: 2px 5px; margin-left: 8px; vertical-align: middle;
}
.pt-copy:hover { color: var(--text); }
.pt-copy svg.ico { width: 13px; height: 13px; display: block; }
.props-disk { margin-top: 12px; color: var(--muted); font-size: 12.5px; }

/* Eigenschaften: interaktive Ordner-Einstellungen (Favorit/Verstecken/Farbe/Tags) */
.props-settings { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.props-h {
  margin: 0 0 10px; font-size: 11px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--muted);
}
.props-toggles { display: flex; gap: 18px; flex-wrap: wrap; }
.props-toggle { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13.5px; user-select: none; }
.props-toggle input { accent-color: var(--accent); width: 16px; height: 16px; cursor: pointer; }
.props-field { margin-top: 12px; }
.props-label { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.ps-colors { display: flex; flex-wrap: wrap; gap: 6px; }
.ps-swatch {
  width: 24px; height: 24px; border-radius: 50%; border: 2px solid transparent;
  cursor: pointer; padding: 0;
}
.ps-swatch.on { border-color: var(--text); }
.ps-swatch-none {
  background: var(--panel2); color: var(--muted);
  display: flex; align-items: center; justify-content: center; font-size: 13px;
}
.ps-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; min-height: 22px; }
.ps-tag-input { width: 100%; }

.tag-edit-list { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; min-height: 24px; }
.tag-edit-empty { color: var(--muted); font-size: 12.5px; }
.search-tag-pill {
  background: var(--accent-dim); border-radius: 12px; padding: 2px 10px;
  font-size: 12px; display: inline-block;
}

.sh-url-row { display: flex; gap: 6px; }
.sh-result { margin-top: 6px; }
.pickup-list { margin: 6px 0 4px; padding-left: 20px; font-size: 13px; }
.pickup-size { color: var(--muted); font-size: 11.5px; }

/* ===== Split-View / Pane-Modus ===== */
#split-grid { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); }
.split-pane { border: 0; width: 100%; height: 100%; background: var(--bg); }
body.pane-mode #sidebar, body.pane-mode #sidebar-backdrop, body.pane-mode #tab-strip,
body.pane-mode #mobile-fab, body.pane-mode #btn-split, body.pane-mode #btn-hamburger { display: none !important; }

/* SVG-Icons in der Ordner-Ansicht */
.fv-title { display: flex; align-items: center; gap: 8px; }
.fv-title-ico { display: inline-flex; }
.fv-title-ico svg.ico { width: 18px; height: 18px; }
.fv-row-ico { display: inline-flex; align-items: center; }
.fv-row-ico svg.ico { width: 16px; height: 16px; }
.fv-card-ico svg.ico { width: 36px; height: 36px; }
.fv-modes .icon-btn svg.ico, .fv-dir svg.ico { width: 14px; height: 14px; }
.fv-db-name svg.ico { width: 14px; height: 14px; }

/* Home: Icons in Schnellaktionen/Karten */
.home-action svg.ico { width: 17px; height: 17px; }
.home-sec h2 svg.ico { width: 14px; height: 14px; color: var(--muted); }
.hc-ico svg.ico { width: 26px; height: 26px; }
.act-ico svg.ico { width: 14px; height: 14px; }

/* ===== Share-Inbox: Ordner-Picker (Favoriten-Chips + Baum) ===== */
.sp-picker { display: flex; flex-direction: column; gap: 8px; }
.sp-current {
  display: flex; align-items: center; gap: 6px; font-size: 13px;
  font-weight: 600; color: var(--accent);
}
.sp-pins { display: flex; gap: 6px; flex-wrap: wrap; }
.sp-chip {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--panel2); border: 1px solid var(--line); border-radius: 999px;
  color: var(--text); padding: 4px 11px; font-size: 12.5px; cursor: pointer;
}
.sp-chip:hover { border-color: var(--accent); }
.sp-chip svg.ico { width: 12px; height: 12px; color: var(--warn); }
.sp-tree {
  max-height: 240px; overflow-y: auto;
  border: 1px solid var(--line); border-radius: 8px; padding: 4px;
}
.sp-row {
  display: flex; align-items: center; gap: 6px; padding: 5px 6px;
  border-radius: 6px; cursor: pointer; font-size: 13px; user-select: none;
}
.sp-row:hover { background: var(--panel2); }
.sp-row.selected { background: var(--accent-dim); }
.sp-twist { width: 16px; display: inline-flex; justify-content: center; color: var(--muted); }
.sp-twist svg.ico { width: 12px; height: 12px; }
.sp-ico svg.ico { width: 14px; height: 14px; }
.pickup-size { color: var(--muted); font-size: 11.5px; }
@media (pointer: coarse) { .sp-row { padding: 9px 6px; } }

/* ===== Audio-Notiz (Aufnahme-Modal) ===== */
.audio-rec-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.audio-rec-dot {
  width: 12px; height: 12px; border-radius: 50%; background: var(--err);
  animation: audio-pulse 1.1s ease-in-out infinite;
}
@keyframes audio-pulse { 50% { opacity: .35; } }
.audio-rec-time { font-size: 19px; font-weight: 700; font-variant-numeric: tabular-nums; }
.audio-rec-hint { color: var(--muted); font-size: 12.5px; }

/* ===== Diktat-Knopf (view-controls) ===== */
/* Aufnahme aktiv: rot. Sprechen = pulsierender Glow, Stille = ruhig/gedimmt. */
#btn-dictate.dictating { color: var(--err); }
#btn-dictate.rec-speaking {
  color: var(--err);
  animation: dictate-pulse 1.1s ease-in-out infinite;
}
#btn-dictate.rec-silent { color: var(--err); opacity: .6; }
/* Transkription läuft (nach dem Stoppen): ruhiges Pulsieren in Akzentfarbe. */
#btn-dictate.processing { color: var(--accent); animation: dictate-pulse 1.4s ease-in-out infinite; }
@keyframes dictate-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .55; transform: scale(.9); }
}
