:root {
  --bg: #0f1418;
  --bg-soft: #111516;
  --surface: #151c23;
  --surface-2: #191e1f;
  --surface-3: #202526;
  --raised: #1b2630;
  --border: #2a3031;
  --border-strong: #343a3b;
  --text: #d9e1e8;
  --text-strong: #ece9e1;
  --muted: #8293a1;
  --muted-2: #747c7d;
  --accent: #86aeca;
  --accent-2: #9fc1d8;
  --accent-3: #5d87a3;
  --danger: #e08e7e;
  --danger-bg: #322827;
  --radius: 10px;
  --radius-lg: 14px;
  --font: "Avenir Next", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }

/* Wichtig: erlaubt das HTML-Attribut [hidden] ueberall */
[hidden] { display: none !important; }

html, body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; }
button { cursor: pointer; }
a { text-decoration: none; color: inherit; }

::selection { background: rgba(134, 174, 202, .35); }

/* ============ LOGIN ============ */
.login-body {
  background:
    radial-gradient(1200px 600px at 20% 10%, #1d2831 0%, transparent 60%),
    radial-gradient(900px 500px at 90% 90%, #16222c 0%, transparent 55%),
    #0a0f13;
  min-height: 100dvh;
  overflow: hidden;
}

.login-overlay {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(90deg, rgba(5,10,12,.72), rgba(5,10,12,.35) 55%, rgba(5,10,12,.68));
  pointer-events: none;
}

.login-main {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem;
}

.login-card {
  width: 100%;
  max-width: 400px;
  padding: 2.25rem;
  background: rgba(17, 25, 27, .78);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 22px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 24px 80px rgba(0,0,0,.42);
  color: #f1f3f5;
  animation: soft-in .5s ease both;
}

.login-brand {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: 2.5rem;
}

.brand-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--accent);
  color: #0d141b;
}

.login-brand .brand-text {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
}

.login-heading { margin-bottom: 1.75rem; }

.eyebrow {
  margin: 0 0 .75rem;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent-2);
}

.login-heading h1 {
  margin: 0;
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -.035em;
  color: #fff;
}

.subtitle {
  margin: .65rem 0 0;
  font-size: .9rem;
  line-height: 1.5;
  color: rgba(255,255,255,.65);
}

.login-form { display: flex; flex-direction: column; gap: 1.15rem; }

.login-form label { display: block; }

.label-text {
  display: block;
  margin-bottom: .5rem;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: rgba(255,255,255,.72);
}

.field {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .85rem 1rem;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 12px;
  background: rgba(255,255,255,.07);
  transition: border-color .2s, box-shadow .2s;
}

.field:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(134,174,202,.16);
}

.field-badge {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: rgba(255,255,255,.14);
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,.85);
}

.field-icon { color: rgba(255,255,255,.55); display: flex; }

.field input {
  flex: 1;
  background: transparent;
  border: 0;
  outline: 0;
  color: #fff;
  font-size: 15px;
}

.field input::placeholder { color: rgba(255,255,255,.4); }

.error {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .75rem 1rem;
  margin: 0;
  background: rgba(127,48,43,.5);
  border: 1px solid rgba(239,159,145,.25);
  border-radius: 12px;
  font-size: .875rem;
  color: #ffd4cc;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  padding: .8rem 1.15rem;
  background: var(--accent);
  color: #0d141b;
  border: 0;
  border-radius: 10px;
  font-weight: 600;
  font-size: .95rem;
  transition: background .2s, transform .15s;
}

.btn-primary:hover { background: var(--accent-2); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }

.btn-full {
  width: 100%;
  justify-content: space-between;
  margin-top: .5rem;
  padding: 1rem 1.25rem;
}

.login-footer {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255,255,255,.12);
  font-size: 12px;
  color: rgba(255,255,255,.55);
}

.login-footer svg { color: var(--accent-2); flex-shrink: 0; }

/* ============ DASHBOARD ============ */
.dashboard-body { background: var(--bg); }

