.layout-page,
.content-wrapper,
.container-xxl,
body {
  transition: background-color 0.2s ease, color 0.2s ease;
}

.layout-navbar,
.layout-navbar.bg-navbar-theme {
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.school-hero-card,
.school-metric-card,
.school-action-card,
.card.mb-0,
.card.school-metric-card,
.card.school-action-card {
  transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

.ds-theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem;
  border-radius: 999px;
  background: rgba(115, 103, 240, 0.1);
  border: 1px solid rgba(115, 103, 240, 0.16);
}

.ds-theme-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 0;
  border-radius: 999px;
  color: inherit;
  background: transparent;
  padding-inline: 0.8rem;
}

.ds-theme-btn.active {
  background: #7367f0;
  color: #fff !important;
  box-shadow: 0 8px 18px rgba(115, 103, 240, 0.24);
}

.ds-theme-btn:hover,
.ds-theme-btn:focus {
  color: inherit;
}

.admin-page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.admin-page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.admin-surface-card {
  background: var(--bs-card-bg, #fff);
  border: 1px solid var(--bs-border-color, rgba(115, 103, 240, 0.14));
  border-radius: 1rem;
  box-shadow: 0 14px 28px rgba(115, 103, 240, 0.08);
}

.admin-table-wrap {
  overflow: hidden;
}

.admin-table-wrap .table {
  margin-bottom: 0;
}

.admin-page-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.admin-page-toolbar .form-control,
.admin-page-toolbar .form-select {
  min-width: 0;
}

.admin-stat-inline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.admin-stat-inline .item {
  padding: 1rem;
  border-radius: 0.875rem;
  border: 1px solid rgba(115, 103, 240, 0.12);
  background: rgba(115, 103, 240, 0.06);
}

[data-bs-theme="dark"] .layout-page,
[data-bs-theme="dark"] .content-wrapper,
[data-bs-theme="dark"] .container-xxl,
[data-bs-theme="dark"] body {
  background: #161a2f !important;
}

[data-bs-theme="dark"] .layout-navbar,
[data-bs-theme="dark"] .layout-navbar.bg-navbar-theme {
  background: #1d223d !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}

[data-bs-theme="dark"] .layout-navbar .badge,
[data-bs-theme="dark"] .layout-navbar .text-body-secondary,
[data-bs-theme="dark"] .layout-navbar .nav-link,
[data-bs-theme="dark"] .layout-navbar .small {
  color: #d7daf3 !important;
}

[data-bs-theme="dark"] .admin-surface-card {
  background: #202642;
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

[data-bs-theme="dark"] .admin-stat-inline .item {
  background: rgba(115, 103, 240, 0.12);
  border-color: rgba(255, 255, 255, 0.08);
}

.school-hero-card {
  background:
    radial-gradient(circle at top right, rgba(115, 103, 240, 0.18), transparent 36%),
    linear-gradient(135deg, rgba(36, 41, 61, 0.96), rgba(45, 49, 72, 0.96));
  color: #f8f7ff;
}

.school-hero-card .text-muted,
.school-hero-card .school-subtle {
  color: rgba(231, 229, 255, 0.76) !important;
}

.school-hero-card h3,
.school-hero-card .school-chip,
.school-hero-card .school-chip .icon-base {
  color: #fff;
}

[data-bs-theme="dark"] .school-hero-card .card {
  background: rgba(16, 18, 34, 0.68) !important;
  backdrop-filter: blur(8px);
}

.school-hero-sidecard,
.school-hero-sidecard.card,
.school-hero-sidecard .card-body {
  background: #2f3553 !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

[data-bs-theme="dark"] .school-hero-card .card .school-subtle,
[data-bs-theme="dark"] .school-hero-card .card .text-white,
[data-bs-theme="dark"] .school-hero-card .card .text-muted,
[data-bs-theme="dark"] .school-hero-sidecard .text-white,
[data-bs-theme="dark"] .school-hero-sidecard .text-muted,
[data-bs-theme="dark"] .school-hero-sidecard .small,
[data-bs-theme="dark"] .school-hero-sidecard .fw-semibold,
[data-bs-theme="dark"] .school-hero-sidecard div {
  color: rgba(255, 255, 255, 0.95) !important;
}

.school-metric-card {
  min-height: 100%;
}

[data-bs-theme="dark"] .school-metric-card,
[data-bs-theme="dark"] .school-action-card,
[data-bs-theme="dark"] .card.mb-0,
[data-bs-theme="dark"] .card.school-metric-card,
[data-bs-theme="dark"] .card.school-action-card {
  background: #202642 !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22) !important;
}

.school-metric-icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-size: 1.15rem;
  background: #7367f0 !important;
  color: #ffffff !important;
  box-shadow: 0 8px 18px rgba(115, 103, 240, 0.28);
  position: relative;
  overflow: hidden;
}

.school-metric-icon .icon-base,
.school-chip .icon-base,
.app-brand-logo .icon-base,
.navbar .icon-base,
.dropdown-menu .icon-base,
.btn .icon-base,
.menu-link .icon-base {
  font-size: 1.1rem !important;
  inline-size: 1.1rem !important;
  block-size: 1.1rem !important;
}

.school-svg-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.1rem;
  height: 1.1rem;
  flex: 0 0 auto;
}

.school-svg-icon svg {
  width: 100%;
  height: 100%;
  display: block;
  stroke: currentColor;
  fill: none;
  opacity: 1;
  stroke-width: 2.1;
}

.school-icon-fallback {
  position: absolute;
  inset: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #ffffff;
}

.school-svg-icon-md {
  width: 1.25rem;
  height: 1.25rem;
}

.school-svg-icon-lg {
  width: 1.5rem;
  height: 1.5rem;
}

.menu-link .menu-icon.icon-base {
  font-size: 1.25rem !important;
  inline-size: 1.25rem !important;
  block-size: 1.25rem !important;
}

.menu-link .menu-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.app-brand-logo .icon-base {
  font-size: 1.6rem !important;
  inline-size: 1.6rem !important;
  block-size: 1.6rem !important;
}

.school-action-card {
  min-height: 100%;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.school-action-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 0.75rem 1.4rem rgba(0, 0, 0, 0.28);
}

.school-section-title {
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.76rem;
  color: #a8aaae;
}

.school-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.school-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.school-overview-note {
  border-left: 4px solid #7367f0;
}

[data-bs-theme="dark"] .card .text-body-secondary,
[data-bs-theme="dark"] .card p.text-body-secondary,
[data-bs-theme="dark"] .card small.text-body-secondary {
  color: #aeb6db !important;
}

[data-bs-theme="dark"] .card h4,
[data-bs-theme="dark"] .card h5,
[data-bs-theme="dark"] .card .card-title,
[data-bs-theme="dark"] .card .card-text,
[data-bs-theme="dark"] .card .school-section-title {
  color: #f1f3ff;
}

.badge.bg-label-primary {
  color: #c9c5ff !important;
  background: rgba(115, 103, 240, 0.18) !important;
}

[data-bs-theme="dark"] .layout-navbar .text-body-secondary {
  color: #b6bedf !important;
}

[data-bs-theme="dark"] .school-hero-card .school-overview-note,
[data-bs-theme="dark"] .school-hero-card .school-overview-note div,
[data-bs-theme="dark"] .school-hero-card .school-overview-note .school-subtle {
  color: #ffffff !important;
}

.school-metric-icon,
.school-metric-icon .school-svg-icon,
.school-metric-icon .school-svg-icon svg {
  color: #ffffff !important;
}

.school-metric-icon .school-svg-icon {
  width: 1.35rem;
  height: 1.35rem;
}

[data-bs-theme="dark"] .school-hero-sidecard .school-overview-note,
[data-bs-theme="dark"] .school-hero-sidecard .school-overview-note div,
[data-bs-theme="dark"] .school-hero-sidecard .school-overview-note .school-subtle {
  color: #ffffff !important;
}

[data-bs-theme="dark"] .school-hero-sidecard .school-overview-note {
  border-left-color: #8b7dff;
}

[data-bs-theme="dark"] .school-hero-sidecard .school-overview-note .small,
[data-bs-theme="dark"] .school-hero-sidecard .school-overview-note .fw-semibold {
  color: #ffffff !important;
}

[data-bs-theme="dark"] .school-action-card p,
[data-bs-theme="dark"] .school-action-card .card-text,
[data-bs-theme="dark"] .school-action-card .text-body-secondary,
[data-bs-theme="dark"] .school-metric-card small,
[data-bs-theme="dark"] .school-metric-card .text-body-secondary,
[data-bs-theme="dark"] .card.mb-0 .text-body-secondary {
  color: #aeb6db !important;
}

[data-bs-theme="light"] .layout-page,
[data-bs-theme="light"] .content-wrapper,
[data-bs-theme="light"] .container-xxl,
[data-bs-theme="light"] body {
  background: #f5f7ff !important;
}

[data-bs-theme="light"] .layout-navbar,
[data-bs-theme="light"] .layout-navbar.bg-navbar-theme {
  background: rgba(255, 255, 255, 0.92) !important;
  border-color: rgba(115, 103, 240, 0.12) !important;
  backdrop-filter: blur(10px);
}

[data-bs-theme="light"] .layout-navbar .badge,
[data-bs-theme="light"] .layout-navbar .text-body-secondary,
[data-bs-theme="light"] .layout-navbar .nav-link,
[data-bs-theme="light"] .layout-navbar .small {
  color: #5f6482 !important;
}

[data-bs-theme="light"] .school-hero-card {
  background:
    radial-gradient(circle at top right, rgba(115, 103, 240, 0.16), transparent 36%),
    linear-gradient(135deg, #7367f0, #8c82ff);
}

[data-bs-theme="light"] .school-hero-card .card {
  background: rgba(255, 255, 255, 0.22) !important;
  backdrop-filter: blur(10px);
}

[data-bs-theme="light"] .school-hero-sidecard,
[data-bs-theme="light"] .school-hero-sidecard.card,
[data-bs-theme="light"] .school-hero-sidecard .card-body {
  background: rgba(255, 255, 255, 0.18) !important;
  border-color: rgba(255, 255, 255, 0.28) !important;
}

[data-bs-theme="light"] .school-hero-card .school-subtle,
[data-bs-theme="light"] .school-hero-card .text-muted {
  color: rgba(255, 255, 255, 0.84) !important;
}

[data-bs-theme="light"] .school-hero-sidecard,
[data-bs-theme="light"] .school-hero-sidecard div,
[data-bs-theme="light"] .school-hero-sidecard .text-white,
[data-bs-theme="light"] .school-hero-sidecard .text-muted,
[data-bs-theme="light"] .school-hero-sidecard .small,
[data-bs-theme="light"] .school-hero-sidecard .fw-semibold,
[data-bs-theme="light"] .school-hero-card .card .school-subtle {
  color: #4f5678 !important;
}

[data-bs-theme="light"] .school-hero-sidecard .text-white,
[data-bs-theme="light"] .school-hero-sidecard .fw-semibold {
  color: #252b47 !important;
}

[data-bs-theme="light"] .school-hero-sidecard .school-overview-note,
[data-bs-theme="light"] .school-hero-sidecard .school-overview-note div,
[data-bs-theme="light"] .school-hero-sidecard .school-overview-note .school-subtle,
[data-bs-theme="light"] .school-hero-sidecard .school-overview-note .small {
  color: #5f6482 !important;
}

[data-bs-theme="light"] .school-hero-sidecard .school-overview-note .fw-semibold {
  color: #252b47 !important;
}

[data-bs-theme="light"] .school-hero-sidecard .school-overview-note {
  border-left-color: #7367f0;
}

[data-bs-theme="light"] .school-metric-card,
[data-bs-theme="light"] .school-action-card,
[data-bs-theme="light"] .card.mb-0,
[data-bs-theme="light"] .card.school-metric-card,
[data-bs-theme="light"] .card.school-action-card {
  background: #ffffff !important;
  border: 1px solid rgba(115, 103, 240, 0.12) !important;
  box-shadow: 0 14px 28px rgba(115, 103, 240, 0.08) !important;
}

[data-bs-theme="light"] .card .text-body-secondary,
[data-bs-theme="light"] .card p.text-body-secondary,
[data-bs-theme="light"] .card small.text-body-secondary,
[data-bs-theme="light"] .school-action-card p,
[data-bs-theme="light"] .school-action-card .card-text,
[data-bs-theme="light"] .school-action-card .text-body-secondary,
[data-bs-theme="light"] .school-metric-card small,
[data-bs-theme="light"] .school-metric-card .text-body-secondary,
[data-bs-theme="light"] .card.mb-0 .text-body-secondary {
  color: #6d748f !important;
}

[data-bs-theme="light"] .card h4,
[data-bs-theme="light"] .card h5,
[data-bs-theme="light"] .card .card-title,
[data-bs-theme="light"] .card .card-text,
[data-bs-theme="light"] .card .school-section-title {
  color: #252b47;
}

[data-bs-theme="light"] .ds-theme-toggle {
  background: rgba(115, 103, 240, 0.08);
  border-color: rgba(115, 103, 240, 0.14);
}

[data-bs-theme="light"] .admin-surface-card {
  background: #ffffff;
  border-color: rgba(115, 103, 240, 0.12);
}

[data-bs-theme="light"] .admin-table-wrap .table {
  --bs-table-bg: #ffffff;
}

@media (max-width: 767.98px) {
  .ds-theme-toggle {
    width: 100%;
    justify-content: center;
  }

  .ds-theme-btn {
    padding-inline: 0.7rem;
  }

  .admin-page-actions {
    width: 100%;
  }
}
