:root {
  --bg: #f3f6f4;
  --panel: #ffffff;
  --text: #112018;
  --muted: #4c6658;
  --accent: #176b4d;
  --accent-soft: #dcefe6;
  --danger: #8b2f2f;
  --line: #d5e0d9;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Manrope, "Segoe UI", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at top right, #dcefe6 0%, var(--bg) 45%), var(--bg);
}

.app {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 20px 44px;
}

.header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 20px;
}

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

h1 {
  margin: 0;
  line-height: 1.1;
}

.subtitle {
  margin: 10px 0 0;
  color: var(--muted);
  max-width: 740px;
}

.status-wrap {
  display: grid;
  gap: 10px;
  min-width: 200px;
}

.status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 700;
  background: var(--accent-soft);
  color: var(--accent);
}

.status.error {
  background: #f8e2e2;
  color: var(--danger);
}

button {
  border: 1px solid var(--accent);
  border-radius: 10px;
  background: var(--accent);
  color: white;
  padding: 9px 12px;
  font-weight: 700;
  cursor: pointer;
}

button:hover {
  filter: brightness(1.05);
}

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

.kpi-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
}

.kpi-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.kpi-card h2 {
  margin: 10px 0 0;
  font-size: 28px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 14px;
}

.panel-head h3 {
  margin: 0 0 10px;
}

.chart-wrap {
  position: relative;
}

canvas {
  width: 100%;
  height: auto;
  border-radius: 10px;
  background: linear-gradient(180deg, #f9fbfa 0%, #ffffff 100%);
}

.chart-tooltip {
  position: absolute;
  z-index: 2;
  pointer-events: none;
  background: #112018;
  color: #fff;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 12px;
  line-height: 1.35;
  width: 230px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.tip-head {
  font-weight: 700;
  margin-bottom: 3px;
}

.tip-meta {
  color: #cfe3d8;
  font-size: 11px;
  margin-bottom: 7px;
}

.tip-section {
  margin-top: 6px;
}

.tip-title {
  font-size: 11px;
  color: #cfe3d8;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 3px;
}

.tip-text {
  font-size: 11px;
}

.tip-status-grid {
  display: grid;
  gap: 4px;
}

.tip-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
}

.tip-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.tip-dot.good {
  background: #2ecb70;
}

.tip-dot.bad {
  background: #e35a5a;
}

.map {
  position: relative;
  height: 380px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}

.tracking-meta p {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 14px;
}

.tracking-list-wrap {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfdfc;
  max-height: 320px;
  overflow: auto;
}

.tracking-list {
  list-style: none;
  padding: 8px;
  margin: 0;
}

.tracking-list li {
  border-bottom: 1px solid var(--line);
  padding: 8px;
  font-size: 13px;
  color: var(--text);
}

.tracking-list li:last-child {
  border-bottom: 0;
}

.tracking-list .muted {
  color: var(--muted);
}

.table-wrap {
  overflow-x: auto;
}

.tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 10px;
}

.tab-btn {
  border: 1px solid var(--line);
  background: #f5faf7;
  color: var(--text);
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 13px;
}

.tab-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

table {
  width: 100%;
  border-collapse: collapse;
}

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

th {
  color: var(--muted);
  font-weight: 700;
}

.footnote {
  color: var(--muted);
  font-size: 13px;
}

a {
  color: var(--accent);
}

@media (max-width: 920px) {
  .header {
    flex-direction: column;
  }

  .kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

}

@media (max-width: 560px) {
  .kpis {
    grid-template-columns: 1fr;
  }

  .app {
    padding: 18px 14px 30px;
  }

  .map {
    height: 300px;
  }
}