.layout {
  display: flex;
  min-height: 100dvh;
}

.sidebar {
  width: 252px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  padding: 1.75rem 1.25rem;
  background: var(--surface-2);
  border-right: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: .65rem;
  color: var(--text-strong);
}

.brand-text {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.sidebar-nav { margin-top: 3.5rem; }

.nav-label {
  margin: 0 0 .75rem;
  padding: 0 .75rem;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .75rem;
  border-radius: 10px;
  font-size: .9rem;
  color: var(--muted);
  transition: background .2s, color .2s;
}

.nav-item:hover { background: #232a2b; color: var(--accent-2); }

.nav-item.active {
  background: #2a2f30;
  color: var(--text-strong);
  font-weight: 600;
}

.sidebar-foot { margin-top: auto; }

.storage-card {
  padding: 1rem;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: #222728;
}

.storage-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .75rem;
  font-size: 12px;
  font-weight: 600;
  color: #c0c5c3;
}

.storage-head svg { color: var(--accent); }

.storage-bar {
  height: 6px;
  background: var(--border-strong);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: .5rem;
}

.storage-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-3), var(--accent));
  border-radius: 99px;
  transition: width .4s ease;
}

.storage-info {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.storage-info strong { color: var(--accent-2); }

.nav-item.help { margin-top: 1rem; padding: .5rem .75rem; font-size: .85rem; }

/* Main */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 2rem;
  background: rgba(17,22,23,.95);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 5;
}

.mobile-brand { display: none; }

.search {
  position: relative;
  flex: 1;
  max-width: 470px;
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .7rem 1rem .7rem 2.8rem;
  background: var(--surface-3);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  color: var(--muted-2);
}

.search > svg:first-child {
  position: absolute;
  left: .9rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted-2);
}

.search input {
  flex: 1;
  background: transparent;
  border: 0;
  outline: 0;
  color: #fff;
  font-size: .9rem;
}

.search input::placeholder { color: var(--muted-2); }

.search:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(134,174,202,.12);
}

.search-clear {
  color: var(--muted-2);
  padding: .2rem;
  display: flex;
}
.search-clear:hover { color: var(--accent-2); }

.topbar-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  transition: background .2s, color .2s;
}

.icon-btn:hover { background: #252b2c; color: var(--accent-2); }
.icon-btn.danger:hover { background: var(--danger-bg); color: var(--danger); }
.icon-btn.small { width: 32px; height: 32px; border-radius: 8px; }

.divider { width: 1px; height: 26px; background: var(--border-strong); }

.user { display: flex; align-items: center; gap: .75rem; }

.avatar {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  color: #0d141b;
  font-weight: 700;
  font-size: .85rem;
  overflow: hidden;
  padding: 0;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.avatar.small { width: 32px; height: 32px; }

.user-meta { display: none; }
.user-name { margin: 0; font-size: .85rem; font-weight: 600; color: var(--text-strong); }
.user-sub { margin: 0; font-size: 11px; color: var(--muted); }

/* Content */
.content {
  max-width: 1230px;
  width: 100%;
  margin: 0 auto;
  padding: 3rem 3rem 4rem;
}

.flash {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .8rem 1.1rem;
  margin-bottom: 1rem;
  background: var(--raised);
  border: 1px solid var(--border-strong);
  border-left: 3px solid var(--accent);
  border-radius: 10px;
  font-size: .875rem;
  color: var(--text);
  word-break: break-all;
}

.flash svg { color: var(--accent); flex-shrink: 0; }

.mobile-search { display: none; }

.page-head {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  justify-content: space-between;
  margin-bottom: 2.5rem;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin: 0 0 .75rem;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent-2);
}

.eyebrow-line {
  width: 28px;
  height: 1px;
  background: var(--accent);
}

.page-head h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.6rem);
  font-weight: 600;
  letter-spacing: -.05em;
  line-height: 1;
  color: var(--text-strong);
}

.page-sub {
  margin: .75rem 0 0;
  font-size: .875rem;
  color: var(--muted);
}

