/* Attendance workspace polish — scoped to the extra-class attendance dialog. */

/* Shared visual language: one typography scale, restrained pastel surfaces, strong semantic accents. */
html body .attendance-shell {
  --att-type-title: 20px;
  --att-type-tab: 15px;
  --att-type-view-title: 22px;
  --att-type-section: 14px;
  --att-type-body: 13px;
  --att-type-label: 10px;
  --att-type-meta: 11px;
  --att-type-chip: 11px;
  --att-type-metric: 28px;

  --att-polish-quick: #f4f7ff;
  --att-polish-calendar: #f8f6ff;
  --att-polish-manage: #f3faf8;
  --att-polish-history: #f5f7fb;
  --att-polish-report: #f7f7fc;

  --att-gifted-bg: #eef3ff;
  --att-gifted-bg-selected: #dfe9ff;
  --att-gifted-accent: #4e6fc4;
  --att-remedial-bg: #fff3e7;
  --att-remedial-bg-selected: #ffe5cc;
  --att-remedial-accent: #c87924;

  --att-palette-blue: #eef3ff;
  --att-palette-blue-accent: #5274c8;
  --att-palette-green: #eaf8f0;
  --att-palette-green-accent: #438b66;
  --att-palette-rose: #fff0f4;
  --att-palette-rose-accent: #b85f7c;
  --att-palette-amber: #fff5df;
  --att-palette-amber-accent: #b9852e;

  font-size: var(--att-type-body) !important;
}

/* ---------- Typography ---------- */
html body .attendance-shell .attendance-title strong {
  font-size: var(--att-type-title) !important;
  font-weight: 750 !important;
  line-height: 1.2 !important;
  letter-spacing: -0.015em !important;
}

html body .attendance-shell .attendance-title small {
  font-size: var(--att-type-label) !important;
  font-weight: 850 !important;
  line-height: 1.2 !important;
  letter-spacing: .09em !important;
}

html body .attendance-shell .attendance-tabs button {
  font-size: var(--att-type-tab) !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
}

html body .attendance-shell .attendance-class-list > header strong,
html body .attendance-shell .attendance-calendar-toolbar strong,
html body .attendance-shell .attendance-manage-classes > header strong,
html body .attendance-shell .attendance-history-list > header strong,
html body .attendance-shell .att-report-m3__section-head h3 {
  font-size: var(--att-type-section) !important;
  font-weight: 750 !important;
  line-height: 1.25 !important;
}

html body .attendance-shell .attendance-rollcall-head h2,
html body .attendance-shell .attendance-member-manager > header h2,
html body .attendance-shell .att-report-m3__toolbar h2 {
  font-size: var(--att-type-view-title) !important;
  font-weight: 760 !important;
  line-height: 1.2 !important;
  letter-spacing: -0.02em !important;
}

html body .attendance-shell input,
html body .attendance-shell select,
html body .attendance-shell textarea,
html body .attendance-shell button,
html body .attendance-shell .attendance-day-open,
html body .attendance-shell .attendance-day-lock {
  font-size: var(--att-type-body) !important;
}

