/* WyvernDrive – angelehnt an das Sylas Panel */

:root {
  --bg: #141414;
  --pattern: url("/assets/hex-dark.svg");
  --panel: #1f1f1f;
  --panel-2: #262626;
  --panel-3: #2d2d2d;
  --border: #2e2e2e;
  --border-strong: #3a3a3a;
  --text: #ececec;
  --text-2: #cdcdcd;
  --muted: #8d8d8d;
  --accent: #74c236;
  --accent-2: #8fd94c;
  --accent-soft: rgba(116, 194, 54, 0.14);
  --accent-ink: #0f1a06;
  --danger: #e5534b;
  --danger-soft: rgba(229, 83, 75, 0.14);
  --warn: #e3b341;
  --overlay: rgba(6, 6, 6, 0.72);
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.38);
  --radius: 14px;
  --radius-sm: 9px;
  --sidebar-w: 248px;
  --gap: 16px;
  --k-image: #5aa9e6;
  --k-video: #c27dff;
  --k-audio: #f2a541;
  --k-text: #a4abb3;
  --k-document: #e8665e;
  --k-other: #8d8d8d;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #eef0eb;
  --pattern: url("/assets/hex-light.svg");
  --panel: #ffffff;
  --panel-2: #f5f6f3;
  --panel-3: #ebede8;
  --border: #e1e4dc;
  --border-strong: #d0d4ca;
  --text: #1b1d19;
  --text-2: #33362f;
  --muted: #6c7067;
  --accent: #4e9a1c;
  --accent-2: #4a9419;
  --accent-soft: rgba(78, 154, 28, 0.12);
  --accent-ink: #ffffff;
  --overlay: rgba(30, 32, 28, 0.45);
  --shadow: 0 10px 28px rgba(40, 44, 36, 0.10);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; }

