:root {
  --bg: #fbf7f1;
  --panel: #ffffff;
  --panel-2: #f5ede0;
  --border: #e6d8c4;
  --border-soft: #efe6d3;
  --text: #2c2620;
  --muted: #8a7f72;
  --accent: #d97757;
  --accent-soft: rgba(217,119,87,0.14);
  --warn: #d99425;
  --warn-soft: rgba(217,148,37,0.16);
  --danger: #c94f3d;
  --danger-soft: rgba(201,79,61,0.14);
  --ok: #5d9659;
  --ok-soft: rgba(93,150,89,0.14);
  --shadow: 0 1px 2px rgba(44,38,32,0.04), 0 4px 12px rgba(44,38,32,0.03);
}
* { box-sizing: border-box; }
body {
  margin: 0; padding: 0 24px 24px;
  font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  background: var(--bg); color: var(--text);
}

.topnav {
  display: flex; align-items: center; gap: 24px;
  margin: 0 -24px 24px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--panel);
  box-shadow: var(--shadow);
}
.topnav a { color: var(--muted); text-decoration: none; font-size: 13px; padding: 4px 0; border-bottom: 2px solid transparent; }
.topnav a:hover { color: var(--text); }
.topnav a.active { color: var(--accent); border-bottom-color: var(--accent); }
.topnav a.logo { color: var(--text); font-weight: 600; font-size: 15px; margin-right: auto; border: none; }

h1 { font-size: 22px; margin: 0 0 4px; font-weight: 600; }
h2 { font-size: 16px; margin: 0 0 12px; font-weight: 600; color: var(--text); }
.header { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 12px; margin-bottom: 24px; }
.subtitle { color: var(--muted); font-size: 13px; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 24px; }
.kpi { background: var(--panel); border: 1px solid var(--border); border-radius: 8px; padding: 16px; box-shadow: var(--shadow); }
.kpi .label { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 6px; }
.kpi .value { font-size: 32px; font-weight: 700; line-height: 1.1; color: var(--text); }
.kpi .value.warn { color: var(--warn); }
.kpi .value.danger { color: var(--danger); }
.kpi .sublabel { color: var(--muted); font-size: 11px; margin-top: 4px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 24px; }
@media (max-width: 900px) { .grid-2 { grid-template-columns: 1fr; } }

.panel { background: var(--panel); border: 1px solid var(--border); border-radius: 8px; padding: 16px; box-shadow: var(--shadow); }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border-soft); }
th { color: var(--muted); font-weight: 500; font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; background: var(--panel-2); }
tr:last-child td { border-bottom: none; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
strong.warn { color: var(--warn); }
strong.danger { color: var(--danger); }

.pill { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; background: var(--panel-2); color: var(--muted); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.danger { background: var(--danger-soft); color: var(--danger); }
.pill.ok { background: var(--ok-soft); color: var(--ok); }

.stuck-section { margin-bottom: 16px; }
.stuck-section summary { cursor: pointer; padding: 12px 16px; background: var(--panel); border: 1px solid var(--border); border-radius: 8px; font-weight: 600; box-shadow: var(--shadow); }
.stuck-section summary:hover { background: var(--panel-2); }
.stuck-section[open] summary { border-radius: 8px 8px 0 0; }
.stuck-section .body { background: var(--panel); border: 1px solid var(--border); border-top: none; border-radius: 0 0 8px 8px; padding: 0; }
.stuck-section table { font-size: 13px; }
.stuck-section td { padding: 10px 16px; }
.stuck-section a { color: var(--accent); text-decoration: none; font-weight: 500; }
.stuck-section a:hover { text-decoration: underline; }

.top-lists { color: var(--muted); font-size: 12px; }
.folder-label { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 2px; }

.chart-wrap { height: 280px; position: relative; }

.error { background: var(--danger-soft); border: 1px solid var(--danger); color: var(--danger); padding: 16px; border-radius: 8px; margin-bottom: 16px; }
.empty { color: var(--muted); padding: 24px; text-align: center; }
.footer { color: var(--muted); font-size: 12px; margin-top: 32px; text-align: center; }

.hub-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.hub-card {
  display: block; padding: 24px; background: var(--panel); border: 1px solid var(--border);
  border-radius: 8px; text-decoration: none; color: var(--text);
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
  box-shadow: var(--shadow);
}
.hub-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 4px 16px rgba(217,119,87,0.15); }
.hub-card h3 { margin: 0 0 8px; font-size: 16px; color: var(--text); }
.hub-card p { margin: 0; color: var(--muted); font-size: 13px; }
.hub-card .nums { margin-top: 16px; display: flex; gap: 16px; flex-wrap: wrap; }
.hub-card .nums div { font-size: 12px; color: var(--muted); }
.hub-card .nums strong { display: block; font-size: 22px; font-weight: 700; color: var(--text); }
