* {
  box-sizing: border-box;
}

body {
  font-family: "Inter", system-ui, sans-serif;
  margin: 0;
  background: #f6f7fb;
  color: #101828;
}

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

.header h1 {
  margin: 0 0 8px;
}

.muted {
  color: #667085;
  margin: 0;
}

.card {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  margin-top: 20px;
  box-shadow: 0 10px 25px rgba(16, 24, 40, 0.08);
}

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

.space-between {
  justify-content: space-between;
}

.dropzone {
  border: 2px dashed #d0d5dd;
  border-radius: 12px;
  padding: 28px;
  text-align: center;
  color: #667085;
  position: relative;
  margin-top: 16px;
}

.dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.file-list {
  margin-top: 16px;
  display: grid;
  gap: 8px;
}

.file-item {
  background: #f9fafb;
  padding: 10px 12px;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
}

.file-item span {
  color: #667085;
}

button,
a#download-link {
  border-radius: 8px;
  border: none;
  padding: 10px 16px;
  background: #2563eb;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}

button.ghost {
  background: transparent;
  color: #2563eb;
  border: 1px solid #c7d2fe;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

input,
select {
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #d0d5dd;
  min-width: 220px;
}

.hidden {
  display: none;
}

.hint {
  margin-top: 8px;
  font-size: 13px;
  color: #475467;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.status-grid .label {
  font-size: 12px;
  color: #98a2b3;
}

.status-grid .value {
  font-weight: 600;
  margin-top: 4px;
}

.dropzone.dragging {
  border-color: #2563eb;
  background: #eff6ff;
}

.loading {
  opacity: 0.6;
  pointer-events: none;
  position: relative;
}

.loading::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  margin-left: -8px;
  margin-top: -8px;
  border: 2px solid #f3f4f6;
  border-top-color: #2563eb;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.error {
  color: #ef4444;
  background: #fef2f2;
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid #fecaca;
  margin-top: 8px;
}

.success {
  color: #10b981;
  background: #f0fdf4;
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid #bbf7d0;
  margin-top: 8px;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  position: relative;
}

button:disabled::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  top: 50%;
  right: 12px;
  margin-top: -7px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
