:root {
  --experience-blue: #31599f;
  --experience-navy: #17356f;
  --experience-violet: #75a93c;
  --experience-green: #5b9631;
  --experience-amber: #d97706;
  --experience-surface: #ffffff;
  --experience-border: #dfe6f0;
  --experience-muted: #728096;
  --experience-shadow: 0 8px 28px rgba(15, 23, 42, 0.07);
}

body {
  background:
    radial-gradient(circle at 82% 5%, rgba(219, 234, 254, 0.62), transparent 25%),
    #f4f6fa;
  font-family: "Nunito Sans", Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.topbar {
  height: 68px;
  padding: 0 20px;
  border-bottom: 1px solid #e3e8f0;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 3px 14px rgba(15, 23, 42, 0.045);
  backdrop-filter: blur(12px);
}

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

.sidebar-toggle {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  padding: 0;
  border: 1px solid #dbe3ef;
  border-radius: 10px;
  background: #f7f9fc;
  color: #53627a;
  font-size: 16px;
  transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.sidebar-toggle:hover {
  border-color: #b9d0fb;
  background: #eaf2ff;
  color: #1d4ed8;
  transform: translateY(-1px);
}

.top-brand {
  gap: 11px;
  color: #172033;
  font-size: 15px;
  font-weight: 800;
}

.top-brand-logo {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  object-fit: contain;
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.1);
}

#roleBadge {
  padding: 6px 10px;
  border: 0;
  border-radius: 999px;
  background: #eaf2ff !important;
  color: #1d4ed8 !important;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.45px;
}

.user-pill {
  padding: 5px 13px 5px 5px;
  border: 1px solid #e5eaf1;
  background: #f7f9fc;
  color: #273248;
  font-size: 12px;
}

.user-pill span {
  width: 30px;
  height: 30px;
  background: linear-gradient(135deg, #dbeafe, #ede9fe);
  color: #1d4ed8;
}

#logoutBtn {
  min-height: 36px;
  padding: 7px 12px;
  border-color: #d5dce7;
  border-radius: 9px;
  color: #596579;
  font-size: 11px;
  font-weight: 700;
}

#logoutBtn:hover {
  border-color: #dc2626;
  background: #fff1f2;
  color: #be123c;
}

.app-layout {
  min-height: calc(100vh - 68px);
}

.sidebar {
  top: 68px;
  width: 246px;
  height: calc(100vh - 68px);
  padding: 20px 12px;
  border-right: 1px solid #e2e8f0;
  background: rgba(255, 255, 255, 0.94);
  transition: width 0.22s ease, padding 0.22s ease, border-color 0.22s ease, transform 0.22s ease;
}

.sidebar-hidden .sidebar {
  width: 0;
  min-width: 0;
  padding-right: 0;
  padding-left: 0;
  overflow: hidden;
  border-right-color: transparent;
  transform: translateX(-100%);
}

.sidebar-hidden .page-content {
  max-width: 1440px;
}

.nav-section {
  padding: 16px 12px 7px;
  color: #9aa5b5;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 1px;
}

.side-link {
  position: relative;
  gap: 11px;
  min-height: 42px;
  padding: 10px 12px;
  margin: 3px 0;
  border: 1px solid transparent;
  border-radius: 11px;
  color: #5f6c80;
  font-size: 12px;
  font-weight: 650;
  transition: 0.18s ease;
}

.side-link i {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border-radius: 8px;
  color: #718096;
  font-size: 13px;
}

.side-link:hover {
  border-color: #e3e9f2;
  background: #f7faff;
  color: #1d4ed8;
  transform: translateX(2px);
}

.side-link.active {
  border-color: #cfe0ff;
  background: linear-gradient(90deg, #eaf2ff, #f2f5ff);
  color: #1d4ed8;
  box-shadow: inset 3px 0 0 #2563eb;
}

.side-link.active i {
  background: #dbeafe;
  color: #1d4ed8;
}

.page-content {
  width: min(100%, 1360px);
  max-width: 1360px;
  padding: 24px 30px;
}

.page-heading {
  min-height: 82px;
  padding: 17px 20px;
  margin-bottom: 14px;
  border: 1px solid var(--experience-border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 5px 18px rgba(15, 23, 42, 0.04);
}

.page-heading h2 {
  color: #172033;
  font-size: 21px;
  font-weight: 800;
}

.page-heading p {
  margin-top: 4px;
  color: var(--experience-muted);
  font-size: 12px;
}

.page-heading .btn {
  min-height: 39px;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 750;
}

.panel {
  border-color: var(--experience-border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.045);
}

.table {
  --bs-table-bg: transparent;
  --bs-table-hover-bg: #f8fbff;
  color: #354056;
  font-size: 12px;
}

.table thead th {
  border-bottom-color: #e2e8f0;
  color: #768399;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.45px;
  text-transform: uppercase;
}

.table tbody td {
  border-bottom-color: #edf1f6;
}

.table tbody tr {
  transition: background 0.16s ease;
}

.table tbody tr:hover {
  background: #f8fbff;
}

.table .btn-sm {
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
}

.table-action-group,
.asset-row-actions,
.editor-list-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  flex-wrap: nowrap;
}

.table-action-group .btn,
.asset-row-actions .btn,
.editor-list-actions .btn,
.open-school-exercise {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 8px 13px;
  border-width: 1px;
  border-radius: 9px;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.045);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.table-action-group .btn i,
.asset-row-actions .btn i,
.editor-list-actions .btn i,
.open-school-exercise i {
  font-size: 13px;
}

.table-action-group .btn:hover:not(:disabled),
.asset-row-actions .btn:hover:not(:disabled),
.editor-list-actions .btn:hover:not(:disabled),
.open-school-exercise:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 5px 12px rgba(15, 23, 42, 0.11);
}

.table-action-group .btn-outline-primary,
.table-action-group .assign-school-classes,
.table-action-group .manage-buttons {
  border-color: #b9d0fb;
  background: #eef5ff;
  color: #1d4ed8;
}

.table-action-group .btn-outline-primary:hover,
.table-action-group .assign-school-classes:hover,
.table-action-group .manage-buttons:hover {
  border-color: #1d4ed8;
  background: #1d4ed8;
  color: #fff;
}

.table-action-group .btn-outline-secondary,
.table-action-group .asset-edit-btn,
.asset-row-actions .asset-edit-btn,
.editor-list-actions .btn-outline-secondary {
  border-color: #cfd9e8;
  background: #f7f9fc;
  color: #475569;
}

.table-action-group .btn-outline-secondary:hover,
.table-action-group .asset-edit-btn:hover,
.asset-row-actions .asset-edit-btn:hover,
.editor-list-actions .btn-outline-secondary:hover {
  border-color: #64748b;
  background: #475569;
  color: #fff;
}

.table-action-group .btn-outline-warning,
.table-action-group .reset-password {
  border-color: #f5d58b;
  background: #fffbeb;
  color: #a16207;
}

.table-action-group .btn-outline-warning:hover,
.table-action-group .reset-password:hover {
  border-color: #d97706;
  background: #d97706;
  color: #fff;
}

.table-action-group .btn-outline-danger,
.table-action-group .asset-delete-btn,
.asset-row-actions .asset-delete-btn,
.editor-list-actions .btn-outline-danger {
  border-color: #fecdd3;
  background: #fff5f6;
  color: #be123c;
}

.table-action-group .btn-outline-danger:hover,
.table-action-group .asset-delete-btn:hover,
.asset-row-actions .asset-delete-btn:hover,
.editor-list-actions .btn-outline-danger:hover {
  border-color: #be123c;
  background: #be123c;
  color: #fff;
}

