@import url("/css/pages/default.css");

.classes-page {
  flex: 1;
  min-height: 0;
}

.classes-main {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 32px 32px 48px;
}

.classes-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.classes-toolbar__title p {
  margin: 4px 0 0;
  color: #41484c;
  font-size: 16px;
  line-height: 24px;
}

.classes-toolbar__actions {
  display: flex;
  gap: 8px;
}

.classes-insights {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.classes-stat-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px 24px;
  border: 1px solid #c0c7cc;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(12, 174, 242, 0.05);
}

.classes-stat-card__label {
  display: flex;
  align-items: center;
  gap: 12px;
}

.classes-stat-card h2 {
  margin: 0;
  color: #41484c;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.35px;
  line-height: 20px;
}

.classes-stat-card strong {
  display: block;
  color: #191c1d;
  font-family: "Plus Jakarta Sans", Arial, Helvetica, sans-serif;
  font-size: 28px;
  font-weight: 700;
  line-height: 36px;
}

.classes-page .insight-icon {
  display: inline-flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
}

.classes-page .insight-icon img {
  display: block;
  width: 20px;
  height: 20px;
}

.classes-page .insight-icon--blue {
  background: #c7e7ff;
  color: #00658f;
}

.classes-page .insight-icon--purple {
  background: #dfe0ff;
  color: #4455ba;
}

.classes-page .insight-icon--green {
  background: #d8f3e3;
  color: #1f7a47;
}

.classes-page .insight-icon--red {
  background: #ffdad6;
  color: #ba1a1a;
}

.classes-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  line-height: 24px;
  padding: 8px 16px;
}

.classes-btn svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.classes-btn img {
  width: 22px;
  height: 16px;
  filter: brightness(0) invert(1);
}

.classes-btn--light {
  background: #addef7;
  color: #316378;
}

.classes-btn--primary {
  background: #00658f;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  color: #ffffff;
}

.classes-btn--danger {
  background: #ba1a1a;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  color: #ffffff;
}

.classes-btn--danger:disabled,
.classes-btn--primary:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

.classes-tabs {
  display: flex;
  gap: 32px;
  border-bottom: 1px solid #c0c7cc;
}

.classes-tabs__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: -1px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: #41484c;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.7px;
  line-height: 20px;
  padding: 0 8px 12px;
}

.classes-tabs__btn svg {
  width: 16px;
  height: 20px;
  fill: currentColor;
}

.classes-tabs__btn img {
  width: 16px;
  height: 16px;
}

.classes-tabs__btn.is-active {
  border-bottom-color: #00658f;
  color: #00658f;
}

.classes-tabs__btn.is-active img {
  filter: brightness(0) saturate(100%) invert(24%) sepia(86%) saturate(746%) hue-rotate(166deg) brightness(93%) contrast(101%);
}

.classes-panel {
  display: none;
  flex-direction: column;
  gap: 40px;
}

.classes-panel.is-active {
  display: flex;
}

.classes-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.classes-grid__empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 32px;
  border: 1px dashed #c0c7cc;
  border-radius: 12px;
  color: #71787d;
  text-align: center;
}

.classes-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px;
  border: 1px solid #c0c7cc;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(12, 174, 242, 0.05);
}

.classes-card__title-row,
.classes-detail__title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.classes-card__age {
  flex-shrink: 0;
  padding: 4px 10px;
  border-radius: 6px;
  background: #d0d4ff;
  color: #4353b9;
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
  white-space: nowrap;
}

.classes-card h3,
.classes-detail__title-row h1 {
  margin: 0;
  color: #191c1d;
  font-family: "Plus Jakarta Sans", Arial, Helvetica, sans-serif;
  font-size: 20px;
  font-weight: 600;
  line-height: 28px;
}

.classes-detail__title-row h1 {
  font-size: 24px;
  line-height: 32px;
}

.classes-card__teacher {
  margin: 0 0 12px;
  color: #41484c;
  font-size: 14px;
  line-height: 20px;
}

.classes-card__stats {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 0;
}

.classes-card__stat {
  padding: 10px 8px;
  border: 1px solid rgba(192, 199, 204, 0.3);
  border-radius: 8px;
  background: #f9f9fb;
  text-align: center;
}

.classes-card__stat span {
  display: block;
  color: #41484c;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.6px;
  line-height: 16px;
  text-transform: uppercase;
}

