/* Upload-Portal – gemeinsames Stylesheet (Admin, Login, Kunden-Upload)
   Stand 2026-09-14: ruhig, hell, wenig Linien, klare Hierarchie. Keine externen Fonts. */

:root {
  --bg: #f4f5f7; --surface: #ffffff; --surface-2: #f8f9fb; --fg: #0f1218; --fg-2: #3b4250;
  --muted: #6f7787; --line: #e6e8ed; --line-2: #d3d7de; --hover: #f1f3f6;
  --accent: #2563eb; --accent-2: #1d4ed8; --accent-soft: #e9efff; --accent-fg: #ffffff;
  --primary: #0f1218; --primary-fg: #ffffff;
  --ok: #15803d; --ok-soft: #e7f7ec; --err: #dc2626; --err-soft: #fdecec; --warn: #b45309; --warn-soft: #fef3e2;
  --folder: #f0b445; --folder-2: #d99a2b;
  --shadow-sm: 0 1px 2px rgba(15,18,24,.05);
  --shadow: 0 1px 2px rgba(15,18,24,.04), 0 6px 20px rgba(15,18,24,.06);
  --shadow-lg: 0 20px 50px rgba(15,18,24,.18);
  --r: 14px; --r-sm: 10px; --r-lg: 20px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1013; --surface: #16191e; --surface-2: #1b1f25; --fg: #eceef2; --fg-2: #c2c7d0;
    --muted: #8b93a1; --line: #262b33; --line-2: #343b46; --hover: #1f242b;
    --accent: #5b8aff; --accent-2: #7aa0ff; --accent-soft: #1b2540; --accent-fg: #0b0e12;
    --primary: #eceef2; --primary-fg: #0e1013;
    --ok: #34d399; --ok-soft: #10291d; --err: #f87171; --err-soft: #3a1c1c; --warn: #fbbf24; --warn-soft: #3a2c10;
    --folder: #e6b04f; --folder-2: #c9963a;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 6px 20px rgba(0,0,0,.35);
    --shadow-lg: 0 20px 50px rgba(0,0,0,.6);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font: 14px/1.5 var(--font); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
svg.i { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Basis-Bausteine ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 14px;
  border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface); color: var(--fg);
  font-weight: 500; font-size: 13.5px; text-decoration: none; white-space: nowrap; line-height: 1;
  transition: background .12s, border-color .12s, box-shadow .12s, transform .06s;
}
.btn:hover { background: var(--hover); border-color: var(--line-2); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; pointer-events: none; }
.btn.primary { background: var(--accent); color: var(--accent-fg); border-color: transparent; box-shadow: var(--shadow-sm); }
.btn.primary:hover { background: var(--accent-2); }
.btn.dark { background: var(--primary); color: var(--primary-fg); border-color: transparent; }
.btn.dark:hover { opacity: .9; }
.btn.danger { color: var(--err); }
.btn.danger:hover { background: var(--err-soft); border-color: transparent; }
.btn.danger.solid { background: var(--err); color: #fff; border-color: transparent; }
.btn.danger.solid:hover { opacity: .92; background: var(--err); }
.btn.icon { width: 36px; padding: 0; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--hover); border-color: transparent; }
.btn.sm { height: 30px; padding: 0 10px; font-size: 12.5px; border-radius: 8px; }
.btn.sm.icon { width: 30px; }
.btn.wide { width: 100%; }

.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12.5px; font-weight: 600; margin: 0 0 6px; color: var(--fg-2); }
.input, .field input[type=text], .field input[type=password], .field input[type=email], .field textarea, .field select {
  width: 100%; height: 40px; padding: 0 12px; border-radius: var(--r-sm); border: 1px solid var(--line);
  background: var(--surface-2); color: var(--fg); outline: none; transition: border-color .12s, box-shadow .12s, background .12s;
}
.field textarea { height: auto; padding: 10px 12px; resize: vertical; min-height: 64px; }
.input:focus, .field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 3px var(--accent-soft);
}
.field .help { color: var(--muted); font-size: 12px; margin-top: 6px; }
.pwwrap { position: relative; }
.pwwrap input { padding-right: 42px; }
.pwwrap .eye { position: absolute; right: 4px; top: 4px; height: 32px; width: 32px; border: 0; background: transparent; border-radius: 8px; color: var(--muted); display: grid; place-items: center; }
.pwwrap .eye:hover { background: var(--hover); color: var(--fg); }
.code-input { font: 22px/1 var(--mono); letter-spacing: .35em; text-align: center; height: 48px !important; }
.msg { font-size: 13px; min-height: 18px; margin: 10px 0 0; }
.msg.err { color: var(--err); }
.msg.ok { color: var(--ok); }

.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 99px; font-size: 11.5px; font-weight: 600; background: var(--ok-soft); color: var(--ok); line-height: 1.3; }
.pill.off { background: var(--hover); color: var(--muted); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.info { background: var(--accent-soft); color: var(--accent); }
.tag { font-size: 11.5px; padding: 2px 8px; border-radius: 6px; background: var(--hover); color: var(--fg-2); display: inline-flex; align-items: center; gap: 5px; }
.tag svg.i { width: 12px; height: 12px; }

.brandmark { width: 34px; height: 34px; border-radius: 10px; background: var(--primary); color: var(--primary-fg); display: grid; place-items: center; font-weight: 700; font-size: 13px; letter-spacing: .02em; flex: none; }
.brandmark svg.i { width: 18px; height: 18px; stroke-width: 2.2; }

/* Dialoge */
dialog { border: 0; border-radius: var(--r-lg); padding: 0; background: var(--surface); color: var(--fg); box-shadow: var(--shadow-lg); max-width: min(560px, 94vw); }
dialog::backdrop { background: rgba(8,10,14,.5); backdrop-filter: blur(4px); }
.form { padding: 26px; width: min(460px, 92vw); }
.form.wide { width: min(600px, 94vw); }
.form h2 { margin: 0 0 4px; font-size: 17px; font-weight: 700; letter-spacing: -.01em; display: flex; align-items: center; gap: 10px; }
.form p.hint { margin: 0 0 18px; color: var(--muted); font-size: 13px; }
.form .actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 22px; flex-wrap: wrap; }
.form .actions .left { margin-right: auto; }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(16px); background: var(--primary); color: var(--primary-fg); padding: 10px 16px; border-radius: 10px; font-weight: 500; font-size: 13px; box-shadow: var(--shadow-lg); opacity: 0; transition: .2s; z-index: 90; pointer-events: none; display: flex; align-items: center; gap: 8px; max-width: calc(100vw - 32px); }
.toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.err { background: var(--err); color: #fff; }

/* ==========================================================================
   Login
   ========================================================================== */
body.login { display: grid; place-items: center; padding: 20px; background: radial-gradient(1200px 600px at 50% -10%, var(--accent-soft), transparent 60%), var(--bg); }
.login-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 32px; width: 100%; max-width: 380px; box-shadow: var(--shadow); }
.login-card .brand { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.login-card h1 { font-size: 17px; margin: 0; font-weight: 700; line-height: 1.2; letter-spacing: -.01em; }
.login-card .brand small { color: var(--muted); font-size: 12px; display: block; margin-top: 2px; }
.login-card .foot { margin-top: 18px; color: var(--muted); font-size: 11.5px; display: flex; align-items: center; gap: 6px; }
.login-card .foot svg.i { width: 13px; height: 13px; }

/* ==========================================================================
   Kunden-Upload
   ========================================================================== */
body.upload { padding: 0 16px 64px; background: radial-gradient(900px 420px at 50% -8%, var(--accent-soft), transparent 65%), var(--bg); }
.up-wrap { max-width: 680px; margin: 0 auto; }
.up-head { display: flex; align-items: center; gap: 12px; padding: 26px 0 30px; }
.up-head .brandmark { width: 36px; height: 36px; }
.up-head b { display: block; font-size: 14px; }
.up-head small { color: var(--muted); font-size: 12px; }
.up-title h1 { font-size: 26px; margin: 0 0 6px; letter-spacing: -.02em; font-weight: 700; }
.up-title p { color: var(--muted); margin: 0 0 22px; font-size: 15px; }
.up-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; margin-bottom: 14px; box-shadow: var(--shadow-sm); }
.up-card .field:last-child { margin-bottom: 0; }
.drop {
  border: 2px dashed var(--line-2); border-radius: var(--r-lg); padding: 42px 20px; text-align: center; cursor: pointer;
  background: var(--surface); transition: .15s; margin-bottom: 14px;
}
.drop:hover, .drop.over { border-color: var(--accent); background: var(--accent-soft); }
.drop .ico { width: 52px; height: 52px; border-radius: 16px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; margin: 0 auto 14px; }
.drop .ico svg.i { width: 24px; height: 24px; stroke-width: 2; }
.drop.over .ico { background: var(--accent); color: var(--accent-fg); }
.drop strong { display: block; font-size: 16px; margin-bottom: 4px; }
.drop span { color: var(--muted); font-size: 13px; }
.up-list { list-style: none; padding: 0; margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.up-list:empty { display: none; }
.up-list li { display: flex; gap: 12px; align-items: center; padding: 12px 16px; border-top: 1px solid var(--line); }
.up-list li:first-child { border-top: 0; }
.up-list .ki { width: 36px; height: 36px; border-radius: 10px; background: var(--surface-2); color: var(--muted); display: grid; place-items: center; flex: none; }
.up-list .nm { flex: 1; min-width: 0; }
.up-list .fn { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.up-list .meta { font-size: 12px; color: var(--muted); }
.bar { height: 4px; background: var(--hover); border-radius: 99px; overflow: hidden; margin-top: 6px; }
.bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; border-radius: 99px; }
.up-list .st { font-size: 12px; font-weight: 600; white-space: nowrap; color: var(--muted); min-width: 52px; text-align: right; }
.up-list .st.ok { color: var(--ok); } .up-list .st.err { color: var(--err); }
.up-list li.ok .bar i { background: var(--ok); } .up-list li.err .bar i { background: var(--err); }
.up-hint { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; margin-top: 14px; padding: 12px 14px; border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--line); }
.up-hint.ok { color: var(--ok); background: var(--ok-soft); border-color: transparent; }
.up-gone { text-align: center; padding: 40px 20px; }
.up-gone .ico { width: 56px; height: 56px; border-radius: 18px; background: var(--hover); color: var(--muted); display: grid; place-items: center; margin: 0 auto 14px; }
.up-gone .ico svg.i { width: 26px; height: 26px; }
.up-foot { color: var(--muted); font-size: 12px; margin-top: 28px; display: flex; gap: 6px; align-items: center; justify-content: center; }
.up-foot svg.i { width: 13px; height: 13px; }