html body .attendance-shell .att-m3-class-search input {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  height: 40px !important;
  padding: 0 13px !important;
  border: 1px solid transparent !important;
  border-radius: 13px !important;
  background: #fff !important;
  color: var(--att-m3-on-surface, #1b1b20) !important;
  box-shadow: inset 0 0 0 1px rgba(69, 70, 79, .08) !important;
  font-size: var(--att-type-body) !important;
  font-weight: 600 !important;
}

html body .attendance-shell .attendance-session-controls label > span,
html body .attendance-shell .att-m3-period-field > span,
html body .attendance-shell .att-m3-class-search > span,
html body .attendance-shell .attendance-confirm-bar label > span,
html body .attendance-shell .attendance-add-student label > span,
html body .attendance-shell .att-report-m3__filters label span,
html body .attendance-shell .att-report-m3__export-meta label span,
html body .attendance-shell .attendance-teacher-field > label {
  font-size: var(--att-type-label) !important;
  font-weight: 850 !important;
  line-height: 1.2 !important;
  letter-spacing: .06em !important;
  text-transform: uppercase !important;
}

html body .attendance-shell .att-m3-subject-hub button {
  font-size: var(--att-type-chip) !important;
  font-weight: 750 !important;
  line-height: 1.2 !important;
}

html body .attendance-shell .attendance-room-chip,
html body .attendance-shell .att-m3-status-chip,
html body .attendance-shell .att-m3-period-chip,
html body .attendance-shell .att-m3-reason-chips button,
html body .attendance-shell .att-m3-period-segment button,
html body .attendance-shell .att-report-m3__status,
html body .attendance-shell .att-report-m3__mode button,
html body .attendance-shell .att-report-m3__export button {
  font-size: var(--att-type-chip) !important;
  font-weight: 750 !important;
}

html body .attendance-shell .attendance-class-name-row > b,
html body .attendance-shell .attendance-manage-classes > button > b,
html body .attendance-shell .attendance-history-list > div > button > div > b,
html body .attendance-shell .att-report-m3__teacher-grid strong {
  font-size: var(--att-type-body) !important;
  font-weight: 760 !important;
  line-height: 1.28 !important;
}

html body .attendance-shell .attendance-class-list button small,
html body .attendance-shell .attendance-class-list button em,
html body .attendance-shell .attendance-class-list button time,
html body .attendance-shell .attendance-manage-classes button small,
html body .attendance-shell .attendance-history-list button small,
html body .attendance-shell .attendance-history-list button time,
html body .attendance-shell .attendance-calendar-day small,
html body .attendance-shell .attendance-calendar-day em,
html body .attendance-shell .attendance-rollcall-head p,
html body .attendance-shell .attendance-member-manager > header p,
html body .attendance-shell .att-report-m3__toolbar p,
html body .attendance-shell .att-report-m3__section-head p,
html body .attendance-shell .att-report-m3__teacher-grid span,
html body .attendance-shell .att-report-m3__teacher-grid small,
html body .attendance-shell .att-report-m3__metrics article small {
  font-size: var(--att-type-meta) !important;
  line-height: 1.35 !important;
}

html body .attendance-shell .attendance-class-list > header span,
html body .attendance-shell .attendance-manage-classes > header span,
html body .attendance-shell .attendance-history-list > header span,
html body .attendance-shell .attendance-calendar-weekdays span,
html body .attendance-shell .att-report-m3__metrics article span,
html body .attendance-shell .att-report-m3__eyebrow {
  font-size: var(--att-type-label) !important;
}

html body .attendance-shell .att-report-m3__metrics article b {
  font-size: var(--att-type-metric) !important;
  line-height: 1 !important;
}

html body .attendance-shell .att-report-m3 th {
  font-size: var(--att-type-label) !important;
}

html body .attendance-shell .att-report-m3 td {
  font-size: var(--att-type-meta) !important;
  line-height: 1.4 !important;
}

/* ---------- Quick attendance ---------- */
html body .attendance-shell .attendance-quick-layout,
html body .attendance-shell .attendance-history-layout {
  gap: 12px !important;
  padding: 16px !important;
  box-sizing: border-box !important;
}

html body .attendance-shell .attendance-quick-layout {
  background: var(--att-polish-quick) !important;
}

html body .attendance-shell .attendance-class-list {
  grid-template-rows: auto auto minmax(0, 1fr) !important;
  min-height: 0 !important;
  overflow: hidden !important;
  border: 1px solid #dde5f2 !important;
  border-radius: 22px !important;
  background: #fff !important;
  box-shadow: 0 5px 18px rgba(49, 67, 96, .08) !important;
}

html body .attendance-shell .att-m3-class-discovery {
  min-height: 98px !important;
  flex-shrink: 0 !important;
  margin: 0 10px 8px !important;
  padding: 10px 10px 9px !important;
  overflow: visible !important;
  border: 1px solid #dbe4f4 !important;
  border-radius: 16px !important;
  background: #f1f5fd !important;
}

html body .attendance-shell .att-m3-class-search {
  display: grid !important;
  gap: 6px !important;
  padding: 0 0 8px !important;
}

html body .attendance-shell .att-m3-class-search input:focus {
  outline: none !important;
  border-color: var(--att-m3-primary, #3f5f90) !important;
  box-shadow: 0 0 0 2px rgba(63, 95, 144, .14) !important;
}

html body .attendance-shell .att-m3-subject-hub {
  display: flex !important;
  gap: 6px !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  padding: 0 0 2px !important;
  min-height: 32px !important;
}

html body .attendance-shell .attendance-class-list > div:last-child {
  min-height: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding: 2px 6px 8px !important;
}

html body .attendance-shell .attendance-class-list > div:last-child > button {
  margin: 4px 2px !important;
  border: 1px solid transparent !important;
  border-radius: 15px !important;
  box-shadow: 0 2px 7px rgba(39, 53, 79, .045) !important;
  transition: background .16s ease, border-color .16s ease, box-shadow .16s ease, transform .16s ease !important;
}

html body .attendance-shell .attendance-class-list > div:last-child > button:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 5px 12px rgba(39, 53, 79, .09) !important;
}

html body .attendance-shell .attendance-class-list > div:last-child > button:has(.attendance-type-dot.is-gifted) {
  background: linear-gradient(90deg, var(--att-gifted-bg), #f8faff 78%) !important;
  border-left: 4px solid var(--att-gifted-accent) !important;
}

html body .attendance-shell .attendance-class-list > div:last-child > button:has(.attendance-type-dot.is-remedial) {
  background: linear-gradient(90deg, var(--att-remedial-bg), #fffaf5 78%) !important;
  border-left: 4px solid var(--att-remedial-accent) !important;
}

html body .attendance-shell .attendance-class-list > div:last-child > button.is-selected:has(.attendance-type-dot.is-gifted) {
  background: var(--att-gifted-bg-selected) !important;
  border-color: #9fb6ea !important;
  border-left-color: var(--att-gifted-accent) !important;
  box-shadow: 0 0 0 2px rgba(78, 111, 196, .14), 0 5px 14px rgba(49, 67, 96, .10) !important;
}

html body .attendance-shell .attendance-class-list > div:last-child > button.is-selected:has(.attendance-type-dot.is-remedial) {
  background: var(--att-remedial-bg-selected) !important;
  border-color: #e8b87d !important;
  border-left-color: var(--att-remedial-accent) !important;
  box-shadow: 0 0 0 2px rgba(200, 121, 36, .13), 0 5px 14px rgba(86, 62, 32, .09) !important;
}

html body .attendance-shell .attendance-rollcall {
  border: 1px solid #dde5f2 !important;
  border-radius: 22px !important;
  overflow: hidden !important;
  background: linear-gradient(180deg, #fbfdff 0%, #ffffff 45%) !important;
  box-shadow: 0 5px 18px rgba(49, 67, 96, .08) !important;
}

/* ---------- Calendar ---------- */
html body .attendance-shell .attendance-calendar-layout {
  gap: 10px !important;
  padding: 16px !important;
  background: var(--att-polish-calendar) !important;
}

html body .attendance-shell .attendance-calendar-toolbar {
  border: 1px solid #e1ddf2 !important;
  border-radius: 20px !important;
  background: linear-gradient(135deg, #ffffff 0%, #f4f0ff 100%) !important;
  box-shadow: 0 5px 16px rgba(66, 54, 105, .075) !important;
}

html body .attendance-shell .attendance-calendar-weekdays {
  overflow: hidden !important;
  border: 1px solid #e2dff0 !important;
  border-radius: 14px !important;
  background: #f4f1fb !important;
  box-shadow: 0 2px 8px rgba(55, 47, 84, .05) !important;
}

html body .attendance-shell .attendance-calendar-weekdays span {
  border-right: 0 !important;
  color: #59667c !important;
  font-weight: 800 !important;
}

html body .attendance-shell .attendance-calendar-grid {
  gap: 8px !important;
  padding: 2px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
}

html body .attendance-shell .attendance-calendar-day {
  border: 1px solid #dcd9e8 !important;
  border-radius: 14px !important;
  background: #fbfaff !important;
  box-shadow: 0 2px 7px rgba(45, 39, 72, .055) !important;
  overflow: hidden !important;
}

html body .attendance-shell .attendance-calendar-day:not(.is-confirmed):not(.is-blank):nth-child(7n+6),
html body .attendance-shell .attendance-calendar-day:not(.is-confirmed):not(.is-blank):nth-child(7n+7) {
  background: #fff8f2 !important;
  border-color: #f0ddcc !important;
}

html body .attendance-shell .attendance-calendar-day.is-blank {
  border-color: rgba(118, 119, 127, .10) !important;
  background: rgba(248, 247, 252, .58) !important;
  box-shadow: none !important;
}

html body .attendance-shell .attendance-calendar-day.is-confirmed:not(.is-cancelled) {
  border-color: #a8d9ba !important;
  background: #eaf8ef !important;
}

html body .attendance-shell .attendance-calendar-day.is-cancelled {
  border-color: #efc689 !important;
  background: #fff1dd !important;
}

html body .attendance-shell .attendance-calendar-day.is-today {
  outline: 2px solid #5377c6 !important;
  outline-offset: 1px !important;
}

/* ---------- Class management ---------- */
html body .attendance-shell .attendance-manage-layout {
  gap: 14px !important;
  padding: 16px !important;
  background: var(--att-polish-manage) !important;
}

html body .attendance-shell .attendance-management-grid {
  gap: 12px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
}

html body .attendance-shell .attendance-manage-classes,
html body .attendance-shell .attendance-member-manager,
html body .attendance-shell .attendance-import-card,
html body .attendance-shell .attendance-import-report {
  border: 1px solid #dce9e4 !important;
  border-radius: 20px !important;
  background: #fff !important;
  box-shadow: 0 5px 16px rgba(42, 78, 67, .07) !important;
}

html body .attendance-shell .attendance-import-card {
  background: linear-gradient(135deg, #ffffff 0%, #edf9f5 100%) !important;
}

html body .attendance-shell .attendance-manage-classes {
  overflow: auto !important;
  padding-bottom: 7px !important;
}

html body .attendance-shell .attendance-manage-classes > button {
  margin: 4px 7px !important;
  border: 1px solid transparent !important;
  border-radius: 14px !important;
  box-shadow: 0 2px 6px rgba(45, 65, 61, .045) !important;
}

html body .attendance-shell .attendance-manage-classes > button:nth-of-type(4n+1) {
  background: var(--att-palette-blue) !important;
  border-left: 4px solid var(--att-palette-blue-accent) !important;
}

html body .attendance-shell .attendance-manage-classes > button:nth-of-type(4n+2) {
  background: var(--att-palette-green) !important;
  border-left: 4px solid var(--att-palette-green-accent) !important;
}

html body .attendance-shell .attendance-manage-classes > button:nth-of-type(4n+3) {
  background: var(--att-palette-rose) !important;
  border-left: 4px solid var(--att-palette-rose-accent) !important;
}

html body .attendance-shell .attendance-manage-classes > button:nth-of-type(4n+4) {
  background: var(--att-palette-amber) !important;
  border-left: 4px solid var(--att-palette-amber-accent) !important;
}

html body .attendance-shell .attendance-manage-classes > button.is-selected {
  border-color: #91aadb !important;
  box-shadow: 0 0 0 2px rgba(82, 116, 200, .13), 0 4px 11px rgba(45, 65, 61, .08) !important;
  filter: saturate(1.08) !important;
}

html body .attendance-shell .attendance-member-manager {
  background: linear-gradient(180deg, #ffffff 0%, #fbfffd 100%) !important;
}

/* ---------- History ---------- */
html body .attendance-shell .attendance-history-layout {
  gap: 14px !important;
  padding: 16px !important;
  grid-template-columns: minmax(310px, 29%) minmax(0, 1fr) !important;
  background: linear-gradient(135deg, #f5f7fb 0%, #f7f8fc 100%) !important;
}

html body .attendance-shell .attendance-history-list,
html body .attendance-shell .attendance-history-detail {
  min-width: 0 !important;
  border: 1px solid #dfe5ef !important;
  border-radius: 22px !important;
  background: #fff !important;
  box-shadow: 0 7px 22px rgba(48, 59, 79, .075) !important;
}

html body .attendance-shell .attendance-history-list {
  display: grid !important;
  grid-template-rows: auto minmax(0, 1fr) !important;
  overflow: hidden !important;
}

html body .attendance-shell .attendance-history-list-head {
  display: grid !important;
  gap: 10px !important;
  padding: 15px 15px 13px !important;
  border-bottom: 1px solid #e6eaf1 !important;
  background: linear-gradient(180deg, #ffffff 0%, #fafbfe 100%) !important;
}

html body .attendance-shell .attendance-history-list-title {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 10px !important;
}

html body .attendance-shell .attendance-history-list-title > div {
  min-width: 0 !important;
}

html body .attendance-shell .attendance-history-list-title strong {
  display: block !important;
  font-size: 15px !important;
  font-weight: 800 !important;
  color: #1d2735 !important;
}

html body .attendance-shell .attendance-history-list-title p {
  margin: 3px 0 0 !important;
  color: #78869a !important;
  font-size: 10.5px !important;
  line-height: 1.35 !important;
}

html body .attendance-shell .attendance-history-list-title > span {
  flex: 0 0 auto !important;
  padding: 5px 8px !important;
  border-radius: 999px !important;
  background: #edf2fb !important;
  color: #50627d !important;
  font-size: 10px !important;
  font-weight: 800 !important;
}

html body .attendance-shell .attendance-history-search {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  min-height: 40px !important;
  padding: 0 11px !important;
  border: 1px solid #dbe3ef !important;
  border-radius: 13px !important;
  background: #f9fbff !important;
  color: #64758d !important;
  box-shadow: inset 0 1px 2px rgba(42, 55, 79, .025) !important;
}

html body .attendance-shell .attendance-history-search input {
  width: 100% !important;
  min-width: 0 !important;
  height: 38px !important;
  padding: 0 !important;
  border: 0 !important;
  outline: 0 !important;
  background: transparent !important;
  color: #243247 !important;
  font-size: 11.5px !important;
  font-weight: 600 !important;
}

html body .attendance-shell .attendance-history-search:focus-within {
  border-color: #88a5dc !important;
  box-shadow: 0 0 0 3px rgba(82, 116, 200, .10) !important;
}

html body .attendance-shell .attendance-history-filters {
  display: flex !important;
  gap: 8px !important;
}

html body .attendance-shell .attendance-history-filters select {
  width: 100% !important;
  height: 36px !important;
  border: 1px solid #dce4ef !important;
  border-radius: 12px !important;
  background: #fff !important;
  color: #40516a !important;
  padding: 0 10px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
}

html body .attendance-shell .attendance-history-items {
  min-height: 0 !important;
  overflow-y: auto !important;
  padding: 7px !important;
  background: #fbfcff !important;
}

html body .attendance-shell .attendance-history-list > div > button,
html body .attendance-shell .attendance-history-items > button {
  width: calc(100% - 4px) !important;
  min-height: 78px !important;
  margin: 4px 2px !important;
  padding: 10px 10px 10px 12px !important;
  border: 1px solid transparent !important;
  border-radius: 15px !important;
  box-shadow: 0 2px 7px rgba(39, 53, 79, .04) !important;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease !important;
}

html body .attendance-shell .attendance-history-items > button:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 5px 13px rgba(39, 53, 79, .08) !important;
}

html body .attendance-shell .attendance-history-list > div > button:has(.attendance-type-dot.is-gifted),
html body .attendance-shell .attendance-history-items > button:has(.attendance-type-dot.is-gifted) {
  background: linear-gradient(90deg, var(--att-gifted-bg), #fbfcff 88%) !important;
  border-left: 4px solid var(--att-gifted-accent) !important;
}

html body .attendance-shell .attendance-history-list > div > button:has(.attendance-type-dot.is-remedial),
html body .attendance-shell .attendance-history-items > button:has(.attendance-type-dot.is-remedial) {
  background: linear-gradient(90deg, var(--att-remedial-bg), #fffaf6 88%) !important;
  border-left: 4px solid var(--att-remedial-accent) !important;
}

html body .attendance-shell .attendance-history-list > div > button.is-selected,
html body .attendance-shell .attendance-history-items > button.is-selected {
  border-color: #9fb3dc !important;
  box-shadow: 0 0 0 2px rgba(75, 101, 153, .11), 0 5px 12px rgba(51, 68, 98, .07) !important;
}

html body .attendance-shell .attendance-history-card-copy {
  min-width: 0 !important;
  display: grid !important;
  gap: 3px !important;
  text-align: left !important;
}

html body .attendance-shell .attendance-history-card-title {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  min-width: 0 !important;
}

html body .attendance-shell .attendance-history-card-title b {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  color: #1f2938 !important;
  font-size: 12px !important;
  font-weight: 800 !important;
}

html body .attendance-shell .attendance-history-type {
  display: inline-flex !important;
  align-items: center !important;
  width: max-content !important;
  max-width: 100% !important;
  padding: 4px 7px !important;
  border-radius: 999px !important;
  font-size: 9px !important;
  font-weight: 850 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

html body .attendance-shell .attendance-history-type.is-gifted {
  background: #dfe9ff !important;
  color: #3f62b7 !important;
}

html body .attendance-shell .attendance-history-type.is-remedial {
  background: #ffe7ce !important;
  color: #ae651e !important;
}

html body .attendance-shell .attendance-history-card-copy small,
html body .attendance-shell .attendance-history-card-copy time {
  color: #6f7e93 !important;
  font-size: 9.8px !important;
  font-style: normal !important;
  line-height: 1.32 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

html body .attendance-shell .attendance-history-count {
  align-self: center !important;
  display: grid !important;
  justify-items: end !important;
  gap: 2px !important;
  min-width: 47px !important;
}

html body .attendance-shell .attendance-history-count b {
  font-size: 12px !important;
  font-weight: 850 !important;
  color: #16835d !important;
}

html body .attendance-shell .attendance-history-count em {
  font-size: 9px !important;
  font-style: normal !important;
  font-weight: 750 !important;
  color: #d04d49 !important;
}

html body .attendance-shell .attendance-history-count i {
  margin-top: 2px !important;
  padding: 3px 6px !important;
  border-radius: 999px !important;
  background: #dcf6e8 !important;
  color: #16835d !important;
  font-size: 9px !important;
  font-style: normal !important;
  font-weight: 850 !important;
}

html body .attendance-shell .attendance-history-detail {
  overflow: auto !important;
  padding: 18px !important;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%) !important;
}

html body .attendance-shell .attendance-history-hero {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 18px !important;
  padding: 17px 18px !important;
  border: 1px solid #dfe7f3 !important;
  border-radius: 20px !important;
  background: linear-gradient(135deg, #f9fbff 0%, #eef4ff 62%, #f8fbff 100%) !important;
  box-shadow: 0 5px 15px rgba(55, 75, 111, .065) !important;
}

html body .attendance-shell .attendance-history-hero-copy {
  min-width: 0 !important;
  display: grid !important;
  gap: 7px !important;
}

html body .attendance-shell .attendance-history-hero-copy h2 {
  margin: 0 !important;
  color: #172235 !important;
  font-size: 23px !important;
  font-weight: 820 !important;
  letter-spacing: -.025em !important;
  line-height: 1.15 !important;
}

html body .attendance-shell .attendance-history-hero-chips {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 6px !important;
}

html body .attendance-shell .attendance-history-hero-chips > span:not(.attendance-history-type):not(.att-m3-period-chip) {
  display: inline-flex !important;
  align-items: center !important;
  min-height: 25px !important;
  padding: 0 8px !important;
  border-radius: 999px !important;
  background: #edf2fa !important;
  color: #5f7089 !important;
  font-size: 10px !important;
  font-weight: 750 !important;
}

html body .attendance-shell .attendance-history-actions {
  flex: 0 0 auto !important;
  display: flex !important;
  gap: 8px !important;
  flex-wrap: wrap !important;
  justify-content: flex-end !important;
}

html body .attendance-shell .attendance-history-actions button {
  min-height: 38px !important;
  padding: 0 13px !important;
  border-radius: 12px !important;
  font-size: 10.5px !important;
  font-weight: 800 !important;
}

html body .attendance-shell .attendance-history-report-button {
  border: 1px solid #c8d8f4 !important;
  background: #eaf2ff !important;
  color: #315fae !important;
}

html body .attendance-shell .attendance-history-delete-button {
  border: 1px solid #f0c7c7 !important;
  background: #fff3f3 !important;
  color: #b53b3b !important;
}

html body .attendance-shell .attendance-history-info-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 9px !important;
  margin-top: 12px !important;
}

html body .attendance-shell .attendance-history-info-grid article {
  min-width: 0 !important;
  min-height: 67px !important;
  display: grid !important;
  align-content: center !important;
  gap: 5px !important;
  padding: 11px 13px !important;
  border: 1px solid #dfe6f0 !important;
  border-radius: 14px !important;
  background: #fbfcff !important;
}

html body .attendance-shell .attendance-history-info-grid article:nth-child(3n+1) {
  background: #f5f8ff !important;
}

html body .attendance-shell .attendance-history-info-grid article:nth-child(3n+2) {
  background: #f5fbf8 !important;
}

html body .attendance-shell .attendance-history-info-grid article:nth-child(3n+3) {
  background: #faf8ff !important;
}

html body .attendance-shell .attendance-history-info-grid span {
  color: #7a879a !important;
  font-size: 9px !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  letter-spacing: .045em !important;
}

html body .attendance-shell .attendance-history-info-grid b {
  overflow: hidden !important;
  color: #243247 !important;
  font-size: 12px !important;
  font-weight: 780 !important;
  line-height: 1.25 !important;
  text-overflow: ellipsis !important;
}

html body .attendance-shell .attendance-history-stat-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 9px !important;
  margin-top: 12px !important;
}

html body .attendance-shell .attendance-history-stat-grid article {
  min-height: 72px !important;
  display: grid !important;
  place-content: center !important;
  gap: 5px !important;
  border: 1px solid #dfe6f0 !important;
  border-radius: 14px !important;
  background: #f7f9fc !important;
  text-align: center !important;
}

html body .attendance-shell .attendance-history-stat-grid article.is-present {
  border-color: #cfe8da !important;
  background: #eff9f3 !important;
}

html body .attendance-shell .attendance-history-stat-grid article.is-absent {
  border-color: #f1d4d4 !important;
  background: #fff6f6 !important;
}

html body .attendance-shell .attendance-history-stat-grid b {
  color: #263349 !important;
  font-size: 23px !important;
  font-weight: 850 !important;
  line-height: 1 !important;
}

html body .attendance-shell .attendance-history-stat-grid span {
  color: #77859a !important;
  font-size: 9.5px !important;
  font-weight: 750 !important;
}

html body .attendance-shell .attendance-history-rate-card {
  border-color: #bfe4ce !important;
  background: linear-gradient(135deg, #eaf8f0 0%, #f4fbf7 100%) !important;
}

html body .attendance-shell .attendance-history-rate-card b {
  color: #16835d !important;
}

html body .attendance-shell .attendance-history-absent-section {
  margin-top: 12px !important;
  padding: 14px !important;
  border: 1px solid #e0e6ef !important;
  border-radius: 18px !important;
  background: #fff !important;
}

html body .attendance-shell .attendance-history-absent-section > header {
  margin-bottom: 10px !important;
}

html body .attendance-shell .attendance-history-absent-section > header > div {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
}

html body .attendance-shell .attendance-history-absent-section > header strong {
  color: #253247 !important;
  font-size: 12.5px !important;
  font-weight: 800 !important;
}

html body .attendance-shell .attendance-history-absent-section > header span {
  padding: 4px 7px !important;
  border-radius: 999px !important;
  background: #f0f3f8 !important;
  color: #6d7c91 !important;
  font-size: 9px !important;
  font-weight: 800 !important;
}

html body .attendance-shell .attendance-history-all-present {
  min-height: 76px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 11px !important;
  padding: 13px !important;
  border: 1px solid #cce8d8 !important;
  border-radius: 14px !important;
  background: linear-gradient(135deg, #eaf8f0 0%, #f2fbf6 100%) !important;
  color: #19805d !important;
  text-align: left !important;
}

html body .attendance-shell .attendance-history-all-present b {
  display: block !important;
  color: #187455 !important;
  font-size: 12px !important;
  font-weight: 820 !important;
}

html body .attendance-shell .attendance-history-all-present span {
  display: block !important;
  margin-top: 3px !important;
  color: #5f8e7b !important;
  font-size: 10px !important;
}

html body .attendance-shell .attendance-history-absent-section .attendance-absent-list {
  display: grid !important;
  gap: 6px !important;
}

html body .attendance-shell .attendance-history-absent-section .attendance-absent-list > div {
  min-height: 48px !important;
  display: grid !important;
  grid-template-columns: 28px minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 9px !important;
  padding: 8px 10px !important;
  border: 1px solid #f0dddd !important;
  border-radius: 12px !important;
  background: #fff9f9 !important;
}

html body .attendance-shell .attendance-history-footer-grid {
  display: grid !important;
  grid-template-columns: minmax(0, 1.5fr) minmax(230px, .75fr) !important;
  gap: 10px !important;
  margin-top: 12px !important;
}

html body .attendance-shell .attendance-history-note,
html body .attendance-shell .attendance-history-lock {
  min-width: 0 !important;
  padding: 13px 14px !important;
  border: 1px solid #e0e6ef !important;
  border-radius: 16px !important;
  background: #fbfcff !important;
}

html body .attendance-shell .attendance-history-note {
  background: linear-gradient(135deg, #fbfcff 0%, #f5f8ff 100%) !important;
}

html body .attendance-shell .attendance-history-note strong,
html body .attendance-shell .attendance-history-lock strong {
  display: block !important;
  margin-bottom: 7px !important;
  color: #2b374b !important;
  font-size: 11.5px !important;
  font-weight: 820 !important;
}

html body .attendance-shell .attendance-history-note p {
  margin: 0 !important;
  color: #697991 !important;
  font-size: 10.5px !important;
  line-height: 1.45 !important;
}

html body .attendance-shell .attendance-history-lock {
  background: linear-gradient(135deg, #f8f9fc 0%, #f2f5f9 100%) !important;
}

html body .attendance-shell .attendance-history-lock > div {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
  padding: 5px 0 !important;
}

html body .attendance-shell .attendance-history-lock span {
  color: #7b889a !important;
  font-size: 9.5px !important;
}

html body .attendance-shell .attendance-history-lock b {
  color: #334159 !important;
  font-size: 9.8px !important;
  font-weight: 780 !important;
  text-align: right !important;
}

html body .attendance-shell .attendance-history-detail .att-m3-cancel-reason {
  margin-top: 12px !important;
  border-radius: 16px !important;
  border: 1px solid #f0d2a8 !important;
  background: #fff6e8 !important;
}

/* ---------- Report ---------- */
html body .attendance-shell .att-report-m3 {
  background: var(--att-polish-report) !important;
}

html body .attendance-shell .att-report-m3__toolbar {
  border: 1px solid #dfe3f0 !important;
  background: linear-gradient(135deg, #ffffff 0%, #f2f4ff 100%) !important;
  box-shadow: 0 5px 16px rgba(55, 65, 101, .07) !important;
}

html body .attendance-shell .att-report-m3__export-meta,
html body .attendance-shell .att-report-m3__surface {
  border: 1px solid #e0e4ee !important;
  box-shadow: 0 5px 16px rgba(50, 58, 82, .065) !important;
}

html body .attendance-shell .att-report-m3__export-meta {
  background: #fbfcff !important;
}

html body .attendance-shell .att-report-m3__metrics article {
  border: 1px solid rgba(72, 82, 108, .08) !important;
  box-shadow: 0 4px 12px rgba(45, 55, 80, .06) !important;
}

html body .attendance-shell .att-report-m3__teacher-grid > article {
  border: 1px solid transparent !important;
  box-shadow: 0 2px 8px rgba(43, 53, 76, .05) !important;
}

html body .attendance-shell .att-report-m3__teacher-grid > article:nth-child(4n+1) {
  background: var(--att-palette-blue) !important;
  border-left: 4px solid var(--att-palette-blue-accent) !important;
}

html body .attendance-shell .att-report-m3__teacher-grid > article:nth-child(4n+2) {
  background: var(--att-palette-green) !important;
  border-left: 4px solid var(--att-palette-green-accent) !important;
}

html body .attendance-shell .att-report-m3__teacher-grid > article:nth-child(4n+3) {
  background: var(--att-palette-rose) !important;
  border-left: 4px solid var(--att-palette-rose-accent) !important;
}

html body .attendance-shell .att-report-m3__teacher-grid > article:nth-child(4n+4) {
  background: var(--att-palette-amber) !important;
  border-left: 4px solid var(--att-palette-amber-accent) !important;
}

html body .attendance-shell .att-report-m3__teacher-grid > article:nth-child(4n+1) b { color: var(--att-palette-blue-accent) !important; }
html body .attendance-shell .att-report-m3__teacher-grid > article:nth-child(4n+2) b { color: var(--att-palette-green-accent) !important; }
html body .attendance-shell .att-report-m3__teacher-grid > article:nth-child(4n+3) b { color: var(--att-palette-rose-accent) !important; }
html body .attendance-shell .att-report-m3__teacher-grid > article:nth-child(4n+4) b { color: var(--att-palette-amber-accent) !important; }

@media (max-width: 1100px) {
  html body .attendance-shell .attendance-history-layout {
    grid-template-columns: minmax(280px, 34%) minmax(0, 1fr) !important;
  }

  html body .attendance-shell .attendance-history-info-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  html body .attendance-shell .attendance-history-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  html body .attendance-shell .attendance-history-footer-grid {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 760px) {
  html body .attendance-shell {
    --att-type-title: 18px;
    --att-type-tab: 13px;
    --att-type-view-title: 20px;
    --att-type-section: 13px;
    --att-type-body: 12px;
    --att-type-meta: 10px;
    --att-type-chip: 10px;
  }

  html body .attendance-shell .attendance-quick-layout,
  html body .attendance-shell .attendance-history-layout,
  html body .attendance-shell .attendance-calendar-layout,
  html body .attendance-shell .attendance-manage-layout {
    padding: 10px !important;
    gap: 8px !important;
  }

  html body .attendance-shell .attendance-history-layout {
    grid-template-columns: 1fr !important;
  }

  html body .attendance-shell .attendance-history-hero {
    flex-direction: column !important;
  }

  html body .attendance-shell .attendance-history-actions {
    width: 100% !important;
    justify-content: flex-start !important;
  }

  html body .attendance-shell .attendance-history-info-grid,
  html body .attendance-shell .attendance-history-stat-grid {
    grid-template-columns: 1fr 1fr !important;
  }
}


/* ---------- History bulk selection ---------- */
html body .attendance-shell .attendance-history-list-actions {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

html body .attendance-shell .attendance-history-list-actions > button {
  min-height: 32px !important;
  padding: 0 11px !important;
  border: 1px solid #cbd7e9 !important;
  border-radius: 10px !important;
  background: #f7f9fd !important;
  color: #385276 !important;
  font-weight: 750 !important;
  cursor: pointer !important;
}

html body .attendance-shell .attendance-history-list-actions > button.is-active {
  border-color: #89a6d4 !important;
  background: #eaf1ff !important;
  color: #274f8d !important;
}

html body .attendance-shell .attendance-history-bulk-toolbar {
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 8px !important;
  margin-top: 8px !important;
  padding: 8px !important;
  border: 1px solid #d9e2ef !important;
  border-radius: 13px !important;
  background: linear-gradient(135deg, #f8fbff 0%, #f2f6fc 100%) !important;
}

html body .attendance-shell .attendance-history-bulk-toolbar > button {
  min-height: 34px !important;
  padding: 0 10px !important;
  border: 1px solid #c7d5e8 !important;
  border-radius: 10px !important;
  background: #fff !important;
  color: #3f5570 !important;
  font-weight: 750 !important;
  cursor: pointer !important;
}

html body .attendance-shell .attendance-history-bulk-toolbar > span {
  color: #62738a !important;
  text-align: center !important;
  font-size: var(--att-type-meta) !important;
}

html body .attendance-shell .attendance-history-bulk-toolbar > span b {
  color: #274f8d !important;
  font-size: 13px !important;
}

html body .attendance-shell .attendance-history-bulk-toolbar > button.is-danger {
  border-color: #efb6b3 !important;
  background: #fff0ef !important;
  color: #b7342f !important;
}

html body .attendance-shell .attendance-history-bulk-toolbar > button:disabled,
html body .attendance-shell .attendance-history-list-actions > button:disabled {
  opacity: .48 !important;
  cursor: not-allowed !important;
}

html body .attendance-shell .attendance-history-items > button.is-bulk-mode {
  position: relative !important;
  padding-left: 44px !important;
}

html body .attendance-shell .attendance-history-select-box {
  position: absolute !important;
  top: 50% !important;
  left: 12px !important;
  width: 21px !important;
  height: 21px !important;
  display: grid !important;
  place-items: center !important;
  transform: translateY(-50%) !important;
  border: 2px solid #9badc4 !important;
  border-radius: 7px !important;
  background: #fff !important;
  color: #fff !important;
  box-sizing: border-box !important;
}

html body .attendance-shell .attendance-history-select-box.is-checked {
  border-color: #4e70b9 !important;
  background: #4e70b9 !important;
  box-shadow: 0 0 0 3px rgba(78, 112, 185, .12) !important;
}

html body .attendance-shell .attendance-history-items > button.is-bulk-selected {
  border-color: #8ea9dc !important;
  background: linear-gradient(90deg, #e8efff 0%, #f5f8ff 82%) !important;
  box-shadow: 0 0 0 2px rgba(78, 112, 185, .12), 0 4px 12px rgba(53, 73, 111, .08) !important;
}

html body .attendance-shell .attendance-history-bulk-detail {
  min-height: 100% !important;
  display: grid !important;
  place-items: center !important;
  align-content: center !important;
  gap: 10px !important;
  padding: 30px !important;
  text-align: center !important;
  background: radial-gradient(circle at 50% 38%, #f1f5ff 0%, #ffffff 58%) !important;
}

html body .attendance-shell .attendance-history-bulk-detail > span {
  width: 58px !important;
  height: 58px !important;
  display: grid !important;
  place-items: center !important;
  border-radius: 18px !important;
  background: #e9effc !important;
  color: #4e70b9 !important;
}

html body .attendance-shell .attendance-history-bulk-detail h2,
html body .attendance-shell .attendance-history-bulk-detail p {
  margin: 0 !important;
}

html body .attendance-shell .attendance-history-bulk-detail p {
  max-width: 420px !important;
  color: #6b778a !important;
}

html body .attendance-shell .attendance-history-bulk-detail > b {
  padding: 7px 12px !important;
  border-radius: 999px !important;
  background: #eaf1ff !important;
  color: #31558d !important;
}
