.icon-btn {
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  color: var(--navy);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--navy);
  border-radius: 10px;
  min-height: 38px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}
.btn.primary { background: var(--green); border-color: var(--green); color: #fff; }
.btn.primary:hover { background: var(--green-hover); }
.btn.subtle { background: var(--bg); }
.btn.danger { color: var(--error); border-color: #f5c9cc; background: #fff7f7; }
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card-header {
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.card-title { margin: 0; font-size: 1rem; font-weight: 800; }
.card-body { padding: 18px; }
.kpi-card {
  padding: 18px;
  min-height: 138px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.kpi-top { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 0.86rem; }
.kpi-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #DDF8E5;
  color: var(--green);
  display: grid;
  place-items: center;
}
.grid-6 .kpi-card:nth-child(1),
.grid-4 .kpi-card:nth-child(1) { background: #FFE1E8; }
.grid-6 .kpi-card:nth-child(2),
.grid-4 .kpi-card:nth-child(2) { background: #FFF3DC; }
.grid-6 .kpi-card:nth-child(3),
.grid-4 .kpi-card:nth-child(3) { background: #DDF8E5; }
.grid-6 .kpi-card:nth-child(4),
.grid-4 .kpi-card:nth-child(4) { background: #EFE2FF; }
.grid-6 .kpi-card:nth-child(5) { background: #E8F5FF; }
.grid-6 .kpi-card:nth-child(6) { background: #F0F7DD; }
.grid-6 .kpi-card:nth-child(1) .kpi-icon,
.grid-4 .kpi-card:nth-child(1) .kpi-icon { background: #FF5A86; color: #fff; }
.grid-6 .kpi-card:nth-child(2) .kpi-icon,
.grid-4 .kpi-card:nth-child(2) .kpi-icon { background: #FF8D6B; color: #fff; }
.grid-6 .kpi-card:nth-child(3) .kpi-icon,
.grid-4 .kpi-card:nth-child(3) .kpi-icon { background: #35D353; color: #fff; }
.grid-6 .kpi-card:nth-child(4) .kpi-icon,
.grid-4 .kpi-card:nth-child(4) .kpi-icon { background: #AA6BFF; color: #fff; }
.kpi-value { font-size: 1.82rem; font-weight: 850; margin-top: 12px; }
.kpi-sub { color: var(--muted); font-size: 0.82rem; margin-top: 4px; }
.filter-card {
  padding: 14px;
  overflow-x: hidden;
}
.compact-filter { padding: 12px 14px; }
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
  overflow-x: hidden;
  padding-bottom: 2px;
}
.filters .field {
  flex: 1 1 150px;
  min-width: 140px;
}
.filters .toolbar-actions {
  flex: 0 1 auto;
  align-self: end;
  flex-wrap: wrap;
}
.filters .toolbar-actions .btn {
  white-space: nowrap;
}
.modal .filters,
.with-panel .filters {
  flex-wrap: wrap;
  overflow-x: visible;
}
.modal .filters .field,
.with-panel .filters .field {
  flex: 1 1 220px;
}
.field label { display: block; color: var(--muted); font-size: 0.78rem; font-weight: 700; margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--navy);
  background: #fff;
  padding: 8px 10px;
}
.field textarea { min-height: 72px; resize: vertical; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.toolbar-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.select-pill {
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  padding: 8px 12px;
  color: var(--navy);
  min-height: 38px;
}
.notification { position: relative; }
.badge-dot {
  position: absolute;
  top: 6px;
  right: 7px;
  min-width: 16px;
  height: 16px;
  border-radius: 999px;
  background: var(--error);
  color: #fff;
  font-size: 0.62rem;
  display: grid;
  place-items: center;
  border: 2px solid #fff;
}
.user-menu { position: relative; }
.user-trigger { min-width: 156px; justify-content: flex-start; }
.avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
}
.user-meta { line-height: 1.1; }
.user-meta strong { display: block; font-size: 0.86rem; }
.user-meta span { color: var(--muted); font-size: 0.72rem; }
.dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 190px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 6px;
}
.dropdown.open { display: block; }
.dropdown button { width: 100%; text-align: left; border: 0; background: #fff; padding: 10px; border-radius: 8px; color: var(--navy); }
.dropdown button:hover { background: var(--bg); }
.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.74rem;
}
.status-pass, .status-present, .status-success { background: var(--light-green); color: var(--green); }
.status-fail, .status-absent, .status-error { background: var(--light-red); color: var(--error); }
.status-late, .status-warning { background: var(--light-orange); color: #9a5b00; }
.status-leave, .status-info { background: var(--light-purple); color: #6931a3; }
.status-unmarked { background: #F1F4F8; color: var(--muted); }
.status-incomplete, .status-not-applicable, .status-withheld { background: #F1F4F8; color: var(--muted); }
.segmented { display: inline-grid; grid-template-columns: repeat(4, 1fr); gap: 4px; border: 1px solid var(--border); padding: 4px; border-radius: 10px; background: var(--bg); min-width: 292px; }
.segmented button { border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-size: 0.76rem; font-weight: 800; min-height: 30px; }
.segmented button.active[data-status="Present"] { background: var(--green); color: #fff; }
.segmented button.active[data-status="Absent"] { background: var(--error); color: #fff; }
.segmented button.active[data-status="Late"] { background: var(--warning); color: #fff; }
.segmented button.active[data-status="Leave"] { background: #7c3fbd; color: #fff; }
.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  background: var(--navy);
  color: #fff;
  padding: 12px 14px;
  border-radius: 10px;
  box-shadow: var(--shadow);
  transform: translateY(20px);
  opacity: 0;
  pointer-events: none;
  transition: 0.2s ease;
  z-index: 80;
}
.toast.show { transform: translateY(0); opacity: 1; }
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(11,13,84,0.36);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 70;
  padding: 20px;
}
.modal-backdrop.open { display: flex; }
.modal { width: min(560px, 100%); background: #fff; border-radius: 14px; border: 1px solid var(--border); box-shadow: var(--shadow); }
.modal footer { padding: 14px 18px; display: flex; justify-content: flex-end; gap: 8px; border-top: 1px solid var(--border); }
.chart-box { height: 310px; position: relative; }
.mini-list { display: grid; gap: 10px; }
.activity-item { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); color: var(--muted); }
.activity-item:last-child { border-bottom: 0; }
.activity-icon { width: 30px; height: 30px; border-radius: 8px; background: var(--light-green); color: var(--green); display: grid; place-items: center; flex: 0 0 auto; }

/* Enterprise cleanup: calmer surfaces, clearer hierarchy, less visual noise. */
.content {
  display: grid;
  gap: 22px;
}
.page-grid,
.attendance-dashboard,
.results-dashboard,
.attendance-page {
  gap: 22px;
}
.card {
  box-shadow: 0 8px 24px rgba(17, 24, 39, 0.045);
}
.card-header {
  padding: 18px 22px;
  background: #fff;
}
.card-body {
  padding: 22px;
}
.filter-card {
  padding: 18px;
}
.filters {
  gap: 12px;
}
.field label {
  font-size: 0.74rem;
  font-weight: 800;
}
.field input,
.field select,
.field textarea {
  min-height: 40px;
}
.grid-6 .kpi-card,
.grid-4 .kpi-card {
  background: #fff !important;
  min-height: 118px;
  border-left: 4px solid var(--green);
}
.grid-6 .kpi-card:nth-child(2),
.grid-4 .kpi-card:nth-child(2) { border-left-color: var(--accent-green); }
.grid-6 .kpi-card:nth-child(3),
.grid-4 .kpi-card:nth-child(3) { border-left-color: #F59E0B; }
.grid-6 .kpi-card:nth-child(4),
.grid-4 .kpi-card:nth-child(4) { border-left-color: #AA6BFF; }
.grid-6 .kpi-card:nth-child(5) { border-left-color: #0EA5E9; }
.grid-6 .kpi-card:nth-child(6) { border-left-color: #172033; }
.grid-6 .kpi-card .kpi-icon,
.grid-4 .kpi-card .kpi-icon {
  background: #F4F7FA !important;
  color: var(--green) !important;
}
.kpi-value {
  font-size: 1.62rem;
}
.chart-box {
  height: 280px;
}
.summary-strip .summary-item {
  background: #fff !important;
  border: 1px solid var(--border);
  border-left: 4px solid var(--green);
  box-shadow: none;
}
.activity-item {
  padding: 12px 0;
}
