.uploads-table { width: 100%; }
.uploads-table th { font-weight: 600; }
.uploads-table td { vertical-align: middle; }

.file-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-right: 10px;
  background: rgba(0, 0, 0, 0.18);
  border-radius: 8px;
  color: var(--text-dim);
}

.file-icon.has-thumb {
  padding: 0;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.06);
}
.file-thumb {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.file-icon.is-video {
  background: linear-gradient(135deg, #7c62ff, #5a43e0);
  color: #fff;
  font-size: 12px;
  box-shadow: 0 4px 12px -6px rgba(90, 67, 224, 0.7);
}
#uploadsZipBtn[hidden] { display: none; }
#uploadsZipBtn.is-disabled { opacity: 0.45; cursor: not-allowed; }

.file-name-cell {
  display: flex;
  align-items: center;
}
.file-name-cell .nm {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 380px;
}

.uploads-toast {
  position: fixed;
  bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  padding: 10px 18px;
  background: var(--gold);
  color: #1a1409;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  box-shadow: 0 14px 30px -10px rgba(0, 0, 0, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 9999;
}
.uploads-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 760px) {
  .uploads-table { font-size: 13px; }
  .uploads-table th:nth-child(4),
  .uploads-table td:nth-child(4),
  .uploads-table th:nth-child(5),
  .uploads-table td:nth-child(5) { display: none; }
  .file-name-cell .nm { max-width: 180px; }
}

.share-result-lead {
  margin: 0 0 14px;
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.5;
}

.share-result-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.share-result-row input {
  flex: 1;
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 13px;
  letter-spacing: 0.02em;
  padding: 8px 10px;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm, 6px);
  color: var(--text, #fff);
  min-width: 0;
}
.share-result-row input:focus {
  outline: none;
  border-color: var(--gold);
}

.share-active-section {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}
.share-active-title {
  margin: 0 0 12px;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
  font-weight: 700;
}
.share-active-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
}
.share-list-empty {
  padding: 14px 12px;
  color: var(--text-dim);
  font-size: 13px;
  text-align: center;
  background: rgba(0, 0, 0, 0.12);
  border-radius: var(--radius-sm, 6px);
}

.share-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm, 6px);
}
.share-row-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.share-row-token {
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.share-row-token code {
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
}
.share-row-token .fa-lock {
  color: var(--gold);
  font-size: 11px;
}
.share-row-meta {
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.02em;
}
.share-row-meta strong { color: var(--text, #fff); font-weight: 600; }

.share-status {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 100px;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
}
.share-status.is-active    { background: rgba(45, 141, 99, 0.18);  color: #4ec98a; }
.share-status.is-expired   { background: rgba(178, 69, 69, 0.18);  color: #e57777; }
.share-status.is-revoked   { background: rgba(120, 120, 120, 0.18); color: var(--text-dim); }
.share-status.is-exhausted { background: rgba(207, 153, 60, 0.18); color: #e0b562; }

#shareModal .modal-body select,
#shareModal .modal-body input[type="text"],
#shareModal .modal-body input[type="number"] {
  width: 100%;
}

.upload-preview-modal { max-width: min(920px, 94vw); }
.upload-preview-body {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 200px;
  max-height: 74vh;
  overflow: auto;
}
.upload-preview-stage {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}
.upload-preview-img {
  max-width: 100%;
  max-height: 70vh;
  border-radius: var(--radius-sm);
  object-fit: contain;
}
.upload-preview-loading,
.upload-preview-error {
  color: var(--text-dim);
  padding: 32px;
  font-size: 14px;
}
.upload-preview-error { color: #e57777; }

.upload-preview-nav { display: flex; align-items: center; gap: 8px; margin-right: auto; }
.upload-preview-pos { color: var(--ink-muted); font-size: 13px; min-width: 52px; text-align: center; font-variant-numeric: tabular-nums; }
.upload-preview-nav .btn:disabled { opacity: .35; cursor: default; }

.upload-preview-stage { min-height: 200px; }
.upload-preview-progress { width: min(320px, 80%); padding: 32px 0; text-align: center; }
.upload-preview-bar { position: relative; height: 4px; border-radius: 999px; background: var(--border-soft, rgba(255,255,255,.08)); overflow: hidden; }
.upload-preview-bar span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--accent, var(--gold)); transition: width .15s ease-out; }
.upload-preview-bar.is-indeterminate span { width: 30%; animation: uploadPreviewSlide 1.1s ease-in-out infinite; }
@keyframes uploadPreviewSlide { from { transform: translateX(-100%); } to { transform: translateX(340%); } }
.upload-preview-progress-txt { margin-top: 10px; color: var(--text-dim); font-size: 13px; font-variant-numeric: tabular-nums; }
.upload-preview-img { opacity: 0; transform: scale(.985); transition: opacity .25s ease-out, transform .25s ease-out; }
.upload-preview-img.is-in { opacity: 1; transform: none; }

.upload-preview-video { max-width: 100%; max-height: 70vh; border-radius: var(--radius-sm); background: #000; opacity: 0; transition: opacity .25s ease-out; }
.upload-preview-video.is-in { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .upload-preview-video { transition: none; }
  .upload-preview-img, .upload-preview-bar span { transition: none; }
  .upload-preview-bar.is-indeterminate span { animation: none; width: 100%; opacity: .5; }
}
