:root {
  --bg: #f7f9fc;
  --fg: #0b1a30;
  --primary: #2959ff;
  --muted: #5f7996;
  --border: #d6dce6;
  --success: #2f9e44;
  --warning: #ffab00;
  --danger: #d64545;
}
[data-theme='dark'] {
  --bg: #0b1a30;
  --fg: #f7f9fc;
  --muted: #93a7c4;
  --border: #223559;
}
html, body, #root { margin: 0; padding: 0; background: var(--bg); color: var(--fg); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
.csec-shell { display: grid; grid-template-columns: 200px 1fr; min-height: 100vh; }
.csec-tabs { background: var(--bg); border-right: 1px solid var(--border); padding: 1rem 0; display: flex; flex-direction: column; gap: 4px; }
.csec-tabs button { background: transparent; color: var(--fg); border: 0; padding: .6rem 1rem; text-align: left; cursor: pointer; font-size: .95rem; }
.csec-tabs button:hover { background: rgba(41, 89, 255, 0.08); }
.csec-tabs button.active { background: var(--primary); color: white; }
.csec-main { padding: 1.5rem 2rem; overflow: auto; }
.csec-table { width: 100%; border-collapse: collapse; margin-top: .75rem; }
.csec-table th, .csec-table td { text-align: left; padding: .5rem .75rem; border-bottom: 1px solid var(--border); font-size: .9rem; }
.csec-table th { background: rgba(41, 89, 255, 0.05); font-weight: 600; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: .8rem; background: #e0e6ef; color: #1c2b45; }
.badge-active, .badge-governed { background: #d8f5e0; color: #1a6b36; }
.badge-error, .badge-failed { background: #ffe3e0; color: #a11e24; }
.badge-discovered, .badge-pending { background: #ffe8c4; color: #8a5a00; }
.empty { color: var(--muted); font-style: italic; }
.help { color: var(--muted); font-size: .85rem; }
.heatmap { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.heatmap-cell { color: white; padding: 12px; border-radius: 6px; display: flex; flex-direction: column; gap: 4px; font-size: .85rem; }
.heatmap-cell strong { font-size: .95rem; }
.posture-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.posture-stats div { background: rgba(41, 89, 255, 0.05); padding: 12px; border-radius: 6px; }
.posture-stats dt { font-size: .8rem; color: var(--muted); }
.posture-stats dd { margin: 4px 0 0 0; font-size: 1.6rem; font-weight: 600; }
.rego-editor { width: 100%; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85rem; padding: 12px; border: 1px solid var(--border); border-radius: 4px; }
.csec-form { display: grid; gap: 10px; max-width: 420px; }
.csec-form label { display: flex; flex-direction: column; font-size: .9rem; color: var(--muted); }
.csec-form input, .csec-form select { padding: 8px; border: 1px solid var(--border); border-radius: 4px; font-size: .9rem; }
.csec-form button { padding: 8px 16px; background: var(--primary); color: white; border: 0; border-radius: 4px; cursor: pointer; }
.csec-form button:disabled { opacity: 0.6; cursor: not-allowed; }
.policy-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.policy-grid h3 { margin: 8px 0 4px 0; font-size: .95rem; color: var(--muted); }
.sim-allow, .sim-deny { margin-top: 12px; padding: 10px 14px; border-radius: 4px; }
.sim-allow { background: #d8f5e0; color: #1a6b36; }
.sim-deny { background: #ffe3e0; color: #a11e24; }
.sim-allow ul, .sim-deny ul { margin: 6px 0 0 20px; }
