:root {
  --bg: #ffffff;
  --surface: #f7f8fa;
  --text: #18202b;
  --text-2: #46505e;
  --muted: #6a7383;
  --border: #cfd5dd;
  --border-soft: #e5e9ee;
  --accent: #1e56d6;
  --accent-strong: #1745b0;
  --accent-soft: #eef3fd;
  --ok: #1a7f43;
  --err: #b42318;
  --radius: 6px;
  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.page {
  max-width: 720px;
  margin: 0 auto;
  padding: 44px 24px 48px;
}

/* dropzone */
.dropzone {
  border: 1px dashed var(--border);
  background: var(--surface);
  border-radius: var(--radius);
  min-height: 380px;
  padding: 56px 32px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s;
  outline: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.dropzone:hover { border-color: var(--accent); }
.dropzone:focus-visible { border-color: var(--accent); outline: 2px solid var(--accent-soft); outline-offset: 2px; }
.dropzone.dragover {
  border: 1px solid var(--accent);
  background: var(--accent-soft);
}
.dz-icon { width: 40px; height: 40px; color: var(--muted); margin-bottom: 14px; }
.dropzone.dragover .dz-icon { color: var(--accent); }
.dz-main { margin: 0; font-size: 1.05rem; font-weight: 600; }
.dz-or {
  margin: 14px 0;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

/* buttons */
.btn {
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 8px 18px;
  cursor: pointer;
  transition: background 0.12s;
}
.btn:hover { background: var(--accent-strong); border-color: var(--accent-strong); }
.btn:active { background: #1440a0; }

.btn-ghost {
  font: inherit;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-2);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 5px 12px;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
}
.btn-ghost:hover { background: var(--surface); border-color: var(--muted); }

/* sections */
.section { margin-top: 36px; }
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.section-head h2 {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

/* file table */
.table-wrap {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  overflow-x: auto;
}
table { width: 100%; border-collapse: collapse; }
thead th {
  text-align: left;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  background: var(--surface);
  border-bottom: 1px solid var(--border-soft);
  padding: 9px 14px;
  white-space: nowrap;
}
tbody td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-soft);
  font-size: 0.875rem;
  vertical-align: middle;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr { transition: background 0.08s; }
tbody tr:hover { background: var(--surface); }

.name-cell { display: flex; align-items: center; gap: 9px; min-width: 0; }
.ext {
  flex: none;
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-2);
  background: #eef0f4;
  border: 1px solid var(--border-soft);
  border-radius: 4px;
  padding: 2px 5px;
}
.fname {
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}
.num {
  font-family: var(--mono);
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  color: var(--text-2);
  white-space: nowrap;
}
.link {
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}
.link:hover { text-decoration: underline; }

/* upload queue */
.queue {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  overflow: hidden;
}
.q-item { padding: 10px 14px; border-bottom: 1px solid var(--border-soft); }
.q-item:last-child { border-bottom: none; }
.q-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.82rem;
  margin-bottom: 6px;
}
.q-name { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.q-pct { font-family: var(--mono); font-size: 0.72rem; color: var(--muted); white-space: nowrap; }
.q-bar { height: 4px; background: #e8ebf0; border-radius: 2px; overflow: hidden; }
.q-fill { height: 100%; width: 0; background: var(--accent); transition: width 0.15s; }
.q-item.done .q-fill { background: var(--ok); }
.q-item.done .q-pct { color: var(--ok); }
.q-item.error .q-fill { background: var(--err); }
.q-item.error .q-pct { color: var(--err); }

/* status */
.status {
  margin-top: 12px;
  min-height: 1.2em;
  font-size: 0.82rem;
  color: var(--muted);
}
.status.err { color: var(--err); }

@media (max-width: 520px) {
  .page { padding: 24px 16px 40px; }
  .dropzone { min-height: 280px; padding: 40px 16px; }
  thead th:nth-child(3), tbody td:nth-child(3) { display: none; }
}
