:root {
  --background: #EBF5FF;
  --background-primary: #F3F4F6;
  --background-footer: oklch(20.992% 0.03416 263.451);
  --primary: #155DFC;
  --text-primary: #155dfc;
  --sidebar-width-expanded: 280px;
  --sidebar-width-collapsed: 104px;
  --sidebar-width: var(--sidebar-width-expanded);
  --sidebar-transition: 0.28s ease;
}

html {
  scroll-behavior: smooth;
  height: 100%;
}

body.dashboard-shell {
  height: 100%;
  overflow: hidden;
  background: linear-gradient(180deg, #f8fafc 0%, #f5f7fb 100%);
  color: #172033;
  font-family: "Be Vietnam Pro", sans-serif;
}

body.dashboard-mobile-nav-open {
  overflow: hidden;
}

.dashboard-container {
  display: flex;
  height: 100dvh;
  min-height: 100dvh;
  overflow: hidden;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-width);
  border-right: 1px solid #e2e8f0;
  background: rgba(251, 252, 254, 0.94);
  backdrop-filter: blur(8px);
  z-index: 1000;
  transition: width var(--sidebar-transition), transform 0.24s ease;
}

.dashboard-overlay {
  display: none;
}

.sidebar .side {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

.main-content {
  width: calc(100% - var(--sidebar-width));
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  height: 100dvh;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  transition: width var(--sidebar-transition), margin-left var(--sidebar-transition);
}

.content-body {
  flex: 1;
  min-height: 0;
  padding: 32px;
}

body.sidebar-expanded {
  --sidebar-width: var(--sidebar-width-expanded);
}

body.sidebar-collapsed {
  --sidebar-width: var(--sidebar-width-collapsed);
}

body.sidebar-collapsed .dashboard-menu-btn {
  width: 46px;
  min-width: 46px;
  justify-content: center;
  padding: 0;
}

body.sidebar-collapsed .dashboard-menu-btn span {
  display: none;
}

body.sidebar-collapsed .dashboard-header__left {
  gap: 10px;
}

body.sidebar-collapsed .header-search {
  flex: 1 1 auto;
}

.sidebar--collapsed {
  width: var(--sidebar-width-collapsed);
}

.sidebar--collapsed .sidebar__brand-copy,
.sidebar--collapsed .sidebar__section-title,
.sidebar--collapsed .sidebar__link span,
.sidebar--collapsed .sidebar__footer-note {
  opacity: 0;
  max-width: 0;
  padding-left: 0;
  padding-right: 0;
  margin-left: 0;
  margin-right: 0;
  pointer-events: none;
}

.sidebar--collapsed .sidebar__brand {
  justify-content: center;
  padding: 0 16px;
}

.sidebar--collapsed .sidebar__brand-link,
.sidebar--collapsed .sidebar__brand-content,
.sidebar--collapsed .sidebar__link {
  justify-content: center;
}

.sidebar--collapsed .sidebar__nav,
.sidebar--collapsed .sidebar__footer {
  padding-inline: 12px;
}

.sidebar--collapsed .sidebar__brand-arrow {
  display: none;
}

.sidebar--collapsed .sidebar__brand-link {
  width: 48px;
  min-height: 48px;
  padding: 0;
  border-radius: 10px;
}

.sidebar--collapsed .sidebar__brand-content {
  width: 100%;
  flex: 0 0 auto;
}

.sidebar--collapsed .sidebar__logo {
  width: 42px;
  height: 42px;
  border-radius: 10px;
}

.sidebar--collapsed .sidebar__nav {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  padding-block: 16px 18px;
}

.sidebar--collapsed .sidebar__section {
  width: 100%;
}

.sidebar--collapsed .sidebar__section + .sidebar__section {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #f1f5f9;
}

.sidebar--collapsed .sidebar__list {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.sidebar--collapsed .sidebar__item {
  width: 100%;
  display: flex;
  justify-content: center;
}

.sidebar--collapsed .sidebar__item + .sidebar__item {
  margin-top: 0;
}

.sidebar--collapsed .sidebar__link {
  width: 48px;
  min-height: 48px;
  padding: 0;
  border-radius: 10px;
}

.sidebar--collapsed .sidebar__link:hover {
  transform: none;
}

.sidebar--collapsed .sidebar__link i {
  width: auto;
  font-size: 1.1rem;
}

.sidebar--collapsed .sidebar__footer {
  display: flex;
  justify-content: center;
  padding-block: 16px 18px;
}

.sidebar__brand {
  height: 80px;
  display: flex;
  align-items: center;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  box-sizing: border-box;
  flex-shrink: 0;
}

.sidebar__brand-link {
  width: 100%;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  padding: 0;
  border: none;
  background: transparent;
  color: inherit;
  text-decoration: none;
  transition: all 0.2s ease;
}

.sidebar__brand-content {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.sidebar__logo {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid #f1f5f9;
  border-radius: 10px;
  background: #ffffff;
  overflow: hidden;
  flex: 0 0 auto;
}

.sidebar__logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.sidebar__brand-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  min-width: 0;
  align-self: center;
}

.sidebar__brand-title {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.2;
}

.sidebar__brand-subtitle {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.75rem;
  color: #64748b;
  line-height: 1.2;
}

.sidebar__brand-arrow {
  display: none !important;
}

.sidebar__nav {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 16px;
  scrollbar-width: none;
}

.sidebar__nav::-webkit-scrollbar {
  display: none;
}

.sidebar__section + .sidebar__section {
  margin-top: 16px;
}

.sidebar__section-title {
  display: block;
  margin-bottom: 8px;
  padding-left: 12px;
  color: #94a3b8;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sidebar__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.sidebar__item + .sidebar__item {
  margin-top: 4px;
}

.sidebar__link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #475569;
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
}

.sidebar__link i {
  width: 20px;
  text-align: center;
  font-size: 1rem;
  color: #64748b;
  transition: color 0.2s ease;
}

.sidebar__link:hover {
  background: #f1f5f9;
  color: #0f172a;
  transform: translateX(4px);
}

.sidebar__link:hover i {
  color: #0f172a;
}

.sidebar__link.active {
  background: #e0f2fe;
  color: #0369a1;
  font-weight: 600;
}

.sidebar__link.active i {
  color: #0369a1;
}

.sidebar__footer {
  padding: 16px;
  border-top: 1px solid #f1f5f9;
}

.sidebar__footer-note {
  display: grid;
  gap: 2px;
  padding: 0 12px 12px;
}

.sidebar__footer-label {
  font-size: 0.7rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sidebar__footer-value {
  font-size: 0.82rem;
  color: #0f172a;
  font-weight: 600;
}

.sidebar__link--logout {
  width: 100%;
  background: transparent;
}

.sidebar__link--logout:hover {
  background: #fef2f2;
  border-color: #fee2e2;
  color: #991b1b;
  transform: none;
}

.sidebar__link--logout:hover i {
  color: #991b1b;
}

.dashboard-header {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 16px;
  height: 88px;
  padding: 0 32px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.75);
  background: rgba(245, 247, 251, 0.82);
  backdrop-filter: blur(8px);
  box-sizing: border-box;
  flex-shrink: 0;
}

.dashboard-header__left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1 1 auto;
  min-width: 0;
  transition: gap var(--sidebar-transition);
}

