:root {
  font-family: system-ui, sans-serif;
  color: #172033;
  background: #f4f7fb;
}
body {
  margin: 0;
}
main {
  max-width: 960px;
  margin: 2rem auto;
  padding: 2rem;
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 12px #1b31501a;
}
form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1rem;
}
label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.9rem;
}
input,
select,
button {
  padding: 0.65rem;
  border: 1px solid #b7c3d6;
  border-radius: 6px;
  font: inherit;
}
button {
  align-self: end;
  background: #1657b7;
  color: white;
  border: 0;
  cursor: pointer;
}
table {
  width: 100%;
  border-collapse: collapse;
}
th,
td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid #dde4ef;
}
#message {
  min-height: 1.5rem;
  color: #a11;
}
.dashboard {
  display: grid;
  gap: 1.5rem;
  margin-top: 1rem;
}
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
}
.card {
  border: 1px solid #dde4ef;
  border-radius: 8px;
  padding: 1rem;
  display: grid;
  gap: 0.35rem;
}
.card-label {
  font-size: 0.8rem;
  color: #5a6b85;
}
.card-value {
  font-size: 1.35rem;
  font-weight: 600;
}
.charts-row {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 1rem;
}
.chart {
  flex: 0 1 500px;
  max-width: 500px;
  margin: 0;
  text-align: center;
}
.chart img {
  width: 100%;
  height: auto;
  border: 1px solid #dde4ef;
  border-radius: 8px;
}
.chart figcaption {
  font-size: 0.85rem;
  color: #5a6b85;
  margin-top: 0.4rem;
}
button.eye {
  background: transparent;
  border: 1px solid #b7c3d6;
  color: #172033;
  padding: 0.25rem 0.6rem;
  cursor: pointer;
}
.modal {
  position: fixed;
  inset: 0;
  background: rgba(23, 32, 51, 0.55);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 2rem;
  z-index: 10;
}
.modal.hidden {
  display: none;
}
.modal-box {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  max-width: 640px;
  width: 100%;
  position: relative;
  box-shadow: 0 6px 24px #1b315033;
}
.modal-close {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  background: transparent;
  border: 0;
  color: #5a6b85;
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
}
.history-chart {
  max-width: 100%;
  height: auto;
  border: 1px solid #dde4ef;
  border-radius: 8px;
  margin-bottom: 1rem;
}
