/* Internal operations workspace. Dense enough for work, calm enough for one operator. */
:root {
  --admin-bg: #f5f5f7;
  --admin-surface: #ffffff;
  --admin-ink: #17181a;
  --admin-muted: #70747a;
  --admin-line: #e1e2e5;
  --admin-line-strong: #cfd1d4;
  --admin-accent: #1f6b52;
  --admin-accent-soft: #eaf4ef;
  --admin-blue: #2e6680;
  --admin-warn: #9a6626;
  --admin-danger: #9b463d;
  --admin-shadow: 0 10px 28px rgba(30,32,35,.055);
}

html, body { background: var(--admin-bg); color: var(--admin-ink); letter-spacing: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Segoe UI", sans-serif; }
button, a, input, select, textarea { letter-spacing: 0; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(46,102,128,.20); outline-offset: 2px; }

/* Shared internal-tool header. */
.audit-header, .moderation-header, .knowledge-header, .lab-header, .ops-header, .review-header, .source-header, .studio-header, .synthesis-header {
  min-height: 72px;
  padding-inline: max(24px, env(safe-area-inset-left));
  border-bottom-color: var(--admin-line);
  background: rgba(250,250,251,.88);
  backdrop-filter: blur(20px);
}
.audit-header > a, .moderation-header > a, .knowledge-header > a, .lab-header > a, .ops-header > a, .ops-header > button, .review-header > a, .source-header > a, .studio-header > a, .synthesis-header > a {
  width: 44px;
  height: 44px;
  border-radius: 8px;
}
.audit-header > div span, .moderation-header > div span, .knowledge-header > div span, .lab-header > div span, .ops-header > div span, .review-header > div span, .source-header > div span, .studio-header > div span, .synthesis-header > div span { color: var(--admin-muted); }

#auditRoot, #moderationRoot, #learningAiRoot, #operationsRoot, #reviewRoot, #sourceRoot, #knowledgeRoot, #synthesisRoot, .studio-shell {
  width: min(100%, 1280px);
  margin: 0 auto;
  padding: 48px 30px 88px;
}
.audit-intro h1, .intro h1, .lab-intro h1, .ops-intro h1, .review-session h1, .source-intro h1, .studio-intro h1, .synthesis-intro h1, .knowledge-intro h1 { font-size: 40px; line-height: 1.12; }
.eyebrow, .review-eyebrow { color: var(--admin-accent); font-size: 11px; }
.audit-intro p:last-child, .intro span, .lab-intro > p:last-child, .ops-intro h1 + p { color: var(--admin-muted); }

/* Metrics use stable dimensions and large numerals. */
.summary-grid, .metrics, .ops-summary, .metric-strip, .overview-metrics, .summary-strip, .audit-summary, .metadata-band, .system-summary {
  margin-top: 24px;
  border: 1px solid var(--admin-line);
  border-radius: 8px;
  background: var(--admin-surface);
  overflow: hidden;
  box-shadow: var(--admin-shadow);
}
.summary-grid > *, .metrics > *, .ops-summary > *, .metric-strip > *, .overview-metrics > *, .summary-strip > *, .audit-summary > *, .metadata-band > *, .system-summary > * { border-color: var(--admin-line); }
.summary-item strong, .metrics strong, .ops-summary strong, .metric-strip strong, .overview-metrics strong, .summary-strip strong, .audit-summary strong, .metadata-band strong, .system-summary strong { font-size: 28px; font-variant-numeric: tabular-nums; }

/* Repeated operational items. */
.report, .human-task, .profile-result, .candidate-card, .excerpt-item, .source-detail, .gate-panel, .ai-synthesis-report, .resolved-decision, .auth-panel, .task-dialog, .composer-dialog {
  border-color: var(--admin-line);
  border-radius: 8px;
  background: var(--admin-surface);
  box-shadow: var(--admin-shadow);
}
.status, .decision, .status-pill, .source-status, .history-status, .pipeline-status, .server-status, .save-state { border-radius: 6px; }
.run-button, .intro button, .head-action, .dialog-primary, .row-action button, .task-meta a, .learning-entry, .source-actions button, .studio-actions button, .syn-actions button {
  min-height: 42px;
  border-radius: 8px;
}
.run-button, .intro button, .dialog-primary { border-color: var(--admin-accent); background: var(--admin-accent); }
.policy-note, .guardrail, .human-boundary, .ai-summary, .boundary-strip, .knowledge-flow, .tool-directory, .event-checklist, .history-section, .feature-table, .pipeline-list, .audit-list, .report-list, .source-section, .detail-section { border-color: var(--admin-line); }
.policy-icon, .task-index, .log-icon, .operator-avatar { border-radius: 8px; }
.profile-result, .human-task, .report { box-shadow: none; }

/* Main admin shell. */
.admin-shell { grid-template-columns: 240px minmax(0,1fr); }
.admin-sidebar { padding: 18px 14px; border-right-color: var(--admin-line); background: #ededef; }
.admin-brand > span { border-radius: 8px; background: var(--admin-ink); }
.admin-sidebar nav button { min-height: 44px; border-radius: 8px; }
.admin-sidebar nav button.is-active { color: var(--admin-accent); box-shadow: none; }
.admin-topbar { height: 72px; padding-inline: 28px; border-bottom-color: var(--admin-line); background: rgba(250,250,251,.88); backdrop-filter: blur(20px); }
.global-search { height: 42px; border-color: var(--admin-line); border-radius: 8px; background: var(--admin-surface); }
.topbar-actions button, .sidebar-toggle { border-radius: 8px; }
#adminRoot { width: min(100%,1320px); padding: 42px 36px 88px; }
.page-head h1 { font-size: 36px; }
.page-head span { color: var(--admin-muted); }
.overview-metrics { margin-top: 28px; }
.dashboard-grid { gap: 28px; }
.admin-task-row { min-height: 104px; border-color: var(--admin-line); }
.task-module-icon { border-color: var(--admin-line); border-radius: 8px; }
.tool-links { border-color: var(--admin-line); background: var(--admin-surface); border-radius: 8px; overflow: hidden; }
.tool-links a { border-color: var(--admin-line); }
.auth-screen { min-height: calc(100vh - 72px); }
.auth-panel { padding: 32px; border: 1px solid var(--admin-line); }
.auth-panel h1 { font-size: 30px; }
.auth-panel input, .auth-panel button { height: 46px; border-radius: 8px; }
.auth-panel button { background: var(--admin-accent); }
.task-dialog { background: var(--admin-surface); }

@media (max-width: 760px) {
  .audit-header, .moderation-header, .knowledge-header, .lab-header, .ops-header, .review-header, .source-header, .studio-header, .synthesis-header { padding-inline: 14px; }
  #auditRoot, #moderationRoot, #learningAiRoot, #operationsRoot, #reviewRoot, #sourceRoot, #knowledgeRoot, #synthesisRoot, .studio-shell { padding: 32px 17px 70px; }
  .audit-intro h1, .intro h1, .lab-intro h1, .ops-intro h1, .review-session h1, .source-intro h1, .studio-intro h1, .synthesis-intro h1, .knowledge-intro h1 { font-size: 32px; }
  .admin-shell { grid-template-columns: 1fr; }
  .admin-topbar { padding-inline: 14px; }
  #adminRoot { padding: 28px 17px 70px; }
  .page-head h1 { font-size: 30px; }
  .auth-panel { padding: 24px 20px; }
  .summary-item strong, .metrics strong, .ops-summary strong, .metric-strip strong, .overview-metrics strong, .summary-strip strong, .audit-summary strong, .metadata-band strong, .system-summary strong { font-size: 24px; }
}