/* ==========================================================================
   Admin
   ========================================================================== */
.app { display: grid; grid-template-columns: 260px 1fr; height: 100%; }
.scrim { position: fixed; inset: 0; background: rgba(8,10,14,.45); z-index: 55; display: none; }
.scrim.on { display: block; }
#settingsDlg { max-width: min(780px, 94vw); }
aside {
  background: var(--surface); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; padding: 16px 12px; gap: 4px; overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 14px; }
.brand b { font-size: 14px; font-weight: 700; display: block; line-height: 1.2; letter-spacing: -.01em; }
.brand small { color: var(--muted); font-size: 11.5px; }
.nav {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; height: 36px;
  color: var(--fg-2); cursor: pointer; text-decoration: none; font-weight: 500; user-select: none; border: 0; background: transparent; width: 100%; text-align: left;
}
.nav:hover { background: var(--hover); color: var(--fg); }
.nav.sel { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.nav .cnt { margin-left: auto; font-size: 11.5px; color: var(--muted); font-weight: 500; }
.nav.sel .cnt { color: var(--accent); opacity: .8; }
.nav .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav .dot { width: 7px; height: 7px; border-radius: 99px; background: var(--ok); flex: none; margin: 0 3px; }
.nav .dot.off { background: var(--line-2); }
.sect { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 16px 10px 6px; display: flex; align-items: center; }
.sect .btn { margin-left: auto; }
.projlist { display: flex; flex-direction: column; gap: 2px; }
aside .foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.secstate { display: flex; align-items: center; gap: 8px; padding: 8px 10px; font-size: 12px; color: var(--muted); }
.secstate svg.i { width: 14px; height: 14px; }
.secstate.on { color: var(--ok); }
.secstate.off { color: var(--warn); }

main { min-width: 0; display: flex; flex-direction: column; overflow: hidden; position: relative; }
.topbar {
  display: flex; align-items: center; gap: 10px; padding: 12px 28px; border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(10px); position: sticky; top: 0; z-index: 20;
}
.burger { display: none; }
.crumbs { display: flex; align-items: center; gap: 4px; min-width: 0; font-weight: 500; color: var(--muted); }
.crumbs a { text-decoration: none; color: var(--muted); padding: 5px 7px; border-radius: 7px; white-space: nowrap; }
.crumbs a:hover { background: var(--hover); color: var(--fg); }
.crumbs .cur { color: var(--fg); font-weight: 600; padding: 5px 7px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crumbs svg.i { width: 14px; height: 14px; color: var(--line-2); }
.search { margin-left: auto; position: relative; width: min(360px, 40vw); }
.search input {
  width: 100%; height: 36px; padding: 0 12px 0 34px; border-radius: 9px; border: 1px solid var(--line);
  background: var(--surface-2); color: var(--fg); outline: none; transition: .12s;
}
.search input:focus { border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 3px var(--accent-soft); }
.search svg.i { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.content { padding: 28px 28px 80px; overflow-y: auto; flex: 1; }
.content > .inner { max-width: 1240px; margin: 0 auto; }

/* Seitenkopf */
.ph { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.ph > div:first-child { min-width: 0; flex: 1 1 320px; }
.ph h1 { margin: 0; font-size: 24px; font-weight: 700; letter-spacing: -.02em; line-height: 1.25; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ph h1 .fi { color: var(--folder); display: inline-flex; }
.ph .sub { color: var(--muted); font-size: 13px; margin-top: 4px; }
.ph .actions { margin-left: auto; flex: 0 0 auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.sh { display: flex; align-items: center; gap: 10px; margin: 28px 0 12px; }
.sh h2 { margin: 0; font-size: 12.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.sh .cnt { font-size: 12px; color: var(--muted); }
.sh .right { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; color: var(--muted); padding: 5px 10px; border-radius: 7px; font-size: 12.5px; font-weight: 500; }
.seg button:hover { color: var(--fg); background: var(--hover); }
.seg button.sel { background: var(--primary); color: var(--primary-fg); }

.linkbox {
  display: flex; width: fit-content; align-items: center; gap: 8px; padding: 5px 5px 5px 12px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface); max-width: 100%; margin-top: 12px;
}
.linkbox code { font: 12px/1 var(--mono); color: var(--fg-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 360px; min-width: 0; flex: 1 1 auto; }
.linkbox svg.i { flex: none; color: var(--muted); }

/* Karten */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px;
  cursor: pointer; transition: transform .12s, box-shadow .12s, border-color .12s; text-decoration: none; display: block; position: relative;
}
.card:hover { border-color: var(--line-2); box-shadow: var(--shadow); transform: translateY(-1px); }
.card .ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 14px; background: var(--accent-soft); color: var(--accent); }
.card .ico svg.i { width: 20px; height: 20px; }
.card .ttl { font-weight: 600; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.card .ttl span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card .meta { color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.card .foot { display: flex; gap: 6px; margin-top: 14px; flex-wrap: wrap; }
.card .more { position: absolute; top: 12px; right: 12px; opacity: 0; transition: opacity .12s; }
.card:hover .more, .card .more:focus-visible { opacity: 1; }
.card.ghost { border-style: dashed; background: transparent; display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--muted); font-weight: 500; min-height: 120px; }
.card.ghost:hover { color: var(--accent); transform: none; box-shadow: none; border-color: var(--accent); }

.folders { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.fcard {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 12px; cursor: pointer; transition: border-color .12s, box-shadow .12s; text-decoration: none;
}
.fcard:hover { border-color: var(--line-2); box-shadow: var(--shadow); }
.fcard .fi { color: var(--folder); flex: none; display: inline-flex; }
.fcard .fi svg.i { width: 26px; height: 26px; fill: var(--folder); stroke: var(--folder-2); stroke-width: 1.2; }
.fcard .nm { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fcard .meta { color: var(--muted); font-size: 12px; }
.fcard.ghost { border-style: dashed; background: transparent; color: var(--muted); justify-content: center; font-weight: 500; }
.fcard.ghost:hover { color: var(--accent); border-color: var(--accent); box-shadow: none; }

/* Dateiraster */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; cursor: pointer; transition: border-color .12s, box-shadow .12s; }
.tile:hover { border-color: var(--line-2); box-shadow: var(--shadow); }
.thumb { aspect-ratio: 1; background: var(--surface-2); display: grid; place-items: center; position: relative; overflow: hidden; color: var(--muted); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb svg.i { width: 30px; height: 30px; stroke-width: 1.4; }
.thumb .ext { position: absolute; bottom: 8px; left: 8px; font-size: 10px; font-weight: 700; letter-spacing: .05em; padding: 2px 6px; border-radius: 5px; background: var(--surface); border: 1px solid var(--line); color: var(--fg-2); }
.thumb .play { position: absolute; inset: 0; display: grid; place-items: center; }
.thumb .play span { width: 36px; height: 36px; border-radius: 99px; background: rgba(0,0,0,.55); color: #fff; display: grid; place-items: center; }
.thumb .play svg.i { width: 16px; height: 16px; fill: #fff; stroke: none; }
.tile .info { padding: 9px 11px 10px; }
.tile .fn { font-size: 12.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile .sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.more-row { display: flex; justify-content: center; margin-top: 18px; }
.empty { text-align: center; padding: 56px 20px; color: var(--muted); border: 1px dashed var(--line-2); border-radius: var(--r); }
.empty b { display: block; color: var(--fg); font-weight: 600; margin-bottom: 4px; }
.empty .eico { width: 48px; height: 48px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); display: grid; place-items: center; margin: 0 auto 12px; }
.empty .eico svg.i { width: 22px; height: 22px; stroke-width: 1.6; }

/* Datenlisten */
.dsl { display: flex; flex-direction: column; gap: 8px; }
.ds { display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.ds .di { width: 38px; height: 38px; border-radius: 10px; background: var(--ok-soft); color: var(--ok); display: grid; place-items: center; flex: none; }
.ds .nm { font-weight: 600; }
.ds .note { color: var(--fg-2); font-size: 12.5px; margin-top: 1px; }
.ds .meta { color: var(--muted); font-size: 12px; margin-top: 2px; }
.ds .grow { flex: 1; min-width: 0; }

/* Drop-Overlay / Upload-Fortschritt */
.dropzone { position: absolute; inset: 0; z-index: 30; display: none; place-items: center; background: color-mix(in srgb, var(--accent-soft) 85%, transparent); backdrop-filter: blur(2px); border: 3px dashed var(--accent); margin: 10px; border-radius: var(--r); pointer-events: none; }
.dropzone.on { display: grid; }
.dropzone div { background: var(--surface); padding: 16px 22px; border-radius: 12px; box-shadow: var(--shadow-lg); font-weight: 600; display: flex; gap: 10px; align-items: center; }
.uprog { position: fixed; right: 20px; bottom: 20px; width: 340px; max-width: calc(100vw - 40px); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); z-index: 40; display: none; overflow: hidden; }
.uprog.on { display: block; }
.uprog .hd { padding: 10px 10px 10px 14px; font-weight: 600; font-size: 13px; border-bottom: 1px solid var(--line); display: flex; align-items: center; }
.uprog .hd .btn { margin-left: auto; }
.uprog .rows { max-height: 220px; overflow-y: auto; padding: 8px 14px; }
.arow { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; font-size: 12.5px; padding: 6px 0; }
.arow .fn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.arow .bar { grid-column: 1 / -1; margin-top: 2px; }
.arow.err { color: var(--err); }
.arow.err .bar i { background: var(--err); }
.arow.ok .bar i { background: var(--ok); }
.arow .pct { color: var(--muted); }

/* Menüs */
.menu { position: fixed; z-index: 50; min-width: 220px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 5px; display: none; }
.menu.on { display: block; }
.menu button, .menu a { display: flex; width: 100%; align-items: center; gap: 9px; padding: 8px 10px; border: 0; background: transparent; color: var(--fg); border-radius: 8px; cursor: pointer; text-decoration: none; text-align: left; font-size: 13px; }
.menu button:hover, .menu a:hover { background: var(--hover); }
.menu .sep { height: 1px; background: var(--line); margin: 4px 2px; }
.menu .danger { color: var(--err); }

/* Viewer */
#viewer { width: 100vw; height: 100vh; max-width: 100vw; max-height: 100vh; background: #0b0c0f; border-radius: 0; color: #fff; }
.viewer { display: grid; grid-template-rows: auto 1fr auto; height: 100vh; }
.viewer .top, .viewer .bot { display: flex; align-items: center; gap: 8px; padding: 12px 18px; }
.viewer .top { border-bottom: 1px solid rgba(255,255,255,.08); }
.viewer .bot { border-top: 1px solid rgba(255,255,255,.08); flex-wrap: wrap; }
.viewer .ttl { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.viewer .meta { color: rgba(255,255,255,.55); font-size: 12px; }
.viewer .grow { flex: 1; min-width: 100px; }
.viewer .stage { display: grid; place-items: center; overflow: hidden; position: relative; }
.viewer .stage img, .viewer .stage video { max-width: 100%; max-height: 100%; display: block; object-fit: contain; }
.viewer .stage .doc { text-align: center; color: rgba(255,255,255,.7); }
.viewer .stage .doc svg.i { width: 64px; height: 64px; stroke-width: 1.2; margin-bottom: 12px; }
.viewer .navbtn { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 99px; border: 0; background: rgba(255,255,255,.12); color: #fff; display: grid; place-items: center; }
.viewer .navbtn:hover { background: rgba(255,255,255,.22); }
.viewer .navbtn.l { left: 16px; } .viewer .navbtn.r { right: 16px; }
.viewer .stage iframe { width: 100%; height: 100%; border: 0; background: #fff; }
.viewer .btn { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.12); color: #fff; }
.viewer .btn:hover { background: rgba(255,255,255,.16); }
.viewer .btn.danger { color: #fca5a5; }
.viewer select.ctl { height: 36px; padding: 0 10px; border-radius: 9px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); color: #fff; }
.viewer select.ctl option { color: #000; }
.viewer .note { background: rgba(255,255,255,.08); border-radius: 9px; padding: 8px 12px; font-size: 12.5px; margin: 0 18px 10px; }

/* Einstellungen */
.settings { display: grid; grid-template-columns: 170px 1fr; width: min(760px, 94vw); min-height: 460px; }
.settings .tabs { background: var(--surface-2); border-right: 1px solid var(--line); padding: 18px 10px; display: flex; flex-direction: column; gap: 2px; border-radius: var(--r-lg) 0 0 var(--r-lg); }
.settings .tabs h2 { font-size: 12px; margin: 0 0 10px; padding: 0 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.settings .pane { padding: 24px 26px; min-width: 0; }
.settings .pane h3 { margin: 0 0 4px; font-size: 16px; font-weight: 700; }
.settings .pane p.hint { margin: 0 0 18px; color: var(--muted); font-size: 13px; }
.settings .close { position: absolute; top: 14px; right: 14px; }
.statusrow { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 16px; background: var(--surface-2); }
.statusrow .si { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--hover); color: var(--muted); }
.statusrow.on .si { background: var(--ok-soft); color: var(--ok); }
.statusrow.off .si { background: var(--warn-soft); color: var(--warn); }
.statusrow b { display: block; }
.statusrow small { color: var(--muted); font-size: 12px; }
.qrbox { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 16px; }
.qrbox .qr { width: 180px; height: 180px; border-radius: 12px; overflow: hidden; background: #fff; border: 1px solid var(--line); flex: none; }
.qrbox .qr svg { width: 100%; height: 100%; display: block; }
.qrbox .secret { flex: 1; min-width: 200px; }
.qrbox code { display: block; font: 13px/1.6 var(--mono); background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; word-break: break-all; margin-top: 6px; }
.codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; margin: 10px 0 14px; }
.codes code { font: 13px/1 var(--mono); padding: 8px 10px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; text-align: center; }
.sesslist { display: flex; flex-direction: column; gap: 8px; }
.sess { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; }
.sess .grow { flex: 1; min-width: 0; }
.sess .ua { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sess .meta { color: var(--muted); font-size: 12px; }
.callout { padding: 12px 14px; border-radius: 10px; font-size: 13px; background: var(--warn-soft); color: var(--warn); margin-bottom: 14px; }
.callout.ok { background: var(--ok-soft); color: var(--ok); }
.steps { counter-reset: s; margin: 0 0 16px; padding: 0; list-style: none; }
.steps li { position: relative; padding-left: 30px; margin-bottom: 8px; color: var(--fg-2); font-size: 13px; }
.steps li::before { counter-increment: s; content: counter(s); position: absolute; left: 0; top: 0; width: 20px; height: 20px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); font-size: 11px; font-weight: 700; display: grid; place-items: center; }

/* Bestätigen */
.confirm { padding: 26px; width: min(420px, 92vw); }
.confirm h2 { margin: 0 0 6px; font-size: 16px; }
.confirm p { margin: 0; color: var(--fg-2); white-space: pre-line; }
.confirm .form.actions, .pane .form.actions { padding: 0; width: auto; }

/* Mobil */
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  aside { position: fixed; inset: 0 auto 0 0; width: min(300px, 86vw); z-index: 60; transform: translateX(-100%); transition: transform .2s; box-shadow: none; }
  aside.open { transform: none; box-shadow: var(--shadow-lg); }
  .burger { display: inline-flex; }
  .topbar { padding: 10px 14px; }
  .search { width: 100%; order: 10; flex-basis: 100%; }
  .topbar { flex-wrap: wrap; }
  .content { padding: 18px 14px 80px; }
  .settings { grid-template-columns: 1fr; }
  .settings .tabs { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); border-radius: var(--r-lg) var(--r-lg) 0 0; padding: 12px; }
  .settings .tabs h2 { display: none; }
  .settings .tabs .nav { width: auto; white-space: nowrap; }
  .ph h1 { font-size: 21px; }
  .viewer .navbtn { width: 38px; height: 38px; }
}

/* FTP: Dateien direkt auf dem Server */
.ftpl .ds { padding: 10px 12px; gap: 12px; }
.ftpl .ds a.grow { color: inherit; text-decoration: none; }
.ftpl .ds .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ftpl .di { text-decoration: none; background: var(--surface-2, var(--bg)); color: var(--fg-2); border: 1px solid var(--line); }
.ftpl .di.fold { background: var(--surface); color: var(--folder); }
.ftpl .di .ext { font-size: 9.5px; font-weight: 700; letter-spacing: .02em; }
@media (max-width: 640px) { .ftpl .btn .lbl { display: none; } }
.ftppath { word-break: break-all; }
.ftpq { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -10px 0 18px; color: var(--muted); font-size: 13px; }
.ftpq a { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--fg-2); text-decoration: none; }
.ftpq a svg.i { color: var(--folder); width: 15px; height: 15px; }

/* ---------- Schulden-Übersicht (31.10.2026) ---------- */
body.sd { padding: 0 16px 64px; }
.sd-wrap { max-width: 1240px; margin: 0 auto; }
.sd-head { display: flex; align-items: center; gap: 12px; padding: 18px 0 14px; flex-wrap: wrap; }
.sd-head .brandmark { width: 38px; height: 38px; border-radius: 12px; background: var(--accent); color: var(--accent-fg); display: grid; place-items: center; }
.sd-head .grow { flex: 1; min-width: 180px; }
.sd-head b { display: block; font-size: 17px; }
.sd-head small { color: var(--muted); font-size: 12.5px; }
.sd-headact { display: flex; gap: 6px; flex-wrap: wrap; }
.sd .muted { color: var(--muted); }
.sd .mono { font-family: var(--mono); font-size: 12.5px; }
.sd .hint { color: var(--muted); font-size: 12px; margin: 8px 0 0; }
.sd .row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.sd .ctl { height: 32px; padding: 0 10px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); font-size: 12.5px; }
.sd select.ctl { padding-right: 6px; }
.sd input.ctl[type=search] { width: 160px; }
.sd .field select.ctl { width: 100%; height: 38px; }
.lnk { border: 0; background: none; padding: 0; text-align: left; color: inherit; cursor: pointer; font: inherit; }
.lnk:hover b, .lnk.fn:hover { color: var(--accent); }

.sd-kpis { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 10px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; box-shadow: var(--shadow-sm); min-width: 0; }
.kpi span { display: block; font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.kpi b { display: block; font-size: 22px; margin: 4px 0 2px; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi.big b { font-size: 28px; }
.kpi small { color: var(--muted); font-size: 12px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi.bad { border-color: color-mix(in srgb, var(--err) 45%, var(--line)); background: var(--err-soft); }
.kpi.bad b { color: var(--err); }
.kpi.warn { border-color: color-mix(in srgb, var(--warn) 40%, var(--line)); background: var(--warn-soft); }
.kpi.warn b { color: var(--warn); }
.kpi.ok { border-color: color-mix(in srgb, var(--ok) 45%, var(--line)); background: var(--ok-soft); }
.kpi.ok b { color: var(--ok); }

.sd-ki { display: flex; gap: 10px; align-items: center; margin: 12px 0; padding: 10px 14px; border-radius: var(--r-sm); background: var(--ok-soft); color: var(--ok); font-size: 13px; }
.sd-ki .grow { flex: 1; color: var(--fg-2); }
.sd-ki.busy { background: var(--accent-soft); color: var(--accent); }
.sd-ki.busy svg.i { animation: sdpulse 1.4s ease-in-out infinite; }
.sd-ki.err { background: var(--err-soft); color: var(--err); }
.sd-ki.info { background: var(--surface); border: 1px solid var(--line); color: var(--muted); }
@keyframes sdpulse { 50% { opacity: .35; } }

.sd-up { margin-bottom: 8px; }
.sd-drop { display: flex; align-items: center; gap: 16px; text-align: left; padding: 16px 18px; margin-bottom: 8px; }
.sd-drop .ico { margin: 0; width: 44px; height: 44px; flex: none; }
.sd-drop .grow { flex: 1; min-width: 0; }
.sd-drop strong { font-size: 14.5px; margin-bottom: 2px; }
.sd-upbtns { display: flex; gap: 6px; }

.sd-warn { display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--r); background: var(--err-soft); color: var(--err); margin: 12px 0; border: 1px solid color-mix(in srgb, var(--err) 30%, transparent); }
.sd-warn svg.i { width: 20px; height: 20px; margin-top: 2px; }
.sd-warn ul { margin: 4px 0 0; padding-left: 18px; color: var(--fg); }

.sd-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sd-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; box-shadow: var(--shadow-sm); min-width: 0; }
.sd-card h3 { margin: 0 0 8px; font-size: 14px; display: flex; gap: 8px; align-items: center; }
.sd-card p { margin: 0; color: var(--fg-2); }
.sd-todo, .tips, .reihe, .unk { margin: 0; padding-left: 20px; }
.sd-todo li, .tips li, .unk li { margin: 4px 0; }
.reihe li { margin: 0 0 8px; }
.reihe small { display: block; color: var(--muted); font-size: 12px; }
#todo { margin: 12px 0 0; }

.ftab { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow-sm); }
.fr { display: grid; grid-template-columns: 8px minmax(170px, 1.5fr) minmax(150px, 1.2fr) 130px 96px 100px minmax(180px, 2fr); gap: 14px; align-items: center; padding: 11px 16px; border-top: 1px solid var(--line); cursor: pointer; }
.fr:first-child { border-top: 0; }
.fr.fh { cursor: default; background: var(--surface-2); font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); padding-top: 8px; padding-bottom: 8px; }
.fr:not(.fh):hover { background: var(--hover); }
.fr.open { background: var(--accent-soft); }
.fr.done { opacity: .6; }
.fr .r { text-align: right; }
.fr small { display: block; color: var(--muted); font-size: 11.5px; line-height: 1.35; }
.fr .gl b { display: block; overflow: hidden; text-overflow: ellipsis; }
.fr .amt { font-weight: 600; white-space: nowrap; }
.fr .ns { font-size: 12.5px; color: var(--fg-2); }
.fr em { font-style: normal; font-weight: 600; }
.st-bezahlt { color: var(--ok); } .st-strittig { color: var(--warn); } .st-ratenzahlung { color: var(--accent); } .st-unklar { color: var(--muted); }
.dr { width: 8px; height: 34px; border-radius: 4px; background: var(--line-2); }
.dr.d-sofort { background: var(--err); } .dr.d-hoch { background: #f97316; } .dr.d-mittel { background: #eab308; } .dr.d-niedrig { background: var(--ok); }
.stufe .dots { display: flex; gap: 3px; margin-bottom: 3px; }
.stufe .dots i { width: 12px; height: 5px; border-radius: 3px; background: var(--line); }
.stufe .dots i.on { background: #eab308; } .stufe .dots i.w { background: #f97316; } .stufe .dots i.g { background: var(--err); }
.stufe span { font-size: 12px; color: var(--fg-2); }
.frist { white-space: nowrap; font-weight: 600; }
.frist small { font-weight: 400; }
.frist.bad { color: var(--err); } .frist.warn { color: var(--warn); } .frist.past { color: var(--muted); text-decoration: line-through; }

.fdet { padding: 16px 18px 20px 38px; border-top: 1px solid var(--line); background: var(--surface-2); cursor: default; }
.fdet h4 { margin: 14px 0 6px; font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.fdet h4:first-child { margin-top: 0; }
.fdet .vs { margin: 0; font-size: 14px; line-height: 1.55; }
.fdet .pp { margin: 0; padding-left: 18px; color: var(--warn); }
.fdet .pp li { margin: 3px 0; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 5px 14px; margin: 0; font-size: 13px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.chrono { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line-2); }
.chrono li { margin: 0 0 8px; padding-left: 12px; position: relative; }
.chrono li::before { content: ''; position: absolute; left: -6px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--surface); border: 2px solid var(--accent); }
.chrono .lnk { display: flex; gap: 8px; align-items: flex-start; }
.chrono .lnk svg.i { margin-top: 2px; color: var(--muted); }
.chrono small { display: block; color: var(--muted); font-size: 12px; }
.chrono small.k { color: var(--fg-2); }
.fdet textarea { width: 100%; }

.docl .ki { overflow: hidden; padding: 0; border: 0; }
.docl .ki img { width: 100%; height: 100%; object-fit: cover; }
.docl .fn { display: block; max-width: 100%; }
.docl .br { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.up-list .st.busy { color: var(--accent); }
.sd-legal { color: var(--muted); font-size: 12px; margin: 28px 0 0; text-align: center; }
.seg button small { opacity: .7; margin-left: 2px; }

@media (max-width: 1000px) {
  .sd-kpis { grid-template-columns: 1fr 1fr; }
  .kpi.big { grid-column: 1 / -1; }
  .sd-grid2 { grid-template-columns: 1fr; }
  .fr.fh { display: none; }
  .fr { grid-template-columns: 8px 1fr auto; grid-template-areas: "d g a" "d s f" "d n n"; gap: 6px 12px; }
  .fr > :nth-child(1) { grid-area: d; height: 100%; }
  .fr > :nth-child(2) { grid-area: g; } .fr > :nth-child(3) { grid-area: s; }
  .fr > :nth-child(4) { grid-area: a; } .fr > :nth-child(5) { display: none; }
  .fr > :nth-child(6) { grid-area: f; text-align: right; } .fr > :nth-child(7) { grid-area: n; }
  .fdet { padding: 14px; }
  .sh { flex-wrap: wrap; } .sh .right { margin-left: 0; flex-wrap: wrap; width: 100%; }
  .sd input.ctl[type=search] { flex: 1; width: auto; }
  .seg { flex-wrap: wrap; }
}
@media (max-width: 560px) {
  .sd-drop { flex-wrap: wrap; } .sd-upbtns { width: 100%; } .sd-upbtns .btn { flex: 1; }
  .sd-headact .btn { flex: 1; }
}
@media print {
  body.sd { padding: 0; background: #fff; color: #000; }
  .noprint, .sd-headact, #back, .sd-up, .docl .btn { display: none !important; }
  .fr { break-inside: avoid; } .sd-card, .kpi, .ftab { box-shadow: none; }
}
/* Schulden: kompakte Liste */
.ltab-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow-x: auto; box-shadow: var(--shadow-sm); }
.ltab { width: 100%; border-collapse: collapse; font-size: 13px; }
.ltab td:nth-child(2) { min-width: 170px; }
.ltab th { text-align: left; background: var(--surface-2); font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); padding: 9px 12px; white-space: nowrap; }
.ltab td { padding: 9px 12px; border-top: 1px solid var(--line); vertical-align: top; }
.ltab tbody tr { cursor: pointer; }
.ltab tbody tr:hover { background: var(--hover); }
.ltab tr.done td { color: var(--muted); }
.ltab .r { text-align: right; white-space: nowrap; }
.ltab .b { font-weight: 600; }
.ltab .az { font-family: var(--mono); font-size: 12px; color: var(--fg-2); }
.ltab td.bad { color: var(--err); font-weight: 600; } .ltab td.warn { color: var(--warn); font-weight: 600; } .ltab td.past { color: var(--muted); text-decoration: line-through; }
.ltab tfoot td { background: var(--surface-2); font-weight: 700; border-top: 2px solid var(--line-2); }
.dr.sm { display: inline-block; width: 6px; height: 14px; margin-right: 8px; vertical-align: -2px; }
@media (max-width: 700px) { .ltab th:nth-child(3), .ltab td:nth-child(3), .ltab th:nth-child(4), .ltab td:nth-child(4), .ltab th:nth-child(8), .ltab td:nth-child(8), .ltab th:nth-child(9), .ltab td:nth-child(9) { display: none; } }
@media print { .ltab-wrap { box-shadow: none; overflow: visible; } }

/* ---------- Schulden: Handy-Ablauf mit Schriftstücken (03.11.2026) ---------- */
.m-only { display: none; }
.btn.big { height: 46px; font-size: 15px; width: 100%; }
.sd-login { max-width: 420px; margin: 8vh auto 0; }
.sd-login .up-card { text-align: center; }
.sd-login .ico { width: 56px; height: 56px; border-radius: 18px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; margin: 0 auto 14px; }
.sd-login .ico svg.i { width: 26px; height: 26px; }
.sd-login h2 { margin: 0 0 4px; font-size: 20px; }
.sd-login .hint { color: var(--muted); font-size: 13px; margin: 0 0 18px; }
.sd-login .field { text-align: left; }
.sd-login .field input { width: 100%; height: 46px; font-size: 17px; }
.sd-login .err { color: var(--err); font-size: 13px; margin: 12px 0 0; }

.sd-actions { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 10px; border: 2px dashed transparent; border-radius: var(--r-lg); transition: .15s; }
.sd-actions.over { border-color: var(--accent); background: var(--accent-soft); }
.act { display: grid; grid-template-columns: 44px 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; text-align: left;
  padding: 14px 16px; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow-sm); min-height: 72px; cursor: pointer; }
.act:hover { background: var(--hover); border-color: var(--line-2); }
.act:active { transform: translateY(1px); }
.act .ic { grid-row: 1 / 3; width: 44px; height: 44px; border-radius: 13px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.act .ic svg.i { width: 22px; height: 22px; stroke-width: 2; }
.act b { font-size: 14.5px; line-height: 1.25; }
.act small { color: var(--muted); font-size: 12px; line-height: 1.3; margin-top: 2px; }
.act.primary { background: var(--accent); color: var(--accent-fg); border-color: transparent; }
.act.primary .ic { background: rgba(255,255,255,.18); color: #fff; }
.act.primary small { color: rgba(255,255,255,.8); }
.act.primary:hover { background: var(--accent-2); }
.sd-uphint { margin: 8px 2px 10px; }

.ss-list { display: grid; gap: 10px; }
.ss { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; box-shadow: var(--shadow-sm); min-width: 0; }
.ss.live { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.ss.leer { border-style: dashed; }
.ss-head { display: flex; gap: 10px; align-items: center; }
.ss-head .grow { flex: 1; min-width: 0; }
.ss-head b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.ss-head small { display: block; color: var(--muted); font-size: 12px; }
.ss-head small em { font-style: normal; color: var(--accent); font-weight: 600; }
.ss-ic { width: 36px; height: 36px; border-radius: 10px; background: var(--surface-2); color: var(--muted); display: grid; place-items: center; flex: none; }
.ss .st { font-size: 12px; font-weight: 600; white-space: nowrap; color: var(--muted); }
.ss .st.ok { color: var(--ok); } .ss .st.err { color: var(--err); } .ss .st.busy { color: var(--accent); }
.ss-pages { display: flex; gap: 8px; overflow-x: auto; padding: 10px 0 4px; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.pg { position: relative; flex: none; width: 74px; height: 98px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); overflow: hidden; padding: 0; cursor: pointer; }
.pg img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pg .pf { display: grid; place-items: center; align-content: center; gap: 4px; height: 100%; color: var(--muted); }
.pg .pf i { font-style: normal; font-size: 10.5px; font-weight: 700; letter-spacing: .04em; }
.pg .nr { position: absolute; left: 5px; bottom: 5px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: rgba(15,18,24,.78); color: #fff; font-size: 11.5px; font-weight: 700; display: grid; place-items: center; }
.pg.add { border-style: dashed; color: var(--accent); background: var(--surface); display: grid; place-items: center; align-content: center; gap: 4px; }
.pg.add i { font-style: normal; font-size: 10.5px; font-weight: 600; line-height: 1.2; text-align: center; }
.pg.add:hover { background: var(--accent-soft); }
.ss-info { margin: 6px 0 0; font-size: 12.5px; color: var(--fg-2); }
.ss-info.err { color: var(--err); }
.ss-hint { display: flex; gap: 10px; align-items: center; margin: 10px 0 0; padding: 9px 12px; border-radius: var(--r-sm); background: var(--warn-soft); color: var(--warn); font-size: 12.5px; }
.ss-hint .grow { flex: 1; color: var(--fg-2); }
.ss-acts { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.ss-acts .danger { margin-left: auto; }

.sd-sticky { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: flex; gap: 8px; align-items: center; padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -8px 30px rgba(15,18,24,.12); }
.sd-sticky .grow { flex: 1; min-width: 0; }
.sd-sticky b { display: block; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sd-sticky small { display: block; color: var(--muted); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.has-sticky { padding-bottom: 120px; }

.sheet { width: min(420px, 94vw); }
.sheet-btns { display: grid; gap: 8px; margin-top: 6px; }
.viewer .vmove { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: rgba(255,255,255,.75); }
.viewer .vmove select { max-width: 52vw; background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.14); }
.viewer .vmove select option { color: #000; }
.viewer .bot:empty { display: none; }

@media (max-width: 760px) {
  .hide-m { display: none !important; }
  .m-only { display: block; color: var(--muted); font-size: 11.5px; font-weight: 400; }
  body.sd { padding: 0 12px 64px; }
  .sd-head { padding: 12px 0 10px; gap: 10px; }
  .sd-head .brandmark { width: 34px; height: 34px; }
  .sd-head b { font-size: 15.5px; }
  .sd-head .grow { min-width: 0; flex-basis: 50%; }
  .sd-headact { width: 100%; }
  .sd-headact .btn { flex: 1; }
  .sd-kpis { gap: 8px; }
  .kpi { padding: 10px 12px; }
  .kpi b { font-size: 18px; } .kpi.big b { font-size: 24px; }
  .sd-ki { font-size: 12.5px; padding: 9px 12px; flex-wrap: wrap; }
  .sd-ki .btn { width: 100%; }
  .sd-actions { grid-template-columns: 1fr; gap: 8px; }
  .act { min-height: 64px; padding: 12px 14px; }
  .act.primary { min-height: 78px; }
  .act.primary b { font-size: 16px; }
  .sh { margin-top: 22px; }
  .seg button { padding: 6px 9px; }
  .sd .ctl { height: 36px; }
  .ltab { font-size: 12.5px; }
  .ltab th, .ltab td { padding: 8px 8px; }
  .ltab td:nth-child(2) { min-width: 120px; }
  .ltab th:nth-child(5), .ltab td:nth-child(5), .ltab th:nth-child(6), .ltab td:nth-child(6) { display: none; }
  .ss-acts .btn { flex: 1; }
  .ss-acts .danger { margin-left: 0; flex: 0 0 auto; }
  .viewer .top, .viewer .bot { padding: 10px 12px; }
  .viewer .vmove { width: 100%; }
  .viewer .vmove select { flex: 1; max-width: none; }
  .sd-sticky .btn { height: 40px; padding: 0 12px; }
  .sd-sticky .btn.dark { padding: 0 10px; }
  .fdet .sd-grid2 { gap: 18px; }
  .kv { grid-template-columns: 1fr; gap: 2px 0; }
  .kv dt { margin-top: 8px; }
}
@media print { .sd-sticky, .ss-acts, .pg.add { display: none !important; } }

/* ---- Schulden: Schreiben je Fall ---- */
.sch-teil { margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--line); }
.sch { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); margin-bottom: 8px; }
.sch.open { padding: 0 14px 14px; box-shadow: var(--shadow-sm); }
.sch-kopf { display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 14px; min-width: 0; }
.sch.open .sch-kopf { padding-left: 0; padding-right: 0; }
.sch-kopf > span:nth-child(2) { flex: 1; min-width: 0; display: grid; }
.sch-kopf small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sch-kopf .pill { flex: none; }
.sch-begr { margin: 0 0 12px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--accent-soft); font-size: 13.5px; line-height: 1.5; }
.sch-err { display: flex; gap: 8px; color: var(--err); margin: 0 0 10px; }
.sch-adr { font-size: 13.5px; line-height: 1.5; padding: 8px 12px; border-radius: var(--r-sm); background: var(--surface-2); border: 1px solid var(--line); min-height: 40px; }
.sch-copy { display: flex; gap: 6px; align-items: center; }
.sch-copy input { flex: 1; min-width: 0; }
.sch-hw { color: var(--fg-2); font-size: 13px; }
.sch-text { font-size: 14px; line-height: 1.55; width: 100%; }
.sch-acts { flex-wrap: wrap; gap: 6px; }
.sch-acts .btn { text-decoration: none; }
.sch-neu { margin-top: 10px; padding: 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.sch-neu-kopf { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.sch-neu-kopf b { display: inline-flex; gap: 6px; align-items: center; }
.sch-abs { color: var(--accent); text-decoration: underline; font-size: inherit; }
.sch-grid .field { margin-bottom: 10px; }
@media (max-width: 720px) { .sch-grid { grid-template-columns: 1fr; } }

/* Druckansicht eines Schreibens (DIN 5008, Fenster links) */
.sch-print { display: none; }
@media print {
  body.print-sch > *:not(#printSch) { display: none !important; }
  body.print-sch { background: #fff; color: #000; }
  body.print-sch #printSch { display: block; font: 11.5pt/1.5 Arial, Helvetica, sans-serif; color: #000; padding: 0; margin: 0; }
  @page { size: A4; margin: 20mm 20mm 20mm 25mm; }
  .sp-abs { font-size: 10.5pt; line-height: 1.4; margin-bottom: 10mm; }
  .sp-fenster { min-height: 40mm; }
  .sp-abszeile { font-size: 8pt; border-bottom: 1px solid #000; padding-bottom: 1mm; margin-bottom: 3mm; }
  .sp-empf { line-height: 1.4; }
  .sp-datum { text-align: right; margin: 6mm 0 8mm; }
  .sp-betreff { font-weight: 700; margin-bottom: 6mm; }
  .sp-text { white-space: pre-wrap; }
  .sp-kontakt { margin-top: 12mm; font-size: 9pt; color: #333; }
}

/* Foto-Stapel (04.11.2026): Knopf „Alle neuen Fotos hochladen“, Zeitfilter-Dialog, Stapel-Karte */
.act.stapel { grid-column: 1 / -1; background: var(--accent-soft); border-color: var(--accent); }
.act.stapel .ic { background: var(--accent); color: #fff; }
.act.stapel b { color: var(--accent); font-size: 15.5px; }
.act.stapel:hover { background: var(--accent-soft); filter: brightness(.97); }
.st-win { display: flex; flex-wrap: wrap; margin: 4px 0 10px; }
.st-win button { flex: 1; white-space: nowrap; }
.st-count { font-weight: 600; color: var(--fg) !important; }
.ss.stapel { border-color: var(--accent); border-style: dashed; }
.ss-sort { display: flex; gap: 10px; align-items: center; margin-top: 10px; padding: 10px 12px; border-radius: var(--r); background: var(--accent-soft); font-size: 13px; }
.ss-sort .grow { flex: 1; min-width: 0; }
.ss-sort.err { background: var(--err-soft); color: var(--err); }
.ss-sort .spin { width: 16px; height: 16px; border: 2px solid var(--accent); border-right-color: transparent; border-radius: 50%; animation: sdspin .9s linear infinite; flex: none; }
@keyframes sdspin { to { transform: rotate(360deg); } }
.st-prog { margin: 6px 0 12px; }
.st-prog .bar { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.st-prog .bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .3s; }
.st-prog small { display: block; margin-top: 6px; color: var(--muted); font-size: 12.5px; }
.sd-hinw { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 14px; margin: 10px 0 14px; }
.sd-hinw summary { cursor: pointer; font-weight: 600; font-size: 14px; display: flex; align-items: center; gap: 8px; list-style: none; }
.sd-hinw summary::-webkit-details-marker { display: none; }
.sd-hinw summary small { color: var(--muted); font-weight: 400; }
.sd-hinw p.hint { margin: 10px 0 8px; color: var(--muted); font-size: 13px; }
.sd-hinw textarea { width: 100%; box-sizing: border-box; font: inherit; font-size: 14px; padding: 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg); color: var(--fg); resize: vertical; }
.sd-hinw .actions { display: flex; justify-content: flex-end; margin-top: 8px; }

/* Schulden: Fall mit gesendetem Schreiben → „Geantwortet“, wartet auf Antwort (08.11.2026) */
.pill.geantw { background: var(--ok-soft); color: var(--ok); white-space: nowrap; }
.pill.geantw svg { width: 12px; height: 12px; }
.fr.wait { box-shadow: inset 4px 0 0 var(--ok); }
.ltab tr.wait td:first-child { box-shadow: inset 4px 0 0 var(--ok); }
.gl .antw { display: block; margin-top: 4px; }
.ns b.ok { color: var(--ok); font-weight: 600; }
.antw-box { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; margin-bottom: 12px; border-radius: 10px; background: var(--ok-soft); color: var(--ok); font-size: 13.5px; line-height: 1.4; }
.antw-box svg { flex: none; width: 18px; height: 18px; margin-top: 1px; }
.antw-box span { color: var(--fg); }

/* Schulden: fertiges, noch nicht gesendetes Schreiben (Entwurf) – Kasten oben + Markierung je Fall (08.11.2026) */
.pill.entw { background: var(--accent-soft); color: var(--accent); white-space: normal; }
.pill.entw svg { width: 12px; height: 12px; }
.pill.entw .spin, .sd-draft .spin { display: inline-block; width: 12px; height: 12px; min-width: 12px; max-width: 12px; aspect-ratio: 1; padding: 0; margin: 0 3px; border: 2px solid var(--accent); border-right-color: transparent; border-radius: 50%; animation: sdspin .9s linear infinite; flex: none; }
.pill.entw .spin { width: 10px; height: 10px; }
.fr.draft { box-shadow: inset 4px 0 0 var(--accent); }
.ltab tr.draft td:first-child { box-shadow: inset 4px 0 0 var(--accent); }
.ns b.acc, .m-only b.acc { color: var(--accent); font-weight: 600; }
.sd-draft { display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--r); background: var(--accent-soft); color: var(--accent); margin: 12px 0; border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); }
.sd-draft > svg.i { width: 20px; height: 20px; margin-top: 2px; flex: none; }
.sd-draft > div { min-width: 0; flex: 1; }
.sd-draft > div > b { display: block; font-size: 15px; }
.sd-draft > div > small { display: block; color: var(--muted); margin-top: 2px; }
.sd-draft ul { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.sd-draft .lnk { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 10px 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); color: var(--fg); cursor: pointer; font: inherit; }
.sd-draft .lnk > span { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sd-draft .lnk b { font-size: 14px; color: var(--fg); } .sd-draft .lnk small { color: var(--muted); font-size: 12.5px; }
.sd-draft .lnk em { font-style: normal; font-weight: 600; color: var(--accent); white-space: nowrap; display: inline-flex; align-items: center; gap: 2px; font-size: 13px; }
.sd-draft .lnk svg.i { width: 18px; height: 18px; flex: none; color: var(--accent); }
.sd-draft .lnk .spin { width: 18px; height: 18px; min-width: 18px; max-width: 18px; }

/* ==========================================================================
   05.12.2026 – Apple-Look (User: „cleaner … mehr Apple-Look, freundlicher“), nach Entwürfen des Bildmodells.
   Nur Farben, Rundungen, Schrift und Abstände – keine Funktion geändert. Gilt für Verwaltung, Anmeldung, Kundenseite.
   ========================================================================== */
:root {
  --bg: #f5f5f7; --surface: #ffffff; --surface-2: #f2f2f5; --fg: #1d1d1f; --fg-2: #3a3a3c;
  --muted: #6e6e73; --line: #e8e8ed; --line-2: #d2d2d7; --hover: #ededf1;
  --accent: #0071e3; --accent-2: #0064c8; --accent-soft: #e6f1fd; --accent-fg: #ffffff;
  --primary: #1d1d1f; --primary-fg: #ffffff;
  --ok: #1e9e4a; --ok-soft: #e6f7ec; --err: #e0352b; --err-soft: #fdeceb; --warn: #b25e09; --warn-soft: #fff3df;
  --folder: #3b9dff; --folder-2: #0a84ff;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.04), 0 2px 6px rgba(0,0,0,.03);
  --shadow: 0 2px 6px rgba(0,0,0,.04), 0 14px 34px rgba(0,0,0,.07);
  --shadow-lg: 0 24px 60px rgba(0,0,0,.2);
  --r: 16px; --r-sm: 12px; --r-lg: 24px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", "Segoe UI", Inter, Roboto, Arial, sans-serif;
  --blau: linear-gradient(180deg, #36a3ff 0%, #0071e3 100%);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000; --surface: #1c1c1e; --surface-2: #2c2c2e; --fg: #f5f5f7; --fg-2: #d1d1d6;
    --muted: #98989d; --line: #2c2c2e; --line-2: #3a3a3c; --hover: #2c2c2e;
    --accent: #0a84ff; --accent-2: #409cff; --accent-soft: #0f2a47; --accent-fg: #ffffff;
    --primary: #f5f5f7; --primary-fg: #1d1d1f;
    --ok: #30d158; --ok-soft: #0f2e1a; --err: #ff453a; --err-soft: #3a1512; --warn: #ffd60a; --warn-soft: #3a3005;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.5); --shadow: 0 2px 6px rgba(0,0,0,.5), 0 14px 34px rgba(0,0,0,.45); --shadow-lg: 0 24px 60px rgba(0,0,0,.7);
  }
}
body { font-size: 14.5px; letter-spacing: -.005em; }

/* Knöpfe: Pillen, ohne Rahmen */
.btn { height: 36px; padding: 0 16px; border-radius: 999px; border-color: transparent; background: var(--hover); font-weight: 500; }
.btn:hover { background: var(--line-2); border-color: transparent; }
.btn.primary { background: var(--accent); font-weight: 600; box-shadow: none; }
.btn.primary:hover { background: var(--accent-2); }
.btn.ghost { background: transparent; }
.btn.ghost:hover { background: var(--hover); }
.btn.icon { padding: 0; }
.btn.sm { height: 30px; padding: 0 13px; border-radius: 999px; }
.btn.sm.icon { padding: 0; }
.btn.danger:hover { background: var(--err-soft); }

/* Felder: weiche graue Fläche statt Rahmen */
.input, .field input[type=text], .field input[type=password], .field input[type=email], .field textarea, .field select {
  height: 44px; padding: 0 14px; border: 1px solid transparent; background: var(--surface-2); font-size: 15px;
}
.field textarea { padding: 12px 14px; min-height: 72px; }
.field label { font-size: 13px; color: var(--muted); font-weight: 500; margin-bottom: 7px; }
.input:focus, .field input:focus, .field textarea:focus, .field select:focus { border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 4px var(--accent-soft); }

.brandmark { background: var(--blau); color: #fff; border-radius: 28%; box-shadow: 0 4px 12px rgba(0,113,227,.28); }
dialog { border-radius: var(--r-lg); }

/* ---------- Anmeldung ---------- */
body.login { background: radial-gradient(1100px 520px at 50% -12%, #d6e8ff, transparent 62%), var(--bg); }
.login-card { border: 0; border-radius: 28px; padding: 36px; box-shadow: var(--shadow); }

/* ---------- Kundenseite ---------- */
body.upload { padding: 0 18px 72px; background: radial-gradient(1200px 520px at 50% -14%, #cfe4ff, transparent 62%), var(--bg); }
.up-wrap { max-width: 700px; }
.up-head { justify-content: center; gap: 14px; padding: 34px 0 26px; }
.up-head .brandmark { width: 52px; height: 52px; }
.up-head .brandmark svg.i { width: 26px; height: 26px; }
.up-head b { font-size: 24px; font-weight: 600; letter-spacing: -.01em; line-height: 1.1; }
.up-head small { font-size: 13.5px; }
.up-title { text-align: center; }
.up-title h1 { font-size: clamp(30px, 6vw, 44px); font-weight: 700; letter-spacing: -.03em; line-height: 1.1; margin: 0 0 12px; }
.up-title p { font-size: clamp(16px, 2.6vw, 19px); line-height: 1.45; margin: 0 auto 30px; max-width: 560px; }
.up-card { border: 0; border-radius: 28px; padding: 24px; margin-bottom: 18px; box-shadow: var(--shadow); }
.up-main { padding: 14px; }
.drop { border: 2px dashed transparent; border-radius: 20px; padding: 34px 20px 30px; margin: 0; background: transparent; }
.drop:hover { border-color: transparent; background: transparent; }
.drop.over { border-color: var(--accent); background: var(--accent-soft); }
.drop .ico { width: 84px; height: 84px; border-radius: 50%; background: var(--blau); color: #fff; margin-bottom: 18px; box-shadow: 0 10px 24px rgba(0,113,227,.3); transition: transform .18s; }
.drop:hover .ico, .drop.over .ico { transform: translateY(-3px) scale(1.04); background: var(--blau); color: #fff; }
.drop .ico svg.i { width: 36px; height: 36px; stroke-width: 2.2; }
.drop strong { font-size: 24px; font-weight: 700; letter-spacing: -.02em; margin-bottom: 6px; }
.drop span { font-size: 15px; }
.drop .pick { display: inline-flex; align-items: center; justify-content: center; margin-top: 20px; height: 46px; padding: 0 30px; border-radius: 999px; background: var(--accent); color: #fff; font-weight: 600; font-size: 16px; transition: background .12s; }
.drop:hover .pick { background: var(--accent-2); }
.up-list { border: 0; border-radius: 0; background: transparent; border-top: 1px solid var(--line); margin: 6px 10px 0; padding-top: 6px; }
.up-list li { border-top: 0; padding: 12px 0; gap: 14px; }
.up-list .ki { width: 46px; height: 46px; border-radius: 12px; }
.up-list .ki svg.i { width: 20px; height: 20px; }
.up-list .fn { font-size: 15px; }
.bar { height: 6px; margin-top: 8px; }
.up-list li.ok .bar i { background: var(--accent); }
.up-list .st.ok { color: #fff; background: #34c759; border-radius: 999px; min-width: 0; padding: 4px 11px; }
.up-hint { border: 0; border-radius: 16px; padding: 14px 18px; font-size: 14.5px; box-shadow: var(--shadow-sm); justify-content: center; }
.up-foot { font-size: 13px; margin-top: 30px; }
.up-foot svg.i { width: 14px; height: 14px; }

/* ---------- Verwaltung ---------- */
.app { grid-template-columns: 272px 1fr; }
aside { background: color-mix(in srgb, var(--bg) 55%, var(--line-2)); border-right: 0; padding: 20px 14px; -webkit-backdrop-filter: blur(24px) saturate(1.6); backdrop-filter: blur(24px) saturate(1.6); }
.brand { gap: 12px; padding: 4px 8px 18px; }
.brand .brandmark { width: 42px; height: 42px; }
.brand .brandmark svg.i { width: 21px; height: 21px; }
.brand b { font-size: 16px; }
.brand small { font-size: 12.5px; }
.nav { height: 38px; padding: 8px 12px; border-radius: 10px; font-size: 14.5px; color: var(--fg); font-weight: 400; }
.nav:hover { background: color-mix(in srgb, var(--fg) 7%, transparent); }
.nav.sel { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); font-weight: 600; }
.nav .dot { width: 10px; height: 10px; margin: 0 3px 0 2px; }
.sect { font-size: 11.5px; padding: 20px 12px 8px; }
aside .foot { border-top-color: color-mix(in srgb, var(--fg) 10%, transparent); }
.dot.f0, .pico.f0 { --c: #0a84ff; } .dot.f1, .pico.f1 { --c: #8e7cf8; } .dot.f2, .pico.f2 { --c: #30b874; } .dot.f3, .pico.f3 { --c: #ff9f0a; }
.dot.f4, .pico.f4 { --c: #ff5c8a; } .dot.f5, .pico.f5 { --c: #f5c400; } .dot.f6, .pico.f6 { --c: #32ade6; } .dot.f7, .pico.f7 { --c: #af7bf0; }
.nav .dot[class*=" f"] { background: var(--c); }

.topbar { border-bottom: 0; padding: 16px 32px 6px; background: color-mix(in srgb, var(--bg) 80%, transparent); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }
.search input { height: 38px; border-radius: 999px; border-color: var(--line); background: var(--surface); padding-left: 38px; box-shadow: var(--shadow-sm); }
.search svg.i { left: 14px; }
.content { padding: 18px 32px 90px; }
.ph { margin-bottom: 22px; align-items: center; }
.ph h1 { font-size: 34px; font-weight: 700; letter-spacing: -.03em; line-height: 1.15; }
.ph .sub { font-size: 15px; margin-top: 4px; }
.ph .actions .btn { height: 40px; padding: 0 18px; font-size: 14.5px; }
.sh h2 { letter-spacing: .04em; }
.seg { border: 0; background: var(--hover); border-radius: 999px; }
.seg button { border-radius: 999px; padding: 5px 13px; }
.seg button.sel { background: var(--surface); color: var(--fg); box-shadow: var(--shadow-sm); }
.linkbox { border: 0; border-radius: 999px; padding: 5px 5px 5px 16px; box-shadow: var(--shadow-sm); }
.card { border-color: transparent; box-shadow: var(--shadow-sm); }
.card:hover { border-color: transparent; }
.pill { padding: 3px 10px; }

/* Projektliste (wie eine iOS-Tabelle) */
.plist { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 6px 0; overflow: hidden; }
.prow { position: relative; display: grid; grid-template-columns: 46px minmax(0, 1fr) 90px 120px auto 30px; align-items: center; gap: 16px; padding: 12px 20px; color: var(--fg); text-decoration: none; }
.prow + .prow::before { content: ""; position: absolute; top: 0; left: 82px; right: 20px; border-top: 1px solid var(--line); }
a.prow:hover { background: color-mix(in srgb, var(--fg) 3.5%, transparent); }
.pico { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; background: color-mix(in srgb, var(--c, #0a84ff) 18%, var(--surface)); color: var(--c, #0a84ff); }
.pico svg.i { width: 24px; height: 24px; fill: currentColor; stroke: currentColor; stroke-width: 1.2; }
.prow .pn { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.prow .pn b { font-size: 16px; font-weight: 600; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prow .pn small { font-size: 13.5px; color: var(--muted); }
.prow .pm { color: var(--muted); font-size: 14px; white-space: nowrap; }
.prow .c2 { text-align: right; }
.prow .btn.sm { height: 32px; padding: 0 15px; font-size: 13.5px; }
.prow .btn .kurz { display: none; }
@media (max-width: 1100px) { .prow { grid-template-columns: 46px minmax(0, 1fr) 120px auto 30px; } .prow .c2 { display: none; } }
@media (max-width: 900px) { .topbar { padding: 12px 16px 6px; } .content { padding: 14px 16px 90px; } .ph h1 { font-size: 28px; } }
@media (max-width: 640px) {
  .prow { grid-template-columns: 40px minmax(0, 1fr) 34px 30px; gap: 12px; padding: 11px 14px; }
  .prow + .prow::before { left: 66px; right: 14px; }
  .pico { width: 40px; height: 40px; border-radius: 11px; }
  .prow .c3, .prow .btn .lbl { display: none; } .prow .btn .kurz { display: inline-flex; } .prow .btn.sm { padding: 0; width: 32px; }
  .up-card { border-radius: 22px; padding: 18px; } .up-main { padding: 10px; } .drop { padding: 26px 12px 24px; } .drop strong { font-size: 21px; }
  .up-head { padding: 24px 0 20px; }
}
.drop span { display: block; }
.drop .pick { display: flex; width: fit-content; margin: 20px auto 0; }
.up-fields { padding: 20px 22px; }
.up-fields .field { margin-bottom: 12px; }
.up-fields textarea { min-height: 44px; height: 44px; padding: 11px 14px; }
.up-title p { margin-bottom: 24px; }
.fcard .ttl, .folder .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
