﻿.portal-brand-panel {
  padding: 1rem;
}

.portal-logout-btn {
  color: #102f6a;
  background: #ffffff;
  border: 1px solid rgba(16, 47, 106, 0.18);
  font-weight: 600;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.portal-logout-btn:hover,
.portal-logout-btn:focus,
.portal-logout-btn:active {
  color: #0b234f !important;
  background: #eef4ff !important;
  border-color: rgba(16, 47, 106, 0.28) !important;
}

.portal-login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 2rem 0;
}

.portal-login-container {
  width: 100%;
}

.portal-login-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 430px);
  align-items: center;
  gap: 2rem;
}

.portal-login-card-centered {
  max-width: 440px;
  margin: 0 auto;
}

.portal-login-copy {
  position: relative;
}

.portal-login-copy-inner {
  max-width: 560px;
}

.portal-login-logo {
  width: 132px;
  height: auto;
  margin-bottom: 1.25rem;
  object-fit: contain;
}

.portal-login-title {
  font-size: clamp(2rem, 4vw, 3.55rem);
  line-height: 1;
  letter-spacing: -0.05em;
  font-weight: 750;
  color: #111827;
  margin: 1rem 0 1rem;
  max-width: 9ch;
}

.portal-login-text {
  max-width: 48ch;
  font-size: 1rem;
  line-height: 1.7;
  color: #5b6675;
  margin-bottom: 1.5rem;
}

.portal-login-points {
  display: grid;
  gap: 0.9rem;
  max-width: 520px;
}

.portal-login-point {
  display: grid;
  gap: 0.22rem;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.68);
  backdrop-filter: blur(10px);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.05);
}

.portal-login-point strong {
  color: #111827;
}

.portal-login-point span {
  color: #5f6b7a;
  font-size: 0.95rem;
}

.portal-login-card {
  padding: 1.6rem;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.98));
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.1);
}

.portal-login-card-head {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 1.35rem;
}

.portal-login-card-head-centered {
  flex-direction: column;
  text-align: center;
  gap: 1.1rem;
}

.portal-login-image {
  width: 108px;
  height: auto;
  object-fit: contain;
  filter: contrast(1.05) saturate(1.02);
}

.portal-login-mark {
  width: 62px;
  height: 62px;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.portal-login-mark-centered {
  width: 104px;
  height: 104px;
  border-radius: 28px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

.portal-login-mark .auth-logo-inline {
  width: 40px;
  height: 40px;
}

.portal-login-mark-centered .auth-logo-inline {
  width: 68px;
  height: 68px;
  object-fit: contain;
  filter: contrast(1.05) saturate(1.02);
}

.portal-login-heading {
  font-size: 1.95rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #111827;
}

.portal-login-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  margin-top: 1rem;
  text-align: center;
  color: #5f6b7a;
  font-size: 0.9rem;
}

.portal-login-footer strong {
  color: #111827;
  font-weight: 700;
}

.portal-public-card {
  max-width: 980px;
  margin: 0 auto;
}

.portal-login-form .form-control {
  min-height: 52px;
  border-radius: 14px;
  padding-left: 0.95rem;
  font-size: 0.98rem;
}

.portal-login-submit {
  min-height: 52px;
  border-radius: 14px;
  font-size: 0.98rem;
  font-weight: 700;
}

.portal-feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.portal-feature-card,
.portal-card,
.portal-side-note,
.portal-login-note {
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  border-radius: 18px;
}

.portal-feature-card {
  padding: 1rem 1.1rem;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.06);
}

.portal-feature-card p,
.portal-login-note,
.portal-side-note p {
  color: var(--color-text-muted);
}

.portal-login-note {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1rem 1.1rem;
  background: #f8fafc;
}

.portal-sidebar-scroll {
  padding-bottom: 1.25rem;
}

.portal-sidebar-group {
  display: grid;
  gap: 0.15rem;
}

.portal-user-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: #1f2937;
  color: #ffffff;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.portal-alert-bell {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(16, 47, 106, 0.16);
  background: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.portal-alert-bell::after {
  display: none;
}

