:root {
  --bg: #f6f7f4;
  --panel: #ffffff;
  --ink: #18211d;
  --muted: #657268;
  --line: #dce4dd;
  --brand: #1f7a4f;
  --brand-2: #0e5f78;
  --warn: #b45309;
  --danger: #b42318;
  --shadow: 0 12px 34px rgba(24, 33, 29, .08);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: var(--bg);
}

.demo-shell { display: grid; grid-template-columns: 280px 1fr; min-height: 100vh; }
.demo-sidebar {
  background: #17241d;
  color: #f8fbf7;
  padding: 18px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
}
.brand { display: flex; gap: 12px; align-items: center; margin-bottom: 22px; }
.brand img { width: 44px; height: 44px; object-fit: contain; background: #fff; border-radius: 8px; padding: 6px; }
.brand span { font-weight: 700; }

.field { display: grid; gap: 8px; margin-bottom: 16px; color: #dbe7df; }
select, input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  font: inherit;
  background: #fff;
  color: var(--ink);
}

#demoNav { display: grid; gap: 6px; }
#demoNav button {
  width: 100%;
  text-align: left;
  border: 0;
  border-radius: 6px;
  padding: 11px 12px;
  color: #eaf4ee;
  background: transparent;
  cursor: pointer;
}
#demoNav button:hover, #demoNav button.active { background: rgba(255,255,255,.12); }

.demo-main { min-width: 0; padding: 22px; }
.demo-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.eyebrow { margin: 0 0 4px; color: var(--brand-2); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: 28px; letter-spacing: 0; }
.notice {
  border: 1px solid #c9dfd2;
  background: #eef8f1;
  color: #25513a;
  padding: 12px 14px;
  border-radius: 6px;
  margin-bottom: 18px;
}
.content-grid { display: grid; gap: 16px; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.panel, .kpi, .table-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.kpi { padding: 16px; min-height: 94px; }
.kpi span { color: var(--muted); font-size: 13px; display: block; margin-bottom: 8px; }
.kpi strong { font-size: 24px; }
.panel { padding: 18px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.toolbar { display: flex; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 12px; flex-wrap: wrap; }
.button, .icon-button {
  border: 0;
  border-radius: 6px;
  background: var(--brand);
  color: #fff;
  padding: 10px 13px;
  font-weight: 700;
  cursor: pointer;
}
.button.ghost { background: #e8eeee; color: var(--ink); }
.icon-button { display: none; min-width: 42px; }
.badges { display: flex; gap: 8px; flex-wrap: wrap; }
.badge { border-radius: 999px; padding: 4px 8px; font-size: 12px; background: #e8eeee; color: var(--ink); }
.badge.ok { background: #dff5e8; color: #116338; }
.badge.warn { background: #fff3d8; color: var(--warn); }
.badge.bad { background: #ffe2df; color: var(--danger); }

table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: var(--muted); font-size: 13px; }
.empty { text-align: center; color: var(--muted); padding: 28px; }
.chart { width: 100%; height: 170px; }
.demo-dialog { border: 0; border-radius: 8px; padding: 22px; max-width: 420px; box-shadow: var(--shadow); }

@media (max-width: 900px) {
  .demo-shell { grid-template-columns: 1fr; }
  .demo-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 280px;
    transform: translateX(-100%);
    transition: transform .2s ease;
    z-index: 10;
  }
  .demo-sidebar.open { transform: translateX(0); }
  .icon-button { display: inline-flex; align-items: center; justify-content: center; }
  .kpis, .split { grid-template-columns: 1fr; }
}
