@import url("https://fonts.googleapis.com/css2?family=K2D:wght@500;600;700;800&family=Urbanist:wght@500;600;700;800&family=Nunito:wght@400;600;700;800&display=swap");
:root {
  --navy: #0a1b3d;
  --blue: #1769d2;
  --blue2: #3e8cff;
  --ink: #14213d;
  --muted: #64748b;
  --line: #dce5f1;
  --bg: #f4f7fb;
  --good: #16805d;
  --warn: #a16207;
  --bad: #b91c1c;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font:
    14px Nunito,
    Arial;
}
h1 {
  font: 700 clamp(24px, 3vw, 36px) K2D;
  margin: 10px 0 7px;
  letter-spacing: -0.03em;
}
.wrap {
  max-width: 1460px;
  margin: auto;
  padding: 20px clamp(12px, 2.5vw, 32px) 36px;
}
.nav {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.nav button,
.btn {
  border: 1px solid #cbd8e9;
  border-radius: 8px;
  background: white;
  color: var(--navy);
  padding: 9px 12px;
  font: 800 12px Urbanist;
  cursor: pointer;
}
.nav button.active,
.btn.primary {
  background: var(--navy);
  border-color: var(--navy);
  color: white;
}
.filters {
  display: flex;
  align-items: end;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 13px;
  margin-bottom: 14px;
}
.field label {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.field select,
.field input {
  display: block;
  margin-top: 5px;
  padding: 9px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  background: white;
  color: var(--ink);
  font: inherit;
  min-width: 150px;
}
.kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 11px;
}
.card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 16px;
  min-width: 0;
  margin-bottom: 13px;
}
.kpi small {
  color: var(--muted);
  font-size: 11px;
}
.kpi strong {
  display: block;
  font: 700 clamp(19px, 2vw, 27px) K2D;
  margin: 8px 0;
  overflow-wrap: anywhere;
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 12px;
  margin: 21px 0 10px;
}
.section-head h2 {
  font: 800 17px Urbanist;
  margin: 0;
}
.muted,
.note {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}
.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
}
.barrow {
  display: flex;
  gap: 9px;
  align-items: center;
  margin: 11px 0;
}
.barrow .name {
  width: 155px;
  font-size: 12px;
}
.track {
  height: 13px;
  background: #eaf0f8;
  border-radius: 9px;
  overflow: hidden;
  flex: 1;
}
.fill {
  height: 100%;
  background: var(--blue);
  border-radius: 9px;
}
.barrow b {
  width: 112px;
  text-align: right;
  font-size: 11px;
}
.scroll {
  overflow: auto;
  max-height: 490px;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 12px;
}
td,
th {
  text-align: left;
  padding: 9px 10px;
  border-bottom: 1px solid #e9eef5;
  white-space: nowrap;
}
th {
  position: sticky;
  top: 0;
  background: #f7f9fc;
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  z-index: 1;
}
.status {
  display: inline-block;
  border-radius: 20px;
  padding: 4px 8px;
  font-size: 10px;
  font-weight: 800;
  background: #e8f6ee;
  color: var(--good);
}
.status.Atenção {
  background: #fff2d6;
  color: var(--warn);
}
.status.Crítico {
  background: #fce8e8;
  color: var(--bad);
}
.scenario {
  color: #80521a;
}
.hide {
  display: none !important;
}
.modulegrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.modulegrid .card h3 {
  font: 800 15px Urbanist;
  margin: 0 0 8px;
}
.modulegrid ul {
  padding-left: 19px;
  line-height: 1.8;
  margin: 8px 0;
}
.modulegrid li {
  font-size: 13px;
}
.chip {
  display: inline-block;
  border-radius: 20px;
  background: #edf3fb;
  color: #254d7c;
  padding: 4px 8px;
  font-size: 10px;
  font-weight: 800;
}
.scenario-controls {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}
.scenario-controls input {
  width: 180px;
}
.footer {
  margin-top: 14px;
}
.smallbtn {
  padding: 7px 9px;
  font-size: 11px;
}
@media (max-width: 1000px) {
  .kpis {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 700px) {
  .kpis,
  .two,
  .modulegrid {
    grid-template-columns: 1fr;
  }
  .barrow .name {
    width: 115px;
  }
  .filters .field {
    flex: 1;
  }
  .field select {
    width: 100%;
  }
}

.scenario-kpis {
  margin-top: 15px;
}
:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}

@media (max-width: 700px) {
  .filters .field {
    flex: 1 1 8.5rem;
    min-width: 0;
  }
  .field input,
  .field select {
    min-width: 0;
    width: 100%;
  }
  .barrow .name,
  .barrow b {
    max-width: 34%;
    overflow-wrap: anywhere;
  }
}

.dataset-settings {
  background: white;
}
.dataset-settings .wrap {
  max-width: none;
  padding: 12px 16px;
}
.dataset-settings h2 {
  font-size: 15px;
  margin: 0 0 10px;
}
.dataset-summary {
  display: grid;
  gap: 8px 20px;
  grid-template-columns: 2fr 1fr 1.5fr;
  margin: 0 0 16px;
}
.dataset-summary dt {
  color: var(--muted);
  font-size: 12px;
}
.dataset-summary dd {
  margin: 3px 0 0;
  overflow-wrap: anywhere;
  font-weight: 700;
}
.dataset-settings label {
  display: block;
  font-weight: 700;
  margin-bottom: 5px;
}
.dataset-settings input {
  max-width: 100%;
  margin: 0 8px 8px 0;
}
@media (max-width: 560px) {
  .dataset-summary {
    grid-template-columns: 1fr;
  }
}
