.dash-body {
  background: #eef2f6;
}

.dash-topbar {
  background: #7e57c2;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  padding: 6px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.dash-btn-back {
  background: #fff;
  color: #7e57c2;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 6px;
}

.dash-btn-back:hover {
  background: #f3e5f5;
}

.dash-page {
  width: 98%;
  max-width: 1480px;
  margin: 10px auto 12px;
  background: #fff;
  border-radius: 10px;
  padding: 10px 14px 12px;
  box-shadow: 0 1px 8px rgba(0,0,0,.08);
  box-sizing: border-box;
}

.dash-page h1 {
  margin: 0;
  font-size: 18px;
}

.page-head {
  margin-bottom: 4px;
}

.dash-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px 12px;
  margin: 6px 0 8px;
}

.dash-toolbar label {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 12px;
  font-weight: 600;
  color: #555;
}

.dash-toolbar input[type="date"] {
  padding: 5px 8px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-family: inherit;
  font-size: 13px;
}

.dash-load-btn {
  background: #7e57c2;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 7px 14px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.dash-load-btn:hover { background: #6d4bb0; }

.dash-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-left: auto;
}

.dash-pill {
  display: flex;
  align-items: baseline;
  gap: 6px;
  border-radius: 999px;
  padding: 4px 10px;
  color: #fff;
  font-weight: 700;
}

.pill-red { background: #e53935; }
.pill-orange { background: #fb8c00; }
.pill-green { background: #43a047; }

.pill-num { font-size: 16px; line-height: 1; }
.pill-label { font-size: 12px; font-weight: 600; }

.dash-clock {
  font-size: 12px;
  font-weight: 600;
  color: #666;
  padding-bottom: 4px;
}

.dash-totals {
  color: #555;
  font-size: 13px;
  margin-bottom: 8px;
}

.dash-group {
  margin-bottom: 10px;
}

.dash-group-title {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 700;
  color: #333;
}

.dash-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.dash-card {
  background: #f7f8fa;
  border: 1px solid #e4e7eb;
  border-radius: 8px;
  overflow: hidden;
  min-width: 0;
}

.dash-card-head {
  background: #37474f;
  color: #fff;
  padding: 7px 10px 6px;
  position: relative;
}

.dash-card-name {
  font-size: 13px;
  font-weight: 700;
  padding-right: 46px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-card-meta {
  font-size: 11px;
  opacity: 0.92;
  margin-top: 2px;
}

.dash-card-bar {
  height: 4px;
  background: #546e7a;
  border-radius: 4px;
  margin-top: 5px;
  overflow: hidden;
}

.dash-card-bar > span {
  display: block;
  height: 100%;
  background: #66bb6a;
}

.dash-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  background: #e53935;
  color: #fff;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
}

.dash-badge.ok {
  background: #43a047;
}

.dash-sec {
  padding: 4px 8px 5px;
  border-top: 1px solid rgba(0,0,0,.06);
}

.dash-sec h3 {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

.dash-sec h3 span {
  font-size: 12px;
}

.dash-sec-body {
  max-height: 34px;
  overflow: auto;
}

.dash-sec-prod {
  background: #fff8e1;
  color: #e65100;
}

.dash-sec-send {
  background: #e3f2fd;
  color: #1565c0;
}

.dash-sec-wait {
  background: #fff3e0;
  color: #ef6c00;
}

.dash-sec-recv {
  background: #e8f5e9;
  color: #2e7d32;
}

.dash-lot {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  color: #333;
  margin: 1px 0;
}

.dash-lot b { font-weight: 700; }

.dash-empty {
  font-size: 11px;
  color: #888;
  padding: 1px 0 0;
}

.dash-error {
  background: #ffebee;
  color: #c62828;
  border: 1px solid #ffcdd2;
  border-radius: 8px;
  padding: 10px 12px;
  font-weight: 600;
}

@media (max-width: 1100px) {
  .dash-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
