.sl-dashboard-root {
  flex: 1 1 auto;
  width: 100%;
  min-height: 100%;
  overflow: auto;
  background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
}

.sl-dash-page {
  padding: 32px;
  box-sizing: border-box;
}

@media (max-width: 900px) {
  .sl-dash-page {
    padding: 16px;
  }
}

.sl-dash-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
  margin-bottom: 16px;
}

.sl-dash-filters .sl-man-field {
  margin: 0;
  flex: 0 0 auto;
}

.sl-dash-filters .sl-man-field--device {
  width: 280px;
  max-width: 100%;
}

.sl-dash-filters .sl-man-field--date {
  width: 180px;
  max-width: 100%;
}

.sl-dash-filters .sl-man-field select,
.sl-dash-filters .sl-man-field input[type="date"] {
  width: 100%;
  box-sizing: border-box;
  height: 42px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
  background: #f8fafc;
  appearance: none;
  -webkit-appearance: none;
  font-family: inherit;
}

.sl-dash-filters .sl-man-field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2364748b' d='M1.4.3 6 4.9 10.6.3 12 1.7 6 7.7 0 1.7z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}

.sl-dash-filters .sl-man-field select:focus,
.sl-dash-filters .sl-man-field input[type="date"]:focus {
  outline: 2px solid #cbd5e1;
  background-color: #fff;
}

.sl-dash-filters button.primary {
  border-radius: 10px;
  border: 1px solid #0f172a;
  background: #0f172a;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 10px 16px;
  height: 42px;
  cursor: pointer;
  flex: 0 0 auto;
}

.sl-dash-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.sl-dash-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sl-dash-card--wide {
  grid-column: 1 / -1;
}

.sl-dash-card h3 {
  margin: 0;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
}

.sl-dash-kpi {
  margin: 4px 0;
  font-size: 28px;
  font-weight: 800;
  color: #0f172a;
}

.sl-dash-status {
  margin: 4px 0 8px;
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.35;
}

.sl-dash-status.is-on {
  color: #15803d;
}

.sl-dash-status.is-off {
  color: #b91c1c;
}

.sl-dash-kpi.is-on {
  color: #15803d;
}

.sl-dash-kpi.is-off {
  color: #b91c1c;
}

.sl-dash-kpi small {
  font-size: 14px;
  font-weight: 700;
  color: #64748b;
}

.sl-dash-card span {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
}

.sl-dash-addr {
  margin: 4px 0;
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.4;
}

.sl-dash-chart-wrap {
  position: relative;
  margin-top: 8px;
}

.sl-dash-chart {
  width: 100%;
  height: 140px;
  border-radius: 10px;
  background: #f8fafc;
  cursor: pointer;
  display: block;
}

.sl-dash-chart.is-empty {
  cursor: default;
}

.sl-dash-chart-hint {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
}

@media (max-width: 900px) {
  .sl-dash-filters .sl-man-field--device,
  .sl-dash-filters .sl-man-field--date {
    width: 100%;
  }
  .sl-dash-grid {
    grid-template-columns: 1fr;
  }
}

body.sl-page-dashboard main {
  flex: 1 1 auto;
  min-width: 0;
  overflow: auto !important;
}
