:root { color-scheme: light dark; font-family: system-ui, -apple-system, Segoe UI, sans-serif; }
body { margin: 0; background: #f4f6f8; color: #18212b; }
.wrap { max-width: 760px; margin: 8vh auto; padding: 20px; }
.card { background: #fff; border-radius: 18px; padding: 32px; box-shadow: 0 20px 55px rgba(0,0,0,.08); }
h1 { margin-top: 0; }
.muted { color: #667085; }
.form { display: grid; gap: 16px; margin-top: 24px; }
input { width: 100%; box-sizing: border-box; padding: 12px 14px; border: 1px solid #cfd6df; border-radius: 10px; font-size: 16px; }
button { cursor: pointer; border: 0; border-radius: 10px; padding: 12px 18px; font-weight: 700; background: #162033; color: #fff; }
a { color: #162033; }
.alert { background: #fff1f0; border: 1px solid #ffccc7; padding: 12px; border-radius: 10px; }
.topline { display:flex; align-items:center; justify-content:space-between; gap: 16px; }
.drop { margin-top: 24px; border: 2px dashed #aab4c0; border-radius: 18px; padding: 42px 24px; text-align: center; background: #fafbfc; }
.drop.over { background: #eef4ff; border-color: #4778ff; }
.progressbox { margin-top: 24px; }
.hidden { display: none; }
.progress { height: 18px; background: #e8edf3; border-radius: 999px; overflow: hidden; }
.progress > div { height: 100%; width: 0%; background: #162033; transition: width .2s ease; }
.status { margin-top: 10px; color: #344054; }
@media (prefers-color-scheme: dark) {
  body { background:#111827; color:#f9fafb; }
  .card { background:#1f2937; }
  .muted,.status { color:#cbd5e1; }
  .drop { background:#111827; }
  input { background:#111827; color:#fff; border-color:#4b5563; }
  a { color:#93c5fd; }
}

.mt { margin-top: 22px; }
.small { font-size: 14px; }
.ok { background: #ecfdf3; border: 1px solid #abefc6; padding: 12px; border-radius: 10px; color: #067647; }
select { width: 100%; box-sizing: border-box; padding: 12px 14px; border: 1px solid #cfd6df; border-radius: 10px; font-size: 16px; background: #fff; color: #18212b; }
.tablewrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid #e5e7eb; }
@media (prefers-color-scheme: dark) {
  .ok { background:#052e1b; border-color:#047857; color:#bbf7d0; }
  select { background:#111827; color:#fff; border-color:#4b5563; }
  th, td { border-bottom-color:#374151; }
}
.wide { max-width: 1180px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.inlineform { display: inline-flex; gap: 6px; align-items: center; margin: 0; }
button.secondary, .buttonlink { background: #344054; color: #fff; border-radius: 8px; padding: 8px 10px; font-size: 14px; text-decoration: none; display: inline-block; }
button.danger { background: #b42318; color: #fff; border-radius: 8px; padding: 8px 10px; font-size: 14px; }
.smallinput { width: 180px; padding: 8px 10px; font-size: 14px; }
@media (max-width: 760px) {
  .actions, .inlineform { display: grid; width: 100%; }
  .smallinput { width: 100%; }
}

.logbox{max-height:360px;overflow:auto;background:#101826;border:1px solid #26344d;border-radius:10px;padding:12px;font-size:12px;line-height:1.4;white-space:pre-wrap}

.filters { display: grid; grid-template-columns: repeat(6, minmax(140px, 1fr)); gap: 12px; align-items: end; margin: 16px 0; }
.badge { display: inline-block; border-radius: 999px; padding: 4px 9px; background: #eef2f7; color: #344054; font-size: 13px; font-weight: 700; }
.detailscell { max-width: 360px; word-break: break-word; font-size: 13px; color: #475467; }
@media (max-width: 1000px) { .filters { grid-template-columns: repeat(2, minmax(140px, 1fr)); } }
@media (max-width: 560px) { .filters { grid-template-columns: 1fr; } }
@media (prefers-color-scheme: dark) {
  .badge { background:#334155; color:#e5e7eb; }
  .detailscell { color:#cbd5e1; }
}
.settingsform{grid-template-columns:repeat(auto-fit,minmax(220px,1fr));align-items:end}
.checkline{display:flex;gap:8px;align-items:center;margin-top:22px}
.checkline input{width:auto}
.mt-small{margin-top:10px}
code{background:#101826;border:1px solid #26344d;border-radius:5px;padding:1px 5px;color:#d9e7ff}

/* v14: Aktivitätslog besser bedienbar */
#activityLogTable th[draggable="true"] { cursor: move; user-select: none; white-space: nowrap; }
#activityLogTable th.dragging { opacity: .55; }
#activityLogTable th.dragover { outline: 2px dashed #667085; outline-offset: -4px; }
#activityLogTable td, #activityLogTable th { vertical-align: top; }
.passwordcell { min-width: 170px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12px; color: #475467; }
.detailscell { min-width: 280px; }
@media (prefers-color-scheme: dark) { .passwordcell { color:#cbd5e1; } }
.linkfield{min-width:260px;font-size:.85rem;padding:.35rem .45rem;border:1px solid #334155;border-radius:8px;background:#0f172a;color:#e2e8f0}
.tinyinput{width:70px;max-width:70px;padding:.35rem .45rem;border:1px solid #334155;border-radius:8px;background:#0f172a;color:#e2e8f0}
.shareform{gap:.35rem;align-items:center;flex-wrap:wrap;margin-bottom:.35rem}
.infogrid{display:grid;grid-template-columns:160px 1fr;gap:.4rem .9rem;margin:1rem 0}.infogrid dt{font-weight:700;color:#94a3b8}.infogrid dd{margin:0}

/* v17: Freigabelinks direkt unter Dateien */
.sharelinks-under-file{width:100%;margin:.45rem 0;padding:.55rem;border:1px solid #e5e7eb;border-radius:10px;background:#f8fafc}
.sharelink-row{display:flex;gap:.55rem;justify-content:space-between;align-items:flex-start;padding:.45rem 0;border-top:1px solid #e5e7eb}
.sharelink-row:first-of-type{border-top:0}
.sharelink-row.inactive{opacity:.72}
.sharelink-main{display:grid;gap:.25rem;min-width:280px;flex:1}
.sharelink-actions{display:flex;gap:.35rem;flex-wrap:wrap;justify-content:flex-end}
@media (max-width:900px){.sharelink-row{display:grid}.sharelink-actions{justify-content:flex-start}.linkfield{width:100%;min-width:0}}
@media (prefers-color-scheme: dark){.sharelinks-under-file{background:#111827;border-color:#374151}.sharelink-row{border-top-color:#374151}}
