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

:root {
  --bg: #0f1117;
  --surface: #1a1d27;
  --border: #2a2d3a;
  --accent: #6c63ff;
  --accent-hover: #574fd6;
  --text: #e2e4ed;
  --text-muted: #7a7f96;
  --success: #4caf82;
  --error: #e05c5c;
  --warning: #e0a05c;
  --radius: 10px;
  --font: 'Segoe UI', system-ui, sans-serif;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
}

header {
  padding: 20px 32px;
  border-bottom: 1px solid var(--border);
}

header h1 {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

main {
  max-width: 900px;
  margin: 0 auto;
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.card h2 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 18px;
}

/* Drop zone */
.drop-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 40px;
  text-align: center;
  color: var(--text-muted);
  transition: border-color 0.2s, background 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.drop-zone.over {
  border-color: var(--accent);
  background: rgba(108, 99, 255, 0.06);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 8px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  cursor: pointer;
  font-size: 14px;
  transition: background 0.15s, border-color 0.15s;
}

.btn:hover { border-color: var(--accent); }

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  margin-top: 16px;
}

.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; }

/* Status */
.status {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 14px;
}

.status.success { background: rgba(76, 175, 130, 0.12); color: var(--success); }
.status.error   { background: rgba(224, 92, 92, 0.12);  color: var(--error); }
.hidden { display: none; }

/* Pipeline */
.pipeline-steps {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-width: 110px;
  font-size: 13px;
  text-align: center;
}

.step.active  { border-color: var(--accent); background: rgba(108, 99, 255, 0.08); }
.step.done    { border-color: var(--success); background: rgba(76, 175, 130, 0.08); }
.step.failed  { border-color: var(--error);   background: rgba(224, 92, 92, 0.08); }

.step-icon { font-size: 22px; }
.step-arrow { color: var(--text-muted); font-size: 20px; }
.step-status { font-size: 11px; color: var(--text-muted); min-height: 14px; }

/* Docs list */
.docs-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.docs-list .empty { color: var(--text-muted); font-style: italic; }

.docs-list li:not(.empty) {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
}

.docs-list a { color: var(--accent); text-decoration: none; font-size: 13px; }
.docs-list a:hover { text-decoration: underline; }

/* Log */
.log-output {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 14px;
  font-family: 'Courier New', monospace;
  font-size: 12px;
  color: var(--text-muted);
  max-height: 200px;
  overflow-y: auto;
  white-space: pre-wrap;
}