.classes-card__stat strong {
  display: block;
  margin-top: 4px;
  font-family: "Plus Jakarta Sans", Arial, Helvetica, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
}

.classes-card__stat strong.is-active {
  color: #33647a;
}

.classes-card__stat strong.is-full {
  color: #ba1a1a;
}

.classes-card__stat strong.is-count {
  color: #00658f;
}

.classes-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.classes-card__action {
  display: inline-flex;
  flex: 1;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid #c0c7cc;
  border-radius: 8px;
  background: #ffffff;
  color: #00658f;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  padding: 8px 12px;
}

.classes-card__action img {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.classes-card__action--delete {
  color: #ba1a1a;
  border-color: rgba(186, 26, 26, 0.25);
  background: rgba(255, 218, 214, 0.25);
}

.classes-detail__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.classes-card__link {
  display: inline-flex;
  width: 100%;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 0;
  border: 1px solid #c0c7cc;
  border-radius: 8px;
  background: #f9f9fb;
  color: #191c1d;
  cursor: pointer;
  font-size: 15px;
  line-height: 22px;
  text-decoration: none;
}

.classes-card__link svg {
  width: 10px;
  height: 10px;
  fill: currentColor;
}

.classes-view {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.classes-view.classes-detail {
  gap: 16px;
}

.classes-view[hidden] {
  display: none !important;
}

.classes-detail__toolbar {
  margin: 0;
}

.classes-detail__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: transparent;
  color: #00658f;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  padding: 0;
}

.classes-detail__back svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.classes-detail__hero {
  margin-bottom: 8px;
  padding: 24px;
  border: 1px solid #c0c7cc;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(12, 174, 242, 0.05);
}

.classes-detail__teacher {
  margin: 0;
  color: #41484c;
  font-size: 15px;
  line-height: 22px;
}

.classes-detail__hero-stats {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 20px;
  max-width: 420px;
}

.classes-detail__section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.classes-detail__section-head h2 {
  margin: 0;
  color: #191c1d;
  font-family: "Plus Jakarta Sans", Arial, Helvetica, sans-serif;
  font-size: 20px;
  font-weight: 600;
  line-height: 28px;
}

.classes-detail__date {
  color: #71787d;
  font-size: 13px;
  font-weight: 500;
  line-height: 18px;
}

.classes-detail__summary {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 20px;
}

.classes-detail__summary-card {
  padding: 14px 16px;
  border: 1px solid rgba(192, 199, 204, 0.35);
  border-radius: 10px;
  background: #f9f9fb;
  text-align: center;
}

.classes-detail__summary-card span {
  display: block;
  color: #41484c;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  line-height: 14px;
  text-transform: uppercase;
}

.classes-detail__summary-card strong {
  display: block;
  margin-top: 6px;
  color: #00658f;
  font-size: 22px;
  font-weight: 700;
  line-height: 28px;
}

.classes-detail__summary-card strong.is-late {
  color: #33647a;
}

.classes-detail__summary-card strong.is-absent {
  color: #ba1a1a;
}

.classes-detail__table-wrap {
  overflow: auto;
  max-height: 420px;
  border: 1px solid #c0c7cc;
  border-radius: 12px;
  background: #ffffff;
}

.classes-detail__table {
  width: 100%;
  border-collapse: collapse;
}

.classes-detail__table th,
.classes-detail__table td {
  padding: 14px 18px;
  border-bottom: 1px solid #eef0f2;
  text-align: left;
  font-size: 14px;
  line-height: 20px;
}

.classes-detail__table th {
  position: sticky;
  top: 0;
  background: #f3f3f5;
  color: #41484c;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.classes-detail__table tbody tr:last-child td {
  border-bottom: 0;
}

.classes-detail__status {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
}

.classes-detail__status.is-present {
  background: rgba(173, 222, 247, 0.35);
  color: #00658f;
}

.classes-detail__status.is-late {
  background: rgba(208, 212, 255, 0.5);
  color: #4353b9;
}

.classes-detail__status.is-absent {
  background: rgba(255, 218, 214, 0.6);
  color: #ba1a1a;
}

.classes-modal[hidden] {
  display: none !important;
}

.classes-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.classes-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(25, 28, 29, 0.45);
}

.classes-modal__panel {
  position: relative;
  z-index: 1;
  width: min(480px, 100%);
  max-height: calc(100vh - 48px);
  max-height: calc(100dvh - 48px);
  overflow: auto;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 24px 48px rgba(25, 28, 29, 0.18);
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.classes-modal__panel::-webkit-scrollbar {
  display: none;
}

.classes-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 24px 0;
}

