:root {
  --bg: #0f1216;
  --panel: #171b21;
  --line: #2a313c;
  --text: #e8edf4;
  --muted: #8b95a5;
  --accent: #7dd3a0;
  --warn: #e7b549;
  --danger: #e36b6b;
  --chip: #222833;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.45 ui-sans-serif, system-ui, sans-serif; }
a { color: inherit; text-decoration: none; }
.layout { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
.side { border-right: 1px solid var(--line); padding: 20px 16px; background: #12161b; }
.brand { font-weight: 700; letter-spacing: .04em; margin-bottom: 18px; }
.nav a { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; color: var(--muted); }
.nav a.active, .nav a:hover { background: var(--chip); color: var(--text); }
.badge { background: #2b3a2f; color: var(--accent); border-radius: 999px; padding: 1px 7px; font-size: 11px; }
.main { padding: 20px 24px 40px; }
.top { display: flex; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.search { display: flex; gap: 8px; flex: 1; max-width: 520px; }
input, select { background: #10141a; color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; max-width: 280px; }
textarea { background: #10141a; color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; width: 100%; max-width: 100%; }
.search input { max-width: none; flex: 1; }
.focus-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.focus-item { display: block; background: #12171d; border: 1px solid var(--line); border-radius: 8px; padding: 8px; margin-top: 6px; }
.focus-item:hover { border-color: #3a4554; }
button, .btn { border: 1px solid var(--line); background: var(--chip); color: var(--text); border-radius: 8px; padding: 7px 10px; cursor: pointer; display: inline-block; }
button.primary, .btn.primary { background: #1f6f4a; border-color: #2b8a5c; }
button.danger { background: #5a2222; border-color: #7a3030; }
.muted { color: var(--muted); }
.flash { background: #1d3a2c; border: 1px solid #2b6b49; padding: 8px 12px; border-radius: 8px; margin-bottom: 12px; }
.kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.kpi b { display: block; font-size: 22px; margin-top: 4px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin-top: 14px; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.risk-high { color: var(--danger); }
.risk-medium { color: var(--warn); }
.risk-low { color: var(--accent); }
.kanban { display: grid; grid-template-columns: repeat(8, minmax(160px, 1fr)); gap: 8px; overflow-x: auto; }
.col { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 8px; min-height: 280px; }
.col h3 { margin: 0 0 8px; font-size: 13px; color: var(--muted); }
.card { background: #12171d; border: 1px solid var(--line); border-radius: 8px; padding: 8px; margin-bottom: 8px; }
.chart { display: flex; align-items: flex-end; gap: 10px; height: 140px; padding-top: 10px; }
.bar-wrap { flex: 1; text-align: center; }
.bars { display: flex; gap: 3px; align-items: flex-end; height: 110px; justify-content: center; }
.bar { width: 10px; border-radius: 4px 4px 0 0; }
.bar.d { background: #4d7cff; }
.bar.s { background: var(--accent); }
.login { max-width: 380px; margin: 12vh auto; }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.health-ok { color: var(--accent); }
.health-warn { color: var(--warn); }
.health-risk { color: var(--danger); }
pre { white-space: pre-wrap; font-size: 12px; color: var(--muted); }
details { margin-top: 8px; }
.row-actions select { width: auto; min-width: 160px; }
.heat-wrap { overflow-x: auto; }
table.heat th, table.heat td { font-size: 12px; min-width: 88px; }
.heat-empty { color: var(--muted); }
.heat-low { background: #3a2222; }
.heat-mid { background: #3a3420; }
.heat-high { background: #1d3a2c; }
@media (max-width: 1100px) {
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .focus-list { grid-template-columns: 1fr; }
  .layout { grid-template-columns: 1fr; }
  .side { border-right: 0; border-bottom: 1px solid var(--line); }
}
