:root {
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --bg: #f4f6fb;
  --card: #ffffff;
  --text: #1a1f2b;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --danger: #dc2626;
  --danger-bg: #fef2f2;
  --success: #16a34a;
  --success-bg: #f0fdf4;
  --radius: 14px;
  --shadow: 0 1px 3px rgba(20, 25, 40, 0.06), 0 8px 24px rgba(20, 25, 40, 0.06);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

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

header.hero {
  margin-bottom: 24px;
}

header.hero h1 {
  font-size: 1.6rem;
  margin: 0 0 6px;
}

header.hero p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  margin-bottom: 18px;
}

.card h2 {
  font-size: 1.02rem;
  margin: 0 0 16px;
}

.file-row {
  margin-bottom: 18px;
}

.file-row:last-child {
  margin-bottom: 0;
}

.file-row label {
  display: block;
  font-weight: 600;
  font-size: 0.92rem;
  margin-bottom: 2px;
}

.file-row .hint {
  display: block;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.dropzone {
  border: 1.5px dashed var(--border);
  border-radius: 10px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  background: #fafbfe;
}

.dropzone:hover,
.dropzone.dragover {
  border-color: var(--accent);
  background: #eef3ff;
}

.dropzone input[type="file"] {
  display: none;
}

.dropzone .icon {
  font-size: 1.4rem;
  flex-shrink: 0;
}

.dropzone .filename {
  font-size: 0.9rem;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dropzone.filled .filename {
  color: var(--text);
  font-weight: 600;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.field {
  margin-bottom: 16px;
}

.field:last-child {
  margin-bottom: 0;
}

.field label {
  display: block;
  font-weight: 600;
  font-size: 0.88rem;
  margin-bottom: 6px;
}

.field input[type="text"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.92rem;
  font-family: inherit;
  background: #fff;
}

.field input[type="text"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

button.primary {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 13px 26px;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

button.primary:hover:not(:disabled) {
  background: var(--accent-hover);
}

button.primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.status {
  font-size: 0.88rem;
  color: var(--text-muted);
  min-height: 1.2em;
}

.status.error {
  color: var(--danger);
}

.status.success {
  color: var(--success);
}

.spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(37, 99, 235, 0.25);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: -2px;
  margin-right: 6px;
}

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

.alert {
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 0.88rem;
  margin-top: 14px;
  display: none;
}

.alert.show {
  display: block;
}

.alert.error {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid #fecaca;
}

footer {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: 24px;
}

@media (max-width: 560px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }
  .actions {
    flex-direction: column;
    align-items: stretch;
  }
  button.primary {
    width: 100%;
  }
}
