*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: #f5f7fa;
  color: #1a1a2e;
  line-height: 1.5;
}

.container {
  max-width: 720px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}

h1 {
  text-align: center;
  font-size: 1.5rem;
  margin-bottom: 2rem;
}

.upload-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 600px) {
  .upload-grid {
    grid-template-columns: 1fr;
  }
}

.upload-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem;
  background: #fff;
  border: 1px solid #dde3ec;
  border-radius: 8px;
  cursor: pointer;
}

.upload-card:hover {
  border-color: #4a6cf7;
}

.upload-label {
  font-weight: 600;
  font-size: 0.9rem;
}

.upload-card input[type="file"] {
  font-size: 0.85rem;
}

.file-name {
  font-size: 0.8rem;
  color: #666;
  word-break: break-all;
}

.btn-primary {
  display: block;
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: #4a6cf7;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-primary:hover:not(:disabled) {
  background: #3b5de0;
}

.btn-primary:disabled {
  background: #a0aec0;
  cursor: not-allowed;
}

.status {
  margin-top: 1.5rem;
  padding: 1rem;
  border-radius: 8px;
  text-align: center;
}

.status.loading {
  background: #eef2ff;
  color: #3b5de0;
}

.status.error {
  background: #fef2f2;
  color: #b91c1c;
}

.result {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.hidden {
  display: none !important;
}

.message {
  margin: 0;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
}

.message.success {
  background: #ecfdf5;
  color: #047857;
}

.message.warning {
  background: #fffbeb;
  color: #92400e;
}

.btn-download {
  display: block;
  text-align: center;
  padding: 0.75rem 1rem;
  font-weight: 600;
  color: #fff;
  background: #059669;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.15s;
}

.btn-download:hover {
  background: #047857;
}

.spinner {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  border: 2px solid #3b5de0;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: middle;
  margin-right: 0.5rem;
}

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