:root {
  --bg: #0b1120;
  --bg-elev: #111827;
  --bg-card: #162033;
  --bg-hover: #1e293b;
  --border: #243247;
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --primary-soft: rgba(59, 130, 246, 0.16);
  --danger: #ef4444;
  --danger-soft: rgba(239, 68, 68, 0.15);
  --success: #22c55e;
  --warning: #f59e0b;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  --radius: 12px;
  --radius-sm: 8px;
}

[data-theme="light"] {
  --bg: #f4f6fb;
  --bg-elev: #ffffff;
  --bg-card: #ffffff;
  --bg-hover: #f1f5f9;
  --border: #e2e8f0;
  --text: #0f172a;
  --text-muted: #64748b;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-soft: rgba(37, 99, 235, 0.1);
  --shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  background: var(--bg-hover);
  padding: 2px 6px;
  border-radius: 5px;
  font-size: 12.5px;
}

.hidden { display: none !important; }
.muted-text { color: var(--text-muted); font-size: 13px; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Buttons & Inputs */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-secondary { background: var(--bg-hover); color: var(--text); border-color: var(--border); }
.btn-secondary:hover { border-color: var(--primary); }
.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover { background: var(--bg-hover); color: var(--text); }
.btn-danger { background: var(--danger-soft); color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-sm { padding: 5px 10px; font-size: 12.5px; }
.btn-block { width: 100%; }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 15px;
  transition: all 0.15s ease;
}
.icon-btn:hover { background: var(--bg-hover); color: var(--text); }

input[type="text"],
input[type="password"],
input[type="search"],
select {
  width: 100%;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s;
}
input:focus, select:focus { border-color: var(--primary); }

.select-sm { width: auto; padding: 5px 10px; font-size: 12.5px; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 12.5px; color: var(--text-muted); font-weight: 500; }
.checkbox-field {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
}
.checkbox-field input { width: auto; accent-color: var(--primary); }
.input-row { display: flex; gap: 8px; }
.stack-form { display: flex; flex-direction: column; gap: 14px; }
.stack-md { display: flex; flex-direction: column; gap: 16px; }

/* Login / Center Screen */
.center-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background:
    radial-gradient(circle at 20% 20%, rgba(59, 130, 246, 0.15), transparent 45%),
    radial-gradient(circle at 80% 80%, rgba(139, 92, 246, 0.12), transparent 45%),
    var(--bg);
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px 28px;
  box-shadow: var(--shadow);
  text-align: center;
}
.auth-logo {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--primary-soft);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}
.auth-card h1 { margin: 0 0 6px; font-size: 21px; }
.auth-sub { margin: 0 0 22px; color: var(--text-muted); font-size: 13px; }
.auth-form { text-align: left; display: flex; flex-direction: column; gap: 14px; }
.auth-footnote {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-muted);
}

.error-banner {
  background: var(--danger-soft);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 13px;
}

/* App Shell Layout */
.app-shell {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

.sidebar {
  width: 244px;
  flex-shrink: 0;
  background: var(--bg-elev);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 16px 12px;
  z-index: 20;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px 18px;
}
.brand-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--primary-soft);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}
.brand-title { font-weight: 700; font-size: 16px; letter-spacing: -0.01em; }

.sidebar-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
  overflow-y: auto;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s;
}
.nav-item:hover { background: var(--bg-hover); color: var(--text); }
.nav-item.active { background: var(--primary-soft); color: var(--primary); }
.nav-icon { font-size: 16px; width: 22px; text-align: center; }
.nav-divider { height: 1px; background: var(--border); margin: 10px 8px; }

.sidebar-footer {
  padding-top: 12px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.disk-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}
.disk-header { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-muted); margin-bottom: 6px; }
.disk-bar { height: 6px; background: var(--border); border-radius: 99px; overflow: hidden; margin-bottom: 6px; }
.disk-bar-fill { height: 100%; background: var(--primary); border-radius: 99px; transition: width 0.3s; }
.disk-text { font-size: 11.5px; color: var(--text-muted); }

.user-row { display: flex; align-items: center; justify-content: space-between; padding: 0 4px; }
.user-badge {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  background: var(--bg-hover);
  padding: 4px 10px;
  border-radius: 99px;
}