.portal-alert-bell:hover,
.portal-alert-bell:focus,
.portal-alert-bell:active {
  background: #eef4ff !important;
  border-color: rgba(16, 47, 106, 0.28) !important;
}

.portal-alert-bell-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
}

.portal-alert-bell-icon svg {
  width: 18px;
  height: 18px;
  fill: #102f6a;
}

.portal-alert-bell-count {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: #dc2626;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 16px rgba(220, 38, 38, 0.22);
}

.portal-alert-dropdown {
  width: min(92vw, 420px);
  padding: 0;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.14);
}

.portal-alert-dropdown-head {
  padding: 1rem 1rem 0.85rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.98));
}

.portal-alert-dropdown-body {
  max-height: 420px;
  overflow-y: auto;
  padding: 0.65rem;
  background: #ffffff;
}

.portal-alert-item {
  padding: 0.9rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 16px;
  background: #f8fafc;
}

.portal-alert-item + .portal-alert-item {
  margin-top: 0.65rem;
}

.portal-alert-item-main {
  min-width: 0;
}

.portal-alert-empty {
  padding: 1rem;
  border: 1px dashed rgba(148, 163, 184, 0.28);
  border-radius: 16px;
  color: #64748b;
  background: #f8fafc;
}

.portal-menu-toggle {
  justify-content: space-between;
  width: calc(100% - 12px);
  text-align: left;
  background: transparent;
  border: 0;
  color: #334155 !important;
  box-shadow: none !important;
  text-decoration: none !important;
}

.portal-menu-toggle span:first-child {
  font-weight: 600;
}

.portal-menu-toggle:hover,
.portal-menu-toggle:focus,
.portal-menu-toggle:active {
  color: #111827 !important;
  background: #eef2f7 !important;
  box-shadow: none !important;
  outline: none !important;
}

.portal-menu-arrow {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.16);
  color: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  line-height: 1;
  transition: transform 0.2s ease, background 0.2s ease;
}

.portal-menu-toggle[aria-expanded="true"] .portal-menu-arrow {
  transform: rotate(45deg);
  background: rgba(31, 41, 55, 0.12);
}

.portal-submenu {
  margin: 0 10px 8px 16px;
  padding: 0.35rem 0 0.2rem 0.9rem;
  border-left: 1px solid rgba(148, 163, 184, 0.3);
}

.portal-submenu-link {
  margin: 0.15rem 0;
  padding: 0.65rem 0.85rem;
  font-size: 0.92rem;
  color: #475569 !important;
  text-decoration: none !important;
  box-shadow: none !important;
  background: transparent !important;
}

.portal-submenu-link:hover,
.portal-submenu-link:focus,
.portal-submenu-link:active {
  color: #111827 !important;
  background: #f1f5f9 !important;
  transform: none !important;
  box-shadow: none !important;
  outline: none !important;
}

.portal-side-note {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.98));
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
}

.portal-shell {
  min-height: calc(100vh - var(--app-navbar-height) - var(--app-footer-height) - 28px);
}

.portal-shell {
  background:
    radial-gradient(circle at top right, rgba(31, 41, 55, 0.06), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.98));
}

.portal-page-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: end;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
}

.portal-page-kicker {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 0.5rem;
}

.portal-page-title {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #111827;
}

.portal-page-subtitle {
  color: #64748b;
  max-width: 58ch;
  font-size: 0.96rem;
}

.portal-page-actions {
  flex-shrink: 0;
}

.portal-top-action {
  --bs-btn-color: #1f2937;
  --bs-btn-border-color: #cbd5e1;
  --bs-btn-hover-color: #111827;
  --bs-btn-hover-bg: #eef2f7;
  --bs-btn-hover-border-color: #cbd5e1;
  --bs-btn-active-color: #111827;
  --bs-btn-active-bg: #eef2f7;
  --bs-btn-active-border-color: #cbd5e1;
  --bs-btn-focus-shadow-rgb: 0, 0, 0;
  border-radius: 12px;
  min-height: 42px;
}

.portal-card {
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 16px 35px rgba(15, 23, 42, 0.06);
}

.portal-stat-card {
  border-radius: 18px;
}