.classes-modal__header h2 {
  margin: 0;
  color: #191c1d;
  font-size: 20px;
  font-weight: 700;
}

.classes-modal__close {
  border: 0;
  background: transparent;
  color: #71787d;
  cursor: pointer;
  font-size: 28px;
  line-height: 1;
}

.classes-modal__form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px 24px 24px;
}

.classes-modal__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.classes-modal__field span {
  color: #41484c;
  font-size: 12px;
  font-weight: 600;
}

.classes-modal__field input {
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #c0c7cc;
  border-radius: 8px;
  background: #ffffff;
  color: #191c1d;
  font-size: 14px;
}

.classes-modal__field input:focus {
  border-color: #00658f;
  outline: none;
}

.classes-modal__field--toggle {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}

.classes-modal__field--toggle input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 0;
  accent-color: #00658f;
}

.classes-modal .custom-select {
  position: relative;
  width: 100%;
}

.classes-modal .custom-select__menu {
  z-index: 10;
}

.classes-modal__row {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr 1fr;
}

.classes-modal__footer {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 4px;
}

.classes-modal__footer--edit {
  justify-content: space-between;
  align-items: center;
}

.classes-modal__footer-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.classes-modal__footer--confirm {
  justify-content: flex-end;
}

.classes-modal__error {
  margin: 0;
  color: #ba1a1a;
  font-size: 13px;
  line-height: 18px;
}

.classes-modal__error[hidden] {
  display: none;
}

.classes-modal__body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 8px 24px 0;
}

.classes-modal__confirm-text {
  margin: 0;
  color: #191c1d;
  font-size: 15px;
  line-height: 22px;
}

.classes-modal__confirm-name {
  margin: 0;
  color: #00658f;
  font-family: "Plus Jakarta Sans", Arial, Helvetica, sans-serif;
  font-size: 18px;
  font-weight: 700;
  line-height: 26px;
}

.classes-modal__confirm-hint {
  margin: 0;
  color: #71787d;
  font-size: 13px;
  line-height: 18px;
}

.classes-modal__footer--confirm {
  padding: 16px 24px 24px;
}

.classes-teachers-section h2 {
  margin: 0 0 24px;
  color: #191c1d;
  font-family: "Plus Jakarta Sans", Arial, Helvetica, sans-serif;
  font-size: 20px;
  font-weight: 600;
  line-height: 28px;
}

.classes-table-card {
  overflow: hidden;
  border: 1px solid #c0c7cc;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(12, 174, 242, 0.05);
}

.classes-table-card--full {
  margin-top: 0;
}

.classes-list-card__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px 0;
}

.classes-list-card__head h2 {
  margin: 0;
  color: #191c1d;
  font-family: "Plus Jakarta Sans", Arial, Helvetica, sans-serif;
  font-size: 20px;
  font-weight: 600;
  line-height: 28px;
}

.classes-list-card__head p {
  margin: 4px 0 0;
  color: #71787d;
  font-size: 14px;
  line-height: 20px;
}

.classes-table--list th {
  color: #41484c;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.6px;
  line-height: 20px;
  padding: 14px 20px;
  text-transform: uppercase;
}

.classes-table--list td {
  padding: 14px 20px;
  font-size: 15px;
  line-height: 22px;
}

.classes-list-name {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.classes-list-name strong {
  color: #191c1d;
  font-size: 14px;
  font-weight: 600;
}

.classes-class-avatar {
  display: inline-flex;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
}

.classes-class-avatar--a {
  background: #fff4d6;
  color: #9a6700;
}

.classes-class-avatar--b {
  background: #ffe4e8;
  color: #b42345;
}

.classes-class-avatar--c {
  background: #e8f5e9;
  color: #2f7a4f;
}

.classes-class-avatar--d {
  background: #e7f0ff;
  color: #00658f;
}

.classes-status-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
  padding: 4px 12px;
  white-space: nowrap;
}

.classes-status-pill--active {
  background: #e8f8ef;
  color: #2f7a4f;
}

.classes-status-pill--full {
  background: #ffebee;
  color: #c62828;
}

.classes-status-pill--inactive {
  background: #f1f3f5;
  color: #6f7885;
}

