:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --border: #e5e7eb;
  --primary: #2563eb;
  --primary-weak: #e8f0ff;
  --chip: #eef2ff;
}
.dark {
  --bg: #121317;
  --surface: #1b1d22;
  --text: #e5e7eb;
  --muted: #9aa0a6;
  --border: #2a2e35;
  --primary: #60a5fa;
  --primary-weak: #1f2937;
  --chip: #2a2f3a;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji"; background: var(--bg); color: var(--text); }
.container { max-width: 1100px; margin: 24px auto; padding: 0 16px; }
.grid { display: grid; gap: 16px; }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 16px; box-shadow: 0 2px 8px rgb(0 0 0 / 0.04); }
h1 { font-size: 22px; margin: 0 0 8px; display:flex; align-items:center; gap:8px; }
h2 { font-size: 16px; margin: 0 0 10px; }
label { display:block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
input, select, textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); }
.row { display:flex; gap: 10px; }
.row > * { flex: 1; }

.btn { display:inline-flex; align-items:center; justify-content:center; gap:8px; padding:10px 14px; border:1px solid var(--border); border-radius:12px; cursor:pointer; background: var(--surface); color: var(--text); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: white; }
.btn.small { padding:6px 10px; border-radius: 10px; font-size: 13px; }
.btn.danger { border-color:#ef4444; color:#ef4444; }
.toolbar { display:flex; align-items:center; gap: 8px; justify-content:flex-end; }

.kpis { display:grid; gap: 12px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kpi { background: var(--chip); border: 1px solid var(--border); padding: 10px 12px; border-radius: 12px; }
.kpi strong { font-size: 18px; display:block; }

.list { display:flex; flex-direction:column; gap:8px; max-height: 280px; overflow:auto; }
.item { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:10px 12px; border:1px dashed var(--border); border-radius:12px; background: var(--surface); }

.muted { color: var(--muted); font-size: 12px; }
.hr { height:1px; background: var(--border); margin: 12px 0; }
.summary { white-space:pre-wrap; background: var(--surface); border:1px solid var(--border); border-radius:12px; padding:12px; min-height:120px; }
.footer { display:flex; gap:8px; flex-wrap:wrap; justify-content:space-between; align-items:center; }

.person-row { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.person-actions { display:flex; gap:6px; }

.badge { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--primary-weak); color: var(--text); border: 1px solid var(--border); }

@media (max-width: 1000px) {
  .cols-3 { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: 1fr; }
}