.portal-stat-value {
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  font-weight: 700;
  line-height: 1;
  color: #111827;
}

.portal-module-card {
  border-radius: 20px;
}

.portal-module-label {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.68rem;
  border-radius: 999px;
  background: #eef2f7;
  color: #334155;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.portal-management-shell {
  display: grid;
  gap: 0.5rem;
}

.portal-section-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.portal-section-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0.65rem 1rem;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #475569;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.portal-section-chip:hover,
.portal-section-chip:focus {
  color: #111827;
  background: #f8fafc;
  border-color: rgba(148, 163, 184, 0.34);
}

.portal-section-chip.is-active {
  background: #1f2937;
  border-color: #1f2937;
  color: #ffffff;
}

.portal-toolbar,
.portal-bulk-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.portal-toolbar-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.portal-action-btn {
  min-height: 42px;
  border-radius: 12px;
}

.portal-ghost-btn {
  --bs-btn-color: #334155;
  --bs-btn-bg: #ffffff;
  --bs-btn-border-color: #cbd5e1;
  --bs-btn-hover-color: #111827;
  --bs-btn-hover-bg: #f8fafc;
  --bs-btn-hover-border-color: #94a3b8;
  --bs-btn-active-color: #111827;
  --bs-btn-active-bg: #eef2f7;
  --bs-btn-active-border-color: #94a3b8;
  --bs-btn-focus-shadow-rgb: 148, 163, 184;
  border-radius: 12px;
  font-weight: 600;
}

.portal-danger-btn {
  --bs-btn-color: #b42318;
  --bs-btn-bg: #fff5f4;
  --bs-btn-border-color: #fecaca;
  --bs-btn-hover-color: #ffffff;
  --bs-btn-hover-bg: #b42318;
  --bs-btn-hover-border-color: #b42318;
  --bs-btn-active-color: #ffffff;
  --bs-btn-active-bg: #991b1b;
  --bs-btn-active-border-color: #991b1b;
  --bs-btn-focus-shadow-rgb: 180, 35, 24;
  border-radius: 12px;
  font-weight: 600;
}

.portal-warning-btn {
  --bs-btn-color: #9a3412;
  --bs-btn-bg: #fff7ed;
  --bs-btn-border-color: #fdba74;
  --bs-btn-hover-color: #ffffff;
  --bs-btn-hover-bg: #c2410c;
  --bs-btn-hover-border-color: #c2410c;
  --bs-btn-active-color: #ffffff;
  --bs-btn-active-bg: #9a3412;
  --bs-btn-active-border-color: #9a3412;
  --bs-btn-focus-shadow-rgb: 194, 65, 12;
  border-radius: 12px;
  font-weight: 600;
}

.portal-success-btn {
  --bs-btn-color: #166534;
  --bs-btn-bg: #f0fdf4;
  --bs-btn-border-color: #86efac;
  --bs-btn-hover-color: #ffffff;
  --bs-btn-hover-bg: #166534;
  --bs-btn-hover-border-color: #166534;
  --bs-btn-active-color: #ffffff;
  --bs-btn-active-bg: #14532d;
  --bs-btn-active-border-color: #14532d;
  --bs-btn-focus-shadow-rgb: 22, 101, 52;
  border-radius: 12px;
  font-weight: 600;
}

.portal-selection-chip,
.portal-inline-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  background: #eef2f7;
  color: #334155;
  font-size: 0.8rem;
  font-weight: 600;
}

.portal-filter-bar {
  padding: 1rem;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
}

.portal-table-shell {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
}

.portal-data-table {
  --bs-table-bg: transparent;
  --bs-table-hover-bg: #f8fafc;
  --bs-table-border-color: rgba(148, 163, 184, 0.2);
}

.portal-data-table thead th {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
  background: #f8fafc;
  border-bottom-width: 1px;
}

.portal-data-table td,
.portal-data-table th {
  padding: 1rem 0.9rem;
  vertical-align: middle;
}

.portal-check-col {
  width: 52px;
}

.portal-row-actions {
  display: inline-flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.portal-status-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.36rem 0.7rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
}