.classes-table__actions {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.classes-icon-btn {
  display: inline-flex;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  border: 1px solid #c0c7cc;
  border-radius: 8px;
  background: #ffffff;
  color: #00658f;
  cursor: pointer;
  padding: 0;
}

.classes-icon-btn img {
  width: 16px;
  height: 16px;
}

.classes-icon-btn:hover {
  background: rgba(0, 101, 143, 0.06);
  border-color: #00658f;
}

.classes-icon-btn--danger {
  color: #ba1a1a;
}

.classes-icon-btn--danger:hover {
  background: #fff5f5;
  border-color: #ba1a1a;
}

.classes-card__stat strong.is-inactive {
  color: #6f7885;
}

.classes-list-card .classes-list-pagination {
  margin-top: 0;
  border: 0;
  border-top: 1px solid #c0c7cc;
  border-radius: 0;
}

.classes-table-wrap {
  overflow-x: auto;
}

.classes-table {
  width: 100%;
  min-width: 800px;
  border-collapse: collapse;
}

.classes-table thead {
  background: #edeeef;
}

.classes-table th {
  padding: 16px 24px;
  color: #41484c;
  font-size: 16px;
  font-weight: 700;
  line-height: 20px;
  text-align: left;
}

.classes-table td {
  padding: 16px 24px;
  border-top: 1px solid #c0c7cc;
  color: #191c1d;
  font-size: 16px;
  line-height: 20px;
  vertical-align: middle;
}

.classes-table__empty td {
  padding: 32px 24px;
  color: #71787d;
  text-align: center;
}

.classes-table__col-expand {
  width: 52px;
  padding-left: 16px !important;
  padding-right: 8px !important;
}

.classes-table-row.is-expanded {
  background: #f4f9fc;
}

.classes-row-expand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid #d8dde2;
  border-radius: 8px;
  background: #ffffff;
  color: #41484c;
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease;
}

.classes-row-expand--empty {
  color: #71787d;
  border-style: dashed;
}

.classes-row-expand--empty:hover {
  color: #00658f;
  border-color: #00658f;
}

.classes-row-expand svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
  transition: transform 150ms ease;
}

.classes-table-row.is-expanded .classes-row-expand svg {
  transform: rotate(180deg);
}

.classes-row-expand:hover {
  background: #eef6fb;
  border-color: #2f94c3;
  color: #00658f;
}

.classes-students-row > td {
  padding: 0 !important;
  border-top: 0 !important;
  background: #f8fbfd;
}

