:root {
  --bg: #1a1a2e;
  --bg2: #16213e;
  --card: #1f2937;
  --border: #374151;
  --text: #f3f4f6;
  --muted: #9ca3af;
  --accent: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --brand: #c41e3a;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

code, pre {
  font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
  background: var(--bg2);
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  font-size: 0.875em;
}

.btn {
  padding: 0.5rem 1rem; border-radius: 0.5rem; font-weight: 600; cursor: pointer;
  border: 1px solid var(--border); background: var(--card); color: var(--text);
  font-size: 0.875rem; font-family: inherit; transition: all 0.15s; text-decoration: none;
  display: inline-flex; align-items: center; gap: 0.4rem;
}
.btn:hover { border-color: var(--muted); text-decoration: none; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: white; }
.btn-primary:hover { background: #059669; border-color: #059669; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover { color: var(--text); }
.btn-danger { background: rgba(239,68,68,0.15); border-color: var(--danger); color: var(--danger); }
.btn-danger:hover { background: rgba(239,68,68,0.25); }
.btn-sm { padding: 0.35rem 0.7rem; font-size: 0.8rem; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; pointer-events: none; }

.field { margin-bottom: 1rem; }
.field label { display: block; font-size: 0.8rem; color: var(--muted); margin-bottom: 0.375rem; font-weight: 500; }
.field input, .field select, .field textarea {
  width: 100%; padding: 0.5rem 0.75rem; background: var(--bg2);
  border: 1px solid var(--border); border-radius: 0.5rem;
  color: var(--text); font-family: inherit; font-size: 0.9rem;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--accent);
}

.muted-small { color: var(--muted); font-size: 0.82rem; }

.info-banner {
  background: rgba(16,185,129,0.08);
  border: 1px solid rgba(16,185,129,0.25);
  border-radius: 0.5rem;
  padding: 0.625rem 0.875rem;
  font-size: 0.82rem;
  color: var(--text);
  margin-bottom: 1.25rem;
  line-height: 1.5;
}
.info-banner kbd {
  background: var(--bg2); border: 1px solid var(--border);
  padding: 1px 6px; border-radius: 3px; font-size: 0.78rem; font-family: inherit;
}

.loading-state { color: var(--muted); padding: 2rem; text-align: center; }

.empty-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 4rem 2rem; text-align: center; gap: 0.5rem;
}
.empty-icon { font-size: 3rem; margin-bottom: 0.5rem; }
.empty-text { font-size: 1.1rem; font-weight: 700; }
.empty-sub { color: var(--muted); font-size: 0.875rem; }

.progress-track { height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; }
.progress-fill {
  height: 100%; background: linear-gradient(90deg, var(--accent) 0%, #34d399 100%);
  transition: width 0.3s ease; border-radius: 3px;
}
.progress-fill.indeterminate {
  background: linear-gradient(90deg, transparent 0%, var(--accent) 40%, #34d399 60%, transparent 100%);
  background-size: 200% 100%;
  animation: progress-shimmer 1.4s linear infinite;
  transition: none;
}
@keyframes progress-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.progress-msg { color: var(--muted); font-size: 0.8rem; margin-top: 0.25rem; }
.progress-msg.done { color: var(--accent); font-weight: 700; }
.progress-msg.error { color: var(--danger); font-weight: 700; }

.badge {
  display: inline-block; padding: 0.15rem 0.5rem; border-radius: 999px; font-size: 0.7rem; font-weight: 600;
}
.badge-pending { background: #374151; color: #9ca3af; }
.badge-processing { background: rgba(245,158,11,0.2); color: var(--warning); }
.badge-done { background: rgba(16,185,129,0.2); color: var(--accent); }
.badge-error { background: rgba(239,68,68,0.2); color: var(--danger); }

@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.panel { animation: fadeIn 0.2s ease; }