/* Main Area */
.main-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.topbar {
  height: 62px;
  flex-shrink: 0;
  padding: 0 20px;
  background: var(--bg-elev);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.topbar-left { display: flex; align-items: center; gap: 10px; flex: 1; max-width: 460px; }
.search-box {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
}
.search-box .search-icon {
  position: absolute;
  left: 11px;
  font-size: 13px;
  opacity: 0.65;
  pointer-events: none;
}
.search-box input { padding-left: 34px; padding-right: 34px; height: 36px; font-size: 13.5px; }
.search-box .icon-btn { position: absolute; right: 2px; width: 30px; height: 30px; font-size: 12px; }

.topbar-actions { display: flex; align-items: center; gap: 8px; }

.toolbar-bar {
  padding: 10px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  font-size: 13.5px;
}
.crumb-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 13.5px;
}
.crumb-btn:hover { background: var(--bg-hover); color: var(--text); }
.crumb-btn.current { color: var(--text); font-weight: 600; cursor: default; }
.crumb-sep { color: var(--text-muted); opacity: 0.5; }
.toolbar-right { display: flex; align-items: center; gap: 10px; }

.content-area {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px 40px;
}

/* File List Table */
.file-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.file-table th {
  text-align: left;
  padding: 11px 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  background: var(--bg-card);
}
.file-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.file-table tr:last-child td { border-bottom: none; }
.file-table tbody tr { transition: background 0.12s; cursor: pointer; }
.file-table tbody tr:hover { background: var(--bg-hover); }

.file-name-cell {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}
.file-icon-box {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  background: var(--bg-hover);
}
.file-icon-box.cat-video { background: rgba(236, 72, 153, 0.14); }
.file-icon-box.cat-dir { background: rgba(59, 130, 246, 0.14); }
.file-icon-box.cat-image { background: rgba(34, 197, 94, 0.14); }
.file-icon-box.cat-audio { background: rgba(245, 158, 11, 0.14); }
.file-icon-box.cat-pdf { background: rgba(239, 68, 68, 0.14); }

.file-name-text { font-weight: 500; word-break: break-word; }
.file-path-sub { font-size: 11.5px; color: var(--text-muted); }

.row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}

/* Grid View */
.file-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
  gap: 14px;
}
.file-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s;
  display: flex;
  flex-direction: column;
}
.file-card:hover { transform: translateY(-2px); border-color: var(--primary); }
.file-card-thumb {
  height: 124px;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 42px;
  position: relative;
  overflow: hidden;
}
.file-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.video-badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 99px;
}
.file-card-info {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.file-card-name {
  font-weight: 500;
  font-size: 13.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.file-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11.5px;
  color: var(--text-muted);
}
.file-card-actions {
  display: flex;
  gap: 4px;
  padding: 0 8px 8px;
  justify-content: flex-end;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 64px 20px;
  color: var(--text-muted);
}
.empty-icon { font-size: 46px; margin-bottom: 10px; opacity: 0.75; }
.empty-title { font-size: 16px; color: var(--text); font-weight: 600; margin-bottom: 6px; }

/* Shares Management Cards */
.share-list-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 14px;
}
.share-item-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.share-item-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.share-item-title { font-weight: 600; font-size: 15px; display: flex; align-items: center; gap: 8px; word-break: break-all; }
.badge {
  display: inline-block;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 99px;
  font-weight: 600;
}
.badge-lock { background: rgba(245, 158, 11, 0.16); color: var(--warning); }
.badge-public { background: rgba(34, 197, 94, 0.16); color: var(--success); }
.badge-expired { background: var(--danger-soft); color: var(--danger); }

.share-item-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
  color: var(--text-muted);
}
.share-item-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 2px; }

/* Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 100;
}
.modal-dialog {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  width: 100%;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.modal-xs { max-width: 400px; }
.modal-sm { max-width: 480px; }
.modal-md { max-width: 680px; }
.modal-preview { max-width: 1120px; height: 88vh; }

.modal-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
}
.modal-title { font-weight: 600; font-size: 15.5px; }
.modal-header-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.modal-body { padding: 18px; overflow-y: auto; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }

/* Preview Body */
.preview-title-wrap { display: flex; align-items: center; gap: 10px; min-width: 0; }
.preview-icon { font-size: 22px; }
.preview-meta { font-size: 12px; color: var(--text-muted); }

