/* ==========================================================================
   Uploads — everything uploaded, in one place
   ========================================================================== */
.up-view { padding-top: 4px; }
.up-bar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin: 10px 0 18px;
}
.up-bar .up-tabs { margin: 0; flex: 1; }

.up-search {
  border: 1px solid var(--border-strong); border-radius: 10px; padding: 8px 12px;
  font: inherit; font-size: 14px; outline: none; width: min(260px, 40vw);
  background: var(--bg); color: var(--text);
}
.up-search:focus { border-color: var(--accent); }

.up-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.up-tab {
  display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--border);
  background: var(--bg); border-radius: 999px; padding: 6px 13px; font: inherit;
  font-size: 13.5px; color: var(--text-soft); cursor: pointer;
}
.up-tab span { font-size: 11.5px; font-weight: 700; color: var(--text-faint); }
.up-tab:hover { border-color: var(--border-strong); }
.up-tab.on { border-color: var(--accent); background: var(--accent-soft); color: var(--text); font-weight: 600; }
.up-tab.on span { color: var(--accent); }

/* The page column is 720px wide, so 230px minimums gave two very large cards.
   Three to a row reads as a gallery; the media keeps a sane height whatever the
   card width. */
.up-grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}
.up-card {
  position: relative; border: 1px solid var(--border); border-radius: 14px;
  overflow: hidden; background: var(--bg); display: flex; flex-direction: column;
}
.up-card:hover { border-color: var(--border-strong); }

.up-media {
  position: relative; aspect-ratio: 4 / 3; max-height: 190px; background: var(--bg-hover);
  display: grid; place-items: center; overflow: hidden;
}
.up-media > * { grid-area: 1 / 1; place-self: center; }
.up-media.up-image, .up-media.up-pdf { cursor: zoom-in; }
.up-media img, .up-media video { width: 100%; height: 100%; object-fit: cover; display: block; }
/* The reader inside an <embed> takes every click for itself, so the card never
   heard the one that was meant to enlarge it. The small preview is there to be
   looked at, not used — the large view is where a PDF is read. */
.up-media embed { width: 100%; height: 100%; pointer-events: none; }
.up-audio { padding: 12px; }
.up-audio audio { width: 100%; height: 32px; }
/* Named apart from the .up-file *kind* modifier that sits on the same box —
   sharing the name gave the media box display:flex from this rule, and the icon
   stacked to the top instead of sitting in the middle. */
.up-noview {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; color: var(--text-faint); width: 100%; height: 100%;
}
.up-noview span { font-size: 12px; font-weight: 600; letter-spacing: .02em; }

.up-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.up-name {
  font-size: 13.5px; font-weight: 600; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap;
}
.up-meta { font-size: 12px; color: var(--text-faint); }
.up-task {
  display: flex; align-items: center; gap: 6px; margin-top: 6px; width: 100%;
  border: 0; background: var(--bg-hover); border-radius: 8px; padding: 6px 8px;
  font: inherit; font-size: 12.5px; cursor: pointer; text-align: left; color: var(--text-soft);
}
.up-task:hover { background: var(--accent-soft); color: var(--text); }
.up-dot { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--text-faint); }
.up-dot.s-in_progress { background: var(--accent); }
.up-dot.s-done { background: var(--border-strong); }
.up-task-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-ws { flex: none; font-size: 11px; color: var(--text-faint); }
.up-by {
  display: flex; align-items: center; gap: 6px; margin-top: 7px;
  font-size: 11.5px; color: var(--text-faint); min-width: 0;
}
.up-av {
  flex: none; width: 20px; height: 20px; border-radius: 50%; overflow: hidden;
  background: var(--accent); color: #fff; font-size: 8.5px; font-weight: 700;
  display: grid; place-items: center;
}
.up-av img { width: 100%; height: 100%; object-fit: cover; }
.up-by-name {
  color: var(--text-soft); font-weight: 600; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap;
}
.up-when { flex: none; margin-left: auto; }

.up-acts {
  position: absolute; top: 8px; right: 8px; display: flex; gap: 6px;
  opacity: 0; transition: opacity .13s;
}
.up-card:hover .up-acts, .up-acts:focus-within { opacity: 1; }
.up-act {
  display: grid; place-items: center; width: 30px; height: 30px; border: 0;
  border-radius: 8px; color: #fff; background: rgba(20,20,24,.55);
  text-decoration: none; cursor: pointer; padding: 0;
}
.up-act:hover { background: rgba(20,20,24,.85); }

/* the card a shared link points at */
@keyframes up-lit-fade {
  0%, 55% { box-shadow: 0 0 0 3px var(--accent); }
  100% { box-shadow: 0 0 0 3px transparent; }
}
.up-card.up-lit { animation: up-lit-fade 2.5s ease-out both; }

.up-empty { color: var(--text-faint); font-size: 14px; padding: 40px 0; text-align: center; }

/* a text file the browser can render — read-only, and it must not run anything */
.up-text { width: 100%; height: 100%; border: 0; background: var(--bg); }

