:root {
  --fg: #1a1a1a;
  --muted: #6b7280;
  --bg: #ffffff;
  --card-bg: #f8f9fb;
  --border: #e2e4e9;
  --accent: #0075bc;
  --danger: #c0392b;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--fg); background: var(--bg); }
.container { max-width: 960px; margin: 0 auto; padding: 24px 16px; }
.topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 24px; border-bottom: 1px solid var(--border);
}
.brand { font-weight: 700; color: var(--accent); text-decoration: none; }
.card {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: 8px; padding: 20px; margin-bottom: 20px;
}
.card.narrow { max-width: 420px; margin: 40px auto; }
label { display: block; margin-bottom: 14px; font-size: 14px; }
label input, label select { display: block; width: 100%; margin-top: 4px; padding: 8px; border: 1px solid var(--border); border-radius: 6px; }
label.checkbox { display: flex; align-items: center; gap: 8px; }
label.checkbox input { width: auto; }
button, .btn {
  background: var(--accent); color: white; border: none; border-radius: 6px;
  padding: 10px 16px; font-size: 14px; cursor: pointer; text-decoration: none; display: inline-block;
}
.link-btn { background: none; border: none; color: var(--accent); cursor: pointer; padding: 0; font-size: 14px; }
.link-btn.danger { color: var(--danger); }
.inline { display: inline; }
.error { color: var(--danger); }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.row-between { display: flex; justify-content: space-between; align-items: center; }
table.list { width: 100%; border-collapse: collapse; margin-top: 12px; }
table.list th, table.list td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); font-size: 14px; }
.badge { padding: 2px 8px; border-radius: 10px; font-size: 12px; background: #e2e4e9; }
.badge-ready, .badge-active { background: #d4edda; color: #155724; }
.badge-failed, .badge-revoked { background: #f8d7da; color: #721c24; }
.badge-converting, .badge-uploaded { background: #fff3cd; color: #856404; }
.kpi-row { display: flex; gap: 24px; margin-bottom: 16px; flex-wrap: wrap; }
.kpi { display: flex; flex-direction: column; }
.kpi-value { font-size: 24px; font-weight: 700; }
.kpi-label { font-size: 12px; color: var(--muted); }
.form-grid { max-width: 420px; }

.viewer-body { margin: 0; background: #2d2d2d; }
.viewer-bar {
  position: sticky; top: 0; display: flex; justify-content: space-between;
  background: #1a1a1a; color: white; padding: 10px 16px; z-index: 10;
}
.viewer-bar a { color: #9ad0ff; }
.viewer-pages { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 12px; }
.viewer-page { max-width: 100%; box-shadow: 0 2px 8px rgba(0,0,0,0.3); }