.dashboard-menu-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: 124px;
  min-width: 124px;
  min-height: 46px;
  padding: 0 16px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.86);
  color: #172033;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1;
}

.dashboard-menu-btn span {
  display: inline-flex;
  align-items: center;
}

.dashboard-menu-btn {
  cursor: pointer;
  transition:
    width var(--sidebar-transition),
    min-width var(--sidebar-transition),
    padding var(--sidebar-transition),
    border-color 0.18s ease,
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

.dashboard-menu-btn:hover,
.dashboard-menu-btn:focus-visible {
  border-color: #bdd0f7;
  box-shadow: none;
  transform: translateY(-1px);
  outline: none;
}

.header-search {
  flex: 1 1 auto;
  min-width: 0;
  transition: flex-basis var(--sidebar-transition), max-width var(--sidebar-transition), width var(--sidebar-transition);
}

.header-search__form {
  position: relative;
}

.header-search__icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  pointer-events: none;
}

.header-search__input {
  width: 100%;
  min-height: 46px;
  padding: 0 16px 0 44px !important;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.86);
  color: #172033;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.header-search__input::placeholder {
  color: #93a0b4;
}

.header-search__input:focus {
  outline: none;
  background: #ffffff;
  border-color: #b8cdfc;
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.08);
}

.main-wrapper {
  width: 100%;
}

.container-xl,
.container-small {
  width: min(100%, 1240px);
  margin: 0 auto;
}

