/* Inter – self-hosted (offline-fähig, keine Dritt-Abhängigkeit), wie im Portfolio.
   Gewichte 400/500/600/700, font-display:swap. */
@font-face { font-family:'Inter'; font-style:normal; font-weight:400; font-display:swap; src:url('/fonts/inter-400.woff2') format('woff2'); }
@font-face { font-family:'Inter'; font-style:normal; font-weight:500; font-display:swap; src:url('/fonts/inter-500.woff2') format('woff2'); }
@font-face { font-family:'Inter'; font-style:normal; font-weight:600; font-display:swap; src:url('/fonts/inter-600.woff2') format('woff2'); }
@font-face { font-family:'Inter'; font-style:normal; font-weight:700; font-display:swap; src:url('/fonts/inter-700.woff2') format('woff2'); }

/* Design-Tokens = CI des Portfolios (Levin Anneler / Levin VFX): hell/clean „Editorial",
   tiefes Navy #14315E, Inter, Pill-Buttons, weiche diffuse Navy-Schatten, grosszügiger Weissraum.
   Helle Basis; dunkle Variante (Navy-getönt, on-brand) per @media UND manuellem Umschalter. */
:root, :root[data-theme="light"] {
  --bg: #f4f6fa;
  --surface: #ffffff;
  --surface-2: #eef1f6;
  --fill: rgba(14,27,51,.05);
  --fill-2: rgba(14,27,51,.09);
  --border: rgba(14,27,51,.10);
  --border-strong: rgba(14,27,51,.18);
  --text: #0e1b33;
  --muted: #55617a;
  --accent: #14315e;
  --accent-press: #1b406f;
  --danger: #c24536;
  --ok: #2e7d57;
  --radius: 16px;
  --radius-s: 10px;
  --radius-btn: 999px;
  --shadow: 0 1px 2px rgba(14,27,51,.04), 0 10px 30px -16px rgba(14,27,51,.16);
  --shadow-s: 0 1px 2px rgba(14,27,51,.04), 0 6px 18px -14px rgba(14,27,51,.13);
  --shadow-hover: 0 20px 44px -22px rgba(14,27,51,.28);
  --shadow-btn: 0 10px 24px -12px rgba(20,49,94,.55);
  --ease: cubic-bezier(.22,1,.36,1);
  --brand-grad: linear-gradient(160deg, #1b406f 0%, #0e1b33 100%);
  --topbar-bg: rgba(248,250,253,.75);
  --lb-bg: rgba(244,246,250,.72);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a1224; --surface: #0f1c33; --surface-2: #16294a; --fill: rgba(255,255,255,.06); --fill-2: rgba(255,255,255,.11);
    --border: rgba(255,255,255,.12); --border-strong: rgba(255,255,255,.20); --text: #eaf0fa; --muted: #9ba8c2;
    --accent: #4e7cb8; --accent-press: #6e9bd6; --danger: #e06a5c; --ok: #4fb985;
    --shadow: 0 1px 2px rgba(0,0,0,.5), 0 12px 34px -18px rgba(0,0,0,.6);
    --shadow-s: 0 1px 2px rgba(0,0,0,.45), 0 6px 18px -14px rgba(0,0,0,.5);
    --shadow-hover: 0 22px 48px -22px rgba(0,0,0,.65); --shadow-btn: 0 10px 24px -12px rgba(0,0,0,.5);
    --brand-grad: linear-gradient(160deg, #2c4e82 0%, #14315e 100%);
    --topbar-bg: rgba(15,28,51,.72); --lb-bg: rgba(10,18,36,.66);
  }
}
:root[data-theme="dark"] {
  --bg: #0a1224; --surface: #0f1c33; --surface-2: #16294a; --fill: rgba(255,255,255,.06); --fill-2: rgba(255,255,255,.11);
  --border: rgba(255,255,255,.12); --border-strong: rgba(255,255,255,.20); --text: #eaf0fa; --muted: #9ba8c2;
  --accent: #4e7cb8; --accent-press: #6e9bd6; --danger: #e06a5c; --ok: #4fb985;
  --shadow: 0 1px 2px rgba(0,0,0,.5), 0 12px 34px -18px rgba(0,0,0,.6);
  --shadow-s: 0 1px 2px rgba(0,0,0,.45), 0 6px 18px -14px rgba(0,0,0,.5);
  --shadow-hover: 0 22px 48px -22px rgba(0,0,0,.65); --shadow-btn: 0 10px 24px -12px rgba(0,0,0,.5);
  --brand-grad: linear-gradient(160deg, #2c4e82 0%, #14315e 100%);
  --topbar-bg: rgba(15,28,51,.72); --lb-bg: rgba(10,18,36,.66);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  font-family: var(--font); color: var(--text); background-color: var(--bg);
  background: linear-gradient(180deg, color-mix(in srgb, var(--bg) 82%, #ffffff) 0%, var(--bg) 58%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overscroll-behavior-y: none;
}
button { font-family: inherit; cursor: pointer; color: inherit; }
a { color: var(--accent); }
.ico { display: inline-flex; align-items: center; justify-content: center; }
.ico .icn { display: block; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------- Layout ---------- */
.app { max-width: 1120px; margin: 0 auto; min-height: 100%; }

/* ---------- Kundengalerie ---------- */
.gallery { max-width: 1280px; }
.gbar { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; padding-top: max(14px, env(safe-area-inset-top)); }
.gbar-brand { display: flex; align-items: center; gap: 9px; font-weight: 600; font-size: 16px; letter-spacing: -.02em; }
.gbar-brand .dot { width: 24px; height: 24px; border-radius: 6px; background: url('/img/logo.png') center / cover no-repeat; }
.gbar-back { display: inline-flex; align-items: center; gap: 5px; text-decoration: none; color: var(--text); font-weight: 500; font-size: 15px; background: var(--fill); padding: 7px 13px 7px 10px; border-radius: var(--radius-btn); }

.hero { position: relative; margin: 4px 18px 22px; border-radius: 22px; overflow: hidden; min-height: 340px;
  background-size: cover; background-position: center; display: flex; align-items: flex-end; box-shadow: var(--shadow); }
.hero.nocover { background: var(--brand-grad); }
.hero-scrim { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.72) 0%, rgba(0,0,0,.28) 45%, rgba(0,0,0,.12) 100%); }
.hero-inner { position: relative; padding: 28px 30px 30px; color: #fff; width: 100%; }
.hero-studio { text-transform: uppercase; letter-spacing: .18em; font-size: 12px; font-weight: 700; opacity: .92; margin-bottom: 8px; }
.hero-title { font-size: clamp(28px, 6vw, 44px); line-height: 1.05; letter-spacing: -.03em; margin: 0 0 6px; text-wrap: balance; text-shadow: 0 2px 20px rgba(0,0,0,.3); }
.hero-sub { font-size: 15px; opacity: .9; margin-bottom: 18px; font-variant-numeric: tabular-nums; }
.hero .btn.primary { box-shadow: 0 6px 24px rgba(0,0,0,.28); }
@media (min-width: 700px) { .hero { min-height: 420px; } }

.gbreadcrumb { padding: 4px 20px; }
.gsubhead { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 2px 20px 14px; }
.gsubhead h2 { margin: 0; font-size: 22px; letter-spacing: -.02em; }
.gtools { padding: 0 20px 12px; }

.folderrow { display: flex; flex-wrap: wrap; gap: 10px; padding: 4px 18px 14px; }
.foldercard { display: inline-flex; align-items: center; gap: 9px; background: var(--surface); border: none; box-shadow: var(--shadow-s);
  border-radius: 10px; padding: 11px 15px 11px 12px; font-size: 15px; font-weight: 500; color: var(--text); }
.foldercard .ico { color: var(--accent); }
.foldercard:active { transform: scale(.98); }

.jgrid { display: flex; flex-direction: column; padding: 2px 18px 120px; }
.jrow { display: flex; }
.jcell { position: relative; overflow: hidden; border-radius: 8px; background: var(--fill); cursor: pointer; }
.jcell img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s cubic-bezier(.2,.7,.2,1); }
.jcell:hover img { transform: scale(1.045); }
.jcell.nonimg { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--muted); padding: 10px; }
.jcell .jname { font-size: 11px; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }

/* Kachel-Aktionen (Herz + Download) */
.jcell .cbtn { position: absolute; top: 7px; width: 30px; height: 30px; border-radius: 50%; border: none;
  background: rgba(0,0,0,.42); color: #fff; display: grid; place-items: center; opacity: 0;
  backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); transition: opacity .15s, transform .08s; z-index: 2; }
.jcell:hover .cbtn { opacity: 1; }
.jcell .cbtn:active { transform: scale(.88); }
.jcell .cbtn.heart { left: 7px; }
.jcell .cbtn.dl { right: 7px; }
.jcell .cbtn.heart.on { opacity: 1; color: #ff375f; }
@media (hover: none) { .jcell .cbtn { opacity: 1; background: rgba(0,0,0,.35); } }
.jcell.gsel { box-shadow: inset 0 0 0 3px var(--accent); }
.jcell .gselmark { position: absolute; top: 7px; left: 7px; width: 24px; height: 24px; border-radius: 50%;
  background: var(--accent); color: #fff; display: grid; place-items: center; z-index: 3; }

/* Galerie-Toolbar + Footer */
.gtoolbar { display: flex; align-items: center; gap: 8px; padding: 4px 20px 10px; flex-wrap: wrap; }
.gtoolbar .spacer { flex: 1; }
.gfooter { text-align: center; color: var(--muted); font-size: 13px; margin-top: 26px; padding: 26px 20px calc(30px + var(--safe-b)); border-top: .5px solid var(--border); }
.gfooter .secure { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.gfooter .secure .ico { color: var(--ok); }

/* Lightbox: Zoom & Favorit */
.lb-media.zoomed { cursor: grab; }
.lb-media.zoomed img { transition: none; cursor: grab; }
.lb-fav, .lb-ss { width: 38px; height: 38px; border-radius: 50%; border: none; background: var(--fill-2); color: var(--text); display: grid; place-items: center; }
.lb-fav.on { color: #ff375f; }
.lb-fav:active, .lb-ss:active { transform: scale(.9); }
.lb-right { display: flex; gap: 6px; align-items: center; }

.langsel { border: none; background: var(--fill); color: var(--text); border-radius: 9px; padding: 7px 9px; font-size: 13px; font-weight: 600; flex: none; }
.dash-sec-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 26px 0 10px; }
.dash-sec-row .dash-sec { margin: 0; }

.shell { display: flex; min-height: 100dvh; align-items: stretch; }
.main { flex: 1; min-width: 0; }

.sidebar {
  width: 252px; flex: none; background: var(--bg); border-right: .5px solid var(--border);
  padding: 16px 12px; display: flex; flex-direction: column; gap: 3px;
  position: sticky; top: 0; height: 100dvh;
}
.sb-logo { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 17px; padding: 8px 10px 16px; letter-spacing: -.02em; cursor: pointer; }
.sb-logo .dot { width: 28px; height: 28px; border-radius: 8px; background: url('/img/logo.png') center / cover no-repeat; flex: none; }
.sb-nav { display: flex; flex-direction: column; gap: 2px; }
.navitem { display: flex; align-items: center; gap: 13px; padding: 11px 12px; border-radius: 11px; color: var(--text); text-decoration: none; font-size: 15px; font-weight: 500; transition: background .15s; }
.navitem .ico { color: var(--muted); }
.navitem:hover { background: var(--fill); }
.navitem.active { background: color-mix(in srgb, var(--accent) 15%, transparent); color: var(--accent); }
.navitem.active .ico { color: var(--accent); }
.sb-storage { margin-top: auto; padding: 14px 13px; border-radius: 14px; background: var(--fill); }
.sb-storage-head { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13.5px; }
.sb-storage-head .ico { color: var(--muted); }
.sb-bar { height: 6px; border-radius: 999px; background: color-mix(in srgb, var(--muted) 26%, transparent); overflow: hidden; margin: 10px 0 7px; }
.sb-bar-fill { height: 100%; border-radius: 999px; background: var(--accent); transition: width .4s ease; }
.sb-bar-fill.full { background: var(--danger); }
.sb-storage-sub { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }

.menubtn { display: none; }
.scrim { display: none; }

@media (max-width: 860px) {
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; z-index: 60; transform: translateX(-100%);
    transition: transform .3s cubic-bezier(.32,.72,0,1); box-shadow: 6px 0 30px rgba(0,0,0,.18); border-right: none; }
  body.nav-open .sidebar { transform: none; }
  .scrim { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 55; opacity: 0; pointer-events: none; transition: opacity .25s; }
  body.nav-open .scrim { opacity: 1; pointer-events: auto; }
  .menubtn { display: grid; }
}

/* ---------- Einstellungen ---------- */
.settings { max-width: 640px; padding: 10px 18px 120px; }
.settings-title { font-size: 27px; font-weight: 700; letter-spacing: -.03em; margin: 16px 4px 20px; }
.setcard { background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-s); padding: 18px 20px; margin-bottom: 14px; }
.setcard-title { font-size: 16px; font-weight: 600; }
.setcard-desc { color: var(--muted); font-size: 13.5px; margin-top: 3px; }
.setcard-body { margin-top: 15px; }
/* Eingabefelder in Einstellungs-Karten im App-CI (z.B. Profilname) */
.setcard input[type=text], .setcard input[type=password], .setcard input[type=email] {
  width: 100%; max-width: 340px; border: 1px solid transparent; background: var(--fill);
  border-radius: 12px; padding: 12px 14px; font-size: 15px; color: var(--text); font-family: inherit;
  transition: border-color .2s var(--ease), background .2s var(--ease);
}
.setcard input[type=text]:focus, .setcard input[type=password]:focus, .setcard input[type=email]:focus {
  outline: none; border-color: var(--accent); background: var(--surface);
}
.setcard .setcard-body .row { margin-bottom: 12px; }
/* Gesperrtes Feld (Profilname): sieht klickbar-aber-gesperrt aus, bis bestätigt */
.setcard input.locked-input { cursor: pointer; color: var(--muted); }
/* Deaktivierte Buttons (z.B. Speichern vor Entsperren) */
.btn:disabled, .btn[disabled] { opacity: .45; box-shadow: none; transform: none; pointer-events: none; }
.settings-foot { text-align: center; color: var(--muted); font-size: 12px; padding: 22px; }
.muted { color: var(--muted); font-size: 14px; }

/* ---------- Dashboard ---------- */
.dash { max-width: 780px; padding: 10px 18px 120px; }
.dash-skeleton { height: 40vh; border-radius: 16px; background: var(--fill); animation: shimmer 1.3s infinite; }
.dash-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; margin-bottom: 8px; }
.statcard { background: var(--surface); border-radius: 15px; box-shadow: var(--shadow-s); padding: 16px 18px; }
.statcard.clickable { cursor: pointer; }
.statcard.clickable:hover { background: var(--fill); }
.sc-val { font-size: 22px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.sc-lbl { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .12em; margin-top: 3px; }
.dash-sec { font-size: 15px; margin: 26px 0 10px; letter-spacing: -.01em; }
.dash-list { background: var(--surface); border-radius: 15px; box-shadow: var(--shadow-s); overflow: hidden; }
.dash-row { display: flex; align-items: center; gap: 12px; padding: 13px 15px; border-bottom: .5px solid var(--border); cursor: default; }
.dash-row:last-child { border-bottom: none; }
.dash-row .ico { color: var(--muted); flex: none; }
.dash-row.share .ico { color: var(--accent); }
.dash-row.share.exp { opacity: .55; }
.dash-row.share.exp .ico { color: var(--muted); }
.dr-main { flex: 1; min-width: 0; }
.dr-name { font-size: 14.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dr-sub { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-row .iconbtn { width: 34px; height: 34px; flex: none; }
.dash-row[onclick], .dash-list .dash-row:not(.share) { cursor: pointer; }
.dash-list .dash-row:not(.share):hover { background: var(--fill); }

/* ---------- Shared-Badge + Skeleton ---------- */
/* „Geteilt"-Status steht in der Unterzeile – kein überlagerndes Badge mehr (verhindert Überlappung mit Kebab/Auswahl) */
.shared-badge { display: none; }
.tile.skel { pointer-events: none; }
.tile.skel .thumb { animation: shimmer 1.3s infinite; }
.skel-line { height: 11px; border-radius: 5px; background: var(--fill); animation: shimmer 1.3s infinite; margin-top: 4px; }
.skel-line.short { width: 55%; }
@keyframes shimmer { 0% { opacity: .55; } 50% { opacity: 1; } 100% { opacity: .55; } }

.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px;
  padding: 12px 18px; padding-top: max(12px, env(safe-area-inset-top));
  background: var(--topbar-bg); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: .5px solid var(--border);
}
.spacer { flex: 1; }

.iconbtn {
  border: none; background: var(--fill); color: var(--text); width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center; flex: none; transition: background .15s, transform .08s;
}
.iconbtn:hover { background: var(--fill-2); }
.iconbtn:active { transform: scale(.92); }

.searchbar {
  flex: 1; display: flex; align-items: center; gap: 8px; background: var(--fill); border-radius: 10px;
  padding: 9px 13px; color: var(--muted);
}
.searchbar .ico { color: var(--muted); }
.searchbar input { border: none; background: none; outline: none; font-size: 15px; width: 100%; color: var(--text); font-family: inherit; }
.searchbar input::placeholder { color: var(--muted); }

.breadcrumb { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; padding: 18px 18px 4px; color: var(--muted); font-size: 15px; }
.breadcrumb a { text-decoration: none; color: var(--accent); }
.breadcrumb a.current { color: var(--text); font-weight: 600; }
/* Drive-artiger Seitentitel, wenn man an der Wurzel steht (einziger, aktueller Eintrag) */
.breadcrumb a.current:only-child { font-size: 26px; font-weight: 700; letter-spacing: -.03em; }
.breadcrumb .sep { opacity: .4; }

.toolbar { display: flex; gap: 9px; padding: 12px 18px; flex-wrap: wrap; align-items: center; }
@media (max-width: 640px) {
  .toolbar { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; padding-bottom: 6px; }
  .toolbar::-webkit-scrollbar { display: none; }
  .toolbar > * { flex: none; }
}

/* Konto-Popover */
.pop-backdrop { position: fixed; inset: 0; z-index: 45; }
.popover { position: absolute; background: var(--surface); border: .5px solid var(--border); border-radius: 14px;
  box-shadow: 0 10px 44px rgba(0,0,0,.20); padding: 8px; min-width: 252px; max-width: calc(100vw - 16px); }
.account-pop { animation: popin .16s ease; }
@keyframes popin { from { opacity: 0; transform: translateY(-6px) scale(.98); } to { opacity: 1; transform: none; } }
.acc-head { display: flex; align-items: center; gap: 12px; padding: 10px 10px 12px; }
.acc-avatar { width: 42px; height: 42px; border-radius: 12px; background: var(--brand-grad); color: #fff; display: grid; place-items: center; flex: none; box-shadow: inset 0 1px 1px rgba(255,255,255,.4); }
.acc-name { font-weight: 600; font-size: 15px; letter-spacing: -.01em; }
.acc-sub { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc-storage { font-size: 12.5px; color: var(--muted); padding: 0 10px 8px; font-variant-numeric: tabular-nums; }
.acc-sep { height: .5px; background: var(--border); margin: 4px 6px; }
.acc-item { display: flex; align-items: center; gap: 12px; width: 100%; border: none; background: none; color: var(--text); font-size: 14.5px; font-weight: 500; padding: 11px 10px; border-radius: 9px; text-align: left; cursor: pointer; }
.acc-item:hover { background: var(--fill); }
.acc-item .ico { color: var(--muted); }
.acc-item.danger, .acc-item.danger .ico { color: var(--danger); }
.ctxmenu { min-width: 216px; padding: 6px; }

/* Ordner: Titelbild-Badge & leerer Zustand */
.tile.folder .thumb { background: var(--surface); }
.tile.folder .thumb.folder-empty { background: var(--fill); }
.tile.folder .thumb.folder-empty .ico { color: var(--accent); opacity: .9; }
.folder-badge { position: absolute; bottom: 7px; left: 7px; width: 22px; height: 22px; border-radius: 6px;
  background: rgba(0,0,0,.5); color: #fff; display: grid; place-items: center; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }

/* Titelbild-Picker */
.coverpick { display: grid; grid-template-columns: repeat(auto-fill, minmax(74px, 1fr)); gap: 8px; max-height: 52vh; overflow-y: auto; }
.coverpick-item { border: none; padding: 0; border-radius: 8px; overflow: hidden; aspect-ratio: 1; background: var(--fill); cursor: pointer; }
.coverpick-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.coverpick-item:hover { outline: 2px solid var(--accent); outline-offset: -2px; }

/* Farb-Swatches */
.swatches { display: flex; flex-wrap: wrap; gap: 12px; padding: 6px 0; }
.swatch, .swatch-none, .swatch-custom { width: 38px; height: 38px; border-radius: 50%; border: none; cursor: pointer; display: grid; place-items: center; position: relative; }
.swatch { box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.swatch.active::after, .swatch-none.active::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--accent); }
.swatch-none { background: var(--fill); color: var(--muted); }
.swatch-custom { background: var(--fill); color: var(--muted); overflow: hidden; }
.colorcustom { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* Upload-Panel (pro Datei, wie Google Drive) */
.uploadpanel { position: fixed; right: 16px; bottom: calc(16px + var(--safe-b)); z-index: 55; width: 330px; max-width: calc(100vw - 24px);
  background: var(--surface); border: .5px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; }
.up-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-bottom: .5px solid var(--border); }
.up-title { font-weight: 600; font-size: 14px; letter-spacing: -.01em; }
.up-close { border: none; background: none; color: var(--muted); display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; cursor: pointer; flex: none; }
.up-close:hover { background: var(--fill); color: var(--text); }
.up-list { max-height: 300px; overflow-y: auto; padding: 6px; }
.up-row { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 8px; }
.up-row .ico { color: var(--muted); flex: none; }
.up-row.ok .ico { color: var(--ok); }
.up-row.err .ico { color: var(--danger); }
.up-name { flex: 1; min-width: 0; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-status { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; display: flex; align-items: center; }
.up-row.ok .up-status { color: var(--ok); }
.up-row.err .up-status { color: var(--danger); }
.up-row.active { background: var(--fill); }

.btn {
  display: inline-flex; align-items: center; gap: 7px; border: 1px solid transparent; background: var(--fill); color: var(--text);
  padding: 10px 17px; border-radius: var(--radius-btn); font-size: 14.5px; font-weight: 600; letter-spacing: -.01em;
  transition: background .2s var(--ease), transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.btn:hover { background: var(--fill-2); }
.btn:active { transform: translateY(0) scale(.98); }
.btn.primary { background: var(--accent); color: #fff; box-shadow: var(--shadow-btn); }
.btn.primary:hover { background: var(--accent-press); transform: translateY(-2px); box-shadow: 0 16px 30px -14px rgba(20,49,94,.55); }
.btn.primary:active { transform: translateY(0) scale(.99); }
.btn.ghost { background: transparent; padding-left: 12px; padding-right: 12px; }
.btn.ghost:hover { background: var(--fill); }
.btn.ghost.active { background: var(--accent); color: #fff; }
.btn.block { width: 100%; justify-content: center; }
.btn.lg { padding: 13px 20px; font-size: 16px; }
.btn .ico { margin: -2px 0; }

.ctl {
  border: none; background: var(--fill); color: var(--text); border-radius: var(--radius-btn); padding: 9px 32px 9px 15px;
  font-size: 15px; font-weight: 500; appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2355617a' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}

/* Drive-artige Chip-Leiste: Filter/Sortier-Chips als Pillen mit Rand */
.toolbar { gap: 8px; padding: 14px 18px 10px; }
.toolbar .ctl { background: transparent; border: 1px solid var(--border-strong, var(--border)); border-radius: 999px; padding: 8px 32px 8px 15px; font-size: 14px; }
.toolbar .ctl:hover { background: var(--fill); }
.toolbar .btn.ghost { border: 1px solid var(--border-strong, var(--border)); border-radius: 999px; }
.toolbar .btn:not(.primary):not(.ghost) { border: 1px solid var(--border-strong, var(--border)); border-radius: 999px; background: transparent; }
.toolbar .btn:not(.primary):not(.ghost):hover { background: var(--fill); }
.toolbar .btn.primary { border-radius: 999px; }
.toolbar .iconbtn { border: 1px solid var(--border-strong, var(--border)); }

/* CI-Dropdown (ersetzt native <select>): Pill-Button + Popover-Menü im App-Stil */
.ctl-btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border-strong, var(--border)); background: transparent; color: var(--text);
  border-radius: 999px; padding: 8px 12px 8px 15px; font-size: 14px; font-weight: 600; font-family: inherit; letter-spacing: -.01em;
  transition: background .2s var(--ease), border-color .2s var(--ease); }
.ctl-btn:hover { background: var(--fill); }
.ctl-btn .icn { color: var(--muted); margin-right: -2px; }
.ctl-menu { min-width: 180px; padding: 6px; }
.ctl-menu .menu-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; width: 100%; border: none; background: none;
  color: var(--text); font-size: 14.5px; font-weight: 500; font-family: inherit; padding: 10px 12px; border-radius: 10px; text-align: left; cursor: pointer; }
.ctl-menu .menu-row:hover { background: var(--fill); }
.ctl-menu .menu-row.on { color: var(--accent); font-weight: 600; }
.ctl-menu .menu-row .icn { color: var(--accent); flex: none; }

/* Namensfilter (Text) im App-CI */
.tb-filter { border: 1px solid var(--border-strong, var(--border)); background: transparent; border-radius: 999px; padding: 8px 14px;
  font-size: 14px; font-family: inherit; color: var(--text); min-width: 148px; max-width: 200px; }
.tb-filter::placeholder { color: var(--muted); }
.tb-filter:focus { outline: none; border-color: var(--accent); background: var(--fill); }

/* Ansichtsgrössen-Slider (App-CI, Navy) */
.sizectl { display: inline-flex; align-items: center; gap: 8px; padding: 0 6px; flex: none; }
.sizectl .icn { color: var(--muted); }
.sizeslider { -webkit-appearance: none; appearance: none; width: 92px; height: 4px; border-radius: 999px; background: var(--fill-2); outline: none; cursor: pointer; }
.sizeslider::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 16px; height: 16px; border-radius: 50%; background: var(--accent); box-shadow: var(--shadow-s); border: none; }
.sizeslider::-moz-range-thumb { width: 16px; height: 16px; border: none; border-radius: 50%; background: var(--accent); }
.sizeslider:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

/* ---------- Grid ---------- */
.grid { display: grid; gap: 16px; padding: 12px 18px 130px; grid-template-columns: repeat(auto-fill, minmax(var(--tile-min, 158px), 1fr)); }
.grid-sentinel { grid-column: 1 / -1; height: 1px; }
/* Sichtbarer Tastatur-Fokus (Barrierefreiheit) */
.tile:focus-visible, .menu-item:focus-visible, .acc-item:focus-visible, .pickeritem:focus-visible,
.btn:focus-visible, .iconbtn:focus-visible, .kebab:focus-visible, .navitem:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.tile:focus:not(:focus-visible) { outline: none; }
.jsentinel { height: 1px; width: 100%; flex-basis: 100%; }
.jcell:focus-visible, .foldercard:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.jcell:focus:not(:focus-visible) { outline: none; }
.thumb .playbadge, .jcell .playbadge { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 36px; height: 36px; border-radius: 50%; background: rgba(0, 0, 0, .42); color: #fff; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.thumb .playbadge .icn { margin-left: 2px; }
.tile {
  position: relative; background: var(--surface); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-s); display: flex; flex-direction: column; transition: transform .12s, box-shadow .2s; cursor: pointer;
}
.tile:hover { box-shadow: var(--shadow-hover); }
.tile:active { transform: translateY(0) scale(.99); }
.tile .thumb { aspect-ratio: 4 / 3; background: var(--fill); display: grid; place-items: center; overflow: hidden; position: relative; }
.tile .thumb img, .tile .thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile .thumb .ico { color: var(--muted); opacity: .85; }
.tile.folder .thumb { background: var(--surface); }
.tile.folder .thumb .ico { color: var(--accent); opacity: 1; }
.tile .meta { padding: 11px 13px 13px; }
.tile .name { font-size: 14px; font-weight: 500; line-height: 1.3; word-break: break-word; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tile .sub { font-size: 12.5px; color: var(--muted); margin-top: 3px; font-variant-numeric: tabular-nums; }

.tile .kebab {
  position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; border-radius: 50%;
  background: rgba(255,255,255,.82); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: none; display: grid; place-items: center; color: #1d1d1f; opacity: 0; transition: opacity .15s, background .15s;
}
.tile:hover .kebab, .tile .kebab:focus { opacity: 1; }
@media (hover: none) { .tile .kebab { opacity: 1; } }
.tile .kebab:active { background: #fff; }
.kebab.danger { color: var(--danger); }

.empty { text-align: center; color: var(--muted); padding: 70px 24px; }
.empty .big { display: grid; place-items: center; margin-bottom: 12px; color: var(--muted); opacity: .5; }
.empty .big .ico { width: 52px; height: 52px; }
.empty-title { font-size: 19px; font-weight: 640; color: var(--text); letter-spacing: -.01em; margin-bottom: 6px; }
.empty-sub { font-size: 14px; max-width: 40ch; margin: 0 auto 20px; line-height: 1.5; }
.empty-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* Auswahl */
.tile.selected { box-shadow: 0 0 0 3px var(--accent), var(--shadow); }

/* Drag & Drop */
.tile[draggable="true"] { cursor: grab; }
.tile.folder.drop-target { box-shadow: 0 0 0 3px var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--surface)); }
.tile.folder.drop-target .thumb { transform: scale(.96); transition: transform .1s; }
.breadcrumb a.drop-target { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); border-radius: 8px; box-shadow: inset 0 0 0 1.5px var(--accent); }
.selmark {
  position: absolute; top: 9px; left: 9px; width: 26px; height: 26px; border-radius: 50%;
  background: rgba(255,255,255,.85); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display: grid; place-items: center;
  color: #fff; box-shadow: inset 0 0 0 1.5px rgba(0,0,0,.28); font-size: 15px;
  opacity: 0; pointer-events: none; transition: opacity .12s, transform .08s; cursor: pointer; z-index: 3;
}
.selmark.on { background: var(--accent); box-shadow: none; }
/* Auswahl-Häkchen nur im Auswahlmodus zeigen – Hover blendet NUR das „Mehr"-Menü ein (weniger Wust) */
.selmark.on, .grid.selecting .selmark { opacity: 1; pointer-events: auto; }
.selmark:hover { transform: scale(1.08); }
.trashbtns { position: absolute; top: 8px; right: 8px; display: flex; gap: 6px; }

/* Listen-Ansicht */
.grid.list { grid-template-columns: 1fr; gap: 1px; padding: 12px 18px 130px; background: var(--surface); border-radius: var(--radius); margin: 12px 18px 130px; overflow: hidden; box-shadow: var(--shadow-s); }
.grid.list .tile { flex-direction: row; align-items: center; border-radius: 0; box-shadow: none; background: transparent; border-bottom: .5px solid var(--border); }
.grid.list .tile:last-child { border-bottom: none; }
.grid.list .tile:hover { transform: none; background: var(--fill); box-shadow: none; }
.grid.list .tile .thumb { width: calc(46px * var(--list-scale, 1)); height: calc(46px * var(--list-scale, 1)); aspect-ratio: auto; flex: none; border-radius: 9px; margin: calc(10px * var(--list-scale, 1)) 12px; }
.grid.list .tile .name { font-size: calc(14.5px * var(--list-scale, 1)); }
.grid.list .tile .thumb .ico .icn { width: 24px; height: 24px; }
.grid.list .tile .meta { padding: 10px 12px 10px 0; flex: 1; }
.grid.list .tile .name { -webkit-line-clamp: 1; }
.grid.list .tile .kebab { position: static; opacity: 1; margin-right: 12px; background: transparent; }
.grid.list .tile .trashbtns { position: static; margin-right: 10px; }
.grid.list .tile .selmark { position: static; margin: 0 4px 0 14px; }

/* ---------- Bottom Sheet / Modal ---------- */
.backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 40; display: flex; align-items: flex-end; justify-content: center; opacity: 0; transition: opacity .22s ease; }
.backdrop.in { opacity: 1; }
.backdrop.closing { opacity: 0; }
.sheet {
  background: var(--surface); width: 100%; max-width: 480px; border-radius: 22px 22px 0 0;
  padding: 8px 20px calc(22px + var(--safe-b)); box-shadow: 0 -10px 40px rgba(0,0,0,.22);
  transform: translateY(20px); transition: transform .28s cubic-bezier(.32,.72,0,1); max-height: 88vh; overflow-y: auto;
}
.backdrop.in .sheet { transform: translateY(0); }
.backdrop.closing .sheet { transform: translateY(20px); }
@media (min-width: 560px) { .backdrop { align-items: center; } .sheet { border-radius: 22px; } }
.grabber { width: 38px; height: 5px; border-radius: 3px; background: var(--fill-2); margin: 6px auto 12px; }
.sheet h3 { margin: 2px 0 16px; font-size: 20px; font-weight: 600; letter-spacing: -.02em; text-align: center; }
.sheet .row { display: flex; flex-direction: column; gap: 7px; margin-bottom: 15px; }
.sheet label { font-size: 13px; color: var(--muted); font-weight: 500; }
.sheet input[type=text], .sheet input[type=email], .sheet input[type=password], .sheet input[type=date], .sheet input[type=search], .sheet textarea, .sheet select {
  border: none; background: var(--fill); border-radius: 11px; padding: 13px 14px; font-size: 16px; color: var(--text); width: 100%; font-family: inherit;
}
.sheet textarea { min-height: 76px; resize: vertical; }
.sheet .actions { display: flex; gap: 10px; margin-top: 6px; }
.sheet .actions .btn { flex: 1; justify-content: center; padding: 13px; }

.menu-item { display: flex; align-items: center; gap: 14px; padding: 15px 6px; font-size: 16px; border-bottom: .5px solid var(--border); }
.menu-item:last-child { border-bottom: none; }
.menu-item:active { background: var(--fill); border-radius: 10px; }
.menu-item.danger { color: var(--danger); }
.menu-item .ico { color: var(--muted); }
.menu-item.danger .ico { color: var(--danger); }

.seg { display: flex; background: var(--fill); border-radius: 999px; padding: 3px; gap: 3px; }
.seg button { flex: 1; border: none; background: transparent; padding: 9px 12px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--muted); font-family: inherit; transition: background .2s var(--ease), color .2s var(--ease); }
.seg button.active { background: var(--accent); color: #fff; box-shadow: none; }

.linkbox { display: flex; gap: 8px; align-items: center; background: var(--fill); border-radius: 12px; padding: 11px 13px; margin-bottom: 8px; }
.linkbox .url { flex: 1; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.linkbox .email { font-size: 12px; color: var(--muted); margin-top: 2px; }
.linkbox .iconbtn { width: 34px; height: 34px; }

.detrow { display: flex; justify-content: space-between; gap: 16px; padding: 13px 2px; border-bottom: .5px solid var(--border); font-size: 15px; }
.detrow:last-child { border-bottom: none; }
.detrow .dk { color: var(--muted); }
.detrow .dv { text-align: right; word-break: break-word; }

/* Verschieben-Picker */
.pickerpath { font-size: 14px; color: var(--muted); margin-bottom: 10px; }
.pickerpath a { text-decoration: none; }
.pickerlist { max-height: 44vh; overflow-y: auto; margin-bottom: 14px; border-radius: 12px; background: var(--fill); }
.pickeritem { display: flex; justify-content: space-between; align-items: center; padding: 14px 14px; border-bottom: .5px solid var(--border); font-size: 15px; }
.pickeritem:last-child { border-bottom: none; }
.pickeritem:active { background: var(--fill-2); }

/* Auswahl-Leiste */
.selbar {
  position: fixed; left: 12px; right: 12px; bottom: calc(14px + var(--safe-b)); z-index: 55;
  background: var(--topbar-bg); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  border: .5px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; max-width: 620px; margin: 0 auto;
}
.selbar .selcount { font-weight: 600; font-size: 15px; }
.selbar .btn { padding: 9px 13px; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column;
  background: var(--lb-bg); backdrop-filter: saturate(150%) blur(30px); -webkit-backdrop-filter: saturate(150%) blur(30px);
  opacity: 0; transition: opacity .24s ease;
}
.lightbox.in { opacity: 1; }
.lightbox.closing { opacity: 0; }
.lb-top { display: flex; align-items: center; gap: 12px; padding: 14px 16px; padding-top: max(14px, env(safe-area-inset-top)); }
.lb-titles { flex: 1; text-align: center; overflow: hidden; }
.lb-name { font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-count { font-size: 12px; color: var(--muted); margin-top: 1px; font-variant-numeric: tabular-nums; }
.lb-close { width: 38px; height: 38px; border-radius: 50%; border: none; background: var(--fill-2); color: var(--text); display: grid; place-items: center; }
.lb-close:active { transform: scale(.92); }
.lb-media { flex: 1 1 auto; min-height: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; padding: 8px 18px 18px; }
.lb-media img, .lb-media video {
  max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,.4); transform: scale(.98); transition: transform .28s cubic-bezier(.32,.72,0,1);
}
.lightbox.in .lb-media img, .lightbox.in .lb-media video { transform: scale(1); }
.lb-file { text-align: center; color: var(--muted); display: grid; gap: 14px; place-items: center; }
.lb-file .ico { color: var(--muted); }

.lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%;
  border: none; background: var(--fill-2); color: var(--text); display: grid; place-items: center;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.lb-nav:active { transform: translateY(-50%) scale(.9); }
.lb-nav.prev { left: 12px; } .lb-nav.next { right: 12px; }
@media (max-width: 640px) { .lb-nav { display: none; } }

.lb-bar { display: flex; gap: 10px; justify-content: center; padding: 6px 18px calc(20px + var(--safe-b)); }
.lb-nodl { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; padding: 12px 20px; }
.lock-badge { width: 54px; height: 54px; border-radius: 15px; margin: 0 auto 16px; display: grid; place-items: center; background: var(--fill); color: var(--accent); }
.lock-badge.warn { color: var(--danger); }
.lb-btn {
  display: inline-flex; align-items: center; gap: 8px; border: none; border-radius: 980px; padding: 12px 22px;
  font-size: 15px; font-weight: 500; background: var(--fill-2); color: var(--text);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); transition: transform .08s;
}
.lb-btn:active { transform: scale(.96); }
.lb-btn.primary { background: var(--accent); color: #fff; }

/* ---------- Upload / Toast ---------- */
.progressbar {
  position: fixed; left: 16px; right: 16px; bottom: calc(16px + var(--safe-b)); z-index: 50; max-width: 480px; margin: 0 auto;
  background: var(--topbar-bg); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: .5px solid var(--border); border-radius: 16px; padding: 14px 16px; box-shadow: var(--shadow);
}
.progressbar .lbl { font-size: 14px; margin-bottom: 9px; display: flex; justify-content: space-between; font-variant-numeric: tabular-nums; }
.progressbar .track { height: 6px; background: var(--fill-2); border-radius: 4px; overflow: hidden; }
.progressbar .fill { height: 100%; width: 0; background: var(--accent); border-radius: 4px; transition: width .2s; }

.toast {
  position: fixed; left: 50%; bottom: calc(28px + var(--safe-b)); transform: translate(-50%, 12px);
  background: rgba(40,40,42,.92); color: #fff; padding: 12px 20px; border-radius: 14px; z-index: 80; font-size: 14px; font-weight: 500;
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); box-shadow: 0 8px 30px rgba(0,0,0,.3); max-width: 90%;
  opacity: 0; transition: opacity .2s, transform .2s;
}
.toast.in { opacity: 1; transform: translate(-50%, 0); }
.toast { display: flex; align-items: center; gap: 16px; }
.toast-action { background: none; border: none; color: #4a9bff; font-weight: 700; font-size: 14px; cursor: pointer; padding: 0; white-space: nowrap; }
.lb-pdf { width: 100%; height: 100%; border: none; border-radius: 12px; background: #fff; }
@keyframes tilein { from { opacity: 0; } to { opacity: 1; } }
.grid .tile { animation: tilein .24s ease both; }

/* ---------- Login ---------- */
.login { min-height: 100dvh; display: grid; place-items: center; padding: 20px; }
.login .card { background: var(--surface); border-radius: 22px; padding: 34px 26px; width: 100%; max-width: 360px; box-shadow: var(--shadow); text-align: center; }
.login .dot { width: 64px; height: 64px; border-radius: 16px; margin: 0 auto 18px; background: url('/img/logo.png') center / cover no-repeat; box-shadow: var(--shadow); }
.login h1 { font-size: 24px; margin: 0 0 5px; font-weight: 600; letter-spacing: -.03em; }
.login p { color: var(--muted); margin: 0 0 22px; font-size: 15px; }
.login input { width: 100%; margin-bottom: 12px; text-align: center; }
.login-users { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 14px; }
.login-user { display: inline-flex; align-items: center; gap: 8px; padding: 7px 13px 7px 7px; border-radius: 999px; border: 1px solid var(--border); background: var(--fill); color: var(--text); font-size: 15px; font-family: inherit; cursor: pointer; transition: background .15s, box-shadow .15s; }
.login-user.active { background: color-mix(in srgb, var(--accent) 15%, transparent); box-shadow: inset 0 0 0 1.5px var(--accent); color: var(--accent); }
.login-user-av { width: 26px; height: 26px; border-radius: 50%; background: var(--brand-grad); color: #fff; display: grid; place-items: center; font-size: 13px; font-weight: 600; flex: none; }

.users-list { display: flex; flex-direction: column; gap: 4px; margin-bottom: 14px; }
.user-row { display: flex; align-items: center; gap: 12px; padding: 9px 4px; border-bottom: .5px solid var(--border); }
.user-row:last-child { border-bottom: none; }
.user-av { width: 34px; height: 34px; border-radius: 50%; background: var(--brand-grad); color: #fff; display: grid; place-items: center; font-size: 15px; font-weight: 600; flex: none; }
.user-info { flex: 1 1 auto; min-width: 0; }
.user-name { font-size: 15px; font-weight: 500; display: flex; align-items: center; gap: 7px; }
.user-you { font-size: 11px; font-weight: 600; color: var(--accent); background: color-mix(in srgb, var(--accent) 15%, transparent); padding: 1px 7px; border-radius: 999px; }
.user-role { font-size: 12.5px; color: var(--muted); margin-top: 1px; }
.icon-btn { width: 36px; height: 36px; border-radius: 10px; border: none; background: var(--fill); color: var(--text); display: grid; place-items: center; cursor: pointer; flex: none; }
.icon-btn:hover { background: var(--fill-2); }

/* Sidebar-Trenner zwischen Bereichen und Werkzeugen */
.sb-sep { height: .5px; background: var(--border); margin: 8px 14px; }

/* Eigentümer-Kennzeichnung auf Kacheln */
.owner-dot { display: inline-grid; place-items: center; width: 15px; height: 15px; border-radius: 50%; background: var(--brand-grad); color: #fff; font-size: 9px; font-weight: 700; margin-right: 5px; vertical-align: -2px; }
.shared-badge.member { color: #fff; background: var(--accent); }

/* Team-Freigabe-Dialog */
.ms-list { display: flex; flex-direction: column; gap: 4px; margin-bottom: 14px; }
.ms-row { display: flex; align-items: center; gap: 10px; padding: 8px 2px; border-bottom: .5px solid var(--border); }
.ms-row:last-child { border-bottom: none; }
.ms-row .ctl { flex: none; }
.ms-add { border-top: .5px solid var(--border); padding-top: 14px; margin-top: 4px; }

/* Geteilt-Cockpit: Aktionen pro Freigabe */
.share-actions { display: flex; align-items: center; gap: 2px; flex: none; }
.dash-row.share.exp { opacity: .62; }

/* Stern-Markierung auf Kacheln */
/* Stern unten rechts auf dem Thumbnail – kollidiert nicht mit Auswahl (oben links) oder Kebab (oben rechts) */
.star-badge { position: absolute; top: auto; bottom: 8px; left: auto; right: 8px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: rgba(0,0,0,.45); color: #ff375f; backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); z-index: 3; pointer-events: none; }
/* Listenansicht: Stern als kleines Inline-Symbol rechts (statt schwebendes Badge) */
.grid.list .star-badge { position: static; inset: auto; width: 22px; height: 22px; background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: none; flex: none; margin: 0 4px 0 0; }
.grid.list .folder-badge { display: none; }

/* Eigene Tooltips (body-level, kein Clipping, konsistent) */
.kd-tip {
  position: fixed; z-index: 200; pointer-events: none;
  background: #2b2f36; color: #fff; font-size: 12.5px; font-weight: 500; line-height: 1.2;
  padding: 6px 10px; border-radius: 8px; max-width: 240px; white-space: nowrap;
  box-shadow: 0 4px 16px rgba(0,0,0,.28); opacity: 0; transform: translateY(-3px);
  transition: opacity .13s ease, transform .13s ease;
}
.kd-tip.show { opacity: 1; transform: none; }
@media (prefers-color-scheme: dark) { .kd-tip { background: #e8eaed; color: #17181a; box-shadow: 0 4px 16px rgba(0,0,0,.5); } }
:root[data-theme="dark"] .kd-tip { background: #e8eaed; color: #17181a; box-shadow: 0 4px 16px rgba(0,0,0,.5); }
:root[data-theme="light"] .kd-tip { background: #2b2f36; color: #fff; box-shadow: 0 4px 16px rgba(0,0,0,.28); }
@media (prefers-reduced-motion: reduce) { .kd-tip { transition: opacity .13s ease; transform: none; } }

.hide { display: none !important; }
.drop-hint { position: fixed; inset: 0; z-index: 70; background: color-mix(in srgb, var(--accent) 12%, transparent); border: 3px dashed var(--accent); display: grid; place-items: center; font-size: 20px; font-weight: 600; color: var(--accent); pointer-events: none; }
