/* Elias Fahrner · Portal – schlicht, dunkelgrüner Akzent, Hell/Dunkel */

:root {
  --bg: #F3F5F2;
  --surface: #FFFFFF;
  --surface-2: #F7F9F6;
  --field: #FFFFFF;
  --line: #DCE1DB;
  --line-strong: #C4CCC3;
  --text: #161A17;
  --muted: #59625C;
  --accent: #1F5135;
  --accent-hover: #173F29;
  --accent-ink: #FFFFFF;
  --accent-text: #1F5135;
  --soft: #E3EDE5;
  --focus: #3E8E60;
  --danger: #B42318;
  --danger-soft: #FCE9E7;
  --ok: #1F5135;
  --shadow: 0 1px 2px rgba(16, 24, 18, .04), 0 4px 16px rgba(16, 24, 18, .04);
  --radius: 14px;
  --radius-sm: 10px;
  --font: "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0E1110; --surface: #161A18; --surface-2: #1B201D; --field: #101312;
    --line: #2A312D; --line-strong: #3A433E; --text: #E6EAE7; --muted: #9AA39D;
    --accent: #2D6A47; --accent-hover: #357A52; --accent-text: #86C79F; --soft: #1A2A20;
    --danger: #F28B82; --danger-soft: #3A1D1B; --ok: #86C79F;
    --shadow: none;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0E1110; --surface: #161A18; --surface-2: #1B201D; --field: #101312;
  --line: #2A312D; --line-strong: #3A433E; --text: #E6EAE7; --muted: #9AA39D;
  --accent: #2D6A47; --accent-hover: #357A52; --accent-text: #86C79F; --soft: #1A2A20;
  --danger: #F28B82; --danger-soft: #3A1D1B; --ok: #86C79F;
  --shadow: none;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh;
  background: var(--bg); color: var(--text);
  font: 15px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}
h1, h2 { margin: 0; line-height: 1.2; font-weight: 600; letter-spacing: -0.01em; text-wrap: balance; }
h1 { font-size: 28px; }
h2 { font-size: 17px; margin-bottom: 14px; }
p { margin: 0; }
a { color: var(--accent-text); }
a:hover { color: var(--accent-hover); }
:root[data-theme="dark"] a:hover { color: var(--text); }
code { font-family: var(--mono); font-size: .88em; padding: 1px 5px; border-radius: 5px; background: var(--surface-2); border: 1px solid var(--line); overflow-wrap: anywhere; }
strong { font-weight: 600; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ic { display: block; flex: none; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* ---------- Bausteine ---------- */
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 600; font-size: 17px; min-height: 44px; min-width: 0; }
.brand:hover { color: var(--text); }
.brand-mark { display: inline-flex; width: 32px; height: 32px; border-radius: 8px; background: var(--accent); color: #FFFFFF; align-items: center; justify-content: center; flex: none; }
.brand-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 16px; border-radius: var(--radius-sm);
  border: 1px solid transparent; font: inherit; font-weight: 600; font-size: 15px;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .15s, border-color .15s, color .15s;
}
.btn:disabled { opacity: .5; cursor: default; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); color: var(--accent-ink); }
.btn-outline { background: var(--surface); color: var(--text); border-color: var(--line); font-weight: 500; }
.btn-outline:hover:not(:disabled) { border-color: var(--focus); color: var(--text); }
.btn-danger { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.btn-danger:hover { border-color: var(--danger); }
.btn-block { width: 100%; min-height: 48px; }
.btn.sm { min-height: 36px; padding: 0 12px; font-size: 14px; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 44px; height: 44px; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer;
}
.icon-btn:hover:not(:disabled) { border-color: var(--focus); }
.icon-btn:disabled { opacity: .35; cursor: default; }
.icon-btn.sm { width: 36px; height: 36px; }

.theme-btn .i-sun { display: none; }
:root[data-theme="dark"] .theme-btn .i-sun { display: block; }
:root[data-theme="dark"] .theme-btn .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-btn .i-sun { display: block; }
  :root:not([data-theme="light"]) .theme-btn .i-moon { display: none; }
}

