html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
  height: 100%;
}

body {
  margin: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Header brand lockup */
.app-navbar-brand {
  flex-shrink: 0;
}

.app-navbar-brand__link {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0;
  padding-top: 0;
  padding-bottom: 0;
  white-space: nowrap;
  text-decoration: none;
  color: #fff;
}

.app-navbar-brand__link:hover,
.app-navbar-brand__link:focus {
  color: rgba(255, 255, 255, 0.92);
}

.app-navbar-brand__emblem {
  width: 2rem;
  height: 2rem;
  object-fit: contain;
  flex-shrink: 0;
  filter: brightness(0) invert(1);
}

.app-navbar-brand__divider {
  display: block;
  width: 1px;
  height: 1.625rem;
  background-color: rgba(255, 255, 255, 0.45);
  flex-shrink: 0;
}

.app-navbar-brand__school {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.app-navbar-brand__school-icon {
  font-size: 1.25rem;
  line-height: 1;
  flex-shrink: 0;
}

.app-navbar-brand__title {
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: 0.015em;
  line-height: 1.2;
}

.app-navbar-user-link {
  display: inline-flex;
  align-items: center;
  gap: 0;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

.app-navbar-user-link.dropdown-toggle::after {
  display: none;
}

.app-navbar-user-link .user-avatar {
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.navbar .dropdown-header.app-nav-user-header {
  color: rgba(255, 255, 255, 0.95);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: normal;
  text-transform: none;
  white-space: nowrap;
}

#profile-photo {
  scroll-margin-top: 5.5rem;
}

.profile-photo-picker {
  margin-bottom: 1.75rem;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid var(--bs-border-color);
}

.profile-photo-picker__title {
  font-size: 1rem;
  margin-bottom: 1rem;
}

.profile-photo-picker__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.25rem;
}

@media (min-width: 576px) {
  .profile-photo-picker__body {
    flex-direction: row;
    align-items: center;
    gap: 1.5rem;
  }
}

.profile-photo-picker__preview {
  flex-shrink: 0;
}

.profile-photo-picker__upload {
  flex-shrink: 0;
}

.profile-photo-picker__presets {
  flex: 1;
  min-width: 0;
}

.profile-photo-picker__divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--bs-secondary-color);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  width: 100%;
}

.profile-photo-picker__divider::before,
.profile-photo-picker__divider::after {
  background: var(--bs-border-color);
  content: "";
  flex: 1;
  height: 1px;
}

@media (min-width: 576px) {
  .profile-photo-picker__divider {
    flex-direction: column;
    align-self: stretch;
    width: auto;
    padding: 0.25rem 0;
  }

  .profile-photo-picker__divider::before,
  .profile-photo-picker__divider::after {
    width: 1px;
    height: auto;
    flex: 1;
  }
}

