:root {
  --bg: #f5f7fa;
  --card: #ffffff;
  --ink: #1a2230;
  --muted: #5b6577;
  --line: #e3e8f0;
  --accent: #0071ce;
  --accent-d: #00539f;
  --ok: #1f9d57;
  --warn: #c77700;
  --err: #d23b3b;
  --shadow: 0 1px 3px rgba(20, 30, 50, 0.08), 0 6px 24px rgba(20, 30, 50, 0.06);
}

* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  padding: 0;
}
body {
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.app {
  max-width: 860px;
  margin: 0 auto;
  padding: 28px 20px 60px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 16px;
}
.brand-spark {
  width: 30px;
  height: 30px;
  flex: none;
}
.brand-name {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--accent);
}
.head h1 {
  margin: 0 0 6px;
  font-size: 28px;
  letter-spacing: -0.02em;
}
.sub {
  margin: 0 0 20px;
  color: var(--muted);
  max-width: 60ch;
}

/* Dropzone */
.dropzone {
  background: var(--card);
  border: 2px dashed var(--line);
  border-radius: 14px;
  padding: 34px 20px;
  text-align: center;
  transition: border-color 0.15s, background 0.15s;
  box-shadow: var(--shadow);
}
.dropzone.drag {
  border-color: var(--accent);
  background: #f0f7ff;
}
.dz-icon {
  font-size: 30px;
  color: var(--accent);
}
.dz-title {
  font-weight: 600;
  margin: 8px 0 14px;
}
.dz-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}
.dz-dest {
  margin-top: 14px;
  font-size: 12.5px;
  color: var(--muted);
}

/* Buttons */
.btn {
  appearance: none;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 600;
  padding: 9px 16px;
  border-radius: 9px;
  cursor: pointer;
  transition: background 0.15s, transform 0.05s;
}
.btn:hover {
  background: var(--accent-d);
}
.btn:active {
  transform: translateY(1px);
}
.btn.ghost {
  background: #fff;
  color: var(--accent);
}
.btn.ghost:hover {
  background: #f0f7ff;
}
.btn.warn {
  background: var(--warn);
  border-color: var(--warn);
}
.btn.warn:hover {
  filter: brightness(0.95);
}
.btn:focus-visible,
.dropzone:focus-visible {
  outline: 3px solid #9ec9ff;
  outline-offset: 2px;
}

/* Overall progress */
.overall {
  margin-top: 22px;
}
.bar-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.bar {
  flex: 1;
  height: 14px;
  background: #e7ecf3;
  border-radius: 999px;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), #34a0ff);
  border-radius: 999px;
  transition: width 0.25s ease;
}
.bar-pct {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  min-width: 42px;
  text-align: right;
}
.banner {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  font-weight: 600;
}
.banner.ok {
  background: #e7f7ee;
  color: var(--ok);
}
.banner.err {
  background: #fdecec;
  color: var(--err);
}

/* Summary */
.summary {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
}
.stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 8px;
  text-align: center;
}
.stat .num {
  display: block;
  font-size: 19px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.stat .lbl {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.stat.ok .num {
  color: var(--ok);
}
.stat.err .num {
  color: var(--err);
}
.stat.run .num {
  color: var(--accent);
}
@media (max-width: 680px) {
  .summary {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Controls */
.controls {
  margin-top: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.filters {
  margin-left: auto;
  display: flex;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}
.filters label {
  cursor: pointer;
}

/* File list */
.filelist-wrap {
  margin-top: 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.filelist {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 420px;
  overflow: auto;
}
.row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 12px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--line);
  align-items: center;
}
.row:last-child {
  border-bottom: 0;
}
.row .name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13.5px;
}
.row .meta {
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}
.row .rowbar {
  grid-column: 1 / -1;
  height: 6px;
  background: #eef2f7;
  border-radius: 999px;
  overflow: hidden;
}
.row .rowbar > i {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--accent);
}
.row.done .rowbar > i {
  background: var(--ok);
}
.row.failed .rowbar > i {
  background: var(--err);
}
.row .status {
  font-weight: 600;
  font-size: 12px;
}
.row.done .status {
  color: var(--ok);
}
.row.failed .status {
  color: var(--err);
}
.row.uploading .status {
  color: var(--accent);
}
.row.queued .status {
  color: var(--muted);
}
.row .err-msg {
  grid-column: 1 / -1;
  font-size: 11.5px;
  color: var(--err);
}
.filelist-more {
  padding: 10px 14px;
  font-size: 12.5px;
  color: var(--muted);
  background: #fafbfd;
}

.foot {
  margin-top: 26px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}