.page-sub .dot { margin: 0 .5rem; color: var(--muted-2); }

.page-actions {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  align-items: center;
}

.page-actions .btn-ghost,
.page-actions .btn-primary {
  height: 42px;
  padding: 0 1rem;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  box-sizing: border-box;
}

.page-actions form {
  display: inline-flex;
  margin: 0;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .75rem 1rem;
  background: var(--surface-3);
  color: #c5c9c7;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  font-size: .875rem;
  font-weight: 600;
  transition: border-color .2s, background .2s, color .2s;
}

.btn-ghost:hover {
  border-color: var(--accent);
  background: #292e2f;
  color: var(--accent-2);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: 1.25rem;
  font-size: .875rem;
  font-weight: 600;
  color: #a8afad;
  transition: color .2s;
}
.back-link:hover { color: var(--accent-2); }

.selection-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .75rem 1rem;
  margin-bottom: 1rem;
  background: #202e3a;
  border: 1px solid #3f596c;
  border-radius: 10px;
  font-size: .875rem;
  color: #a8c7dc;
  flex-wrap: wrap;
}

.btn-danger-ghost {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .5rem .8rem;
  background: transparent;
  color: var(--danger);
  border: 0;
  border-radius: 8px;
  font-size: .875rem;
  font-weight: 600;
  transition: background .2s;
}
.btn-danger-ghost:hover { background: #493331; }

.list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  font-size: .875rem;
  font-weight: 600;
  color: var(--text);
  flex-wrap: wrap;
  gap: .5rem;
}

.view-toggle {
  display: flex;
  padding: 3px;
  background: var(--surface-3);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
}

.view-toggle button {
  display: grid;
  place-items: center;
  width: 30px;
  height: 28px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted-2);
  transition: background .2s, color .2s;
}

.view-toggle button.active {
  background: var(--accent);
  color: #0d141b;
}

/* Empty */
.empty {
  display: grid;
  place-items: center;
  min-height: 330px;
  padding: 2rem;
  text-align: center;
  background: var(--surface);
  border: 1px dashed #3a4245;
  border-radius: 22px;
}

.empty-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  background: #1e2b34;
  color: var(--accent);
  border-radius: 20px;
}

.empty h3 {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: -.03em;
  color: var(--text-strong);
}

.empty p {
  margin: .6rem auto 0;
  max-width: 320px;
  font-size: .875rem;
  line-height: 1.55;
  color: var(--muted);
}

/* Grid view */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: .75rem;
}

.card {
  position: relative;
  background: var(--surface);
  border: 1px solid #2d3438;
  border-radius: 18px;
  transition: transform .2s, border-color .2s, background .2s;
  overflow: hidden;
  cursor: pointer;
  user-select: none;
}

.card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
}

.card.selected {
  background: #202e3a;
  border-color: var(--accent);
}

.card-check {
  position: absolute;
  top: .75rem;
  right: .75rem;
  z-index: 2;
  opacity: 0;
  transition: opacity .2s;
  cursor: pointer;
}
.card:hover .card-check, .card.selected .card-check { opacity: 1; }

.card-body {
  display: block;
  padding: 1.1rem;
  color: inherit;
}

.card-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 2rem;
  border-radius: 12px;
  background: #252a2b;
  color: var(--accent);
}

.card-name {
  margin: 0;
  font-size: .875rem;
  font-weight: 600;
  color: var(--text-strong);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-meta {
  margin: .25rem 0 0;
  font-size: 12px;
  color: var(--muted);
}

/* Share-Button auf Karten */
.share-card-btn {
  position: absolute;
  top: .75rem;
  left: .75rem;
  z-index: 2;
  opacity: 0;
  transition: opacity .2s;
}
.card:hover .share-card-btn { opacity: 1; }

/* List view */
.list {
  background: var(--surface);
  border: 1px solid #2d3438;
  border-radius: 22px;
  overflow: hidden;
}

.list-header {
  display: grid;
  grid-template-columns: 36px 1fr 130px 130px 80px;
  gap: 1rem;
  padding: .8rem 1.25rem;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted-2);
  border-bottom: 1px solid var(--border);
  align-items: center;
}

