/* Media Manager – Oberfläche. Keine externen Schriften oder Bibliotheken. */

/* Farben: hell in #336699, dunkel in neutralem Anthrazit/Schwarz. Ein Ort für alle Farben. */
:root {
  --radius: 10px;
  --tile: 168px;
  --k-folder: #e8a317;
  --k-image: #2f9e6f;
  --k-video: #d6455d;
  --k-audio: #8b5cf6;
  --k-pdf: #e0442b;
  --k-text: #64748b;
  --k-archive: #a16207;
  --k-doc: #336699;
  --k-sheet: #188a4f;
  --k-slides: #e2701b;
  --k-binary: #475569;
  --k-file: #7c8698;
  --brand: #336699;
  --brand-600: #2b5783;
  --brand-700: #22476b;
  --brand-50: #eef3f9;
  --brand-100: #dbe6f1;
  --bg: #eef2f7;
  --panel: #ffffff;
  --panel2: #edf1f7;
  --hover: #e5ecf5;
  --line: #d8e1ec;
  --line2: #c3d0df;
  --text: #14202d;
  --muted: #5a6a7e;
  --accent: #336699;
  --accent-2: #2b5783;
  --accent-weak: #e0e9f3;
  --on-accent: #ffffff;
  --danger: #d92d20;
  --danger-weak: #fdecea;
  --ok: #12925a;
  --ok-weak: #e3f6ec;
  --warn: #c56a00;
  --warn-weak: #fff3df;
  --sel: rgba(51, 102, 153, 0.12);
  --sel-line: rgba(51, 102, 153, 0.6);
  --shadow: 0 1px 2px rgba(20, 40, 70, .06), 0 4px 16px rgba(20, 40, 70, .07);
  --shadow-lg: 0 12px 40px rgba(20, 40, 70, .22);
  --head-bg: #336699;
  --head-bg2: #2b5783;
  --head-line: #264f78;
  --head-text: #ffffff;
  --head-muted: rgba(255, 255, 255, .80);
  --head-hover: rgba(255, 255, 255, .12);
  --head-on: rgba(255, 255, 255, .20);
  --head-badge-bg: #ffffff;
  --head-badge-text: #336699;
  --head-btn-bg: #ffffff;
  --head-btn-text: #336699;
  --selbar-bg: #336699;
  --selbar-text: #ffffff;
  --selbar-hover: rgba(255, 255, 255, .16);
  --selbar-danger: #ffd2cc;
  --side-head: #336699;
  --card-head: #f6f9fc;
  --stat-line: #336699;
  --login-bg: linear-gradient(140deg, #336699 0%, #2b5783 55%, #1f4266 100%);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brand: #e8e8e8;
    --brand-600: #ffffff;
    --brand-700: #ffffff;
    --brand-50: #1a1a1c;
    --brand-100: #232326;
    --bg: #0f0f10;
    --panel: #18181a;
    --panel2: #212124;
    --hover: #28282b;
    --line: #2a2a2d;
    --line2: #3a3a3e;
    --text: #ececec;
    --muted: #9d9da3;
    --accent: #e8e8e8;
    --accent-2: #ffffff;
    --accent-weak: #2a2a2d;
    --on-accent: #111112;
    --danger: #f2665a;
    --danger-weak: #3a1c1a;
    --ok: #3ccf8e;
    --ok-weak: #15302a;
    --warn: #f0a640;
    --warn-weak: #36290f;
    --sel: rgba(255, 255, 255, 0.08);
    --sel-line: rgba(255, 255, 255, 0.45);
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 4px 16px rgba(0, 0, 0, .35);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, .65);
    --head-bg: #1c1c1e;
    --head-bg2: #161618;
    --head-line: #2a2a2d;
    --head-text: #ececec;
    --head-muted: #a5a5ab;
    --head-hover: rgba(255, 255, 255, .06);
    --head-on: rgba(255, 255, 255, .12);
    --head-badge-bg: #e8e8e8;
    --head-badge-text: #111112;
    --head-btn-bg: #e8e8e8;
    --head-btn-text: #111112;
    --selbar-bg: #2a2a2d;
    --selbar-text: #ececec;
    --selbar-hover: rgba(255, 255, 255, .08);
    --selbar-danger: #ff9d93;
    --side-head: #9d9da3;
    --card-head: #1c1c1e;
    --stat-line: #4a4a4f;
    --login-bg: linear-gradient(140deg, #0b0b0c 0%, #19191b 60%, #232326 100%);
    --k-doc: #6f7f95;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --brand: #e8e8e8;
  --brand-600: #ffffff;
  --brand-700: #ffffff;
  --brand-50: #1a1a1c;
  --brand-100: #232326;
  --bg: #0f0f10;
  --panel: #18181a;
  --panel2: #212124;
  --hover: #28282b;
  --line: #2a2a2d;
  --line2: #3a3a3e;
  --text: #ececec;
  --muted: #9d9da3;
  --accent: #e8e8e8;
  --accent-2: #ffffff;
  --accent-weak: #2a2a2d;
  --on-accent: #111112;
  --danger: #f2665a;
  --danger-weak: #3a1c1a;
  --ok: #3ccf8e;
  --ok-weak: #15302a;
  --warn: #f0a640;
  --warn-weak: #36290f;
  --sel: rgba(255, 255, 255, 0.08);
  --sel-line: rgba(255, 255, 255, 0.45);
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 4px 16px rgba(0, 0, 0, .35);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, .65);
  --head-bg: #1c1c1e;
  --head-bg2: #161618;
  --head-line: #2a2a2d;
  --head-text: #ececec;
  --head-muted: #a5a5ab;
  --head-hover: rgba(255, 255, 255, .06);
  --head-on: rgba(255, 255, 255, .12);
  --head-badge-bg: #e8e8e8;
  --head-badge-text: #111112;
  --head-btn-bg: #e8e8e8;
  --head-btn-text: #111112;
  --selbar-bg: #2a2a2d;
  --selbar-text: #ececec;
  --selbar-hover: rgba(255, 255, 255, .08);
  --selbar-danger: #ff9d93;
  --side-head: #9d9da3;
  --card-head: #1c1c1e;
  --stat-line: #4a4a4f;
  --login-bg: linear-gradient(140deg, #0b0b0c 0%, #19191b 60%, #232326 100%);
  --k-doc: #6f7f95;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
[hidden] { display: none !important; }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.grow { flex: 1; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Symbole ---------- */
.ic { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.ic.sm { width: 15px; height: 15px; }
.ic.lg { width: 22px; height: 22px; }

/* ---------- Knöpfe und Felder ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 12px;
  border: 1px solid var(--line2); border-radius: 8px;
  background: var(--panel); color: var(--text);
  cursor: pointer; white-space: nowrap; user-select: none;
  transition: background .12s, border-color .12s;
}
.btn:hover { background: var(--hover); }
.btn:focus-visible, .iconbtn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 1px;
}
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.primary:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn.danger { color: var(--danger); }
.btn.danger.solid { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--hover); }
.btn.sm { height: 28px; padding: 0 9px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: default; }
.iconbtn {
  display: inline-grid; place-items: center; width: 34px; height: 34px;
  border: 0; border-radius: 8px; background: transparent; cursor: pointer; color: var(--text);
}
.iconbtn:hover { background: var(--hover); }
.iconbtn.sm { width: 28px; height: 28px; }
.iconbtn.active { background: var(--accent-weak); color: var(--accent); }

input[type=text], input[type=password], input[type=search], input[type=number], input[type=date], input[type=url], select, textarea {
  height: 34px; padding: 0 10px; width: 100%;
  border: 1px solid var(--line2); border-radius: 8px; background: var(--panel);
}
textarea { height: auto; min-height: 70px; padding: 8px 10px; resize: vertical; }
input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--accent); vertical-align: middle; margin: 0; }
label.check { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.field > span:first-child { font-weight: 600; font-size: 13px; }
.field .hint { color: var(--muted); font-size: 12.5px; }
.row { display: flex; gap: 10px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.cols2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.pwwrap { position: relative; }
.pwwrap input { padding-right: 38px; }
.pwwrap .iconbtn { position: absolute; right: 2px; top: 2px; width: 30px; height: 30px; }

.seg { display: inline-flex; border: 1px solid var(--line2); border-radius: 8px; overflow: hidden; background: var(--panel); }
.seg button { border: 0; background: transparent; height: 32px; padding: 0 9px; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button.on { background: var(--accent-weak); color: var(--accent); }
.seg button:hover:not(.on) { background: var(--hover); }

.badge { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--panel2); color: var(--muted); white-space: nowrap; }
.badge.ok { background: var(--ok-weak); color: var(--ok); }
.badge.warn { background: var(--warn-weak); color: var(--warn); }
.badge.danger { background: var(--danger-weak); color: var(--danger); }
.badge.accent { background: var(--accent-weak); color: var(--accent); }
.chip { display: inline-block; padding: 1px 8px; border-radius: 6px; background: var(--panel2); border: 1px solid var(--line); font-size: 12px; margin: 1px 4px 1px 0; }

.bar { height: 6px; border-radius: 9px; background: var(--panel2); overflow: hidden; border: 1px solid var(--line); }
.bar > i { display: block; height: 100%; background: var(--accent); border-radius: 9px; width: 0; transition: width .3s; }
.bar.warn > i { background: var(--warn); }
.bar.danger > i { background: var(--danger); }

/* ---------- Kopfzeile ---------- */
.top {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 18px;
  height: 56px; padding: 0 18px;
  background: linear-gradient(90deg, var(--head-bg), var(--head-bg2));
  color: var(--head-text); border-bottom: 1px solid var(--head-line);
  box-shadow: 0 2px 10px rgba(20, 40, 70, .12);
}
.brand { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 15px; white-space: nowrap; color: inherit; }
a.brand { text-decoration: none; border-radius: 8px; padding: 4px 6px; margin-left: -6px; }
a.brand:hover { text-decoration: none; background: var(--head-hover); }
a.brand:focus-visible { outline: 2px solid var(--head-text); outline-offset: 1px; }
.brand img { width: 26px; height: 26px; border-radius: 6px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .25); }
.tabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button {
  height: 36px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent; cursor: pointer;
  color: var(--head-muted); font-weight: 600; display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
  transition: background .12s, color .12s;
}
.tabs button:hover { background: var(--head-hover); color: var(--head-text); }
.tabs button.on { color: var(--head-text); background: var(--head-on); }
.tabs button:focus-visible { outline: 2px solid var(--head-text); outline-offset: -2px; }
.tabs .count { font-size: 11px; background: var(--head-badge-bg); color: var(--head-badge-text); border-radius: 99px; padding: 0 6px; font-weight: 700; }
.head-tools { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.top .iconbtn { color: var(--head-text); }
.top .iconbtn:hover { background: var(--head-hover); }
.account { position: relative; }
.account > .btn { border-color: transparent; background: transparent; color: var(--head-text); }
.account > .btn:hover { background: var(--head-hover); }
.avatar {
  display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  background: var(--accent); color: var(--on-accent); font-size: 12px; font-weight: 700; flex: none;
}
.top .avatar { background: var(--head-badge-bg); color: var(--head-badge-text); }
.avatar.lg { width: 34px; height: 34px; font-size: 14px; }

.menu {
  position: absolute; z-index: 60; min-width: 220px; padding: 5px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-lg);
  color: var(--text);
}
.account .menu { right: 0; top: 42px; }
.menu button, .menu a {
  display: flex; width: 100%; align-items: center; gap: 9px; padding: 7px 10px; border: 0; border-radius: 6px;
  background: transparent; text-align: left; cursor: pointer; color: var(--text); text-decoration: none; white-space: nowrap;
}
.menu button:hover, .menu a:hover { background: var(--hover); text-decoration: none; }
.menu button.danger { color: var(--danger); }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 5px 2px; }
.menu .head { padding: 6px 10px 8px; }
.menu .kbd { margin-left: auto; color: var(--muted); font-size: 12px; }

/* ---------- Hauptbereich ---------- */
main { min-height: calc(100% - 56px - 40px); }
.tab { display: none; }
.tab.on { display: block; }
.page { max-width: 1280px; margin: 0 auto; padding: 22px 18px 40px; }
.page h2 { font-size: 20px; margin: 0 0 4px; }
.page .sub { color: var(--muted); margin: 0 0 18px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 18px; }
.card > header { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); background: var(--card-head); border-radius: var(--radius) var(--radius) 0 0; }
.card > header h3 { margin: 0; font-size: 15px; }
.card > .body { padding: 16px; }
.card > .body.flush { padding: 0; }
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 8px; background: var(--panel2); border: 1px solid var(--line); margin-bottom: 12px; }
.notice.warn { background: var(--warn-weak); border-color: transparent; }
.notice.danger { background: var(--danger-weak); border-color: transparent; }
.notice.ok { background: var(--ok-weak); border-color: transparent; }
.notice .ic { margin-top: 1px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-top: 3px solid var(--stat-line); border-radius: var(--radius); padding: 12px 16px 14px; box-shadow: var(--shadow); }
.stat b { color: var(--accent); }
.stat b { display: block; font-size: 24px; line-height: 1.2; }
.stat span { color: var(--muted); font-size: 13px; }

