.admin-shell {
  background: #f7fbff;
}

.admin-sidebar {
  z-index: 20;
  display: flex;
  height: auto;
  flex-direction: column;
  overflow: hidden;
  border-right: 1px solid #d8eefb;
  background:
    radial-gradient(circle at 50% -12%, rgba(10, 141, 205, 0.08), transparent 36%),
    #fff;
  padding: 20px 12px;
  transition: width 0.2s ease, padding 0.2s ease;
}

@media (min-width: 1024px) {
  .admin-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
  }

  .admin-sidebar--collapsed,
  .collab-sidebar--collapsed.admin-sidebar {
    width: 0;
    padding: 0;
    border-right: 0;
  }

  .admin-sidebar--collapsed > *,
  .collab-sidebar--collapsed.admin-sidebar > * {
    display: none;
  }
}

.admin-sidebar__header {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  min-height: 64px;
  padding: 0 6px;
}

.admin-sidebar__brand {
  color: #2f9bd5;
  font-family: "FC Subject Rounded", "Noto Sans Thai", ui-sans-serif, system-ui, sans-serif;
  font-size: 38px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
  text-decoration: none;
  white-space: nowrap;
}

.admin-sidebar__toggle {
  display: none;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid #d8eefb;
  border-radius: 8px;
  background: #fff;
  color: #526173;
  box-shadow: 0 5px 12px rgba(21, 44, 77, 0.045);
}

.admin-sidebar__toggle:hover {
  background: #f6fbff;
}

.admin-sidebar__tooltip,
.admin-sidebar__restore-tooltip {
  pointer-events: none;
  position: absolute;
  left: 100%;
  top: 50%;
  z-index: 30;
  margin-left: 8px;
  width: max-content;
  transform: translateY(-50%);
  border-radius: 6px;
  background: #0f172a;
  padding: 6px 10px;
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.admin-sidebar__toggle:hover .admin-sidebar__tooltip,
.admin-sidebar__restore:hover .admin-sidebar__restore-tooltip {
  opacity: 1;
}

.admin-sidebar__nav {
  display: grid;
  gap: 2px;
  margin-top: 10px;
}

.admin-sidebar__item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  padding: 7px 10px;
  color: #4b5563;
  font-family: "FC Subject Rounded", "Noto Sans Thai", ui-sans-serif, system-ui, sans-serif;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.25;
  text-align: left;
  text-decoration: none;
}

.admin-sidebar__item:hover {
  background: #f4faff;
  color: #334155;
}

.admin-sidebar__item--active {
  border: 1px solid #a9dbf6;
  background: #fff;
  color: #2f9bd5;
  font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(169, 219, 246, 0.25);
}

.admin-sidebar__item--group {
  grid-template-columns: 28px minmax(0, 1fr) 20px;
  margin-top: 6px;
}

.admin-sidebar__icon {
  color: currentColor;
  font-size: 21px;
  line-height: 1;
}

.admin-sidebar__chevron {
  justify-self: end;
  color: #4b5563;
  font-size: 20px;
}

.admin-sidebar__submenu {
  display: none;
  gap: 3px;
}

.admin-sidebar__submenu.is-open {
  display: grid;
}

.admin-sidebar__subitem {
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  min-height: 38px;
  padding-block: 6px;
}

.admin-sidebar__restore {
  position: fixed;
  left: 16px;
  top: 16px;
  z-index: 30;
  display: none;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid #d8eefb;
  border-radius: 8px;
  background: #fff;
  color: #526173;
  box-shadow: 0 5px 12px rgba(21, 44, 77, 0.08);
}

.collab-sidebar__restore--visible.admin-sidebar__restore {
  display: none;
}

.admin-page {
  min-width: 0;
  background: linear-gradient(#fff, #f8fbfd 24rem);
}

.admin-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  min-height: 82px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid #e5edf5;
  background: rgba(255, 255, 255, 0.9);
  padding: 16px 24px;
  backdrop-filter: blur(12px);
}

