:root {
  color-scheme: light;
  --ink: #16202a;
  --muted: #66717d;
  --line: #d9e0e7;
  --panel: #ffffff;
  --canvas: #f3f6f7;
  --accent: #006d77;
  --accent-2: #c44536;
  --accent-3: #4f7cac;
  --accent-4: #6f7d1c;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--canvas);
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px clamp(18px, 4vw, 48px) 18px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.04;
}

h2 {
  font-size: 16px;
}

button,
select,
input {
  font: inherit;
}

button {
  min-width: 44px;
  min-height: 40px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  color: #fff;
  background: var(--accent);
  font-weight: 760;
  cursor: pointer;
}

main {
  padding: 20px clamp(18px, 4vw, 48px) 40px;
}

.toolbar {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

select,
input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 12px;
  color: var(--ink);
  background: #fff;
}

.notice {
  margin-bottom: 16px;
  padding: 11px 13px;
  border: 1px solid #d7c58a;
  border-radius: 6px;
  color: #4f4214;
  background: #fff7d8;
  font-size: 13px;
}

.kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.kpis article,
.panel,
.hs-section,
.table-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.kpis article {
  display: grid;
  gap: 8px;
  padding: 16px;
}

.kpis span,
.panel-heading span {
  color: var(--muted);
  font-size: 12px;
}

.kpis strong {
  font-size: clamp(22px, 3vw, 34px);
  line-height: 1;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(280px, 1.2fr) minmax(280px, 1fr) minmax(240px, 0.8fr);
  gap: 16px;
  margin-bottom: 16px;
}

.panel,
.hs-section,
.table-section {
  padding: 16px;
}

.panel-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.bars {
  display: grid;
  gap: 9px;
}

.bar-row {
  display: grid;
  grid-template-columns: minmax(86px, 145px) 1fr minmax(84px, auto);
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.track {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #e9eef2;
}

.fill {
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.trend,
.mix {
  min-height: 245px;
}

svg {
  display: block;
  width: 100%;
  height: auto;
}

.axis,
.chart-label {
  fill: var(--muted);
  font-size: 11px;
}

.line {
  fill: none;
  stroke: var(--accent-2);
  stroke-width: 3;
}

.dot {
  fill: var(--accent-2);
}

.mix-item {
  display: grid;
  grid-template-columns: 18px 1fr auto;
  gap: 10px;
  align-items: center;
  margin: 10px 0;
  font-size: 13px;
}

.hs-section {
  margin-bottom: 16px;
}

.hs-section > p {
  max-width: 980px;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.hs-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(190px, 1fr));
  gap: 12px;
}

.hs-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px;
  background: #fbfcfd;
}

.hs-card h3 {
  margin: 8px 0 6px;
  font-size: 14px;
}

.hs-card p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.hs-card ul {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hs-card li {
  display: grid;
  gap: 2px;
  font-size: 12px;
  line-height: 1.35;
}

.hs-card li span {
  font-weight: 700;
}

.hs-card small {
  color: var(--muted);
  font-size: 11px;
}

.swatch {
  width: 14px;
  height: 14px;
  border-radius: 3px;
}

.table-wrap {
  overflow: auto;
  max-height: 520px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 860px;
  background: #fff;
}

th,
td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 13px;
  white-space: nowrap;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: var(--muted);
  background: #f7f9fa;
  font-size: 12px;
}

td:nth-child(5),
td:nth-child(6),
td:nth-child(7) {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 1000px) {
  .toolbar,
  .kpis,
  .dashboard-grid,
  .hs-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .app-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .toolbar,
  .kpis,
  .dashboard-grid,
  .hs-grid {
    grid-template-columns: 1fr;
  }

  .panel-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }
}
