/* iGRANEX Publishing – Designsprache „iGRANEX Industrial“ (Stand 28.11.2026)
   Marine #0B1F5C (Navigation), Blau #1450C8 (Handlung), Stahlgrau; Radien 2/4/6 px; keine Verläufe. */
:root {
  color-scheme: light dark;
  --font: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --nav: #0B1F5C; --nav-ink: #E8EDF7; --nav-quiet: #9FB0D4; --nav-active: #1C3478;
  --bg: #F3F5F8; --surface: #FFFFFF; --surface-2: #F7F8FA; --line: #D5DAE2; --line-strong: #A9B2C0;
  --ink: #141A23; --ink-2: #3E4757; --ink-3: #5E6878;
  --acc: #1450C8; --acc-ink: #FFFFFF; --acc-soft: #E6EEFB;
  --ok: #17723E; --ok-soft: #E4F3EA; --warn: #8A5A00; --warn-soft: #FFF3D6; --bad: #B42318; --bad-soft: #FDE8E6; --bad-ink: #FFFFFF;
  --prot: #6B3FA0; --prot-soft: #F0EAF8;
  --r1: 2px; --r2: 4px; --r3: 6px;
  --t: 120ms;
}
:root[data-theme="dark"] {
  --nav: #0A1128; --nav-ink: #E2E8F3; --nav-quiet: #8C9BB8; --nav-active: #18264D;
  --bg: #0B0F15; --surface: #121821; --surface-2: #171E29; --line: #263042; --line-strong: #3A465B;
  --ink: #E6EBF2; --ink-2: #BAC3D1; --ink-3: #8E99AB;
  --acc: #5B9BFF; --acc-ink: #07101F; --acc-soft: #16274A;
  --ok: #4CC38A; --ok-soft: #10291E; --warn: #F0B952; --warn-soft: #2C2210; --bad: #FF7B6E; --bad-soft: #341513; --bad-ink: #2A0B08;
  --prot: #B898F0; --prot-soft: #231A36;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --nav: #0A1128; --nav-ink: #E2E8F3; --nav-quiet: #8C9BB8; --nav-active: #18264D;
    --bg: #0B0F15; --surface: #121821; --surface-2: #171E29; --line: #263042; --line-strong: #3A465B;
    --ink: #E6EBF2; --ink-2: #BAC3D1; --ink-3: #8E99AB;
    --acc: #5B9BFF; --acc-ink: #07101F; --acc-soft: #16274A;
    --ok: #4CC38A; --ok-soft: #10291E; --warn: #F0B952; --warn-soft: #2C2210; --bad: #FF7B6E; --bad-soft: #341513; --bad-ink: #2A0B08;
    --prot: #B898F0; --prot-soft: #231A36;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font: 14px/1.45 var(--font); color: var(--ink); background: var(--bg); font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--acc); }
.hidden { display: none !important; }
.mono { font-family: var(--mono); font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.muted { color: var(--ink-3); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Grundgerüst ---------- */
.app { display: grid; grid-template-columns: 220px 1fr; height: 100vh; }
.nav { background: var(--nav); color: var(--nav-ink); display: flex; flex-direction: column; min-height: 0; min-width: 0; overflow: hidden; }
.brand { display: flex; align-items: center; gap: 10px; padding: 16px 16px 14px; border-bottom: 1px solid #ffffff1a; }
.brand__mark { width: 28px; height: 28px; border-radius: var(--r2); background: #fff; color: #0B1F5C; display: grid;
  place-items: center; font-weight: 700; font-size: 15px; flex: none; }
.brand__name { font-weight: 600; font-size: 14px; line-height: 1.15; }
.brand__name small { display: block; font-weight: 400; color: var(--nav-quiet); font-size: 12px; }
.nav__list { list-style: none; margin: 8px 0; padding: 0 8px; display: flex; flex-direction: column; gap: 2px; }
.nav__item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; background: none;
  color: var(--nav-ink); border-radius: var(--r2); cursor: pointer; text-align: left; font-weight: 500; transition: background var(--t); }
.nav__item svg { width: 18px; height: 18px; flex: none; opacity: .9; }
.nav__item:hover { background: #ffffff12; }
.nav__item[aria-current="page"] { background: var(--nav-active); box-shadow: inset 3px 0 0 #5B9BFF; }
.nav__count { margin-left: auto; font-size: 12px; color: var(--nav-quiet); }
.nav__foot { margin-top: auto; padding: 14px 16px; border-top: 1px solid #ffffff1a; display: grid; gap: 10px; }
.quota__bar { height: 6px; background: #ffffff22; border-radius: var(--r1); overflow: hidden; }
.quota__fill { height: 100%; background: #5B9BFF; width: 0; }
.quota__fill.warn { background: #F0B952; }
.quota__text { font-size: 12px; color: var(--nav-quiet); }
.nav__row { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.nav__btn { min-width: 0; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 30px;
  border: 1px solid #ffffff2e; background: none; color: var(--nav-ink); border-radius: var(--r2); cursor: pointer; font-size: 12.5px; }
.nav__btn:hover { background: #ffffff12; }
.nav__btn svg { width: 15px; height: 15px; }

.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.bar { display: flex; align-items: center; gap: 10px; padding: 10px 20px; background: var(--surface);
  border-bottom: 1px solid var(--line); min-height: 56px; }
.bar__title { font-size: 17px; font-weight: 600; margin: 0; white-space: nowrap; }
.bar__spacer { flex: 1; }
.crumbs { display: flex; align-items: center; gap: 2px; min-width: 0; overflow: hidden; }
.crumbs button { border: 0; background: none; padding: 4px 6px; border-radius: var(--r1); cursor: pointer; font-size: 16px;
  font-weight: 600; color: var(--ink-2); white-space: nowrap; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.crumbs button:last-child { color: var(--ink); }
.crumbs button:hover { background: var(--surface-2); }
.crumbs .sep { color: var(--ink-3); }
.content { display: flex; flex: 1; min-height: 0; }
.pane { flex: 1; min-width: 0; overflow: auto; padding: 16px 20px 24px; position: relative; }

/* ---------- Bedienelemente ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 34px; padding: 0 12px;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); border-radius: var(--r2);
  cursor: pointer; font-weight: 500; white-space: nowrap; transition: background var(--t), border-color var(--t); }
.btn:hover { background: var(--surface-2); border-color: var(--ink-3); }
.btn:focus-visible, .nav__item:focus-visible, input:focus-visible, select:focus-visible, .row:focus-visible, .tile:focus-visible {
  outline: 2px solid var(--acc); outline-offset: 1px; }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn--primary { background: var(--acc); border-color: var(--acc); color: var(--acc-ink); }
.btn--primary:hover { background: var(--acc); filter: brightness(1.08); border-color: var(--acc); }
.btn--danger { color: var(--bad); border-color: var(--bad); }
.btn--danger:hover { background: var(--bad-soft); border-color: var(--bad); }
.btn--danger-solid { background: var(--bad); border-color: var(--bad); color: var(--bad-ink); }
.btn--danger-solid:hover { background: var(--bad); filter: brightness(1.08); border-color: var(--bad); }
.btn--sm { height: 28px; padding: 0 9px; font-size: 13px; }
.btn--icon { width: 34px; padding: 0; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--r2); overflow: hidden; }
.seg button { border: 0; background: var(--surface); height: 32px; width: 36px; cursor: pointer; display: grid; place-items: center; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button[aria-pressed="true"] { background: var(--acc-soft); color: var(--acc); }
.seg svg { width: 16px; height: 16px; }
.field { display: grid; gap: 4px; }
.field > span { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.input { height: 36px; padding: 0 10px; border: 1px solid var(--line-strong); background: var(--surface); border-radius: var(--r2);
  width: 100%; min-width: 0; }
.input--code { font-family: var(--mono); font-size: 20px; letter-spacing: .25em; text-align: center; height: 44px; font-weight: 600; }
.search { position: relative; width: 260px; }
.search svg { position: absolute; left: 9px; top: 9px; width: 16px; height: 16px; color: var(--ink-3); }
.search .input { padding-left: 32px; height: 34px; }
.bar select.input { width: auto; height: 34px; }
.check { display: flex; gap: 8px; align-items: flex-start; cursor: pointer; }
.check input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--acc); }

/* ---------- Marken ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: var(--r1);
  font-size: 12px; font-weight: 600; white-space: nowrap; border: 1px solid transparent; }
.badge svg { width: 13px; height: 13px; }
.badge--private { background: var(--surface-2); color: var(--ink-2); border-color: var(--line); }
.badge--protected { background: var(--prot-soft); color: var(--prot); }
.badge--public { background: var(--ok-soft); color: var(--ok); }
.badge--warn { background: var(--warn-soft); color: var(--warn); }
.badge--bad { background: var(--bad-soft); color: var(--bad); }

/* ---------- Karten / Bereiche ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r2); margin-bottom: 16px; }
.card__head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.card__title { margin: 0; font-size: 14.5px; font-weight: 600; padding-left: 10px; border-left: 3px solid var(--acc); }
.card__body { padding: 14px 16px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 16px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--acc); border-radius: var(--r2); padding: 10px 12px; }
.kpi__label { font-size: 12.5px; color: var(--ink-2); font-weight: 500; white-space: nowrap; }
.kpi__value { font-size: 19px; font-weight: 600; white-space: nowrap; }

/* ---------- Dateiliste ---------- */
.table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r2); }
.table th { text-align: left; font-size: 12.5px; font-weight: 600; color: var(--ink-2); background: var(--surface-2);
  padding: 8px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 0 12px; height: 44px; border-bottom: 1px solid var(--line); white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; max-width: 0; }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; }
.row { cursor: pointer; transition: background var(--t); }
.row:hover { background: var(--surface-2); }
.row[aria-selected="true"] { background: var(--acc-soft); }
.namecell { display: flex; align-items: center; gap: 10px; min-width: 0; }
.namecell span { overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.ficon { width: 28px; height: 28px; border-radius: var(--r2); display: grid; place-items: center; flex: none; }
.ficon svg { width: 17px; height: 17px; }
.ficon--folder { color: #B7791F; background: #FBF1DE; }
.ficon--html { color: var(--acc); background: var(--acc-soft); }
.ficon--image { color: #0F7B6C; background: #E0F2EF; }
.ficon--video { color: #9B2C6F; background: #F8E6F0; }
.ficon--pdf { color: #B42318; background: #FDE8E6; }
.ficon--other { color: var(--ink-2); background: var(--surface-2); }
:root[data-theme="dark"] .ficon--folder { background: #2E2412; } :root[data-theme="dark"] .ficon--image { background: #0F2A26; }
:root[data-theme="dark"] .ficon--video { background: #2C1424; } :root[data-theme="dark"] .ficon--pdf { background: #341513; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 12px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r2); cursor: pointer; overflow: hidden;
  display: flex; flex-direction: column; transition: border-color var(--t); }
.tile:hover { border-color: var(--line-strong); }
.tile[aria-selected="true"] { border-color: var(--acc); box-shadow: inset 0 0 0 1px var(--acc); }
.tile__thumb { aspect-ratio: 4 / 3; background: var(--surface-2); display: grid; place-items: center; border-bottom: 1px solid var(--line); overflow: hidden; }
.tile__thumb img { width: 100%; height: 100%; object-fit: cover; }
.tile__thumb .ficon { width: 52px; height: 52px; }
.tile__thumb .ficon svg { width: 28px; height: 28px; }
.tile__meta { padding: 8px 10px; display: grid; gap: 4px; }
.tile__name { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile__sub { display: flex; justify-content: space-between; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-3); min-width: 0; }
.tile__sub > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pager { display: flex; justify-content: flex-end; align-items: center; gap: 8px; margin-top: 10px; color: var(--ink-2); font-size: 13px; }

.empty { text-align: center; padding: 56px 20px; border: 1px dashed var(--line-strong); border-radius: var(--r2); background: var(--surface); }
.empty h2 { font-size: 16px; margin: 0 0 6px; }
.empty p { margin: 0 0 14px; color: var(--ink-2); }
.empty .btns { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }

.drop { position: absolute; inset: 8px; border: 2px dashed var(--acc); background: color-mix(in srgb, var(--acc-soft) 88%, transparent);
  border-radius: var(--r3); display: grid; place-items: center; z-index: 5; pointer-events: none; }
.drop strong { font-size: 18px; color: var(--acc); }

/* ---------- Detailspalte ---------- */
.detail { width: 360px; flex: none; border-left: 1px solid var(--line); background: var(--surface); overflow: auto; }
.detail__head { display: flex; align-items: flex-start; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.detail__name { font-size: 15px; font-weight: 600; margin: 0; word-break: break-word; flex: 1; }
.detail__sec { padding: 14px 16px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.detail__sec h3 { margin: 0; font-size: 12.5px; text-transform: none; color: var(--ink-2); font-weight: 600; display: flex; align-items: center; gap: 8px; }
.detail__sec h3::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--acc); }
.props { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0; font-size: 13px; }
.props dt { color: var(--ink-3); }
.props dd { margin: 0; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.btnrow { display: flex; flex-wrap: wrap; gap: 6px; }
.btnrow .btn { flex: 1 1 auto; }
.status { border: 1px solid var(--line); border-radius: var(--r2); padding: 10px 12px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.status--protected { border-color: var(--prot); background: var(--prot-soft); }
.status--public { border-color: var(--ok); background: var(--ok-soft); }
.status__line { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.status__line svg { width: 16px; height: 16px; }
.status p { margin: 0; font-size: 13px; color: var(--ink-2); }
.linkbox { display: flex; gap: 6px; }
.linkbox .input { font-family: var(--mono); font-size: 12px; height: 32px; }
.note { font-size: 12.5px; padding: 8px 10px; border-radius: var(--r2); background: var(--warn-soft); color: var(--warn); }
.list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
.li { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 6px 8px; border: 1px solid var(--line); border-radius: var(--r2); }
.li__main { flex: 1; min-width: 0; }
.li__title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.li__sub { color: var(--ink-3); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Fenster ---------- */
.modal { position: fixed; inset: 0; background: #0B0F15a6; display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal__box { background: var(--surface); border-radius: var(--r3); width: min(520px, 100%); max-height: calc(100vh - 32px); overflow: auto;
  box-shadow: 0 16px 48px #0006; border: 1px solid var(--line); }
.modal__box--wide { width: min(1100px, 100%); height: calc(100vh - 32px); display: flex; flex-direction: column; }
.modal__head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.modal__head h2 { margin: 0; font-size: 16px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.modal__body { padding: 16px 18px; display: grid; gap: 14px; }
.modal__foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--line); }
.modal__frame { flex: 1; border: 0; width: 100%; background: #fff; }
.levels { display: grid; gap: 8px; }
.level { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line-strong); border-radius: var(--r2); padding: 10px 12px; cursor: pointer; }
.level input { margin-top: 3px; accent-color: var(--acc); }
.level strong { display: block; }
.level span { font-size: 13px; color: var(--ink-2); }
.level:has(input:checked) { border-color: var(--acc); background: var(--acc-soft); }
.warnbox { border: 1px solid var(--warn); background: var(--warn-soft); color: var(--ink); border-radius: var(--r2); padding: 10px 12px; font-size: 13px; }
.err { color: var(--bad); font-size: 13px; font-weight: 500; }
.codes { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; font-family: var(--mono); font-size: 14px; }
.codes span { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r1); padding: 5px 8px; text-align: center; }
.qr { background: #fff; padding: 8px; border-radius: var(--r2); width: 200px; height: 200px; margin: 0 auto; }
.qr svg { width: 100%; height: 100%; display: block; }

/* ---------- Uploads ---------- */
.uploads { position: fixed; right: 16px; bottom: 16px; width: 340px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r3); box-shadow: 0 12px 32px #0003; z-index: 40; max-height: 50vh; display: flex; flex-direction: column; }
.uploads__head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); font-weight: 600; }
.uploads__list { overflow: auto; padding: 8px 12px; display: grid; gap: 8px; }
.up { display: grid; gap: 4px; font-size: 13px; }
.up__row { display: flex; gap: 8px; justify-content: space-between; }
.up__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up__bar { height: 4px; background: var(--surface-2); border-radius: var(--r1); overflow: hidden; }
.up__fill { height: 100%; background: var(--acc); width: 0; }
.up--done .up__fill { background: var(--ok); }
.up--err .up__fill { background: var(--bad); }
.up__err { color: var(--bad); font-size: 12px; white-space: normal; }

.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--ink); color: var(--surface);
  padding: 9px 16px; border-radius: var(--r2); z-index: 60; font-weight: 500; max-width: 90vw; }
.toast--bad { background: var(--bad); color: #fff; }

/* ---------- Anmeldung ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(320px, 440px) 1fr; }
.auth__side { background: var(--nav); color: var(--nav-ink); padding: 40px; display: flex; flex-direction: column; justify-content: space-between; }
.auth__side h1 { font-size: 26px; margin: 22px 0 10px; font-weight: 600; }
.auth__side p { color: var(--nav-quiet); margin: 0; max-width: 32ch; }
.auth__levels { display: grid; gap: 10px; font-size: 13px; color: var(--nav-ink); }
.auth__levels div { display: flex; gap: 10px; align-items: center; }
.auth__levels svg { width: 16px; height: 16px; color: #5B9BFF; flex: none; }
.auth__main { display: grid; place-items: center; padding: 24px; }
.auth__form { width: min(380px, 100%); display: grid; gap: 14px; }
.auth__form h2 { margin: 0 0 4px; font-size: 20px; }
.auth__form .btn { height: 40px; }
.steps { display: flex; gap: 6px; font-size: 12px; color: var(--ink-3); }
.steps span { flex: 1; border-top: 3px solid var(--line); padding-top: 4px; }
.steps span.on { border-color: var(--acc); color: var(--ink); font-weight: 600; }

/* ---------- Protokoll / Tabellen-Seiten ---------- */
.toolbar { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.toolbar .input, .toolbar select { width: auto; height: 34px; }
.tag { font-family: var(--mono); font-size: 12px; color: var(--ink-2); }
.storage-bars { display: grid; gap: 10px; }
.sbar { display: grid; grid-template-columns: 140px 1fr 90px; gap: 10px; align-items: center; font-size: 13px; }
.sbar__track { height: 10px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r1); overflow: hidden; }
.sbar__fill { height: 100%; background: var(--acc); }
.sbar .num { text-align: right; font-weight: 600; }
.setlist { display: grid; }
.setrow { display: grid; grid-template-columns: 220px 1fr auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.setrow:last-child { border-bottom: 0; }
.setrow b { font-weight: 600; }

/* ---------- Tablet / Handy ---------- */
.tabbar { display: none; }
.only-mobile { display: none; }
@media (max-width: 1180px) {
  .detail { position: fixed; right: 0; top: 0; bottom: 0; z-index: 30; box-shadow: -12px 0 32px #0003; width: min(380px, 100vw); }
  .only-narrow { display: inline-flex; }
}
@media (min-width: 1181px) { .only-narrow { display: none; } }
@media (max-width: 900px) {
  .app { grid-template-columns: 64px 1fr; }
  .brand__name, .nav__item span, .nav__count, .quota__text { display: none; }
  .brand { justify-content: center; padding: 14px 0; }
  .nav__item { justify-content: center; padding: 10px 0; }
  .nav__foot { padding: 10px 8px; }
  .nav__row { flex-direction: column; }
  .nav__btn span { display: none; }
  .search { width: 200px; }
  .col-opt { display: none; }
}
@media (max-width: 640px) {
  .app { grid-template-columns: 1fr; height: auto; min-height: 100vh; padding-bottom: 62px; }
  .nav { display: none; }
  .tabbar { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(62px, 1fr); overflow-x: auto; scrollbar-width: none; position: fixed; left: 0; right: 0; bottom: 0; height: 60px;
    background: var(--nav); z-index: 20; }
  .tabbar button { border: 0; background: none; color: var(--nav-quiet); display: grid; justify-items: center; align-content: center;
    gap: 2px; font-size: 10.5px; cursor: pointer; padding: 0; min-width: 0; }
  .tabbar button svg { width: 20px; height: 20px; }
  .tabbar button[aria-current="page"] { color: #fff; box-shadow: inset 0 3px 0 #5B9BFF; }
  .bar { flex-wrap: wrap; padding: 10px 12px; gap: 8px; }
  .bar__title { font-size: 16px; }
  .search { order: 5; width: 100%; }
  .pane { padding: 12px; overflow: visible; }
  .btn .lbl-opt { display: none; }
  .col-opt2 { display: none; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .detail { width: 100vw; }
  .uploads { left: 8px; right: 8px; width: auto; bottom: 70px; }
  .auth { grid-template-columns: 1fr; }
  .auth__side { padding: 22px; }
  .auth__side h1 { font-size: 20px; margin: 12px 0 6px; }
  .auth__levels { display: none; }
  .sbar { grid-template-columns: 96px 1fr 72px; }
  .setrow { grid-template-columns: 1fr auto; }
  .setrow > :nth-child(2) { grid-column: 1 / -1; grid-row: 2; }
  .only-mobile { display: inline-flex; }
  .modal { padding: 0; }
  .modal__box { width: 100%; max-height: 100vh; border-radius: 0; }
  .modal__box--wide { height: 100vh; }
}

.preview-wrap { flex: 1; display: grid; place-items: center; background: var(--surface-2); min-height: 0; overflow: auto; padding: 12px; }
.preview-media { max-width: 100%; max-height: calc(100vh - 160px); object-fit: contain; }
.preview-wrap .modal__frame { width: 100%; height: calc(100vh - 160px); }

/* Übersicht */
.places { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.place { border: 1px solid var(--line); border-radius: var(--r2); padding: 12px; background: var(--surface-2); min-width: 0; }
.place__head { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-2); font-weight: 600; }
.place__head svg { width: 16px; height: 16px; color: var(--acc); }
.place__value { margin: 6px 0 4px; font-weight: 600; overflow-wrap: anywhere; }
.place__text { margin: 0; font-size: 12.5px; color: var(--ink-2); line-height: 1.45; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: var(--r1); background: var(--surface); color: var(--ink); font: inherit; font-size: 13px; cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--acc); border-color: var(--acc); color: #fff; }
.chip__n { font-size: 12px; opacity: .8; }
.ov-name { display: flex; flex-direction: column; min-width: 0; }
.ov-name span, .ov-name small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ov-name small { font-size: 12px; }
.ov-url { display: flex; align-items: center; gap: 4px; min-width: 0; }
.ov-url .mono { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ov-actions { display: inline-flex; gap: 6px; justify-content: flex-end; }
.ov-table td { vertical-align: middle; }
.recent { list-style: none; margin: 0; padding: 0; }
.recent li { display: grid; grid-template-columns: 150px 1fr; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.recent li:last-child { border-bottom: 0; }
.filelist .table td.mono { word-break: break-all; }
.filelist .badge { margin-left: 8px; }
.card__head .input[type=search] { max-width: 220px; height: 32px; }
@media (max-width: 700px) { .ov-actions .btn span { display: none; } .recent li { grid-template-columns: 1fr; gap: 2px; } }

/* Server */
.infobox { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; margin-bottom: 16px; border: 1px solid var(--line); border-left: 3px solid var(--acc); border-radius: var(--r2); background: var(--surface); font-size: 13px; color: var(--ink-2); }
.infobox svg { width: 16px; height: 16px; flex: none; margin-top: 2px; color: var(--acc); }
.ablage { display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center; }
.ablage p { margin: 0; font-size: 13px; color: var(--ink-2); }
.subhead { font-size: 13px; margin: 14px 0 4px; color: var(--ink-2); font-weight: 600; }
.sbar__label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sbar__fill.warn { background: var(--warn); }
.tablewrap { overflow-x: auto; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.grid2 .card { margin-bottom: 16px; }
.svc { list-style: none; margin: 0; padding: 0; }
.svc li { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto auto; gap: 8px; align-items: center; padding: 5px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.svc li:last-child { border-bottom: 0; }
.svc__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); }
.svc__dot--ok { background: var(--ok); } .svc__dot--bad { background: var(--bad); } .svc__dot--warn { background: var(--warn); }
.svc__state { font-size: 12px; min-width: 64px; text-align: right; }
@media (max-width: 700px) { .ablage { grid-template-columns: 1fr; } }
.storage-bars .sbar { grid-template-columns: minmax(110px, 260px) 1fr 120px; }
.ov-table { table-layout: fixed; width: 100%; }
.ov-table th:nth-child(2) { width: 118px; } .ov-table th:nth-child(4) { width: 124px; } .ov-table th:nth-child(5) { width: 272px; }
.ov-table td { overflow: hidden; }
@media (max-width: 1100px) { .ov-table th:nth-child(5) { width: 132px; } .ov-actions .btn:not(.btn--icon) { width: 34px; padding: 0; font-size: 0; gap: 0; } }
@media (max-width: 700px) {
  .ov-table, .ov-table tbody { display: block; }
  .ov-table thead { display: none; }
  .ov-table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 8px; padding: 10px 4px; border-bottom: 1px solid var(--line); }
  .ov-table td { display: block; border: 0; padding: 0; width: auto !important; max-width: none; height: auto; }
  .ov-table td.num { text-align: right; }
  .ov-table td:first-child { grid-column: 1 / -1; }
  .ov-table td.col-opt2 { display: none; }
  .ov-table td.col-opt { grid-column: 1 / -1; grid-row: 3; font-size: 12px; }
}
.filelist .table { display: block; max-height: 58vh; overflow: auto; }
.filelist .table tbody { display: table; width: 100%; }
