.lms-batch-att-toolbar {
  width: 100%;
}

.lms-batch-att-filters {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  min-width: 0;
}

.lms-batch-att-filters__field {
  flex: 1 1 0;
  min-width: 0;
}

.lms-batch-att-filters__field--venue,
.lms-batch-att-filters__field--day,
.lms-batch-att-filters__field--level {
  flex: 0.9 1 0;
  max-width: 11rem;
}

.lms-batch-att-filters__field--teacher {
  flex: 1.1 1 0;
  max-width: 13rem;
}

.lms-batch-att-filters__field--batch {
  flex: 1.6 1 0;
  max-width: 18rem;
}

.lms-batch-att-filters__actions {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}

.lms-batch-att-filters .lms-select {
  width: 100%;
}

.lms-batch-att-filters .lms-select-trigger {
  border-radius: 1rem;
  min-height: 2.75rem;
  height: 2.75rem;
  padding: 0.45rem 0.8rem;
  font-size: 0.875rem;
  border: 1px solid var(--cui-border);
  box-shadow:
    inset 0 1px 0 color-mix(in srgb, #fff 8%, transparent),
    0 4px 14px rgba(0, 0, 0, 0.08);
}

html[data-theme="light"] .lms-batch-att-filters .lms-select-trigger,
:root[data-theme="light"] .lms-batch-att-filters .lms-select-trigger,
html[data-theme="bw"] .lms-batch-att-filters .lms-select-trigger,
:root[data-theme="bw"] .lms-batch-att-filters .lms-select-trigger {
  border-color: #e2e8f0;
  box-shadow: none;
}

html[data-theme="bw"] .lms-batch-att-filters .lms-select-trigger,
:root[data-theme="bw"] .lms-batch-att-filters .lms-select-trigger {
  border-color: var(--cui-border);
}

html[data-theme="dark"] .lms-batch-att-filters .lms-select-trigger,
:root[data-theme="dark"] .lms-batch-att-filters .lms-select-trigger {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 6px 18px rgba(0, 0, 0, 0.22);
}

.lms-batch-att-filters .lms-select-menu {
  border-radius: 1rem;
  z-index: 40;
}

.lms-batch-att-filters__actions .cui-btn {
  min-height: 2.75rem;
  border-radius: 1rem;
  white-space: nowrap;
}

@media (max-width: 1100px) {
  .lms-batch-att-filters {
    flex-wrap: wrap;
  }

  .lms-batch-att-filters__field--venue,
  .lms-batch-att-filters__field--day,
  .lms-batch-att-filters__field--teacher,
  .lms-batch-att-filters__field--level,
  .lms-batch-att-filters__field--batch {
    flex: 1 1 calc(50% - 0.65rem);
    max-width: none;
  }

  .lms-batch-att-filters__actions {
    width: 100%;
    margin-left: 0;
    justify-content: flex-end;
  }
}

@media (max-width: 640px) {
  .lms-batch-att-filters__field--venue,
  .lms-batch-att-filters__field--day,
  .lms-batch-att-filters__field--teacher,
  .lms-batch-att-filters__field--level,
  .lms-batch-att-filters__field--batch {
    flex: 1 1 100%;
  }
}

.lms-batch-att-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.lms-batch-att-tabs__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 0.95rem;
  border-radius: 9999px;
  border: 1px solid var(--cui-border);
  background: var(--cui-btn-soft-bg, #fff);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
  color: var(--cui-text-muted);
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.lms-batch-att-tabs__btn:hover {
  color: var(--cui-text);
  background: var(--cui-icon-hover-bg, rgba(99, 102, 241, 0.08));
}

.lms-batch-att-tabs__btn--active {
  color: #fff;
  background: #4f46e5;
  border-color: #4f46e5;
}

html[data-theme="light"] .lms-batch-att-tabs__btn--active {
  color: #fff;
}

html[data-theme="dark"] .lms-batch-att-tabs__btn {
  background: rgba(255, 255, 255, 0.06);
}

.lms-batch-sheet-wrap {
  overflow: auto;
  max-width: 100%;
  border-radius: var(--cui-radius-lg);
  border: 1px solid var(--cui-border);
  background: #fff;
}

html[data-theme="dark"] .lms-batch-sheet-wrap {
  background: #0f172a;
}

.lms-batch-sheet {
  width: 100%;
  min-width: 960px;
  border-collapse: collapse;
  font-size: 0.8125rem;
}

.lms-batch-sheet th,
.lms-batch-sheet td {
  border: 1px solid #cbd5e1;
  padding: 0.35rem 0.45rem;
  vertical-align: middle;
}

html[data-theme="dark"] .lms-batch-sheet th,
html[data-theme="dark"] .lms-batch-sheet td {
  border-color: #334155;
}

.lms-batch-sheet__title th {
  background: #fff;
  color: #64748b;
  font-size: 1rem;
  font-weight: 700;
  text-align: center;
  padding: 0.35rem 0.75rem;
  letter-spacing: 0.06em;
}

.lms-batch-sheet__title--active th {
  background: #fff;
  color: #111827;
  font-size: 1.35rem;
  font-weight: 800;
  padding: 0.75rem;
}

.lms-batch-sheet__title-badge {
  display: inline-block;
  margin-left: 0.5rem;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  background: #4f46e5;
  color: #fff;
  font-size: 0.55rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  vertical-align: middle;
}

html[data-theme="dark"] .lms-batch-sheet__title th {
  background: #0f172a;
  color: #94a3b8;
}

html[data-theme="dark"] .lms-batch-sheet__title--active th {
  color: #f8fafc;
}

.lms-batch-sheet__subtitle th {
  background: #fff;
  color: #374151;
  font-size: 0.95rem;
  font-weight: 600;
  text-align: center;
  padding: 0.35rem 0.75rem 0.75rem;
}

.lms-batch-sheet__head th {
  background: #f8fafc;
  color: #334155;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: 0.72rem;
  text-align: center;
  white-space: nowrap;
}

html[data-theme="dark"] .lms-batch-sheet__head th {
  background: #1e293b;
  color: #e2e8f0;
}

.lms-batch-sheet__instructor {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  text-align: center;
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: 0.08em;
  min-width: 2.5rem;
  width: 2.5rem;
}

.lms-batch-sheet__instructor--rahma {
  background: #fef08a;
  color: #713f12;
}

.lms-batch-sheet__instructor--omar {
  background: #bfdbfe;
  color: #1e3a8a;
}

.lms-batch-sheet__instructor--default {
  background: #e2e8f0;
  color: #0f172a;
}

.lms-batch-sheet__group th {
  text-align: center;
  font-weight: 800;
  letter-spacing: 0.04em;
  font-size: 0.78rem;
  padding: 0.45rem;
}

.lms-batch-sheet__group--yellow th {
  background: #fde047;
  color: #713f12;
}

.lms-batch-sheet__group--pink th {
  background: #fbcfe8;
  color: #831843;
}

.lms-batch-sheet__num,
.lms-batch-sheet__mark,
.lms-batch-sheet__pass {
  text-align: center;
  white-space: nowrap;
}

.lms-batch-sheet__name {
  min-width: 220px;
  font-weight: 600;
  color: var(--cui-text);
}

.lms-batch-sheet__phone {
  min-width: 120px;
  color: var(--cui-text-muted);
}

.lms-batch-sheet__mark {
  width: 2.4rem;
}

.lms-batch-sheet__mark-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  border: 1px solid #94a3b8;
  border-radius: 0.2rem;
  background: #fff;
  font-size: 0.85rem;
  line-height: 1;
}

.lms-batch-sheet__mark-box--present {
  background: #86efac;
  border-color: #16a34a;
  color: #14532d;
}

.lms-batch-sheet__mark-box--absent {
  background: #fecaca;
  border-color: #dc2626;
  color: #7f1d1d;
}

.lms-batch-sheet__mark-box--late {
  background: #fde68a;
  border-color: #d97706;
  color: #78350f;
}

.lms-batch-sheet__mark-box--pending {
  background: #f8fafc;
  border-style: dashed;
  border-color: #cbd5e1;
  color: #94a3b8;
  font-size: 0.75rem;
}

html[data-theme="dark"] .lms-batch-sheet__mark-box--pending {
  background: #1e293b;
  border-color: #475569;
  color: #64748b;
}

.lms-batch-sheet__mark--pending {
  background: rgba(148, 163, 184, 0.08);
}

.lms-batch-sheet__day-label {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
}

.lms-batch-sheet__day-wd {
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  color: #334155;
}

.lms-batch-sheet__day-date {
  display: block;
  font-size: 0.6rem;
  font-weight: 500;
  color: #64748b;
}

.lms-batch-sheet__day-badge {
  display: inline-block;
  margin-top: 0.15rem;
  padding: 0.05rem 0.35rem;
  border-radius: 999px;
  background: #4f46e5;
  color: #fff;
  font-size: 0.55rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.lms-batch-sheet__head-day--today {
  background: rgba(99, 102, 241, 0.14) !important;
  box-shadow: inset 0 -3px 0 #4f46e5;
}

.lms-batch-sheet__head-day--focus {
  background: rgba(234, 179, 8, 0.18) !important;
  box-shadow: inset 0 -3px 0 #ca8a04;
}

.lms-batch-sheet__mark--focus {
  background: rgba(234, 179, 8, 0.12);
}

.lms-batch-sheet__head-day--pending {
  opacity: 0.65;
}

.lms-batch-sheet__group-schedule,
.lms-batch-sheet__group-today {
  display: inline-block;
  margin-left: 0.5rem;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  vertical-align: middle;
}

.lms-batch-sheet__group-schedule {
  background: rgba(15, 23, 42, 0.08);
  color: #334155;
}

.lms-batch-sheet__group-today {
  background: #4f46e5;
  color: #fff;
}

.lms-batch-sheet__group-today--next {
  background: #64748b;
}

.lms-batch-att-banner {
  border: 1px solid rgba(99, 102, 241, 0.35);
  border-radius: var(--cui-radius-lg);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(255, 255, 255, 0.04) 100%);
  padding: 0.85rem 1.1rem;
}

.lms-batch-att-banner__groups {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.lms-batch-att-banner__group-row {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #64748b;
}

.lms-batch-att-banner__group-row--active {
  font-size: 1rem;
  color: #4338ca;
}

.lms-batch-att-banner__group-tag {
  display: inline-block;
  margin-left: 0.45rem;
  padding: 0.08rem 0.4rem;
  border-radius: 999px;
  background: #4f46e5;
  color: #fff;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  vertical-align: middle;
}

.lms-batch-att-banner__group {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #4338ca;
}

.lms-batch-att-banner__today,
.lms-batch-att-banner__next {
  margin-top: 0.35rem;
  font-size: 0.95rem;
  color: var(--cui-text);
}

.lms-batch-att-banner__legend {
  margin-top: 0.45rem;
  font-size: 0.68rem;
  color: var(--cui-text-muted);
}

.lms-batch-att-banner__legend span {
  font-weight: 600;
}

.lms-batch-sheet__group-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
}

.lms-batch-sheet__group-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.65rem;
  min-width: 0;
}

