:root {
  --bg: #f4f6f3;
  --panel: #ffffff;
  --ink: #17201a;
  --muted: #637066;
  --line: #dfe5dc;
  --green: #2f7d4f;
  --gold: #b7791f;
  --red: #b4533c;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: var(--bg);
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px clamp(16px, 4vw, 48px);
  background: #16251b;
  color: white;
}
h1, h2, p { margin: 0; }
.topbar h1 { font-size: 28px; }
.topbar p { margin-top: 6px; color: #cbd8cd; }
.status {
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 13px;
}
.status.ok { background: rgba(47,125,79,.35); }
.status.warn { background: rgba(180,83,60,.35); }
main { padding: 24px clamp(16px, 4vw, 48px) 40px; }
.metrics {
  display: grid;
  grid-template-columns: repeat(6, minmax(150px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
article, .panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(18, 31, 24, .06);
}
article {
  min-height: 118px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
article span, .panel-head span { color: var(--muted); font-size: 13px; }
article strong { font-size: 25px; line-height: 1.1; margin-top: 8px; overflow-wrap: anywhere; }
article small { color: var(--muted); }
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}
.panel { padding: 18px; min-width: 0; }
.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: baseline;
  margin-bottom: 16px;
}
.panel h2 { font-size: 18px; }
canvas { width: 100%; max-height: 320px; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.table-wrap { overflow-x: auto; }
.table-wrap table { min-width: 720px; }
th, td {
  text-align: left;
  padding: 11px 8px;
  border-bottom: 1px solid var(--line);
}
th { color: var(--muted); font-weight: 600; }

@media (max-width: 1100px) {
  .metrics { grid-template-columns: repeat(3, minmax(150px, 1fr)); }
}
@media (max-width: 760px) {
  .topbar { align-items: flex-start; flex-direction: column; gap: 14px; }
  .metrics, .grid { grid-template-columns: 1fr; }
}
