:root {
  --bg: #F6F7F9;
  --surface: #FFFFFF;
  --border: #E2E5EA;
  --text: #1B222C;
  --text-muted: #667085;
  --accent: #2F6FED;
  --accent-hover: #2558C2;
  --highlight: #FFE9A8;
  --danger: #D14343;
  --success: #1F8A5B;
  --radius: 10px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

.page {
  max-width: 900px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

.eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 8px;
}

h1 {
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}

.subtitle {
  color: var(--text-muted);
  font-size: 15px;
  margin: 0 0 32px;
}

.search-box {
  position: relative;
  margin-bottom: 8px;
}

.search-box input[type="text"] {
  width: 100%;
  font-size: 16px;
  padding: 14px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  outline: none;
  transition: border-color 0.15s ease;
}

.search-box input[type="text"]:focus {
  border-color: var(--accent);
}

.search-box input[type="text"]:disabled {
  color: var(--text-muted);
  cursor: not-allowed;
}

.meta-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
  min-height: 18px;
}

.status {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px;
  border-radius: var(--radius);
  font-size: 14px;
  margin-bottom: 20px;
}

.status.loading {
  background: #EEF2FF;
  color: #364FC7;
}

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

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

.spinner {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-right-color: transparent;
  animation: spin 0.7s linear infinite;
  flex: none;
}

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

.results-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

thead th {
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  background: #FAFBFC;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

tbody tr:last-child td {
  border-bottom: none;
}

tbody tr:hover {
  background: #FAFBFC;
}

mark {
  background: var(--highlight);
  color: inherit;
  border-radius: 3px;
  padding: 0 2px;
}

.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
  font-size: 14px;
}

.empty-state strong {
  display: block;
  color: var(--text);
  font-size: 15px;
  margin-bottom: 4px;
}

footer {
  margin-top: 40px;
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
}

/* upload.html specifics */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
}

.field {
  margin-bottom: 20px;
}

.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.field input[type="password"],
.field input[type="file"] {
  width: 100%;
  font-size: 15px;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
}

.field input[type="password"]:focus,
.field input[type="file"]:focus {
  outline: none;
  border-color: var(--accent);
}

.hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
}

button.primary {
  width: 100%;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: 8px;
  padding: 14px;
  cursor: pointer;
  transition: background 0.15s ease;
}

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

button.primary:disabled {
  background: var(--border);
  color: var(--text-muted);
  cursor: not-allowed;
}

.steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 24px;
  font-size: 13px;
}

.step {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
}

.step.active {
  color: var(--text);
  font-weight: 600;
}

.step.done {
  color: var(--success);
}

.step.failed {
  color: var(--danger);
}

.step-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  flex: none;
}

.step.active .step-dot {
  background: var(--accent);
}

.step.done .step-dot {
  background: var(--success);
}

.step.failed .step-dot {
  background: var(--danger);
}

@media (max-width: 600px) {
  .page {
    padding: 32px 16px 60px;
  }
  thead th:nth-child(n+4),
  tbody td:nth-child(n+4) {
    display: none;
  }
}
