/* Attendance */
.attendance-section {
  margin-bottom: var(--dstp);
}

.attendance-section h2 {
  margin-bottom: var(--stp);
}

.attendance-bar-container {
  display: flex;
  align-items: center;
  gap: var(--stp);
  margin-bottom: var(--stp);
}

.attendance-bar {
  flex: 1;
  max-width: 300px;
  height: 1.2rem;
  background: #eee;
  border-radius: 0.6rem;
  overflow: hidden;
}

.attendance-bar-fill {
  height: 100%;
  border-radius: 0.6rem;
  transition: width 0.3s ease;
}

.attendance-bar-fill.att-good { background: #2e7d32; }
.attendance-bar-fill.att-warning { background: #f9a825; }
.attendance-bar-fill.att-danger { background: #c62828; }

.attendance-summary {
  font-size: 1.1rem;
  font-weight: 600;
  white-space: nowrap;
}

/* Collapsible detail list */
.attendance-details {
  margin-bottom: var(--stp);
}

.attendance-details summary {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  cursor: pointer;
  font-weight: 600;
  font-size: 1rem;
  list-style: none;
  user-select: none;
  padding: 0.3rem 0;
}

.attendance-details summary::-webkit-details-marker { display: none; }

.attendance-arrow {
  transition: transform 0.25s ease;
  transform: rotate(-90deg);
}

.attendance-details[open] .attendance-arrow {
  transform: rotate(0deg);
}

.attendance-details .attendance-table {
  margin-top: var(--hstp);
}

.attendance-table {
  table-layout: fixed;
}

.attendance-table th:nth-child(1) { width: 10rem; }
.attendance-table th:nth-child(2) { width: 6rem; }
.attendance-table th:nth-child(3) { width: 6rem; }

.attendance-table tr.att-warning td:last-child { color: #e65100; }
.attendance-table tr.att-danger td:last-child { color: #c62828; font-weight: 600; }
