:root {
  --bg: #f4f7fb;
  --panel: #ffffff;
  --ink: #1b2430;
  --ink-soft: #5b6775;
  --line: #e3e9f0;
  --brand: #2563eb;
  --brand-2: #06b6d4;
  --ok: #16a34a;
  --warn: #d97706;
  --err: #dc2626;
  --shadow: 0 6px 24px rgba(20, 40, 80, 0.08);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
}

.wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 32px 20px 120px;
}

.hero {
  background: linear-gradient(135deg, #2563eb 0%, #06b6d4 100%);
  color: #fff;
  border-radius: 18px;
  padding: 30px 32px;
  box-shadow: var(--shadow);
  margin-bottom: 28px;
}

.hero h1 {
  margin: 0 0 6px;
  font-size: 26px;
  letter-spacing: 0.5px;
}

.hero p {
  margin: 0;
  opacity: 0.92;
  font-size: 14px;
}

.hero .badge {
  display: inline-block;
  margin-top: 14px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.35);
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  letter-spacing: 0.4px;
}

.group {
  margin-bottom: 26px;
}

.group-head {
  margin-bottom: 12px;
  padding-left: 4px;
  border-left: 4px solid var(--brand);
}

.group-head h2 {
  margin: 0;
  font-size: 18px;
}

.group-desc {
  margin: 2px 0 0;
  color: var(--ink-soft);
  font-size: 13px;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 12px;
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 1px 2px rgba(20, 40, 80, 0.04);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.card:hover {
  box-shadow: var(--shadow);
  border-color: #cfdcf5;
}

.card-info { flex: 1 1 auto; min-width: 0; }

.card-label {
  font-weight: 600;
  font-size: 15px;
}

.card-hint {
  color: var(--ink-soft);
  font-size: 12.5px;
  margin-top: 2px;
}

.card-file {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.file-name {
  color: #94a1b2;
  font-size: 12.5px;
  max-width: 340px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-name.has-file { color: var(--ink); font-weight: 500; }

.card-right {
  flex: 0 0 200px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}

.card-status {
  font-size: 12px;
  color: var(--ink-soft);
  text-align: center;
  min-height: 16px;
}

.st-idle { color: #94a1b2; }
.st-uploading { color: var(--brand); }
.st-done { color: var(--ok); font-weight: 600; }
.st-error { color: var(--err); font-weight: 600; }

.btn {
  border: none;
  border-radius: 10px;
  padding: 9px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.06s ease, background 0.2s ease, box-shadow 0.2s ease;
  font-family: inherit;
}

.btn:active { transform: translateY(1px); }

.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.28);
}

.btn-primary:hover:not(:disabled) { background: linear-gradient(135deg, #1d4ed8, #1e40af); }

.btn-ghost {
  background: #eef3fb;
  color: var(--brand);
  border: 1px solid #d7e3fb;
}

.btn-ghost:hover:not(:disabled) { background: #e2ecfc; }

.btn-lg { padding: 13px 26px; font-size: 15px; border-radius: 12px; }

.mini-bar {
  height: 6px;
  background: #edf1f7;
  border-radius: 999px;
  overflow: hidden;
}

.mini-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #2563eb, #06b6d4);
  transition: width 0.25s ease;
}

.mini-fill.done { background: linear-gradient(90deg, #16a34a, #22c55e); }

/* Fixed bottom total progress panel */
.total-panel {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--line);
  box-shadow: 0 -6px 24px rgba(20, 40, 80, 0.08);
  padding: 14px 20px 18px;
  z-index: 50;
}

.total-inner {
  max-width: 960px;
  margin: 0 auto;
}

.total-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.total-title {
  font-weight: 700;
  font-size: 15px;
}

.total-pct {
  font-weight: 800;
  font-size: 22px;
  background: linear-gradient(90deg, #2563eb, #06b6d4);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  min-width: 64px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.total-bar {
  position: relative;
  height: 16px;
  background: #e8eef7;
  border-radius: 999px;
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(20, 40, 80, 0.08);
}

.total-fill {
  position: relative;
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #2563eb, #06b6d4, #2563eb);
  background-size: 200% 100%;
  transition: width 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  animation: flow 2.4s linear infinite;
}

.total-fill.complete {
  background: linear-gradient(90deg, #16a34a, #22c55e, #16a34a);
  background-size: 200% 100%;
}

/* moving sheen on top of the fill */
.total-fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.55) 50%, rgba(255,255,255,0) 100%);
  transform: translateX(-100%);
  animation: sheen 1.6s ease-in-out infinite;
}

@keyframes flow {
  0% { background-position: 0% 0; }
  100% { background-position: 200% 0; }
}

@keyframes sheen {
  0% { transform: translateX(-100%); }
  60% { transform: translateX(100%); }
  100% { transform: translateX(100%); }
}

.total-meta {
  margin-top: 8px;
  font-size: 12.5px;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

.total-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}

.global-status {
  font-size: 13px;
  color: var(--ink-soft);
  margin-left: 4px;
}

.global-status.ok { color: var(--ok); font-weight: 600; }
.global-status.warn { color: var(--warn); font-weight: 600; }
.global-status.busy { color: var(--brand); font-weight: 600; }

.footer-note {
  text-align: center;
  color: #9aa6b5;
  font-size: 12px;
  margin-top: 8px;
}

@media (max-width: 640px) {
  .card { flex-direction: column; align-items: stretch; }
  .card-right { flex: 1 1 auto; }
  .hero { padding: 24px 22px; }
  .hero h1 { font-size: 22px; }
}