.container-small {
  max-width: 860px;
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.page-title {
  margin: 0;
  color: #172033;
  font-size: clamp(1.6rem, 2vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.page-subtitle {
  margin-top: 8px;
  max-width: 62ch;
  color: #66758b;
  font-size: 0.95rem;
  line-height: 1.65;
}

.card,
.card-min,
.table-container,
.table-container-min,
.empty-state,
.empty-state-min {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.035);
}

.card,
.card-min {
  padding: 24px;
}

.table-container,
.table-container-min {
  overflow: auto;
}

.table,
.table-min {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.table th,
.table td,
.table-min th,
.table-min td {
  padding: 16px 18px;
  vertical-align: middle;
}

.table th,
.table-min th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  color: #7a879b;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.table td,
.table-min td {
  border-bottom: 1px solid #edf2f7;
  color: #334155;
  font-size: 0.93rem;
}

.table tbody tr:last-child td,
.table-min tbody tr:last-child td {
  border-bottom: none;
}

.table tbody tr:hover,
.table-min tbody tr:hover {
  background: #fbfdff;
}

.avatar-sm {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  flex-shrink: 0;
}

.avatar-sm img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.badge,
.badge-min {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.badge-secondary,
.badge-min--year,
.badge-min--category,
.badge-min--class,
.badge-min--archived {
  background: #eef2f7;
  color: #5f6b7a;
}

.badge-success,
.badge-min--active,
.badge-min--published {
  background: #eaf8ef;
  color: #166534;
}

.badge-warning,
.badge-min--draft {
  background: #fff5d9;
  color: #9a6700;
}

.badge-danger,
.badge-min--locked {
  background: #fff0ef;
  color: #b42318;
}

.badge-outline {
  background: #f8fafc;
  color: #66758b;
  border: 1px solid #e2e8f0;
}

.badge-info {
  background: #eaf1ff;
  color: #1d4ed8;
}

.btn,
.btn-primary-min,
.btn-secondary-min {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}

.btn:hover,
.btn-primary-min:hover,
.btn-secondary-min:hover {
  transform: translateY(-1px);
}

.btn-primary,
.btn-primary-min {
  background: #172033;
  color: #ffffff;
  box-shadow: none;
}

.btn-primary:hover,
.btn-primary-min:hover {
  background: #0f172a;
  color: #ffffff;
}

.btn-secondary,
.btn-secondary-min {
  background: #ffffff;
  border-color: #e2e8f0;
  color: #172033;
}

.btn-secondary:hover,
.btn-secondary-min:hover {
  background: #f8fafc;
}

.btn-danger {
  background: #ffffff;
  border-color: #ffd5d2;
  color: #b42318;
}

.btn-danger:hover {
  background: #fff5f4;
}

.btn-icon {
  width: 40px;
  min-width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 8px;
}

.row-actions {
  position: relative;
  display: inline-block;
  text-align: left;
}

.row-actions[open] {
  z-index: 20;
}

.row-actions__trigger {
  list-style: none;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #ffffff;
  color: #66758b;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  user-select: none;
}

.row-actions__trigger::-webkit-details-marker {
  display: none;
}

.row-actions__trigger:hover {
  border-color: #cbd5e1;
  color: #172033;
  background: #f8fafc;
}

.row-actions__menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 180px;
  padding: 6px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.row-actions__item,
.row-actions__menu form {
  display: block;
  width: 100%;
}

.row-actions__link,
.row-actions__button {
  width: 100%;
  min-height: 36px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #172033;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
}

.row-actions__link:hover,
.row-actions__button:hover {
  background: #f8fafc;
}

.row-actions__button--danger {
  color: #b42318;
}

.row-actions__button--danger:hover {
  background: #fff5f4;
}

.row-actions__button--success {
  color: #15803d;
}

.row-actions__button--success:hover {
  background: #f0fdf4;
}

.row-actions__button--secondary {
  color: #475569;
}

.row-actions__button--secondary:hover {
  background: #f8fafc;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.form-grid,
.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 18px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  color: #172033;
  font-size: 0.92rem;
  font-weight: 600;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fbfcfe;
  color: #172033;
  font-size: 0.94rem;
  transition: border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}

.form-group textarea {
  min-height: 132px;
  resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: #b8cdfc;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.08);
}

.form-help,
.form-error {
  font-size: 0.8rem;
}

.form-help {
  color: #66758b;
}

.form-error {
  color: #b42318;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 18px;
  border-top: 1px solid #e2e8f0;
}

.alert {
  padding: 14px 16px;
  border-radius: 10px;
  font-size: 0.92rem;
}

.alert-danger {
  border: 1px solid #ffd5d2;
  background: #fff5f4;
  color: #9f1d1d;
}

.empty-state,
.empty-state-min {
  display: grid;
  place-items: center;
  gap: 10px;
  padding: 56px 20px;
  text-align: center;
  color: #66758b;
}

.empty-state i,
.empty-icon-min {
  font-size: 2.5rem;
  color: #c1ccd8;
}

.search-form-min {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.search-bar,
.filter-panel,
.sort-panel {
  display: flex;
  align-items: end;
  gap: 12px;
}

.search-bar {
  flex: 1 1 340px;
  width: 100%;
  height: auto;
  background: transparent;
  color: inherit;
  transition: none;
}

.search-bar:focus-within {
  outline: none;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field__label {
  color: #172033;
  font-size: 0.85rem;
  font-weight: 600;
}

.field__input {
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fbfcfe;
  color: #172033;
  font-size: 0.92rem;
}

.field__input:focus {
  outline: none;
  border-color: #b8cdfc;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.08);
}

.search-wrapper-min {
  position: relative;
  flex: 1 1 340px;
}

.search-icon-min {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
}

.search-input-min {
  width: 100%;
  min-height: 46px;
  padding: 0 42px 0 44px !important;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fbfcfe;
  color: #172033;
  font-size: 0.92rem;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.search-input-min:focus {
  outline: none;
  border-color: #b8cdfc;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.08);
}

.search-clear-min {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
}

.student-name-min,
.teacher-name-min,
.course-title-min {
  color: #172033;
  font-weight: 700;
  text-decoration: none;
}

.student-name-min:hover,
.teacher-name-min:hover,
.course-title-min:hover {
  color: #1d4ed8;
}

.code-min {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 6px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #334155;
  font-size: 0.82rem;
}

.student-table-scroll {
  overflow-x: auto;
  overflow-y: hidden;
}

.student-table-min {
  min-width: 1380px;
  table-layout: auto;
}

.student-table-min th,
.student-table-min td {
  white-space: nowrap;
}

.student-filters {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) repeat(3, minmax(170px, 0.75fr)) auto;
  gap: 12px;
  align-items: center;
}

.student-filters__search {
  min-width: 0;
}

.student-filters__control {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fbfcfe;
  color: #172033;
  font-size: 0.94rem;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.student-filters__control:focus {
  outline: none;
  border-color: #b8cdfc;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.08);
}

.student-filters__select {
  appearance: none;
  padding-right: 40px;
  background-image: linear-gradient(45deg, transparent 50%, #64748b 50%), linear-gradient(135deg, #64748b 50%, transparent 50%);
  background-position: calc(100% - 18px) calc(50% - 3px), calc(100% - 12px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.student-filters__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.student-filters__button {
  min-width: 96px;
}

.student-filters__button--ghost {
  justify-content: center;
}

.teacher-filters {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) repeat(3, minmax(170px, 0.75fr)) auto;
  gap: 12px;
  align-items: center;
}

.teacher-filters__search {
  min-width: 0;
}

.teacher-filters__control {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fbfcfe;
  color: #172033;
  font-size: 0.94rem;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.teacher-filters__control:focus {
  outline: none;
  border-color: #b8cdfc;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.08);
}

.teacher-filters__select {
  appearance: none;
  padding-right: 40px;
  background-image: linear-gradient(45deg, transparent 50%, #64748b 50%), linear-gradient(135deg, #64748b 50%, transparent 50%);
  background-position: calc(100% - 18px) calc(50% - 3px), calc(100% - 12px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.teacher-filters__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.teacher-filters__button {
  min-width: 96px;
}

.teacher-filters__button--ghost {
  justify-content: center;
}

.course-list-header__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.course-list-header__action {
  flex: 0 0 auto;
}

.course-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.course-toolbar__search {
  flex: 1 1 420px;
  min-width: 0;
}

.course-toolbar__sort {
  flex: 0 1 auto;
  min-width: 0;
}

.course-toolbar .sort-panel {
  flex-wrap: wrap;
  justify-content: flex-end;
  row-gap: 8px;
  min-width: 0;
}

.class-list-header__action {
  flex: 0 0 auto;
}

.class-filters {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(190px, 0.7fr) auto;
  gap: 12px;
  align-items: center;
}

.class-filters__search {
  min-width: 0;
}

.class-filters__control {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fbfcfe;
  color: #172033;
  font-size: 0.94rem;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.class-filters__control:focus {
  outline: none;
  border-color: #b8cdfc;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.08);
}

.class-filters__select {
  appearance: none;
  padding-right: 40px;
  background-image: linear-gradient(45deg, transparent 50%, #64748b 50%), linear-gradient(135deg, #64748b 50%, transparent 50%);
  background-position: calc(100% - 18px) calc(50% - 3px), calc(100% - 12px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.class-filters__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.class-filters__button {
  min-width: 96px;
}

.class-filters__button--ghost {
  justify-content: center;
}

.class-table-scroll {
  overflow-x: auto;
  overflow-y: hidden;
}

.class-table {
  min-width: 820px;
}

.classroom-list-header__action,
.room-list-header__action {
  flex: 0 0 auto;
}

.classroom-filters,
.room-filters {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.room-filters {
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.75fr) auto;
}

.classroom-filters__search,
.room-filters__search {
  min-width: 0;
}

.room-filters__control {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fbfcfe;
  color: #172033;
  font-size: 0.94rem;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.room-filters__control:focus {
  outline: none;
  border-color: #b8cdfc;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.08);
}

.room-filters__select {
  appearance: none;
  padding-right: 40px;
  background-image: linear-gradient(45deg, transparent 50%, #64748b 50%), linear-gradient(135deg, #64748b 50%, transparent 50%);
  background-position: calc(100% - 18px) calc(50% - 3px), calc(100% - 12px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.classroom-filters__actions,
.room-filters__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.classroom-filters__button,
.room-filters__button {
  min-width: 96px;
}

.classroom-filters__button--ghost,
.room-filters__button--ghost {
  justify-content: center;
}

.classroom-table-scroll,
.room-table-scroll {
  overflow-x: auto;
  overflow-y: hidden;
}

.classroom-table {
  min-width: 760px;
}

.room-table {
  min-width: 760px;
}

.settings-list-header__action {
  flex: 0 0 auto;
}

.settings-table-scroll {
  overflow-x: auto;
  overflow-y: hidden;
}

.settings-table {
  min-width: 760px;
  table-layout: fixed;
}

.settings-table__action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 120px;
  white-space: nowrap;
}

.student-col-name,
.student-col-major,
.major-info-inline-min {
  min-width: 0;
}

.student-name-min {
  display: block;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.major-info-inline-min {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
}

.major-name-min {
  display: inline-block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: bottom;
}

.major-level-min {
  flex: 0 0 auto;
  white-space: nowrap;
}

.admin-form-card {
  gap: 0;
}

.admin-form-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 18px;
  margin-bottom: 22px;
  border-bottom: 1px solid #e2e8f0;
}

.admin-form-card__heading {
  display: flex;
  align-items: center;
  gap: 14px;
}

.admin-form-card__icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #eaf1ff;
  color: #1d4ed8;
}

.admin-form-card__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #172033;
}

.admin-form-card__subtitle {
  margin: 6px 0 0;
  color: #66758b;
  font-size: 0.88rem;
}

.admin-overview {
  width: min(100%, 1240px);
  margin: 0 auto;
}

.admin-overview__hero {
  padding: 8px 0 28px;
}

.admin-overview__title {
  max-width: 14ch;
  margin: 18px 0 10px;
  color: #172033;
  font-size: clamp(2.3rem, 5vw, 3.9rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.admin-overview__description {
  max-width: 64ch;
  color: #66758b;
  font-size: 1rem;
  line-height: 1.75;
}

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

.admin-overview__card {
  display: grid;
  gap: 18px;
  padding: 24px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.94);
  color: inherit;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.035);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.admin-overview__card:hover {
  transform: translateY(-2px);
  border-color: #bfd0ec;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.05);
}

.admin-overview__icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #f8fafc;
  color: #1d4ed8;
  font-size: 1.05rem;
}

.admin-overview__card h2 {
  margin: 0 0 8px;
  font-size: 1.08rem;
  color: #172033;
}

.admin-overview__card p {
  margin: 0;
  color: #66758b;
  line-height: 1.7;
  font-size: 0.93rem;
}

.admin-overview__cta {
  color: #1d4ed8;
  font-size: 0.88rem;
  font-weight: 700;
}

.pagination {
  display: flex;
  justify-content: center;
}

.enrollment-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.enrollment-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.enrollment-stat {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 1rem;
  background: #fff;
}

.enrollment-stat__label {
  display: block;
  margin-bottom: 0.35rem;
  color: #66758b;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.enrollment-stat__value {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #172033;
  font-size: 1.75rem;
  font-weight: 700;
}

.enrollment-filter-card,
.enrollment-table-card {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
}

.enrollment-filter-card {
  margin-bottom: 1rem;
  padding: 1rem;
}

.enrollment-filter-form {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.enrollment-filter-input-wrap {
  position: relative;
  flex: 1;
}

.enrollment-filter-input-wrap i {
  position: absolute;
  top: 50%;
  left: 0.9rem;
  transform: translateY(-50%);
  color: #66758b;
}

.enrollment-filter-input {
  width: 100%;
  min-height: 44px;
  padding: 0 2.5rem;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  outline: none;
  background: #f8fafc;
  color: #172033;
}

.enrollment-filter-input:focus {
  border-color: #b8cdfc;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.08);
}

.enrollment-filter-clear {
  position: absolute;
  top: 50%;
  right: 0.85rem;
  transform: translateY(-50%);
  color: #66758b;
}

.enrollment-table-card {
  overflow: hidden;
}

.enrollment-table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.15rem;
  border-bottom: 1px solid #e5e7eb;
}

.enrollment-student {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.enrollment-student__avatar {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 10px;
  background: #eff6ff;
  color: #2563eb;
  font-weight: 900;
}

.enrollment-student__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.empty-admin-state {
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  background: #fff;
  color: #66758b;
}

@media (max-width: 1180px) {
  .admin-overview__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1024px) {
  :root {
    --sidebar-width-expanded: 256px;
    --sidebar-width-collapsed: 96px;
  }

  .sidebar {
    width: var(--sidebar-width);
  }

  .dashboard-header,
  .content-body {
    padding-inline: 24px;
  }

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

  .student-filters__search,
  .student-filters__actions {
    grid-column: span 2;
  }

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

  .teacher-filters__search,
  .teacher-filters__actions {
    grid-column: span 2;
  }

  .course-toolbar {
    align-items: stretch;
  }

  .course-toolbar__search,
  .course-toolbar__sort {
    flex-basis: 100%;
  }

  .course-toolbar .sort-panel {
    justify-content: flex-start;
  }

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

  .class-filters__search,
  .class-filters__actions {
    grid-column: span 2;
  }

  .classroom-filters,
  .room-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .classroom-filters__search,
  .classroom-filters__actions,
  .room-filters__search,
  .room-filters__actions {
    grid-column: span 2;
  }

  .settings-table {
    min-width: 720px;
  }
}

@media (max-width: 768px) {
  body.dashboard-shell {
    overflow: auto;
  }

  .dashboard-container {
    height: auto;
    min-height: 100dvh;
  }

  .dashboard-overlay {
    position: fixed;
    inset: 0;
    display: block;
    border: 0;
    padding: 0;
    background: rgba(15, 23, 42, 0.42);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 950;
  }

  .sidebar {
    width: min(320px, calc(100vw - 32px));
    max-width: 320px;
    transform: translateX(calc(-100% - 16px));
    transition: transform 0.24s ease;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
  }

  .sidebar.sidebar--mobile-open {
    transform: translateX(0);
  }

  .sidebar.sidebar--mobile-open + .dashboard-overlay {
    opacity: 1;
    pointer-events: auto;
  }

  .main-content,
  body.sidebar-collapsed .main-content {
    width: 100%;
    margin-left: 0;
    min-height: 100dvh;
  }

  .content-body,
  .dashboard-header {
    padding: 18px 16px;
  }

  .dashboard-header {
    height: auto;
    align-items: center;
    gap: 0;
    flex-direction: row;
  }

  .dashboard-menu-btn {
    flex: 0 0 46px;
    min-width: 46px;
    justify-content: center;
    padding: 0;
  }

  .dashboard-header__left {
    width: 100%;
    align-items: center;
    gap: 12px;
  }

  .header-search {
    flex: 1 1 auto;
    max-width: none;
  }

  .page-header,
  .admin-form-card__header,
  .enrollment-header,
  .enrollment-filter-form,
  .enrollment-table-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .form-grid,
  .form-row,
  .admin-overview__grid,
  .enrollment-stats {
    grid-template-columns: 1fr;
  }

  .student-filters {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .student-filters__search,
  .student-filters__actions {
    grid-column: auto;
  }

  .teacher-filters {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .teacher-filters__search,
  .teacher-filters__actions {
    grid-column: auto;
  }

  .student-filters__control,
  .search-input-min {
    min-height: 42px;
    font-size: 0.92rem;
  }

  .search-form-min .search-wrapper-min,
  .course-toolbar__search .search-wrapper-min {
    flex: none;
    width: 100%;
  }

  .teacher-filters__control {
    min-height: 42px;
    font-size: 0.92rem;
  }

  .student-filters__actions {
    justify-content: stretch;
  }

  .teacher-filters__actions {
    justify-content: stretch;
  }

  .course-list-header__actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .course-list-header__action {
    width: 100%;
    justify-content: center;
  }

  .course-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .course-toolbar__search,
  .course-toolbar__sort {
    width: 100%;
  }

  .course-toolbar__search {
    flex: none;
  }

  .course-toolbar .sort-panel {
    width: 100%;
    justify-content: flex-start;
  }

  .course-toolbar .sort-panel > span {
    width: 100%;
  }

  .class-list-header__action {
    width: 100%;
    justify-content: center;
  }

  .class-filters {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .class-filters__search,
  .class-filters__actions {
    grid-column: auto;
  }

  .class-filters__control {
    min-height: 42px;
    font-size: 0.92rem;
  }

  .class-filters__actions {
    justify-content: stretch;
  }

  .classroom-list-header__action,
  .room-list-header__action {
    width: 100%;
    justify-content: center;
  }

  .settings-list-header__action {
    width: 100%;
    justify-content: center;
  }

  .classroom-filters,
  .room-filters {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .classroom-filters__search,
  .classroom-filters__actions,
  .room-filters__search,
  .room-filters__actions {
    grid-column: auto;
  }

  .room-filters__control {
    min-height: 42px;
    font-size: 0.92rem;
  }

  .classroom-filters__actions,
  .room-filters__actions {
    justify-content: stretch;
  }

  .settings-table {
    min-width: 680px;
  }

  .card,
  .card-min {
    padding: 18px;
  }

  .admin-overview__hero {
    padding: 0 0 22px;
  }

  .admin-overview__title {
    max-width: none;
    margin-top: 0;
    font-size: clamp(2rem, 10vw, 2.8rem);
    line-height: 1.08;
  }

  .admin-overview__description {
    font-size: 0.98rem;
    line-height: 1.7;
  }

  .admin-overview__card {
    gap: 14px;
    padding: 20px;
  }
}

@media (max-width: 640px) {
  .dashboard-header__left {
    flex-wrap: nowrap;
    gap: 10px;
  }

  .dashboard-menu-btn span {
    display: none;
  }

  .dashboard-menu-btn {
    width: 46px;
    padding: 0;
  }

  .header-search,
  .header-search__form {
    width: 100%;
  }

  .content-body {
    padding: 16px;
  }

  .table th,
  .table td,
  .table-min th,
  .table-min td {
    padding: 14px 12px;
  }

  .form-actions,
  .search-form-min {
    flex-direction: column;
    align-items: stretch;
  }

  .btn,
  .btn-primary-min,
  .btn-secondary-min {
    width: 100%;
  }

  .student-filters__actions {
    flex-direction: column;
    gap: 8px;
  }

  .student-filters__button {
    width: 100%;
    min-width: 0;
  }

  .teacher-filters__actions {
    flex-direction: column;
    gap: 8px;
  }

  .teacher-filters__button {
    width: 100%;
    min-width: 0;
  }

  .course-list-header__actions {
    grid-template-columns: 1fr;
  }

  .course-toolbar__search .btn-secondary-min {
    width: 100%;
  }

  .course-toolbar .sort-panel {
    gap: 8px;
  }

  .course-toolbar .sort-panel button {
    max-width: 100%;
  }

  .class-filters__actions {
    flex-direction: column;
    gap: 8px;
  }

  .class-filters__button {
    width: 100%;
    min-width: 0;
  }

  .classroom-filters__actions,
  .room-filters__actions {
    flex-direction: column;
    gap: 8px;
  }

  .classroom-filters__button,
  .room-filters__button {
    width: 100%;
    min-width: 0;
  }

  .settings-table__action {
    min-width: 0;
    width: 100%;
  }
}