.pill { display: inline-flex; align-self: flex-start; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px; background: var(--soft); color: var(--accent-text); font-size: 12.5px; font-weight: 500; }
.badge { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 6px; background: var(--soft); color: var(--accent-text); font-size: 11.5px; font-weight: 600; vertical-align: 2px; }
.badge-soft { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.avatar { display: inline-flex; width: 34px; height: 34px; border-radius: 50%; background: var(--soft); color: var(--accent-text); align-items: center; justify-content: center; font-weight: 600; font-size: 14px; flex: none; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); min-width: 0; }
.card-danger { border-color: var(--line); }
.alert { padding: 11px 14px; border-radius: var(--radius-sm); font-size: 14px; margin-bottom: 18px; border: 1px solid transparent; }
.alert-err { background: var(--danger-soft); color: var(--danger); }
.alert-ok { background: var(--soft); color: var(--ok); }
.stack-sm { display: flex; flex-direction: column; gap: 6px; }

/* ---------- Formulare ---------- */
.form { display: flex; flex-direction: column; gap: 16px; align-items: stretch; }
.form > .btn:not(.btn-block) { align-self: flex-start; }
.inline-form { display: inline-flex; margin: 0; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; border: 0; padding: 0; margin: 0; }
.field > label, .field > legend { font-size: 13.5px; font-weight: 500; padding: 0; }
.hint { font-size: 12.5px; color: var(--muted); }
input[type="text"], input[type="password"], input[type="search"] {
  width: 100%; min-width: 0; height: 44px; padding: 0 12px;
  border-radius: var(--radius-sm); border: 1px solid var(--line);
  background: var(--field); color: var(--text); font: inherit;
}
input[type="text"]:hover, input[type="password"]:hover { border-color: var(--line-strong); }
input[type="text"]:focus, input[type="password"]:focus { border-color: var(--focus); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 22%, transparent); }
input::placeholder { color: var(--muted); opacity: .75; }
.pw { position: relative; display: flex; }
.pw input { padding-right: 48px; }
.pw-toggle { position: absolute; right: 2px; top: 2px; width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; }
.pw-toggle:hover, .pw-toggle[aria-pressed="true"] { color: var(--text); }
.check { display: flex; align-items: center; gap: 10px; min-height: 32px; font-size: 14px; cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); flex: none; }
.check:has(input:disabled) { color: var(--muted); cursor: default; }

.icon-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.icon-opt { position: relative; cursor: pointer; }
.icon-opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.icon-box { display: inline-flex; width: 44px; height: 44px; align-items: center; justify-content: center; border-radius: var(--radius-sm); border: 1px solid var(--line); color: var(--muted); background: var(--field); }
.icon-opt:hover .icon-box { border-color: var(--line-strong); color: var(--text); }
.icon-opt input:checked + .icon-box { border-color: var(--accent-text); background: var(--soft); color: var(--accent-text); box-shadow: inset 0 0 0 1px var(--accent-text); }
.icon-opt input:focus-visible + .icon-box { outline: 2px solid var(--focus); outline-offset: 2px; }

/* ---------- Anmelden ---------- */
.auth { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.auth-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; max-width: 1200px; margin: 0 auto; padding: 16px 20px; }
.auth-main { flex: 1; display: flex; align-items: center; justify-content: center; padding: 16px 16px 48px; }
.auth-card { width: 100%; max-width: 410px; padding: 34px 30px; display: flex; flex-direction: column; gap: 22px; }
.auth-card h1 { margin-top: 8px; }
.auth-foot { padding: 20px; text-align: center; font-size: 13px; color: var(--muted); }

/* ---------- Kopfleiste & Navigation ---------- */
.topbar { position: sticky; top: 0; z-index: 10; background: var(--surface); border-bottom: 1px solid var(--line); }
.topbar-in { display: flex; align-items: center; gap: 10px; max-width: 1280px; margin: 0 auto; padding: 10px 24px; }
.topbar .brand { margin-right: auto; }
.user-chip { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 10px 0 5px; border-radius: 999px; color: var(--text); text-decoration: none; font-size: 14px; font-weight: 500; }
.user-chip:hover { background: var(--surface-2); color: var(--text); }
.user-name { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.layout { display: flex; flex-wrap: wrap; gap: 32px; max-width: 1280px; margin: 0 auto; padding: 32px 24px 56px; }
.sidenav { flex: 0 1 210px; display: flex; flex-direction: column; gap: 4px; align-self: flex-start; position: sticky; top: 90px; }
.snav-link { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; border-radius: var(--radius-sm); color: var(--text); text-decoration: none; font-weight: 500; }
.snav-link:hover { background: var(--surface); color: var(--text); }
.snav-link.is-active { background: var(--soft); color: var(--accent-text); font-weight: 600; }
.content { flex: 999 1 560px; min-width: 0; }
.bnav { display: none; }

.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 24px; }
.page-head p { margin-top: 6px; }
.back { display: inline-block; margin-bottom: 8px; font-size: 14px; text-decoration: none; }
.search { display: flex; align-items: center; gap: 8px; height: 44px; width: 280px; max-width: 100%; padding: 0 12px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface); color: var(--muted); }
.search:focus-within { border-color: var(--focus); }
.search input { border: 0; height: 40px; padding: 0; background: transparent; outline: none; }

