:root {
  color-scheme: light dark;
  --accent: #4f46e5;
  --bg: #f8f9fb;
  --card: #ffffff;
  --border: #e2e4e9;
  --text: #1f2430;
  --muted: #6b7280;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
}

header {
  padding: 1.5rem 2rem;
  background: var(--accent);
  color: white;
}

header h1 { margin: 0 0 0.25rem; font-size: 1.4rem; }
header p { margin: 0; opacity: 0.85; font-size: 0.9rem; }

main {
  max-width: 960px;
  margin: 1.5rem auto;
  padding: 0 1rem 3rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

section.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
}

section.card h2 {
  margin-top: 0;
  font-size: 1.1rem;
}

section.card.disabled {
  opacity: 0.5;
  pointer-events: none;
}

label { display: block; font-size: 0.85rem; margin: 0.5rem 0 0.25rem; color: var(--muted); }

input[type="text"], input[type="file"], textarea, select {
  width: 100%;
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.9rem;
  background: transparent;
  color: inherit;
}

textarea { min-height: 80px; resize: vertical; }

button {
  margin-top: 0.75rem;
  padding: 0.55rem 1.1rem;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.9rem;
  cursor: pointer;
}

button.secondary {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}

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

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.75rem;
  font-size: 0.85rem;
}

th, td {
  border-bottom: 1px solid var(--border);
  padding: 0.4rem 0.5rem;
  text-align: left;
  vertical-align: top;
}

.status { font-size: 0.85rem; color: var(--muted); margin-top: 0.5rem; }
.status.error { color: #dc2626; }
.status.ok { color: #16a34a; }

.progress-bar {
  height: 8px;
  border-radius: 4px;
  background: var(--border);
  overflow: hidden;
  margin-top: 0.5rem;
}
.progress-bar > div {
  height: 100%;
  background: var(--accent);
  width: 0%;
  transition: width 0.2s;
}

.step-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem;
  margin-top: 0.75rem;
}

.step-card .row { display: flex; gap: 0.75rem; }
.step-card .row > div { flex: 1; }

.transcript-box {
  max-height: 260px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 6px;
  margin-top: 0.75rem;
}
