/*
 * Leirbag Learn product identity
 * Loaded last so one coherent system governs every public, owner, tenant,
 * teacher, and learner surface without changing application behavior.
 */

:root {
  color-scheme: light;
  --palette-prussian: #0b0e12;
  --palette-prussian-rgb: 11, 14, 18;
  --palette-pacific: #65cfcb;
  --palette-pacific-rgb: 101, 207, 203;
  --palette-ocean: #4e9a9b;
  --palette-ocean-rgb: 78, 154, 155;
  --palette-aqua: #84d9cc;
  --palette-aqua-rgb: 132, 217, 204;
  --palette-ghost: #f6fafb;
  --palette-ghost-rgb: 246, 250, 251;
  --palette-gold: #f6b84d;
  --palette-gold-rgb: 246, 184, 77;

  --color-ink: #163337;
  --color-muted: #607579;
  --color-canvas: #f3f7f7;
  --color-canvas-rgb: 243, 247, 247;
  --color-panel: #ffffff;
  --color-panel-strong: #ffffff;
  --color-panel-subtle: #edf5f4;
  --color-line: #d7e5e4;
  --color-line-strong: #b9cfcd;
  --color-brand: #2a666a;
  --color-brand-dark: #184046;
  --color-brand-soft: rgba(101, 207, 203, 0.17);
  --color-info: #3288c8;
  --color-success: #16855d;
  --color-warning: #a96c05;
  --color-danger: #c54848;
  --color-soft-blue: rgba(86, 182, 255, 0.13);
  --color-soft-cyan: rgba(101, 207, 203, 0.14);
  --glass-bg: rgba(255, 255, 255, 0.9);
  --glass-bg-strong: rgba(255, 255, 255, 0.97);
  --glass-border: rgba(42, 102, 106, 0.14);
  --glass-highlight: rgba(255, 255, 255, 0.98);
  --sidebar-bg: #0b0e12;
  --sidebar-link: #aab9be;
  --sidebar-link-hover: rgba(101, 207, 203, 0.1);
  --sidebar-link-active: rgba(101, 207, 203, 0.15);
  --app-radius-sm: 10px;
  --app-radius: 14px;
  --app-radius-lg: 20px;
  --app-shadow-soft: 0 10px 28px rgba(24, 64, 70, 0.08);
  --app-shadow: 0 22px 60px rgba(24, 64, 70, 0.12);
  --app-backdrop-blur: blur(18px) saturate(125%);
  --surface-raised: var(--color-panel-strong);
  --shadow-soft: var(--app-shadow-soft);
  --text-main: var(--color-ink);
  --text-muted: var(--color-muted);
  --focus-ring: 0 0 0 4px rgba(101, 207, 203, 0.22);

  --premium-ink: #163337;
  --premium-sea: #4e9a9b;
  --premium-teal: #65cfcb;
  --premium-mint: #84d9cc;
  --premium-platinum: #f3f7f7;
  --premium-cream: #ffffff;
  --premium-line: var(--color-line);
  --premium-control: #f8fbfb;
  --premium-control-strong: #ffffff;
  --premium-sheen: linear-gradient(145deg, rgba(101, 207, 203, 0.1), rgba(255, 255, 255, 0) 58%);
  --premium-shadow: var(--app-shadow);
  --premium-shadow-soft: var(--app-shadow-soft);
  --premium-sidebar: #0b0e12;
  --premium-accent: linear-gradient(135deg, #65cfcb, #84d9cc);
  --premium-teal-dark: #2a666a;

  --lux-ink: #163337;
  --lux-ink-soft: #476367;
  --lux-deep: #0b0e12;
  --lux-deep-soft: #184046;
  --lux-canvas: #f3f7f7;
  --lux-paper: #ffffff;
  --lux-paper-rgb: 255, 255, 255;
  --lux-gold: #f6b84d;
  --lux-gold-soft: rgba(246, 184, 77, 0.14);
  --lux-jade: #2a8d82;
  --lux-coral: #d85c5c;
  --lux-sky: #3288c8;
  --lux-line: var(--color-line);
  --lux-shadow: var(--app-shadow);
  --lux-shadow-soft: var(--app-shadow-soft);
  --lux-radius-xl: 20px;
  --lux-radius-lg: 16px;
  --lux-radius-md: 12px;

  --owner-accent: #2a666a;
  --owner-accent-strong: #184046;
  --owner-accent-soft: rgba(101, 207, 203, 0.14);
  --owner-surface: #ffffff;
  --owner-border: var(--color-line);
  --owner-shadow: var(--app-shadow-soft);

  --bs-primary: #2a666a;
  --bs-primary-rgb: 42, 102, 106;
  --bs-secondary: #607579;
  --bs-secondary-rgb: 96, 117, 121;
  --bs-body-color: var(--color-ink);
  --bs-body-bg: var(--color-canvas);
  --bs-link-color: #2a666a;
  --bs-link-hover-color: #184046;
  --bs-border-color: var(--color-line);
  --bs-font-sans-serif: Inter, "Plus Jakarta Sans", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.secure-capture-shield {
  align-items: center;
  background: #07191c;
  color: #d8fffb;
  display: none;
  font-size: clamp(1rem, 2vw, 1.35rem);
  font-weight: 700;
  inset: 0;
  justify-content: center;
  letter-spacing: 0.02em;
  padding: 2rem;
  position: fixed;
  text-align: center;
  z-index: 2147483647;
}

html.secure-window-inactive .secure-capture-shield,
html.secure-shield-active .secure-capture-shield,
html.secure-page-hidden .secure-capture-shield {
  display: flex;
}

html.secure-window-inactive #main-content,
html.secure-window-inactive .secure-content,
html.secure-shield-active .secure-content,
html.secure-page-hidden .secure-content,
html.secure-window-inactive video,
html.secure-window-inactive iframe,
html.secure-window-inactive canvas {
  visibility: hidden !important;
}

/* Course-content upload preview */
.upload-file-preview {
  background: color-mix(in srgb, var(--color-panel) 92%, var(--color-brand) 8%);
  border: 1px solid var(--color-line);
  border-radius: 14px;
  margin-top: 0.85rem;
  overflow: hidden;
  padding: 0.85rem;
}

.upload-file-preview__header {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.upload-file-preview__item {
  border-top: 1px solid var(--color-line);
  margin-top: 0.85rem;
  padding-top: 0.85rem;
}

.upload-file-preview__header>div {
  min-width: 0;
}

.upload-file-preview__header strong,
.upload-file-preview__header span {
  display: block;
}

.upload-file-preview__header strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-file-preview__header div>span {
  color: var(--text-muted);
  font-size: 0.78rem;
}

.upload-file-preview__item>img,
.upload-file-preview__item>video,
.upload-file-preview__item>iframe {
  background: #081f29;
  border: 0;
  border-radius: 10px;
  display: block;
  max-height: 360px;
  object-fit: contain;
  width: 100%;
}

.upload-file-preview__item>iframe {
  height: 360px;
}

.upload-file-preview__item>audio {
  display: block;
  width: 100%;
}

.upload-file-preview__item>pre {
  background: var(--color-bg);
  border: 1px solid var(--color-line);
  border-radius: 10px;
  color: var(--text-main);
  font: 0.82rem/1.55 ui-monospace, SFMono-Regular, Consolas, monospace;
  margin: 0;
  max-height: 320px;
  overflow: auto;
  padding: 0.85rem;
  white-space: pre-wrap;
}

.upload-file-preview__note {
  color: var(--text-muted);
  margin: 0;
}

.course-access-notice {
  align-items: flex-start;
  background: color-mix(in srgb, var(--color-brand) 8%, var(--color-panel));
  border: 1px solid var(--color-line);
  border-radius: 12px;
  color: var(--text-muted);
  display: flex;
  font-size: 0.82rem;
  gap: 0.65rem;
  line-height: 1.45;
  padding: 0.8rem;
}

.course-access-notice i {
  color: var(--color-brand);
  flex: 0 0 auto;
}

:root[data-theme="dark"],
[data-bs-theme="dark"] {
  color-scheme: dark;
  --color-ink: #f6fafb;
  --color-muted: #aab9be;
  --color-canvas: #101a1e;
  --color-canvas-rgb: 16, 26, 30;
  --color-panel: #17252a;
  --color-panel-strong: #1e3036;
  --color-panel-subtle: #142328;
  --color-line: #345158;
  --color-line-strong: #4b6b72;
  --color-brand: #65cfcb;
  --color-brand-dark: #84d9cc;
  --color-brand-soft: rgba(101, 207, 203, 0.15);
  --color-info: #56b6ff;
  --color-success: #3ed598;
  --color-warning: #f6b84d;
  --color-danger: #ff6b6b;
  --color-soft-blue: rgba(86, 182, 255, 0.12);
  --color-soft-cyan: rgba(101, 207, 203, 0.12);
  --glass-bg: rgba(23, 37, 42, 0.92);
  --glass-bg-strong: rgba(30, 48, 54, 0.96);
  --glass-border: #345158;
  --glass-highlight: rgba(246, 250, 251, 0.06);
  --sidebar-bg: #102126;
  --sidebar-link: #aab9be;
  --sidebar-link-hover: rgba(101, 207, 203, 0.09);
  --sidebar-link-active: rgba(101, 207, 203, 0.14);
  --app-shadow-soft: 0 12px 32px rgba(0, 0, 0, 0.24);
  --app-shadow: 0 26px 72px rgba(0, 0, 0, 0.38);
  --focus-ring: 0 0 0 4px rgba(101, 207, 203, 0.2);

  --premium-ink: #f6fafb;
  --premium-sea: #4e9a9b;
  --premium-teal: #65cfcb;
  --premium-mint: #84d9cc;
  --premium-platinum: #101a1e;
  --premium-cream: #17252a;
  --premium-line: #345158;
  --premium-control: #17252a;
  --premium-control-strong: #1e3036;
  --premium-sheen: linear-gradient(145deg, rgba(101, 207, 203, 0.09), rgba(18, 24, 29, 0) 56%);
  --premium-shadow: var(--app-shadow);
  --premium-shadow-soft: var(--app-shadow-soft);
  --premium-sidebar: #102126;
  --premium-teal-dark: #84d9cc;

  --lux-ink: #f6fafb;
  --lux-ink-soft: #c7d4d7;
  --lux-deep: #102126;
  --lux-deep-soft: #184046;
  --lux-canvas: #101a1e;
  --lux-paper: #17252a;
  --lux-paper-rgb: 23, 37, 42;
  --lux-gold: #f6b84d;
  --lux-gold-soft: rgba(246, 184, 77, 0.12);
  --lux-jade: #65cfcb;
  --lux-coral: #ff7b71;
  --lux-sky: #56b6ff;
  --lux-line: #345158;
  --lux-shadow: var(--app-shadow);
  --lux-shadow-soft: var(--app-shadow-soft);

  --owner-accent: #65cfcb;
  --owner-accent-strong: #84d9cc;
  --owner-accent-soft: rgba(101, 207, 203, 0.12);
  --owner-surface: #17252a;
  --owner-border: #345158;
  --owner-shadow: var(--app-shadow-soft);

  --bs-primary: #65cfcb;
  --bs-primary-rgb: 101, 207, 203;
  --bs-secondary: #aab9be;
  --bs-secondary-rgb: 170, 185, 190;
  --bs-body-color: #f6fafb;
  --bs-body-bg: #101a1e;
  --bs-link-color: #84d9cc;
  --bs-link-hover-color: #a4ebe0;
  --bs-border-color: #345158;
}

html {
  background: var(--color-canvas);
  scroll-behavior: smooth;
}

body {
  background:
    radial-gradient(circle at 88% -10%, rgba(101, 207, 203, 0.12), transparent 31rem),
    radial-gradient(circle at -8% 38%, rgba(78, 154, 155, 0.08), transparent 28rem),
    var(--color-canvas);
  color: var(--color-ink);
  font-family: var(--bs-font-sans-serif);
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
  letter-spacing: -0.008em;
}

::selection {
  background: rgba(101, 207, 203, 0.3);
  color: var(--color-ink);
}

a {
  text-underline-offset: 0.18em;
}

h1,
h2,
h3,
h4,
h5,
h6,
.display-1,
.display-2,
.display-3,
.display-4,
.display-5,
.display-6 {
  color: var(--color-ink);
  font-weight: 750;
  letter-spacing: -0.035em;
}

.text-secondary,
.text-muted {
  color: var(--color-muted) !important;
}

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid #65cfcb;
  outline-offset: 3px;
}

.skip-link {
  background: #65cfcb;
  border-radius: 0 0 10px 10px;
  color: #081012;
  font-weight: 800;
  left: 1rem;
  padding: 0.65rem 1rem;
  position: fixed;
  top: -5rem;
  transition: top 140ms ease;
  z-index: 2000;
}

.skip-link:focus {
  top: 0;
}

/* Brand assets */
.brand-lockup,
.auth-logo,
.marketing-logo {
  display: block;
  height: auto;
  object-fit: contain;
}

.brand-lockup {
  max-width: 13.5rem;
  width: 100%;
}

.leirbag-logo,
.navbar-logo {
  background: #fff;
  border: 1px solid rgba(101, 207, 203, 0.2);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.16);
}

.brand-wide-nav {
  align-items: center;
  border-radius: 0.7rem;
  display: inline-flex;
  flex: 0 0 auto;
  justify-content: center;
  overflow: hidden;
  padding: 0.2rem 0.35rem;
}

.brand-wide-nav img {
  display: block;
  height: auto;
  max-height: 100%;
  object-fit: contain;
  width: 100%;
}

.brand-wide-nav--sidebar {
  height: 3.4rem;
  width: 100%;
}

.brand-wide-nav--top {
  height: 2.65rem;
  width: 9.75rem;
}

.brand-wide-nav--top.brand-favicon-nav {
  aspect-ratio: 1;
  padding: 0.25rem;
  width: 2.65rem;
}

.brand-wide-nav--top.brand-favicon-nav img {
  height: 1.85rem;
  width: 1.85rem;
}

.sidebar-brand-lockup {
  align-items: center;
  display: flex;
  gap: 0.72rem;
  min-width: 0;
  width: 100%;
}

.sidebar-brand-lockup--mark-only {
  justify-content: flex-start;
}

.sidebar-brand-lockup--mark-only .brand-mark-crop {
  height: 4rem;
  width: 4rem;
}

.brand-mark-crop,
.navbar-brand-mark {
  background: #fff;
  border: 1px solid rgba(101, 207, 203, 0.28);
  box-shadow: 0 8px 22px rgba(18, 64, 70, 0.12);
  display: inline-block;
  flex: 0 0 auto;
  overflow: hidden;
  position: relative;
}

.brand-mark-crop {
  border-radius: 14px;
  height: 3.15rem;
  width: 3.15rem;
}

.navbar-brand-mark {
  border-radius: 11px;
  height: 2.55rem;
  width: 2.55rem;
}

.brand-mark-crop img,
.navbar-brand-mark img {
  display: block;
  height: 100%;
  max-width: none;
  object-fit: contain;
  transform: translateX(-1.5%);
  width: auto;
}

.sidebar-brand>.sidebar-brand-lockup>.brand-mark-crop {
  display: inline-block;
  padding: 0;
}

.sidebar-brand>.sidebar-brand-lockup>.sidebar-brand-copy {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 0.15rem;
  letter-spacing: normal;
  min-width: 0;
  padding: 0;
  text-transform: none;
}

.sidebar-brand-copy strong {
  color: #f6fafb;
  font-size: 0.94rem;
  font-weight: 820;
  letter-spacing: -0.02em;
}

.sidebar-brand-copy span {
  color: #aab9be;
  font-size: 0.69rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.sidebar-brand .leirbag-logo {
  border-radius: 14px;
  height: auto;
  max-width: 13.5rem;
  object-fit: contain;
  padding: 0.22rem;
  width: 100%;
}

.navbar-logo {
  border-radius: 11px;
  height: 2.55rem;
  object-fit: cover;
  object-position: left center;
  padding: 0.1rem;
  width: 2.55rem;
}

.auth-logo {
  max-width: 17rem;
  width: min(100%, 17rem);
}

.leirbag-wordmark em {
  color: #65cfcb;
}

/* Application shell */
body:has(.main-content) .app-main {
  max-width: none;
  min-height: 100dvh;
  padding: 0 !important;
}

.secure-content[data-secure-surface] {
  background: transparent;
  min-height: 100dvh;
}

.secure-content[data-secure-surface]::before {
  background-image: radial-gradient(rgba(101, 207, 203, 0.17) 0.55px, transparent 0.55px) !important;
  background-size: 18px 18px !important;
  opacity: 0.16 !important;
}

.sidebar,
.secure-content[data-secure-surface="tenant"] .sidebar {
  background:
    radial-gradient(circle at 12% 0%, rgba(101, 207, 203, 0.12), transparent 16rem),
    var(--sidebar-bg);
  border: 0;
  border-right: 1px solid #26383d;
  box-shadow: none;
  color: #f6fafb;
  padding: 1rem 0.85rem;
  width: 18rem;
}

.sidebar::before {
  background: linear-gradient(90deg, #65cfcb, #84d9cc, transparent);
  content: "";
  height: 2px;
  inset: 0 0 auto;
  position: absolute;
}

.sidebar::after,
.secure-content[data-secure-surface="tenant"] .sidebar::after {
  display: none;
}

.sidebar-brand,
.secure-content[data-secure-surface="tenant"] .sidebar-brand {
  align-items: stretch;
  border-bottom: 1px solid rgba(170, 185, 190, 0.14);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin: 0 0 0.8rem;
  min-height: auto;
  padding: 0.35rem 0.35rem 0.9rem;
}

.sidebar-brand>div {
  min-width: 0;
}

.sidebar-brand>div>span,
.sidebar-context,
.secure-content[data-secure-surface="tenant"] .sidebar-brand>div>span {
  color: #aab9be;
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.4;
  overflow: hidden;
  padding-inline: 0.15rem;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.sidebar-menu,
.secure-content[data-secure-surface="tenant"] .sidebar-menu {
  gap: 0.32rem;
  padding: 0.2rem 0.1rem 1.5rem;
  scrollbar-color: rgba(101, 207, 203, 0.28) transparent;
}

.sidebar-menu>a,
.sidebar-group-toggle,
.secure-content[data-secure-surface="tenant"] .sidebar-menu>a,
.secure-content[data-secure-surface="tenant"] .sidebar-group-toggle {
  border: 1px solid transparent;
  border-radius: 12px;
  color: #aab9be;
  font-size: 0.9rem;
  font-weight: 620;
  gap: 0.75rem;
  min-height: 2.75rem;
  padding: 0.68rem 0.72rem;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease, transform 150ms ease;
}

.sidebar-menu>a>i,
.sidebar-group-toggle>i:first-child,
.secure-content[data-secure-surface="tenant"] .sidebar-menu>a>i,
.secure-content[data-secure-surface="tenant"] .sidebar-group-toggle>i:first-child {
  color: #65cfcb;
  font-size: 1.02rem;
}

.sidebar-menu>a:hover,
.sidebar-menu>a:focus-visible,
.sidebar-group-toggle:hover,
.sidebar-group-toggle:focus-visible,
.secure-content[data-secure-surface="tenant"] .sidebar-menu>a:hover,
.secure-content[data-secure-surface="tenant"] .sidebar-menu>a:focus-visible,
.secure-content[data-secure-surface="tenant"] .sidebar-group-toggle:hover,
.secure-content[data-secure-surface="tenant"] .sidebar-group-toggle:focus-visible {
  background: rgba(101, 207, 203, 0.08);
  border-color: rgba(101, 207, 203, 0.13);
  color: #f6fafb;
}

.sidebar-menu>a.active,
.secure-content[data-secure-surface="tenant"] .sidebar-menu>a.active {
  background: linear-gradient(90deg, rgba(101, 207, 203, 0.17), rgba(101, 207, 203, 0.07));
  border-color: rgba(101, 207, 203, 0.2);
  box-shadow: inset 3px 0 0 #65cfcb;
  color: #f6fafb;
}

.sidebar-group {
  background: transparent;
  border: 0;
  border-radius: 12px;
}

.sidebar-group[open] {
  background: rgba(255, 255, 255, 0.018);
}

.sidebar-submenu,
.secure-content[data-secure-surface="tenant"] .sidebar-submenu {
  border-left: 1px solid rgba(101, 207, 203, 0.18);
  margin: 0.18rem 0 0.5rem 1rem;
  padding: 0.15rem 0 0.1rem 0.6rem;
}

.sidebar-submenu a,
.secure-content[data-secure-surface="tenant"] .sidebar-submenu a {
  border: 0;
  border-radius: 10px;
  color: #8fa2a8;
  font-size: 0.81rem;
  min-height: 2.3rem;
  padding: 0.52rem 0.6rem;
}

.sidebar-submenu a:hover,
.sidebar-submenu a.active,
.secure-content[data-secure-surface="tenant"] .sidebar-submenu a:hover,
.secure-content[data-secure-surface="tenant"] .sidebar-submenu a.active {
  background: rgba(101, 207, 203, 0.08);
  color: #f6fafb;
}

.main-content {
  margin-left: 18rem;
  min-width: 0;
  padding: 1rem clamp(1rem, 2vw, 2rem) 2rem;
  width: calc(100% - 18rem);
}

.top-navbar,
.glass-card.top-navbar {
  align-items: center;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.18);
  min-height: 4.35rem;
  padding: 0.65rem 0.75rem;
  top: 1rem;
  z-index: 1020;
}

:root:not([data-theme="dark"]) .top-navbar,
:root:not([data-theme="dark"]) .glass-card.top-navbar {
  background: rgba(255, 255, 255, 0.93);
  border-color: var(--color-line);
  box-shadow: var(--app-shadow-soft);
}

.top-navbar .fw-semibold {
  color: var(--color-ink);
}

.top-navbar .page-search-input,
.search-wrapper .form-control {
  background: var(--color-panel-subtle);
  border-color: var(--color-line);
  min-height: 2.7rem;
}

.mobile-menu-toggle,
.theme-toggle,
.top-navbar .notification-wrapper>.btn,
.profile-btn,
.app-timezone-badge {
  background: var(--color-panel-subtle);
  border: 1px solid var(--color-line);
  border-radius: 12px;
  color: var(--color-ink);
  min-height: 2.7rem;
}

.mobile-menu-toggle:hover,
.theme-toggle:hover,
.top-navbar .notification-wrapper>.btn:hover,
.profile-btn:hover {
  background: var(--color-brand-soft);
  border-color: rgba(101, 207, 203, 0.4);
  color: var(--color-brand-dark);
}

.profile-btn .avatar,
.avatar {
  background: linear-gradient(135deg, #65cfcb, #84d9cc);
  border: 0;
  box-shadow: none;
  color: #081012;
  font-weight: 850;
}

.profile-menu,
.notification-panel {
  background: var(--color-panel-strong);
  border: 1px solid var(--color-line);
  border-radius: 16px;
  box-shadow: var(--app-shadow);
}

.profile-menu a {
  border-radius: 10px;
}

.profile-menu a:hover {
  background: var(--color-brand-soft);
}

.page-content {
  background: transparent;
  border: 0;
  box-shadow: none;
  margin-top: 1rem;
  padding: 0;
}

.page-content::before {
  display: none;
}

/* Components */
.app-panel,
.glass-card:not(.top-navbar),
.metric-card,
.report-chart-panel,
.tenant-list-group,
.list-group-item,
.table-control-panel,
.empty-state,
form:not(.unstyled-form):not(.chat-composer),
.owner-page-head,
.owner-hero,
.owner-section-card,
.owner-form-card,
.owner-danger-panel,
.owner-mini-card,
.owner-health-card,
.owner-stat-card,
.owner-client-card,
.owner-provider-row,
.owner-inline-panel {
  background: var(--color-panel);
  border-color: var(--color-line);
  border-radius: 16px;
  box-shadow: none;
}

.app-panel,
.metric-card,
.report-chart-panel,
.list-group-item,
.owner-stat-card,
.owner-client-card {
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.metric-card[href]:hover,
a.metric-card:hover,
.owner-stat-card-action:hover,
.owner-client-card:hover,
.student-action-item:hover,
.student-quick-links a:hover {
  border-color: rgba(101, 207, 203, 0.48);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

/* Compact, reusable table management toolbar */
.table-control-compact {
  gap: 0;
  overflow: hidden;
  padding: 0;
}

.table-control-bar {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  min-height: 4rem;
  padding: 0.75rem 0.9rem;
}

.table-control-count {
  color: var(--color-muted);
  font-size: 0.82rem;
  font-weight: 650;
}

.table-control-icons {
  align-items: center;
  display: flex;
  gap: 0.45rem;
}

.table-tool-icon {
  align-items: center;
  background: var(--color-panel-subtle);
  border: 1px solid var(--color-line);
  border-radius: 10px;
  color: var(--color-muted);
  display: inline-flex;
  height: 2.45rem;
  justify-content: center;
  transition: 150ms ease;
  width: 2.45rem;
}

.table-tool-icon:hover,
.table-tool-icon.is-active,
.table-tool-icon[aria-expanded="true"] {
  background: var(--color-brand);
  border-color: var(--color-brand);
  color: #fff;
  transform: translateY(-1px);
}

.table-control-drawer {
  align-items: center;
  background: color-mix(in srgb, var(--color-panel-subtle) 72%, var(--color-panel));
  border-top: 1px solid var(--color-line);
  display: flex;
  gap: 0.7rem;
  padding: 0.8rem 0.9rem;
}

.table-control-drawer>i {
  color: var(--color-brand);
  flex: 0 0 auto;
}

.table-control-drawer .react-table-search,
.table-control-drawer .table-sort-select {
  flex: 1 1 auto;
}

.table-control-drawer .table-sort-direction {
  height: 2.45rem;
  min-width: 8.5rem;
  width: auto;
}

.table-filter-drawer {
  align-items: flex-end;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
}

.table-filter-field span {
  color: var(--color-muted);
  display: block;
  font-size: 0.68rem;
  font-weight: 750;
  margin: 0 0 0.3rem 0.15rem;
  text-transform: uppercase;
}

.table-tool-clear {
  background: transparent;
  border: 0;
  color: var(--color-brand);
  flex: 0 0 auto;
  font-size: 0.76rem;
  font-weight: 750;
  padding: 0.4rem;
}

@media (max-width: 767.98px) {
  .table-filter-drawer {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .table-control-drawer,
  .table-sort-drawer {
    align-items: stretch;
    flex-direction: column;
  }

  .table-control-drawer>i {
    display: none;
  }
}

/* Grid/list catalog controls */
.catalog-view-toggle {
  align-items: center;
  background: var(--color-panel-subtle);
  border: 1px solid var(--color-line);
  border-radius: 11px;
  display: inline-flex;
  gap: 0.2rem;
  padding: 0.2rem;
}

.catalog-view-toggle button {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 8px;
  color: var(--color-muted);
  display: inline-flex;
  height: 2.15rem;
  justify-content: center;
  width: 2.15rem;
}

.catalog-view-toggle button:hover,
.catalog-view-toggle button.is-active {
  background: var(--color-panel);
  box-shadow: 0 3px 10px rgba(24, 64, 70, 0.09);
  color: var(--color-brand);
}

.learning-row-thumbnail {
  background: linear-gradient(135deg, var(--color-brand-soft), var(--color-panel-subtle));
  border-radius: 11px;
  flex: 0 0 7.5rem;
  height: 5rem;
  overflow: hidden;
}

.learning-row-thumbnail img,
.learning-row-thumbnail span {
  height: 100%;
  width: 100%;
}

.learning-row-thumbnail img {
  display: block;
  object-fit: cover;
}

.learning-row-thumbnail span {
  align-items: center;
  color: var(--color-brand);
  display: flex;
  font-size: 1.65rem;
  justify-content: center;
}

.lesson-catalog.is-grid-view {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17.5rem), 1fr));
}

.lesson-catalog.is-grid-view .learning-row {
  align-items: stretch;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.lesson-catalog.is-grid-view .learning-row-thumbnail {
  flex-basis: auto;
  height: 10rem;
  width: 100%;
}

.lesson-catalog.is-grid-view .learning-row-icon {
  display: none;
}

.lesson-catalog.is-list-view .learning-row.has-thumbnail .learning-row-icon {
  display: none;
}

.lesson-catalog.is-grid-view .learning-row-action,
.lesson-catalog.is-grid-view .learning-row-action .btn {
  margin-top: auto;
  width: 100%;
}

.lesson-catalog.is-list-view {
  grid-template-columns: 1fr;
}

.assessment-catalog.is-grid-view {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
}

.assessment-catalog.is-list-view {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: 1fr;
}

.assessment-response-progress {
  border-bottom: 1px solid var(--color-line);
  margin: -0.15rem 0 1rem;
  padding-bottom: 1rem;
}

.assessment-response-head {
  align-items: center;
  color: var(--color-muted);
  display: flex;
  font-size: 0.75rem;
  justify-content: space-between;
  margin-bottom: 0.45rem;
}

.assessment-response-head strong {
  color: var(--color-ink);
}

.assessment-response-track {
  background: var(--color-panel-subtle);
  border-radius: 999px;
  height: 0.35rem;
  overflow: hidden;
}

.assessment-response-track span {
  background: linear-gradient(90deg, var(--color-brand), var(--palette-pacific));
  display: block;
  height: 100%;
  transition: width 180ms ease;
  width: 0;
}

.assessment-response-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.7rem;
}

.assessment-response-nav button {
  align-items: center;
  background: var(--color-panel-subtle);
  border: 1px solid var(--color-line);
  border-radius: 7px;
  color: var(--color-muted);
  display: inline-flex;
  font-size: 0.7rem;
  font-weight: 750;
  height: 1.8rem;
  justify-content: center;
  width: 1.8rem;
}

.assessment-response-nav button.is-answered {
  background: var(--color-brand);
  border-color: var(--color-brand);
  color: #fff;
}

.question-choice-preview-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.55rem;
}

.question-choice-preview-head span {
  font-size: 0.78rem;
  font-weight: 750;
}

.question-choice-preview-head small,
.question-choice-preview-list em {
  color: var(--color-muted);
  font-size: 0.72rem;
}

.question-choice-preview-list {
  display: grid;
  gap: 0.45rem;
}

.question-choice-preview-list>span {
  align-items: center;
  background: var(--color-panel-subtle);
  border: 1px solid var(--color-line);
  border-radius: 10px;
  display: flex;
  font-size: 0.78rem;
  gap: 0.55rem;
  padding: 0.55rem;
}

.question-choice-preview-list b {
  align-items: center;
  background: var(--color-brand-soft);
  border-radius: 7px;
  color: var(--color-brand);
  display: inline-flex;
  flex: 0 0 auto;
  height: 1.6rem;
  justify-content: center;
  width: 1.6rem;
}

/* Invoice, markscard, and certificate studio */
.document-type-switcher {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 1rem;
}

.document-template-launch-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 1.25rem;
}

.document-template-launch-grid>a {
  align-items: center;
  background: var(--color-panel);
  border: 1px solid var(--color-line);
  border-radius: 15px;
  color: var(--color-ink);
  display: grid;
  gap: 0.75rem;
  grid-template-columns: auto minmax(0, 1fr) auto;
  padding: 0.9rem;
}

.document-template-launch-grid>a:hover {
  border-color: var(--palette-pacific);
  box-shadow: var(--app-shadow-soft);
  color: var(--color-ink);
  transform: translateY(-1px);
}

.document-template-launch-icon {
  align-items: center;
  background: var(--color-brand-soft);
  border-radius: 11px;
  color: var(--color-brand);
  display: inline-flex;
  font-size: 1.05rem;
  height: 2.7rem;
  justify-content: center;
  width: 2.7rem;
}

.document-template-launch-grid strong,
.document-template-launch-grid small {
  display: block;
}

.document-template-launch-grid small {
  color: var(--color-muted);
  font-size: 0.68rem;
  margin-top: 0.2rem;
}

.document-type-option {
  align-items: center;
  background: var(--color-panel);
  border: 1px solid var(--color-line);
  border-radius: 14px;
  color: var(--color-ink);
  display: flex;
  gap: 0.75rem;
  padding: 0.85rem;
}

.document-type-option>i {
  align-items: center;
  background: var(--color-brand-soft);
  border-radius: 10px;
  color: var(--color-brand);
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 1.05rem;
  height: 2.5rem;
  justify-content: center;
  width: 2.5rem;
}

.document-type-option span,
.document-type-option strong,
.document-type-option small {
  display: block;
}

.document-type-option small {
  color: var(--color-muted);
  font-size: 0.7rem;
  margin-top: 0.12rem;
}

.document-type-option:hover,
.document-type-option.is-active {
  border-color: var(--palette-pacific);
  box-shadow: var(--app-shadow-soft);
  color: var(--color-ink);
}

.document-type-option.is-active {
  background: var(--color-brand-soft);
}

.document-template-builder {
  align-items: start;
  display: grid;
  gap: 1rem;
  grid-template-areas: "editor preview";
  grid-template-columns: minmax(30rem, 1.15fr) minmax(25rem, 0.85fr);
}

.document-template-editor,
.document-template-sidebar {
  display: grid;
  gap: 1rem;
  min-width: 0;
}

.document-template-editor {
  grid-area: editor;
}

.document-template-sidebar {
  grid-area: preview;
}

.document-template-panel,
.document-variable-panel,
.document-preview-panel {
  background: var(--color-panel);
  border: 1px solid var(--color-line);
  border-radius: 16px;
  padding: 1rem;
}

.document-template-panel-head {
  align-items: flex-start;
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.document-template-panel-head>span {
  align-items: center;
  background: var(--color-brand);
  border-radius: 9px;
  color: #fff;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 0.74rem;
  font-weight: 800;
  height: 2rem;
  justify-content: center;
  width: 2rem;
}

.document-template-panel-head h3,
.document-variable-panel h3 {
  font-size: 0.92rem;
  margin: 0;
}

.document-template-panel-head p,
.document-variable-panel p {
  color: var(--color-muted);
  font-size: 0.74rem;
  margin: 0.2rem 0 0;
}

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

.document-toggle-field {
  align-self: end;
  background: var(--color-panel-subtle);
  border-radius: 10px;
  padding: 0.75rem;
}

.template-code-field textarea {
  background: #101a1e;
  border-color: #345158;
  color: #e6f6f4;
  font: 0.76rem/1.55 ui-monospace, SFMono-Regular, Consolas, monospace;
  min-height: 23rem;
  tab-size: 2;
}

.template-code-label {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.45rem;
}

.template-code-label label {
  font-size: 0.78rem;
  font-weight: 750;
}

.template-code-label span {
  color: var(--color-muted);
  font-size: 0.7rem;
}

.template-css-editor {
  border-top: 1px solid var(--color-line);
  margin-top: 1rem;
  padding-top: 0.8rem;
}

.template-css-editor summary {
  color: var(--color-brand);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 750;
}

.template-css-editor textarea {
  min-height: 13rem;
}

.document-template-actions {
  align-items: center;
  background: var(--color-panel);
  border: 1px solid var(--color-line);
  border-radius: 14px;
  display: flex;
  gap: 0.6rem;
  justify-content: flex-end;
  padding: 0.8rem;
  position: sticky;
  bottom: 0.75rem;
  z-index: 3;
}

.document-template-sidebar {
  max-height: calc(100vh - 7rem);
  overflow-y: auto;
  position: sticky;
  top: 6rem;
}

.document-variable-list {
  display: grid;
  gap: 0.45rem;
  margin-top: 0.85rem;
}

.document-variable-list button {
  align-items: center;
  background: var(--color-panel-subtle);
  border: 1px solid var(--color-line);
  border-radius: 10px;
  color: var(--color-ink);
  display: grid;
  gap: 0.4rem;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 0.6rem;
  text-align: left;
}

.document-variable-list button:hover {
  border-color: var(--palette-pacific);
}

.document-variable-list button span {
  font-size: 0.73rem;
  font-weight: 700;
}

.document-variable-list button code {
  color: var(--color-muted);
  font-size: 0.62rem;
  grid-column: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.document-variable-list button i {
  color: var(--color-brand);
  grid-column: 2;
  grid-row: 1 / 3;
}

.document-preview-panel {
  order: -1;
  padding: 0;
  position: relative;
}

.document-preview-head {
  align-items: center;
  border-bottom: 1px solid var(--color-line);
  display: flex;
  justify-content: space-between;
  padding: 0.75rem;
}

.document-preview-head span {
  font-size: 0.76rem;
  font-weight: 750;
}

.document-preview-head small {
  color: var(--color-muted);
  font-size: 0.62rem;
}

.document-preview-tools {
  align-items: center;
  display: flex;
  gap: 0.55rem;
}

.document-preview-tools .btn {
  align-items: center;
  display: inline-flex;
  height: 1.9rem;
  justify-content: center;
  padding: 0;
  width: 1.9rem;
}

.document-preview-panel iframe {
  background: #eef3f4;
  border: 0;
  display: block;
  height: min(43rem, calc(100vh - 13rem));
  min-height: 34rem;
  width: 100%;
}

.document-preview-panel.is-loading::after {
  align-items: center;
  background: rgba(255, 255, 255, 0.82);
  color: var(--color-brand);
  content: "Updating preview...";
  display: flex;
  font-size: 0.78rem;
  font-weight: 750;
  inset: 3.2rem 0 0;
  justify-content: center;
  position: absolute;
}

.video-table-identity {
  align-items: center;
  display: flex;
  gap: 0.65rem;
}

.video-table-thumbnail {
  align-items: center;
  background: var(--color-brand-soft);
  border-radius: 9px;
  color: var(--color-brand);
  display: inline-flex;
  flex: 0 0 auto;
  height: 2.7rem;
  justify-content: center;
  overflow: hidden;
  width: 4.2rem;
}

.video-table-thumbnail img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

@media (max-width: 1199.98px) {
  .document-template-builder {
    grid-template-areas:
      "preview"
      "editor";
    grid-template-columns: 1fr;
  }

  .document-template-sidebar {
    max-height: none;
    overflow: visible;
    position: static;
  }

  .document-preview-panel iframe {
    height: 38rem;
  }
}

@media (max-width: 767.98px) {

  .document-type-switcher,
  .document-template-launch-grid,
  .document-template-meta-grid {
    grid-template-columns: 1fr;
  }

  .document-template-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .document-template-actions .btn {
    width: 100%;
  }
}

.assessment-grid.is-list-view .assessment-card {
  align-items: center;
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1.6fr) minmax(15rem, 0.8fr) auto;
}

.assessment-grid.is-list-view .assessment-card-bottom {
  border-top: 0;
  margin-top: 0;
  padding-top: 0;
}

.assessment-list.is-grid-view .assessment-row {
  align-content: start;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  min-height: 100%;
}

.assessment-list.is-grid-view .assessment-row-actions {
  border-top: 1px solid var(--color-line);
  grid-column: 1 / -1;
  justify-content: flex-start;
  padding-top: 0.8rem;
}

.course-card-cover {
  overflow: hidden;
  position: relative;
}

.course-card-cover img {
  height: 100%;
  inset: 0;
  object-fit: cover;
  position: absolute;
  width: 100%;
}

.course-card-cover::after {
  background: linear-gradient(180deg, transparent 35%, rgba(8, 25, 29, 0.82));
  content: "";
  inset: 0;
  pointer-events: none;
  position: absolute;
}

.course-card-cover>i,
.course-card-cover>span {
  position: relative;
  z-index: 1;
}

.course-preview-cover img {
  border-radius: inherit;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.learner-course-grid.is-grid-view {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 23rem), 1fr));
}

.learner-course-grid.is-grid-view .learner-course-card {
  grid-template-columns: 1fr;
}

.learner-course-grid.is-grid-view .course-card-cover {
  min-height: 10rem;
}

.learner-course-grid.is-list-view,
#courseCatalog.is-list-view {
  grid-template-columns: 1fr;
}