.lms-batch-sheet__group-title {
  font-weight: 800;
}

.lms-batch-sheet__group-progress {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  opacity: 0.9;
  white-space: nowrap;
}

.lms-batch-sheet__pass {
  font-weight: 800;
  min-width: 4.5rem;
}

.lms-batch-sheet__mark-box--clickable {
  cursor: pointer;
  padding: 0;
  appearance: none;
  -webkit-appearance: none;
}

.lms-batch-sheet__mark-box--clickable:hover {
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.55);
}

.lms-batch-sheet__mark-box--saving {
  opacity: 0.45;
  pointer-events: none;
}

.lms-batch-sheet__mark--today {
  background: rgba(99, 102, 241, 0.08);
}

.lms-batch-sheet__group-meta {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  opacity: 0.85;
}

.lms-batch-sheet__pass--pass { color: #15803d; }
.lms-batch-sheet__pass--fail { color: #b91c1c; }
.lms-batch-sheet__pass--absent { color: #c2410c; }
.lms-batch-sheet__pass--stay { color: #a16207; font-size: 0.68rem; line-height: 1.15; }
.lms-batch-sheet__pass--progress { color: #64748b; font-size: 0.68rem; font-weight: 700; }

.lms-batch-sheet tbody tr:nth-child(even) td {
  background: rgba(15, 23, 42, 0.02);
}

html[data-theme="dark"] .lms-batch-sheet tbody tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.03);
}

@media print {
  .lms-batch-sheet-wrap {
    border: 0;
    overflow: visible;
  }
  .no-print { display: none !important; }
}

/* Student profile — one row per enrolled batch */
.lms-student-profile-attendance .lms-batch-sheet {
  margin-bottom: 1.5rem;
}

.lms-student-profile-attendance .lms-batch-sheet__group th .flex {
  width: 100%;
}