.row {
  display: grid;
  grid-template-columns: 36px 1fr 130px 130px 80px;
  gap: 1rem;
  align-items: center;
  padding: .75rem 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,.03);
  transition: background .15s;
  cursor: pointer;
  user-select: none;
}

.row:last-child { border-bottom: 0; }
.row:hover { background: var(--raised); }
.row.selected { background: #202e3a; }

.row-check { display: flex; cursor: pointer; }
.row-check input { cursor: pointer; }

.row-main {
  display: flex;
  align-items: center;
  gap: .9rem;
  min-width: 0;
  color: inherit;
}

.row-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border-radius: 11px;
  background: #252a2b;
  color: var(--accent);
}

.row-name {
  font-size: .9rem;
  font-weight: 600;
  color: var(--text-strong);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-size, .row-mtime {
  font-size: .85rem;
  color: var(--muted);
}

.row-actions {
  display: flex;
  justify-content: flex-end;
  gap: .25rem;
  opacity: 0;
  transition: opacity .2s;
}

.row:hover .row-actions,
.row.selected .row-actions { opacity: 1; }

/* Kind colors */
.kind-folder { color: var(--accent); }
.kind-image  { color: #7ea9c9; }
.kind-sheet  { color: #7fa3b8; }
.kind-archive{ color: #8fa2b3; }
.kind-text   { color: #9db1bf; }
.kind-pdf    { color: #a8bfd2; }

/* Footer note */
.footer-note {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin: 2rem 0 0;
  font-size: 12px;
  color: var(--muted-2);
}
.footer-note svg { color: var(--accent); }

/* Modal */
.modal {
  border: 0;
  padding: 0;
  background: transparent;
  max-width: 100%;
  max-height: 100%;
}
.modal::backdrop { background: rgba(0,0,0,.65); backdrop-filter: blur(4px); }

.modal-card {
  width: min(420px, 92vw);
  padding: 1.75rem;
  background: #191e1f;
  border: 1px solid #3a4041;
  border-radius: 14px;
  color: var(--text-strong);
  box-shadow: 0 24px 70px rgba(0,0,0,.5);
  animation: rise-in .3s cubic-bezier(.22,.8,.24,1) both;
}

.modal-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.modal-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: .75rem;
  background: #1f2d38;
  color: var(--accent);
  border-radius: 11px;
}

.modal-card h3 {
  margin: 0;
  font-size: 1.5rem;
  letter-spacing: -.025em;
}

.modal-card p {
  margin: .25rem 0 0;
  font-size: .875rem;
  color: var(--muted);
}

.modal-input {
  width: 100%;
  padding: .85rem 1rem;
  background: #111516;
  border: 1px solid #3a4041;
  border-radius: 10px;
  color: #fff;
  font-size: .9rem;
  outline: 0;
  transition: border-color .2s, box-shadow .2s;
}

.modal-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(134,174,202,.15);
}

.modal-actions {
  display: flex;
  gap: .75rem;
  margin-top: 1.5rem;
}

.modal-actions > * { flex: 1; justify-content: center; }

/* Toast */
.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 40;
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .8rem 1.25rem;
  background: #0d141b;
  border: 1px solid #2d3b47;
  border-radius: 14px;
  color: var(--text-strong);
  font-size: .875rem;
  font-weight: 600;
  box-shadow: 0 15px 35px rgba(0,0,0,.4);
  animation: soft-in .3s ease both;
}
.toast svg { color: var(--accent-2); }

/* Animations */
@keyframes soft-in { from { opacity: 0 } to { opacity: 1 } }
@keyframes rise-in { from { opacity: 0; transform: translateY(10px) } to { opacity: 1; transform: translateY(0) } }

/* ============ UPLOAD PANEL ============ */
.upload-panel {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 60;
  width: min(420px, calc(100vw - 2.5rem));
  padding: 1rem 1.1rem 1.1rem;
  background: #171e24;
  border: 1px solid #2d3b47;
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,.55);
  animation: rise-in .25s cubic-bezier(.22,.8,.24,1) both;
}

.upload-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: .85rem;
}

.upload-panel-title {
  display: flex;
  align-items: center;
  gap: .7rem;
  min-width: 0;
}

.upload-panel-title svg {
  color: var(--accent-2);
  flex-shrink: 0;
}

.upload-panel-name {
  margin: 0;
  font-size: .9rem;
  font-weight: 600;
  color: var(--text-strong);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 280px;
}

.upload-panel-sub {
  margin: .15rem 0 0;
  font-size: .75rem;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 280px;
}

.upload-progress {
  height: 8px;
  background: #0c1116;
  border-radius: 99px;
  overflow: hidden;
  border: 1px solid #2a3843;
}

.upload-progress-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent-3), var(--accent-2));
  border-radius: 99px;
  transition: width .2s ease;
}

