:root {
  --bg: #f5f6f8;
  --card-bg: #ffffff;
  --text: #1c2230;
  --text-muted: #6b7280;
  --border: #e2e5ea;
  --accent: #1f6feb;
  --accent-hover: #1a5fd0;
  --error: #d1242f;
  --success: #1a7f37;
  --radius: 10px;
}

* { box-sizing: border-box; }

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

.shell {
  max-width: 780px;
  margin: 0 auto;
  padding: 24px 16px 64px;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
}

.topbar h1 {
  font-size: 20px;
  margin: 0;
}

.badge {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  background: #e8f0fe;
  border-radius: 999px;
  padding: 2px 9px;
}

.topbar .ghost-btn { margin-left: auto; }

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
}

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

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-header h2 { margin-bottom: 12px; }

form { display: flex; flex-direction: column; gap: 8px; max-width: 320px; }

label { font-size: 13px; color: var(--text-muted); }

input[type="password"], input[type="text"] {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
}

button {
  cursor: pointer;
  border: none;
  border-radius: 6px;
  padding: 9px 14px;
  font-size: 14px;
  font-weight: 600;
  background: var(--accent);
  color: #fff;
}
button:hover { background: var(--accent-hover); }
button:disabled { opacity: 0.6; cursor: default; }

.ghost-btn {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--border);
  font-weight: 500;
}
.ghost-btn:hover { background: #f0f4fb; }

.hidden { display: none !important; }

.error { color: var(--error); font-size: 13px; }

.status-line { color: var(--text-muted); font-size: 13px; }

.dropzone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 28px 16px;
  text-align: center;
  color: var(--text-muted);
  transition: border-color 0.15s, background 0.15s;
}
.dropzone.drag-over {
  border-color: var(--accent);
  background: #f0f6ff;
}
.file-link {
  color: var(--accent);
  text-decoration: underline;
  cursor: pointer;
}

.progress {
  height: 8px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 12px;
}
.progress-bar {
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width 0.15s ease-out;
}

table { width: 100%; border-collapse: collapse; margin-top: 8px; }
th, td {
  text-align: left;
  padding: 8px 10px;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
}
th { color: var(--text-muted); font-weight: 600; }
tbody tr { cursor: pointer; }
tbody tr:hover { background: #f7f9fc; }

.filename-link {
  color: var(--accent);
  text-decoration: none;
}
.filename-link:hover { text-decoration: underline; }

.summary {
  background: #f7f9fc;
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.5;
  white-space: pre-wrap;
  margin-bottom: 12px;
}

.status-pill {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: #eef0f3;
  color: var(--text-muted);
}
.status-pill.done { background: #e6f4ea; color: var(--success); }
.status-pill.failed { background: #fbe9e9; color: var(--error); }