.classes-students-panel-wrap {
  display: grid;
  grid-template-rows: 1fr;
  transition: grid-template-rows 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.classes-students-row.is-collapsed .classes-students-panel-wrap {
  grid-template-rows: 0fr;
}

.classes-students-panel-wrap__inner {
  min-height: 0;
  overflow: hidden;
}

.classes-students-panel {
  padding: 20px 24px 16px 52px;
  border-top: 1px dashed #c7d8e3;
  transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.classes-students-row.is-open .classes-students-panel {
  opacity: 1;
  transform: translateY(0);
}

.classes-students-row.is-collapsed .classes-students-panel {
  opacity: 0;
  transform: translateY(-6px);
}

.classes-students-panel__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.classes-students-panel__head h3 {
  margin: 0;
  color: #191c1d;
  font-size: 18px;
  font-weight: 700;
}

.classes-students-panel__head p {
  margin: 4px 0 0;
  color: #71787d;
  font-size: 14px;
  line-height: 20px;
}

.classes-students-panel__close {
  border: 0;
  background: transparent;
  color: #71787d;
  cursor: pointer;
  font-size: 28px;
  line-height: 1;
}

.classes-students-panel__close:hover {
  color: #191c1d;
}

.classes-students-panel__summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.classes-students-panel__stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid #d8e3ea;
  border-radius: 12px;
  background: #ffffff;
}

.classes-students-panel__stat span {
  color: #71787d;
  font-size: 12px;
  font-weight: 600;
}

.classes-students-panel__stat strong {
  color: #191c1d;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.1;
}

.classes-students-panel__stat strong.is-present {
  color: #1f7a47;
}

.classes-students-panel__stat strong.is-late {
  color: #9a5b00;
}

.classes-students-panel__stat strong.is-absent {
  color: #71787d;
}

.classes-students-panel__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.classes-students-panel__search {
  flex: 1 1 280px;
}

.classes-students-panel__search-input {
  width: 100%;
  height: 44px;
  border: 1px solid #c0c7cc;
  border-radius: 10px;
  background: #ffffff;
  color: #191c1d;
  font-size: 14px;
  padding: 0 14px;
}

.classes-students-panel__search-input:focus {
  outline: none;
  border-color: #00658f;
  box-shadow: 0 0 0 3px rgba(0, 101, 143, 0.12);
}

.classes-students-panel__filter-select-wrap {
  display: block;
  min-width: 190px;
}

.classes-students-panel__filter-select {
  width: 100%;
}

.classes-students-panel__add {
  margin-bottom: 16px;
  padding: 16px;
  border: 1px dashed #c7d8e3;
  border-radius: 12px;
  background: #ffffff;
}

.classes-students-panel__add-head h4 {
  margin: 0;
  color: #191c1d;
  font-size: 15px;
  font-weight: 700;
}

.classes-students-panel__add-hint {
  margin: 4px 0 0;
  color: #71787d;
  font-size: 12px;
  line-height: 18px;
}

.classes-students-panel__add-form {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin-top: 14px;
}

.classes-students-panel__add-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.classes-students-panel__add-field span {
  color: #41484c;
  font-size: 12px;
  font-weight: 600;
}

.classes-students-panel__add-field input {
  height: 44px;
  border: 1px solid #c0c7cc;
  border-radius: 10px;
  background: #ffffff;
  color: #191c1d;
  font-size: 14px;
  padding: 0 14px;
}

.classes-students-panel__add-field input:focus {
  outline: none;
  border-color: #00658f;
  box-shadow: 0 0 0 3px rgba(0, 101, 143, 0.12);
}

.classes-students-panel__add-error {
  grid-column: 1 / -1;
  margin: 0;
  color: #ba1a1a;
  font-size: 13px;
  line-height: 18px;
}

.classes-students-panel__add-error[hidden] {
  display: none;
}

.classes-students-panel__add-notice {
  grid-column: 1 / -1;
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: #e8f5e9;
  color: #1b5e20;
  font-size: 13px;
  line-height: 18px;
}

.classes-students-panel__add-notice[hidden] {
  display: none;
}

.classes-students-panel__add-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.classes-students-panel__add-actions .add-btn {
  white-space: nowrap;
}

.classes-student-draft {
  display: inline-flex;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 9999px;
  background: #fff1db;
  color: #9a5b00;
  font-size: 11px;
  font-weight: 600;
  vertical-align: middle;
}

.classes-students-panel__table-wrap {
  max-height: min(420px, 50vh);
  overflow: auto;
  border: 1px solid #d8e3ea;
  border-radius: 12px;
  background: #ffffff;
}

.classes-students-panel__table {
  width: 100%;
  border-collapse: collapse;
}

.classes-students-panel__table thead {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #edeeef;
}

.classes-students-panel__table th,
.classes-students-panel__table td {
  padding: 14px 16px;
  border-bottom: 1px solid #e3e6e8;
  text-align: left;
  vertical-align: middle;
}

.classes-students-panel__table th {
  color: #41484c;
  font-size: 13px;
  font-weight: 700;
}

.classes-students-panel__table tbody tr:hover {
  background: #f8fbfd;
}

.classes-students-panel__name {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.classes-students-panel__name .classes-student-avatar {
  width: 36px;
  height: 36px;
  font-size: 12px;
}

.classes-students-panel__name strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 600;
  flex: 1 1 auto;
  min-width: 0;
}

.classes-students-panel__name .classes-student-draft {
  flex: 0 0 auto;
}

.classes-students-panel__empty td {
  padding: 40px 16px;
  color: #71787d;
  text-align: center;
}

.classes-students-panel__footer {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #e3e6e8;
}

.classes-student-list-btn {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #00658f;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.classes-student-list-btn strong {
  font-size: 16px;
  font-weight: 700;
}

.classes-student-list-btn span {
  color: #41484c;
  font-size: 13px;
  font-weight: 500;
}

.classes-student-list-btn:hover strong {
  text-decoration: underline;
}

.classes-student-list-btn--empty span {
  color: #00658f;
  font-weight: 600;
}

.classes-student-avatar {
  display: inline-flex;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 700;
}

.classes-student-avatar--a {
  background: #c7e7ff;
  color: #00658f;
}

.classes-student-avatar--b {
  background: #bee9ff;
  color: #33647a;
}

.classes-student-avatar--c {
  background: #dfe0ff;
  color: #4455ba;
}

.classes-student-avatar--d {
  background: #d8f3e3;
  color: #1f7a47;
}

.classes-student-item__body {
  min-width: 0;
  flex: 1;
}

.classes-student-item__body strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 600;
}