/* ---------- Kacheln ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.tile {
  display: flex; flex-direction: column; gap: 14px; min-height: 172px; padding: 20px;
  border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface);
  color: var(--text); text-decoration: none; box-shadow: var(--shadow);
  transition: border-color .15s, transform .15s;
}
.tile:hover { border-color: var(--focus); color: var(--text); transform: translateY(-1px); }
.tile-icon { display: inline-flex; width: 44px; height: 44px; border-radius: var(--radius-sm); background: var(--soft); color: var(--accent-text); align-items: center; justify-content: center; }
.tile-text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.tile-name { font-weight: 600; font-size: 16px; overflow-wrap: anywhere; }
.tile-desc { font-size: 14px; color: var(--muted); }
.tile-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13.5px; }
.tile-url { color: var(--muted); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--mono); font-size: 12.5px; }
.tile-open { display: inline-flex; align-items: center; gap: 4px; color: var(--accent-text); font-weight: 600; flex: none; }
.tile-add { align-items: center; justify-content: center; gap: 10px; border-style: dashed; border-width: 1.5px; background: transparent; color: var(--muted); font-weight: 500; box-shadow: none; }
.tile-add:hover { color: var(--text); }
.no-results { margin-top: 16px; }
.empty { text-align: center; color: var(--muted); }

/* ---------- Verwaltung ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; align-items: start; }
.card-wide { grid-column: 1 / -1; }
.rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); min-width: 0; }
.row:first-child { border-top: 0; padding-top: 0; }
.row:last-child { padding-bottom: 0; }
.row-icon { display: inline-flex; width: 38px; height: 38px; border-radius: 9px; background: var(--soft); color: var(--accent-text); align-items: center; justify-content: center; flex: none; }
.row-main { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.row-title { font-weight: 600; overflow-wrap: anywhere; }
.row-sub { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-acts { display: flex; align-items: center; gap: 6px; flex: none; }
.rows.hosted { margin-top: 14px; }
.mono { font-family: var(--mono); font-size: 13.5px; }
.card .muted + .form { margin-top: 14px; }

/* ---------- Handy ---------- */
@media (max-width: 760px) {
  h1 { font-size: 24px; }
  .topbar-in { padding: 8px 16px; gap: 8px; }
  .user-name, .btn-logout span { display: none; }
  .btn-logout { width: 44px; padding: 0; }
  .user-chip { padding: 0; }
  .user-chip .avatar { width: 40px; height: 40px; }
  .layout { padding: 20px 16px 104px; gap: 0; }
  .sidenav { display: none; }
  .bnav {
    display: grid; grid-auto-columns: minmax(0, 1fr); grid-auto-flow: column;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
    padding: 6px 8px calc(8px + env(safe-area-inset-bottom));
    background: var(--surface); border-top: 1px solid var(--line);
  }
  .bnav-link { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 54px; border-radius: var(--radius-sm); color: var(--muted); text-decoration: none; font-size: 12px; font-weight: 500; }
  .bnav-link.is-active { color: var(--accent-text); font-weight: 600; }
  .page-head { margin-bottom: 18px; }
  .search { width: 100%; height: 46px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .tile { min-height: 140px; padding: 16px; gap: 12px; }
  .tile-icon { width: 40px; height: 40px; }
  .tile-name { font-size: 15px; }
  .tile-desc { font-size: 13px; }
  .tile-foot { display: none; }
  .cards { grid-template-columns: minmax(0, 1fr); }
  .card { padding: 18px; }
  .auth-card { padding: 28px 20px; border: 0; background: transparent; box-shadow: none; }
  .auth-main { align-items: flex-start; padding-top: 24px; }
  input[type="text"], input[type="password"], input[type="search"] { font-size: 16px; height: 48px; }
  .row { flex-wrap: wrap; }
  .row-main { flex: 1 1 calc(100% - 52px); }
  .row-acts { margin-left: 50px; }
}
@media (max-width: 360px) {
  .tiles { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* ---------- 1.2.0: einspaltige Seiten ---------- */
.stack { display: flex; flex-direction: column; gap: 16px; max-width: 860px; }
.card-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 12px; margin-bottom: 14px; }
.card-head h2 { margin: 0; }
.form-row, .form.form-row { display: flex; flex-direction: row; flex-wrap: wrap; align-items: flex-end; gap: 12px 16px; }
.form-row > .btn, .form-row > .inline-form, .form.form-row > .btn:not(.btn-block) { flex: none; align-self: flex-end; }
p.grow { align-self: center; }
.grow { flex: 1 1 260px; min-width: 0; }
.field-pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin: 0 0 18px; }
.facts div { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 14px; min-width: 0; }
.facts dt { font-size: 12.5px; color: var(--muted); }
.facts dd { margin: 2px 0 0; font-weight: 600; display: flex; align-items: center; gap: 6px; overflow-wrap: anywhere; }
.form + .facts { margin: 18px 0 0; }
.add-box { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 14px; }
.add-box summary { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 12px; border-radius: var(--radius-sm); border: 1px solid var(--line); cursor: pointer; font-weight: 600; list-style: none; }
.add-box summary::-webkit-details-marker { display: none; }
.add-box summary:hover { border-color: var(--focus); }
.add-box[open] summary { margin-bottom: 16px; }
.hint-box { margin-top: 16px; padding: 10px 14px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--line); }
.badge-warn { background: var(--danger-soft); color: var(--danger); }
.note-lock { display: flex; align-items: center; gap: 6px; margin: -6px 0 14px; font-size: 13.5px; }
.tile-foot { justify-content: flex-end; }

