/* ─── Admin Dashboard Minimal ─── */

.dash {
  padding: 0 4px;
}

/* Header */
.dash-header {
  margin-bottom: 28px;
}
.dash-header h4 {
  font-size: 22px;
  font-weight: 700;
  color: #1a1d29;
  margin: 0;
  letter-spacing: -0.3px;
}
.dash-header .online-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #e8f5e9;
  color: #2e7d32;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
}
.dash-header .online-badge .dot {
  width: 7px;
  height: 7px;
  background: #2e7d32;
  border-radius: 50%;
  animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* ── Summary Mini Cards ── */
.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}
.summary-card {
  background: #fff;
  border-radius: 14px;
  padding: 18px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid #eef0f4;
  transition: all 0.25s ease;
  cursor: default;
}
.summary-card:hover {
  border-color: #d0d5dd;
  box-shadow: 0 4px 20px rgba(0,0,0,0.04);
  transform: translateY(-2px);
}
.summary-card .icon-box {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 20px;
  color: #fff;
}
.summary-card .info .label {
  font-size: 12px;
  color: #8b8fa3;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}
.summary-card .info .value {
  font-size: 24px;
  font-weight: 700;
  color: #1a1d29;
  line-height: 1.2;
}

/* ── Section Card ── */
.section-card {
  background: #fff;
  border-radius: 14px;
  border: 1px solid #eef0f4;
  margin-bottom: 20px;
  transition: all 0.2s ease;
}
.section-card:hover {
  border-color: #d0d5dd;
}
.section-card .card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 0;
}
.section-card .card-head h6 {
  font-size: 15px;
  font-weight: 600;
  color: #1a1d29;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-card .card-head h6 i {
  font-size: 18px;
  color: #6c5ce7;
}
.section-card .card-head .badge-count {
  font-size: 12px;
  font-weight: 600;
  background: #f0f0f5;
  color: #6b7280;
  padding: 3px 12px;
  border-radius: 12px;
}
.section-card .card-body {
  padding: 10px 10px 10px;
}
.section-card .card-body.p-0 {
  padding: 0;
}
.section-card .card-footer {
  padding: 12px 20px;
  background: #f8f9fc;
  border-top: 1px solid #eef0f4;
  border-radius: 0 0 14px 14px;
  text-align: center;
  font-size: 13px;
  color: #6b7280;
}
.section-card .card-footer strong {
  color: #6c5ce7;
}

/* ── Mini stat row (question categories) ── */
.stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #f3f4f6;
}
.stat-row:last-child {
  border-bottom: none;
}
.stat-row .stat-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #374151;
  max-width: 55%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.stat-row .stat-bar {
  flex: 1;
  max-width: 120px;
  height: 6px;
  background: #eef0f4;
  border-radius: 4px;
  overflow: hidden;
  margin: 0 12px;
}
.stat-row .stat-bar .fill {
  height: 100%;
  border-radius: 4px;
  background: #6c5ce7;
  transition: width 0.5s ease;
}
.stat-row .stat-count {
  font-size: 13px;
  font-weight: 600;
  color: #6b7280;
  min-width: 30px;
  text-align: right;
}

/* ── Section-unit rows ── */
.unit-row {
  margin-bottom: 14px;
}
.unit-row:last-child {
  margin-bottom: 0;
}
.unit-row .unit-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.unit-row .unit-top .unit-name {
  font-size: 13px;
  font-weight: 500;
  color: #374151;
  max-width: 45%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.unit-row .unit-top .unit-tags {
  display: flex;
  gap: 6px;
}
.unit-row .unit-top .unit-tags span {
  font-size: 11px;
  padding: 2px 10px;
  border-radius: 10px;
  background: #f0f0f5;
  color: #6b7280;
  font-weight: 500;
}
.unit-row .unit-top .unit-tags .count {
  font-weight: 700;
  color: #1a1d29;
}
.unit-row .progress-mini {
  height: 6px;
  background: #eef0f4;
  border-radius: 4px;
  overflow: hidden;
}
.unit-row .progress-mini .fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, #6c5ce7, #a29bfe);
  transition: width 0.5s ease;
}

/* ── Minimal Table ── */
.mini-table-wrap {
  overflow-x: auto;
}
.mini-table {
  width: 100%;
  border-collapse: collapse;
}
.mini-table thead th {
  font-size: 11px;
  font-weight: 600;
  color: #8b8fa3;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid #eef0f4;
  background: #f8f9fc;
}
.mini-table thead th:last-child {
  text-align: right;
}
.mini-table thead th:nth-child(2),
.mini-table thead th:nth-child(3),
.mini-table thead th:nth-child(4) {
  text-align: center;
}
.mini-table tbody td {
  padding: 10px 12px;
  font-size: 13px;
  color: #374151;
  border-bottom: 1px solid #f3f4f6;
  vertical-align: middle;
}
.mini-table tbody td:last-child {
  text-align: right;
}
.mini-table tbody td:nth-child(2),
.mini-table tbody td:nth-child(3),
.mini-table tbody td:nth-child(4) {
  text-align: center;
}
.mini-table tbody tr:hover {
  background: #f8f9fc;
}
.mini-table tbody tr:last-child td {
  border-bottom: none;
}

/* ── Status badges ── */
.status-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 12px;
  border-radius: 12px;
}
.status-badge.active {
  background: #e8f5e9;
  color: #2e7d32;
}
.status-badge.upcoming {
  background: #e3f2fd;
  color: #1565c0;
}
.status-badge.ended {
  background: #f5f5f5;
  color: #9e9e9e;
}

/* ── Chart area ── */
.chart-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.chart-grid .chart-box {
  text-align: center;
}
.chart-grid .chart-box h6 {
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

/* ── Material grid ── */
.material-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.material-grid .mat-item {
  background: #f8f9fc;
  border-radius: 12px;
  padding: 14px 10px;
  text-align: center;
  border: 1px solid #eef0f4;
  transition: all 0.2s ease;
  overflow: hidden;
}
.material-grid .mat-item:hover {
  border-color: #d0d5dd;
}
.material-grid .mat-item h6 {
  font-size: 11px;
  font-weight: 600;
  color: #6b7280;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.material-grid .mat-item .chart-mini-wrap {
  height: 140px;
  position: relative;
  overflow: hidden;
}

/* ── Responsive ── */
@media (max-width: 992px) {
  .chart-grid {
    grid-template-columns: 1fr;
  }
  .material-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 576px) {
  .summary-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .summary-card {
    padding: 14px 12px;
  }
  .summary-card .info .value {
    font-size: 20px;
  }
  .material-grid {
    grid-template-columns: 1fr 1fr;
  }
  .dash-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}