body {
  background: var(--bg) var(--pattern) center top / 760px repeat fixed;
  color: var(--text);
  font: 14px/1.45 "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent-2); }
[hidden], .hidden { display: none !important; }

.icon {
  width: 18px; height: 18px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}

.muted { color: var(--muted); }

/* ---------------------------------------------------------------- Karten & Buttons */

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 36px; padding: 0 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--panel-2);
  font-size: 13px; font-weight: 600; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s, opacity .15s;
}
.btn:hover { background: var(--panel-3); }
.btn:disabled { opacity: .55; cursor: default; }
.btn .icon { width: 16px; height: 16px; }
.btn.primary { background: var(--accent); border-color: transparent; color: var(--accent-ink); }
.btn.primary:hover { background: var(--accent-2); }
.btn.danger { background: var(--danger-soft); border-color: transparent; color: var(--danger); }
.btn.danger:hover { background: var(--danger); color: #fff; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--panel-2); }
.btn.block { width: 100%; height: 42px; }

.icon-btn {
  display: inline-grid; place-items: center;
  width: 34px; height: 34px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: transparent; color: var(--text-2);
  transition: background .15s, color .15s;
}
.icon-btn:hover { background: var(--panel-2); color: var(--text); }
.icon-btn.active { color: var(--accent-2); }

.segmented {
  display: inline-flex; padding: 3px; gap: 2px;
  background: var(--panel-2); border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.segmented .icon-btn { width: 30px; height: 28px; border-radius: 6px; }
.segmented .icon-btn.active { background: var(--panel); color: var(--accent-2); box-shadow: 0 1px 3px rgba(0,0,0,.25); }

/* ---------------------------------------------------------------- Formulare */

.field { display: flex; flex-direction: column; gap: 6px; }
.field > span, .field-label {
  color: var(--muted); font-size: 11.5px; letter-spacing: .07em; text-transform: uppercase; font-weight: 600;
}
.field small { color: var(--muted); font-size: 12px; }

.input {
  width: 100%; height: 40px; padding: 0 12px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
textarea.input { height: auto; min-height: 96px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
select.input { padding-right: 32px; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input::placeholder { color: var(--muted); }

.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .track {
  position: relative; width: 44px; height: 24px; flex: none;
  border-radius: 999px; background: var(--panel-3); border: 1px solid var(--border-strong);
  transition: background .2s;
}
.switch .track::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 16px; height: 16px; border-radius: 50%; background: #fff;
  transition: transform .2s;
}
.switch input:checked + .track { background: var(--accent); border-color: transparent; }
.switch input:checked + .track::after { transform: translateX(20px); }
.switch input:focus-visible + .track { box-shadow: 0 0 0 3px var(--accent-soft); }

.form-error {
  padding: 10px 12px; border-radius: var(--radius-sm);
  background: var(--danger-soft); color: var(--danger); font-size: 13px;
}

/* ---------------------------------------------------------------- Logo */

.logo {
  display: inline-flex; flex-direction: column; align-items: center;
  line-height: .9; text-decoration: none; user-select: none;
  font-family: "Arial Black", "Segoe UI Black", Impact, sans-serif; font-weight: 900;
}
.logo-top {
  font-size: 27px; letter-spacing: .5px; color: var(--accent-2);
  text-shadow: 0 2px 0 #2b4a10, 1px 0 0 #2b4a10, -1px 0 0 #2b4a10;
}
.logo-bottom { font-size: 17px; letter-spacing: 3px; color: var(--text); margin-top: 2px; }
.logo img { max-width: 150px; max-height: 64px; }

/* ---------------------------------------------------------------- Sidebar */

.sidebar {
  position: fixed; z-index: 40;
  top: var(--gap); bottom: var(--gap); left: var(--gap);
  width: var(--sidebar-w);
  display: flex; flex-direction: column;
  overflow: hidden;
  transition: transform .25s ease;
}

.brand { display: flex; justify-content: center; padding: 16px 16px 14px; border-bottom: 1px solid var(--border); }

.nav { flex: 1; overflow-y: auto; padding: 18px 12px 12px; scrollbar-width: thin; }

.nav-label {
  display: flex; align-items: center; gap: 10px;
  margin: 2px 6px 8px;
  color: var(--muted); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; font-weight: 600;
}
.nav-label .line { flex: 1; height: 1px; background: var(--border); }
.nav-label .icon-btn { width: 24px; height: 24px; margin: -4px -4px -4px 0; }
.nav-label .icon-btn .icon { width: 15px; height: 15px; }
.nav-section + .nav-section { margin-top: 18px; }

.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 8px 10px; border-radius: 8px;
  color: var(--text-2); text-decoration: none; font-size: 14px;
  transition: background .15s, color .15s;
}
.nav-item:hover { background: var(--panel-2); color: var(--text); }
.nav-item .icon { width: 17px; height: 17px; color: var(--muted); }
.nav-item.active { color: var(--accent-2); font-weight: 600; }
.nav-item.active .icon { color: var(--accent); }

.tree-row {
  display: flex; align-items: center; gap: 5px;
  padding: 4px 8px 4px calc(4px + var(--depth, 0) * 14px);
  border-radius: 7px;
  color: var(--text-2); font-size: 13.5px;
  cursor: pointer; user-select: none;
  border: 1px solid transparent;
}
.tree-row:hover { background: var(--panel-2); color: var(--text); }
.tree-row.active { background: var(--accent-soft); color: var(--accent-2); font-weight: 600; }
.tree-row.active .tree-icon { color: var(--accent); }
.tree-row.drop-target { border-color: var(--accent); background: var(--accent-soft); }
.tree-toggle {
  display: grid; place-items: center; width: 20px; height: 20px; flex: none;
  border: 0; border-radius: 5px; background: transparent; color: var(--muted); padding: 0;
}
.tree-toggle:hover { background: var(--panel-3); color: var(--text); }
.tree-toggle .icon { width: 14px; height: 14px; transition: transform .15s; }
.tree-toggle.open .icon { transform: rotate(90deg); }
.tree-toggle.invisible { visibility: hidden; }
.tree-icon { width: 16px; height: 16px; color: var(--muted); }
.tree-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Favoriten */
.fav-row { padding-left: 8px; gap: 8px; }
.fav-row .fav-icon { display: inline-grid; }
.fav-row.missing { opacity: .55; }
.fav-row.missing .tree-label { text-decoration: line-through; }
.fav-remove {
  margin-left: auto; display: grid; place-items: center; width: 20px; height: 20px; flex: none; padding: 0;
  border: 0; border-radius: 5px; background: transparent; color: var(--muted); opacity: 0; transition: opacity .15s;
}
.fav-remove .icon { width: 13px; height: 13px; }
.fav-row:hover .fav-remove, .fav-remove:focus-visible { opacity: 1; }
.fav-remove:hover { background: var(--panel-3); color: var(--text); }
.fav-row .nsfw-tag { margin-left: auto; }
.fav-row .nsfw-tag + .fav-remove { margin-left: 0; }
.fav-empty { padding: 2px 8px 4px; color: var(--muted); font-size: 12px; line-height: 1.45; }

.sidebar-footer {
  display: flex; justify-content: space-around; align-items: center;
  padding: 12px 10px; border-top: 1px solid var(--border);
}
.sidebar-footer .icon-btn .icon { width: 19px; height: 19px; }
.avatar {
  display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent-2); font-weight: 700; font-size: 12px; text-transform: uppercase;
}

.backdrop { display: none; }

/* ---------------------------------------------------------------- Hauptbereich */

.main {
  margin-left: calc(var(--sidebar-w) + var(--gap) * 2);
  padding: var(--gap) var(--gap) var(--gap) 0;
  min-height: 100vh;
  display: flex; flex-direction: column; gap: var(--gap);
}

.top-row { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: var(--gap); }

.hero { padding: 16px 18px 18px; min-width: 0; }
.hero-head { display: flex; align-items: flex-start; gap: 12px; }
.hero-text { flex: 1; min-width: 0; }
.hero h1 { margin: 0; font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
.hero p { margin: 2px 0 0; font-size: 12.5px; color: var(--muted); }
.hero-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.hero-divider { height: 1px; background: var(--border); margin: 14px 0 12px; }
.burger { display: none; margin: -4px 0 0 -6px; }

.path-bar {
  display: flex; align-items: center; gap: 12px;
  margin-top: 7px; min-height: 44px; padding: 4px 8px 4px 6px;
  background: var(--panel-2); border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 2px; flex: 1; min-width: 0; }
.crumb {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 8px; border-radius: 7px; border: 1px solid transparent;
  background: transparent; color: var(--text-2); font-size: 13.5px; max-width: 260px;
}
.crumb span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crumb:hover { background: var(--panel-3); color: var(--text); }
.crumb.current { color: var(--text); font-weight: 600; }
.crumb.drop-target { border-color: var(--accent); background: var(--accent-soft); }
.crumb .icon { width: 15px; height: 15px; color: var(--muted); }
.crumb-sep { width: 14px; height: 14px; color: var(--muted); }
.path-meta { color: var(--accent-2); font-size: 12px; white-space: nowrap; padding-right: 6px; }

.storage-card {
  position: relative; overflow: hidden;
  padding: 16px 18px; display: flex; flex-direction: column; justify-content: center; gap: 6px;
  background:
    radial-gradient(120% 120% at 100% 0%, var(--accent-soft), transparent 60%),
    var(--panel);
}
.storage-card .eyebrow { color: var(--accent-2); font-size: 12px; font-weight: 600; }
.storage-card .big { font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.storage-card .detail { color: var(--muted); font-size: 12.5px; }
.storage-card .watermark {
  position: absolute; right: -14px; bottom: -18px; width: 120px; height: 120px;
  color: var(--accent); opacity: .08; stroke-width: 1.2;
}

.bar { height: 7px; border-radius: 999px; background: var(--panel-3); overflow: hidden; }
.bar > i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--accent); transition: width .25s; }
.bar.warn > i { background: var(--warn); }
.bar.full > i { background: var(--danger); }

.selection-bar {
  position: sticky; top: var(--gap); z-index: 20;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 8px 10px 8px 16px;
}
.sel-count { font-weight: 700; color: var(--accent-2); }
.sel-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; align-items: center; }

/* ---------------------------------------------------------------- Dateien */

.files { flex: 1; position: relative; transition: opacity .15s; }
.files.loading { opacity: .5; pointer-events: none; }

.files.grid {
  display: grid; align-content: start;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 12px;
}

.item {
  position: relative; overflow: hidden; cursor: pointer;
  background: var(--panel); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .18);
  outline: none;
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.item:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.item:focus-visible { border-color: var(--accent); }
.item.selected { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset, 0 4px 14px rgba(0,0,0,.18); }
.item.drop-target { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }

.thumb {
  position: relative; aspect-ratio: 4 / 3;
  display: grid; place-items: center;
  background: var(--panel-2);
  border-bottom: 1px solid var(--border);
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .icon { width: 42px; height: 42px; stroke-width: 1.4; }
.thumb .badge {
  position: absolute; left: 8px; bottom: 8px;
  padding: 1px 6px; border-radius: 5px;
  background: rgba(0, 0, 0, .55); color: #fff; font-size: 10.5px; font-weight: 700; letter-spacing: .04em;
}

/* Markierungen auf Kacheln und in der Liste */
.item-badges { display: inline-flex; align-items: center; gap: 4px; }
.thumb .item-badges { position: absolute; right: 8px; bottom: 8px; }
.b-icon {
  display: grid; place-items: center; width: 22px; height: 22px; border-radius: 6px;
  background: rgba(0, 0, 0, .55); color: #fff;
}
.b-icon .icon { width: 13px; height: 13px; }
.b-star { color: #f5c542; }
.b-star .icon { fill: currentColor; }
.b-link { color: #8fd94c; }
.files.list .b-icon { background: var(--panel-3); }
.name-with-badges { display: flex; align-items: center; gap: 8px; min-width: 0; }
.name-with-badges > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nsfw-tag {
  display: inline-flex; align-items: center; height: 18px; padding: 0 6px; border-radius: 5px;
  background: #e5534b; color: #fff; font-size: 10px; font-weight: 800; letter-spacing: .06em;
}

.k-folder { color: var(--accent); }
.k-image { color: var(--k-image); }
.k-video { color: var(--k-video); }
.k-audio { color: var(--k-audio); }
.k-text { color: var(--k-text); }
.k-document { color: var(--k-document); }
.k-other { color: var(--k-other); }
.thumb.k-folder .icon { fill: var(--accent-soft); }
/* Office-Dateien in den gewohnten Farben */
.ext-doc, .ext-docx, .ext-odt, .ext-rtf { color: #4a8fe7; }
.ext-xls, .ext-xlsx, .ext-ods { color: #2fa866; }
.ext-ppt, .ext-pptx, .ext-odp { color: #e8833a; }

.item .meta { padding: 9px 11px 10px; min-width: 0; }
.item .name { font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .sub { color: var(--muted); font-size: 11.5px; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.item .check, .item .more {
  position: absolute; top: 8px; z-index: 2;
  display: grid; place-items: center;
  width: 26px; height: 26px; border-radius: 8px;
  border: 1px solid var(--border-strong);
  background: color-mix(in srgb, var(--panel) 85%, transparent);
  color: var(--text-2);
  opacity: 0; transition: opacity .15s, background .15s;
}
.item .check { left: 8px; }
.item .more { right: 8px; }
.item .check .icon, .item .more .icon { width: 15px; height: 15px; }
.item:hover .check, .item:hover .more, .item:focus-within .more,
.files.selecting .item .check, .item.selected .check { opacity: 1; }
.item.selected .check { background: var(--accent); border-color: transparent; color: var(--accent-ink); }
.item .check .icon { opacity: 0; }
.item.selected .check .icon { opacity: 1; }

/* Listenansicht */
.files.list {
  display: flex; flex-direction: column;
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden; align-self: stretch;
}
.files.list:has(.empty) { background: transparent; border: 0; box-shadow: none; }
.list-head, .files.list .item {
  display: grid; grid-template-columns: 34px minmax(0, 1fr) 110px 170px 40px; align-items: center; gap: 10px;
  padding: 0 12px;
}
.list-head {
  height: 38px; color: var(--muted); font-size: 11.5px; letter-spacing: .07em; text-transform: uppercase; font-weight: 600;
  border-bottom: 1px solid var(--border);
}
.files.list .item {
  min-height: 46px; border: 0; border-radius: 0; box-shadow: none; transform: none;
  border-bottom: 1px solid var(--border);
}
.files.list .item:last-child { border-bottom: 0; }
.files.list .item:hover { background: var(--panel-2); }
.files.list .item.selected { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
.files.list .item.drop-target { box-shadow: inset 0 0 0 2px var(--accent); }
.files.list .row-icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 7px; background: var(--panel-2); overflow: hidden; }
.files.list .row-icon img { width: 100%; height: 100%; object-fit: cover; }
.files.list .row-icon .icon { width: 17px; height: 17px; }
.files.list .name { font-weight: 600; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.files.list .path { color: var(--muted); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.files.list .cell { color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.files.list .more { position: static; opacity: 1; border-color: transparent; background: transparent; }
.files.list .check { display: none; }

/* Papierkorb: breitere Spalte für zwei Aktionen */
.trash-list .list-head, .files.trash-list .item { grid-template-columns: 34px minmax(0, 1fr) 110px 190px 76px; }
.trash-list .actions { display: inline-flex; gap: 2px; justify-content: flex-end; }
.trash-list .actions .icon-btn { width: 32px; height: 32px; }
.trash-list .actions .icon-btn:last-child:hover { color: var(--danger); background: var(--danger-soft); }
.trash-list .cell .path { margin-top: 1px; }

.empty {
  grid-column: 1 / -1;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 48px 16px; text-align: center; color: var(--muted);
}
.empty .icon { width: 44px; height: 44px; color: var(--border-strong); stroke-width: 1.3; }
.empty strong { color: var(--text-2); font-size: 15px; }

.footer { text-align: center; color: var(--muted); font-size: 12px; padding: 6px 0 2px; }

/* ---------------------------------------------------------------- Drag & Drop */

.drop-overlay {
  position: fixed; z-index: 30;
  top: var(--gap); right: var(--gap); bottom: var(--gap);
  left: calc(var(--sidebar-w) + var(--gap) * 2);
  display: grid; place-items: center;
  border: 2px dashed var(--accent); border-radius: var(--radius);
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  backdrop-filter: blur(3px);
  pointer-events: none; opacity: 0; transition: opacity .15s;
}
.drop-overlay.show { opacity: 1; }
.drop-overlay .inner { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.drop-overlay .icon { width: 54px; height: 54px; color: var(--accent); }
.drop-overlay strong { font-size: 18px; }

/* ---------------------------------------------------------------- Upload-Panel */

.uploads {
  position: fixed; z-index: 60; right: var(--gap); bottom: var(--gap);
  width: min(380px, calc(100vw - 2 * var(--gap)));
  display: flex; flex-direction: column; overflow: hidden;
}
.uploads-head { display: flex; align-items: center; gap: 8px; padding: 10px 8px 10px 16px; border-bottom: 1px solid var(--border); }
.uploads-head strong { flex: 1; font-size: 13.5px; }
.uploads-head .icon-btn { width: 30px; height: 30px; }
.uploads-total { padding: 8px 16px 0; }
.uploads-list { max-height: 300px; overflow-y: auto; padding: 6px 0; }
.uploads.collapsed .uploads-list, .uploads.collapsed .uploads-total { display: none; }
.uploads.collapsed .uploads-head { border-bottom: 0; }
.uploads.collapsed .toggle .icon { transform: rotate(180deg); }
.up-item { display: grid; grid-template-columns: 28px minmax(0, 1fr) 28px; gap: 10px; align-items: center; padding: 7px 10px 7px 16px; }
.up-item .icon { width: 18px; height: 18px; }
.up-name { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-status { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.up-item .bar { height: 4px; margin-top: 5px; }
.up-item.error .up-status { color: var(--danger); }
.up-item.done .up-status { color: var(--accent-2); }
.up-item .icon-btn { width: 26px; height: 26px; }
.up-item .icon-btn .icon { width: 14px; height: 14px; }

/* ---------------------------------------------------------------- Menü, Dialoge, Toasts */

.menu {
  position: fixed; z-index: 80; min-width: 200px; padding: 6px;
  display: flex; flex-direction: column;
}
.menu-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border: 0; border-radius: 7px; background: transparent;
  text-align: left; font-size: 13.5px; color: var(--text-2);
}
.menu-item:hover { background: var(--panel-2); color: var(--text); }
.menu-item .icon { width: 16px; height: 16px; color: var(--muted); }
.menu-item.danger, .menu-item.danger .icon { color: var(--danger); }
.menu-item.danger:hover { background: var(--danger-soft); }
.menu-sep { height: 1px; background: var(--border); margin: 5px 4px; }

.modal-backdrop {
  position: fixed; inset: 0; z-index: 90;
  display: grid; place-items: center; padding: var(--gap);
  background: var(--overlay); backdrop-filter: blur(2px);
  animation: fade .15s ease;
}
.modal { width: min(460px, 100%); padding: 20px; display: flex; flex-direction: column; gap: 14px; animation: pop .15s ease; }
.modal h2 { margin: 0; font-size: 17px; }
.modal p { margin: 0; line-height: 1.55; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }

.toasts {
  position: fixed; z-index: 100; left: 50%; bottom: calc(var(--gap) + 4px); transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none;
  width: min(520px, calc(100vw - 2 * var(--gap)));
}
.toast {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: 10px;
  background: var(--panel-3); border: 1px solid var(--border-strong); box-shadow: var(--shadow);
  font-size: 13.5px; pointer-events: auto; animation: rise .2s ease;
  transition: opacity .3s, transform .3s;
}
.toast.success .icon { color: var(--accent-2); }
.toast-action {
  margin-left: 6px; padding: 4px 10px; border-radius: 7px;
  border: 1px solid var(--border-strong); background: var(--panel-2);
  color: var(--accent-2); font-size: 12.5px; font-weight: 700; white-space: nowrap;
}
.toast-action:hover { background: var(--accent-soft); }
.toast.error { border-color: color-mix(in srgb, var(--danger) 50%, transparent); }
.toast.error .icon { color: var(--danger); }
.toast.out { opacity: 0; transform: translateY(8px); }

/* Office-Editor (Collabora) im Vollbild */
.office { position: fixed; inset: 0; z-index: 86; display: flex; flex-direction: column; background: var(--bg); animation: fade .15s ease; }
.office-head {
  display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 8px 0 16px; flex: none;
  background: var(--panel); border-bottom: 1px solid var(--border);
}
.office-head strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.office-icon { display: inline-grid; }
.office-hint { margin-left: auto; color: var(--muted); font-size: 12px; white-space: nowrap; }
.office-frame { flex: 1; width: 100%; border: 0; background: #fff; }

/* „Neue Datei“: Typ-Auswahl */
.new-file { display: flex; flex-direction: column; gap: 14px; }
.type-picker { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; }
.type-option {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 8px;
  border-radius: var(--radius-sm); border: 1px solid var(--border-strong); background: var(--panel-2);
  color: var(--text-2); font-size: 12.5px; font-weight: 600;
}
.type-option .icon { width: 22px; height: 22px; color: var(--muted); }
.type-option:hover { background: var(--panel-3); }
.type-option.active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-2); }
.type-option.active .icon { color: var(--accent); }

/* ---------------------------------------------------------------- Watch Together */

.watch-body { min-height: 100vh; }
.watch-app { min-height: 100vh; display: flex; flex-direction: column; gap: var(--gap); padding: var(--gap); }
.watch-top { display: flex; align-items: center; gap: 18px; padding: 12px 16px; }
.watch-logo .logo-top { font-size: 19px; }
.watch-logo .logo-bottom { font-size: 12px; letter-spacing: 2px; }
.watch-title { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.watch-title strong { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.watch-title .muted { font-size: 12.5px; }
.watch-eyebrow { color: var(--accent-2); font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.watch-top-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

.watch-main { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: var(--gap); }
.watch-stage {
  position: relative; overflow: hidden; min-height: 320px;
  display: grid; place-items: center; background: #0c0c0c;
}
.watch-video { width: 100%; height: 100%; display: grid; place-items: center; }
.watch-video video { width: 100%; height: 100%; max-height: calc(100vh - 140px); object-fit: contain; background: #000; display: block; }
.watch-audio { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 32px 20px; width: min(560px, 100%); text-align: center; color: #ececec; }
.watch-audio strong { font-size: 18px; overflow-wrap: anywhere; }
.watch-audio audio { width: 100%; margin-top: 8px; }
.watch-cover {
  display: grid; place-items: center; width: 180px; height: 180px; border-radius: 28px; margin-bottom: 8px;
  background: radial-gradient(circle at 30% 25%, rgba(242, 165, 65, .35), rgba(242, 165, 65, .06) 70%), #1b1b1b;
  border: 1px solid #2e2e2e; box-shadow: 0 30px 70px rgba(0, 0, 0, .5);
  color: var(--k-audio);
}
.watch-cover .icon { width: 80px; height: 80px; stroke-width: 1.2; }
.watch-placeholder .icon { width: 72px; height: 72px; color: #333; stroke-width: 1.2; }

.watch-flash {
  position: absolute; left: 16px; top: 16px; z-index: 2; padding: 7px 12px; border-radius: 9px;
  background: rgba(0, 0, 0, .7); color: #fff; font-size: 13px; font-weight: 600;
  opacity: 0; transform: translateY(-6px); transition: opacity .2s, transform .2s; pointer-events: none;
}
.watch-flash.show { opacity: 1; transform: none; }
.watch-status {
  position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 2;
  padding: 7px 12px; border-radius: 9px; background: rgba(229, 83, 75, .9); color: #fff; font-size: 13px; font-weight: 600;
}
.watch-play-hint {
  position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  border: 0; background: rgba(0, 0, 0, .55); color: #fff; font-size: 15px; font-weight: 600; backdrop-filter: blur(4px);
}
.watch-play-circle { display: grid; place-items: center; width: 78px; height: 78px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); box-shadow: 0 0 0 10px rgba(116, 194, 54, .2); }
.watch-play-circle .icon { width: 34px; height: 34px; fill: currentColor; margin-left: 4px; }

.watch-side { display: flex; flex-direction: column; min-height: 0; max-height: calc(100vh - 110px); overflow: hidden; }
.watch-tabs { display: flex; gap: 4px; padding: 8px; border-bottom: 1px solid var(--border); }
.watch-tab {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 6px;
  border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 600;
}
.watch-tab .icon { width: 16px; height: 16px; }
.watch-tab:hover { background: var(--panel-2); color: var(--text); }
.watch-tab.active { background: var(--accent-soft); color: var(--accent-2); }
.tab-badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--panel-3); color: var(--text-2); font-size: 11px; display: inline-grid; place-items: center; }
.tab-badge.unread { background: var(--accent); color: var(--accent-ink); }
.watch-panel { flex: 1; min-height: 0; display: flex; }
.watch-pane { flex: 1; min-height: 0; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 12px; }

.chat-pane { padding: 0; gap: 0; overflow: hidden; }
.chat-list { flex: 1; min-height: 160px; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.chat-msg { align-self: flex-start; max-width: 88%; padding: 7px 11px; border-radius: 12px 12px 12px 4px; background: var(--panel-2); border: 1px solid var(--border); }
.chat-msg.own { align-self: flex-end; border-radius: 12px 12px 4px 12px; background: var(--accent-soft); border-color: transparent; }
.chat-meta { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); margin-bottom: 2px; }
.chat-meta strong { color: var(--text-2); font-size: 12px; }
.chat-meta .host-icon { width: 12px; height: 12px; color: #f5c542; }
.chat-text { font-size: 13.5px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-system { align-self: center; color: var(--muted); font-size: 12px; text-align: center; padding: 2px 8px; }
.chat-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--border); }
.chat-form .btn { width: 40px; height: 40px; padding: 0; flex: none; }

.member-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.member-list li { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 8px; }
.member-list li:hover { background: var(--panel-2); }
.member-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: 13.5px; }
.member-tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px; border-radius: 6px; background: var(--panel-3); color: var(--text-2); font-size: 11px; font-weight: 700; }
.member-tag.host { background: rgba(245, 197, 66, .15); color: #f5c542; }
.member-tag .icon { width: 12px; height: 12px; }
.host-settings { display: flex; flex-direction: column; gap: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.host-settings .btn { align-self: flex-start; }

.play-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.play-item {
  width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px; border: 0; border-radius: 8px;
  background: transparent; text-align: left; color: var(--text-2); font-size: 13.5px;
}
.play-item:hover:not(:disabled) { background: var(--panel-2); color: var(--text); }
.play-item:disabled { cursor: default; opacity: .75; }
.play-item.current { background: var(--accent-soft); color: var(--accent-2); font-weight: 600; opacity: 1; }
.play-num { width: 22px; flex: none; text-align: center; color: var(--muted); font-size: 12px; display: grid; place-items: center; }
.play-num .icon { width: 13px; height: 13px; fill: currentColor; color: var(--accent); }
.play-icon { display: inline-grid; }
.play-icon .icon { width: 16px; height: 16px; }
.play-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.watch-join, .watch-ended {
  position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: var(--gap);
  background: rgba(8, 8, 8, .5); backdrop-filter: blur(18px) brightness(.7); -webkit-backdrop-filter: blur(18px) brightness(.7);
  animation: fade .2s ease;
}
.watch-ended { position: static; min-height: 100vh; background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
.watch-join-card, .watch-ended-card {
  width: min(420px, 100%); padding: 28px 26px 24px; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center;
  animation: nsfw-card-in .3s cubic-bezier(.2, .9, .3, 1.2);
}
.watch-join-card h1, .watch-ended-card h1 { margin: 0; font-size: 21px; }
.watch-join-card p, .watch-ended-card p { margin: 0; line-height: 1.5; }
.watch-join-card .field { width: 100%; text-align: left; margin-top: 4px; }
.watch-join-file { font-weight: 600; overflow-wrap: anywhere; }
.watch-join-icon {
  display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; margin-bottom: 4px;
  background: var(--accent-soft); color: var(--accent-2); box-shadow: 0 0 0 8px rgba(116, 194, 54, .07);
}
.watch-join-icon .icon { width: 30px; height: 30px; }
.watch-nsfw { display: flex; gap: 10px; align-items: flex-start; text-align: left; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--danger-soft); color: var(--danger); font-size: 13px; }
.watch-nsfw .icon { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.watch-ended-card a.btn { text-decoration: none; margin-top: 6px; }

@media (max-width: 900px) {
  .watch-main { grid-template-columns: minmax(0, 1fr); }
  .watch-side { max-height: none; min-height: 420px; }
  .watch-top { flex-wrap: wrap; }
  .watch-logo { display: none; }
  .watch-video video { max-height: 60vh; }
}

/* Direktlink-Dialog */
.share-box { display: flex; flex-direction: column; gap: 12px; }
.share-box p { margin: 0; }
.share-row { display: flex; gap: 8px; }
.share-row .input { flex: 1; min-width: 0; font: 13px ui-monospace, "Cascadia Code", Consolas, monospace; }
.share-meta { color: var(--muted); font-size: 12.5px; }
.share-actions { display: flex; gap: 8px; justify-content: space-between; flex-wrap: wrap; }
.share-actions:only-child, .share-actions > .btn:only-child { margin-left: auto; }
.share-actions a.btn { text-decoration: none; color: var(--text); }
.share-preview {
  display: block; padding: 8px 10px; border-radius: var(--radius-sm);
  background: var(--panel-2); border: 1px dashed var(--border-strong);
  font: 12px ui-monospace, "Cascadia Code", Consolas, monospace; color: var(--accent-2); overflow-wrap: anywhere;
}
.table .path { color: var(--muted); font-size: 11.5px; margin-top: 1px; white-space: normal; }
.table a.icon-btn { color: var(--text-2); }

/* NSFW-Warnung: Hintergrund stark weichgezeichnet */
.nsfw-gate {
  position: fixed; inset: 0; z-index: 95;
  display: grid; place-items: center; padding: var(--gap);
  background: rgba(8, 8, 8, .45);
  backdrop-filter: blur(24px) saturate(.6) brightness(.7);
  -webkit-backdrop-filter: blur(24px) saturate(.6) brightness(.7);
  animation: nsfw-in .25s ease;
}
.nsfw-gate.closing { animation: nsfw-out .2s ease forwards; }
.nsfw-card {
  width: min(420px, 100%); padding: 30px 28px 22px;
  display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center;
  color: #ececec;
  background: linear-gradient(180deg, rgba(40, 40, 40, .92), rgba(24, 24, 24, .95));
  border: 1px solid rgba(255, 255, 255, .09); border-radius: 20px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .06);
  animation: nsfw-card-in .3s cubic-bezier(.2, .9, .3, 1.2);
}
.nsfw-badge {
  display: grid; place-items: center; width: 64px; height: 64px; margin-bottom: 6px; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(229, 83, 75, .35), rgba(229, 83, 75, .12));
  box-shadow: 0 0 0 8px rgba(229, 83, 75, .08), 0 0 40px rgba(229, 83, 75, .25);
  color: #ff6b62;
}
.nsfw-badge .icon { width: 30px; height: 30px; }
.nsfw-eyebrow { color: #ff6b62; font-size: 11.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.nsfw-card h2 { margin: 0; font-size: 22px; letter-spacing: -.01em; }
.nsfw-card p { margin: 2px 0 8px; color: #b9b9b9; line-height: 1.55; font-size: 14px; }
.nsfw-card p strong { color: #ececec; }
.nsfw-card small { color: #7d7d7d; font-size: 12px; margin-top: 4px; }
.nsfw-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; }
.nsfw-actions .btn { height: 42px; }
.nsfw-actions .btn.ghost { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .1); color: #ececec; }
.nsfw-actions .btn.ghost:hover { background: rgba(255, 255, 255, .11); }
.nsfw-accept { background: #e5534b; border-color: transparent; color: #fff; }
.nsfw-accept:hover { background: #f0645c; }
@keyframes nsfw-in { from { opacity: 0; backdrop-filter: blur(0); -webkit-backdrop-filter: blur(0); } }
@keyframes nsfw-out { to { opacity: 0; } }
@keyframes nsfw-card-in { from { opacity: 0; transform: translateY(12px) scale(.96); } }

@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(.97); } }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }

/* ---------------------------------------------------------------- Vorschau */

.preview {
  position: fixed; inset: 0; z-index: 85;
  display: flex; flex-direction: column;
  background: rgba(8, 8, 8, .94); color: #ececec;
  animation: fade .15s ease;
}
.preview-head { display: flex; align-items: center; gap: 12px; padding: 12px 14px 12px 20px; }
.preview-head .title { flex: 1; min-width: 0; }
.preview-head .title strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.preview-head .title span { color: #9a9a9a; font-size: 12px; }
.preview-head .icon-btn, .preview-nav { color: #d6d6d6; }
.preview-head .icon-btn:hover, .preview-nav:hover { background: rgba(255,255,255,.08); color: #fff; }
/* Feste Zeile/Spalte: Inhalte werden auf den sichtbaren Bereich begrenzt statt ihn zu sprengen. */
.preview-body {
  position: relative; flex: 1; min-height: 0;
  display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr); place-items: center;
  padding: 0 72px 24px;
}
.preview-body img, .preview-body video { max-width: 100%; max-height: 100%; border-radius: 8px; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.preview-body iframe { width: min(1100px, 100%); height: 100%; border: 0; border-radius: 8px; background: #fff; }
.preview-text { width: min(1000px, 100%); height: 100%; min-height: 0; display: flex; flex-direction: column; }
.preview-body pre {
  width: 100%; flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; margin: 0; padding: 18px 20px;
  background: #1b1b1b; border: 1px solid #2e2e2e; border-radius: 10px;
  font: 13px/1.55 ui-monospace, "Cascadia Code", Consolas, monospace; white-space: pre-wrap; word-break: break-word;
}
.preview-body textarea.editor {
  width: 100%; flex: 1; min-height: 0; resize: none; margin: 0; padding: 18px 20px;
  background: #151515; color: #ececec; caret-color: var(--accent-2);
  border: 1px solid var(--accent); border-radius: 10px; outline: none;
  box-shadow: 0 0 0 3px rgba(116, 194, 54, .14);
  font: 13px/1.55 ui-monospace, "Cascadia Code", Consolas, monospace; tab-size: 4;
  white-space: pre-wrap; overflow-wrap: anywhere; overscroll-behavior: contain;
}
.preview-head .btn { height: 34px; }
.preview-head .btn.ghost { color: #d6d6d6; }
.preview-head .btn.ghost:hover { background: rgba(255,255,255,.08); }
.preview-head .btn:not(.primary):not(.ghost) { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.12); color: #ececec; }
.edit-state { font-size: 12px; color: #9a9a9a; white-space: nowrap; }
.edit-state.dirty { color: var(--warn); }
.preview-audio { display: flex; flex-direction: column; align-items: center; gap: 22px; }
.preview-audio .icon { width: 96px; height: 96px; color: var(--k-audio); stroke-width: 1.2; }
.preview-audio audio { width: min(460px, 80vw); }
.preview-none { display: flex; flex-direction: column; align-items: center; gap: 14px; color: #9a9a9a; text-align: center; }
.preview-none .icon { width: 64px; height: 64px; stroke-width: 1.2; }
.preview-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 46px; height: 46px; border-radius: 50%; border: 0; background: rgba(255,255,255,.04);
  display: grid; place-items: center;
}
.preview-nav.prev { left: 14px; }
.preview-nav.next { right: 14px; }
.preview-nav .icon { width: 24px; height: 24px; }
.preview-note { color: #9a9a9a; font-size: 12px; margin-top: 8px; text-align: center; }

/* ---------------------------------------------------------------- Admin & Konto */

.admin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr)); gap: var(--gap); align-items: start; }
.panel { padding: 18px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.panel.wide { grid-column: 1 / -1; }
.panel-head { display: flex; align-items: center; gap: 10px; }
.panel-head .icon { color: var(--accent); width: 19px; height: 19px; }
.panel-head h2 { margin: 0; font-size: 15px; flex: 1; }
.panel-head p { margin: 0; }
.panel .hint { margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.55; }
.panel .hint code, .code {
  font: 12px ui-monospace, "Cascadia Code", Consolas, monospace;
  padding: 1px 6px; border-radius: 5px; background: var(--panel-3); color: var(--text-2);
}
.row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.row > .field { flex: 1; min-width: 160px; }

.status-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600;
  background: var(--panel-3); color: var(--text-2);
}
.status-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.status-pill.ok { background: var(--accent-soft); color: var(--accent-2); }
.status-pill.ok::before { background: var(--accent); }
.status-pill.bad { background: var(--danger-soft); color: var(--danger); }
.status-pill.bad::before { background: var(--danger); }

.dns-result { padding: 12px 14px; border-radius: var(--radius-sm); background: var(--panel-2); border: 1px solid var(--border); font-size: 13px; display: flex; flex-direction: column; gap: 6px; }

.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 16px; font-size: 13px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }

.table-wrap { overflow-x: auto; margin: 0 -18px; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { text-align: left; color: var(--muted); font-size: 11.5px; letter-spacing: .07em; text-transform: uppercase; font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 9px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table th:first-child, .table td:first-child { padding-left: 18px; }
.table th:last-child, .table td:last-child { padding-right: 18px; text-align: right; }
.table tr:last-child td { border-bottom: 0; }
.table select.input { height: 32px; width: auto; }
.table .actions { display: inline-flex; gap: 4px; }
.you { margin-left: 6px; padding: 1px 6px; border-radius: 5px; background: var(--accent-soft); color: var(--accent-2); font-size: 11px; font-weight: 700; }

.search-input { position: relative; margin-top: 7px; }
.search-input .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search-input .input { padding-left: 40px; height: 44px; }

/* ---------------------------------------------------------------- Login */

.login-wrap { min-height: 100vh; display: grid; place-items: center; align-content: center; gap: 18px; padding: var(--gap); }
.login-card { width: min(400px, 100%); overflow: hidden; }
.login-card .brand { padding: 22px 16px 18px; }
.login-form { padding: 22px 24px 24px; display: flex; flex-direction: column; gap: 14px; }
.login-form h1 { margin: 0; font-size: 19px; }
.login-form p { margin: -8px 0 4px; font-size: 13px; }

/* ---------------------------------------------------------------- Mobil */

@media (max-width: 1100px) {
  .top-row { grid-template-columns: minmax(0, 1fr); }
  .storage-card { padding: 14px 18px; }
}

@media (max-width: 900px) {
  .sidebar { transform: translateX(calc(-100% - var(--gap) * 2)); }
  .sidebar.open { transform: none; }
  .backdrop.show { display: block; position: fixed; inset: 0; z-index: 35; background: var(--overlay); }
  .main { margin-left: 0; padding: var(--gap); }
  .burger { display: inline-grid; }
  .drop-overlay { left: var(--gap); }
  .hero-head { flex-wrap: wrap; }
  .hero-actions { width: 100%; justify-content: flex-start; }
  .files.grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
  .list-head, .files.list .item { grid-template-columns: 34px minmax(0, 1fr) 40px; }
  .trash-list .list-head, .files.trash-list .item { grid-template-columns: 34px minmax(0, 1fr) 76px; }
  .list-head > :nth-child(3), .list-head > :nth-child(4),
  .files.list .item > .cell { display: none; }
  .preview-body { padding: 0 8px 16px; }
  .preview-head { flex-wrap: wrap; }
  .edit-state { display: none; }
  .office-hint { display: none; }
  .office-head .btn { margin-left: auto; }
  .preview-nav { top: auto; bottom: 18px; transform: none; background: rgba(0,0,0,.5); }
  .item .check, .item .more { opacity: 1; }
}

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