.admin-header__title {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.admin-header__title > .material-symbols-rounded {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 12px;
  background: #f1f8fd;
  color: #0a8dcd;
  font-size: 25px;
}

.admin-header h1 {
  color: #14213d;
  font-family: "FC Subject Rounded", "Noto Sans Thai", ui-sans-serif, system-ui, sans-serif;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.1;
}

.admin-header p {
  color: #64748b;
  font-size: 13px;
  font-weight: 600;
}

.admin-user {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 10px;
  border: 1px solid #e5edf5;
  border-radius: 999px;
  background: #fff;
  padding: 0 14px 0 8px;
  color: #334155;
  font-weight: 700;
  box-shadow: 0 5px 12px rgba(21, 44, 77, 0.045);
}

.admin-user__avatar {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 999px;
  background: #f1f8fd;
  color: #0a8dcd;
  font-family: "FC Subject Rounded", "Noto Sans Thai", ui-sans-serif, system-ui, sans-serif;
  font-size: 18px;
}

.admin-content {
  width: 100%;
  padding: 28px 24px 40px;
}

.admin-content--wide {
  width: 100%;
}

.admin-content .collab-panel {
  border-radius: 10px;
}

.admin-content .collab-panel__header {
  background: #f1f8fd;
}

.admin-breadcrumb {
  display: flex;
  min-height: 34px;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.admin-breadcrumb a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 8px;
  color: #0a8dcd;
  text-decoration: none;
}

.admin-breadcrumb a:hover {
  color: #0677ad;
}

.admin-breadcrumb .material-symbols-rounded {
  font-size: 18px;
}

.admin-breadcrumb span:not(.material-symbols-rounded)::before {
  content: "/";
  margin-right: 8px;
  color: #cbd5e1;
  font-weight: 700;
}

.admin-list-panel {
  overflow: hidden;
  border: 1px solid #dbe8f3;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(21, 44, 77, 0.055);
}

.admin-list-panel__header {
  display: flex;
  min-height: 112px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid #e5edf5;
  background: #f8fbfd;
  padding: 22px 24px;
}

.admin-eyebrow {
  margin-bottom: 5px;
  color: #0a8dcd;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.admin-list-panel__header h2 {
  color: #14213d;
  font-family: "FC Subject Rounded", "Noto Sans Thai", ui-sans-serif, system-ui, sans-serif;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
}

.admin-list-panel__header p:not(.admin-eyebrow) {
  margin-top: 4px;
  color: #64748b;
  font-size: 13px;
  font-weight: 600;
}

.admin-primary-action,
.admin-filter-button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 8px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.admin-primary-action {
  background: #0a8dcd;
  color: #fff;
  box-shadow: 0 5px 12px rgba(10, 141, 205, 0.18);
}

.admin-primary-action:hover {
  background: #0677ad;
}

.admin-primary-action .material-symbols-rounded,
.admin-filter-button .material-symbols-rounded {
  font-size: 19px;
}

.admin-school-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #e5edf5;
  padding: 14px 16px;
}

.admin-school-search {
  display: grid;
  min-height: 40px;
  flex: 1;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  border: 1px solid #e5edf5;
  border-radius: 8px;
  background: #fff;
  padding: 0 12px;
  color: #64748b;
}

.admin-school-search .material-symbols-rounded {
  font-size: 20px;
}

.admin-school-search input {
  min-width: 0;
  border: 0;
  color: #14213d;
  font-size: 13px;
  outline: 0;
}

.admin-filter-button {
  border: 1px solid #e5edf5;
  background: #fff;
  color: #475569;
}

.admin-filter-button:hover {
  background: #f8fbfd;
}

.admin-school-list {
  display: grid;
}

.admin-school-row {
  display: grid;
  grid-template-columns: 48px minmax(240px, 1fr) minmax(170px, 0.65fr) 92px 24px;
  align-items: center;
  gap: 14px;
  min-height: 78px;
  border-bottom: 1px solid #eef4fa;
  padding: 14px 18px;
  color: inherit;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.admin-school-row:last-child {
  border-bottom: 0;
}

.admin-school-row:hover {
  background: #f8fbfd;
}

.admin-school-row__logo {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  overflow: hidden;
  border: 1px solid #e5edf5;
  border-radius: 10px;
  background: #fff;
}

.admin-school-row__logo img {
  width: 30px;
  height: 36px;
  object-fit: contain;
}

.admin-school-row__logo--text {
  background: #f1f8fd;
  color: #0a8dcd;
  font-family: "FC Subject Rounded", "Noto Sans Thai", ui-sans-serif, system-ui, sans-serif;
  font-size: 22px;
  font-weight: 700;
}

.admin-school-row__main,
.admin-school-row__meta,
.admin-school-row__stats {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.admin-school-row__main strong {
  overflow: hidden;
  color: #14213d;
  font-size: 15px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-school-row small {
  overflow: hidden;
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-school-row__meta {
  justify-items: start;
}

.admin-status-pill {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  border-radius: 999px;
  background: #f1f5f9;
  padding: 0 9px;
  color: #475569;
  font-size: 11px;
  font-weight: 800;
}

.admin-status-pill--active {
  background: #ecfdf3;
  color: #2f8a4f;
}

.admin-status-pill--pending {
  background: #fff7ed;
  color: #c2410c;
}

.admin-school-row__stats {
  justify-items: end;
  text-align: right;
}

.admin-school-row__stats strong {
  color: #14213d;
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
}

.admin-school-row__arrow {
  color: #94a3b8;
  font-size: 22px;
}

@media (max-width: 1023px) {
  .admin-sidebar {
    position: relative;
  }

  .admin-sidebar__header {
    justify-content: flex-start;
    min-height: 72px;
  }

  .admin-sidebar__brand {
    font-size: 36px;
  }

  .admin-sidebar__toggle {
    right: 4px;
  }
}

@media (max-width: 720px) {
  .admin-sidebar__item {
    font-size: 15px;
  }

  .admin-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-user {
    width: fit-content;
  }

  .admin-content {
    padding: 18px 12px 28px;
  }

  .admin-list-panel__header,
  .admin-school-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-primary-action,
  .admin-filter-button {
    width: 100%;
  }

  .admin-school-row {
    grid-template-columns: 44px minmax(0, 1fr) 22px;
    gap: 12px;
  }

  .admin-school-row__meta,
  .admin-school-row__stats {
    grid-column: 2 / 3;
    justify-items: start;
    text-align: left;
  }

  .admin-school-row__arrow {
    grid-column: 3 / 4;
    grid-row: 1 / 2;
  }
}