.portal-status-badge.is-active {
  background: rgba(22, 163, 74, 0.12);
  color: #166534;
}

.portal-status-badge.is-pending {
  background: rgba(217, 119, 6, 0.12);
  color: #92400e;
}

.portal-status-badge.is-inactive {
  background: rgba(148, 163, 184, 0.16);
  color: #475569;
}

.portal-status-badge.is-failed {
  background: rgba(220, 38, 38, 0.12);
  color: #991b1b;
}

.portal-status-badge.is-progress {
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
}

.portal-inline-badge-public {
  background: rgba(245, 158, 11, 0.14);
  color: #92400e;
  border: 1px solid rgba(245, 158, 11, 0.28);
}

.portal-student-row-public > td {
  background-image: linear-gradient(90deg, rgba(245, 158, 11, 0.06), rgba(255, 255, 255, 0));
}

.portal-row-warning > td {
  background-image: linear-gradient(90deg, rgba(245, 158, 11, 0.07), rgba(255, 255, 255, 0));
}

.portal-note {
  padding: 0.9rem 1rem;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 14px;
  background: #f8fafc;
  color: #64748b;
}

.portal-note-list {
  display: grid;
  gap: 0.8rem;
}

.portal-note-item {
  padding: 0.9rem 1rem;
  border-left: 3px solid #1f2937;
  border-radius: 0 14px 14px 0;
  background: #f8fafc;
  color: #475569;
}

.portal-course-card {
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.portal-image-preview-box {
  width: 76px;
  height: 76px;
  flex: 0 0 76px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: #f8fafc;
}

.portal-image-preview-box.is-small {
  width: 58px;
  height: 58px;
  flex-basis: 58px;
  border-radius: 14px;
}

.portal-image-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.portal-course-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  color: #64748b;
  font-size: 0.92rem;
}

.portal-course-section-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
  margin-bottom: 0.65rem;
}

.portal-course-tree,
.portal-simple-list {
  display: grid;
  gap: 0.75rem;
}

.portal-course-tree-item,
.portal-simple-list-item {
  padding: 0.9rem 1rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 14px;
  background: #fbfcfe;
}

.portal-simple-list-item-spaced {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.portal-builder-card {
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.portal-dashboard-hero {
  background:
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.12), transparent 35%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.98));
}