.table-action-group .btn-outline-success {
  border-color: #a7e7ce;
  background: #ecfdf5;
  color: #047857;
}

.table-action-group .btn-outline-success:hover {
  border-color: #059669;
  background: #059669;
  color: #fff;
}

.table-action-group .btn:disabled {
  border-color: #e2e8f0;
  background: #f1f5f9;
  color: #94a3b8;
  box-shadow: none;
  opacity: 1;
}

.admin-table-scroll td:last-child,
.curriculum-table-scroll td:last-child,
.asset-table td:last-child {
  min-width: 190px;
}

.school-exercise-item .open-school-exercise {
  min-width: 92px;
}

.badge {
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}

.form-control,
.form-select {
  border-color: #d7dfeb;
  border-radius: 10px;
  color: #29354a;
  font-size: 12px;
}

.form-control:focus,
.form-select:focus {
  border-color: #78a5fb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.modal-content {
  border: 0;
  border-radius: 18px;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.24);
}

.modal-header,
.modal-footer {
  border-color: #e7ebf2;
}

.modal-title {
  color: #1e293b;
  font-weight: 800;
}

.stat-grid {
  gap: 11px;
  margin-bottom: 14px;
}

.stat {
  min-height: 80px;
  border-color: var(--experience-border);
  border-radius: 14px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
}

.stat i {
  background: linear-gradient(135deg, #eaf2ff, #ede9fe);
}

.stat b {
  color: #172033;
  font-size: 21px;
}

.stat small {
  font-size: 11px;
}

.experience-dashboard {
  display: grid;
  gap: 14px;
}

.course-assignment-empty {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 180px;
  padding: 28px 32px;
  border: 1px solid #c7d8f5;
  border-radius: 20px;
  background: linear-gradient(135deg, #ffffff, #eef6ff);
  box-shadow: 0 12px 28px rgba(30, 64, 175, 0.08);
}

.course-assignment-icon {
  display: grid;
  flex: 0 0 auto;
  width: 64px;
  height: 64px;
  place-items: center;
  border-radius: 20px;
  background: #e0ecff;
  color: #2563eb;
  font-size: 28px;
}

.course-assignment-empty h2 {
  margin: 5px 0 8px;
  color: #172554;
  font-size: 22px;
  font-weight: 800;
}

.course-assignment-empty p {
  max-width: 660px;
  margin: 0;
  color: #526581;
  font-size: 14px;
  line-height: 1.65;
}

.experience-hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 180px;
  padding: 28px 30px;
  overflow: hidden;
  border-radius: 22px;
  color: #fff;
  box-shadow: 0 18px 42px rgba(46, 12, 98, 0.22);
}

.experience-hero.publisher {
  background: linear-gradient(118deg, #17356f 0%, #31599f 52%, #87b947 100%);
}

.experience-hero.school {
  background: linear-gradient(118deg, #17356f 0%, #31599f 52%, #5b9f89 100%);
  box-shadow: 0 18px 42px rgba(23, 53, 111, 0.22);
}

.experience-hero::before,
.experience-hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.09);
}

.experience-hero::before {
  width: 290px;
  height: 290px;
  right: 8%;
  top: -205px;
}

.experience-hero::after {
  width: 210px;
  height: 210px;
  right: -45px;
  bottom: -150px;
}

.experience-hero-copy,
.experience-hero-visual {
  position: relative;
  z-index: 1;
}

.experience-hero-copy {
  max-width: 680px;
}

.experience-kicker {
  display: block;
  margin-bottom: 6px;
  color: inherit;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1.45px;
  color: #ddd6fe;
  opacity: 1;
}

.experience-hero h1 {
  margin: 0 0 7px;
  font-size: clamp(24px, 2.5vw, 34px);
  font-weight: 850;
}

.experience-hero p {
  max-width: 620px;
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 13px;
}

.experience-hero-actions {
  display: flex;
  gap: 9px;
  margin-top: 20px;
}

.experience-hero-actions .btn {
  min-height: 41px;
  padding: 9px 15px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 800;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.experience-hero-actions .primary {
  border-color: #fff;
  background: #fff;
  color: #4c1d95;
  box-shadow: 0 8px 18px rgba(30, 10, 72, 0.2);
}

.experience-hero-actions .secondary {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.11);
  color: #fff;
}

.experience-hero-actions .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(30, 10, 72, 0.24);
}

.experience-hero-actions .secondary:hover {
  border-color: rgba(255, 255, 255, 0.48);
  background: rgba(255, 255, 255, 0.18);
}

.experience-hero-visual {
  display: grid;
  place-items: center;
  width: 112px;
  height: 112px;
  margin-right: 30px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.13);
  font-size: 52px;
  transform: rotate(5deg);
  backdrop-filter: blur(7px);
}

.experience-metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 11px;
}