.profile-photo-picker__presets-label {
  color: var(--bs-secondary-color);
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

.profile-photo-picker__preset-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.avatar-preset-option {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.avatar-preset-option:hover {
  box-shadow: 0 0.15rem 0.5rem rgba(0, 0, 0, 0.12);
  transform: scale(1.06);
}

.form-section-heading {
  color: var(--bs-secondary-color);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
}

.id-document-current {
  align-items: center;
  background: var(--bs-light);
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  padding: 0.65rem 0.85rem;
}

.id-document-current .id-document-link {
  align-items: center;
  display: inline-flex;
  gap: 0.4rem;
}

.app-main-nav {
  gap: 0.15rem;
}

.app-main-nav .nav-link {
  font-size: 0.92rem;
  padding-left: 0.7rem;
  padding-right: 0.7rem;
  white-space: nowrap;
}

.app-main-nav .nav-link.active,
.app-main-nav .nav-item.active > .nav-link {
  color: #fff;
  font-weight: 600;
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 0.375rem;
}

.navbar .dropdown-menu {
  min-width: 15rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: #0b5ed7;
  box-shadow: 0 0.5rem 1.25rem rgba(0, 0, 0, 0.2);
  padding: 0.35rem 0;
}

.navbar .dropdown-item {
  font-size: 0.92rem;
  color: #eef4ff;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.navbar .dropdown-item:hover,
.navbar .dropdown-item:focus {
  color: #fff;
  background-color: rgba(255, 255, 255, 0.16);
}

.navbar .dropdown-item.active,
.navbar .dropdown-item:active {
  color: #fff;
  background-color: rgba(255, 255, 255, 0.24);
}

.navbar .dropdown-divider {
  border-top-color: rgba(255, 255, 255, 0.22);
}

.navbar .dropdown-header.app-nav-subsection {
  color: rgba(238, 244, 255, 0.85);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding-top: 0.3rem;
  padding-bottom: 0.2rem;
}

.navbar .dropdown-item.app-nav-subitem {
  padding-left: 1.5rem;
}

@media (max-width: 1199.98px) {
  .app-main-nav .nav-link {
    font-size: 0.88rem;
    padding-left: 0.55rem;
    padding-right: 0.55rem;
  }
}

/* Quick Action Cards */
.quick-action-card {
  transition: all 0.3s ease;
  cursor: pointer;
}

.quick-action-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

.quick-action-card .quick-action-icon {
  transition: all 0.3s ease;
}

.quick-action-card:hover .quick-action-icon {
  transform: scale(1.1);
}

.quick-action-card .card-title {
  color: #212529;
  transition: color 0.3s ease;
}

.quick-action-card:hover .card-title {
  color: #0d6efd;
}

/* UAP-style troubleshoot dropdown menu (from easyflow.mvc.site.css) */
.troubleshoot-menu {
  min-width: 170px;
}

.troubleshoot-menu li {
  font-size: 15px;
  padding-top: 5px;
  padding-bottom: 5px;
  padding-left: 10px;
}

.troubleshoot-menu li a {
  padding-left: 10px;
  color: #337ab7;
}

.troubleshoot-menu li button:hover {
  color: #067198;
  text-decoration: underline;
}

.troubleshoot-menu li button {
  padding-left: 10px;
  text-align: left;
  padding-top: 1px;
  padding-bottom: 1px;
}

.troubleshoot-menu li.divider {
  height: 1px;
  margin: 9px 0;
  padding-top: 0;
  padding-bottom: 1px;
  overflow: hidden;
  background-color: #e5e5e5;
}

.pull-right {
  float: right !important;
}

/* UAP-style diagnosis section (inline on Edit page) */
.diagnosis h3 {
  font-size: 1.25rem;
}

.diagnosis h5 {
  font-size: 1rem;
  padding-left: 0;
}

.diagnosis .row {
  padding-left: 0 !important;
}

.diagnosis li {
  padding-bottom: 0.25rem;
}

.diagnosis {
  border-radius: 0.267rem;
}

/* Footer layout adapted from existing ECA apps. */
.app-footer {
  background-color: #f7f7f7;
  border-top: 1px solid #e2e2e2;
  padding-top: 0.75rem;
  padding-bottom: 1rem;
}

.app-footer-panel {
  padding: 0.5rem 0;
}

.app-footer-top-row {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  justify-content: space-between;
  border-bottom: 1px solid #e1e1e1;
  padding-bottom: 0.75rem;
  margin-bottom: 0.75rem;
}

.app-footer-contact {
  color: #555;
  font-size: 0.92rem;
  line-height: 1.5;
  max-width: 70rem;
}

.app-footer-help {
  color: #4a4a4a;
}

.app-footer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.85rem;
  color: #666;
  font-size: 0.86rem;
}

.app-footer-meta span {
  position: relative;
}

.app-footer-meta span + span::before {
  content: "|";
  color: #999;
  margin-right: 0.85rem;
}

.app-footer-label {
  color: #444;
  font-weight: 700;
  margin-right: 0.25rem;
}

.app-footer-contact a {
  color: #0056b3;
  text-decoration: none;
  font-weight: 600;
}

.app-footer-contact a:hover {
  text-decoration: underline;
}

.app-footer-connected {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.45rem;
  min-width: 18rem;
  justify-content: center;
  color: #666;
  font-size: 0.88rem;
  text-align: right;
}

.app-footer-connected-line {
  white-space: nowrap;
  letter-spacing: 0.02em;
  color: #7a7a7a;
}

.app-footer-connected strong {
  color: #8b1f1f;
  font-weight: 700;
}

.btn.btn-sm.app-footer-error-log-btn {
  padding: 0.1rem 0.35rem;
  font-size: 0.7rem;
  line-height: 1.2;
  border-radius: 0.15rem;
}

.app-footer-powered {
  color: #555;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.45;
}

@media (max-width: 991.98px) {
  .app-footer-top-row {
    flex-direction: column;
  }

  .app-footer-meta span + span::before {
    display: none;
  }

  .app-footer-connected {
    min-width: 0;
    align-items: flex-start;
    justify-content: flex-start;
    text-align: left;
  }
}

.error-log-pre {
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 70vh;
  overflow: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

/* Table styling refresh - keep Bootstrap look, add subtle depth */
.table {
  --bs-table-striped-bg: #f5f8ff;
  --bs-table-hover-bg: #eef3ff;
  --bs-table-accent-bg: transparent;
  border-color: #d9e2f1;
}

.table thead th {
  background-color: #edf3ff;
  color: #1f3f72;
  border-bottom: 1px solid #c8d8f0;
  font-weight: 600;
}

.table > :not(caption) > * > th,
.table > :not(caption) > * > td {
  border-bottom-color: #d9e2f1;
  vertical-align: middle;
}

.table:not(.table-striped) tbody tr:nth-of-type(even) {
  background-color: #fafcff;
}

/* Global polished popup styling for date/time pickers (Flatpickr) */
.flatpickr-calendar {
  border: 1px solid #d0d7e2;
  border-radius: 0.75rem;
  box-shadow: 0 14px 36px rgba(18, 38, 63, 0.18);
  overflow: hidden;
}

.flatpickr-months {
  background: #f8f9fc;
  border-bottom: 1px solid #e3e8f1;
}

.flatpickr-current-month {
  font-weight: 600;
}

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange {
  background: #0d6efd;
  border-color: #0d6efd;
}

.flatpickr-day:hover {
  background: #e9f2ff;
  border-color: #cfe2ff;
}

/* Global date/time input polish (native + JS pickers) */
input[type="date"].form-control,
input[type="time"].form-control,
input[type="datetime-local"].form-control,
input[type="date"].form-control-lg,
input[type="time"].form-control-lg,
input[type="datetime-local"].form-control-lg,
input[type="date"].form-control-sm,
input[type="time"].form-control-sm,
input[type="datetime-local"].form-control-sm {
  border-color: #ccd8ea;
  background-color: #fff;
  color: #1b355f;
  font-weight: 500;
  letter-spacing: 0.01em;
}

input[type="date"].form-control:hover,
input[type="time"].form-control:hover,
input[type="datetime-local"].form-control:hover {
  border-color: #a8c0e8;
}

input[type="date"].form-control:focus,
input[type="time"].form-control:focus,
input[type="datetime-local"].form-control:focus {
  border-color: #74a2e8;
  box-shadow: 0 0 0 0.2rem rgba(37, 140, 251, 0.2);
}

input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator,
input[type="datetime-local"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  border-radius: 0.35rem;
  padding: 0.2rem;
  opacity: 0.82;
  transition: background-color 0.15s ease, opacity 0.15s ease, transform 0.15s ease;
}

input[type="date"]::-webkit-calendar-picker-indicator:hover,
input[type="time"]::-webkit-calendar-picker-indicator:hover,
input[type="datetime-local"]::-webkit-calendar-picker-indicator:hover {
  background-color: rgba(13, 110, 253, 0.12);
  opacity: 1;
  transform: scale(1.05);
}

input[type="date"]::-webkit-datetime-edit,
input[type="time"]::-webkit-datetime-edit,
input[type="datetime-local"]::-webkit-datetime-edit {
  padding-right: 0.1rem;
}

/* Language program CTA grid (Home sidebar + Messages sidebar) */
.language-cta-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.7rem;
}

.language-cta-item {
  border: 1px solid rgba(13, 110, 253, 0.35);
  border-radius: 0.5rem;
  background: linear-gradient(180deg, #ffffff, #f2f7ff);
  transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.language-cta-item:hover {
  background: linear-gradient(180deg, #ffffff, #eaf2ff);
  border-color: #0d6efd;
  box-shadow: 0 8px 16px rgba(13, 110, 253, 0.18);
  transform: translateY(-1px);
}

.language-cta-head {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem;
  margin-bottom: 0;
}

.language-cta-name {
  font-weight: 600;
  margin: 0;
  font-size: 0.98rem;
}

.language-cta-flag {
  width: 22px;
  height: 22px;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid var(--bs-border-color);
}

.language-cta-action {
  border-radius: 0.45rem;
  font-weight: 600;
  padding: 0.6rem 0.75rem;
  text-align: left;
  border: 0;
  background: transparent;
  color: #12357f;
  box-shadow: none !important;
  position: relative;
  padding-right: 2rem;
}

.language-cta-action:hover {
  background: transparent;
  color: #0b2c72;
}

.language-cta-action::after {
  content: "\f285";
  font-family: "bootstrap-icons";
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: #0d6efd;
  font-size: 0.9rem;
  opacity: 0.95;
}

.language-cta-action:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25) !important;
}

.language-cta-action--plain {
  padding-right: 0.75rem;
}

.language-cta-action--plain::after {
  content: none;
}

.language-select-side {
  position: sticky;
  top: calc(var(--app-header-height, 80px) + 1rem);
  max-width: 320px;
  width: 100%;
  align-self: flex-start;
}

.language-select-title {
  font-size: 1.5rem;
  line-height: 1.2;
  margin-bottom: 0;
  font-weight: 600;
  color: #143a8d;
}

.language-select-title em {
  color: inherit;
  font-style: normal;
  font-family: inherit;
}

.course-panel {
  border: 0;
  border-radius: 0.8rem;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

@media (max-width: 991.98px) {
  .language-cta-grid {
    grid-template-columns: 1fr;
  }

  .language-select-side {
    position: static;
    max-width: none;
    margin-bottom: 0;
  }
}

/* Student message center (learner inbox) */
.student-message-center {
  max-width: 72rem;
  margin-left: auto;
  margin-right: auto;
}

.student-message-center .smc-breadcrumb {
  margin-bottom: 0.35rem;
}

.student-message-center .smc-page-title {
  color: #142a52;
  letter-spacing: -0.02em;
}

.student-message-center .smc-msg-title-badge {
  font-size: 0.8rem;
  padding-block: 0.4em;
}

.student-message-center .smc-kicker {
  color: #5a6d8c;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.student-message-center .smc-lang-sidebar {
  margin-left: auto;
}

@media (max-width: 991.98px) {
  .student-message-center .smc-lang-sidebar {
    margin-left: 0;
    max-width: none;
  }
}

/* Empty state — distinct from generic cards */
.student-message-center .smc-empty-layout {
  position: relative;
  padding: 0.25rem 0 2.5rem;
}

.student-message-center .smc-empty-layout::before {
  content: "";
  position: absolute;
  inset: -1rem -8vw auto -8vw;
  height: min(28rem, 70vh);
  max-width: 100vw;
  left: 50%;
  transform: translateX(-50%);
  width: 120%;
  background:
    radial-gradient(ellipse 70% 55% at 18% 20%, rgba(13, 110, 253, 0.09), transparent 55%),
    radial-gradient(ellipse 55% 45% at 88% 65%, rgba(25, 135, 84, 0.06), transparent 50%),
    radial-gradient(ellipse 50% 40% at 50% 100%, rgba(13, 110, 253, 0.05), transparent 45%);
  pointer-events: none;
  z-index: 0;
}

.student-message-center .smc-empty-layout .row {
  position: relative;
  z-index: 1;
}

.student-message-center .smc-empty-main {
  padding: 0.5rem 0 1rem;
}

.student-message-center .smc-empty-main--tab {
  display: flex;
  justify-content: center;
  padding: 0.5rem 0 1.25rem;
}

.student-message-center .smc-empty-panel {
  width: 100%;
  max-width: 36rem;
  margin-inline: auto;
  text-align: center;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid #e3ebf6;
  border-radius: 1rem;
  box-shadow: 0 12px 32px rgba(15, 42, 82, 0.06);
  padding: 2rem 1.5rem 1.75rem;
}

.student-message-center .smc-empty-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.student-message-center .smc-empty-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  max-width: 28rem;
  margin-inline: auto;
}

.student-message-center .smc-empty-main--tab .smc-empty-visual {
  width: 5.5rem;
  height: 5.5rem;
  margin-inline: auto;
  margin-bottom: 1.25rem;
}

.student-message-center .smc-empty-main--tab .smc-empty-mark {
  inset: 1.35rem;
  font-size: 1.5rem;
}

.student-message-center .smc-empty-headline--tab {
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  margin-bottom: 0.75rem;
}

@media (min-width: 992px) {
  .student-message-center .smc-empty-main:not(.smc-empty-main--tab) {
    padding: 1.25rem 1.5rem 1.25rem 0;
  }

  .student-message-center .smc-empty-panel {
    padding: 2.25rem 2rem 2rem;
  }
}

.student-message-center .smc-empty-visual {
  position: relative;
  width: 7.5rem;
  height: 7.5rem;
  margin-bottom: 1.75rem;
}

.student-message-center .smc-empty-orbit {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(13, 110, 253, 0.12);
  background: rgba(255, 255, 255, 0.45);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.8) inset;
}

.student-message-center .smc-empty-orbit--a {
  inset: 0;
  animation: smc-orbit-pulse 5s ease-in-out infinite;
}

.student-message-center .smc-empty-orbit--b {
  inset: 0.65rem;
  border-color: rgba(13, 110, 253, 0.16);
  animation: smc-orbit-pulse 5s ease-in-out infinite 0.35s;
}

.student-message-center .smc-empty-orbit--c {
  inset: 1.25rem;
  border-color: rgba(31, 122, 58, 0.14);
  animation: smc-orbit-pulse 5s ease-in-out infinite 0.7s;
}

.student-message-center .smc-empty-mark {
  position: absolute;
  inset: 1.85rem;
  border-radius: 50%;
  background: linear-gradient(160deg, #e9f7ec 0%, #d8f0df 100%);
  color: #146c2e;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.85rem;
  box-shadow:
    0 0.35rem 1rem rgba(20, 108, 46, 0.12),
    0 1px 0 rgba(255, 255, 255, 0.9) inset;
}

@keyframes smc-orbit-pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.88;
    transform: scale(1.02);
  }
}

@media (prefers-reduced-motion: reduce) {
  .student-message-center .smc-empty-orbit--a,
  .student-message-center .smc-empty-orbit--b,
  .student-message-center .smc-empty-orbit--c {
    animation: none;
  }
}

.student-message-center .smc-empty-status {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #3d6b9e;
  background: rgba(13, 110, 253, 0.08);
  border: 1px solid rgba(13, 110, 253, 0.14);
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
  margin-bottom: 0.85rem !important;
}

.student-message-center .smc-empty-headline {
  font-size: clamp(2rem, 4.5vw, 2.65rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #102a4a;
  line-height: 1.12;
  margin-bottom: 0.85rem;
}

.student-message-center .smc-empty-lead {
  font-size: 1rem;
  line-height: 1.6;
  color: #4a5d78;
  margin-bottom: 0;
}

.student-message-center .smc-empty-lead--secondary {
  font-size: 0.95rem;
  color: #5a6d8c;
  margin-bottom: 0;
}

.student-message-center .smc-empty-lang-chooser {
  margin-top: 1.5rem;
  padding-top: 1.35rem;
  border-top: 1px solid #e3ebf6;
}

.student-message-center .smc-empty-lang-chooser__title {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #5a6d8c;
  margin-bottom: 0.85rem;
  text-align: center;
}

.student-message-center .smc-empty-lang-chooser__flex {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.55rem;
  align-items: stretch;
}

.student-message-center .smc-empty-lang-chooser__item {
  width: auto;
  flex: 0 0 auto;
}

.student-message-center .smc-empty-lang-chooser__item .language-cta-action {
  display: inline-flex;
  align-items: center;
  width: auto;
  height: auto;
  padding: 0.4rem 0.65rem;
  white-space: nowrap;
}

.student-message-center .smc-checklist--inline {
  max-width: 34rem;
}

.student-message-center .smc-empty-actions .btn {
  font-weight: 600;
  border-radius: 0.375rem;
}

.student-message-center .smc-checklist {
  list-style: none;
  padding-left: 0;
  margin-bottom: 0;
}

.student-message-center .smc-checklist li {
  position: relative;
  padding-left: 1.65rem;
  margin-bottom: 0.65rem;
  font-size: 0.94rem;
  line-height: 1.45;
  color: #3d4f66;
}

.student-message-center .smc-checklist li:last-child {
  margin-bottom: 0;
}

.student-message-center .smc-checklist li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  top: 0.05rem;
  font-size: 0.85rem;
  font-weight: 800;
  color: #198754;
  line-height: 1;
}

.student-message-center .smc-message-card {
  border: 1px solid #e5edf7 !important;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.student-message-center .smc-message-card:hover {
  box-shadow: 0 0.35rem 1.1rem rgba(20, 42, 82, 0.08) !important;
  border-color: #cfdcf0 !important;
}

/* Match Bootstrap .alert-info (see bootstrap.css .alert-info) for concurrent-enrollment emphasis */
.student-message-center .smc-message-card.smc-message-card--info-emphasis {
  color: #055160;
  background-color: #cff4fc !important;
  border: 1px solid #b6effb !important;
  box-shadow: 0 0 0 0.05rem #b6effb;
}

.student-message-center .smc-message-card.smc-message-card--info-emphasis:hover {
  border-color: #9eeaf9 !important;
  box-shadow: 0 0.35rem 1rem rgba(5, 81, 96, 0.12) !important;
}

.student-message-center .smc-message-card.smc-message-card--info-emphasis .text-muted {
  color: #0a6f82 !important;
}

.student-message-center .smc-message-card.smc-message-card--info-emphasis .smc-message-card-lang {
  background: rgba(255, 255, 255, 0.65);
  color: #04414d;
}

.student-message-center .smc-message-dismiss-wrap {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  z-index: 2;
}

.student-message-center .smc-message-dismiss-btn {
  width: 2rem;
  height: 2rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.student-message-center .smc-pill {
  display: inline-flex;
  align-items: center;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: #e8eef9;
  color: #2a4a7a;
}

.student-message-center .smc-pill--enrollment {
  background: #e6f4ff;
  color: #0b5ed7;
}

.student-message-center .smc-pill--reference {
  background: #eef1f5;
  color: #495057;
  letter-spacing: 0.02em;
  text-transform: none;
  font-weight: 600;
  font-size: 0.72rem;
}

.student-message-center .smc-coordinator-remarks {
  border: 1px solid #ffda6a;
  border-left: 4px solid #ffc107;
  border-radius: 0.5rem;
  background: linear-gradient(180deg, #fff9e6 0%, #fff3cd 100%);
  box-shadow: 0 0.15rem 0.55rem rgba(102, 77, 3, 0.1);
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
}

.student-message-center .smc-coordinator-remarks__header {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.5rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #664d03;
}

.student-message-center .smc-coordinator-remarks__icon {
  font-size: 0.95rem;
  color: #cc9a06;
  flex-shrink: 0;
}

.student-message-center .smc-coordinator-remarks__body {
  font-size: 0.94rem;
  font-weight: 500;
  line-height: 1.5;
  color: #332701;
  white-space: pre-wrap;
}

.student-message-center .smc-message-card--info-emphasis .smc-coordinator-remarks {
  background: linear-gradient(180deg, #fffdf5 0%, #fff3cd 100%);
  border-color: #ffc107;
  box-shadow: 0 0.15rem 0.55rem rgba(102, 77, 3, 0.14);
}

.student-message-center .smc-meta__row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 0.5rem;
  row-gap: 0.15rem;
}

.student-message-center .smc-meta__row + .smc-meta__row {
  margin-top: 0.35rem;
}

.student-message-center .smc-meta dt {
  font-weight: 600;
  flex: 0 0 auto;
}

.student-message-center .smc-meta dd {
  flex: 1 1 auto;
  min-width: 0;
}

.student-message-center .smc-meta dd .unlf-framework-info-btn {
  margin-left: 0.35rem;
}

.student-message-center .smc-my-enrollments-heading {
  letter-spacing: 0.08em;
}

.student-message-center .smc-enrollment-card {
  border-color: #e2eaf0 !important;
  border-radius: 0.65rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.student-message-center .smc-enrollment-card:hover {
  border-color: rgba(13, 110, 253, 0.45) !important;
  box-shadow: 0 0.35rem 0.9rem rgba(13, 110, 253, 0.12) !important;
}

.student-message-center .smc-enrollment-card__flag {
  object-fit: cover;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.student-message-center .smc-message-card__flag {
  object-fit: cover;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 3px;
  flex-shrink: 0;
}

.student-message-center .smc-message-card-lang {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.18rem 0.55rem 0.18rem 0.35rem;
  border-radius: 999px;
  border: 0;
  background: #e8eef9;
  color: #2a4a7a;
  box-shadow: none;
  flex-shrink: 0;
  max-width: min(100%, 14rem);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.2;
}

.student-message-center .smc-message-card-lang__flag {
  width: 18px;
  height: 13px;
  object-fit: cover;
  border-radius: 2px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  flex-shrink: 0;
}

.student-message-center .smc-message-card-lang__emoji {
  font-size: 0.85rem;
  line-height: 1;
  flex-shrink: 0;
}

.student-message-center .smc-message-card-lang__name {
  font-weight: 700;
  font-size: inherit;
  color: inherit;
  letter-spacing: inherit;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Workflow action dialog aligned to Language School look */
.app-workflow-dialog .app-workflow-dialog__content {
  border: 1px solid #dbe4f0;
  border-radius: 0.9rem;
  box-shadow: 0 1rem 2rem rgba(15, 23, 42, 0.16);
}

.app-workflow-dialog .app-workflow-dialog__header {
  border-bottom: 1px solid #e8edf5;
  padding: 0.95rem 1.1rem;
}

.app-workflow-dialog .modal-title {
  color: #1f3b74;
  font-weight: 700;
  font-size: 1.05rem;
}

.app-workflow-dialog .modal-title.app-workflow-dialog__title--danger {
  color: var(--bs-danger);
}

.app-workflow-dialog .app-workflow-dialog__body {
  padding: 0.95rem 1.1rem 0.8rem;
}

.app-workflow-dialog .app-workflow-dialog__message {
  color: #475569;
  font-size: 0.95rem;
}

.app-workflow-dialog .app-workflow-dialog__label {
  color: #334155;
  font-weight: 600;
  font-size: 0.9rem;
}

.app-workflow-dialog .app-workflow-dialog__textarea {
  border-color: #d5e0ee;
  min-height: 112px;
}

.app-workflow-dialog .app-workflow-dialog__textarea:focus {
  border-color: #7aa5eb;
  box-shadow: 0 0 0 0.18rem rgba(37, 99, 235, 0.16);
}

.app-workflow-dialog .app-workflow-dialog__footer {
  border-top: 1px solid #e8edf5;
  padding: 0.7rem 1.1rem 1rem;
}

/* Staff inbox — empty queue */
.inbox-staff-empty {
  border: 1px solid #e2eaf5 !important;
  border-radius: 0.75rem;
}

.inbox-staff-empty__accent {
  height: 3px;
  background: linear-gradient(90deg, #6c757d 0%, #adb5bd 50%, #dee2e6 100%);
}

.inbox-staff-empty__icon {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 50%;
  background: linear-gradient(180deg, #f1f4f9 0%, #e8edf6 100%);
  color: #5c6f8e;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  box-shadow: 0 0.25rem 0.75rem rgba(16, 42, 74, 0.06);
}

.inbox-staff-empty__eyebrow {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #6c757d;
}

/* ID document preview modal — fit image to viewport; PDF uses iframe scroll */
.id-document-modal-body {
  height: 75vh;
  min-height: 280px;
  background: #f1f3f5;
}

/* Top-align so scroll starts at document top (center + overflow hides the top at scroll 0). */
.id-document-image-host {
  width: 100%;
  height: 100%;
  overflow: auto;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  box-sizing: border-box;
  padding: 0.5rem;
}

.id-document-image-host img {
  display: block;
  flex-shrink: 0;
  background: #fff;
  box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.08);
}

.beginner-unlf-explainer {
  max-width: 42rem;
}

/* Learner Messages — UNLF reference (full grid once, then single tier) */
.unlf-framework-info-btn {
  flex-shrink: 0;
  white-space: nowrap;
  padding: 0 0.3rem !important;
  font-size: inherit;
  font-style: italic;
  line-height: 1.2;
  vertical-align: baseline;
  text-decoration: none;
  border: 1px solid rgba(13, 110, 253, 0.3);
  border-radius: 0.2rem;
}
.unlf-framework-info-btn:hover,
.unlf-framework-info-btn:focus-visible {
  text-decoration: none;
  background: rgba(13, 110, 253, 0.06);
}
.unlf-framework-panel .unlf-level-title {
  color: #143a8d;
}
.unlf-framework-panel .unlf-level-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  color: #6c757d;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 0.35rem;
  display: block;
}
.unlf-framework-panel .unlf-level-divider {
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px dashed rgba(13, 110, 253, 0.22);
}
.unlf-framework-panel .unlf-level-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.unlf-framework-panel .unlf-level-grid--single {
  grid-template-columns: minmax(0, 1fr);
  max-width: 42rem;
}
.unlf-framework-panel .unlf-level-item {
  border: 1px solid rgba(13, 110, 253, 0.16);
  border-top: 0.32rem solid #2558d7;
  border-radius: 0.7rem;
  background: linear-gradient(180deg, #ffffff, #f7fbff);
  padding: 1rem 1rem 0.95rem;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}
.unlf-framework-panel .unlf-level-item p {
  margin-bottom: 0.65rem;
  font-size: 0.93rem;
  line-height: 1.55;
  color: #2a3344;
}
.unlf-framework-panel .unlf-level-item p:last-child {
  margin-bottom: 0;
}
@media (max-width: 767.98px) {
  .unlf-framework-panel .unlf-level-grid {
    grid-template-columns: 1fr;
  }
}

/* Required field marker (after label text or Display metadata) */
.label-required::after {
  content: " *";
  color: var(--bs-danger);
  font-weight: 700;
}

/* Operations dashboard */
.ops-dashboard .ops-kpi-card {
  display: flex;
  align-items: stretch;
  gap: 0.85rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(13, 110, 253, 0.14);
  background: linear-gradient(180deg, #ffffff, #f7faff);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06);
  padding: 1rem 1.05rem;
  height: 100%;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.ops-dashboard .ops-kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.1);
}

.ops-dashboard .ops-kpi-card__icon {
  flex-shrink: 0;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.65rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.ops-dashboard .ops-kpi-card__body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.ops-dashboard .ops-kpi-card__label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #5a6578;
}

.ops-dashboard .ops-kpi-card__value {
  font-size: 1.85rem;
  font-weight: 700;
  line-height: 1.15;
  color: #1f2a44;
}

.ops-dashboard .ops-kpi-card__hint {
  font-size: 0.8rem;
  color: var(--bs-secondary-color);
  margin-top: 0.15rem;
}

.ops-dashboard .ops-kpi-card--primary .ops-kpi-card__icon {
  background: rgba(13, 110, 253, 0.12);
  color: #0d6efd;
}

.ops-dashboard .ops-kpi-card--success .ops-kpi-card__icon {
  background: rgba(25, 135, 84, 0.12);
  color: #198754;
}

.ops-dashboard .ops-kpi-card--info .ops-kpi-card__icon {
  background: rgba(13, 202, 240, 0.14);
  color: #0aa2c0;
}

.ops-dashboard .ops-kpi-card--warning .ops-kpi-card__icon {
  background: rgba(255, 193, 7, 0.2);
  color: #997404;
}

.ops-dashboard .ops-kpi-card--alert {
  border-color: rgba(255, 193, 7, 0.55);
  background: linear-gradient(180deg, #fffbeb, #fffdf5);
}

.ops-dashboard .ops-panel__header {
  background: #fff;
  border-bottom: 1px solid rgba(13, 110, 253, 0.1);
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
}

.ops-dashboard .ops-table thead th {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #5a6578;
  border-bottom-width: 1px;
  white-space: nowrap;
}

.ops-dashboard .ops-table tbody td {
  vertical-align: middle;
}

.ops-dashboard .ops-flag {
  width: 24px;
  height: 18px;
  object-fit: cover;
  border-radius: 2px;
  flex-shrink: 0;
}

.ops-dashboard .ops-empty-state {
  text-align: center;
}

.ops-dashboard .ops-empty-state__icon {
  display: block;
  font-size: 2rem;
  color: #adb5bd;
  margin-bottom: 0.5rem;
}

.report-period-selector__label {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #495057;
}

.report-period-selector__select {
  max-width: 100%;
}

.content-header-right .report-period-selector,
.content-header-right .enrollment-new-enrollment-action {
  min-width: 0;
}

.enrollment-new-enrollment-action__menu {
  min-width: 14rem;
}

.enrollment-new-enrollment-action__item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.enrollment-new-enrollment-action__flag {
  object-fit: cover;
  border-radius: 2px;
  flex-shrink: 0;
}

.inbox-enroll-header-action__label {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #495057;
}

.inbox-enroll-header-action__select {
  max-width: 100%;
}

@media (min-width: 992px) {
  .content-header-right {
    text-align: right;
  }

  .content-header-right .report-period-selector__select {
    min-width: 22rem;
    max-width: 28rem;
    margin-left: auto;
  }

  .content-header-right .inbox-enroll-header-action__group {
    min-width: 18rem;
    max-width: 24rem;
    margin-left: auto;
  }
}

.report-layout {
  align-items: flex-start;
}

.report-nav {
  border: 1px solid #dee2e6;
  border-radius: 0.5rem;
  overflow: hidden;
}

.report-nav-group + .report-nav-group {
  border-top: 1px solid #e9ecef;
}

.report-nav-group-title {
  padding: 0.65rem 1rem 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #6c757d;
}

.report-nav-item {
  display: block;
  padding: 0.55rem 1rem;
  color: #0d6efd;
  text-decoration: none;
  font-size: 0.9rem;
  border-left: 3px solid transparent;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.report-nav-item:hover {
  background: #f8f9fa;
  color: #0a58ca;
}

.report-nav-item.active {
  background: #0d6efd;
  color: #fff;
  border-left-color: #0a58ca;
  font-weight: 600;
}

.report-main {
  border: 1px solid #dee2e6;
  border-radius: 0.5rem;
}

.report-main-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #198754;
}

.report-standalone-page {
  margin: 0;
  padding: 1.5rem;
  background: #f8f9fa;
  min-height: 100vh;
}

.report-standalone-page > .report-document-toolbar,
.report-standalone-page > .report-document {
  box-sizing: border-box;
  width: 100%;
  max-width: 72rem;
  margin-left: auto;
  margin-right: auto;
}

.report-document-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  padding: 0 0;
  background: none;
  border: 0;
  box-shadow: none;
}

.report-document {
  border: 1px solid #dee2e6;
  border-radius: 0.5rem;
  background: #fff;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.report-document-header__marks {
  flex-shrink: 0;
}

.report-document-header__emblem {
  width: 52px;
  height: 52px;
  object-fit: contain;
  flex-shrink: 0;
  filter: brightness(0) saturate(100%) invert(37%) sepia(61%) saturate(5694%) hue-rotate(210deg) brightness(99%) contrast(104%);
}

.report-document-header__divider {
  display: block;
  width: 1px;
  height: 2.25rem;
  background-color: rgba(13, 110, 253, 0.35);
  flex-shrink: 0;
}

.report-document-header__app-icon {
  font-size: 1.75rem;
  line-height: 1;
  color: #0d6efd;
}

.report-document-header__app-name {
  font-size: 1rem;
  font-weight: 600;
  color: #495057;
  line-height: 1.2;
}

.report-document-header__app-context {
  font-size: 0.8rem;
  line-height: 1.2;
}

.report-document-header__title {
  font-weight: 700;
  color: #3d5a73;
}

.report-document-header__period {
  color: #495057;
  font-weight: 500;
}

.report-document-header__rule,
.report-document-footer__rule {
  border: 0;
  border-top: 1px solid #dee2e6;
  opacity: 1;
  margin: 0;
}

.report-document-body {
  padding: 0.25rem 0 1.25rem;
}

.report-table-summary th,
.report-table-summary td {
  border-top: 1px solid #dee2e6;
  vertical-align: middle;
}

.report-table-summary tr:first-child th,
.report-table-summary tr:first-child td {
  border-top-width: 2px;
}

.report-table-summary th {
  font-weight: 600;
  background-color: #f8f9fa;
}

.report-document-footer {
  margin-top: 1.5rem;
  padding-top: 0.75rem;
}

.report-document-footer__content {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: center;
  gap: 0.75rem;
}

.report-document-footer__left {
  justify-self: start;
  text-align: left;
}

.report-document-footer__center {
  justify-self: center;
  text-align: center;
}

.report-document-footer__right {
  justify-self: end;
  text-align: right;
}

@media (max-width: 767.98px) {
  .report-document-footer__content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .report-document-footer__left,
  .report-document-footer__center,
  .report-document-footer__right {
    justify-self: center;
    text-align: center;
  }
}

@media print {
  .report-standalone-page {
    padding: 0;
    background: #fff;
  }

  .report-standalone-page > .report-document {
    max-width: none;
    margin: 0;
  }

  .report-document-toolbar {
    display: none !important;
  }

  #appHeader,
  .app-footer,
  .report-period-selector,
  .report-nav,
  .content-header,
  .report-document-toolbar,
  .report-document-header__toolbar,
  .report-document-header__actions .btn,
  .report-document-header__actions a,
  .report-document-header__actions button,
  .btn-close {
    display: none !important;
  }

  body {
    background: #fff !important;
    color: #212529;
  }

  .container {
    max-width: none !important;
    width: 100% !important;
    margin-top: 0 !important;
  }

  .report-document {
    border: none !important;
    box-shadow: none !important;
    padding: 1.5rem !important;
  }

  .shadow-sm {
    box-shadow: none !important;
  }

  /* Summary cards — keep the same horizontal layout as the HTML report */
  .report-results > .row {
    display: table !important;
    width: 100% !important;
    table-layout: fixed !important;
    border-collapse: separate !important;
    border-spacing: 10px 0 !important;
    margin: 0 0 1.25rem 0 !important;
  }

  .report-results > .row > [class*="col-"] {
    display: table-cell !important;
    vertical-align: top !important;
    width: auto !important;
    max-width: none !important;
    padding: 0 !important;
    float: none !important;
    flex: none !important;
  }

  .report-results > .row > .col-md-4 {
    width: 33.333% !important;
  }

  .report-results > .row > .col-sm-6.col-xl-3,
  .report-results > .row > .col-xl-3 {
    width: 25% !important;
  }

  .report-results > .row > .col-sm-6 {
    width: 50% !important;
  }

  .report-results .card {
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    height: 100%;
  }

  /* Keep summary stat cards on one page; allow table sections to span pages */
  .report-results > .row .card {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .report-results > .card,
  .report-results > .table-responsive {
    break-inside: auto;
    page-break-inside: auto;
  }

  .report-results .card.border-success {
    border-color: #198754 !important;
  }

  .report-results .card.border-warning {
    border-color: #ffc107 !important;
  }

  .report-results .card.border-primary {
    border-color: #0d6efd !important;
  }

  .report-results .card .card-body {
    padding: 0.75rem !important;
  }

  .report-results .fs-4 {
    font-size: 1.35rem !important;
    font-weight: 600;
  }

  .report-document .table,
  .report-results .table {
    width: 100%;
    font-size: 10px;
    border-collapse: collapse;
    page-break-inside: auto;
    break-inside: auto;
  }

  .report-document .table thead,
  .report-results .table thead {
    display: table-header-group;
  }

  .report-document .table tbody,
  .report-results .table tbody {
    display: table-row-group;
  }

  .report-document .table tfoot,
  .report-results .table tfoot {
    display: table-row-group;
  }

  .report-document .table tfoot th,
  .report-document .table tfoot td,
  .report-results .table tfoot th,
  .report-results .table tfoot td {
    background-color: #f8f9fa !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .report-document .table th,
  .report-document .table td,
  .report-results .table th,
  .report-results .table td {
    vertical-align: middle;
    padding: 0.35rem 0.5rem;
    border-top: 1px solid #dee2e6;
  }

  .report-document .table thead th,
  .report-results .table thead th {
    background-color: #e7f1ff !important;
    color: #3d5a73;
    font-weight: 600;
    border-bottom: 2px solid #dee2e6;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .report-document .table thead tr,
  .report-results .table thead tr {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .report-document .table tbody tr,
  .report-results .table tbody tr {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .report-document .table-striped > tbody > tr:nth-of-type(odd),
  .report-results .table-striped > tbody > tr:nth-of-type(odd) {
    background-color: #f8f9fa !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .report-document .table-responsive,
  .report-results .table-responsive {
    overflow: visible !important;
  }

  .report-document .badge {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .report-document .badge.bg-primary,
  .report-document .bg-primary {
    background-color: #0d6efd !important;
    color: #fff !important;
  }

  .report-document .badge.bg-success,
  .report-document .bg-success {
    background-color: #198754 !important;
    color: #fff !important;
  }

  .report-document .badge.bg-warning,
  .report-document .bg-warning {
    background-color: #ffc107 !important;
    color: #212529 !important;
  }

  .report-document .badge.bg-secondary,
  .report-document .bg-secondary {
    background-color: #6c757d !important;
    color: #fff !important;
  }

  .report-document .badge.text-dark {
    color: #212529 !important;
  }

  .report-document .text-success {
    color: #198754 !important;
  }

  .report-document .text-warning {
    color: #cc9a06 !important;
  }

  .report-document .text-primary {
    color: #0d6efd !important;
  }

  .report-document-header__emblem {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}

.report-filters {
  border: 1px solid #dee2e6;
  border-radius: 0.5rem;
  background: #fff;
}

.report-filter-form {
  max-width: 42rem;
}

.report-filter-row {
  display: grid;
  grid-template-columns: minmax(9rem, 11rem) 1fr;
  gap: 0.75rem 1rem;
  align-items: center;
  margin-bottom: 0.85rem;
}

.report-filter-label {
  margin-bottom: 0;
  font-weight: 600;
  text-align: right;
  color: #495057;
  font-size: 0.9rem;
}

.report-filter-field .form-control,
.report-filter-field .form-select {
  max-width: 18rem;
}

.report-filter-actions {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #e9ecef;
  text-align: right;
}

.report-filter-actions--solo {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.report-results {
  margin-top: 0.5rem;
}

.report-grouped-results {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.report-group {
  border: 1px solid #dee2e6;
  border-radius: 0.5rem;
  overflow: hidden;
  background: #fff;
}

.report-group-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding: 0.65rem 1rem;
  background: #f1f5f9;
  border-bottom: 1px solid #dee2e6;
}

.report-group-header__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

.report-group-header__sep {
  opacity: 0.55;
}

.report-group-body {
  padding: 0.5rem 0.75rem 0.75rem 1.5rem;
  background: #fafbfc;
}

.report-group-table {
  margin-bottom: 0;
  background: #fff;
}

.report-group-table thead th {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: #6c757d;
  border-bottom-width: 1px;
}

@media (max-width: 991.98px) {
  .report-group-body {
    padding-left: 1rem;
  }
}

@media (max-width: 991.98px) {
  .report-filter-row {
    grid-template-columns: 1fr;
  }

  .report-filter-label {
    text-align: left;
  }

  .report-filter-field .form-control,
  .report-filter-field .form-select {
    max-width: none;
  }
}

.ops-dashboard .ops-chart-container,
.report-charts .report-chart-container {
  position: relative;
  height: 280px;
}

.ops-dashboard .ops-chart-container--tall,
.report-charts .report-chart-container--tall {
  height: min(420px, 60vh);
}

.ops-dashboard .ops-chart-container--compact,
.report-charts .report-chart-container--compact {
  height: 220px;
}

.ops-dashboard .ops-chart-caption,
.report-charts .report-chart-caption {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #5a6578;
  margin-bottom: 0;
}

.ops-dashboard .ops-chart-empty,
.report-charts .report-chart-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 180px;
  padding: 1rem;
  border: 1px dashed rgba(13, 110, 253, 0.2);
  border-radius: 0.65rem;
  background: #f8faff;
  color: #5a6578;
  font-size: 0.88rem;
  text-align: center;
}

.ops-dashboard .ops-attention-panel {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-height: 220px;
}

.ops-dashboard .ops-attention-panel__clear {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1rem;
  border-radius: 0.65rem;
  background: #f0fdf4;
  border: 1px solid rgba(25, 135, 84, 0.25);
  color: #146c43;
  font-size: 0.9rem;
  min-height: 220px;
  justify-content: center;
}

.ops-dashboard .ops-attention-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  border-radius: 0.6rem;
  border: 1px solid rgba(13, 110, 253, 0.1);
  background: #fff;
}

.ops-dashboard .ops-attention-item--active {
  border-color: rgba(255, 193, 7, 0.45);
  background: #fffdf5;
}

.ops-dashboard .ops-attention-item__main {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  min-width: 0;
}

.ops-dashboard .ops-attention-item__icon {
  color: #0d6efd;
  font-size: 1rem;
  margin-top: 0.1rem;
  flex-shrink: 0;
}

.ops-dashboard .ops-attention-item--active .ops-attention-item__icon {
  color: #997404;
}

.ops-dashboard .ops-attention-item__label {
  font-weight: 600;
  font-size: 0.88rem;
  color: #1f2a44;
}

.ops-dashboard .ops-attention-item__detail {
  font-size: 0.78rem;
  color: #5a6578;
}

/* Weekly timetable on class creation (teacher + draft periods) */
.teacher-weekly-calendar__hint {
  font-size: 0.75rem;
  color: var(--bs-secondary-color);
}

.teacher-weekly-calendar__empty-note {
  font-size: 0.75rem;
  color: #055160;
  background-color: #cff4fc;
  border-radius: 0.25rem;
  padding: 0.25rem 0.5rem;
}

.teacher-weekly-calendar {
  --twc-hour-count: 24;
  --twc-day-count: 7;
  --twc-axis-width: 4.75rem;
  font-size: 0.75rem;
}

.teacher-weekly-calendar__header-row,
.teacher-weekly-calendar__main {
  display: grid;
  grid-template-columns: var(--twc-axis-width) 1fr;
}

.teacher-weekly-calendar__header-row {
  position: sticky;
  top: 0;
  z-index: 4;
  border-bottom: 1px solid #dee2e6;
  background: #f8f9fa;
}

.teacher-weekly-calendar__corner {
  border-right: 1px solid #dee2e6;
}

.teacher-weekly-calendar__day-headers {
  display: grid;
  grid-template-columns: repeat(var(--twc-day-count), minmax(4.25rem, 1fr));
}

.teacher-weekly-calendar__day-header {
  padding: 0.35rem 0.25rem;
  text-align: center;
  font-weight: 600;
  color: #495057;
  border-right: 1px solid #e9ecef;
}

.teacher-weekly-calendar__day-header:last-child {
  border-right: none;
}

.teacher-weekly-calendar__day-header--weekend {
  background: #f3e9df;
  color: #7a4f2d;
}

.teacher-weekly-calendar__column--weekend .teacher-weekly-calendar__canvas {
  background-color: #faf6f1;
  background-image: repeating-linear-gradient(
    to bottom,
    transparent,
    transparent calc((100% / var(--twc-hour-count)) - 1px),
    #efe6dc calc((100% / var(--twc-hour-count)) - 1px),
    #efe6dc calc(100% / var(--twc-hour-count))
  );
}

.teacher-weekly-calendar__axis {
  border-right: 1px solid #dee2e6;
  position: relative;
}

.teacher-weekly-calendar__axis-label {
  position: absolute;
  right: 0.35rem;
  transform: translateY(-50%);
  color: #6c757d;
  white-space: nowrap;
  line-height: 1;
}

.teacher-weekly-calendar__columns {
  display: grid;
  grid-template-columns: repeat(var(--twc-day-count), minmax(4.25rem, 1fr));
}

.teacher-weekly-calendar__column {
  border-right: 1px solid #e9ecef;
  min-width: 0;
}

.teacher-weekly-calendar__column:last-child {
  border-right: none;
}

.teacher-weekly-calendar__canvas {
  position: relative;
  background-color: #fff;
  user-select: none;
  touch-action: none;
  background-image: repeating-linear-gradient(
    to bottom,
    transparent,
    transparent calc((100% / var(--twc-hour-count)) - 1px),
    #eef1f4 calc((100% / var(--twc-hour-count)) - 1px),
    #eef1f4 calc(100% / var(--twc-hour-count))
  );
}

.teacher-weekly-calendar__event {
  position: absolute;
  left: 3px;
  right: 3px;
  border-radius: 0.25rem;
  padding: 0.15rem 0.3rem;
  line-height: 1.2;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
  z-index: 1;
}

.teacher-weekly-calendar__event-title {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  font-weight: 600;
  min-width: 0;
}

.teacher-weekly-calendar__event-title-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.teacher-weekly-calendar__flag {
  width: 16px;
  height: 12px;
  object-fit: cover;
  border-radius: 2px;
  flex-shrink: 0;
}

.teacher-weekly-calendar__flag-emoji {
  flex-shrink: 0;
  font-size: 0.7rem;
  line-height: 1;
}

/* Match .form-control border; beat .btn { border: transparent } when both classes are present */
.flag-emoji-picker .dropdown > button.flag-emoji-picker__toggle {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  text-align: left;
  cursor: pointer;
  color: var(--bs-body-color);
  background-color: var(--bs-body-bg, #fff);
  border: 1px solid #ced4da;
  border-radius: var(--bs-border-radius, 0.375rem);
  box-shadow: none;
  min-height: calc(1.5em + 0.75rem + 2px);
  padding: 0.375rem 2.25rem 0.375rem 0.75rem;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.flag-emoji-picker .dropdown > button.flag-emoji-picker__toggle:hover {
  background-color: var(--bs-body-bg, #fff);
  border-color: #ced4da;
  color: var(--bs-body-color);
}

.flag-emoji-picker .dropdown > button.flag-emoji-picker__toggle:focus,
.flag-emoji-picker .dropdown > button.flag-emoji-picker__toggle.show {
  background-color: var(--bs-body-bg, #fff);
  border-color: #86b7fe;
  color: var(--bs-body-color);
  outline: 0;
  box-shadow: 0 0 0 0.1rem #fff, 0 0 0 0.25rem #258cfb;
}

.flag-emoji-picker .dropdown > button.flag-emoji-picker__toggle::after {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  margin-left: 0;
  transform: translateY(-50%);
  vertical-align: 0;
}

.flag-emoji-picker__dropdown {
  position: relative;
}

.flag-emoji-picker__menu {
  max-height: 16rem;
  overflow-y: auto;
}

.flag-emoji-picker__flag,
.flag-emoji-picker__selected-flag {
  flex-shrink: 0;
  object-fit: cover;
  border-radius: 2px;
  border: 1px solid var(--bs-border-color-translucent);
}

.flag-emoji-picker__selected-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.teacher-weekly-calendar__event-time {
  display: block;
  opacity: 0.9;
  white-space: nowrap;
}

.teacher-weekly-calendar__event--existing {
  background: #cfe2ff;
  border: 1px solid #9ec5fe;
  color: #052c65;
  cursor: pointer;
}

.teacher-weekly-calendar__canvas--editable {
  cursor: crosshair;
}

.teacher-weekly-calendar__event--draft {
  background: #d1e7dd;
  border: 2px dashed #198754;
  color: #0a3622;
  z-index: 2;
  cursor: pointer;
}

.teacher-weekly-calendar__event--draft:hover {
  filter: brightness(0.97);
}

.teacher-weekly-calendar__drag-preview {
  position: absolute;
  left: 3px;
  right: 3px;
  border-radius: 0.25rem;
  background: rgba(25, 135, 84, 0.2);
  border: 2px dashed #198754;
  pointer-events: none;
  z-index: 3;
}

.teacher-weekly-calendar__event--overlap {
  box-shadow: 0 0 0 2px #dc3545;
}

.teacher-weekly-calendar__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin-top: 0.75rem;
}

.teacher-weekly-calendar__legend-item::before {
  content: "";
  display: inline-block;
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 0.15rem;
  margin-right: 0.35rem;
  vertical-align: -0.1rem;
}

.teacher-weekly-calendar__legend-item--existing::before {
  background: #cfe2ff;
  border: 1px solid #9ec5fe;
}

.teacher-weekly-calendar__legend-item--draft::before {
  background: #d1e7dd;
  border: 2px dashed #198754;
}

.teacher-weekly-calendar__event--readonly {
  cursor: default;
  pointer-events: none;
}

.teacher-weekly-calendar__event--readonly:hover {
  filter: none;
}

.class-creation-details__schedule .teacher-weekly-calendar {
  margin-top: 0.25rem;
}

.teacher-weekly-calendar__scroll {
  max-height: 70vh;
  overflow: auto;
}

@media (max-width: 767.98px) {
  .teacher-weekly-calendar__scroll {
    overflow-x: auto;
  }

  .teacher-weekly-calendar__day-headers,
  .teacher-weekly-calendar__columns {
    min-width: calc(var(--twc-day-count) * 5.5rem);
  }
}

/* UAP Bootstrap 4 filter patterns on Bootstrap 5 */
.font-weight-bold {
  font-weight: 700 !important;
}

.input-group-append {
  display: flex;
}

.input-group > .form-control:not(:last-child) {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.input-group-append > .btn,
.input-group-append > .input-group-text {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.table-actions-col {
  width: 1%;
  white-space: nowrap;
}

.table-actions {
  display: inline-flex;
  flex-flow: row nowrap;
  justify-content: flex-end;
  align-items: center;
  gap: 0.375rem;
}

.table-actions > form {
  display: inline-flex;
  margin: 0;
}

.draggable-table-order__handle-col {
  width: 2.5rem;
}

.draggable-table-order__handle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  color: var(--bs-secondary-color);
  cursor: grab;
  border-radius: 0.25rem;
}

.draggable-table-order__handle:hover {
  color: var(--bs-body-color);
  background-color: var(--bs-tertiary-bg);
}

.draggable-table-order__handle:active {
  cursor: grabbing;
}

.draggable-table-order__row--dragging {
  opacity: 0.55;
}

.draggable-table-order__row--drop-target {
  box-shadow: inset 0 2px 0 0 var(--bs-primary);
}

.draggable-table-order--saving {
  opacity: 0.7;
  pointer-events: none;
}