.portal-indicator-card {
  height: 100%;
  padding: 1.15rem 1.2rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.portal-card-link {
  color: inherit;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.portal-card-link:hover,
.portal-card-link:focus-visible {
  color: inherit;
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
  border-color: rgba(37, 99, 235, 0.24);
}

.portal-indicator-card.is-success {
  border-color: rgba(22, 163, 74, 0.22);
}

.portal-indicator-card.is-warning {
  border-color: rgba(217, 119, 6, 0.22);
}

.portal-indicator-card.is-info {
  border-color: rgba(14, 116, 144, 0.22);
}

.portal-indicator-value {
  font-size: clamp(1.8rem, 3vw, 2.35rem);
  font-weight: 700;
  line-height: 1;
  color: #111827;
}

.portal-builder-head {
  margin-bottom: 1.5rem;
}

.portal-builder-divider {
  height: 1px;
  margin: 1.5rem 0;
  background: rgba(148, 163, 184, 0.2);
}

.portal-inline-module-form {
  padding: 1rem;
  border: 1px dashed rgba(148, 163, 184, 0.35);
  border-radius: 16px;
  background: #fbfcfe;
}

.portal-subpanel {
  padding: 1.15rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 18px;
  background: #fbfcfe;
}

.portal-switch-row .form-check-input {
  width: 3rem;
  height: 1.55rem;
  margin-top: 0.1rem;
}

.portal-switch-row .form-check-label {
  margin-left: 0.75rem;
}

.portal-course-grid {
  display: grid;
  gap: 1rem;
}

.portal-course-stack-card {
  padding: 1.15rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 18px;
  background: #fbfcfe;
}

.portal-sortable-list {
  display: grid;
  gap: 0.75rem;
}

.portal-sortable-item {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 0.95rem 1rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 16px;
  background: #ffffff;
}

.portal-sortable-item.is-dragging {
  opacity: 0.5;
}

.portal-curriculum-card.is-warning {
  border: 1px solid rgba(245, 158, 11, 0.28);
  background: #fffaf0;
}

.portal-note-warning {
  border-color: rgba(245, 158, 11, 0.3);
  background: #fff7e8;
  color: #92400e;
}

.portal-sortable-handle {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: #eef2f7;
  color: #475569;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  font-weight: 700;
  letter-spacing: 0.06em;
  flex: 0 0 38px;
}

.portal-richtext-content {
  color: #475569;
}

.portal-richtext-content p:last-child {
  margin-bottom: 0;
}

.portal-course-table tbody tr {
  transition: background-color 0.15s ease, transform 0.15s ease;
}

.portal-course-table tbody tr:hover {
  background: #fbfdff;
}

.portal-curriculum-sortable {
  min-height: 88px;
}

.portal-input-group .form-control {
  border-right: 0;
}

.portal-input-group .input-group-text {
  border-left: 0;
  background: #f8fafc;
  color: #475569;
  font-weight: 700;
}

.portal-course-discipline-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.portal-curriculum-selection-block + .portal-curriculum-selection-block {
  margin-top: 1rem;
}

.portal-selection-grid {
  display: grid;
  gap: 0.75rem;
}

.portal-check-card {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 0.75rem;
  align-items: start;
  padding: 0.95rem 1rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 16px;
  background: #ffffff;
  cursor: pointer;
}

.portal-check-card .form-check-input {
  margin-top: 0.2rem;
}

.portal-check-card:hover {
  border-color: #94a3b8;
  background: #fbfdff;
}

.portal-mini-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: #eef2f7;
  color: #334155;
  font-size: 0.78rem;
  font-weight: 600;
}

.portal-form-image-preview {
  min-height: 88px;
}

.portal-form-image-box {
  width: 100%;
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 16px;
  background: #f8fafc;
  overflow: hidden;
}

.portal-form-image {
  max-width: 100%;
  max-height: 220px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.portal-document-thumb {
  width: 72px;
  height: 72px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: #f8fafc;
}

.portal-document-thumb-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.portal-document-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.38rem 0.72rem;
  border-radius: 999px;
  border: 1px solid rgba(16, 47, 106, 0.18);
  background: #eef4ff;
  color: #102f6a;
  font-size: 0.78rem;
  font-weight: 700;
}

.portal-document-preview-card {
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 18px;
  padding: 1rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.98));
}

.portal-document-preview-surface {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: #f8fafc;
}

.portal-document-preview-image {
  width: 100%;
  max-height: 360px;
  object-fit: contain;
  display: block;
  background: #f8fafc;
}

.portal-document-preview-frame {
  width: 100%;
  height: 420px;
  border: 0;
  display: block;
  background: #ffffff;
}

.portal-lesson-asset-card {
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: #ffffff;
}

.portal-lesson-asset-layout {
  display: grid;
  grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
}

.portal-lesson-asset-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.portal-lesson-asset-main {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.35rem 1.4rem;
}

.portal-lesson-asset-meta {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.portal-lesson-asset-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 0.38rem 0.72rem;
  border-radius: 999px;
  background: #e2e8f0;
  color: #0f172a;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.portal-lesson-asset-title {
  margin: 0;
  color: #0f172a;
  font-size: clamp(1.05rem, 1.2vw, 1.25rem);
  line-height: 1.35;
}

.portal-lesson-asset-copy {
  margin: 0;
  color: #475569;
  font-size: 0.96rem;
  line-height: 1.65;
}