/* ---------- 1.3.0 ---------- */
textarea { width: 100%; min-width: 0; padding: 10px 12px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--field); color: var(--text); font: inherit; resize: vertical; }
textarea:focus { border-color: var(--focus); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 22%, transparent); }
.legal-links { display: inline-flex; flex-wrap: wrap; gap: 8px; justify-content: center; color: var(--muted); font-size: 13px; }
.legal-links a { color: var(--muted); text-decoration: none; }
.legal-links a:hover { color: var(--text); text-decoration: underline; }
.site-foot { margin-top: 40px; padding-top: 16px; border-top: 1px solid var(--line); display: flex; justify-content: center; }
.cookie-note {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 40; margin: 0 auto; max-width: 720px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 14px 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 10px 30px rgba(0, 0, 0, .18);
}
.cookie-note p { flex: 1 1 320px; margin: 0; font-size: 14px; }
.cookie-note .btn { flex: none; }
.auth-wide { align-items: flex-start; }
.legal-card { width: 100%; max-width: 820px; padding: 32px; }
.legal { max-width: 760px; }
.legal h1 { margin-bottom: 4px; }
.legal h2 { margin: 28px 0 8px; font-size: 18px; }
.legal p, .legal li { line-height: 1.65; }
.legal p { margin: 0 0 10px; }
.legal ul { margin: 0 0 10px; padding-left: 20px; }
.table-box { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); margin: 0 0 12px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-weight: 600; color: var(--muted); font-size: 12.5px; padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }
.code-input { font-family: var(--mono); letter-spacing: .12em; font-size: 18px !important; }
.steps { margin: 0 0 18px; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.qr-row { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; margin-bottom: 20px; }
.qr-box { background: #FFFFFF; padding: 8px; border-radius: var(--radius-sm); border: 1px solid var(--line); line-height: 0; }
.qr-box .qr { width: 220px; height: 220px; display: block; }
.qr-info { display: flex; flex-direction: column; gap: 6px; min-width: 0; flex: 1 1 240px; }
.secret { font-size: 16px; padding: 8px 10px; letter-spacing: .06em; word-break: break-all; }
.codes { list-style: none; padding: 0; margin: 0 0 14px; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.codes code { display: block; text-align: center; font-size: 16px; padding: 8px; }
.badge .ic { margin-right: 3px; }
@media (max-width: 760px) {
  .cookie-note { bottom: 12px; left: 12px; right: 12px; }
  .has-bnav .cookie-note { bottom: calc(84px + env(safe-area-inset-bottom)); }
  .legal-card { padding: 20px 4px; border: 0; background: transparent; box-shadow: none; }
  .qr-box .qr { width: 200px; height: 200px; }
}
@media print { .cookie-note, .topbar, .sidenav, .bnav, .site-foot { display: none !important; } }

/* ---------- 1.4.0: Freigaben ---------- */
select {
  width: 100%; min-width: 0; height: 44px; padding: 0 34px 0 12px;
  border-radius: var(--radius-sm); border: 1px solid var(--line); color: var(--text); font: inherit;
  appearance: none; -webkit-appearance: none; cursor: pointer;
  background-color: var(--field);
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 52%, calc(100% - 13px) 52%;
  background-size: 5px 5px; background-repeat: no-repeat;
}
select:hover { border-color: var(--line-strong); }
select:focus { border-color: var(--focus); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 22%, transparent); }
.btn-ghost { background: transparent; color: var(--accent-text); border-color: transparent; font-weight: 500; }
.btn-ghost:hover:not(:disabled) { background: var(--surface-2); }
.share-form { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.4fr) minmax(0, 1fr) auto; gap: 12px; align-items: end; margin-bottom: 4px; }
.share-form .field { margin: 0; }
.sub-h { font-size: 13px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: var(--muted); margin: 22px 0 6px; }
@media (max-width: 720px) {
  .share-form { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .share-form .field:nth-of-type(2) { grid-column: 1 / -1; order: -1; }
  .share-form > .btn { grid-column: 1 / -1; }
}
@media (max-width: 640px) { select { font-size: 16px; height: 48px; } }

/* ---------- 1.7.0: Dateien / geteilte Links ---------- */
.share-name { overflow-wrap: anywhere; }
.crumbs { margin: 0; font-size: 14px; color: var(--muted); overflow-wrap: anywhere; }
.crumbs a { color: var(--accent-text); }
.row-folder { display: inline-flex; align-items: center; gap: 6px; }
a.row-main { color: inherit; text-decoration: none; }
a.row-main:hover .row-title { color: var(--accent-text); }
.cloud-line { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 12px 0 0; }
.cloud-line a { color: var(--accent-text); }

/* ---------- 1.14.0: Ansicht geteilter Links ---------- */
.share { width: 100%; max-width: 920px; margin-inline: auto; display: flex; flex-direction: column; gap: 18px; padding: 26px; }
.share.share-narrow { max-width: 520px; }
.share h1 { margin: 0; font-size: 24px; line-height: 1.25; }
.share-head { display: flex; align-items: center; gap: 16px; }
.share-head-text, .share-file-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.share-head-text p, .share-file-text p { margin: 0; font-size: 14px; }
.share-zip { flex: none; gap: 8px; }
.share-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 14px; color: var(--muted); padding: 10px 14px; background: var(--surface-2); border-radius: 10px; }
.share-crumbs a { color: var(--accent-text); text-decoration: none; }
.share-crumbs a:hover { text-decoration: underline; }
.share-crumbs [aria-current] { color: var(--text); font-weight: 500; }
.share-crumbs .sep { color: var(--line-strong); }
.ft { flex: none; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--surface-2); color: var(--muted); }
.share-head .ft, .share-file .ft { width: 56px; height: 56px; border-radius: 14px; }
.ft-ordner { background: var(--soft); color: var(--accent-text); }
.ft-bild { background: color-mix(in srgb, #2E69CF 13%, transparent); color: #2E69CF; }
.ft-video { background: color-mix(in srgb, #7350C8 13%, transparent); color: #7350C8; }
.ft-audio { background: color-mix(in srgb, #C0567A 13%, transparent); color: #C0567A; }
.ft-pdf, .ft-gone { background: color-mix(in srgb, #C2412D 12%, transparent); color: #C2412D; }
.ft-archiv { background: color-mix(in srgb, #A07A2C 14%, transparent); color: #A07A2C; }
.ft-tabelle { background: color-mix(in srgb, #1F7A45 13%, transparent); color: #1F7A45; }
.ft-praesentation { background: color-mix(in srgb, #C76A1E 13%, transparent); color: #C76A1E; }
.ft-text { background: color-mix(in srgb, #3D63B8 13%, transparent); color: #3D63B8; }
:root[data-theme="dark"] .ft-bild { color: #7FA8F0; } :root[data-theme="dark"] .ft-video { color: #B49CF0; } :root[data-theme="dark"] .ft-audio { color: #E58BAA; }
:root[data-theme="dark"] .ft-pdf, :root[data-theme="dark"] .ft-gone { color: #F28B82; } :root[data-theme="dark"] .ft-archiv { color: #E3BF6A; } :root[data-theme="dark"] .ft-tabelle { color: #86C79F; }
:root[data-theme="dark"] .ft-praesentation { color: #F0A35E; } :root[data-theme="dark"] .ft-text { color: #8FB0F2; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ft-bild { color: #7FA8F0; } :root:not([data-theme="light"]) .ft-video { color: #B49CF0; } :root:not([data-theme="light"]) .ft-audio { color: #E58BAA; }
  :root:not([data-theme="light"]) .ft-pdf, :root:not([data-theme="light"]) .ft-gone { color: #F28B82; } :root:not([data-theme="light"]) .ft-archiv { color: #E3BF6A; } :root:not([data-theme="light"]) .ft-tabelle { color: #86C79F; }
  :root:not([data-theme="light"]) .ft-praesentation { color: #F0A35E; } :root:not([data-theme="light"]) .ft-text { color: #8FB0F2; } }
.sf { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.sf-head, .sf-row { display: grid; grid-template-columns: minmax(0, 1fr) 6.5rem 6.5rem 5.5rem; align-items: center; gap: 12px; padding: 0 12px; }
.sf-head { height: 38px; font-size: 12.5px; color: var(--muted); background: var(--surface-2); border-bottom: 1px solid var(--line); }
.sf-list { list-style: none; margin: 0; padding: 0; }
.sf-row { min-height: 60px; border-bottom: 1px solid var(--line); transition: background .12s; }
.sf-row:last-child { border-bottom: 0; }
.sf-row:hover { background: var(--surface-2); }
.sf-main { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 9px 0; color: inherit; text-decoration: none; }
.sf-main:hover { color: inherit; }
.sf-main:hover .sf-name { color: var(--accent-text); }
.sf-text { display: flex; flex-direction: column; min-width: 0; }
.sf-name { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sf-sub { display: none; font-size: 12.5px; color: var(--muted); }
.sf-size, .sf-date { font-size: 13.5px; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sf-acts { display: flex; justify-content: flex-end; gap: 6px; }
.sf-acts .icon-btn { width: 36px; height: 36px; }
.share-file { display: flex; align-items: center; gap: 16px; }
.share-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.share-actions .btn { gap: 8px; flex: 1 1 12rem; min-height: 46px; }
.share-preview { display: block; border-radius: 12px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); }
.share-preview img { display: block; width: 100%; max-height: 360px; object-fit: contain; }
.share-lock { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; }
.share-lock p { margin: 0; }
.share-lock-ic { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 16px; background: var(--soft); color: var(--accent-text); margin-bottom: 4px; }
.share-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 26px 0 10px; }
.share-empty p { margin: 0; }
.share-foot { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 0; font-size: 12.5px; color: var(--muted); }
@media (max-width: 640px) {
  .share { padding: 18px; gap: 14px; }
  .share h1 { font-size: 20px; }
  .share-head { flex-wrap: wrap; }
  .share-head .ft { width: 48px; height: 48px; }
  .share-zip { flex: 1 1 100%; min-height: 46px; }
  .sf-head { display: none; }
  .sf-row { grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding: 0 10px; }
  .sf-size, .sf-date { display: none; }
  .sf-sub { display: block; }
}

/* 1.16.1: Knöpfe in Formularzeilen auf Höhe der Eingabefelder */
.form.share-form > .btn:not(.btn-block), .form.form-row > .btn:not(.btn-block) { align-self: end; }
.form-hint { margin: 8px 0 16px; }
@media (max-width: 640px) { .form-row > .btn, .share-form > .btn { min-height: 48px; } }

/* 1.21.0: Zugang zu Anwendungen */
.zugang { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 2px; }
.zugang legend { font-weight: 600; font-size: 14px; margin-bottom: 6px; padding: 0; }
.zugang-liste { margin: 2px 0 6px 28px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); display: flex; flex-direction: column; gap: 0; }
.zugang:not(:has(input[value="auswahl"]:checked)) .zugang-liste { display: none; }