table.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); font-weight: 600; padding: 9px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr:hover td { background: var(--hover); }
.tbl .actions { text-align: right; white-space: nowrap; }
.tblwrap { overflow-x: auto; }
.empty { padding: 34px 16px; text-align: center; color: var(--muted); }
.empty .ic { width: 40px; height: 40px; stroke-width: 1.3; display: block; margin: 0 auto 10px; opacity: .6; }

footer.foot {
  min-height: 40px; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 4px 22px;
  padding: 6px 16px; color: var(--muted); font-size: 12.5px; white-space: nowrap;
}
.foot-app { display: inline-flex; align-items: center; gap: 6px; }
/* Impressum des Programminhabers */
.imprint { font-style: normal; display: inline-flex; align-items: center; flex-wrap: wrap; justify-content: center; gap: 0 6px; }
.imprint a { color: inherit; font-weight: 600; }
.imprint .imprint-label { opacity: .8; }
.imprint .dot { opacity: .6; }
footer.foot.on-color { position: fixed; left: 0; right: 0; bottom: 0; color: rgba(255, 255, 255, .78); }
body.colored footer.share-foot { color: rgba(255, 255, 255, .78); }
footer.share-foot { margin-top: 24px; border-top: 1px solid var(--line); }
body.colored footer.share-foot { border-top-color: transparent; }
footer.foot .foot-app a { color: var(--accent); font-weight: 600; }
footer.foot button { border: 0; background: none; color: var(--accent); cursor: pointer; padding: 0; font-weight: 600; }