.upload-panel-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  margin-top: .55rem;
  font-size: .75rem;
  color: var(--muted);
}

.upload-panel-foot #uploadPercent { color: var(--accent-2); font-weight: 600; }
.upload-results {
  margin-top: .8rem;
  padding-top: .75rem;
  border-top: 1px solid rgba(255,255,255,.09);
}
.upload-results-title {
  margin: 0 0 .45rem;
  color: #ffb2a8;
  font-size: .76rem;
  font-weight: 700;
}
.upload-results-list {
  max-height: 140px;
  overflow-y: auto;
  margin: 0;
  padding: 0;
  list-style: none;
}
.upload-results-list li {
  display: grid;
  gap: .12rem;
  padding: .45rem 0;
  border-top: 1px solid rgba(255,255,255,.06);
}
.upload-results-list li:first-child { border-top: 0; }
.upload-results-list strong {
  color: #e7edf0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: .76rem;
}
.upload-results-list span, .upload-results-more {
  color: #d99d94;
  font-size: .7rem;
  line-height: 1.35;
}
.upload-results-more { margin: .55rem 0 0; }
.upload-refresh {
  width: 100%;
  margin-top: .8rem;
  padding: .58rem .7rem;
  border: 1px solid #3d718b;
  border-radius: 8px;
  background: #193342;
  color: #c8eafd;
  cursor: pointer;
  font: inherit;
  font-size: .76rem;
  font-weight: 650;
}
.upload-refresh:hover { background: #22475c; }

/* ============ SHARES ============ */
.shares-list {
  background: var(--surface);
  border: 1px solid #2d3438;
  border-radius: 22px;
  overflow: hidden;
}
.share-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .9rem 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,.03);
}
.share-item:last-child { border-bottom: 0; }
.share-item:hover { background: var(--raised); }
.share-item.expired { opacity: .55; }
.share-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border-radius: 11px;
  background: #252a2b;
  color: var(--accent);
}
.share-main { flex: 1; min-width: 0; }
.share-name {
  margin: 0;
  font-size: .9rem;
  font-weight: 600;
  color: var(--text-strong);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.share-meta {
  margin: .15rem 0 0;
  font-size: .75rem;
  color: var(--muted);
}
.share-meta .dot { margin: 0 .4rem; }
.share-actions {
  display: flex;
  gap: .25rem;
  flex-shrink: 0;
}

/* ============ SETTINGS / PROFILBILD ============ */
.logout-form {
  display: contents;
}
.logout-form button {
  background: transparent;
  border: 0;
}

.settings-avatar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .75rem;
  margin: 1rem 0 1.25rem;
}

.settings-avatar-preview {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: var(--accent);
  color: #0d141b;
  display: grid;
  place-items: center;
  font-size: 2rem;
  font-weight: 700;
  overflow: hidden;
  border: 3px solid #2d3b47;
}

