.stats-dashboard {
  min-width: 0;
  display: grid;
  gap: 22px;
}
.stats-hero {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  padding: 30px;
  border: 1px solid #f0d6dc;
  border-radius: 22px;
  background: linear-gradient(120deg, #fff, #fff1f4);
}
.stats-hero h2 {
  font-size: 34px;
  margin: 10px 0;
  letter-spacing: -1px;
}
.stats-hero p,
.stats-hero small {
  color: #626c7a;
}
.stats-hero-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  min-width: 240px;
  align-content: center;
}
.stats-hero-actions label,
.stats-hero-actions select {
  grid-column: 1/-1;
}
.stats-dashboard select,
.stats-dashboard input {
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #dbe2e9;
  border-radius: 10px;
  background: #fff;
  min-width: 0;
  max-width: 100%;
}
.stats-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.stats-section-heading h3 {
  margin: 0;
}
.stats-section-heading > span,
.stats-section-heading label {
  font-size: 12px;
  color: #667385;
}
.stats-section-heading label {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.stats-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.stats-kpi {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: 1px solid #e0e6ec;
  background: #fff;
  border-radius: 18px;
  padding: 22px;
  text-align: left;
  color: #26303b;
  cursor: pointer;
  transition:
    transform 0.18s,
    border-color 0.18s;
}
.stats-kpi:hover {
  transform: translateY(-2px);
  border-color: #b91636;
}
.stats-kpi > span {
  font-weight: 600;
  font-size: 14px;
}
.stats-kpi > strong {
  font-size: 36px;
  color: #b91636;
  letter-spacing: -1px;
}
.stats-kpi small {
  font-size: 12px;
  color: #647083;
  line-height: 1.5;
}
.stats-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  min-width: 0;
}
.stats-dashboard .control-surface {
  min-width: 0;
  margin: 0;
}
.stats-priority-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 20px;
}
.stats-priority-grid button {
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid #e0e6ec;
  border-radius: 14px;
  padding: 16px;
  background: #fff;
  text-align: left;
  cursor: pointer;
  color: #303a46;
}
.stats-priority-grid strong {
  font-size: 27px;
  min-width: 35px;
}
.stats-needs-action strong {
  color: #b91636;
}
.stats-all-good strong {
  color: #287050;
}
.stats-priority-grid small {
  display: block;
  color: #647083;
  font-size: 11px;
  margin-top: 5px;
}
.stats-priority-grid button > span {
  margin-left: auto;
}
.stats-bars {
  display: grid;
  gap: 17px;
  margin: 22px 0;
}
.stats-bars > div > div,
.stats-progress > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  line-height: 1.5;
}
.stats-bar-track {
  display: block;
  height: 7px;
  background: #f0f2f6;
  border-radius: 6px;
  margin-top: 8px;
  overflow: hidden;
}
.stats-bar-track i {
  display: block;
  height: 100%;
  background: #b91636;
  border-radius: 6px;
}
.stats-progress {
  margin: 24px 0;
}
.stats-progress progress {
  display: block;
  width: 100%;
  height: 9px;
  accent-color: #b91636;
  margin-top: 10px;
  border: 0;
}
.stats-note,
.stats-empty {
  font-size: 12px;
  color: #647083;
  line-height: 1.65;
}
.stats-period-kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid #e0e6ec;
  border-radius: 18px;
  background: #fff;
}
.stats-period-kpis > div {
  padding: 23px;
  text-align: center;
  border-right: 1px solid #e0e6ec;
}
.stats-period-kpis > div:last-child {
  border: 0;
}
.stats-period-kpis strong,
.stats-period-kpis span {
  display: block;
}
.stats-period-kpis strong {
  font-size: 29px;
  margin-bottom: 7px;
}
.stats-period-kpis span {
  font-size: 12px;
  color: #647083;
}
.stats-chart {
  width: 100%;
  height: auto;
  margin: 25px 0 8px;
  display: block;
}
.stats-table-scroll {
  overflow: auto;
  margin-top: 18px;
  max-width: 100%;
}
.stats-dashboard table {
  border-collapse: collapse;
  width: 100%;
  font-size: 12px;
  text-align: left;
}
.stats-dashboard td,
.stats-dashboard th {
  padding: 13px;
  border-bottom: 1px solid #e4e9ef;
  white-space: nowrap;
}
.stats-dashboard thead {
  background: #f5f7fa;
  color: #526071;
}
.stats-dashboard th small {
  display: block;
  font-weight: 400;
  color: #647083;
  margin-top: 4px;
}
.stats-data-table summary,
.stats-definitions summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}
.stats-storage {
  display: grid;
  gap: 10px;
  padding: 20px 0;
}
.stats-storage strong {
  font-size: 32px;
  color: #b91636;
}
.stats-storage span {
  font-size: 13px;
}
.stats-recent {
  border-bottom: 1px solid #e5e9ed;
  padding: 12px 0;
}
.stats-recent small {
  font-size: 11px;
  color: #647083;
}
.stats-recent p {
  font-size: 12px;
  line-height: 1.5;
  margin: 5px 0;
}
.stats-definitions p {
  font-size: 13px;
  line-height: 1.7;
  color: #647083;
}
@media (max-width: 1000px) {
  .stats-hero {
    flex-direction: column;
  }
  .stats-hero-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
  }
  .stats-hero-actions label {
    width: 100%;
  }
  .stats-columns {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 600px) {
  .stats-hero {
    padding: 20px;
  }
  .stats-hero h2 {
    font-size: 27px;
  }
  .stats-hero-actions {
    min-width: 0;
  }
  .stats-kpis {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .stats-kpi {
    padding: 15px;
    gap: 7px;
  }
  .stats-kpi > strong {
    font-size: 29px;
  }
  .stats-kpi > span {
    font-size: 12px;
  }
  .stats-kpi small {
    font-size: 11px;
  }
  .stats-priority-grid {
    grid-template-columns: 1fr;
  }
  .stats-period-kpis > div {
    padding: 16px 8px;
  }
  .stats-period-kpis strong {
    font-size: 24px;
  }
  .stats-period-kpis span {
    font-size: 11px;
  }
  .stats-dashboard .control-surface {
    padding: 18px;
  }
  .stats-section-heading input {
    width: 100%;
  }
  .stats-hero-actions .btn {
    flex: 1;
  }
}
@media (prefers-reduced-motion: reduce) {
  .stats-kpi {
    transition: none;
  }
  .stats-kpi:hover {
    transform: none;
  }
}