/* ---------- Dateien ---------- */
.fm { display: grid; grid-template-columns: 240px 1fr; height: calc(100vh - 56px - 40px); min-height: 420px; }
.sidebar { border-right: 1px solid var(--line); background: var(--panel); overflow-y: auto; padding: 12px 10px; }
.sidebar h4 { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--side-head); margin: 14px 8px 6px; }
.sidebar h4:first-child { margin-top: 2px; }
.space {
  display: flex; flex-direction: column; gap: 6px; width: 100%; padding: 8px 10px; border: 1px solid transparent; border-radius: 8px;
  background: transparent; cursor: pointer; text-align: left; margin-bottom: 2px;
}
.space .nm { display: flex; align-items: center; gap: 8px; font-weight: 600; min-width: 0; }
.space .nm span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.space .meta { font-size: 11.5px; color: var(--muted); display: flex; justify-content: space-between; gap: 6px; }
.space:hover { background: var(--hover); }
.space.on { background: var(--accent-weak); color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }
.space.on .meta { color: var(--accent); opacity: .85; }
.space.unavail { opacity: .6; }
.space.drop-target { border-color: var(--accent); background: var(--accent-weak); }
.space .ro { margin-left: auto; }
/* externe Laufwerke */
.space .space-edit { margin-left: auto; display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; opacity: 0; color: var(--muted); }
.space:hover .space-edit, .space.on .space-edit, .space .space-edit:focus-visible { opacity: 1; }
.space .space-edit:hover { background: var(--hover); color: var(--text); }
@media (pointer: coarse) { .space .space-edit { opacity: 1; } }
.space.add-remote { color: var(--muted); border: 1px dashed var(--line2); }
.space.add-remote:hover { color: var(--accent); border-color: var(--accent); }
.type-seg { margin-bottom: 4px; }
.remote-form .keybox { margin: 4px 0 12px; }
.remote-form .keybox summary { cursor: pointer; font-weight: 600; font-size: 13px; margin-bottom: 8px; }
.remote-form label.check { margin-bottom: 8px; }
.pinbox { margin: 6px 0 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.pinbox code, .test-result code { word-break: break-all; }
.test-result { display: flex; gap: 10px; align-items: flex-start; margin-top: 8px; border-radius: 8px; }
.test-result.ok, .test-result.bad { padding: 10px 12px; }
.test-result.ok { background: var(--ok-weak); }
.test-result.ok > .ic { color: var(--ok); }
.test-result.bad { background: var(--danger-weak); }
.test-result.bad > .ic { color: var(--danger); }
.center-row { justify-content: center; margin-top: 14px; }
.file-empty .btn .ic { width: 18px; height: 18px; stroke-width: 1.8; opacity: 1; margin: 0; }

.pane { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--bg); }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 14px; background: var(--panel); border-bottom: 1px solid var(--line); }
.crumbs { display: flex; align-items: center; gap: 2px; min-width: 0; flex: 1 1 260px; overflow-x: auto; scrollbar-width: none; }
.crumbs::-webkit-scrollbar { display: none; }
.crumbs button {
  border: 1px solid transparent; background: transparent; padding: 4px 7px; border-radius: 6px; cursor: pointer;
  font-weight: 600; white-space: nowrap; max-width: 240px; overflow: hidden; text-overflow: ellipsis;
}
.crumbs button:hover { background: var(--hover); }
.crumbs button.drop-target { border-color: var(--accent); background: var(--accent-weak); }
.crumbs .sep { color: var(--muted); }
.crumbs button:last-child { color: var(--text); }
.toolbar .search { position: relative; width: 210px; }
.toolbar .search input { padding-left: 32px; }
.toolbar .search .ic { position: absolute; left: 9px; top: 8px; color: var(--muted); }
.toolbar select.sort { width: auto; }
.tools { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.dropdown { position: relative; }
.dropdown .menu { top: 38px; left: 0; }

/* Die Auswahlleiste legt sich über die Werkzeugleiste – so verrutscht die Liste beim
   Auswählen nicht (sonst träfe der zweite Klick eines Doppelklicks die falsche Zeile). */
.toolbar { position: relative; }
.selbar {
  position: absolute; inset: 0; z-index: 4;
  display: flex; align-items: center; align-content: center; gap: 4px; flex-wrap: wrap; padding: 6px 14px;
  background: var(--selbar-bg); color: var(--selbar-text);
}
.selbar .count { font-weight: 700; margin-right: 8px; }
.selbar .btn { background: transparent; border-color: transparent; color: inherit; }
.selbar .btn:hover { background: var(--selbar-hover); }
.selbar .btn.danger { color: var(--selbar-danger); }
.selbar .iconbtn { color: inherit; }
.selbar .iconbtn:hover { background: var(--selbar-hover); }

.files { position: relative; flex: 1; overflow: auto; padding: 14px; outline: none; user-select: none; -webkit-user-select: none; }
.files.dropping { background: var(--sel); box-shadow: inset 0 0 0 2px var(--sel-line); }
.lasso { position: absolute; z-index: 5; border: 1px solid var(--sel-line); background: var(--sel); pointer-events: none; border-radius: 3px; }
.statusline { display: flex; gap: 14px; align-items: center; padding: 6px 14px; font-size: 12.5px; color: var(--muted); background: var(--panel); border-top: 1px solid var(--line); }
.statusline .grow { flex: 1; }
.tilesize { width: 110px; accent-color: var(--accent); }

.item { position: relative; cursor: default; }
.item .chk {
  position: absolute; z-index: 2; width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid var(--line2); background: var(--panel); display: grid; place-items: center; cursor: pointer;
  opacity: 0; transition: opacity .1s;
}
.item .chk .ic { width: 13px; height: 13px; stroke-width: 3; opacity: 0; }
.item:hover .chk, .files.selecting .item .chk, .item.sel .chk { opacity: 1; }
.item.sel .chk { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.item.sel .chk .ic { opacity: 1; }
@media (pointer: coarse) { .item .chk { opacity: .9; } }
.item.drop-target { outline: 2px solid var(--accent); outline-offset: -2px; background: var(--accent-weak) !important; }
.item.dragging { opacity: .45; }
.item.cut { opacity: .55; }
.insert-mark { position: absolute; z-index: 6; background: var(--accent); border-radius: 2px; pointer-events: none; }

.kind { display: inline-grid; place-items: center; border-radius: 7px; flex: none; color: #fff; }
.kind .ic { stroke-width: 2; }
.kind.folder { background: transparent; color: var(--k-folder); }
.kind.folder .ic { fill: color-mix(in srgb, var(--k-folder) 30%, transparent); }
.kind.image { background: var(--k-image); } .kind.picture { background: var(--k-image); }
.kind.video { background: var(--k-video); } .kind.audio { background: var(--k-audio); }
.kind.pdf { background: var(--k-pdf); } .kind.text { background: var(--k-text); }
.kind.archive { background: var(--k-archive); } .kind.doc { background: var(--k-doc); }
.kind.sheet { background: var(--k-sheet); } .kind.slides { background: var(--k-slides); }
.kind.binary { background: var(--k-binary); } .kind.file { background: var(--k-file); }

/* Vorschau (Kacheln) */
.v-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--tile), 1fr)); gap: 12px; align-content: start; }
.v-grid .item {
  display: flex; flex-direction: column; border-radius: 10px; background: var(--panel); border: 1px solid var(--line);
  overflow: hidden; transition: box-shadow .12s, border-color .12s;
}
.v-grid .item:hover { border-color: var(--line2); box-shadow: var(--shadow); }
.v-grid .item.sel { border-color: var(--sel-line); background: var(--sel); box-shadow: 0 0 0 1px var(--sel-line); }
.v-grid .thumb { position: relative; aspect-ratio: 1 / 1; display: grid; place-items: center; background: var(--panel2); overflow: hidden; }
.v-grid .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.v-grid .thumb .kind { width: 56px; height: 56px; border-radius: 12px; }
.v-grid .thumb .kind .ic { width: 28px; height: 28px; }
.v-grid .thumb .kind.folder { width: 84px; height: 84px; }
.v-grid .thumb .kind.folder .ic { width: 76px; height: 76px; stroke-width: 1.3; }
.v-grid .play { position: absolute; width: 40px; height: 40px; border-radius: 50%; background: rgba(0, 0, 0, .55); display: grid; place-items: center; color: #fff; }
.v-grid .play .ic { fill: #fff; stroke: none; margin-left: 3px; }
.v-grid .chk { left: 8px; top: 8px; }
.v-grid .cap { padding: 7px 10px 8px; min-width: 0; }
.v-grid .cap .n { font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v-grid .cap .m { font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v-grid .share-dot { position: absolute; right: 8px; top: 8px; z-index: 2; color: #fff; background: var(--accent); border-radius: 50%; width: 22px; height: 22px; display: grid; place-items: center; }
.v-grid .share-dot .ic { width: 13px; height: 13px; }

/* Liste (kompakt) */
.v-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 2px 10px; align-content: start; }
.v-list .item { display: flex; align-items: center; gap: 9px; height: 36px; padding: 0 8px 0 34px; border-radius: 7px; border: 1px solid transparent; min-width: 0; }
.v-list .item:hover { background: var(--hover); }
.v-list .item.sel { background: var(--sel); border-color: var(--sel-line); }
.v-list .kind { width: 24px; height: 24px; border-radius: 6px; }
.v-list .kind .ic { width: 14px; height: 14px; }
.v-list .kind.folder .ic { width: 22px; height: 22px; }
.v-list .n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.v-list .chk { left: 6px; top: 7px; width: 20px; height: 20px; }
.v-list .share-ic { color: var(--accent); }

/* Details (Tabelle) */
.v-details { display: flex; flex-direction: column; min-width: 560px; }
.v-details .hrow, .v-details .item { display: grid; grid-template-columns: minmax(200px, 1fr) 110px 150px 120px; align-items: center; gap: 10px; padding: 0 10px 0 38px; }
.v-details .hrow { position: sticky; top: -14px; z-index: 3; height: 34px; background: var(--bg); border-bottom: 1px solid var(--line); margin-top: -4px; }
.v-details .hrow button { border: 0; background: none; padding: 0; text-align: left; color: var(--muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; cursor: pointer; display: flex; align-items: center; gap: 4px; }
.v-details .hrow button.r, .v-details .item .r { justify-content: flex-end; text-align: right; }
.v-details .item { height: 40px; border-bottom: 1px solid var(--line); border-radius: 0; }
.v-details .item:hover { background: var(--hover); }
.v-details .item.sel { background: var(--sel); }
.v-details .item .c1 { display: flex; align-items: center; gap: 10px; min-width: 0; }
.v-details .item .c1 .n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v-details .item .c { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v-details .kind { width: 26px; height: 26px; border-radius: 6px; }
.v-details .kind .ic { width: 15px; height: 15px; }
.v-details .kind.folder .ic { width: 24px; height: 24px; }
.v-details .chk { left: 8px; top: 9px; width: 20px; height: 20px; }
.v-details .tiny { width: 26px; height: 26px; border-radius: 5px; object-fit: cover; flex: none; }

.file-empty { display: grid; place-items: center; height: 100%; min-height: 260px; color: var(--muted); text-align: center; }
.file-empty .ic { width: 52px; height: 52px; stroke-width: 1.2; opacity: .6; margin-bottom: 8px; }
.loading { display: grid; place-items: center; height: 200px; color: var(--muted); }

/* Ablegen von außen */
.dropzone-hint {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 70;
  background: var(--accent); color: var(--on-accent); padding: 10px 18px; border-radius: 99px; font-weight: 600;
  box-shadow: var(--shadow-lg); pointer-events: none; display: flex; align-items: center; gap: 8px;
}
.drag-ghost {
  position: fixed; top: -200px; left: -200px; z-index: -1;
  display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 8px;
  background: var(--accent); color: var(--on-accent); font-weight: 600; box-shadow: var(--shadow-lg);
}

/* ---------- Upload-Fenster ---------- */
.uploads {
  position: fixed; right: 18px; bottom: 18px; z-index: 50; width: 380px; max-width: calc(100vw - 24px);
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); overflow: hidden;
}
.uploads header { display: flex; align-items: center; gap: 8px; padding: 10px 10px 10px 14px; background: linear-gradient(90deg, var(--head-bg), var(--head-bg2)); color: var(--head-text); }
.uploads header .iconbtn { color: inherit; }
.uploads header .iconbtn:hover { background: var(--head-hover); }
.uploads header b { flex: 1; }
.uploads .sum { padding: 10px 14px; display: flex; flex-direction: column; gap: 6px; border-bottom: 1px solid var(--line); }
.uploads .sum .row { justify-content: space-between; font-size: 12.5px; color: var(--muted); }
.uploads ul { list-style: none; margin: 0; padding: 4px 0; max-height: 260px; overflow-y: auto; }
.uploads li { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; padding: 6px 14px; font-size: 13px; }
.uploads li .n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uploads li .bar { grid-column: 1 / -1; height: 4px; }
.uploads li .st { color: var(--muted); font-size: 12px; white-space: nowrap; }
.uploads li.done .st { color: var(--ok); }
.uploads li.err .st { color: var(--danger); }
.uploads.min ul, .uploads.min .sum .row:last-child { display: none; }

/* ---------- Dialoge ---------- */
.modal-back { position: fixed; inset: 0; z-index: 80; background: rgba(10, 14, 22, .45); display: grid; place-items: center; padding: 16px; animation: fade .12s; }
.modal {
  width: 100%; max-width: 480px; max-height: calc(100vh - 32px); display: flex; flex-direction: column;
  background: var(--panel); border-radius: 14px; box-shadow: var(--shadow-lg); border: 1px solid var(--line); animation: pop .14s;
}
.modal.wide { max-width: 720px; }
.modal.xwide { max-width: 920px; }
.modal > header { display: flex; align-items: center; gap: 10px; padding: 16px 18px 6px; }
.modal > header h3 { margin: 0; font-size: 17px; flex: 1; }
.modal > .content { padding: 8px 18px 6px; overflow-y: auto; }
.modal > footer { display: flex; gap: 8px; justify-content: flex-end; padding: 12px 18px 16px; flex-wrap: wrap; }
.modal > footer .left { margin-right: auto; }
.modal p { margin: 0 0 12px; }
.modal pre.text { margin: 0; white-space: pre-wrap; word-break: break-word; max-height: 70vh; overflow: auto; background: var(--panel2); padding: 12px; border-radius: 8px; font-size: 12.5px; }
.modal .err { color: var(--danger); font-size: 13px; min-height: 18px; margin-bottom: 4px; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { transform: translateY(6px) scale(.98); opacity: 0; } }

.strength { display: flex; gap: 4px; margin-top: 6px; }
.strength i { flex: 1; height: 4px; border-radius: 4px; background: var(--line); }
.strength.s1 i:nth-child(-n+1) { background: var(--danger); }
.strength.s2 i:nth-child(-n+2) { background: var(--warn); }
.strength.s3 i:nth-child(-n+3) { background: #b7c218; }
.strength.s4 i:nth-child(-n+4) { background: var(--ok); }

.picker { border: 1px solid var(--line); border-radius: 8px; max-height: 300px; overflow-y: auto; }
.picker .p-item { display: flex; align-items: center; gap: 8px; padding: 7px 10px; cursor: pointer; border-bottom: 1px solid var(--line); }
.picker .p-item:last-child { border-bottom: 0; }
.picker .p-item:hover { background: var(--hover); }
.picker .p-item.disabled { opacity: .45; cursor: default; }
.picker-path { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; font-size: 13px; }
.picker-path button { border: 0; background: none; color: var(--accent); cursor: pointer; padding: 2px 4px; border-radius: 5px; }
.picker-path button:hover { background: var(--hover); }

.linkbox { display: flex; gap: 6px; }
.linkbox input { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; }
.presets { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.presets button.on { background: var(--accent-weak); border-color: var(--accent); color: var(--accent); }
.sharelist { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.sharelist .sl { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; display: flex; flex-direction: column; gap: 6px; }

.permrow { display: grid; grid-template-columns: 1fr 160px 34px; gap: 8px; margin-bottom: 6px; }
.memberlist { columns: 2; column-gap: 14px; }
.memberlist label { margin-bottom: 6px; break-inside: avoid; }

.changelog h4 { margin: 14px 0 4px; display: flex; align-items: center; gap: 8px; }
.changelog h4:first-child { margin-top: 0; }
.changelog ul { margin: 0 0 8px; padding-left: 20px; }
.changelog li { margin: 3px 0; }
.changelog details summary { cursor: pointer; color: var(--muted); margin: 10px 0 4px; }
.changelog .new h4 { color: var(--accent); }

.modal .seg { margin-bottom: 12px; }
.steps { margin: 0 0 12px; padding-left: 20px; }
.steps li { margin-bottom: 8px; }
.codebox { display: flex; gap: 6px; align-items: center; margin: 6px 0; }
.codebox code { flex: 1; display: block; padding: 7px 10px; background: var(--panel2); border: 1px solid var(--line); border-radius: 7px; overflow-x: auto; white-space: nowrap; }

/* ---------- Galerie ---------- */
.gallery { position: fixed; inset: 0; z-index: 90; background: #000; color: #fff; display: flex; flex-direction: column; animation: fade .15s; }
.gallery .g-top {
  position: absolute; top: 0; left: 0; right: 0; z-index: 3; display: flex; align-items: center; gap: 6px; padding: 10px 12px;
  background: linear-gradient(rgba(0,0,0,.65), rgba(0,0,0,0)); transition: opacity .25s;
}
.gallery .g-top .t { flex: 1; min-width: 0; }
.gallery .g-top .t b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.gallery .g-top .t span { font-size: 12px; opacity: .75; }
.gallery .iconbtn { color: #fff; }
.gallery .iconbtn:hover { background: rgba(255,255,255,.14); }
.gallery .iconbtn.on { background: rgba(255,255,255,.22); }
.gallery select.g-speed {
  width: auto; height: 34px; padding: 0 6px; border: 0; border-radius: 8px; cursor: pointer;
  background: rgba(255, 255, 255, .12); color: #fff; font-size: 13px; font-weight: 600;
}
.gallery select.g-speed:hover { background: rgba(255, 255, 255, .2); }
.gallery select.g-speed option { color: #111; background: #fff; }
.gallery .stage { position: absolute; inset: 0; display: grid; place-items: center; overflow: hidden; touch-action: pan-y pinch-zoom; }
/* proportional auf Bildschirmgröße – auch kleine Bilder werden hochskaliert */
.gallery .stage img.fit, .gallery .stage video { width: 100vw; height: 100vh; height: 100dvh; object-fit: contain; display: block; user-select: none; -webkit-user-drag: none; }
.gallery .stage.actual { overflow: auto; place-items: start; touch-action: auto; }
.gallery .stage.actual img { width: auto; height: auto; max-width: none; max-height: none; object-fit: none; margin: auto; }
.gallery .stage audio { width: min(520px, 90vw); }
.gallery .stage .audio-card { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.gallery .stage .audio-card .kind { width: 96px; height: 96px; border-radius: 22px; }
.gallery .stage .audio-card .kind .ic { width: 48px; height: 48px; }
.gallery .nav { position: absolute; top: 50%; z-index: 3; transform: translateY(-50%); width: 52px; height: 72px; border: 0; border-radius: 10px; background: rgba(0,0,0,.25); color: #fff; cursor: pointer; display: grid; place-items: center; transition: opacity .25s, background .15s; }
.gallery .nav:hover { background: rgba(0,0,0,.55); }
.gallery .nav.prev { left: 10px; } .gallery .nav.next { right: 10px; }
.gallery .nav .ic { width: 30px; height: 30px; }
.gallery.idle .g-top, .gallery.idle .nav { opacity: 0; }
.gallery .spinner { position: absolute; width: 34px; height: 34px; border: 3px solid rgba(255,255,255,.25); border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.gallery .g-err { opacity: .8; }

/* ---------- Hinweise ---------- */
.toasts { position: fixed; left: 50%; top: 66px; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast {
  pointer-events: auto; display: flex; align-items: center; gap: 9px; padding: 9px 14px; border-radius: 10px;
  background: var(--text); color: var(--panel); box-shadow: var(--shadow-lg); max-width: min(560px, 92vw); animation: pop .15s;
}
.toast.err { background: var(--danger); color: #fff; }
.toast.ok .ic { color: var(--ok); }
.toast button { border: 0; background: none; color: inherit; text-decoration: underline; cursor: pointer; font-weight: 600; }

.ctx { position: fixed; z-index: 85; }

/* ---------- Anmeldung / Freigabe ---------- */
.center-page { min-height: 100%; display: grid; place-items: center; padding: 24px 16px 64px; }
body.colored { background: var(--login-bg); background-attachment: fixed; }
.corner-tools { position: fixed; top: 12px; right: 12px; z-index: 5; }
.corner-tools .iconbtn { color: #fff; background: rgba(255, 255, 255, .12); }
.corner-tools .iconbtn:hover { background: rgba(255, 255, 255, .22); }
.login-card { width: 100%; max-width: 380px; background: var(--panel); border: 1px solid var(--line); border-top: 4px solid var(--accent); border-radius: 16px; box-shadow: var(--shadow-lg); padding: 26px 26px 22px; }
.login-card .brand { justify-content: center; font-size: 18px; margin-bottom: 4px; color: var(--accent); }
.login-card .brand img { width: 34px; height: 34px; }
.login-card .sub { text-align: center; color: var(--muted); margin: 0 0 20px; }
.login-card .btn.primary { width: 100%; justify-content: center; height: 38px; margin-top: 6px; }
.login-card .foot { text-align: center; color: var(--muted); font-size: 12px; margin-top: 18px; }
.err-text { color: var(--danger); min-height: 20px; font-size: 13px; margin-bottom: 6px; }

.share-head { background: linear-gradient(90deg, var(--head-bg), var(--head-bg2)); color: var(--head-text); border-bottom: 1px solid var(--head-line); }
.share-head .btn.primary { background: var(--head-btn-bg); border-color: var(--head-btn-bg); color: var(--head-btn-text); font-weight: 600; }
.share-head .btn.primary:hover { filter: brightness(.95); }
.share-head .seg { background: transparent; border-color: rgba(255, 255, 255, .35); }
.share-head .seg button { color: var(--head-text); }
.share-head .seg button + button { border-left-color: rgba(255, 255, 255, .25); }
.share-head .seg button.on { background: var(--head-on); color: var(--head-text); }
.share-head .seg button:hover:not(.on) { background: var(--head-hover); }
.share-head .iconbtn { color: var(--head-text); }
.share-head .iconbtn:hover { background: var(--head-hover); }
.share-head .in { max-width: 1180px; margin: 0 auto; padding: 14px 18px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.share-head h1 { font-size: 18px; margin: 0; display: flex; align-items: center; gap: 10px; min-width: 0; }
.share-head h1 span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.share-head h1 .kind { width: 32px; height: 32px; border-radius: 8px; }
.share-head h1 .kind .ic { width: 18px; height: 18px; }
.share-head h1 .kind.folder .ic { width: 30px; height: 30px; }
.share-head .meta { color: var(--head-muted); font-size: 13px; }
.share-body { max-width: 1180px; margin: 0 auto; padding: 18px; }
.share-file { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 20px 0; }
.share-file img.preview, .share-file video { max-width: 100%; max-height: 70vh; border-radius: 10px; box-shadow: var(--shadow); cursor: zoom-in; }
.share-file .kind { width: 88px; height: 88px; border-radius: 20px; }
.share-file .kind .ic { width: 44px; height: 44px; }
.center { text-align: center; }
.share-files { padding: 14px 0; overflow: visible; }
.share-note { background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 8px; padding: 10px 14px; margin-bottom: 16px; white-space: pre-wrap; }

/* ---------- Schmale Bildschirme ---------- */
@media (max-width: 860px) {
  footer.foot { white-space: normal; text-align: center; }
  footer.foot.on-color { position: static; }
  .top { gap: 8px; padding: 0 10px; }
  .top .brand span { display: none; }
  .tabs button { padding: 0 9px; }
  .tabs button .lbl { display: none; }
  .account .btn .lbl { display: none; }
  .fm { grid-template-columns: 1fr; grid-template-rows: auto 1fr; height: calc(100vh - 56px - 40px); height: calc(100dvh - 56px - 40px); }
  .sidebar { border-right: 0; border-bottom: 1px solid var(--line); display: flex; gap: 6px; overflow-x: auto; padding: 8px; }
  .sidebar h4 { display: none; }
  .space { width: auto; min-width: 150px; flex: none; margin: 0; }
  .toolbar { padding: 8px 10px; }
  .toolbar .search { width: 100%; order: 10; }
  .tools .lbl { display: none; }
  .files { padding: 10px; }
  :root { --tile: 120px; }
  .cols2 { grid-template-columns: 1fr; }
  .memberlist { columns: 1; }
  .page { padding: 16px 10px 30px; }
  .hide-sm { display: none !important; }
  .v-details { min-width: 0; }
  .v-details .hrow, .v-details .item { grid-template-columns: 1fr 90px; }
  .v-details .c.date, .v-details .c.type, .v-details .hrow .date, .v-details .hrow .type { display: none; }
  .statusline .tilesize { display: none; }
  .permrow { grid-template-columns: 1fr 120px 34px; }
}

/* ---------- Tastenkürzel ---------- */
.keys { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; align-items: center; margin: 0; }
.keys dt { white-space: nowrap; }
.keys dd { margin: 0; color: var(--muted); }
kbd { display: inline-block; min-width: 22px; padding: 1px 6px; border: 1px solid var(--line2); border-bottom-width: 2px; border-radius: 5px; background: var(--panel2); font: 600 12px/1.5 ui-monospace, Menlo, Consolas, monospace; text-align: center; }

/* mehr Inhalte gleich laden */
.more-sentinel { height: 1px; grid-column: 1 / -1; }

/* Wer Bewegung reduziert haben möchte, bekommt keine Animationen */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ---------- Anleitung ---------- */
.guide-page { height: auto; }
.guide-title { font-weight: 600; color: var(--head-muted); padding-left: 14px; border-left: 1px solid var(--head-hover); }
.top .btn.on-head { color: var(--head-text); }
.top .btn.on-head:hover { background: var(--head-hover); }
.guide { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 28px; max-width: 1120px; margin: 0 auto; padding: 24px 18px 40px; }
.guide-nav { position: sticky; top: 76px; align-self: start; max-height: calc(100vh - 96px); overflow-y: auto; }
.guide-search { position: relative; margin-bottom: 12px; }
.guide-search input { padding-left: 32px; width: 100%; }
.guide-search .ic { position: absolute; left: 9px; top: 8px; color: var(--muted); }
.guide-nav ol { list-style: none; margin: 0; padding: 0; counter-reset: g; }
.guide-nav li a {
  display: flex; gap: 8px; padding: 6px 10px; border-radius: 8px; color: var(--text); font-weight: 500;
  border-left: 3px solid transparent;
}
.guide-nav li a::before { counter-increment: g; content: counter(g); min-width: 18px; color: var(--muted); font-variant-numeric: tabular-nums; }
.guide-nav li a:hover { background: var(--hover); text-decoration: none; }
.guide-nav li a.on { background: var(--accent-weak); color: var(--accent); border-left-color: var(--accent); }
.guide-nav li[hidden] { display: none; }
.guide-main { min-width: 0; }
.guide-main section {
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow);
  padding: 22px 26px; margin-bottom: 18px; scroll-margin-top: 72px; line-height: 1.6;
}
.guide-main section.guide-hero {
  background: linear-gradient(135deg, var(--head-bg), var(--head-bg2)); color: var(--head-text); border-color: var(--head-line);
}
.guide-hero h1 { margin: 0 0 8px; font-size: 26px; line-height: 1.25; }
.guide-hero p { margin: 0 0 18px; color: var(--head-muted); max-width: 640px; font-size: 15px; }
.guide-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.guide-tiles a {
  display: flex; align-items: center; gap: 9px; padding: 11px 13px; border-radius: 10px;
  background: var(--head-hover); color: var(--head-text); font-weight: 600; border: 1px solid var(--head-on);
}
.guide-tiles a:hover { background: var(--head-on); text-decoration: none; }
.guide-main h2 { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; font-size: 20px; color: var(--accent); }
.guide-main h2 .ic { width: 24px; height: 24px; padding: 6px; box-sizing: content-box; border-radius: 9px; background: var(--accent-weak); }
.guide-main h3 { margin: 20px 0 6px; font-size: 15.5px; }
.guide-main p { margin: 0 0 10px; }
.guide-main ol, .guide-main ul { margin: 0 0 10px; padding-left: 22px; }
.guide-main li { margin: 3px 0; }
.guide-main li .ic { width: 16px; height: 16px; color: var(--accent); vertical-align: -3px; }
.guide-main .muted { color: var(--muted); }
.guide-main code { background: var(--panel2); border: 1px solid var(--line); border-radius: 5px; padding: 0 5px; word-break: break-all; }
.guide-main pre.code { background: var(--panel2); border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; overflow-x: auto; margin: 0 0 10px; }
.guide-main .tip {
  display: flex; gap: 10px; align-items: flex-start; margin: 12px 0; padding: 10px 14px; border-radius: 10px;
  background: var(--accent-weak); border-left: 3px solid var(--accent);
}
.guide-main .tip > .ic { color: var(--accent); margin-top: 3px; }
.guide-main .tip.warn { background: var(--warn-weak); border-left-color: var(--warn); }
.guide-main .tip.warn > .ic { color: var(--warn); }
.guide-main .keys { margin-top: 4px; }
.guide-main details { border: 1px solid var(--line); border-radius: 10px; margin: 8px 0; background: var(--panel); }
.guide-main details summary { cursor: pointer; padding: 10px 14px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 10px; }
.guide-main details summary::-webkit-details-marker { display: none; }
.guide-main details summary::after { content: "+"; color: var(--accent); font-weight: 700; font-size: 17px; line-height: 1; }
.guide-main details[open] summary::after { content: "–"; }
.guide-main details[open] summary { border-bottom: 1px solid var(--line); }
.guide-main details p { padding: 10px 14px 4px; }
.guide-main mark { background: #ffe58a; color: #14202d; border-radius: 3px; padding: 0 1px; }
.guide-none { text-align: center; color: var(--muted); padding: 30px 0; }
.guide-page footer.foot { border-top: 1px solid var(--line); background: var(--panel); }
.guide-page footer.foot .foot-app a { font-weight: 600; }
@media (max-width: 860px) {
  .guide { grid-template-columns: 1fr; gap: 12px; padding: 12px 10px 30px; }
  .guide-nav { position: static; max-height: none; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px; }
  .guide-nav ol { display: none; }
  .guide-nav.open ol { display: block; }
  .guide-main section { padding: 16px; scroll-margin-top: 66px; }
  .guide-hero h1 { font-size: 21px; }
  .guide-title { display: none; }
  .top .btn.on-head .lbl { display: none; }
  .guide-toggle { display: flex !important; }
}
.guide-toggle { display: none; width: 100%; justify-content: space-between; align-items: center; border: 0; background: none; padding: 8px 4px 2px; font-weight: 600; cursor: pointer; color: var(--text); }
@media print {
  .top, .guide-nav, footer.foot { display: none; }
  .guide { display: block; padding: 0; }
  .guide-main section { box-shadow: none; break-inside: avoid-page; }
  .guide-main details { break-inside: avoid; }
  .guide-main details > *:not(summary) { display: block; }
}

/* ---------- Externe Speicher (Administrator) ---------- */
.remote-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.remote-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel2); }
.remote-row > .ic { color: var(--accent); }
.remote-row .grow { min-width: 0; }
.remote-row .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.store-seg { flex-wrap: wrap; }
.store-seg button { display: inline-flex; align-items: center; gap: 7px; }
[data-remote] .remote-form { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-bottom: 12px; background: var(--panel2); }

/* Netzlaufwerk: Fehlersuche */
details.trouble { border: 1px solid var(--line); border-radius: 9px; margin: 10px 0; padding: 0 12px; background: var(--panel2); }
details.trouble > summary { cursor: pointer; padding: 9px 0; font-weight: 600; display: flex; align-items: center; gap: 6px; }
details.trouble[open] > summary { border-bottom: 1px solid var(--line); margin-bottom: 8px; }
details.trouble ul { padding-left: 18px; }
details.small-details { margin-top: 6px; }
details.small-details > summary { cursor: pointer; color: var(--accent); }
code.fp { word-break: break-all; white-space: normal; }
ul.alts { margin: 6px 0; padding-left: 18px; }
ul.alts .codebox { margin: 2px 0 6px; }
.usage-line { margin-top: 4px; }
.usage-line .bar { margin: 3px 0; max-width: 260px; }
.space .meta.usage { margin-top: 0; }

/* Speicherübersicht */
.linkbtn { border: 0; background: none; padding: 0 0 0 5px; color: var(--muted); cursor: pointer; font: inherit; }
.linkbtn:not(:disabled):hover { color: var(--accent); text-decoration: underline; }
.linkbtn:disabled { cursor: default; }
.item.is-hidden { opacity: .55; }
.storage h4 { margin: 16px 0 6px; }
.st-total { font-size: 15px; margin-bottom: 10px; }
.st-list { display: flex; flex-direction: column; gap: 2px; }
.st-row { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto 120px; gap: 4px 10px; align-items: center; text-align: left;
  border: 0; background: none; padding: 6px 8px; border-radius: 7px; cursor: pointer; color: var(--text); font: inherit; }
.st-row:hover { background: var(--hover); }
.st-row .ic { color: var(--muted); }
.st-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-size { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 600; }
.st-bar { height: 6px; border-radius: 9px; background: var(--panel2); border: 1px solid var(--line); overflow: hidden; }
.st-bar > i { display: block; height: 100%; background: var(--accent); width: 0; }
.st-files { grid-column: 2 / 4; font-size: 12px; margin-top: -4px; }
.st-partial .row { margin-top: 8px; }
@media (max-width: 860px) { .st-row { grid-template-columns: 18px minmax(0, 1fr) auto; } .st-bar { display: none; } }
