* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: #20242a;
  background: #f5f7fb;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

.page {
  width: min(920px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0;
}

.upload-shell {
  background: #ffffff;
  border: 1px solid #dde3ec;
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(34, 42, 53, 0.08);
  padding: 24px;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 20px;
}

.webuploader-pick,
.primary-button {
  height: 40px;
  min-width: 112px;
  border: 0;
  border-radius: 6px;
  padding: 0 18px;
  font-size: 14px;
  line-height: 40px;
  cursor: pointer;
}

.webuploader-pick {
  background: #246bfe;
  color: #ffffff;
}

.primary-button {
  background: #20242a;
  color: #ffffff;
}

.primary-button:disabled {
  cursor: not-allowed;
  background: #a8b0bd;
}

.file-list {
  display: grid;
  gap: 12px;
}

.empty-state,
.file-item {
  border: 1px solid #e2e7ef;
  border-radius: 8px;
  background: #ffffff;
}

.empty-state {
  padding: 28px;
  color: #6d7786;
  text-align: center;
}

.file-item {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.file-meta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
}

.file-name {
  overflow-wrap: anywhere;
  font-weight: 600;
}

.file-size,
.file-status {
  color: #687384;
  font-size: 13px;
  white-space: nowrap;
}

.progress {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf1f7;
}

.progress-bar {
  width: 0;
  height: 100%;
  background: #15a46e;
  transition: width 160ms ease;
}

.file-item.is-error .progress-bar {
  background: #d83b3b;
}

.file-item.is-success .file-status {
  color: #127a52;
}

.file-item.is-error .file-status {
  color: #b42318;
}

@media (max-width: 640px) {
  .page {
    width: min(100% - 20px, 920px);
    padding: 20px 0;
  }

  .upload-shell {
    padding: 16px;
  }

  .toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  #picker,
  .primary-button,
  .webuploader-pick {
    width: 100%;
  }

  .file-meta {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}