.preview-body {
  flex: 1;
  min-height: 0;
  background: #020617;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: auto;
}
.preview-body video {
  width: 100%;
  height: 100%;
  max-height: 100%;
  background: #000;
  outline: none;
}
.preview-body img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  cursor: zoom-in;
  transition: transform 0.2s;
}
.preview-body img.zoomed {
  max-width: none;
  max-height: none;
  cursor: zoom-out;
}
.preview-body iframe {
  width: 100%;
  height: 100%;
  border: none;
  background: #fff;
}
.text-preview-box {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 20px;
  overflow: auto;
  background: var(--bg);
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}
.audio-preview-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 36px 28px;
  width: 90%;
  max-width: 520px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.audio-preview-card audio { width: 100%; }

.preview-footer {
  padding: 10px 18px;
  border-top: 1px solid var(--border);
  background: var(--bg-elev);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 12.5px;
}
.video-controls-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.speed-pill {
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 12px;
}
.speed-pill.active, .speed-pill:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-soft);
}

/* Share Modal Extras */
.share-target-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
  font-weight: 500;
}
.share-result-box {
  margin-top: 16px;
  padding: 14px;
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.share-result-title { font-weight: 600; color: var(--success); font-size: 13.5px; }
.copy-row { display: flex; gap: 8px; }
.share-result-pass { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; }

/* WebDAV Guide */
.kv-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.kv-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.kv-label { font-size: 12.5px; color: var(--text-muted); }
.kv-value-wrap { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.guide-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.guide-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}
.guide-item h4 { margin: 0 0 6px; font-size: 13.5px; }
.guide-item p { margin: 0; font-size: 12.5px; color: var(--text-muted); }
.code-snippet {
  margin: 6px 0 0;
  padding: 8px 10px;
  background: var(--bg-elev);
  border-radius: 6px;
  font-size: 11.5px;
  overflow-x: auto;
  color: var(--text);
}

/* Public Share Page */
.share-page { min-height: 100vh; display: flex; flex-direction: column; }
.share-topbar {
  height: 60px;
  padding: 0 24px;
  background: var(--bg-elev);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.share-brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 16px; }
.share-topbar-right { display: flex; align-items: center; gap: 8px; }
.share-main {
  flex: 1;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px 20px 48px;
}
.share-hero {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.share-hero-title { font-size: 19px; font-weight: 700; margin: 0 0 6px; word-break: break-all; }
.share-inline-player {
  background: #000;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 14px;
}
.share-inline-player video { width: 100%; max-height: 70vh; display: block; }
.share-inline-image {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  text-align: center;
}
.share-inline-image img { max-width: 100%; max-height: 72vh; border-radius: 8px; }

/* Upload Progress Panel */
.upload-panel {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 340px;
  max-width: calc(100vw - 32px);
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  z-index: 150;
  overflow: hidden;
}
.upload-panel-header {
  padding: 10px 14px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  font-size: 13px;
}
.upload-list { max-height: 240px; overflow-y: auto; padding: 10px 14px; display: flex; flex-direction: column; gap: 10px; }
.upload-row { font-size: 12.5px; }
.upload-row-top { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.upload-bar { height: 5px; background: var(--border); border-radius: 99px; overflow: hidden; }
.upload-bar-fill { height: 100%; background: var(--primary); transition: width 0.15s; }

/* Drop Overlay */
.drop-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.drop-overlay-box {
  border: 2px dashed var(--primary);
  border-radius: 20px;
  padding: 48px 56px;
  text-align: center;
  background: rgba(59, 130, 246, 0.08);
}
.drop-icon { font-size: 48px; margin-bottom: 10px; }
.drop-title { font-size: 20px; font-weight: 700; margin-bottom: 6px; }
.drop-sub { color: var(--text-muted); font-size: 13.5px; }

/* Toasts */
.toast-container {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  background: var(--bg-elev);
  color: var(--text);
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  padding: 10px 14px;
  border-radius: 10px;
  box-shadow: var(--shadow);
  font-size: 13px;
  max-width: 340px;
  animation: slideIn 0.2s ease;
}
.toast.error { border-left-color: var(--danger); }
.toast.success { border-left-color: var(--success); }
@keyframes slideIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.mobile-only { display: none; }

@media (max-width: 820px) {
  .mobile-only { display: inline-flex; }
  .hide-sm { display: none; }
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    box-shadow: var(--shadow);
  }
  .sidebar.open { transform: translateX(0); }
  .col-time, .col-size { display: none; }
  .topbar { padding: 0 12px; }
  .content-area { padding: 12px 12px 32px; }
  .modal-preview { height: 94vh; }
}