.classes-student-item__body small {
  display: block;
  margin-top: 2px;
  color: #71787d;
  font-size: 12px;
  line-height: 16px;
}

.classes-student-item__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.classes-student-attendance {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 24px;
}

.classes-student-attendance__badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  line-height: 16px;
}

.classes-student-attendance__time {
  color: #5f676d;
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
  white-space: nowrap;
}

.classes-student-attendance__time::before {
  content: '·';
  margin-right: 8px;
  color: #c5cad0;
  font-weight: 400;
}

.classes-student-attendance--is-present .classes-student-attendance__badge {
  background: #d8f3e3;
  color: #1f7a47;
}

.classes-student-attendance--is-late .classes-student-attendance__badge {
  background: #fff1db;
  color: #9a5b00;
}

.classes-student-attendance--is-absent .classes-student-attendance__badge,
.classes-student-attendance--unknown .classes-student-attendance__badge {
  background: #f3f4f6;
  color: #71787d;
}

.classes-student-status {
  display: inline-flex;
  padding: 2px 8px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 600;
}

.classes-student-status--is-active {
  background: rgba(173, 222, 247, 0.35);
  color: #00658f;
}

.classes-student-status--is-muted {
  background: #f3f4f6;
  color: #71787d;
}

.classes-teacher-profile {
  display: inline-flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  font-size: 14px;
  font-weight: 700;
}

.classes-teacher-profile--a {
  background: #c7e7ff;
  color: #00658f;
}

.classes-teacher-profile--b {
  background: #bee9ff;
  color: #33647a;
}

.classes-teacher-profile--c {
  background: #dfe0ff;
  color: #4455ba;
}

.classes-teacher-name strong {
  display: block;
  font-weight: 400;
}

.classes-teacher-name small {
  display: block;
  color: #41484c;
  font-size: 12px;
  line-height: 16px;
}

.classes-class-badge {
  display: inline-flex;
  padding: 3.5px 12px;
  border-radius: 9999px;
  background: rgba(173, 222, 247, 0.3);
  color: #33647a;
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
  white-space: nowrap;
}

.classes-class-badge.is-teal {
  background: rgba(43, 185, 253, 0.2);
  color: #00658f;
}

.classes-class-badge.is-full {
  background: rgba(255, 235, 238, 0.95);
  color: #c62828;
}

.classes-class-badge.is-muted {
  background: #f1f3f5;
  color: #6f7885;
}

.classes-class-badge.is-purple {
  background: rgba(208, 212, 255, 0.3);
  color: #4455ba;
}

.classes-contact span {
  display: block;
  font-size: 14px;
  line-height: 20px;
}

.classes-contact small {
  display: block;
  color: #41484c;
  font-size: 12px;
  line-height: 16px;
}

.classes-table-footer,
.classes-list-pagination,
.classes-detail-pagination {
  display: flex;
  min-height: 63px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 24px;
  border-top: 1px solid #c0c7cc;
  background: #f9f9fb;
}

.classes-list-pagination {
  margin-top: 16px;
  border: 1px solid rgba(192, 199, 204, 0.35);
  border-radius: 10px;
}

.classes-detail-pagination {
  margin-top: 0;
  border-top: 1px solid #c0c7cc;
}

.classes-table-footer p {
  margin: 0;
  color: #41484c;
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
}

.classes-table-footer nav {
  display: flex;
  gap: 8px;
}

.classes-table-footer button {
  display: inline-flex;
  min-width: 25px;
  height: 30px;
  align-items: center;
  justify-content: center;
  border: 1px solid #c0c7cc;
  border-radius: 4px;
  background: #ffffff;
  color: #191c1d;
  cursor: pointer;
  font-size: 12px;
  padding: 0 8px;
}

.classes-table-footer button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

