:root {
  --accent-orange: #fc4c02;
  --accent-purple: #6516c1;
  --accent-black: #000;
  --accent-white: #fff;
  --accent-muted: #666;
  --accent-line: #e8e8e8;
  --accent-soft-orange: #ffede6;
  --accent-soft-green: #e6f9f0;
  --accent-success: #1a8a50;
  --accent-warning: #f5a623;
  --accent-error: #e8293b;
  font-family: Montserrat, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  background: #fff;
  color: var(--accent-black);
  margin: 0;
}

button,
input,
select {
  font: inherit;
}

.app-shell {
  margin: 0 auto;
  max-width: 1240px;
  padding: 28px 24px 56px;
}

.hero {
  background: var(--accent-orange);
  border-radius: 8px;
  color: var(--accent-white);
  margin-bottom: 16px;
  padding: 24px;
}

.hero__logo {
  display: block;
  height: 30px;
  margin-bottom: 18px;
  width: auto;
}

.hero__content {
  align-items: end;
  display: flex;
  gap: 24px;
  justify-content: space-between;
}

.hero h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1;
  margin: 0;
}

.hero p {
  font-size: 1rem;
  font-weight: 700;
  margin: 12px 0 0;
}

.hero__badges {
  align-items: flex-end;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 220px;
}

.badge {
  background: rgb(255 255 255 / 18%);
  border-radius: 999px;
  display: inline-flex;
  font-size: .78rem;
  font-weight: 800;
  line-height: 1.2;
  padding: 8px 12px;
}

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

.kpi {
  border: 1px solid var(--accent-line);
  border-radius: 8px;
  border-top: 4px solid var(--accent-orange);
  padding: 16px;
}

.kpi strong {
  display: block;
  font-size: 1.55rem;
  line-height: 1.1;
  margin: 8px 0 2px;
}

.kpi span,
.filters label,
.muted,
td {
  color: var(--accent-muted);
}

.notice {
  background: var(--accent-soft-green);
  border-left: 4px solid var(--accent-success);
  border-radius: 8px;
  margin-bottom: 16px;
  padding: 14px 16px;
}

.notice.is-warning {
  background: #fff6e5;
  border-color: var(--accent-warning);
}

.notice.is-error {
  background: #fdecea;
  border-color: var(--accent-error);
}

.filters {
  align-items: end;
  border-bottom: 1px solid var(--accent-line);
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 18px;
  padding-bottom: 16px;
}

.filters label {
  display: grid;
  font-size: .78rem;
  font-weight: 800;
  gap: 6px;
}

select {
  background: #fff;
  border: 1px solid #d1d1d1;
  border-radius: 8px;
  min-height: 42px;
  padding: 0 12px;
  width: 100%;
}

.tabs {
  border-bottom: 1px solid var(--accent-line);
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  overflow-x: auto;
}

.tab {
  background: transparent;
  border: 0;
  border-bottom: 4px solid transparent;
  cursor: pointer;
  font-weight: 800;
  padding: 12px 14px;
}

.tab.is-active {
  border-color: var(--accent-orange);
}

.section-title {
  margin: 0 0 8px;
}

.section-intro {
  color: var(--accent-muted);
  margin: 0 0 18px;
}

.split {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.panel {
  min-width: 0;
}

.item-list {
  display: grid;
  gap: 10px;
}

.result-card {
  border: 1px solid var(--accent-line);
  border-left: 4px solid var(--accent-orange);
  border-radius: 8px;
  padding: 14px 16px;
}

.result-card.is-strong {
  border-left-color: var(--accent-success);
}

.result-card h3 {
  font-size: 1rem;
  margin: 0 0 6px;
}

.result-card p {
  color: var(--accent-muted);
  margin: 0;
}

.chip {
  border-radius: 999px;
  display: inline-flex;
  font-size: .75rem;
  font-weight: 900;
  margin-top: 10px;
  padding: 6px 9px;
}

.chip.is-good {
  background: var(--accent-soft-green);
  color: var(--accent-success);
}

.chip.is-warn {
  background: #fff6e5;
  color: #9a6500;
}

.chip.is-bad {
  background: #fdecea;
  color: var(--accent-error);
}

.metric-list {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.metric {
  border: 1px solid var(--accent-line);
  border-radius: 8px;
  padding: 14px;
}

.metric strong {
  display: block;
  font-size: 1.35rem;
}

.trend-svg {
  border: 1px solid var(--accent-line);
  border-radius: 8px;
  height: 220px;
  margin-top: 12px;
  width: 100%;
}

.table-wrap {
  border: 1px solid var(--accent-line);
  border-radius: 8px;
  overflow: auto;
}

table {
  border-collapse: collapse;
  min-width: 880px;
  width: 100%;
}

th,
td {
  border-bottom: 1px solid var(--accent-line);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

th {
  background: #f7f7f7;
  color: #555;
  font-size: .78rem;
  font-weight: 800;
}

td:first-child,
th:first-child {
  color: var(--accent-black);
  font-weight: 800;
}

.table-link,
.card-link {
  color: var(--accent-orange);
  font-weight: 800;
  text-decoration: none;
}

.table-link:hover,
.card-link:hover {
  text-decoration: underline;
}

.empty {
  border: 1px dashed #d1d1d1;
  border-radius: 8px;
  color: var(--accent-muted);
  padding: 20px;
}

@media (max-width: 860px) {
  .app-shell {
    padding: 16px;
  }

  .hero__content,
  .split {
    display: block;
  }

  .hero__badges {
    align-items: flex-start;
    margin-top: 18px;
  }

  .kpi-grid,
  .filters,
  .metric-list {
    grid-template-columns: 1fr;
  }

  .panel + .panel {
    margin-top: 24px;
  }
}
