:root {
  --bg: #fafafa;
  --fg: #1b1b1b;
  --muted: #777;
  --line: #e5e5e5;
  --accent: #2856c8;
  --green: #2e8b57;
  --yellow: #d39000;
  --red: #c62b32;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; color: var(--fg); background: var(--bg); }
header {
  display: flex; gap: 24px; align-items: center;
  padding: 12px 20px; border-bottom: 1px solid var(--line); background: white;
  position: sticky; top: 0; z-index: 10;
}
.brand { font-size: 18px; }
.brand .agent-tag { background: var(--accent); color: white; padding: 2px 8px; border-radius: 4px; font-size: 12px; vertical-align: middle; margin-left: 6px; }
nav { display: flex; gap: 16px; flex: 1; }
nav a.tab { color: var(--muted); text-decoration: none; padding: 8px 10px; border-radius: 6px; }
nav a.tab.active { color: var(--accent); background: #f1f5fe; font-weight: 600; }
.badge { background: var(--red); color: white; border-radius: 10px; padding: 0 6px; font-size: 11px; margin-left: 4px; }
.user { font-size: 13px; color: var(--muted); }
main { padding: 16px 20px; }
.tab-pane { display: none; }
.tab-pane.active { display: block; }
.toolbar { display: flex; gap: 8px; margin-bottom: 12px; align-items: center; }
.toolbar button, .toolbar select { padding: 6px 12px; border-radius: 4px; border: 1px solid var(--line); background: white; cursor: pointer; }
.toolbar button:hover { background: #f0f0f0; }
.split { display: grid; grid-template-columns: 320px 1fr; gap: 16px; height: calc(100vh - 200px); }
.list { list-style: none; padding: 0; margin: 0; overflow-y: auto; border: 1px solid var(--line); background: white; border-radius: 6px; }
.list li { padding: 10px 12px; border-bottom: 1px solid var(--line); cursor: pointer; }
.list li:hover { background: #f1f5fe; }
.list li.selected { background: #e6efff; }
.list li .meta { font-size: 11px; color: var(--muted); margin-top: 3px; }
.viewer { background: white; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; display: grid; grid-template-columns: 1fr 1fr; }
.viewer .pdf-pane { background: #1a1a1a; overflow: auto; }
.viewer .pdf-pane embed { width: 100%; height: 100%; }
.viewer .fields-pane { padding: 16px; overflow-y: auto; }
.field { margin-bottom: 10px; }
.field label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 2px; }
.field input, .field textarea, .field select { width: 100%; padding: 6px 8px; border: 1px solid var(--line); border-radius: 4px; font-size: 14px; }
.conf-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.conf-dot.green { background: var(--green); }
.conf-dot.yellow { background: var(--yellow); }
.conf-dot.red { background: var(--red); }
.actions { display: flex; gap: 8px; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.actions button { padding: 8px 16px; border-radius: 4px; border: none; cursor: pointer; font-weight: 600; }
.btn-approve { background: var(--green); color: white; }
.btn-escalate { background: var(--red); color: white; }
.btn-save { background: var(--accent); color: white; }
.hint { padding: 40px; text-align: center; color: var(--muted); }
table { width: 100%; border-collapse: collapse; background: white; }
table th, table td { padding: 6px 10px; border-bottom: 1px solid var(--line); font-size: 13px; text-align: left; }
table th { background: #fafafa; position: sticky; top: 0; }
#stats-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.stat-card { background: white; border: 1px solid var(--line); border-radius: 6px; padding: 16px; }
.stat-card .label { font-size: 12px; color: var(--muted); }
.stat-card .value { font-size: 28px; font-weight: 700; margin-top: 4px; }
footer { padding: 16px 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; text-align: center; }
footer a { color: var(--muted); }