.settings-avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.settings-avatar-actions {
  display: flex;
  gap: .5rem;
}

/* ============ RECENT LIST ============ */
.recent-list {
  background: var(--surface);
  border: 1px solid #2d3438;
  border-radius: 22px;
  overflow: hidden;
}
.recent-item {
  display: flex;
  align-items: center;
  gap: .9rem;
  padding: .85rem 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,.03);
  transition: background .15s;
}
.recent-item:last-child { border-bottom: 0; }
.recent-item:hover { background: var(--raised); }
.recent-item .row-icon { flex-shrink: 0; }
.recent-item .recent-name {
  flex: 1;
  min-width: 0;
  font-size: .9rem;
  font-weight: 600;
  color: var(--text-strong);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.recent-item .recent-time {
  font-size: .75rem;
  color: var(--muted);
  flex-shrink: 0;
}

/* ============ HELP ============ */
.help-body {
  color: var(--text);
  font-size: .9rem;
  line-height: 1.6;
}
.help-body p { margin: 0 0 .75rem; }
.help-body strong { color: var(--text-strong); }
.help-body a { color: var(--accent-2); }
.help-body ul { margin: 0 0 .75rem; padding-left: 1.25rem; }
.help-body li { margin-bottom: .35rem; }
.help-contact {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .75rem 1rem;
  background: #111516;
  border: 1px solid #2d3b47;
  border-radius: 10px;
  margin-bottom: .5rem;
  font-size: .875rem;
}
.help-contact svg { color: var(--accent-2); flex-shrink: 0; }

/* ============ Responsive ============ */
@media (max-width: 900px) {
  .sidebar { display: none; }
  .mobile-brand { display: flex; }
  .content { padding: 2rem 1.25rem 3rem; }
  .topbar { padding: 1rem 1.25rem; }
  .search { display: none; }
  .mobile-search {
    display: flex;
    position: relative;
    align-items: center;
    gap: .5rem;
    padding: .75rem 1rem .75rem 2.5rem;
    background: var(--surface-3);
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    margin-bottom: 1.25rem;
    color: var(--muted-2);
  }
  .mobile-search > svg:first-child {
    position: absolute; left: .8rem; top: 50%; transform: translateY(-50%);
  }
  .mobile-search input {
    flex: 1; background: transparent; border: 0; outline: 0;
    color: #fff; font-size: .9rem;
  }
  .user-meta { display: none; }
  .divider { display: none; }
  .list-header { display: none; }
  .row {
    grid-template-columns: 36px 1fr auto;
    padding: .75rem;
  }
  .row-size, .row-mtime { display: none; }
  .row-actions { opacity: 1; }
}

@media (min-width: 640px) {
  .user-meta { display: block; }
}

@media (min-width: 900px) {
  .page-head { flex-direction: row; align-items: flex-end; }
}

/* ============ ADMIN PANEL ============ */
.admin-content { max-width: 1440px; }
.admin-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}
.admin-stat, .admin-section {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 14px;
}
.admin-stat { padding: 1rem 1.15rem; display: grid; grid-template-columns: 28px 1fr; column-gap: .65rem; }
.admin-stat > span { color: var(--accent-2); padding-top: .15rem; }
.admin-stat strong { color: var(--text-strong); font-size: 1.35rem; line-height: 1.1; }
.admin-stat small { grid-column: 2; color: var(--muted); margin-top: .25rem; font-size: .72rem; }
.admin-stat.warn { border-color: rgba(247, 145, 78, .45); }
.admin-stat.warn > span, .admin-stat.warn strong { color: #f6a15c; }
.admin-section { padding: 1.35rem; margin-bottom: 1.25rem; overflow: hidden; }
.admin-section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.admin-section h2 { margin: 0 0 .3rem; color: var(--text-strong); font-size: 1.05rem; }
.admin-section-head p, .admin-hint { color: var(--muted); font-size: .78rem; line-height: 1.5; margin: 0; max-width: 850px; }
.traffic-size { color: var(--accent-2); white-space: nowrap; font-size: .77rem; }
.admin-create-form { display: grid; grid-template-columns: minmax(130px, 1fr) minmax(190px, 1.35fr) minmax(130px, .8fr) auto; gap: .65rem; align-items: center; margin-bottom: 1.15rem; }
.firewall-form { grid-template-columns: minmax(230px, 1.2fr) minmax(160px, 1fr) auto; }
.admin-create-form .modal-input { margin: 0; min-width: 0; }
.admin-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 10px; }
.admin-table { width: 100%; border-collapse: collapse; min-width: 720px; font-size: .82rem; }
.admin-table th { background: var(--surface-3); color: var(--muted); font-weight: 500; text-align: left; padding: .65rem .8rem; font-size: .7rem; letter-spacing: .04em; text-transform: uppercase; }
.admin-table td { padding: .75rem .8rem; border-top: 1px solid var(--border); color: var(--text); vertical-align: top; }
.admin-table td strong, .admin-table td small { display: block; }
.admin-table td strong { color: var(--text-strong); font-weight: 600; }
.admin-table td small, .muted { color: var(--muted); font-size: .74rem; margin-top: .15rem; }
.admin-table code { color: #b9d9ea; font-size: .75rem; white-space: nowrap; }
.status-pill { display: inline-block; padding: .18rem .48rem; border-radius: 999px; font-size: .7rem; font-weight: 600; }
.status-pill.ok { background: rgba(77, 179, 126, .13); color: #77d49c; }
.status-pill.blocked { background: rgba(234, 95, 89, .14); color: #ff9b96; }
.btn-small { border: 1px solid var(--border-strong); border-radius: 7px; background: var(--surface-3); color: var(--text); cursor: pointer; padding: .4rem .55rem; font-size: .72rem; }
.btn-small:hover { border-color: var(--accent); color: var(--text-strong); }
.btn-small.danger { color: #ffaaa6; border-color: rgba(234, 95, 89, .42); }
.inline-form { display: inline-block; margin: 0 .35rem .35rem 0; }
.admin-details { display: inline-block; vertical-align: top; margin-top: .1rem; }
.admin-details summary { cursor: pointer; color: var(--accent-2); font-size: .74rem; padding: .38rem 0; }
.admin-details[open] { display: block; width: min(290px, 100%); padding: .65rem; margin-top: .45rem; background: var(--surface-3); border: 1px solid var(--border); border-radius: 8px; }
.admin-details form { display: grid; gap: .4rem; margin: 0 0 .75rem; }
.admin-details form:last-child { margin-bottom: 0; }
.admin-details label { display: grid; gap: .28rem; color: var(--muted); font-size: .7rem; }
.admin-details .modal-input { padding: .45rem .55rem; font-size: .76rem; }
.notice { display: flex; align-items: flex-start; gap: .55rem; margin: 0 0 .9rem; padding: .7rem .8rem; border-radius: 8px; font-size: .78rem; }
.notice.warning { color: #ffd29b; background: rgba(195, 125, 45, .12); border: 1px solid rgba(195, 125, 45, .28); }
.notice.positive { color: #a5dfb8; background: rgba(61, 137, 89, .12); border: 1px solid rgba(61, 137, 89, .28); }
.traffic-log { margin-top: 1rem; }
.admin-hint { margin-top: .55rem; }

@media (max-width: 900px) {
  .admin-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-create-form, .firewall-form { grid-template-columns: 1fr 1fr; }
  .admin-create-form .btn-primary { grid-column: span 2; justify-content: center; }
}
@media (max-width: 560px) {
  .admin-section { padding: 1rem; }
  .admin-stats { grid-template-columns: 1fr 1fr; gap: .65rem; }
  .admin-stat { padding: .8rem; }
  .admin-section-head { display: block; }
  .traffic-size { display: block; margin-top: .5rem; }
  .admin-create-form, .firewall-form { grid-template-columns: 1fr; }
  .admin-create-form .btn-primary { grid-column: auto; }
}