#courseCatalog.is-grid-view {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 36rem), 1fr));
}

#courseCatalog.is-grid-view .course-card-professional {
  grid-template-columns: 1fr;
}

#courseCatalog.is-grid-view .course-card-cover {
  min-height: 10rem;
}

@media (max-width: 767.98px) {
  .learning-row-thumbnail {
    flex-basis: 5.5rem;
  }

  .lesson-catalog.is-list-view .learning-row {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .assessment-grid.is-list-view .assessment-card {
    align-items: stretch;
    grid-template-columns: 1fr;
  }
}

.metric-card {
  min-height: 7.25rem;
  padding: 1rem;
}

.metric-card .text-secondary.small,
.owner-stat-card>div>span {
  font-size: 0.74rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.metric-icon,
.owner-stat-icon,
.tenant-setup-icon {
  background: rgba(101, 207, 203, 0.12);
  border: 1px solid rgba(101, 207, 203, 0.2);
  border-radius: 13px;
  color: var(--color-brand-dark);
}

:root[data-theme="dark"] .metric-icon,
:root[data-theme="dark"] .owner-stat-icon,
:root[data-theme="dark"] .tenant-setup-icon {
  color: #65cfcb;
}

.tenant-page-header,
.tenant-dashboard-shell .tenant-page-header,
.secure-content[data-secure-surface="tenant"] .tenant-dashboard-shell .tenant-page-header {
  background:
    radial-gradient(circle at 100% 0%, rgba(101, 207, 203, 0.14), transparent 18rem),
    var(--color-panel);
  border: 1px solid var(--color-line);
  border-radius: 20px;
  box-shadow: none;
  padding: clamp(1rem, 2.2vw, 1.5rem);
}

.tenant-eyebrow,
.owner-kicker {
  color: var(--color-brand-dark);
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

:root[data-theme="dark"] .tenant-eyebrow,
:root[data-theme="dark"] .owner-kicker {
  color: #84d9cc;
}

.premium-context-chip,
.copy-chip,
.status-badge,
.owner-badge {
  border-radius: 999px;
  font-weight: 720;
}

.tenant-section-title {
  margin-bottom: 0.85rem;
}

.tenant-section-title h2,
.tenant-section-title h3 {
  letter-spacing: -0.025em;
}

.list-group {
  gap: 0.55rem;
}

.list-group-item {
  color: var(--color-ink);
  padding: 0.85rem 0.95rem;
}

.list-group-item-action:hover,
.list-group-item-action:focus {
  background: var(--color-brand-soft);
  border-color: rgba(101, 207, 203, 0.38);
  color: var(--color-ink);
}

.table-responsive {
  border: 1px solid var(--color-line);
  border-radius: 16px;
}

.table {
  --bs-table-bg: transparent;
  --bs-table-color: var(--color-ink);
  --bs-table-border-color: var(--color-line);
  --bs-table-hover-bg: var(--color-brand-soft);
  --bs-table-hover-color: var(--color-ink);
  margin-bottom: 0;
}

.table thead th {
  background: var(--color-panel-subtle);
  color: var(--color-muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

.pagination .page-link {
  background: var(--color-panel);
  border-color: var(--color-line);
  color: var(--color-ink);
  min-height: 2.55rem;
  min-width: 2.55rem;
}

.pagination .active>.page-link,
.pagination .page-link:hover {
  background: #65cfcb;
  border-color: #65cfcb;
  color: #081012;
}

.btn {
  border-radius: 11px;
  font-weight: 730;
  letter-spacing: -0.006em;
  min-height: 2.7rem;
  padding: 0.58rem 0.9rem;
  transition: background-color 150ms ease, border-color 150ms ease, box-shadow 150ms ease, color 150ms ease, transform 150ms ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: #65cfcb;
  border-color: #65cfcb;
  box-shadow: 0 8px 20px rgba(101, 207, 203, 0.14);
  color: #081012;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary:first-child:active {
  background: #84d9cc;
  border-color: #84d9cc;
  color: #081012;
}

.btn-outline-primary {
  border-color: #65cfcb;
  color: var(--color-brand-dark);
}

:root[data-theme="dark"] .btn-outline-primary {
  color: #84d9cc;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
  background: #65cfcb;
  border-color: #65cfcb;
  color: #081012;
}

.btn-outline-secondary {
  border-color: var(--color-line-strong);
  color: var(--color-ink);
}

.btn-outline-secondary:hover {
  background: var(--color-brand-soft);
  border-color: rgba(101, 207, 203, 0.4);
  color: var(--color-ink);
}

.form-label {
  color: var(--color-ink);
  font-size: 0.84rem;
  font-weight: 720;
  margin-bottom: 0.45rem;
}

.form-control,
.form-select,
textarea,
select {
  background-color: var(--color-panel-subtle);
  border: 1px solid var(--color-line);
  border-radius: 11px;
  color: var(--color-ink);
  min-height: 2.85rem;
}

.form-control::placeholder,
textarea::placeholder {
  color: var(--color-muted);
  opacity: 0.72;
}

.form-control:hover,
.form-select:hover,
textarea:hover,
select:hover {
  border-color: var(--color-line-strong);
}

.form-control:focus,
.form-select:focus,
textarea:focus,
select:focus {
  background-color: var(--color-panel-strong);
  border-color: #65cfcb;
  box-shadow: var(--focus-ring);
  color: var(--color-ink);
}

.form-check-input:checked {
  background-color: #65cfcb;
  border-color: #65cfcb;
}

.alert {
  border-radius: 12px;
}

.required-indicator {
  color: var(--color-danger);
  font-weight: 850;
  margin-left: 0.2rem;
}

.course-batch-panel {
  background: var(--color-panel-subtle);
  border: 1px solid var(--color-line);
  border-radius: 14px;
  display: grid;
  gap: 0.75rem;
  padding: 0.85rem;
}

.course-batch-panel-head {
  align-items: center;
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
}

.course-batch-panel-head>div {
  display: grid;
  gap: 0.1rem;
}

.course-batch-panel-head small,
.course-batch-empty,
.course-batch-item small {
  color: var(--color-muted);
  font-size: 0.8rem;
}

.course-batch-list {
  display: grid;
  gap: 0.45rem;
}

.course-batch-item {
  align-items: center;
  background: var(--color-panel);
  border: 1px solid var(--color-line);
  border-radius: 11px;
  color: var(--color-ink);
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
  padding: 0.65rem 0.75rem;
  text-decoration: none;
}

.course-batch-item>span:first-child {
  display: grid;
  min-width: 0;
}

.course-batch-item:hover {
  background: var(--color-brand-soft);
  border-color: rgba(101, 207, 203, 0.4);
  color: var(--color-ink);
}

.modal-content,
.dropdown-menu,
.toast,
.app-swal-popup {
  background: var(--color-panel-strong) !important;
  border: 1px solid var(--color-line) !important;
  border-radius: 18px !important;
  color: var(--color-ink) !important;
}

/* Dashboard emphasis */
.student-dashboard-minimal {
  gap: clamp(0.9rem, 1.6vw, 1.2rem);
}

.student-essential-grid {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.student-essential-grid .metric-card {
  align-items: center;
  display: flex;
  gap: 0.85rem;
  min-height: 6.5rem;
}

.student-dashboard-minimal .student-focus-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.student-dashboard-minimal .student-quick-links {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.student-dashboard-minimal .student-watch-hero {
  margin-bottom: 0;
  min-height: 18rem;
}

.student-watch-hero {
  background:
    linear-gradient(90deg, rgba(11, 14, 18, 0.96), rgba(11, 14, 18, 0.72)),
    radial-gradient(circle at 85% 10%, rgba(101, 207, 203, 0.3), transparent 24rem);
  border: 1px solid #2c4348;
  border-radius: 20px;
  box-shadow: var(--app-shadow);
}

.student-watch-hero h3,
.student-watch-hero p,
.student-watch-hero .tenant-eyebrow,
.student-watch-meta,
.student-watch-empty {
  color: #f6fafb;
}

.student-watch-hero p,
.student-watch-meta {
  color: #aab9be;
}

.student-video-card,
.student-action-item,
.student-quick-links a,
.learning-card,
.assessment-card,
.assessment-row,
.learning-row {
  background: var(--color-panel);
  border-color: var(--color-line);
  border-radius: 14px;
}

.student-video-card-body a {
  background: #65cfcb;
  color: #081012;
}

.tenant-live-status {
  background: var(--color-panel);
  border-color: var(--color-line);
  border-radius: 16px;
  box-shadow: none;
}

.report-chart-panel {
  min-height: 17rem;
}

.report-chart-legend-item,
.report-bar-track {
  background: var(--color-panel-subtle);
  border-color: var(--color-line);
}

.report-bar span,
.report-pie-segment,
.report-chart-accent {
  color: #65cfcb;
}

.owner-page-head,
.owner-hero,
.owner-section-card,
.owner-form-card,
.owner-danger-panel,
[data-bs-theme="dark"] .owner-page-head,
[data-bs-theme="dark"] .owner-hero,
[data-bs-theme="dark"] .owner-section-card,
[data-bs-theme="dark"] .owner-form-card,
[data-bs-theme="dark"] .owner-danger-panel {
  background:
    radial-gradient(circle at 100% 0%, rgba(101, 207, 203, 0.12), transparent 20rem),
    var(--color-panel);
  border-color: var(--color-line);
  border-radius: 20px;
  box-shadow: none;
}

.owner-dashboard .owner-hero-panel,
[data-bs-theme="dark"] .owner-dashboard .owner-hero-panel {
  background: var(--color-panel-subtle);
  border-color: var(--color-line);
  border-radius: 16px;
  box-shadow: none;
}

.owner-dashboard .owner-stat-card::after {
  background: linear-gradient(90deg, #65cfcb, transparent);
}

.owner-pulse-dot {
  background: #3ed598;
  box-shadow: 0 0 0 6px rgba(62, 213, 152, 0.12);
}

/* Authentication */
body:has(.auth-shell) .app-main {
  max-width: none;
  padding: 0 !important;
}

body:has(.auth-shell) {
  background:
    radial-gradient(circle at 12% 8%, rgba(101, 207, 203, 0.18), transparent 28rem),
    radial-gradient(circle at 88% 82%, rgba(78, 154, 155, 0.14), transparent 30rem),
    #0b0e12;
}

.auth-shell {
  align-items: center;
  display: grid;
  gap: clamp(2rem, 6vw, 6rem);
  grid-template-columns: minmax(0, 1.05fr) minmax(22rem, 0.75fr);
  margin: 0 auto;
  max-width: 78rem;
  min-height: 100dvh;
  padding: clamp(1rem, 4vw, 3.5rem);
  position: relative;
}

.auth-shell::after {
  background-image: radial-gradient(rgba(101, 207, 203, 0.28) 0.55px, transparent 0.55px);
  background-size: 20px 20px;
  content: "";
  inset: 0;
  mask-image: linear-gradient(90deg, black, transparent 75%);
  opacity: 0.18;
  pointer-events: none;
  position: absolute;
}

.auth-theme-toggle {
  align-items: center;
  background: rgba(18, 24, 29, 0.86);
  border: 1px solid #345057;
  border-radius: 999px;
  color: #eaf7f7;
  display: inline-flex;
  font-size: 0.82rem;
  font-weight: 750;
  gap: 0.5rem;
  min-height: 2.5rem;
  padding: 0.55rem 0.85rem;
  position: absolute;
  right: clamp(1rem, 4vw, 3.5rem);
  top: clamp(1rem, 3vw, 2rem);
  transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
  z-index: 2;
}

.auth-theme-toggle:hover {
  background: #203036;
  border-color: #65cfcb;
  transform: translateY(-1px);
}

.auth-theme-toggle:focus-visible {
  outline: 3px solid rgba(101, 207, 203, 0.38);
  outline-offset: 3px;
}

.auth-showcase,
.auth-card {
  position: relative;
  z-index: 1;
}

.auth-showcase {
  color: #f6fafb;
  max-width: 37rem;
}

.auth-showcase-logo {

  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
  margin-bottom: clamp(2rem, 5vw, 4rem);
  max-width: 19rem;
  padding: 0.35rem;
  width: 100%;
}

.auth-shell>.auth-card:only-child {
  grid-column: 1 / -1;
  margin-inline: auto;
}

.auth-kicker,
.marketing-eyebrow {
  color: #84d9cc;
  display: inline-flex;
  font-size: 0.76rem;
  font-weight: 820;
  letter-spacing: 0.14em;
  margin-bottom: 0.85rem;
  text-transform: uppercase;
}

.auth-showcase h1 {
  color: #f6fafb;
  font-size: clamp(2.3rem, 5vw, 4.8rem);
  line-height: 0.98;
  margin-bottom: 1.25rem;
  max-width: 11ch;
}

.auth-showcase p {
  color: #aab9be;
  font-size: clamp(1rem, 1.5vw, 1.18rem);
  line-height: 1.7;
  max-width: 34rem;
}

.auth-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.75rem;
}

.auth-proof span {
  align-items: center;
  background: rgba(101, 207, 203, 0.08);
  border: 1px solid rgba(101, 207, 203, 0.18);
  border-radius: 999px;
  color: #d8e5e7;
  display: inline-flex;
  font-size: 0.84rem;
  gap: 0.42rem;
  padding: 0.55rem 0.75rem;
}

.auth-proof i {
  color: #65cfcb;
}

.auth-card {
  background: rgba(18, 24, 29, 0.96);
  border: 1px solid #2c4348;
  border-radius: 20px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.38);
  color: #f6fafb;
  margin-left: auto;
  max-width: 29rem;
  padding: clamp(1.25rem, 3vw, 2rem);
  width: 100%;
}

.auth-card h1,
.auth-card h2,
.auth-card h3,
.auth-card .form-label {
  color: #f6fafb;
}

.auth-card .text-secondary {
  color: #aab9be !important;
}

.auth-card .form-control,
.auth-card .form-select {
  background: #0f1519;
  border-color: #2c4348;
  color: #f6fafb;
}

.auth-card .form-control:focus,
.auth-card .form-select:focus {
  background: #12181d;
  border-color: #65cfcb;
}

.auth-brand {
  align-items: flex-start;
  border-bottom: 1px solid #2c4348;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  margin-bottom: 1.35rem;
  padding-bottom: 1.2rem;
}

.auth-brand .leirbag-logo,
.auth-brand .leirbag-logo-lg {
  border-radius: 14px;
  height: auto;
  max-width: 14.5rem;
  object-fit: contain;
  padding: 0.2rem;
  width: 100%;
}

.auth-brand .leirbag-wordmark {
  display: none;
}

.auth-form {
  gap: 1rem;
}

.auth-card a {
  color: #84d9cc;
}

.lesson-pdf-viewer {
  background: #fff;
  border: 1px solid var(--color-line);
  border-radius: 12px;
  height: clamp(38rem, 74vh, 62rem);
  overflow: hidden;
  position: relative;
  width: 100%;
}

.lesson-pdf-viewer iframe {
  border: 0;
  display: block;
  height: 100%;
  width: 100%;
}

.lesson-pdf-viewer-mobile {
  display: none;
}

.protected-pdf-stage {
  position: relative;
}

.protected-pdf-fullscreen-button {
  margin-bottom: 0.5rem;
}

.protected-pdf-stage:fullscreen,
.protected-pdf-stage-expanded {
  background: var(--color-surface, #0d2024);
  height: 100vh;
  overflow: auto;
  padding: 0.75rem;
  width: 100vw;
}

.protected-pdf-stage:fullscreen .protected-pdf-fullscreen-button,
.protected-pdf-stage-expanded .protected-pdf-fullscreen-button {
  position: sticky;
  top: 0;
  z-index: 3;
}

.protected-pdf-stage:fullscreen .lesson-pdf-viewer,
.protected-pdf-stage-expanded .lesson-pdf-viewer {
  height: calc(100vh - 1.5rem);
  max-height: none;
}

.protected-pdf-stage-expanded {
  inset: 0;
  position: fixed;
  z-index: 2000;
}

@media (max-width: 767.98px) {
  .lesson-pdf-viewer-desktop {
    display: none;
  }

  .lesson-pdf-viewer-mobile {
    display: block;
  }

  .lesson-pdf-viewer-mobile .inline-file-preview {
    padding: 0.75rem !important;
  }

  .lesson-pdf-viewer-mobile .inline-file-preview img {
    height: auto;
    max-width: 100%;
  }
}

:root[data-theme="light"] body:has(.auth-shell) {
  background:
    radial-gradient(circle at 12% 8%, rgba(101, 207, 203, 0.2), transparent 28rem),
    radial-gradient(circle at 88% 82%, rgba(78, 154, 155, 0.12), transparent 30rem),
    #edf5f5;
}

:root[data-theme="light"] .auth-shell::after {
  background-image: radial-gradient(rgba(20, 120, 117, 0.22) 0.55px, transparent 0.55px);
}

:root[data-theme="light"] .auth-showcase {
  color: #102c35;
}

:root[data-theme="light"] .auth-showcase h1 {
  color: #102c35;
}

:root[data-theme="light"] .auth-showcase p {
  color: #526e76;
}

:root[data-theme="light"] .auth-showcase .auth-kicker {
  color: #147875;
}

:root[data-theme="light"] .auth-proof span {
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(20, 120, 117, 0.2);
  color: #365961;
}

:root[data-theme="light"] .auth-proof i {
  color: #147875;
}

:root[data-theme="light"] .auth-card {
  background: rgba(255, 255, 255, 0.94);
  border-color: rgba(20, 120, 117, 0.2);
  box-shadow: 0 30px 80px rgba(16, 44, 53, 0.16);
  color: #102c35;
}

:root[data-theme="light"] .auth-card h1,
:root[data-theme="light"] .auth-card h2,
:root[data-theme="light"] .auth-card h3,
:root[data-theme="light"] .auth-card .form-label {
  color: #102c35;
}

:root[data-theme="light"] .auth-card .text-secondary {
  color: #60777e !important;
}

:root[data-theme="light"] .auth-card .form-control,
:root[data-theme="light"] .auth-card .form-select {
  background: #f8fbfb;
  border-color: #a9bec2;
  color: #102c35;
}

:root[data-theme="light"] .auth-card .form-control:focus,
:root[data-theme="light"] .auth-card .form-select:focus {
  background: #fff;
  border-color: #147875;
  box-shadow: 0 0 0 0.24rem rgba(20, 120, 117, 0.14);
}

:root[data-theme="light"] .auth-brand {
  border-color: rgba(20, 120, 117, 0.18);
}

:root[data-theme="light"] .auth-card a {
  color: #0d6b69;
}

:root[data-theme="light"] .auth-theme-toggle {
  background: rgba(255, 255, 255, 0.86);
  border-color: rgba(20, 120, 117, 0.24);
  box-shadow: 0 8px 24px rgba(16, 44, 53, 0.1);
  color: #18464d;
}

:root[data-theme="light"] .auth-theme-toggle:hover {
  background: #fff;
  border-color: #147875;
}

/* Public marketing page */
body:has(.marketing-shell) .app-main {
  max-width: none;
  padding: 0 !important;
}

body:has(.marketing-shell) {
  background: #0b0e12;
}

.marketing-shell {
  color: #f6fafb;
  min-height: 100dvh;
  overflow: hidden;
  position: relative;
}

.marketing-shell::before {
  background:
    radial-gradient(circle at 82% 12%, rgba(101, 207, 203, 0.18), transparent 30rem),
    radial-gradient(circle at 5% 70%, rgba(78, 154, 155, 0.13), transparent 28rem);
  content: "";
  inset: 0;
  pointer-events: none;
  position: fixed;
}

.marketing-nav,
.marketing-hero,
.marketing-proof,
.marketing-features,
.marketing-footer {
  margin-inline: auto;
  max-width: 78rem;
  position: relative;
  z-index: 1;
}

.marketing-nav {
  align-items: center;
  display: flex;
  justify-content: space-between;
  padding: 1.25rem clamp(1rem, 4vw, 2rem);
}

.marketing-nav .marketing-logo {
  background: #fff;
  border-radius: 14px;
  max-width: 12.5rem;
  padding: 0.18rem;
  width: 44vw;
}

.marketing-hero {
  align-items: center;
  display: grid;
  gap: clamp(2rem, 6vw, 5.5rem);
  grid-template-columns: minmax(0, 1.08fr) minmax(20rem, 0.92fr);
  min-height: 38rem;
  padding: clamp(3rem, 8vw, 7rem) clamp(1rem, 4vw, 2rem) 4rem;
}

.marketing-hero h1 {
  color: #f6fafb;
  font-size: clamp(2.8rem, 7vw, 6.2rem);
  line-height: 0.94;
  margin-bottom: 1.35rem;
  max-width: 10ch;
}

.marketing-gradient-text {
  background: linear-gradient(110deg, #65cfcb, #84d9cc 55%, #f6fafb);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.marketing-hero-copy>p {
  color: #aab9be;
  font-size: clamp(1.05rem, 1.7vw, 1.25rem);
  line-height: 1.72;
  max-width: 37rem;
}

.marketing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.8rem;
}

.marketing-actions .btn {
  min-height: 3.15rem;
  padding-inline: 1.2rem;
}

.marketing-actions .btn-outline-light:hover {
  background: rgba(101, 207, 203, 0.1);
  border-color: #65cfcb;
  color: #84d9cc;
}

.marketing-product-card {
  background: linear-gradient(155deg, rgba(26, 35, 42, 0.96), rgba(18, 24, 29, 0.94));
  border: 1px solid #2c4348;
  border-radius: 24px;
  box-shadow: 0 34px 100px rgba(0, 0, 0, 0.42);
  overflow: hidden;
  padding: 0.75rem;
  transform: perspective(1200px) rotateY(-4deg) rotateX(2deg);
}

.marketing-product-bar {
  align-items: center;
  border-bottom: 1px solid #2c4348;
  display: flex;
  gap: 0.45rem;
  padding: 0.55rem 0.45rem 0.85rem;
}

.marketing-product-bar span {
  background: #2c4348;
  border-radius: 50%;
  height: 0.55rem;
  width: 0.55rem;
}

.marketing-product-content {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: 4.5rem 1fr;
  min-height: 22rem;
  padding-top: 0.75rem;
}

.marketing-demo-rail {
  background: #0b0e12;
  border: 1px solid #24373b;
  border-radius: 14px;
  display: grid;
  gap: 0.55rem;
  padding: 0.65rem;
}

.marketing-demo-rail i {
  align-items: center;
  background: rgba(101, 207, 203, 0.08);
  border-radius: 9px;
  color: #65cfcb;
  display: flex;
  height: 2.55rem;
  justify-content: center;
}

.marketing-demo-main {
  display: grid;
  gap: 0.75rem;
  grid-template-rows: auto 1fr auto;
}

.marketing-demo-welcome,
.marketing-demo-course,
.marketing-demo-metric {
  background: #12181d;
  border: 1px solid #2c4348;
  border-radius: 14px;
}

.marketing-demo-welcome {
  background: linear-gradient(120deg, rgba(101, 207, 203, 0.14), rgba(18, 24, 29, 0.95));
  padding: 1rem;
}

.marketing-demo-welcome span,
.marketing-demo-course span,
.marketing-demo-metric span {
  color: #aab9be;
  font-size: 0.72rem;
}

.marketing-demo-welcome strong {
  display: block;
  font-size: 1.1rem;
  margin-top: 0.15rem;
}

.marketing-demo-course {
  align-content: end;
  background:
    linear-gradient(0deg, rgba(11, 14, 18, 0.94), rgba(11, 14, 18, 0.12)),
    radial-gradient(circle at 72% 22%, rgba(101, 207, 203, 0.5), transparent 36%),
    #184046;
  display: grid;
  padding: 1rem;
}

.marketing-demo-course strong {
  font-size: 1.25rem;
}

.marketing-demo-stats {
  display: grid;
  gap: 0.65rem;
  grid-template-columns: repeat(3, 1fr);
}

.marketing-demo-metric {
  padding: 0.75rem;
}

.marketing-demo-metric strong {
  display: block;
  font-size: 1.15rem;
}

.marketing-proof {
  border-bottom: 1px solid #25383d;
  border-top: 1px solid #25383d;
  display: grid;
  gap: 0;
  grid-template-columns: repeat(4, 1fr);
  padding-inline: clamp(1rem, 4vw, 2rem);
}

.marketing-proof article {
  border-right: 1px solid #25383d;
  padding: 1.35rem;
}

.marketing-proof article:last-child {
  border-right: 0;
}

.marketing-proof strong {
  color: #f6fafb;
  display: block;
  font-size: 1rem;
}

.marketing-proof span {
  color: #8fa2a8;
  font-size: 0.84rem;
}

.marketing-features {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, 1fr);
  padding: clamp(4rem, 8vw, 7rem) clamp(1rem, 4vw, 2rem);
}

.marketing-feature {
  background: #12181d;
  border: 1px solid #2c4348;
  border-radius: 18px;
  padding: 1.25rem;
}

.marketing-feature i {
  align-items: center;
  background: rgba(101, 207, 203, 0.12);
  border: 1px solid rgba(101, 207, 203, 0.2);
  border-radius: 13px;
  color: #65cfcb;
  display: flex;
  font-size: 1.1rem;
  height: 2.8rem;
  justify-content: center;
  margin-bottom: 1rem;
  width: 2.8rem;
}

.marketing-feature h2 {
  color: #f6fafb;
  font-size: 1.05rem;
}

.marketing-feature p {
  color: #aab9be;
  font-size: 0.9rem;
  line-height: 1.65;
  margin: 0;
}

.marketing-footer {
  align-items: center;
  border-top: 1px solid #25383d;
  color: #8fa2a8;
  display: flex;
  font-size: 0.85rem;
  justify-content: space-between;
  padding: 1.5rem clamp(1rem, 4vw, 2rem) 2rem;
}

/* Complete light theme: navigation and feature surfaces change with the mode. */
:root[data-theme="light"] {
  color-scheme: light;
}

:root[data-theme="light"] body {
  background:
    radial-gradient(circle at 88% -10%, rgba(101, 207, 203, 0.16), transparent 31rem),
    radial-gradient(circle at -8% 38%, rgba(78, 154, 155, 0.09), transparent 28rem),
    #f3f7f7;
}

:root[data-theme="light"] .sidebar,
:root[data-theme="light"] .secure-content[data-secure-surface="tenant"] .sidebar {
  background:
    radial-gradient(circle at 12% 0%, rgba(101, 207, 203, 0.16), transparent 16rem),
    #ffffff;
  border-right-color: #d7e5e4;
  color: #163337;
}

:root[data-theme="light"] .sidebar-brand,
:root[data-theme="light"] .secure-content[data-secure-surface="tenant"] .sidebar-brand {
  border-bottom-color: #d7e5e4;
}

:root[data-theme="light"] .sidebar-brand-copy strong {
  color: #163337;
}

:root[data-theme="light"] .sidebar-brand-copy span {
  color: #607579;
}

:root[data-theme="light"] .sidebar-brand>div>span,
:root[data-theme="light"] .sidebar-context,
:root[data-theme="light"] .secure-content[data-secure-surface="tenant"] .sidebar-brand>div>span {
  color: #607579;
}

:root[data-theme="light"] .sidebar-menu>a,
:root[data-theme="light"] .sidebar-group-toggle,
:root[data-theme="light"] .secure-content[data-secure-surface="tenant"] .sidebar-menu>a,
:root[data-theme="light"] .secure-content[data-secure-surface="tenant"] .sidebar-group-toggle {
  color: #476367;
}

:root[data-theme="light"] .sidebar-menu>a>i,
:root[data-theme="light"] .sidebar-group-toggle>i:first-child,
:root[data-theme="light"] .secure-content[data-secure-surface="tenant"] .sidebar-menu>a>i,
:root[data-theme="light"] .secure-content[data-secure-surface="tenant"] .sidebar-group-toggle>i:first-child {
  color: #2a666a;
}

:root[data-theme="light"] .sidebar-menu>a:hover,
:root[data-theme="light"] .sidebar-menu>a:focus-visible,
:root[data-theme="light"] .sidebar-group-toggle:hover,
:root[data-theme="light"] .sidebar-group-toggle:focus-visible,
:root[data-theme="light"] .secure-content[data-secure-surface="tenant"] .sidebar-menu>a:hover,
:root[data-theme="light"] .secure-content[data-secure-surface="tenant"] .sidebar-menu>a:focus-visible,
:root[data-theme="light"] .secure-content[data-secure-surface="tenant"] .sidebar-group-toggle:hover,
:root[data-theme="light"] .secure-content[data-secure-surface="tenant"] .sidebar-group-toggle:focus-visible {
  background: rgba(101, 207, 203, 0.13);
  border-color: rgba(42, 102, 106, 0.16);
  color: #184046;
}

:root[data-theme="light"] .sidebar-menu>a.active,
:root[data-theme="light"] .secure-content[data-secure-surface="tenant"] .sidebar-menu>a.active {
  background: linear-gradient(90deg, rgba(101, 207, 203, 0.22), rgba(101, 207, 203, 0.08));
  border-color: rgba(42, 102, 106, 0.2);
  box-shadow: inset 3px 0 0 #2a666a;
  color: #184046;
}

:root[data-theme="light"] .sidebar-group[open] {
  background: rgba(101, 207, 203, 0.045);
}

:root[data-theme="light"] .sidebar-submenu,
:root[data-theme="light"] .secure-content[data-secure-surface="tenant"] .sidebar-submenu {
  border-left-color: rgba(42, 102, 106, 0.18);
}

:root[data-theme="light"] .sidebar-submenu a,
:root[data-theme="light"] .secure-content[data-secure-surface="tenant"] .sidebar-submenu a {
  color: #607579;
}

:root[data-theme="light"] .sidebar-submenu a:hover,
:root[data-theme="light"] .sidebar-submenu a.active,
:root[data-theme="light"] .secure-content[data-secure-surface="tenant"] .sidebar-submenu a:hover,
:root[data-theme="light"] .secure-content[data-secure-surface="tenant"] .sidebar-submenu a.active {
  background: rgba(101, 207, 203, 0.13);
  color: #184046;
}

:root[data-theme="light"] .student-watch-hero {
  background:
    radial-gradient(circle at 88% 10%, rgba(101, 207, 203, 0.28), transparent 22rem),
    linear-gradient(135deg, #ffffff, #eaf6f4);
  border-color: #cce1df;
  box-shadow: 0 20px 50px rgba(24, 64, 70, 0.1);
}

:root[data-theme="light"] .student-watch-hero h3,
:root[data-theme="light"] .student-watch-hero .tenant-eyebrow,
:root[data-theme="light"] .student-watch-empty {
  color: #163337;
}

:root[data-theme="light"] .student-watch-hero p,
:root[data-theme="light"] .student-watch-meta {
  color: #607579;
}

:root[data-theme="light"] .theme-toggle {
  background: #edf5f4;
  border-color: #d7e5e4;
  color: #184046;
}

/* Light-first administration surfaces override legacy premium dark cards. */
:root[data-theme="light"] .secure-content[data-secure-surface="tenant"] .tenant-dashboard-shell .tenant-page-header,
:root[data-theme="light"] .tenant-dashboard-shell .tenant-page-header {
  background:
    radial-gradient(circle at 96% 0%, rgba(101, 207, 203, 0.2), transparent 20rem),
    linear-gradient(135deg, #ffffff, #f2f9f8);
  border-color: #cfe1df;
  box-shadow: 0 14px 36px rgba(24, 64, 70, 0.08);
}

:root[data-theme="light"] .secure-content[data-secure-surface="tenant"] .tenant-dashboard-shell .tenant-page-header::before,
:root[data-theme="light"] .secure-content[data-secure-surface="tenant"] .tenant-dashboard-shell .tenant-page-header::after {
  border-color: rgba(42, 102, 106, 0.13);
}

:root[data-theme="light"] .secure-content[data-secure-surface="tenant"] .tenant-dashboard-shell .tenant-page-header h2 {
  color: #163337;
}

:root[data-theme="light"] .secure-content[data-secure-surface="tenant"] .tenant-dashboard-shell .tenant-page-header p {
  color: #607579 !important;
}

:root[data-theme="light"] .secure-content[data-secure-surface="tenant"] .tenant-dashboard-shell .tenant-eyebrow {
  color: #2a666a;
}

:root[data-theme="light"] .secure-content[data-secure-surface="tenant"] .tenant-dashboard-shell .tenant-page-actions .btn:not(.btn-primary) {
  background: rgba(255, 255, 255, 0.82);
  border-color: #bfd5d3;
  color: #184046;
}

:root[data-theme="light"] .secure-content[data-secure-surface="tenant"] .tenant-dashboard-shell .tenant-page-actions .btn-primary {
  background: #2a666a;
  border-color: #2a666a;
  color: #fff;
}

:root[data-theme="light"] .tenant-live-status,
:root[data-theme="light"] .secure-content[data-secure-surface="tenant"] .tenant-live-status {
  background: linear-gradient(135deg, #ffffff, #eef8f6);
  border-color: #cfe1df;
  box-shadow: 0 10px 28px rgba(24, 64, 70, 0.07);
}

:root[data-theme="light"] .tenant-setup-card,
:root[data-theme="light"] .secure-content[data-secure-surface="tenant"] .tenant-setup-card {
  background: linear-gradient(145deg, #ffffff, #f4faf9);
  border-color: #d2e3e1;
  box-shadow: 0 10px 28px rgba(24, 64, 70, 0.07);
  color: #163337;
}

:root[data-theme="light"] .tenant-setup-card:hover,
:root[data-theme="light"] .secure-content[data-secure-surface="tenant"] .tenant-setup-card:hover {
  border-color: rgba(42, 102, 106, 0.34);
  box-shadow: 0 16px 34px rgba(24, 64, 70, 0.11);
}

:root[data-theme="light"] .tenant-setup-card h3,
:root[data-theme="light"] .secure-content[data-secure-surface="tenant"] .tenant-setup-card h3 {
  color: #163337;
}

:root[data-theme="light"] .tenant-setup-card p,
:root[data-theme="light"] .secure-content[data-secure-surface="tenant"] .tenant-setup-card p {
  color: #607579;
}

:root[data-theme="light"] .tenant-setup-cta,
:root[data-theme="light"] .secure-content[data-secure-surface="tenant"] .tenant-setup-cta {
  background: #e9f5f3;
  border-color: #c8dfdc;
  color: #184046;
}

:root[data-theme="light"] .metric-card,
:root[data-theme="light"] .report-chart-panel,
:root[data-theme="light"] .app-panel,
:root[data-theme="light"] .list-group-item {
  background: #ffffff;
  border-color: #d7e5e4;
  box-shadow: 0 8px 24px rgba(24, 64, 70, 0.055);
  color: #163337;
}

/* Responsive */
@media (max-width: 1199.98px) {
  .marketing-hero {
    gap: 2.5rem;
  }

  .marketing-product-card {
    transform: none;
  }
}

@media (max-width: 991.98px) {

  .sidebar,
  .secure-content[data-secure-surface="tenant"] .sidebar {
    width: min(88vw, 20rem);
  }

  .main-content {
    margin-left: 0;
    padding: 0.75rem;
    width: 100%;
  }

  .top-navbar,
  .glass-card.top-navbar {
    top: 0.75rem;
  }

  .auth-shell {
    gap: 2rem;
    grid-template-columns: 1fr;
    max-width: 38rem;
    padding-block: 2rem;
  }

  .auth-showcase {
    text-align: center;
  }

  .auth-showcase-logo {
    margin: 0 auto 1.5rem;
  }

  .auth-showcase h1,
  .auth-showcase p {
    margin-inline: auto;
  }

  .auth-proof {
    justify-content: center;
  }

  .auth-card {
    margin-inline: auto;
  }

  .marketing-hero {
    grid-template-columns: 1fr;
    padding-top: 4rem;
  }

  .marketing-hero-copy {
    text-align: center;
  }

  .marketing-hero h1,
  .marketing-hero-copy>p {
    margin-inline: auto;
  }

  .marketing-actions {
    justify-content: center;
  }

  .marketing-product-card {
    margin-inline: auto;
    max-width: 34rem;
    width: 100%;
  }

  .student-essential-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .student-dashboard-minimal .student-focus-grid {
    grid-template-columns: 1fr;
  }

  .marketing-features {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767.98px) {

  .tenant-page-header,
  .tenant-dashboard-shell .tenant-page-header {
    border-radius: 16px;
  }

  .marketing-proof {
    grid-template-columns: repeat(2, 1fr);
  }

  .marketing-proof article:nth-child(2) {
    border-right: 0;
  }

  .marketing-proof article:nth-child(-n + 2) {
    border-bottom: 1px solid #25383d;
  }

  .marketing-demo-stats {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 575.98px) {
  .main-content {
    padding: 0.55rem;
  }

  .top-navbar,
  .glass-card.top-navbar {
    border-radius: 14px;
    flex-wrap: nowrap;
    gap: 0.45rem;
    margin-bottom: 0.65rem;
    min-height: 3.6rem;
    padding: 0.45rem;
    top: 0.55rem;
  }

  .top-navbar>.d-flex:last-child {
    flex-wrap: nowrap;
    gap: 0.3rem !important;
    margin-left: auto;
    overflow: visible;
    width: auto;
  }

  .top-navbar .app-timezone-badge {
    display: none;
  }

  .navbar-logo {
    height: 2.25rem;
    width: 2.25rem;
  }

  .mobile-menu-toggle,
  .theme-toggle,
  .top-navbar .notification-wrapper>.btn,
  .profile-btn {
    height: 2.35rem;
    min-height: 2.35rem;
    min-width: 2.35rem;
    width: 2.35rem;
  }

  .page-content {
    margin-top: 0.7rem;
    padding: 0;
  }

  .student-essential-grid,
  .student-dashboard-minimal .student-quick-links {
    grid-template-columns: 1fr;
  }

  .student-essential-grid .metric-card {
    min-height: 5.5rem;
  }

  .course-batch-panel-head {
    align-items: stretch;
    flex-direction: column;
  }

  .course-batch-panel-head .btn {
    width: 100%;
  }

  .auth-shell {
    padding: 1rem;
  }

  .auth-showcase h1 {
    font-size: clamp(2.1rem, 12vw, 3.2rem);
  }

  .auth-showcase p,
  .auth-proof {
    display: none;
  }

  .auth-showcase-logo {
    max-width: 14rem;
  }

  .auth-card {
    border-radius: 16px;
    padding: 1.1rem;
  }

  .marketing-nav .btn {
    min-height: 2.6rem;
    padding-inline: 0.75rem;
  }

  .marketing-hero {
    min-height: auto;
    padding-top: 3rem;
  }

  .marketing-hero h1 {
    font-size: clamp(2.65rem, 15vw, 4rem);
  }

  .marketing-actions .btn {
    width: 100%;
  }

  .marketing-product-content {
    grid-template-columns: 3.4rem 1fr;
  }

  .marketing-proof {
    grid-template-columns: 1fr;
  }

  .marketing-proof article,
  .marketing-proof article:nth-child(2) {
    border-bottom: 1px solid #25383d;
    border-right: 0;
  }

  .marketing-proof article:last-child {
    border-bottom: 0;
  }

  .marketing-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.4rem;
  }
}

/* Learner month calendar */
.lms-calendar-page-header {
  align-items: flex-end;
}

.lms-calendar-shell {
  background: var(--color-panel);
  border: 1px solid var(--color-line);
  border-radius: var(--app-radius-lg);
  box-shadow: var(--app-shadow-soft);
  overflow: hidden;
}

.lms-calendar-toolbar {
  align-items: center;
  background: linear-gradient(120deg, var(--color-panel), var(--color-panel-subtle));
  border-bottom: 1px solid var(--color-line);
  display: flex;
  gap: 1.25rem;
  justify-content: space-between;
  padding: 1rem 1.15rem;
}

.lms-calendar-month-nav {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
  gap: 0.7rem;
}

.lms-calendar-month-nav h3 {
  font-size: 1.05rem;
  font-weight: 750;
  margin: 0;
  min-width: 10rem;
  text-align: center;
}

.lms-calendar-nav-button {
  align-items: center;
  background: var(--color-panel);
  border: 1px solid var(--color-line-strong);
  border-radius: 10px;
  color: var(--color-ink);
  display: inline-flex;
  height: 2.5rem;
  justify-content: center;
  transition: border-color 160ms ease, color 160ms ease, transform 160ms ease;
  width: 2.5rem;
}

.lms-calendar-nav-button:hover {
  border-color: var(--color-brand);
  color: var(--color-brand);
  transform: translateY(-1px);
}

.lms-calendar-filters {
  display: flex;
  gap: 0.45rem;
  max-width: 100%;
  overflow-x: auto;
  padding: 0.15rem;
  scrollbar-width: thin;
}

.lms-calendar-filter {
  background: var(--color-panel);
  border: 1px solid var(--color-line);
  border-radius: 999px;
  color: var(--color-muted);
  flex: 0 0 auto;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.5rem 0.8rem;
}

.lms-calendar-filter:hover,
.lms-calendar-filter.is-active {
  background: var(--color-brand);
  border-color: var(--color-brand);
  color: #fff;
}

.lms-calendar-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(19rem, 23rem);
  min-height: 39rem;
}

.lms-calendar-grid-wrap {
  min-width: 0;
  overflow-x: auto;
  padding: 1rem;
}

.lms-calendar-grid {
  display: grid;
  gap: 0.45rem;
  grid-template-columns: repeat(7, minmax(5.5rem, 1fr));
  min-width: 46rem;
}

.lms-calendar-weekday {
  color: var(--color-muted);
  font-size: 0.72rem;
  font-weight: 750;
  padding: 0.35rem 0.5rem 0.55rem;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.lms-calendar-day {
  background: var(--color-panel-subtle);
  border: 1px solid transparent;
  border-radius: 12px;
  min-height: 7.8rem;
  padding: 0.45rem;
  position: relative;
  transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.lms-calendar-day:hover {
  border-color: var(--color-line-strong);
}

.lms-calendar-day.is-outside {
  background: color-mix(in srgb, var(--color-panel-subtle) 55%, transparent);
  opacity: 0.56;
}

.lms-calendar-day.is-selected {
  background: var(--color-brand-soft);
  border-color: var(--palette-pacific);
  box-shadow: inset 0 0 0 1px rgba(var(--palette-pacific-rgb), 0.2);
}

.lms-calendar-date {
  align-items: center;
  border-radius: 9px;
  color: var(--color-ink);
  display: inline-flex;
  font-size: 0.78rem;
  font-weight: 750;
  height: 1.7rem;
  justify-content: center;
  margin-bottom: 0.35rem;
  width: 1.7rem;
}

.lms-calendar-day.is-today .lms-calendar-date {
  background: var(--color-brand);
  box-shadow: 0 4px 12px rgba(var(--palette-pacific-rgb), 0.25);
  color: #fff;
}

.lms-calendar-day-events {
  display: grid;
  gap: 0.28rem;
}

.lms-calendar-event {
  align-items: center;
  background: rgba(50, 136, 200, 0.13);
  border-left: 3px solid var(--color-info);
  border-radius: 6px;
  color: var(--color-ink);
  display: flex;
  font-size: 0.66rem;
  font-weight: 650;
  gap: 0.3rem;
  min-width: 0;
  padding: 0.3rem 0.35rem;
}

.lms-calendar-event i {
  flex: 0 0 auto;
}

.lms-calendar-event span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lms-calendar-event.is-live {
  background: rgba(var(--palette-pacific-rgb), 0.17);
  border-left-color: var(--color-brand);
}

.lms-calendar-event.is-assignment {
  background: rgba(246, 184, 77, 0.16);
  border-left-color: var(--color-warning);
}

.lms-calendar-event.is-exam {
  background: rgba(197, 72, 72, 0.13);
  border-left-color: var(--color-danger);
}

.lms-calendar-event.is-quiz {
  background: rgba(42, 141, 130, 0.14);
  border-left-color: var(--color-success);
}

.lms-calendar-more {
  color: var(--color-brand);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.1rem 0.25rem;
}

.lms-calendar-agenda {
  background: color-mix(in srgb, var(--color-panel-subtle) 74%, var(--color-panel));
  border-left: 1px solid var(--color-line);
  padding: 1.25rem;
}

.lms-calendar-agenda-heading {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.lms-calendar-agenda-heading span:first-child {
  color: var(--color-brand);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lms-calendar-agenda-heading h3 {
  font-size: 1rem;
  margin: 0.15rem 0 0;
}

.lms-calendar-agenda-count {
  align-items: center;
  background: var(--color-brand-soft);
  border-radius: 999px;
  color: var(--color-brand);
  display: inline-flex;
  font-size: 0.76rem;
  font-weight: 800;
  height: 2rem;
  justify-content: center;
  width: 2rem;
}

.lms-calendar-agenda-list {
  display: grid;
  gap: 0.7rem;
}

.lms-calendar-agenda-item {
  align-items: center;
  background: var(--color-panel);
  border: 1px solid var(--color-line);
  border-radius: 13px;
  color: var(--color-ink);
  display: grid;
  gap: 0.7rem;
  grid-template-columns: auto minmax(0, 1fr) auto;
  padding: 0.85rem;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.lms-calendar-agenda-item:hover {
  border-color: var(--palette-pacific);
  box-shadow: var(--app-shadow-soft);
  color: var(--color-ink);
  transform: translateY(-1px);
}

.lms-calendar-agenda-icon {
  align-items: center;
  background: rgba(50, 136, 200, 0.13);
  border-radius: 10px;
  color: var(--color-info);
  display: inline-flex;
  height: 2.4rem;
  justify-content: center;
  width: 2.4rem;
}

.lms-calendar-agenda-icon.is-live,
.lms-calendar-agenda-icon.is-quiz {
  background: var(--color-brand-soft);
  color: var(--color-brand);
}

.lms-calendar-agenda-icon.is-assignment {
  background: rgba(246, 184, 77, 0.16);
  color: var(--color-warning);
}

.lms-calendar-agenda-icon.is-exam {
  background: rgba(197, 72, 72, 0.13);
  color: var(--color-danger);
}

.lms-calendar-agenda-copy,
.lms-calendar-agenda-copy>* {
  display: block;
  min-width: 0;
}

.lms-calendar-agenda-copy strong,
.lms-calendar-agenda-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lms-calendar-agenda-copy strong {
  font-size: 0.83rem;
}

.lms-calendar-agenda-copy span,
.lms-calendar-agenda-copy small {
  color: var(--color-muted);
  font-size: 0.72rem;
  margin-top: 0.12rem;
}

.lms-calendar-agenda-arrow {
  color: var(--color-muted);
  font-size: 0.75rem;
}

.lms-calendar-agenda-empty {
  color: var(--color-muted);
  padding: 4rem 1rem;
  text-align: center;
}

.lms-calendar-agenda-empty>span {
  align-items: center;
  background: var(--color-brand-soft);
  border-radius: 15px;
  color: var(--color-brand);
  display: inline-flex;
  font-size: 1.2rem;
  height: 3.2rem;
  justify-content: center;
  margin-bottom: 0.8rem;
  width: 3.2rem;
}

.lms-calendar-agenda-empty strong {
  color: var(--color-ink);
  display: block;
  font-size: 0.86rem;
}

.lms-calendar-agenda-empty p {
  font-size: 0.76rem;
  margin: 0.3rem auto 0;
  max-width: 14rem;
}

@media (max-width: 1199.98px) {
  .lms-calendar-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .lms-calendar-filters {
    width: 100%;
  }

  .lms-calendar-layout {
    grid-template-columns: 1fr;
  }

  .lms-calendar-agenda {
    border-left: 0;
    border-top: 1px solid var(--color-line);
  }
}

@media (max-width: 767.98px) {
  .lms-calendar-page-header {
    align-items: flex-start;
  }

  .lms-calendar-page-header .btn {
    width: auto;
  }

  .lms-calendar-toolbar,
  .lms-calendar-grid-wrap,
  .lms-calendar-agenda {
    padding: 0.85rem;
  }

  .lms-calendar-day {
    min-height: 7rem;
  }
}

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media print {
  body {
    background: #fff !important;
    color: #111 !important;
  }

  .sidebar,
  .top-navbar,
  .secure-watermark,
  .marketing-nav,
  .marketing-footer {
    display: none !important;
  }

  .main-content,
  .page-content {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
  }

  .app-panel,
  .metric-card,
  .list-group-item,
  .table-responsive {
    background: #fff !important;
    border-color: #ccc !important;
    box-shadow: none !important;
    color: #111 !important;
  }
}

/* Responsive application shell -------------------------------------------------
   These rules intentionally live at the end of the final brand stylesheet so
   tenant and owner portals share one predictable header and mobile foundation. */
.top-navbar,
.glass-card.top-navbar {
  display: grid;
  grid-template-columns: minmax(11rem, auto) minmax(0, 1fr);
  width: 100%;
}

.top-navbar__identity,
.top-navbar__actions,
.top-navbar__copy,
.top-navbar__profile,
.top-navbar__profile .profile-btn,
.top-navbar__profile .profile-btn>span {
  min-width: 0;
}

.top-navbar__identity {
  max-width: min(24rem, 32vw);
}

.top-navbar__copy {
  overflow: hidden;
}

.top-navbar__copy .fw-semibold,
.top-navbar__copy small,
.top-navbar__profile .profile-btn .fw-semibold,
.top-navbar__profile .profile-btn small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top-navbar__actions {
  justify-content: flex-end;
  max-width: 100%;
  width: 100%;
}

.top-navbar__search {
  flex: 1 1 18rem;
  max-width: 30rem;
  min-width: 9rem;
  width: auto;
}

.top-navbar__actions .app-timezone-badge,
.top-navbar__actions .theme-toggle,
.top-navbar__actions .notification-wrapper,
.top-navbar__profile {
  flex: 0 0 auto;
}

.top-navbar__profile .profile-btn {
  max-width: min(15rem, 22vw);
}

.page-content,
.page-content>#app,
.owner-page-shell,
.tenant-dashboard-shell,
.app-panel,
.card,
.card-body,
.modal-content,
.accordion,
.tab-content,
.list-group,
.list-group-item {
  max-width: 100%;
  min-width: 0;
}

.nav-tabs,
.nav-pills {
  flex-wrap: nowrap;
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
}

.nav-tabs .nav-link,
.nav-pills .nav-link {
  white-space: nowrap;
}

.pagination {
  flex-wrap: wrap;
}

@media (max-width: 1199.98px) {

  .top-navbar,
  .glass-card.top-navbar {
    column-gap: 0.65rem;
  }

  .top-navbar__identity {
    max-width: min(21rem, 36vw);
  }

  .top-navbar__actions {
    gap: 0.5rem !important;
  }

  .top-navbar__profile .profile-btn {
    max-width: min(12rem, 23vw);
  }
}

@media (max-width: 991.98px) {

  .top-navbar,
  .glass-card.top-navbar {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .top-navbar__identity {
    max-width: none;
  }

  .top-navbar__actions {
    width: auto;
  }

  .top-navbar__search {
    display: none !important;
  }

  .top-navbar__profile .profile-btn>.text-start {
    display: none !important;
  }

  .top-navbar__profile .profile-btn {
    min-width: 2.7rem;
    padding-inline: 0.35rem;
    width: auto;
  }

  .top-navbar__profile .profile-btn>i {
    display: none;
  }

  .page-content,
  .page-content>#app,
  .owner-page-shell,
  .tenant-dashboard-shell {
    overflow-x: clip;
  }

  .dropdown-menu,
  .popover {
    max-width: calc(100vw - 1.5rem);
  }

  .sticky-top:not(.top-navbar),
  .position-sticky:not(.top-navbar) {
    position: static !important;
  }
}

@media (max-width: 767.98px) {

  .top-navbar,
  .glass-card.top-navbar {
    column-gap: 0.4rem;
    padding: 0.45rem;
  }

  .top-navbar__identity,
  .top-navbar__actions {
    gap: 0.35rem !important;
  }

  .brand-wide-nav--top {
    height: 2.35rem;
    width: 7rem;
  }

  .top-navbar__identity .top-navbar__copy {
    display: none;
  }

  .top-navbar__copy small {
    display: none;
  }

  .top-navbar__copy .fw-semibold {
    max-width: 28vw;
  }

  .top-navbar__actions .app-timezone-badge {
    display: none;
  }

  .top-navbar__actions .theme-toggle,
  .top-navbar__actions .notification-wrapper>.btn,
  .top-navbar__profile .profile-btn,
  .mobile-menu-toggle {
    height: 2.4rem;
    min-height: 2.4rem;
    min-width: 2.4rem;
    width: 2.4rem;
  }

  .top-navbar__profile .profile-btn {
    padding: 0.25rem;
  }

  .top-navbar__profile .avatar {
    height: 1.9rem;
    width: 1.9rem;
  }

  .owner-page-head,
  .owner-section-head,
  .form-actions-bar,
  .modal-footer,
  .card-header.d-flex,
  .card-footer.d-flex {
    align-items: stretch !important;
    flex-direction: column;
  }

  .owner-page-head>.btn,
  .owner-page-head>a.btn,
  .owner-section-head .btn,
  .form-actions-bar .btn,
  .modal-footer .btn {
    width: 100%;
  }

  .input-group {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .input-group>.form-control,
  .input-group>.form-select {
    flex: 1 1 12rem;
    width: 1%;
  }

  .input-group>.btn {
    flex: 0 0 auto;
    width: auto;
  }

  .pagination {
    gap: 0.25rem;
    justify-content: center;
    width: 100%;
  }
}

/* Final navbar responsiveness pass ------------------------------------------
   Keep the workspace search usable when there is room, then reduce to stable
   icon controls on small screens without horizontal overflow. */
.top-navbar,
.glass-card.top-navbar {
  align-items: center;
  gap: 0.75rem;
  overflow: visible;
}

.top-navbar__identity,
.top-navbar__actions {
  align-items: center;
}

.top-navbar__actions {
  display: flex !important;
  flex-wrap: nowrap;
  flex: 1 1 auto;
  min-width: 0;
}

.top-navbar__search,
.top-navbar__search .position-relative,
.top-navbar__search .page-search-input {
  min-width: 0;
  width: 100%;
}

.top-navbar__search {
  display: block !important;
  flex: 1 1 clamp(16rem, 38vw, 46rem);
  max-width: none;
}

.top-navbar__actions>.page-search-status {
  flex: 1 0 100%;
  order: 11;
  text-align: right;
}

.top-navbar__actions .theme-toggle,
.top-navbar__actions .navbar-search-toggle,
.top-navbar__actions .notification-wrapper>.btn,
.top-navbar__profile .profile-btn,
.mobile-menu-toggle {
  flex: 0 0 auto;
}

.navbar-search-toggle {
  display: none;
}

.top-navbar__profile .profile-btn {
  overflow: hidden;
}

.notification-panel,
.profile-menu {
  max-width: min(24rem, calc(100vw - 1rem));
}

@media (min-width: 992px) and (max-width: 1199.98px) {

  .top-navbar,
  .glass-card.top-navbar {
    grid-template-columns: minmax(10rem, 0.78fr) minmax(0, 1.22fr);
  }

  .top-navbar__identity {
    max-width: none;
  }

  .top-navbar__search {
    display: block !important;
    flex-basis: clamp(13rem, 30vw, 22rem);
    min-width: 12rem;
  }

  .top-navbar__profile .profile-btn {
    max-width: 10.5rem;
  }
}

@media (max-width: 991.98px) {

  .top-navbar,
  .glass-card.top-navbar {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .top-navbar__actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .top-navbar__search {
    display: block !important;
    flex: 1 0 100%;
    order: 10;
    width: 100%;
  }
}

@media (max-width: 575.98px) {

  .top-navbar,
  .glass-card.top-navbar {
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 0.45rem;
  }

  .top-navbar__identity {
    gap: 0.35rem !important;
    min-width: 0;
  }

  .top-navbar__actions {
    display: flex !important;
    flex-wrap: wrap;
    gap: 0.28rem !important;
    justify-content: end;
    width: 100%;
  }

  .top-navbar__search {
    display: block !important;
    flex: 1 0 100%;
    order: 10;
    width: 100%;
  }

  .top-navbar__actions .app-timezone-badge {
    display: none !important;
  }

  .top-navbar__actions .theme-toggle,
  .top-navbar__actions .notification-wrapper>.btn,
  .top-navbar__profile .profile-btn {
    height: 2.35rem;
    min-height: 2.35rem;
    min-width: 2.35rem;
    padding: 0;
    width: 2.35rem;
  }

  .top-navbar__profile .profile-btn>.text-start,
  .top-navbar__profile .profile-btn>i {
    display: none !important;
  }

  .notification-panel,
  .profile-menu {
    left: auto !important;
    position: fixed;
    right: 0.5rem !important;
    top: 4rem;
    width: calc(100vw - 1rem);
  }
}

@media (max-width: 420px) {
  .brand-wide-nav--top {
    width: 5.75rem;
  }

  .top-navbar__identity .navbar-brand-mark {
    height: 2.2rem;
    width: 2.2rem;
  }

  .top-navbar__copy .fw-semibold {
    max-width: 22vw;
  }

  .top-navbar__actions .theme-toggle,
  .top-navbar__actions .notification-wrapper>.btn,
  .top-navbar__profile .profile-btn,
  .mobile-menu-toggle {
    height: 2.25rem;
    min-height: 2.25rem;
    min-width: 2.25rem;
    width: 2.25rem;
  }
}

.lesson-document-viewer-updated > [data-lesson-document-content] {
  animation: lesson-document-reveal 180ms ease-out;
}

@keyframes lesson-document-reveal {
  from {
    opacity: 0;
    transform: translateY(0.25rem);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .lesson-document-viewer-updated > [data-lesson-document-content] {
    animation: none;
  }
}

/* Learning support: phone-first conversation layout */
@media (max-width: 640px) {
  .support-inbox-grid {
    gap: 0.65rem;
  }

  .support-conversation-card {
    align-items: flex-start;
    display: grid;
    gap: 0.65rem;
    grid-template-columns: auto minmax(0, 1fr);
    padding: 0.8rem;
  }

  .support-conversation-status {
    grid-column: 2;
    text-align: left;
  }

  .support-conversation-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.25rem;
  }

  .support-chat-shell {
    border-radius: 0.75rem;
    margin-inline: -0.35rem;
    min-height: calc(100dvh - 8rem);
  }

  .chat-room-bar {
    align-items: flex-start;
    flex-direction: column;
    padding: 0.7rem 0.75rem;
  }

  .chat-room-actions {
    justify-content: flex-start;
  }

  .support-chat-log {
    min-height: 48dvh;
    padding: 0.6rem;
  }

  .support-chat-message {
    width: 100%;
  }

  .chat-bubble {
    max-width: 88%;
    overflow-wrap: anywhere;
  }

  .chat-composer {
    bottom: 0;
    gap: 0.3rem;
    grid-template-columns: 2.35rem minmax(0, 1fr) 2.65rem;
    padding: 0.5rem;
    position: sticky;
    z-index: 5;
  }

  .chat-composer .chat-icon-btn {
    display: none;
  }

  .chat-composer-field textarea {
    font-size: 16px;
    max-height: 8rem;
    min-height: 2.4rem;
  }

  .chat-composer-hint {
    display: none;
  }
}

/* Final mobile navbar layout: compact controls with icon-triggered centered search. */
@media (max-width: 767.98px) {

  .top-navbar,
  .glass-card.top-navbar,
  .secure-content[data-secure-surface="tenant"] .top-navbar {
    align-items: center;
    display: grid !important;
    gap: 0.45rem !important;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 0.55rem;
    position: sticky;
  }

  .top-navbar__identity {
    display: flex !important;
    max-width: none;
    min-width: 0;
    width: 100%;
  }

  .top-navbar__actions {
    display: flex !important;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0.35rem !important;
    justify-content: flex-end;
    width: auto;
  }

  .navbar-search-toggle {
    display: inline-flex;
  }

  .top-navbar__search {
    background: var(--color-panel-strong);
    border: 1px solid var(--color-border);
    border-radius: 0.95rem;
    box-shadow: 0 1rem 2.4rem rgba(0, 0, 0, 0.35);
    display: none !important;
    left: 50%;
    max-width: min(26rem, calc(100vw - 1.4rem));
    min-width: 0;
    padding: 0.45rem;
    position: fixed;
    top: max(4.75rem, calc(env(safe-area-inset-top) + 4.75rem));
    transform: translateX(-50%);
    width: min(26rem, calc(100vw - 1.4rem));
    z-index: 1085;
  }

  .top-navbar.navbar-search-open .top-navbar__search,
  .glass-card.top-navbar.navbar-search-open .top-navbar__search {
    display: block !important;
  }

  .top-navbar__search .position-relative,
  .top-navbar__search .page-search-input {
    max-width: none;
    min-width: 0;
    width: 100%;
  }

  .top-navbar__actions>.page-search-status {
    background: var(--color-panel-strong);
    border-radius: 999px;
    bottom: 0.65rem;
    left: 50%;
    max-width: calc(100vw - 1.4rem);
    padding: 0.35rem 0.65rem;
    position: fixed;
    text-align: center;
    transform: translateX(-50%);
    width: max-content;
    z-index: 1086;
  }

  .top-navbar__actions .app-timezone-badge {
    display: none !important;
  }

  .top-navbar__actions .theme-toggle,
  .top-navbar__actions .navbar-search-toggle,
  .top-navbar__actions .notification-wrapper>.btn,
  .top-navbar__profile .profile-btn,
  .mobile-menu-toggle {
    height: 2.4rem;
    min-height: 2.4rem;
    min-width: 2.4rem;
    width: 2.4rem;
  }

  .top-navbar__profile .profile-btn {
    padding: 0.2rem;
  }

  .top-navbar__profile .profile-btn>.text-start,
  .top-navbar__profile .profile-btn>i {
    display: none !important;
  }
}

@media (max-width: 420px) {
  .top-navbar__identity .brand-wide-nav--top {
    flex: 1 1 auto;
    max-width: 8rem;
    min-width: 0;
  }
}
