:root {
  --nav: #10233f;
  --blue: #1457c5;
  --bg: #f4f7fb;
  --line: #e2e7ef;
  --muted: #6b7688;
  --ok: #087f5b;
  --warn: #a15c00;
  --danger: #b42318;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font:
    14px system-ui,
    -apple-system,
    sans-serif;
  background: var(--bg);
  color: #172033;
}
aside {
  position: fixed;
  inset: 0 auto 0 0;
  width: 235px;
  background: var(--nav);
  color: #fff;
  padding: 22px;
  overflow: auto;
}
aside h2 {
  margin: 0 0 24px;
}
aside small {
  opacity: 0.75;
}
aside button {
  display: block;
  width: 100%;
  padding: 11px;
  margin: 4px 0;
  border: 0;
  border-radius: 8px;
  text-align: left;
  background: transparent;
  color: #dce7fa;
  cursor: pointer;
  font-size: 14px;
}
aside button:hover,
aside button.active {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}
main {
  margin-left: 235px;
  padding: 26px;
  max-width: 1600px;
}
.view {
  display: none;
}
.view.on {
  display: block;
}
.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 14px;
}
.card.danger {
  border-color: #f2c3bf;
}
.big {
  font-size: 26px;
  font-weight: 800;
  margin-top: 7px;
}
.muted {
  color: var(--muted);
}
.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 15px;
}
input,
select {
  padding: 10px;
  border: 1px solid #ccd5e3;
  border-radius: 8px;
  width: 100%;
  font-size: 14px;
  background: #fff;
}
.search {
  max-width: 450px;
}
label {
  display: block;
  margin: 0 0 5px;
  font-weight: 600;
}
button.primary {
  background: var(--blue);
  color: #fff;
  border: 0;
  padding: 10px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
}
button.light {
  background: #eaf1ff;
  color: var(--blue);
  border: 0;
  padding: 9px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
}
.table {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
}
th,
td {
  padding: 11px 13px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}
th {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  background: #fafcff;
}
.tag {
  padding: 4px 8px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
}
.tag.ok {
  background: #e6f7f0;
  color: var(--ok);
}
.tag.warn {
  background: #fff1d6;
  color: var(--warn);
}
.alert {
  background: #fff7e6;
  border: 1px solid #f1d29a;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 14px;
}
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 100;
}
.modal.on {
  display: flex;
}
.box {
  background: #fff;
  border-radius: 15px;
  padding: 22px;
  width: min(720px, 100%);
  max-height: 90vh;
  overflow: auto;
}
.box label {
  margin: 9px 0 4px;
}
.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.filter-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
.report-cards {
  grid-template-columns: repeat(3, 1fr);
  margin-top: 14px;
}
.error-box {
  display: none;
  background: #fff0ef;
  color: var(--danger);
  border: 1px solid #f4c7c3;
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 10px;
}
.error-box.show {
  display: block;
}
pre {
  white-space: pre-wrap;
  background: #f7f9fc;
  border-radius: 10px;
  padding: 12px;
  margin-top: 14px;
}
hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 20px 0;
}
@media (max-width: 1050px) {
  .cards,
  .filter-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 850px) {
  aside {
    position: static;
    width: auto;
  }
  main {
    margin: 0;
  }
  .cards,
  .filter-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 520px) {
  .cards,
  .row,
  .filter-grid,
  .report-cards {
    grid-template-columns: 1fr;
  }
}