@media (max-width: 1100px) {
  .classes-grid {
    grid-template-columns: 1fr;
  }

  .classes-insights {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .classes-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .classes-toolbar__actions {
    justify-content: flex-end;
  }
}

@media (max-width: 768px) {
  .classes-main {
    padding: 20px 16px 32px;
    gap: 16px;
  }

  .classes-toolbar {
    gap: 12px;
  }

  
  .classes-toolbar + .classes-insights {
    margin-top: -26px;
  }

  .classes-insights {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .classes-toolbar__actions {
    flex-direction: column;
  }

  .classes-toolbar__actions .add-btn {
    width: 100%;
  }

  .classes-btn {
    width: 100%;
    justify-content: center;
  }

  .classes-table-footer,
  .classes-list-pagination,
  .classes-detail-pagination {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
  }

  .classes-table-footer .table-pagination-footer__meta,
  .classes-list-pagination .table-pagination-footer__meta,
  .classes-detail-pagination .table-pagination-footer__meta {
    align-self: auto;
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
  }

  .classes-table-footer .table-pagination-footer__controls,
  .classes-list-pagination .table-pagination-footer__controls,
  .classes-detail-pagination .table-pagination-footer__controls {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    align-self: auto;
    justify-content: flex-end;
    gap: 8px;
    margin-left: auto;
    width: auto;
    max-width: 100%;
  }

  .classes-table-footer .table-pagination-footer__controls nav,
  .classes-list-pagination .table-pagination-footer__controls nav,
  .classes-detail-pagination .table-pagination-footer__controls nav {
    display: inline-flex;
    flex-wrap: nowrap;
    justify-content: flex-end;
    gap: 8px;
    margin-left: 0;
  }

  .classes-detail__summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .classes-students-panel {
    padding-left: 16px;
    padding-right: 16px;
  }

  .classes-students-panel__summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .classes-students-panel__toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  
  .classes-students-panel__search {
    flex: 0 0 auto;
    width: 100%;
  }

  .classes-students-panel__filter-select-wrap {
    width: 100%;
    min-width: 0;
  }

  .classes-students-panel__empty td {
    padding: 20px 16px;
  }

  .classes-students-panel__add-form {
    grid-template-columns: 1fr;
  }

  .classes-students-panel__add-actions {
    justify-content: stretch;
  }

  .classes-students-panel__add-actions .add-btn {
    width: 100%;
    justify-content: center;
  }

  .classes-modal__row {
    grid-template-columns: 1fr;
  }

  
  .classes-modal {
    align-items: flex-start;
    justify-content: center;
    padding: max(12px, env(safe-area-inset-top, 0px)) 12px max(12px, env(safe-area-inset-bottom, 0px));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .classes-modal__panel {
    width: 100%;
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
    margin: 0;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .classes-modal__header {
    position: sticky;
    top: 0;
    z-index: 3;
    padding-top: 16px;
    padding-bottom: 8px;
    background: #ffffff;
  }

  .classes-modal__form {
    padding-bottom: 16px;
  }

  .classes-modal__footer {
    position: sticky;
    bottom: 0;
    z-index: 3;
    margin-top: 8px;
    padding-top: 12px;
    padding-bottom: 4px;
    background: #ffffff;
    box-shadow: 0 -10px 16px rgba(255, 255, 255, 0.92);
  }

  .classes-modal__footer--confirm {
    padding-bottom: 16px;
  }

  
  .classes-modal__footer--edit {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
  }

  .classes-modal__footer--edit .delete-btn,
  .classes-modal__footer--edit .classes-modal__footer-actions .save-btn {
    width: auto;
    min-width: 0;
    flex: 0 0 auto;
  }

  .classes-modal__footer--edit .classes-modal__footer-actions {
    margin-left: auto;
    width: auto;
  }

  
  .classes-modal__footer:not(.classes-modal__footer--edit) {
    flex-direction: column;
  }

  .classes-modal__footer:not(.classes-modal__footer--edit) .classes-btn,
  .classes-modal__footer:not(.classes-modal__footer--edit) .save-btn {
    width: 100%;
  }
}

.beugem-multi-picker__list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  max-height: 12rem;
  overflow: auto;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border-soft, #e5e7eb);
  border-radius: 0.65rem;
  background: var(--surface-elevated, #fff);
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.beugem-multi-picker__list::-webkit-scrollbar {
  display: none;
}

.beugem-multi-picker__item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.92rem;
  line-height: 1.35;
  cursor: pointer;
}

.beugem-multi-picker__item input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  margin: 0;
  flex-shrink: 0;
}

.beugem-multi-picker__hint {
  margin: 0.35rem 0 0;
  font-size: 0.78rem;
  color: var(--text-muted, #6b7280);
}