.experience-metric {
  position: relative;
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 94px;
  padding: 15px;
  border: 1px solid var(--experience-border);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 5px 17px rgba(15, 23, 42, 0.045);
  overflow: hidden;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.experience-metric::before {
  position: absolute;
  top: 0;
  right: 14px;
  left: 14px;
  height: 3px;
  border-radius: 0 0 4px 4px;
  background: #2563eb;
  content: "";
}

.experience-metric.violet::before { background: #75a93c; }
.experience-metric.amber::before { background: #f97316; }
.experience-metric.green::before { background: #10b981; }

.experience-metric:hover {
  border-color: #c8d3e2;
  box-shadow: 0 10px 24px rgba(30, 41, 59, 0.08);
  transform: translateY(-2px);
}

.experience-metric > span {
  display: grid;
  place-items: center;
  width: 45px;
  height: 45px;
  flex: 0 0 auto;
  border-radius: 13px;
  font-size: 19px;
}

.experience-metric.blue > span { background: #eaf2ff; color: #1d4ed8; }
.experience-metric.violet > span { background: #edf6df; color: #5b9631; }
.experience-metric.amber > span { background: #fff7e6; color: #d97706; }
.experience-metric.green > span { background: #ecfdf5; color: #059669; }

.experience-metric strong,
.experience-metric h3,
.experience-metric p {
  margin: 0;
}

.experience-metric strong {
  display: block;
  color: #172033;
  font-size: 21px;
  line-height: 1;
}

.experience-metric h3 {
  margin-top: 4px;
  color: #344057;
  font-size: 11px;
  font-weight: 800;
}

.experience-metric p {
  margin-top: 2px;
  color: #657287;
  font-size: 11px;
}

.experience-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.75fr);
  gap: 14px;
}

.experience-card {
  border: 1px solid #d8e0eb;
  border-radius: 17px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.055);
}

.experience-card > header {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 17px 18px 13px;
}

.experience-card > header > span {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: #f1eafe;
  color: #6d28d9;
}

.experience-card h2,
.experience-card p {
  margin: 0;
}

.experience-card h2 {
  color: #1e293b;
  font-size: 14px;
  font-weight: 850;
}

.experience-card p {
  margin-top: 2px;
  color: #657287;
  font-size: 11px;
}

.workflow-steps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  padding: 0 18px 18px;
}

.workflow-steps button {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 11px;
  border: 1px solid #dde4ee;
  border-radius: 11px;
  background: linear-gradient(180deg, #fff, #f8f9fc);
  color: inherit;
  text-align: left;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.workflow-steps button:hover {
  border-color: #c4b5fd;
  background: #faf7ff;
  box-shadow: 0 7px 15px rgba(76, 29, 149, 0.08);
  transform: translateY(-1px);
}

.workflow-steps b {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: #ede9fe;
  color: #6d28d9;
  font-size: 11px;
}

.workflow-steps strong,
.workflow-steps small {
  display: block;
}

.workflow-steps strong {
  color: #344057;
  font-size: 11px;
}

.workflow-steps small {
  margin-top: 2px;
  color: #687589;
  font-size: 11px;
}

.workflow-steps > button > i {
  color: #8066b5;
}

.quick-access-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  padding: 0 18px 18px;
}

.quick-access-grid button {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  padding: 10px;
  border: 1px solid #dde4ee;
  border-radius: 11px;
  background: #fff;
  color: #4b5870;
  font-size: 11px;
  font-weight: 750;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.quick-access-grid button i {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  border-radius: 9px;
  background: #f3e8ff;
  color: #7c3aed;
  font-size: 13px;
}

.quick-access-grid button:hover {
  border-color: #c4b5fd;
  background: #faf7ff;
  color: #6d28d9;
  box-shadow: 0 7px 15px rgba(76, 29, 149, 0.08);
  transform: translateY(-1px);
}

.school-actions-grid {
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
}

.learning-start-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 15px;
  padding: 20px;
  background: linear-gradient(135deg, #fff 0%, #faf7ff 58%, #eff8ff 100%);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.learning-start-card:hover {
  border-color: #c4b5fd;
  box-shadow: 0 11px 26px rgba(76, 29, 149, 0.09);
  transform: translateY(-1px);
}

.learning-start-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 15px;
  background: linear-gradient(135deg, #ede9fe, #cffafe);
  color: #6d28d9;
  font-size: 24px;
}

.learning-start-card .experience-kicker {
  color: #6d28d9;
  opacity: 1;
}

.learning-start-content h2 {
  margin: 4px 0 5px;
  color: #1e1b4b;
  font-size: 18px;
  font-weight: 800;
}

.learning-start-content > p {
  margin: 0;
  color: #64748b;
  font-size: 12px;
  line-height: 1.55;
}

.learning-start-features {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 11px;
}

.learning-start-features span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  border: 1px solid #ddd6fe;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: #5b21b6;
  font-size: 10px;
  font-weight: 750;
}

.learning-start-features i {
  color: #7c3aed;
  font-size: 11px;
}

.learning-start-content small {
  display: block;
  margin-top: 10px;
  color: #7c5cab;
  font-size: 10px;
  line-height: 1.4;
}

.learning-start-content small i {
  margin-right: 4px;
  color: #d97706;
}

.learning-start-card .btn {
  border-radius: 10px;
  font-size: 11px;
  font-weight: 800;
}

.curriculum-page-heading {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  min-height: 92px;
  padding: 17px 20px;
  margin-bottom: 12px;
  border: 1px solid #dce5f0;
  border-radius: 17px;
  background: linear-gradient(115deg, #ffffff, #f3f7ff);
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.045);
}

.curriculum-heading-copy {
  display: flex;
  align-items: center;
  gap: 13px;
}

.curriculum-heading-copy > div > span {
  display: block;
  margin-bottom: 2px;
  color: #7c8ba1;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1.15px;
}

.curriculum-heading-copy h2,
.curriculum-heading-copy p {
  margin: 0;
}

.curriculum-heading-copy h2 {
  color: #172033;
  font-size: 20px;
  font-weight: 850;
}

.curriculum-heading-copy p {
  margin-top: 2px;
  color: #78869b;
  font-size: 11px;
}

.curriculum-heading-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  font-size: 20px;
}

.curriculum-heading-icon.classes { background: #eaf2ff; color: #1d4ed8; }
.curriculum-heading-icon.subjects { background: #edf6df; color: #5b9631; }
.curriculum-heading-icon.chapters { background: #ecfdf5; color: #059669; }

.curriculum-page-heading .btn {
  min-height: 39px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 800;
}

.curriculum-list-panel {
  gap: 10px;
}

.curriculum-panel-title {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid #edf1f6;
}

.curriculum-panel-title h3,
.curriculum-panel-title p {
  margin: 0;
}

.curriculum-panel-title h3 {
  color: #243047;
  font-size: 14px;
  font-weight: 800;
}

.curriculum-panel-title p {
  margin-top: 2px;
  color: #8995a7;
  font-size: 11px;
}

.curriculum-list-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #f3f6fa;
  color: #64748b;
}

.curriculum-filter-group {
  display: flex;
  gap: 8px;
}

.curriculum-inline-filter {
  min-width: 180px;
}

.curriculum-inline-filter label {
  display: block;
  margin: 0 0 3px 2px;
  color: #7b8799;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.35px;
  text-transform: uppercase;
}

.curriculum-inline-filter .form-select {
  min-height: 35px;
  padding-top: 5px;
  padding-bottom: 5px;
  font-size: 11px;
}

.polished-table thead th {
  background: #f8fafc;
}

.admin-table-page .page-heading {
  background: linear-gradient(115deg, #ffffff, #f4f7ff);
}

.admin-table-panel {
  border-radius: 16px;
}

.school-logo-thumb {
  border: 1px solid #e1e7ef;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.06);
}

.assignment-class-option {
  border-radius: 12px;
  transition: 0.16s ease;
}

.assignment-class-option:hover {
  border-color: #9ebcf5;
  background: #f5f9ff;
}

.school-exercise-panel {
  border-color: var(--experience-border);
  border-radius: 17px;
  box-shadow: var(--experience-shadow);
}

.school-exercise-filters {
  border: 1px solid #e3e9f1;
  background: linear-gradient(115deg, #f8fafc, #f3f7ff);
}

.school-exercise-group {
  border-color: #e0e6ef;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.035);
}

.school-exercise-item:hover {
  border-color: #b9cff8;
  background: #f8fbff;
}

.report-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 11px;
  margin-bottom: 14px;
}

.report-summary-grid article {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 78px;
  padding: 14px;
  border: 1px solid var(--experience-border);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
}

.report-summary-grid article > span {
  display: grid;
  place-items: center;
  width: 41px;
  height: 41px;
  border-radius: 12px;
  font-size: 17px;
}

.report-summary-grid .blue { background: #eaf2ff; color: #1d4ed8; }
.report-summary-grid .green { background: #ecfdf5; color: #059669; }
.report-summary-grid .violet { background: #edf6df; color: #5b9631; }

.report-summary-grid strong,
.report-summary-grid small {
  display: block;
}

.report-summary-grid strong {
  color: #172033;
  font-size: 20px;
  line-height: 1;
}

.report-summary-grid small {
  margin-top: 5px;
  color: #7f8b9e;
  font-size: 11px;
}

.report-table-panel {
  overflow: hidden;
  padding: 0;
}

.report-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid #e8edf3;
  background: linear-gradient(115deg, #fff, #f7f9fd);
}

.report-panel-heading h3,
.report-panel-heading p {
  margin: 0;
}

.report-panel-heading h3 {
  color: #243047;
  font-size: 14px;
  font-weight: 800;
}

.report-panel-heading p {
  margin-top: 2px;
  color: #8490a3;
  font-size: 11px;
}

.report-panel-heading > span {
  padding: 5px 9px;
  border-radius: 999px;
  background: #eaf2ff;
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 800;
}

.report-table-panel .table-responsive {
  max-height: calc(100vh - 335px);
  overflow: auto;
}

.report-exercise-name,
.report-date {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.report-exercise-name i {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  border-radius: 9px;
  background: #ecfdf5;
  color: #059669;
}

.report-exercise-name.school i {
  background: #eaf2ff;
  color: #1d4ed8;
}

.report-score,
.submission-count {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 850;
}

.report-score.high { background: #ecfdf5; color: #047857; }
.report-score.medium { background: #fff7e6; color: #b45309; }
.report-score.low { background: #fff1f2; color: #be123c; }
.submission-count { background: #eaf2ff; color: #1d4ed8; }

.report-date {
  color: #78869a;
  font-size: 11px;
}

@media (max-width: 1050px) {
  .experience-metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .experience-dashboard-grid,
  .school-actions-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .topbar { height: 64px; }
  .app-layout { min-height: calc(100vh - 64px); }
  .sidebar { top: 64px; width: 78px; height: calc(100vh - 64px); }
  .page-content { padding: 18px; }
  .side-link { justify-content: center; }
  .side-link i { font-size: 15px; }
  .experience-hero-visual { display: none; }
  .table-action-group .btn,
  .asset-row-actions .btn {
    width: 35px;
    padding-right: 0;
    padding-left: 0;
  }
  .table-action-group .btn span,
  .asset-row-actions .btn span {
    display: none;
  }
}

@media (max-width: 700px) {
  .topbar { padding: 0 12px; }
  .topbar > .d-flex { gap: 7px !important; }
  .top-brand span { display: none; }
  #logoutBtn { padding: 7px 9px; }
  #logoutBtn { font-size: 0; }
  #logoutBtn i { font-size: 14px; }
  .page-content { padding: 12px; }
  .page-heading,
  .curriculum-page-heading { align-items: flex-start; flex-direction: column; }
  .page-heading .btn,
  .curriculum-page-heading .btn { width: 100%; }
  .experience-hero { min-height: 220px; padding: 23px 20px; }
  .experience-hero-actions { flex-direction: column; }
  .experience-hero-actions .btn { width: 100%; }
  .course-assignment-empty { align-items: flex-start; min-height: 0; padding: 22px; }
  .course-assignment-icon { width: 52px; height: 52px; border-radius: 16px; font-size: 23px; }
  .course-assignment-empty h2 { font-size: 19px; }
  .experience-metric-grid { grid-template-columns: 1fr; }
  .workflow-steps,
  .quick-access-grid { grid-template-columns: 1fr; }
  .learning-start-card { grid-template-columns: 1fr; }
  .learning-start-card .btn { width: 100%; }
  .curriculum-panel-title { align-items: stretch; flex-direction: column; }
  .curriculum-filter-group { flex-direction: column; }
  .curriculum-inline-filter { width: 100%; min-width: 0; }
  .report-summary-grid { grid-template-columns: 1fr; }
}

/* Shared form experience */
.app-form-modal .modal-dialog {
  max-width: 760px;
}

.app-form-modal .modal-dialog.content-upload-modal {
  max-width: 980px;
}

.app-form-modal .modal-content,
.editor-form-modal .modal-content {
  overflow: hidden;
  border: 1px solid rgba(203, 213, 225, 0.75);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 30px 90px rgba(15, 23, 42, 0.28);
}

.app-form-modal .modal-header,
.editor-form-modal .modal-header {
  min-height: 78px;
  padding: 17px 22px;
  border-bottom: 1px solid #e7edf5;
  background: linear-gradient(135deg, #fff 0%, #f7faff 68%, #eef4ff 100%);
}

.form-modal-heading {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 13px;
}

.form-modal-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border: 1px solid #cfe0ff;
  border-radius: 13px;
  background: linear-gradient(145deg, #eff6ff, #dbeafe);
  color: #1d4ed8;
  box-shadow: 0 6px 15px rgba(37, 99, 235, 0.1);
  font-size: 18px;
}

.form-modal-icon.violet {
  border-color: #ddd6fe;
  background: linear-gradient(145deg, #f5f3ff, #ede9fe);
  color: #7c3aed;
}

.form-modal-heading .modal-title {
  margin-bottom: 2px;
  color: #172033;
  font-size: 18px;
  font-weight: 850;
}

.form-modal-heading small {
  display: block;
  color: #718096;
  font-size: 11px;
}

.app-form-modal .btn-close,
.editor-form-modal .btn-close {
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 10px;
  background-size: 12px;
  transition: background-color 0.16s ease, transform 0.16s ease;
}

.app-form-modal .btn-close:hover,
.editor-form-modal .btn-close:hover {
  background-color: #e9eef7;
  transform: rotate(4deg);
}

.app-form-modal .modal-body {
  padding: 22px;
  background: #f7f9fc;
}

.standard-form-surface {
  padding: 20px;
  border: 1px solid #e1e7f0;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 7px 20px rgba(15, 23, 42, 0.04);
}

.standard-form-surface > .form-label:not(:first-child),
.standard-form-surface > div:not(:first-child) > .form-label:first-child {
  margin-top: 2px;
}

.standard-form-surface > p.text-secondary:first-child {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid #dbe7f7;
  border-radius: 10px;
  background: #f6f9fe;
  color: #607089 !important;
}

.app-form-modal .modal-body > .row,
.app-form-modal .modal-body > .assignment-class-list,
.app-form-modal .modal-body > label:first-child,
.app-form-modal .modal-body > .searchable-picker:first-of-type {
  position: relative;
}

.app-form-modal .form-label,
.editor-form-modal .form-label {
  margin-bottom: 7px;
  color: #334155;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08px;
}

.app-form-modal .form-control,
.app-form-modal .form-select,
.editor-form-modal .form-control,
.editor-form-modal .form-select {
  min-height: 46px;
  padding: 10px 13px;
  border: 1px solid #d5deeb;
  border-radius: 11px;
  background-color: #fff;
  color: #1e293b;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.025);
}

.app-form-modal .form-select,
.editor-form-modal .form-select {
  padding-right: 38px;
}

.app-form-modal .form-control:hover,
.app-form-modal .form-select:hover,
.editor-form-modal .form-control:hover,
.editor-form-modal .form-select:hover {
  border-color: #aebed3;
}

.app-form-modal .form-control:focus,
.app-form-modal .form-select:focus,
.editor-form-modal .form-control:focus,
.editor-form-modal .form-select:focus {
  border-color: #4f83e8;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.11);
}

.app-form-modal .form-control::placeholder,
.editor-form-modal .form-control::placeholder {
  color: #9aa7b9;
  font-weight: 500;
}

.app-form-modal input[type="file"].form-control {
  padding: 7px;
  color: #64748b;
}

.app-form-modal input[type="file"].form-control::file-selector-button {
  min-height: 30px;
  padding: 6px 12px;
  margin: -1px 10px -1px -1px;
  border: 0;
  border-radius: 8px;
  background: #eaf2ff;
  color: #1d4ed8;
  font-weight: 800;
}

.app-form-modal .text-secondary,
.app-form-modal small.text-secondary {
  color: #718096 !important;
  font-size: 11px;
}

.app-form-modal .alert {
  padding: 12px 14px;
  border: 1px solid #cfe0ff;
  border-radius: 11px;
  background: #eff6ff;
  color: #334e77;
}

.app-form-modal .searchable-picker-menu {
  z-index: 1080;
  max-height: 220px;
  margin-top: 6px;
  overflow-y: auto;
  border: 1px solid #d8e1ee;
  border-radius: 12px;
  box-shadow: 0 16px 35px rgba(15, 23, 42, 0.14);
}

.app-form-modal .searchable-picker.menu-open {
  margin-bottom: 232px !important;
}

.app-form-modal .searchable-picker.menu-open .searchable-picker-menu {
  max-height: 206px;
}

.app-form-modal .searchable-picker-menu .list-group-item {
  padding: 11px 13px;
  border-color: #edf1f6;
  color: #334155;
  font-size: 12px;
  font-weight: 650;
}

.app-form-modal .searchable-picker-menu .list-group-item-action:hover {
  background: #eef5ff;
  color: #1d4ed8;
}

.app-form-modal .form-check-input {
  width: 18px;
  height: 18px;
  border-color: #aebdd1;
  box-shadow: none;
}

.app-form-modal .form-check-input:checked {
  border-color: #2563eb;
  background-color: #2563eb;
}

.app-form-modal .modal-footer,
.editor-form-modal .modal-footer {
  gap: 9px;
  padding: 14px 22px;
  border-top: 1px solid #e7edf5;
  background: #fff;
}

.app-form-modal .modal-footer .btn,
.editor-form-modal .modal-footer .btn,
.editor-form-modal #saveHotspot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  padding: 9px 17px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 800;
}

.app-form-modal .form-cancel-btn {
  border-color: #d4dce8;
  background: #fff;
  color: #526075;
}

.app-form-modal .form-save-btn,
.editor-form-modal .btn-primary {
  border-color: #1d4ed8;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  box-shadow: 0 7px 16px rgba(37, 99, 235, 0.2);
}

.assignment-class-list {
  display: grid;
  gap: 10px;
}

.assignment-class-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 14px;
  border: 1px solid #dce4ef;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.assignment-class-option:hover {
  border-color: #9cbcf5;
  background: #f7faff;
  transform: translateY(-1px);
}

.assignment-class-option b,
.assignment-class-option small {
  display: block;
}

.assignment-class-option b { color: #24324a; font-size: 13px; }
.assignment-class-option small { margin-top: 2px; color: #7b8798; font-size: 11px; }

.assignment-curriculum-option {
  border: 1px solid #dbe5f3;
  border-radius: 12px;
  overflow: hidden;
}

.assignment-curriculum-option .assignment-class-option {
  border: 0;
  border-radius: 0;
}

.assignment-subject-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 14px 14px 42px;
}

.assignment-subject-option {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 9px;
  border: 1px solid #cddcf2;
  border-radius: 8px;
  color: #334155;
  font-size: 12px;
  cursor: pointer;
}

.assignment-subject-option:has(input:checked) {
  border-color: #2563eb;
  background: #eff6ff;
  color: #174ea6;
}

.assignment-subject-option:has(input:disabled) {
  opacity: 0.5;
  cursor: not-allowed;
}

.editor-form-modal .modal-body {
  padding: 18px;
  background: #f4f7fb;
}

.editor-form-modal .editor-panel {
  padding: 18px;
  border: 1px solid #dfe6f0;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.editor-panel-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 13px;
  margin-bottom: 15px;
  border-bottom: 1px solid #edf1f6;
}

.editor-panel-heading > span {
  display: grid;
  place-items: center;
  width: 35px;
  height: 35px;
  border-radius: 10px;
  background: #eef2ff;
  color: #6366f1;
}

.editor-panel-heading h6,
.editor-panel-heading p { margin: 0; }
.editor-panel-heading h6 { color: #1e293b; font-size: 13px; font-weight: 850; }
.editor-panel-heading p { margin-top: 2px; color: #8491a4; font-size: 11px; }

.editor-page-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 10px;
}

.editor-page-controls .btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 35px;
  border-radius: 9px;
  font-weight: 750;
}

.editor-canvas-help {
  margin: 9px 0 0;
  color: #718096;
  text-align: center;
  font-size: 11px;
}

.editor-saved-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 15px;
  margin-top: 16px;
  border-top: 1px solid #edf1f6;
}

.editor-saved-heading h6 { margin: 0; color: #273449; font-size: 12px; font-weight: 850; }
.editor-saved-heading span { color: #8a96a8; font-size: 11px; font-weight: 750; text-transform: uppercase; }

#studentRegisterForm .form-label {
  margin-bottom: 6px;
  color: #27334c;
  font-size: 12px;
  font-weight: 800;
}

#studentRegisterForm .form-control,
#studentRegisterForm .form-select {
  min-height: 47px;
  border-radius: 11px;
  font-size: 13px;
}

@media (max-width: 700px) {
  .app-form-modal .modal-dialog,
  .editor-form-modal .modal-dialog {
    margin: 10px;
  }

  .app-form-modal .modal-header,
  .editor-form-modal .modal-header,
  .app-form-modal .modal-body,
  .editor-form-modal .modal-body,
  .app-form-modal .modal-footer,
  .editor-form-modal .modal-footer {
    padding-right: 15px;
    padding-left: 15px;
  }

  .form-modal-icon { width: 38px; height: 38px; }
  .form-modal-heading .modal-title { font-size: 16px; }
  .app-form-modal .modal-footer .btn { flex: 1; }
  .standard-form-surface { padding: 15px; }
  .editor-page-controls .btn span { display: none; }
}

/* Navy application shell */
.topbar {
  height: 58px;
  padding: 0 14px 0 16px;
  border-bottom: 1px solid #5f8f3c;
  background: #17356f;
  box-shadow: 0 2px 10px rgba(23, 53, 111, 0.22);
  color: #fff;
  backdrop-filter: none;
}

.topbar-leading {
  flex: 1 1 auto;
  height: 100%;
  gap: 12px;
}

.top-brand {
  width: 218px;
  height: 100%;
  flex: 0 0 auto;
  gap: 10px;
  overflow: hidden;
  color: #fff;
  white-space: nowrap;
  transition: width 0.22s ease, opacity 0.18s ease, transform 0.22s ease;
}

.top-brand:hover {
  color: #fff;
}

.top-brand-logo {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 9px;
  background: #fff;
  box-shadow: none;
}

.top-brand-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  line-height: 1.1;
}

.top-brand-copy b {
  overflow: hidden;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.35px;
  text-overflow: ellipsis;
}

.top-brand-copy small {
  margin-top: 3px;
  color: #9eb6d5;
  font-size: 11px;
  font-weight: 600;
}

.sidebar-toggle {
  width: 34px;
  height: 34px;
  border-color: transparent;
  border-radius: 7px;
  background: transparent;
  color: #b9cae1;
  font-size: 21px;
}

.sidebar-toggle:hover {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  transform: none;
}

.topbar-breadcrumb {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 7px;
  margin-left: 5px;
  color: #9fb4d0;
  font-size: 11px;
}

.topbar-breadcrumb i {
  color: #6f8bae;
  font-size: 11px;
}

.topbar-breadcrumb b {
  overflow: hidden;
  color: #fff;
  font-size: 12px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-actions {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 9px;
}

.system-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 31px;
  padding: 5px 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #d7e4f4;
  font-size: 11px;
  font-weight: 700;
}

.system-status > i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.12);
}

.profile-trigger {
  display: flex;
  align-items: center;
  min-height: 40px;
  gap: 8px;
  padding: 4px 8px 4px 5px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(5, 24, 53, 0.18);
  color: #fff;
}

.profile-trigger:hover,
.profile-trigger[aria-expanded="true"] {
  background: rgba(255, 255, 255, 0.09);
}

.profile-avatar {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #f97316;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
}

.profile-trigger-copy {
  display: flex;
  min-width: 0;
  max-width: 170px;
  flex-direction: column;
  text-align: left;
  line-height: 1.05;
}

.profile-trigger-copy b {
  overflow: hidden;
  color: #fff;
  font-size: 11px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-trigger-copy small {
  margin-top: 3px;
  color: #9fb4d0;
  font-size: 11px;
}

.profile-trigger > i {
  color: #86a0c2;
  font-size: 11px;
}

.profile-menu {
  width: 245px;
  padding: 0;
  overflow: hidden;
  border: 1px solid #dce3ed;
  border-radius: 0 0 10px 10px;
  box-shadow: 0 15px 35px rgba(15, 23, 42, 0.2);
}

.profile-menu-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px;
  background: #fff;
}

.profile-menu-head .profile-avatar {
  width: 38px;
  height: 38px;
}

.profile-menu-head b,
.profile-menu-head small {
  display: block;
}

.profile-menu-head b {
  color: #15243a;
  font-size: 12px;
  font-weight: 900;
}

.profile-menu-head small {
  margin-top: 2px;
  color: #8793a5;
  font-size: 11px;
}

.profile-menu-context {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 15px;
  border-top: 1px solid #edf1f6;
  color: #6b778b;
  font-size: 11px;
}

.profile-menu-context span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-logout {
  display: flex;
  align-items: center;
  min-height: 40px;
  gap: 9px;
  padding: 9px 15px;
  border-top: 1px solid #e8edf4;
  color: #dc2626;
  font-size: 11px;
  font-weight: 750;
}

.profile-logout:hover {
  background: #fff1f2;
  color: #be123c;
}

#logoutBtn.profile-logout {
  width: 100%;
  min-height: 40px;
  padding: 9px 15px;
  border: 0;
  border-top: 1px solid #e8edf4;
  border-radius: 0;
  background: #fff;
  color: #dc2626;
  font-size: 11px;
  text-align: left;
}

#logoutBtn.profile-logout:hover {
  border-color: #e8edf4;
  background: #fff1f2;
  color: #be123c;
}

.app-layout {
  min-height: calc(100vh - 58px);
}

.sidebar {
  top: 58px;
  width: 246px;
  height: calc(100vh - 58px);
  padding: 12px 8px 18px;
  border-right: 1px solid #31599f;
  background: #102a5b;
  box-shadow: 4px 0 14px rgba(16, 42, 91, 0.14);
}

.nav-section {
  padding: 16px 10px 6px;
  color: #bdd0ef;
  font-size: 11px;
  letter-spacing: 0.8px;
}

.side-link {
  min-height: 39px;
  padding: 8px 10px;
  margin: 2px 0;
  border-radius: 6px;
  color: #e7effa;
  font-size: 12px;
  font-weight: 700;
}

.side-link i {
  color: #c5d8f1;
}

.side-link:hover {
  border-color: transparent;
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  transform: none;
}

.side-link.active {
  border-color: transparent;
  background: #5f9d39;
  color: #fff;
  box-shadow: inset 3px 0 0 #d4edaa;
}

.side-link.active i {
  background: transparent;
  color: #fff;
}

.sidebar-hidden .top-brand {
  width: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-20px);
}

.page-content {
  background: #f2f4f8;
}

@media (max-width: 900px) {
  .topbar { height: 58px; }
  .app-layout { min-height: calc(100vh - 58px); }
  .sidebar { top: 58px; height: calc(100vh - 58px); background: #102a5b; }
  .top-brand { width: 54px; }
  .top-brand-copy { display: none; }
  .topbar-breadcrumb { margin-left: 0; }
}

@media (max-width: 700px) {
  .topbar { padding: 0 8px; }
  .topbar-breadcrumb span,
  .topbar-breadcrumb i,
  .system-status,
  .profile-trigger-copy { display: none; }
  .profile-trigger { padding-right: 5px; }
  .profile-trigger > i { display: none; }
}

/* Responsive foundation: full-width desktop, readable tablet/mobile layouts */
html,
body {
  width: 100%;
  min-width: 320px;
  overflow-x: hidden;
}

.app-layout,
.page-content,
.panel,
.experience-dashboard,
.student-dashboard-page,
.shared-content-view,
.curriculum-management-page,
.admin-table-page {
  min-width: 0;
}

.page-content {
  flex: 1 1 auto;
  width: 100%;
  max-width: none;
  padding: clamp(14px, 2vw, 30px);
}

.sidebar-hidden .page-content {
  max-width: none;
}

.experience-metric-grid,
.stat-grid,
.dashboard-stats {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.experience-dashboard-grid,
.school-actions-grid,
.student-dashboard-grid,
.report-summary-grid,
.quick-access-grid,
.workflow-steps {
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
}

.chapter-grid,
.student-subject-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
}

.table-responsive,
.admin-table-scroll,
.curriculum-table-scroll,
.report-table-panel .table-responsive {
  max-width: 100%;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.content-access-card {
  display: flex;
  flex-direction: column;
  height: min(56vh, 520px) !important;
  min-height: 330px;
  margin-bottom: 0;
  overflow: hidden !important;
}

.content-access-table-scroll {
  flex: 1;
  min-height: 0;
  overflow-x: auto;
  overflow-y: scroll;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
}

.content-access-table-scroll .table {
  margin-bottom: 0;
}

.content-access-table-scroll thead {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--surface, #fff);
}

@media (max-width: 1199px) {
  .content-access-card {
    height: min(52vh, 460px) !important;
    min-height: 300px;
  }
}

@media (min-width: 1200px) {
  .page-content.content-access-page {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 58px);
    min-height: 0;
    overflow: hidden;
  }

  .content-access-page > .row:last-child {
    flex: 0 0 auto;
    min-height: 0;
  }

  .content-access-page > .row:last-child > [class*="col-"] {
    display: flex;
    min-height: 0;
  }

  .content-access-page .content-access-card {
    flex: 0 0 auto;
    height: clamp(360px, calc(100dvh - 390px), 620px) !important;
    min-height: 0;
  }
}

.table {
  min-width: 720px;
}

@media (min-width: 901px) {
  .page-content.login-history-page {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 58px);
    min-height: 0;
    overflow: hidden;
  }

  .login-history-page .page-heading,
  .login-history-page > .panel.mb-3 {
    flex: 0 0 auto;
  }

  .login-history-table-card {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
    margin-bottom: 0;
    overflow: hidden;
  }

  .login-history-table-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }

  .login-history-table-scroll .table {
    margin-bottom: 0;
  }

  .login-history-table-scroll thead {
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--surface, #fff);
  }
}

.table-action-group,
.content-actions {
  justify-content: flex-end;
}

.table-action-group .btn,
.content-actions .btn {
  max-width: 100%;
}

.modal-dialog {
  max-width: min(var(--bs-modal-width, 900px), calc(100vw - 24px));
  margin-right: auto;
  margin-left: auto;
}

.modal-body,
.foreground-body {
  max-width: 100%;
}

.form-control,
.form-select,
.btn {
  max-width: 100%;
}

@media (min-width: 1600px) {
  .page-content {
    padding-right: 40px;
    padding-left: 40px;
  }

  .experience-metric-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .experience-dashboard-grid {
    grid-template-columns: minmax(0, 1.5fr) minmax(360px, 0.7fr);
  }

  .shared-content-view .school-resource-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 318px));
  }
}

@media (max-width: 1100px) {
  .page-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .page-heading .btn,
  .page-heading > button,
  .page-heading > div + * {
    align-self: flex-start;
  }

  .curriculum-filters,
  .school-library-selectors,
  .shared-content-view .school-library-selectors {
    grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  }
}

@media (max-width: 760px) {
  .topbar {
    gap: 8px;
  }

  .topbar-leading {
    flex: 1 1 auto;
    gap: 8px;
  }

  .topbar-actions {
    flex: 0 0 auto;
  }

  .sidebar {
    width: 64px;
    flex: 0 0 64px;
    padding-right: 6px;
    padding-left: 6px;
  }

  .sidebar .link-text,
  .sidebar .nav-section {
    display: none;
  }

  .side-link {
    justify-content: center;
  }

  .page-content {
    padding: 12px;
  }

  .page-heading {
    min-height: auto;
    padding: 14px;
  }

  .page-heading h2 {
    font-size: 19px;
  }

  .page-heading p {
    font-size: 11px;
  }

  .panel,
  .experience-card,
  .student-subject-panel {
    border-radius: 12px;
  }

  .admin-table-page,
  .curriculum-management-page {
    height: auto;
    min-height: calc(100dvh - 82px);
    overflow: visible;
  }

  .admin-table-panel,
  .curriculum-management-page .panel {
    max-height: calc(100dvh - 180px);
    overflow: hidden;
  }

  .curriculum-filters,
  .school-library-selectors,
  .shared-content-view .school-library-selectors {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    overflow: visible;
  }

  .curriculum-filters > div {
    width: 100%;
  }

  .page-content.shared-content-page-shell {
    height: auto;
    min-height: calc(100dvh - 58px);
    overflow: visible;
  }

  .shared-content-view {
    display: flex;
    min-height: 0;
    flex-direction: column;
  }

  .shared-content-view .school-chapter-browser {
    overflow: visible;
  }

  .shared-content-view .school-resource-grid {
    max-height: 42dvh;
    overflow-y: auto;
  }

  .table {
    min-width: 680px;
    font-size: 11px;
  }

  .table > :not(caption) > * > * {
    padding: 8px;
  }
}

@media (max-width: 520px) {
  .sidebar {
    width: 56px;
    flex-basis: 56px;
  }

  .profile-avatar,
  .top-brand-logo {
    width: 32px;
    height: 32px;
  }

  .experience-metric-grid,
  .stat-grid,
  .dashboard-stats,
  .experience-dashboard-grid,
  .school-actions-grid,
  .student-dashboard-grid,
  .report-summary-grid,
  .quick-access-grid,
  .workflow-steps,
  .chapter-grid,
  .student-subject-grid {
    grid-template-columns: 1fr;
  }

  .modal-dialog {
    max-width: calc(100vw - 12px);
    margin: 6px auto;
  }

  .modal-header,
  .modal-body,
  .modal-footer {
    padding-right: 14px;
    padding-left: 14px;
  }

  .foreground-dialog {
    width: calc(100vw - 14px);
    max-height: calc(100dvh - 14px);
  }

  .media-stage {
    min-height: 260px;
  }
}

#appShell:not(.d-none) {
  display: flex;
  height: 100dvh;
  overflow: hidden;
  flex-direction: column;
}

#appShell:not(.d-none) .topbar {
  flex: 0 0 58px;
  position: relative;
  top: auto;
}

#appShell:not(.d-none) .app-layout {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

#appShell:not(.d-none) .sidebar {
  position: relative;
  top: auto;
  flex: 0 0 246px;
  height: auto;
  min-height: 0;
  overflow-y: auto;
}

#appShell.sidebar-hidden:not(.d-none) .sidebar {
  flex-basis: 0;
}

#appShell:not(.d-none) .page-content {
  height: auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.profile-theme-toggle {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 40px;
  padding: 9px 15px;
  border-top: 1px solid #e8edf4;
  color: #31599f;
  font-size: 11px;
  font-weight: 800;
}

.profile-theme-toggle:hover {
  background: #eef5e6;
  color: #527f2c;
}

body.theme-dark {
  background: #111b2e;
  color: #e6edf8;
}

body.theme-dark .page-content,
body.theme-dark .app-layout {
  background: #111b2e;
}

body.theme-dark .experience-card,
body.theme-dark .panel,
body.theme-dark .modal-content,
body.theme-dark .profile-menu,
body.theme-dark .foreground-dialog,
body.theme-dark .flipbook-header,
body.theme-dark .content-list-card,
body.theme-dark .curriculum-table-wrap,
body.theme-dark .table-responsive {
  background: #1a2940;
  border-color: #31445f;
  color: #e6edf8;
}

body.theme-dark .page-heading h2,
body.theme-dark .experience-card h1,
body.theme-dark .experience-card h2,
body.theme-dark .experience-card h3,
body.theme-dark .modal-title,
body.theme-dark .table,
body.theme-dark .table th,
body.theme-dark .table td,
body.theme-dark .form-label {
  color: #eef4fc;
}

body.theme-dark .page-heading p,
body.theme-dark .experience-card p,
body.theme-dark .experience-card small,
body.theme-dark .text-secondary,
body.theme-dark .form-modal-heading small,
body.theme-dark .profile-menu small {
  color: #aebed3 !important;
}

body.theme-dark .table > :not(caption) > * > *,
body.theme-dark .table > :not(caption) > * > * {
  background: transparent;
  border-color: #31445f;
}

body.theme-dark .form-control,
body.theme-dark .form-select,
body.theme-dark .input-group-text {
  border-color: #40546f;
  background-color: #132137;
  color: #eef4fc;
}

body.theme-dark .form-control::placeholder { color: #8fa1bb; }

body.theme-dark .profile-theme-toggle {
  border-color: #31445f;
  color: #cce7a1;
}

body.theme-dark .profile-theme-toggle:hover {
  background: #223852;
  color: #e0f3bc;
}

body.theme-dark {
  color-scheme: dark;
}

body.theme-dark .page-content :is(h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6, strong, b, label, th) {
  color: #f3f7fd;
}

body.theme-dark .page-content :is(p, small, .small, .form-text, .text-muted, .text-secondary, .text-body-secondary) {
  color: #b8c7da !important;
}

body.theme-dark .page-content a:not(.btn),
body.theme-dark .modal-content a:not(.btn) {
  color: #a8d66d;
}

body.theme-dark .page-content :is(.experience-metric, .student-metric, .content-card, .content-list-item, .learning-start-card, .quick-access-card, .workflow-card, .chapter-card, .student-subject-card, .library-filter-card, .library-content-card, .content-tab-card, .course-assignment-empty, .empty-state, .report-summary-card) {
  border-color: #31445f;
  background-color: #1a2940;
  color: #e6edf8;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .16);
}

body.theme-dark .modal-header,
body.theme-dark .modal-footer,
body.theme-dark .profile-menu-head,
body.theme-dark .profile-menu-context {
  border-color: #31445f;
}

body.theme-dark .dropdown-item:not(.profile-logout),
body.theme-dark .profile-menu-context {
  color: #dbe7f6;
}

body.theme-dark .dropdown-item:not(.profile-logout):hover {
  background: #223852;
  color: #f5fbff;
}

body.theme-dark .btn-close {
  filter: invert(1) grayscale(1) brightness(2);
}

body.theme-dark .form-control:focus,
body.theme-dark .form-select:focus {
  border-color: #83b84a;
  box-shadow: 0 0 0 .25rem rgba(131, 184, 74, .22);
}

body.theme-dark .form-select option {
  background: #132137;
  color: #eef4fc;
}

body.theme-dark .nav-tabs,
body.theme-dark .nav-tabs .nav-link,
body.theme-dark .content-tabs,
body.theme-dark .content-tabs button {
  border-color: #31445f;
}

body.theme-dark .nav-tabs .nav-link,
body.theme-dark .content-tabs button {
  color: #b8c7da;
}

body.theme-dark .nav-tabs .nav-link.active,
body.theme-dark .content-tabs button.active {
  background: #223852;
  border-color: #83b84a;
  color: #d9efb7;
}

body.theme-dark .experience-hero,
body.theme-dark .student-dashboard-hero,
body.theme-dark .learning-library-hero {
  color: #fff;
}

body.theme-dark .experience-hero :is(h1, h2, h3, p, small, strong),
body.theme-dark .student-dashboard-hero :is(h1, h2, h3, p, small, strong),
body.theme-dark .learning-library-hero :is(h1, h2, h3, p, small, strong) {
  color: inherit !important;
}

body.theme-dark .page-content .page-heading,
body.theme-dark .page-content .admin-table-page .page-heading,
body.theme-dark .page-content .curriculum-page-heading,
body.theme-dark .page-content .panel,
body.theme-dark .page-content .user-filter-bar,
body.theme-dark .page-content .table-responsive,
body.theme-dark .page-content .curriculum-table-wrap,
body.theme-dark .app-form-modal .modal-content,
body.theme-dark .editor-form-modal .modal-content,
body.theme-dark #studentContentModal .modal-content,
body.theme-dark .standard-form-surface,
body.theme-dark .app-form-modal .modal-header,
body.theme-dark .app-form-modal .modal-body,
body.theme-dark .app-form-modal .modal-footer,
body.theme-dark .editor-form-modal .modal-header,
body.theme-dark .editor-form-modal .modal-body,
body.theme-dark .editor-form-modal .modal-footer {
  background: #1a2940 !important;
  border-color: #40546f !important;
  color: #eef4fc !important;
}

body.theme-dark .table thead,
body.theme-dark .table thead tr,
body.theme-dark .table thead th {
  background: #263b58 !important;
  color: #f5f9ff !important;
  border-color: #40546f !important;
}

body.theme-dark .table tbody tr:hover > * {
  background: #223852 !important;
}

body.theme-dark .form-control,
body.theme-dark .form-select,
body.theme-dark .form-control::file-selector-button {
  color: #eef4fc !important;
}

body.theme-dark .form-control::file-selector-button {
  background: #294b94;
  border-color: #456bb4;
}

body.theme-dark .app-form-modal :is(.form-label, .form-text, .form-modal-heading small, .standard-form-surface small),
body.theme-dark .editor-form-modal :is(.form-label, .form-text, .form-modal-heading small, .standard-form-surface small) {
  color: #c4d2e5 !important;
}

body.theme-dark .workflow-steps button,
body.theme-dark .quick-access-grid button,
body.theme-dark .shared-content-view .quick-chapter-panel,
body.theme-dark .shared-content-view .school-chapter-browser,
body.theme-dark .shared-content-view .school-library-selectors,
body.theme-dark .shared-content-view .content-filter-field,
body.theme-dark .shared-content-view .school-chapter-detail,
body.theme-dark .shared-content-view .school-resource-card,
body.theme-dark .shared-content-view .school-resource-empty {
  background: #1a2940 !important;
  border-color: #40546f !important;
  color: #eef4fc !important;
}

body.theme-dark .workflow-steps button:hover,
body.theme-dark .quick-access-grid button:hover,
body.theme-dark .shared-content-view .school-resource-card:hover,
body.theme-dark .shared-content-view .content-filter-field:focus-within {
  background: #223852 !important;
  border-color: #83b84a !important;
}

body.theme-dark .workflow-steps :is(strong, small),
body.theme-dark .quick-access-grid button,
body.theme-dark .shared-content-view :is(.library-browser-heading h2, .library-browser-heading p, .content-filter-field > span, .content-filter-field > span b, .school-chapter-title h3, .school-chapter-title small, .school-chapter-title em, .school-resource-card h4, .school-resource-card p, .school-resource-kind) {
  color: #eef4fc !important;
}

body.theme-dark .workflow-steps small,
body.theme-dark .shared-content-view :is(.library-browser-heading p, .school-chapter-title em, .school-resource-card p) {
  color: #b8c7da !important;
}

body.theme-dark .workflow-steps b,
body.theme-dark .quick-access-grid button i {
  background: #2b4770;
  color: #cce7a1;
}

body.theme-dark .shared-content-view .school-resource-tabs,
body.theme-dark .shared-content-view .school-resource-tabs button {
  border-color: #40546f;
  color: #c4d2e5;
}

body.theme-dark .shared-content-view .school-resource-tabs button.active {
  background: #223852;
  border-color: #83b84a;
  color: #e0f3bc;
}

.ar-scene-stage {
  position: relative;
  min-height: 460px;
  overflow: hidden;
  background: radial-gradient(circle at 50% 35%, #edf7ff, #c9dceb 78%);
}

.ar-scene-canvas {
  width: 100%;
  height: 100%;
  min-height: 460px;
  display: block;
  cursor: grab;
  touch-action: none;
}

.ar-scene-canvas:active { cursor: grabbing; }

.ar-scene-view-button {
  position: absolute;
  right: 18px;
  bottom: 18px;
  z-index: 2;
}

.ar-scene-toolbar {
  position: absolute;
  z-index: 2;
  top: 16px;
  left: 16px;
  display: grid;
  gap: 7px;
  padding: 9px;
  border: 1px solid rgba(49, 89, 159, .22);
  border-radius: 12px;
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 8px 22px rgba(23, 53, 111, .15);
  backdrop-filter: blur(8px);
}

.ar-scene-object-picker,
.ar-scene-mode-picker,
.ar-scene-zoom-picker {
  display: flex;
  gap: 5px;
}

.ar-scene-toolbar button {
  padding: 5px 8px;
  border: 1px solid #cbd9ea;
  border-radius: 7px;
  background: #fff;
  color: #31599f;
  font-size: 11px;
  font-weight: 800;
}

.ar-scene-toolbar button.active {
  border-color: #6f9f36;
  background: #eff7e4;
  color: #527f2c;
}

.ar-scene-toolbar small {
  color: #5c6e88;
  font-size: 10px;
  font-weight: 700;
}

@media (max-width: 600px) {
  .ar-scene-toolbar { top: 10px; left: 10px; }
  .ar-scene-toolbar button { padding: 4px 6px; font-size: 10px; }
  .ar-scene-toolbar small { display: none; }
}

@media (max-width: 760px) {
  #appShell:not(.d-none) .sidebar {
    flex-basis: 64px;
  }

  #appShell.sidebar-hidden:not(.d-none) .sidebar {
    flex-basis: 0;
  }

  #appShell:not(.d-none) .page-content.shared-content-page-shell {
    height: auto;
    min-height: 0;
    overflow-y: auto;
  }
}

@media (max-width: 520px) {
  #appShell:not(.d-none) .sidebar {
    flex-basis: 56px;
  }

  #appShell.sidebar-hidden:not(.d-none) .sidebar {
    flex-basis: 0;
  }
}

@media (min-width: 901px) {
  #appShell:not(.d-none) .page-content.login-history-page {
    height: calc(100vh - 58px);
    min-height: 0;
    overflow: hidden;
  }
}

@media (min-width: 1200px) {
  #appShell:not(.d-none) .page-content.content-access-page {
    height: calc(100vh - 58px);
    min-height: 0;
    overflow: hidden;
  }
}