.portal-lesson-asset-surface {
  width: 100%;
  min-height: 280px;
  border-right: 1px solid rgba(148, 163, 184, 0.16);
  background: linear-gradient(180deg, #f8fafc, #eef2f7);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.portal-lesson-asset-surface-embed {
  background: #e2e8f0;
}

.portal-lesson-asset-surface-poster {
  padding: 1.75rem;
  background: linear-gradient(155deg, #0f172a 0%, #1e3a8a 62%, #38bdf8 130%);
}

.portal-lesson-asset-surface-empty {
  padding: 1.25rem;
}

.portal-lesson-asset-poster-copy {
  max-width: 240px;
  text-align: left;
  color: #e2e8f0;
}

.portal-lesson-asset-poster-eyebrow {
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(191, 219, 254, 0.92);
}

.portal-lesson-asset-poster-title {
  margin-top: 0.55rem;
  font-size: clamp(1.45rem, 2vw, 2rem);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.portal-lesson-asset-poster-text {
  margin-top: 0.85rem;
  font-size: 0.95rem;
  line-height: 1.6;
  color: #cbd5e1;
}

.portal-lesson-asset-image {
  width: 100%;
  height: 100%;
  min-height: 280px;
  object-fit: contain;
  display: block;
  background: linear-gradient(180deg, #f8fafc, #e2e8f0);
}

.portal-lesson-asset-empty-copy {
  max-width: 420px;
  text-align: center;
  color: #475569;
  font-size: 0.95rem;
  font-weight: 500;
}

.portal-material-viewer-stage-card {
  overflow: visible;
}

.portal-material-viewer-page {
  --portal-material-viewer-height: clamp(1180px, calc(100vh - 24px), 1840px);
}

.portal-material-viewer-stage {
  --portal-material-embed-scale: 1.38;
  min-height: var(--portal-material-viewer-height);
  height: var(--portal-material-viewer-height);
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #020617;
  overflow: hidden;
}

.portal-material-viewer-stage.is-pdf,
.portal-material-viewer-stage.is-video {
  align-items: flex-start;
  background: #ffffff;
}


.portal-material-viewer-stage.is-pdf {
  --portal-material-embed-scale: 1.16;
}

.portal-material-viewer-stage.is-video {
  --portal-material-embed-scale: 1.48;
}

.portal-material-viewer-stage.is-empty {
  background: linear-gradient(180deg, #f8fafc, #e2e8f0);
}

.portal-material-viewer-image {
  width: 100%;
  height: var(--portal-material-viewer-height);
  object-fit: contain;
  display: block;
}

.portal-material-viewer-frame {
  width: 100%;
  height: var(--portal-material-viewer-height);
  border: 0;
  display: block;
  background: #ffffff;
}

.portal-material-viewer-frame-pdf {
  background: #f8fafc;
}

.portal-material-viewer-video {
  width: 100%;
  height: var(--portal-material-viewer-height);
  display: block;
  background: #000000;
}

.portal-material-viewer-page .portal-material-viewer-stage-card {
  overflow: visible;
}


.portal-material-viewer-empty {
  max-width: 520px;
  padding: 2rem;
  text-align: center;
  color: #334155;
  font-size: 1rem;
  line-height: 1.7;
}

.portal-material-viewer-frame-embed {
  width: calc(100% / var(--portal-material-embed-scale));
  height: calc(var(--portal-material-viewer-height) / var(--portal-material-embed-scale));
  transform: scale(var(--portal-material-embed-scale));
  transform-origin: top center;
}

.portal-material-viewer-list {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.portal-material-viewer-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.05rem;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 16px;
  background: #f8fafc;
  color: #0f172a;
  text-decoration: none;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.portal-material-viewer-item:hover {
  transform: translateY(-1px);
  border-color: rgba(37, 99, 235, 0.28);
  background: #eff6ff;
}

.portal-material-viewer-item.is-active {
  border-color: rgba(37, 99, 235, 0.34);
  background: #dbeafe;
}

.portal-material-viewer-item-type {
  margin-bottom: 0.25rem;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.portal-material-viewer-item-action {
  color: #1d4ed8;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.portal-lesson-preview-dialog {
  margin: 0;
  width: 100vw;
  max-width: none;
  height: 100vh;
}

.portal-lesson-preview-modal .modal-content {
  height: 100vh;
  border: 0;
  border-radius: 0;
  background: #020617;
}

.portal-lesson-preview-modal .modal-header {
  flex-shrink: 0;
  padding: 1rem 1.25rem;
  background: rgba(2, 6, 23, 0.96);
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.portal-lesson-preview-modal .modal-title {
  color: #f8fafc;
  font-size: clamp(1.1rem, 1.3vw, 1.45rem);
}

.portal-lesson-preview-modal [data-lesson-preview-kind] {
  color: #94a3b8 !important;
}

.portal-lesson-preview-body {
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  display: flex;
  padding: 0;
  background: #020617;
  overflow: hidden;
}

.portal-lesson-preview-stage {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
  overflow: hidden;
}

.portal-lesson-preview-stage.is-embed {
  align-items: stretch;
  justify-content: stretch;
  padding: 0;
  background: #ffffff;
}

.portal-lesson-preview-stage.is-image,
.portal-lesson-preview-stage.is-empty {
  background: #020617;
}

.portal-lesson-preview-empty {
  width: min(100%, 720px);
  max-width: 720px;
  height: 100%;
  text-align: center;
  color: #cbd5e1;
  font-size: 1rem;
  line-height: 1.6;
  display: flex;
  align-items: center;
  justify-content: center;
}

.portal-lesson-preview-media-image {
  flex: 1 1 auto;
  max-width: 100%;
  max-height: 100%;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  border-radius: 20px;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.45);
}

.portal-lesson-preview-media-frame {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #000000;
  border-radius: 0;
  box-shadow: none;
}

.portal-alert {
  border: 0;
  border-radius: 16px;
}

.modal {
  z-index: 1400;
}

.modal-backdrop {
  z-index: 1390;
}

.portal-mobile-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1290;
  background: rgba(15, 23, 42, 0.18);
}

.portal-mobile-menu {
  position: fixed;
  inset: 0 auto 0 0;
  width: min(88vw, 360px);
  max-width: 360px;
  background: #ffffff;
  color: #111827;
  z-index: 1300;
  transform: translateX(-100%);
  transition: transform 0.24s ease;
  box-shadow: 24px 0 48px rgba(15, 23, 42, 0.16);
  display: flex;
  flex-direction: column;
  pointer-events: none;
}

.portal-mobile-menu.is-open {
  transform: translateX(0);
  pointer-events: auto;
}

.portal-mobile-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 76px;
  padding: 1.1rem 1.2rem 0.85rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.portal-mobile-menu-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 0.25rem 1rem 1.25rem;
}

body.portal-mobile-menu-open {
  overflow: hidden;
}

.modal-dialog-scrollable .modal-content {
  max-height: calc(100vh - 2rem);
}

.modal-dialog-scrollable .modal-content > form {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
}

.modal-dialog-scrollable .modal-body,
.modal-dialog-scrollable .modal-content > form .modal-body {
  overflow-y: auto;
  overscroll-behavior: contain;
  flex: 1 1 auto;
  min-height: 0;
}

.modal-dialog-scrollable .modal-header,
.modal-dialog-scrollable .modal-footer,
.modal-dialog-scrollable .modal-content > form .modal-header,
.modal-dialog-scrollable .modal-content > form .modal-footer {
  flex-shrink: 0;
  background: #ffffff;
}

@media (max-width: 767.98px) {
  .portal-lesson-asset-layout {
    grid-template-columns: 1fr;
  }

  .portal-lesson-asset-surface {
    min-height: 220px;
    border-right: 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  }

  .portal-lesson-asset-image {
    min-height: 220px;
  }

  .portal-lesson-preview-modal .modal-header {
    padding: 0.85rem 1rem;
  }

  .portal-lesson-preview-stage {
    padding: 0.5rem;
  }

  .portal-material-viewer-stage,
  .portal-material-viewer-image,
  .portal-material-viewer-frame,
  .portal-material-viewer-video,
  .portal-material-viewer-frame-embed {
    min-height: 72vh;
    height: 72vh;
  }

  .portal-material-viewer-page {
    --portal-material-viewer-height: 76vh;
  }


  .portal-material-viewer-stage {
    --portal-material-embed-scale: 1.08;
  }

  .portal-material-viewer-stage.is-video {
    --portal-material-embed-scale: 1.16;
  }
}

.portal-badge,
.portal-badge-subtle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.portal-badge {
  background: #1f2937;
  color: #ffffff;
}

.portal-badge-subtle {
  background: #eef2f7;
  color: #334155;
}

.portal-list,
.portal-notices {
  display: grid;
  gap: 0.9rem;
}

.portal-list-item,
.portal-notice-item,
.portal-side-note {
  padding: 1rem 1.1rem;
}

.portal-list-item {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 0.9rem;
  align-items: start;
  border: 1px solid var(--color-border);
  border-radius: 16px;
  background: #fbfcfe;
}

.portal-list-item strong {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #1f2937;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.portal-notice-item {
  border-left: 4px solid #1f2937;
  border-radius: 0 16px 16px 0;
  background: #f8fafc;
}

.app-sidebar .nav-link,
.offcanvas .nav-link {
  color: #334155 !important;
  text-decoration: none !important;
  box-shadow: none !important;
}

.app-sidebar .nav-link:hover,
.app-sidebar .nav-link:focus,
.app-sidebar .nav-link:active,
.offcanvas .nav-link:hover,
.offcanvas .nav-link:focus,
.offcanvas .nav-link:active {
  color: #111827 !important;
  background: #eef2f7 !important;
  box-shadow: none !important;
  outline: none !important;
}

.app-sidebar .nav-link.active,
.offcanvas .nav-link.active {
  background: #1f2937 !important;
  color: #ffffff !important;
  border-color: #1f2937 !important;
}

.offcanvas .portal-menu-toggle {
  width: 100%;
}

@media (max-width: 991.98px) {
  .portal-login-page {
    padding: 1.25rem 0;
  }

  .portal-login-card-centered {
    max-width: 100%;
  }

  .portal-login-layout {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .portal-login-copy-inner {
    max-width: none;
  }

  .portal-login-title {
    max-width: none;
    font-size: clamp(1.85rem, 8vw, 2.6rem);
  }

  .portal-login-card {
    max-width: 100%;
  }

  .portal-feature-grid {
    grid-template-columns: 1fr;
  }

  .portal-mobile-menu .portal-sidebar-group .nav-link {
    margin-left: 0;
    margin-right: 0;
  }

  .portal-mobile-menu .portal-submenu {
    margin-left: 8px;
    margin-right: 0;
  }

  .portal-page-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .portal-toolbar,
  .portal-bulk-actions {
    align-items: stretch;
  }

  .portal-toolbar-group {
    width: 100%;
  }

  .portal-toolbar-group > * {
    flex: 1 1 180px;
  }

  .portal-selection-chip {
    width: 100%;
    justify-content: center;
  }

  .portal-section-chip {
    flex: 1 1 180px;
  }

  .portal-simple-list-item-spaced {
    flex-direction: column;
  }

  .portal-sortable-item {
    flex-direction: column;
  }
}

@media (max-width: 575.98px) {
  .portal-login-page {
    padding: 0.75rem 0;
  }

  .portal-login-copy {
    order: 2;
  }

  .portal-login-card {
    order: 1;
    padding: 1.1rem;
    border-radius: 20px;
  }

  .portal-login-card-head {
    margin-bottom: 1rem;
  }

  .portal-login-mark {
    width: 54px;
    height: 54px;
    border-radius: 16px;
  }

  .portal-login-mark .auth-logo-inline {
    width: 34px;
    height: 34px;
  }

  .portal-login-mark-centered {
    width: 88px;
    height: 88px;
    border-radius: 24px;
  }

  .portal-login-mark-centered .auth-logo-inline {
    width: 56px;
    height: 56px;
  }

  .portal-login-image {
    width: 90px;
  }

  .portal-login-logo {
    width: 92px;
    margin-bottom: 1rem;
  }

  .portal-login-title {
    margin-top: 0.85rem;
    margin-bottom: 0.85rem;
    line-height: 1.05;
  }

  .portal-login-text {
    font-size: 0.94rem;
    margin-bottom: 1rem;
  }

  .portal-login-points {
    gap: 0.7rem;
  }

  .portal-login-point {
    padding: 0.82rem 0.9rem;
    border-radius: 14px;
  }

  .portal-login-note {
    padding: 0.85rem 0.9rem;
    font-size: 0.92rem;
  }
}

