/***  Primary Variables updated 09/12/2025 */
/***  Battersea-Variables updated 09/12/2025 */
/***  Battersea-mixins updated 19/02/2026 */
/**
 * Battersea Library - Variables Version: 2.0.4
*/
:root {
  --battersea-primary: #4CAF50;
  --battersea-primary-l: #4CAF50;
  --battersea-secondary: #2196F3;
  --battersea-secondary-l: #2196F3;
  --battersea-text: #333;
  --battersea-border: #ddd;
  --battersea-tooltip-bg: rgba(0, 0, 0, 0.9);
  --battersea-tooltip-text: #fff;
  --battersea-tooltip-padding: 8px 12px;
  --battersea-tooltip-radius: 4px;
  --battersea-slider-arrow-bg: rgba(0, 0, 0, 0.5);
  --battersea-slider-arrow-color: #fff;
  --battersea-slider-dot-active: var(--battersea-primary, #3363AF);
  --battersea-slider-dot-inactive: #ccc;
  --battersea-slider-dot-size: 12px;
  --battersea-slider-dot-spacing: 8px;
  --battersea-tab-padding: 12px 24px;
  --battersea-tab-border-width: 2px;
  --battersea-tab-active-color: var(--battersea-primary, #3363AF);
  --battersea-popup-overlay-bg: rgba(0, 0, 0, 0.5);
  --battersea-popup-padding: 24px;
  --battersea-popup-max-width: 600px;
  --battersea-popup-radius: 8px;
  --battersea-accordion-padding: 16px;
  --battersea-accordion-border-width: 1px;
  --battersea-progress-height: 20px;
  --battersea-progress-radius: 10px;
  --battersea-progress-bg: #e0e0e0;
  --battersea-progress-fill: var(--battersea-primary);
  --battersea-scroll-dot-size: 12px;
  --battersea-scroll-dot-color: #ccc;
  --battersea-scroll-dot-active: var(--battersea-primary, #3363AF);
  --battersea-scroll-dot-hover: #999;
  --battersea-scroll-spacing: 15px;
  --battersea-scroll-offset: 50px;
  --battersea-progress-circular-stroke: #e0e0e0;
  --battersea-progress-circular-fill: var(--battersea-primary, #3363AF);
  --battersea-animation-duration: 0.6s;
  --battersea-animation-timing: ease-out;
  --battersea-header-bg: #fff;
  --battersea-header-text: #333;
  --battersea-header-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  --battersea-header-transition: 0.3s ease;
  --battersea-audio-bg: #1a1a2e;
  --battersea-audio-text: #e0e0e0;
  --battersea-audio-accent: #667eea;
  --battersea-audio-track-bg: rgba(255, 255, 255, 0.15);
  --battersea-audio-track-height: 4px;
  --battersea-audio-handle-size: 14px;
  --battersea-audio-radius: 12px;
  --battersea-audio-padding: 16px 20px;
  --battersea-video-bg: #000;
  --battersea-video-controls-bg: rgba(0, 0, 0, 0.7);
  --battersea-video-text: #e0e0e0;
  --battersea-video-accent: #667eea;
  --battersea-video-track-bg: rgba(255, 255, 255, 0.2);
  --battersea-video-track-height: 4px;
  --battersea-video-handle-size: 14px;
  --battersea-video-radius: 8px;
  --battersea-video-controls-padding: 10px 16px;
  --battersea-dragdrop-item-bg: #f8f9fa;
  --battersea-dragdrop-item-text: #333;
  --battersea-dragdrop-item-hover: #e9ecef;
  --battersea-dragdrop-item-padding: 16px;
  --battersea-dragdrop-item-radius: 8px;
  --battersea-dragdrop-item-border: #ddd;
  --battersea-dragdrop-placeholder-bg: rgba(102, 126, 234, 0.08);
  --battersea-dragdrop-placeholder-border: #667eea;
  --battersea-dragdrop-container-bg: #fff;
  --battersea-dragdrop-container-border: #ddd;
  --battersea-dragdrop-container-padding: 16px;
  --battersea-dragdrop-hint-text: #999;
  --battersea-dragdrop-label-text: #333;
  --battersea-profile-gap: 20px;
  --battersea-profile-radius: 8px;
  --battersea-profile-overlay-bg: rgba(0, 0, 0, 0.6);
  --battersea-profile-overlay-text: #fff;
  --battersea-profile-lightbox-bg: #fff;
  --battersea-profile-lightbox-max-width: 900px;
  --battersea-profile-lightbox-overlay: rgba(0, 0, 0, 0.7);
  --battersea-profile-lightbox-radius: 12px;
  --battersea-profile-filter-bg: #f0f0f0;
  --battersea-profile-filter-active: #667eea;
  --battersea-profile-filter-text: #333;
  --battersea-profile-filter-active-text: #fff;
  --battersea-graph-grid: #e8e8e8;
  --battersea-graph-axis: #ccc;
  --battersea-graph-tick: #666;
  --battersea-graph-tooltip-bg: rgba(0, 0, 0, 0.85);
  --battersea-graph-tooltip-text: #fff;
  --battersea-graph-title-color: #333;
  --battersea-graph-legend-text: #555;
  --battersea-graph-animation-duration: 1s;
  --battersea-breadcrumb-text: #666;
  --battersea-breadcrumb-link: #667eea;
  --battersea-breadcrumb-link-hover: #4c5fd5;
  --battersea-breadcrumb-separator-color: #999;
  --battersea-breadcrumb-font-size: 0.875rem;
  --battersea-breadcrumb-spacing: 0.5rem;
  --battersea-breadcrumb-padding: 0.75rem 0;
  --battersea-vnav-width: 260px;
  --battersea-vnav-collapsed-width: 48px;
  --battersea-vnav-bg: #ffffff;
  --battersea-vnav-text: var(--battersea-text, #333);
  --battersea-vnav-hover-bg: #f5f5f5;
  --battersea-vnav-hover-text: #000000;
  --battersea-vnav-active-bg: var(--battersea-primary, #3363AF);
  --battersea-vnav-active-text: #ffffff;
  --battersea-vnav-border: var(--battersea-border, #dedddd);
  --battersea-vnav-padding: 10px 16px;
  --battersea-vnav-indent: 16px;
  --battersea-vnav-flyout-width: 220px;
  --battersea-vnav-flyout-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  --battersea-vnav-animation-speed: 0.3s;
  --battersea-vnav-icon-size: 5px;
  --battersea-vnav-group-bg: rgba(0, 0, 0, 0.02);
  --battersea-vnav-toggle-bg: #f0f0f0;
  --battersea-vnav-mobile-bg: #ffffff;
  --battersea-vnav-mobile-text: #333333;
  --battersea-vnav-mobile-border: #e0e0e0;
  --battersea-vnav-mobile-chevron: #999999;
  --battersea-vnav-mobile-back-bg: #f5f5f5;
  --battersea-vnav-offcanvas-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
  --battersea-vnav-offcanvas-backdrop: rgba(0, 0, 0, 0.5);
  --battersea-hscroll-dot-size: 12px;
  --battersea-hscroll-dot-bg: rgba(255, 255, 255, 0.5);
  --battersea-hscroll-dot-active: #fff;
  --battersea-hscroll-dot-hover: rgba(255, 255, 255, 0.8);
  --battersea-hscroll-dots-bg: rgba(0, 0, 0, 0.3);
  --battersea-hscroll-dots-gap: 10px;
  --battersea-hscroll-dots-radius: 20px;
  --battersea-share-button-size: 44px;
  --battersea-share-button-bg: #f0f0f0;
  --battersea-share-button-text: #555;
  --battersea-share-button-radius: 50%;
  --battersea-share-gap: 10px;
  --battersea-share-icon-size: 20px;
  --battersea-share-pill-radius: 22px;
  --battersea-share-pill-padding: 8px 16px;
}
/**
 * Battersea Library - Accessibility Component Styles
 * Version: 1.1.0
 * Font size slider that slides down from the pre-header
 */
/* Trigger button (styled to work in pre-header or anywhere) */
[data-accessibility] {
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  transition: background 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
}
[data-accessibility]:hover {
  background: rgba(255, 255, 255, 0.15);
}
[data-accessibility]:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.6);
  outline-offset: 2px;
}
/* Pre-header needs positioned ancestor for the panel — sticky works like relative.
   z-index 101 so the accessibility dropdown appears above the main header (100). */
.battersea-header-pre {
  position: sticky;
  top: 0;
  z-index: 101;
}
/* Slide-down panel */
.battersea-a11y-panel {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 0 24px;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.3s ease, opacity 0.25s ease, padding 0.3s ease;
  /* "a" and "A" labels */
}
.battersea-a11y-panel--open {
  max-height: 60px;
  opacity: 1;
  padding: 12px 24px;
}
.battersea-a11y-panel__label {
  color: #fff;
  font-weight: 600;
  line-height: 1;
  flex-shrink: 0;
  user-select: none;
}
.battersea-a11y-panel__label--small {
  font-size: 12px;
}
.battersea-a11y-panel__label--large {
  font-size: 22px;
}
/* Range slider */
.battersea-a11y-slider {
  width: 200px;
  max-width: 50vw;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
  outline: none;
  margin: 0;
  flex-shrink: 1;
}
.battersea-a11y-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  cursor: pointer;
  border: none;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
  transition: transform 0.15s;
}
.battersea-a11y-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}
.battersea-a11y-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  background: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
  transition: transform 0.15s;
}
.battersea-a11y-slider::-moz-range-thumb:hover {
  transform: scale(1.15);
}
.battersea-a11y-slider:focus-visible::-webkit-slider-thumb {
  outline: 2px solid #fff;
  outline-offset: 2px;
}
/**
 * Battersea Library - Tooltips Styles Version: 2.0.4
*/
.battersea-tooltip {
  position: fixed;
  background: var(--battersea-tooltip-bg);
  color: var(--battersea-tooltip-text);
  padding: var(--battersea-tooltip-padding);
  border-radius: var(--battersea-tooltip-radius);
  font-size: 14px;
  line-height: 1.4;
  z-index: 10000;
  pointer-events: none;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(0);
  transition: opacity 0.2s, transform 0.2s;
}
.battersea-tooltip::after {
  content: '';
  position: absolute;
  border: 5px solid transparent;
}
.battersea-tooltip.battersea-tooltip-top::after {
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-top-color: var(--battersea-tooltip-bg);
}
.battersea-tooltip.battersea-tooltip-top.battersea-tooltip-show {
  opacity: 1;
  transform: translateY(-4px);
}
.battersea-tooltip.battersea-tooltip-bottom::after {
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-bottom-color: var(--battersea-tooltip-bg);
}
.battersea-tooltip.battersea-tooltip-bottom.battersea-tooltip-show {
  opacity: 1;
  transform: translateY(4px);
}
.battersea-tooltip.battersea-tooltip-left::after {
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  border-left-color: var(--battersea-tooltip-bg);
}
.battersea-tooltip.battersea-tooltip-left.battersea-tooltip-show {
  opacity: 1;
  transform: translateX(-4px);
}
.battersea-tooltip.battersea-tooltip-right::after {
  right: 100%;
  top: 50%;
  transform: translateY(-50%);
  border-right-color: var(--battersea-tooltip-bg);
}
.battersea-tooltip.battersea-tooltip-right.battersea-tooltip-show {
  opacity: 1;
  transform: translateX(4px);
}
/**
 * Battersea Library - Popup Styles Version: 2.0.4
*/
.battersea-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--battersea-popup-overlay-bg);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
}
.battersea-popup-overlay.active {
  display: flex;
}
.battersea-popup-wrapper {
  position: relative;
  max-width: var(--battersea-popup-max-width);
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  animation: popupSlideIn 0.3s ease-out;
}
[data-popup] {
  background: var(--admin-surface, #fff);
  padding: var(--battersea-popup-padding);
  border-radius: var(--battersea-popup-radius);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  position: relative;
}
@keyframes popupSlideIn {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
/**
 * Battersea Library - DataTable Styles
 * Version: 2.13.0
 */
:root {
  --datatable-bg: #fff;
  --datatable-border-color: #ddd;
  --datatable-header-bg: #f5f5f5;
  --datatable-header-color: #333;
  --datatable-row-hover-bg: #f0f4ff;
  --datatable-row-selected-bg: #e3f2fd;
  --datatable-stripe-bg: #fafafa;
  --datatable-accent-color: #667eea;
  --datatable-text-color: #444;
  --datatable-empty-color: #999;
  --datatable-input-bg: #fff;
  --datatable-input-border: #ddd;
}
[data-theme="dark"] {
  --datatable-bg: #1c1e2e;
  --datatable-border-color: #2e3047;
  --datatable-header-bg: #13141f;
  --datatable-header-color: #d8dae0;
  --datatable-row-hover-bg: #2c3044;
  --datatable-row-selected-bg: rgba(77, 179, 255, 0.15);
  --datatable-stripe-bg: #202436;
  --datatable-text-color: #d8dae0;
  --datatable-empty-color: #8688a0;
  --datatable-input-bg: #1c1e2e;
  --datatable-input-border: #2e3047;
}
@media (prefers-color-scheme: dark) {
  [data-theme="auto"] {
    --datatable-bg: #1c1e2e;
    --datatable-border-color: #2e3047;
    --datatable-header-bg: #13141f;
    --datatable-header-color: #d8dae0;
    --datatable-row-hover-bg: #2c3044;
    --datatable-row-selected-bg: rgba(77, 179, 255, 0.15);
    --datatable-stripe-bg: #202436;
    --datatable-text-color: #d8dae0;
    --datatable-empty-color: #8688a0;
    --datatable-input-bg: #1c1e2e;
    --datatable-input-border: #2e3047;
  }
}
.battersea-datatable {
  width: 100%;
  font-size: 0.95rem;
  color: var(--datatable-text-color, #444);
}
.battersea-datatable__toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.battersea-datatable__filter {
  flex: 1;
  min-width: 200px;
  max-width: 400px;
}
.battersea-datatable__filter input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--datatable-input-border, #ddd);
  border-radius: 4px;
  font-size: 0.9rem;
  font-family: inherit;
  background: var(--datatable-input-bg, #fff);
  color: var(--datatable-text-color, #444);
  transition: border-color 0.2s;
}
.battersea-datatable__filter input:focus {
  outline: none;
  border-color: var(--datatable-accent-color, #667eea);
  box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.15);
}
.battersea-datatable__export-btn {
  padding: 0.5rem 1rem;
  background: var(--datatable-header-bg, #f5f5f5);
  border: 1px solid var(--datatable-border-color, #ddd);
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
  font-family: inherit;
  transition: background 0.2s, border-color 0.2s;
}
.battersea-datatable__export-btn:hover {
  background: #e8e8e8;
  border-color: #ccc;
}
.battersea-datatable__export-btn:focus {
  outline: 2px solid var(--datatable-accent-color, #667eea);
  outline-offset: 1px;
}
.battersea-datatable__scroll-container {
  position: relative;
}
.battersea-datatable__scroll-container::before,
.battersea-datatable__scroll-container::after {
  content: '';
  position: absolute;
  top: 1px;
  bottom: 1px;
  width: 30px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 2;
}
.battersea-datatable__scroll-container::before {
  left: 1px;
  background: linear-gradient(to right, rgba(0, 0, 0, 0.2), transparent);
}
.battersea-datatable__scroll-container::after {
  right: 1px;
  background: linear-gradient(to left, rgba(0, 0, 0, 0.2), transparent);
}
.battersea-datatable__scroll-container--scroll-left::before {
  opacity: 1;
}
.battersea-datatable__scroll-container--scroll-right::after {
  opacity: 1;
}
.battersea-datatable__table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--datatable-border-color, #ddd);
  border-radius: 6px;
  -webkit-overflow-scrolling: touch;
}
.battersea-datatable__table {
  width: 100%;
  border-collapse: collapse;
  background: var(--datatable-bg, #fff);
}
.battersea-datatable__table--striped tbody tr:nth-child(even) {
  background: var(--datatable-stripe-bg, #fafafa);
}
.battersea-datatable__th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
  background: var(--datatable-header-bg, #f5f5f5);
  color: var(--datatable-header-color, #333);
  border-bottom: 2px solid var(--datatable-border-color, #ddd);
  position: relative;
  white-space: nowrap;
  vertical-align: middle;
}
.battersea-datatable__th--sortable {
  cursor: pointer;
  user-select: none;
  padding-right: 1.75rem;
}
.battersea-datatable__th--sortable:hover {
  background: #eaeaea;
}
.battersea-datatable__th--sortable:focus {
  outline: 2px solid var(--datatable-accent-color, #667eea);
  outline-offset: -2px;
}
.battersea-datatable__th--select {
  width: 44px;
  text-align: center;
  padding: 0.75rem 0.5rem;
}
.battersea-datatable__sort-indicator {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  opacity: 0.25;
  transition: opacity 0.2s;
}
[aria-sort="none"] .battersea-datatable__sort-indicator {
  border-bottom: 5px solid var(--datatable-header-color, #333);
}
[aria-sort="ascending"] .battersea-datatable__sort-indicator {
  border-bottom: 5px solid var(--datatable-accent-color, #667eea);
  border-top: none;
  opacity: 1;
}
[aria-sort="descending"] .battersea-datatable__sort-indicator {
  border-top: 5px solid var(--datatable-accent-color, #667eea);
  border-bottom: none;
  opacity: 1;
}
.battersea-datatable__resize-handle {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  cursor: col-resize;
  background: transparent;
  transition: background 0.15s;
}
.battersea-datatable__resize-handle:hover,
.battersea-datatable__resize-handle--active {
  background: var(--datatable-accent-color, #667eea);
  opacity: 0.4;
}
.battersea-datatable__td {
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--datatable-border-color, #ddd);
  vertical-align: middle;
}
.battersea-datatable__td--select {
  text-align: center;
  padding: 0.65rem 0.5rem;
}
.battersea-datatable__row {
  transition: background 0.15s;
}
.battersea-datatable__row:hover {
  background: var(--datatable-row-hover-bg, #f0f4ff);
}
.battersea-datatable__row--selected {
  background: var(--datatable-row-selected-bg, #e3f2fd);
}
.battersea-datatable__row--selected:hover {
  background: #d0e8fb;
}
.battersea-datatable__empty {
  padding: 2rem 1rem;
  text-align: center;
  color: var(--datatable-empty-color, #999);
  font-style: italic;
}
.battersea-datatable__pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.75rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.battersea-datatable__pagination-info {
  font-size: 0.85rem;
  color: #666;
}
.battersea-datatable__pagination-controls {
  display: flex;
  align-items: center;
  gap: 2px;
}
.battersea-datatable__page-btn {
  padding: 0.4rem 0.65rem;
  border: 1px solid var(--datatable-border-color, #ddd);
  background: var(--datatable-bg, #fff);
  color: var(--datatable-text-color, #444);
  cursor: pointer;
  font-size: 0.85rem;
  font-family: inherit;
  min-width: 32px;
  text-align: center;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  border-radius: 3px;
}
.battersea-datatable__page-btn:hover:not(:disabled) {
  background: var(--datatable-header-bg, #f5f5f5);
  border-color: #ccc;
}
.battersea-datatable__page-btn:focus {
  outline: 2px solid var(--datatable-accent-color, #667eea);
  outline-offset: 1px;
}
.battersea-datatable__page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.battersea-datatable__page-btn--active {
  background: var(--datatable-accent-color, #667eea);
  color: #fff;
  border-color: var(--datatable-accent-color, #667eea);
  font-weight: 600;
}
.battersea-datatable__page-btn--active:hover:not(:disabled) {
  background: var(--datatable-accent-color, #667eea);
  border-color: var(--datatable-accent-color, #667eea);
}
.battersea-datatable__page-ellipsis {
  padding: 0.4rem 0.5rem;
  font-size: 0.85rem;
  color: #999;
}
.battersea-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
@media (max-width: 767px) {
  .battersea-datatable__toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .battersea-datatable__filter {
    max-width: none;
  }
  .battersea-datatable__th,
  .battersea-datatable__td {
    padding: 0.5rem 0.6rem;
    font-size: 0.85rem;
  }
  .battersea-datatable__pagination {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .battersea-datatable--responsive .battersea-datatable__scroll-container::before,
  .battersea-datatable--responsive .battersea-datatable__scroll-container::after {
    display: none;
  }
  .battersea-datatable--responsive .battersea-datatable__table-wrapper {
    border: none;
    border-radius: 0;
    overflow-x: visible;
  }
  .battersea-datatable--responsive .battersea-datatable__table thead {
    display: none;
  }
  .battersea-datatable--responsive .battersea-datatable__table tbody {
    display: block;
  }
  .battersea-datatable--responsive .battersea-datatable__table--striped tbody tr:nth-child(even) {
    background: none;
  }
  .battersea-datatable--responsive .battersea-datatable__row {
    display: block;
    margin-bottom: 0.75rem;
    border: 1px solid var(--datatable-border-color, #ddd);
    border-radius: 6px;
    overflow: hidden;
    background: var(--datatable-bg, #fff);
  }
  .battersea-datatable--responsive .battersea-datatable__row:nth-child(even) {
    background: var(--datatable-bg, #fff);
  }
  .battersea-datatable--responsive .battersea-datatable__row:hover {
    background: var(--datatable-bg, #fff);
  }
  .battersea-datatable--responsive .battersea-datatable__row--selected {
    background: var(--datatable-row-selected-bg, #e3f2fd);
  }
  .battersea-datatable--responsive .battersea-datatable__row--selected:hover {
    background: var(--datatable-row-selected-bg, #e3f2fd);
  }
  .battersea-datatable--responsive .battersea-datatable__td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.75rem;
    text-align: right;
    font-size: 0.85rem;
    border-bottom-color: #f0f0f0;
  }
  .battersea-datatable--responsive .battersea-datatable__td::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--datatable-header-color, #333);
    text-align: left;
    margin-right: 1rem;
    flex-shrink: 0;
  }
  .battersea-datatable--responsive .battersea-datatable__td:last-child {
    border-bottom: none;
  }
  .battersea-datatable--responsive .battersea-datatable__td--select {
    justify-content: flex-end;
    padding: 0.4rem 0.75rem;
    border-bottom-color: var(--datatable-border-color, #ddd);
  }
  .battersea-datatable--responsive .battersea-datatable__td--select::before {
    content: none;
  }
  .battersea-datatable--responsive .battersea-datatable__empty {
    display: block;
    text-align: center;
  }
  .battersea-datatable--responsive .battersea-datatable__empty::before {
    content: none;
  }
}
/**
 * Battersea Library - DragTable Styles
 * Version: 2.32.0
 *
 * Reuses DataTable CSS variables for consistent table styling.
 */
.battersea-dragtable {
  width: 100%;
  font-size: 0.95rem;
  color: var(--datatable-text-color, #444);
}
.battersea-dragtable__toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.battersea-dragtable__filter {
  flex: 1;
  min-width: 200px;
  max-width: 400px;
}
.battersea-dragtable__filter input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--datatable-input-border, #ddd);
  border-radius: 4px;
  font-size: 0.9rem;
  font-family: inherit;
  background: var(--datatable-input-bg, #fff);
  color: var(--datatable-text-color, #444);
  transition: border-color 0.2s;
}
.battersea-dragtable__filter input:focus {
  outline: none;
  border-color: var(--datatable-accent-color, #667eea);
  box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.15);
}
.battersea-dragtable__scroll-container {
  position: relative;
}
.battersea-dragtable__scroll-container::before,
.battersea-dragtable__scroll-container::after {
  content: '';
  position: absolute;
  top: 1px;
  bottom: 1px;
  width: 30px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 2;
}
.battersea-dragtable__scroll-container::before {
  left: 1px;
  background: linear-gradient(to right, rgba(0, 0, 0, 0.2), transparent);
}
.battersea-dragtable__scroll-container::after {
  right: 1px;
  background: linear-gradient(to left, rgba(0, 0, 0, 0.2), transparent);
}
.battersea-dragtable__scroll-container--scroll-left::before {
  opacity: 1;
}
.battersea-dragtable__scroll-container--scroll-right::after {
  opacity: 1;
}
.battersea-dragtable__table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--datatable-border-color, #ddd);
  border-radius: 6px;
  -webkit-overflow-scrolling: touch;
}
.battersea-dragtable__table {
  width: 100%;
  border-collapse: collapse;
  background: var(--datatable-bg, #fff);
}
.battersea-dragtable__table--striped tbody tr:nth-child(even) {
  background: var(--datatable-stripe-bg, #fafafa);
}
.battersea-dragtable__th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
  background: var(--datatable-header-bg, #f5f5f5);
  color: var(--datatable-header-color, #333);
  border-bottom: 2px solid var(--datatable-border-color, #ddd);
  position: relative;
  white-space: nowrap;
  vertical-align: middle;
}
.battersea-dragtable__th--handle {
  width: 36px;
  text-align: center;
  padding: 0.75rem 0.25rem;
}
.battersea-dragtable__th--draggable {
  cursor: grab;
  user-select: none;
  padding-left: 0.5rem;
}
.battersea-dragtable__th--draggable:hover {
  background: #eaeaea;
}
.battersea-dragtable__th--draggable:active {
  cursor: grabbing;
}
.battersea-dragtable__th--dragging {
  opacity: 0.3;
  background: var(--datatable-accent-color, #667eea);
}
.battersea-dragtable__th--drop-left {
  box-shadow: inset 3px 0 0 var(--datatable-accent-color, #667eea);
}
.battersea-dragtable__th--drop-right {
  box-shadow: inset -3px 0 0 var(--datatable-accent-color, #667eea);
}
.battersea-dragtable__th--filter {
  padding: 0.4rem 0.5rem;
  border-bottom: 1px solid var(--datatable-border-color, #ddd);
  background: var(--datatable-header-bg, #f5f5f5);
}
.battersea-dragtable__th--filter-empty {
  padding: 0.4rem 0.25rem;
  border-bottom: 1px solid var(--datatable-border-color, #ddd);
  background: var(--datatable-header-bg, #f5f5f5);
}
.battersea-dragtable__column-filter {
  width: 100%;
  padding: 0.3rem 0.4rem;
  border: 1px solid var(--datatable-input-border, #ddd);
  border-radius: 3px;
  font-size: 0.8rem;
  font-family: inherit;
  background: var(--datatable-input-bg, #fff);
  color: var(--datatable-text-color, #444);
  cursor: pointer;
}
.battersea-dragtable__column-filter:focus {
  outline: none;
  border-color: var(--datatable-accent-color, #667eea);
}
.battersea-dragtable__column-grip {
  display: inline-block;
  margin-right: 0.4rem;
  font-size: 0.75rem;
  letter-spacing: -2px;
  color: #aaa;
  vertical-align: middle;
  transition: color 0.2s;
}
.battersea-dragtable__th--draggable:hover .battersea-dragtable__column-grip {
  color: var(--datatable-accent-color, #667eea);
}
.battersea-dragtable__row-grip {
  display: inline-block;
  cursor: grab;
  font-size: 0.85rem;
  letter-spacing: -2px;
  color: #aaa;
  padding: 0.2rem 0.3rem;
  border-radius: 3px;
  transition: color 0.2s, background 0.2s;
  touch-action: none;
}
.battersea-dragtable__row-grip:hover {
  color: var(--datatable-accent-color, #667eea);
  background: rgba(102, 126, 234, 0.08);
}
.battersea-dragtable__row-grip:focus {
  outline: 2px solid var(--datatable-accent-color, #667eea);
  outline-offset: 1px;
}
.battersea-dragtable__row-grip:active {
  cursor: grabbing;
}
.battersea-dragtable__td {
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--datatable-border-color, #ddd);
  vertical-align: middle;
}
.battersea-dragtable__td--handle {
  text-align: center;
  padding: 0.65rem 0.25rem;
  width: 36px;
}
.battersea-dragtable__row {
  transition: background 0.15s;
}
.battersea-dragtable__row:hover {
  background: var(--datatable-row-hover-bg, #f0f4ff);
}
.battersea-dragtable__row--dragging {
  opacity: 0.3;
  background: var(--datatable-row-selected-bg, #e3f2fd);
}
.battersea-dragtable__row--drop-above,
.battersea-dragtable__row--drop-above > td {
  box-shadow: inset 0 3px 0 var(--datatable-accent-color, #667eea);
}
.battersea-dragtable__row--drop-below,
.battersea-dragtable__row--drop-below > td {
  box-shadow: inset 0 -3px 0 var(--datatable-accent-color, #667eea);
}
.battersea-dragtable__ghost-row {
  display: table-row;
  background: var(--datatable-bg, #fff);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  border-radius: 4px;
  overflow: hidden;
}
.battersea-dragtable__ghost-row td {
  padding: 0.65rem 1rem;
  border-bottom: none;
  background: var(--datatable-bg, #fff);
}
.battersea-dragtable__ghost-column {
  background: var(--datatable-accent-color, #667eea);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  white-space: nowrap;
}
.battersea-dragtable__empty {
  padding: 2rem 1rem;
  text-align: center;
  color: var(--datatable-empty-color, #999);
  font-style: italic;
}
@media (max-width: 767px) {
  .battersea-dragtable__toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .battersea-dragtable__filter {
    max-width: none;
  }
  .battersea-dragtable__th,
  .battersea-dragtable__td {
    padding: 0.5rem 0.6rem;
    font-size: 0.85rem;
  }
  .battersea-dragtable__column-grip {
    display: none;
  }
  .battersea-dragtable__th--draggable {
    cursor: default;
    padding-left: 1rem;
  }
  .battersea-dragtable--responsive .battersea-dragtable__scroll-container::before,
  .battersea-dragtable--responsive .battersea-dragtable__scroll-container::after {
    display: none;
  }
  .battersea-dragtable--responsive .battersea-dragtable__table-wrapper {
    border: none;
    border-radius: 0;
    overflow-x: visible;
  }
  .battersea-dragtable--responsive .battersea-dragtable__table thead {
    display: none;
  }
  .battersea-dragtable--responsive .battersea-dragtable__table tbody {
    display: block;
  }
  .battersea-dragtable--responsive .battersea-dragtable__table--striped tbody tr:nth-child(even) {
    background: none;
  }
  .battersea-dragtable--responsive .battersea-dragtable__row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 0.75rem;
    border: 1px solid var(--datatable-border-color, #ddd);
    border-radius: 6px;
    overflow: hidden;
    background: var(--datatable-bg, #fff);
  }
  .battersea-dragtable--responsive .battersea-dragtable__row:nth-child(even) {
    background: var(--datatable-bg, #fff);
  }
  .battersea-dragtable--responsive .battersea-dragtable__row:hover {
    background: var(--datatable-bg, #fff);
  }
  .battersea-dragtable--responsive .battersea-dragtable__row--dragging {
    opacity: 0.3;
  }
  .battersea-dragtable--responsive .battersea-dragtable__row--drop-above {
    box-shadow: 0 -3px 0 var(--datatable-accent-color, #667eea);
  }
  .battersea-dragtable--responsive .battersea-dragtable__row--drop-below {
    box-shadow: 0 3px 0 var(--datatable-accent-color, #667eea);
  }
  .battersea-dragtable--responsive .battersea-dragtable__row--drop-above > td,
  .battersea-dragtable--responsive .battersea-dragtable__row--drop-below > td {
    box-shadow: none;
  }
  .battersea-dragtable--responsive .battersea-dragtable__td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.75rem;
    text-align: right;
    font-size: 0.85rem;
    border-bottom-color: #f0f0f0;
    width: 100%;
  }
  .battersea-dragtable--responsive .battersea-dragtable__td::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--datatable-header-color, #333);
    text-align: left;
    margin-right: 1rem;
    flex-shrink: 0;
  }
  .battersea-dragtable--responsive .battersea-dragtable__td:last-child {
    border-bottom: none;
  }
  .battersea-dragtable--responsive .battersea-dragtable__td--handle {
    width: auto;
    flex: 0 0 auto;
    justify-content: center;
    padding: 0.5rem 0.75rem;
    border-bottom-color: var(--datatable-border-color, #ddd);
    background: var(--datatable-header-bg, #f5f5f5);
  }
  .battersea-dragtable--responsive .battersea-dragtable__td--handle::before {
    content: none;
  }
  .battersea-dragtable--responsive .battersea-dragtable__empty {
    display: block;
    text-align: center;
  }
  .battersea-dragtable--responsive .battersea-dragtable__empty::before {
    content: none;
  }
}
/**
 * Battersea Library - FormElements Styles
 * Version: 2.23.0
 */
:root {
  /* Toggle */
  --form-toggle-width: 48px;
  --form-toggle-height: 24px;
  --form-toggle-bg: #ccc;
  --form-toggle-active: #667eea;
  /* Slider */
  --form-slider-track-height: 6px;
  --form-slider-track-bg: #e0e0e0;
  --form-slider-fill-bg: #667eea;
  --form-slider-handle-size: 18px;
  --form-slider-handle-bg: #fff;
  --form-slider-handle-border: #667eea;
  /* Date Picker */
  --form-datepicker-radius: 8px;
  --form-datepicker-bg: #fff;
  --form-datepicker-border: #ddd;
  --form-datepicker-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  --form-datepicker-today: #667eea;
  --form-datepicker-selected: #667eea;
  /* Time Picker */
  --form-timepicker-col-height: 200px;
  --form-timepicker-bg: #fff;
  --form-timepicker-border: #ddd;
  --form-timepicker-selected: #667eea;
  /* Colour Swatch */
  --form-swatch-size: 32px;
  --form-swatch-gap: 8px;
  --form-swatch-selected-border: #333;
  --form-picker-height: 150px;
  /* Shared field surfaces (used by date/time pickers and raw inputs) */
  --form-field-bg: #fff;
  --form-field-border: #ddd;
  --form-field-text: #333;
  --form-field-muted-text: #555;
  --form-field-muted-bg: #f0f0f0;
  --form-field-disabled-bg: #e9ecef;
}
[data-theme="dark"] {
  --form-toggle-bg: #2e3047;
  --form-slider-track-bg: #2e3047;
  --form-slider-handle-bg: #d8dae0;
  --form-datepicker-bg: #1c1e2e;
  --form-datepicker-border: #2e3047;
  --form-timepicker-bg: #1c1e2e;
  --form-timepicker-border: #2e3047;
  --form-swatch-selected-border: #d8dae0;
  --form-field-bg: #1c1e2e;
  --form-field-border: #2e3047;
  --form-field-text: #d8dae0;
  --form-field-muted-text: #8688a0;
  --form-field-muted-bg: #252738;
  --form-field-disabled-bg: #252738;
}
@media (prefers-color-scheme: dark) {
  [data-theme="auto"] {
    --form-toggle-bg: #2e3047;
    --form-slider-track-bg: #2e3047;
    --form-slider-handle-bg: #d8dae0;
    --form-datepicker-bg: #1c1e2e;
    --form-datepicker-border: #2e3047;
    --form-timepicker-bg: #1c1e2e;
    --form-timepicker-border: #2e3047;
    --form-swatch-selected-border: #d8dae0;
    --form-field-bg: #1c1e2e;
    --form-field-border: #2e3047;
    --form-field-text: #d8dae0;
    --form-field-muted-text: #8688a0;
    --form-field-muted-bg: #252738;
    --form-field-disabled-bg: #252738;
  }
}
/* ──────────────────────────────────────────────
   Toggle Switch
   ────────────────────────────────────────────── */
.battersea-toggle {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  gap: 10px;
  user-select: none;
  -webkit-user-select: none;
}
.battersea-toggle__input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.battersea-toggle__track {
  position: relative;
  width: var(--form-toggle-width);
  height: var(--form-toggle-height);
  background: var(--form-toggle-bg);
  border-radius: calc(var(--form-toggle-height) / 2);
  transition: background 0.2s ease;
  flex-shrink: 0;
}
.battersea-toggle__thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: calc(var(--form-toggle-height) - 4px);
  height: calc(var(--form-toggle-height) - 4px);
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}
.battersea-toggle--checked .battersea-toggle__track {
  background: var(--form-toggle-active);
}
.battersea-toggle--checked .battersea-toggle__thumb {
  transform: translateX(calc(var(--form-toggle-width) - var(--form-toggle-height)));
}
.battersea-toggle__label {
  font-size: 0.9rem;
  color: var(--form-field-muted-text, #555);
}
/* Focus ring on the track when checkbox is focused */
.battersea-toggle__input:focus-visible ~ .battersea-toggle__track {
  outline: 2px solid #667eea;
  outline-offset: 2px;
}
/* ──────────────────────────────────────────────
   Range Slider
   ────────────────────────────────────────────── */
.battersea-slider-input {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
}
.battersea-slider-input__track {
  position: relative;
  flex: 1;
  height: var(--form-slider-track-height);
  background: var(--form-slider-track-bg);
  border-radius: calc(var(--form-slider-track-height) / 2);
  cursor: pointer;
}
.battersea-slider-input__track:focus-visible {
  outline: 2px solid #667eea;
  outline-offset: 4px;
}
.battersea-slider-input__fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: var(--form-slider-fill-bg);
  border-radius: calc(var(--form-slider-track-height) / 2);
  pointer-events: none;
}
.battersea-slider-input__handle {
  position: absolute;
  top: 50%;
  width: var(--form-slider-handle-size);
  height: var(--form-slider-handle-size);
  background: var(--form-slider-handle-bg);
  border: 2px solid var(--form-slider-handle-border);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
  transition: box-shadow 0.2s ease;
}
.battersea-slider-input--dragging .battersea-slider-input__handle {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  transform: translate(-50%, -50%) scale(1.15);
}
.battersea-slider-input__value {
  min-width: 36px;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--form-field-text, #333);
}
/* ──────────────────────────────────────────────
   Date Picker
   ────────────────────────────────────────────── */
.battersea-datepicker {
  position: relative;
  display: inline-block;
}
.battersea-datepicker__input {
  cursor: pointer;
  padding-right: 36px !important;
}
.battersea-datepicker__icon {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.1rem;
  cursor: pointer;
  pointer-events: auto;
  line-height: 1;
}
.battersea-datepicker__dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 50;
  background: var(--form-datepicker-bg);
  border: 1px solid var(--form-datepicker-border);
  border-radius: var(--form-datepicker-radius);
  box-shadow: var(--form-datepicker-shadow);
  padding: 12px;
  min-width: 280px;
  display: none;
}
.battersea-datepicker--open .battersea-datepicker__dropdown {
  display: block;
}
.battersea-fe--flip .battersea-datepicker__dropdown,
.battersea-fe--flip .battersea-timepicker__dropdown,
.battersea-fe--flip .battersea-colourswatch__dropdown {
  top: auto;
  bottom: calc(100% + 4px);
}
.battersea-datepicker__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.battersea-datepicker__prev,
.battersea-datepicker__next {
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  color: var(--form-field-muted-text, #555);
  line-height: 1;
}
.battersea-datepicker__prev:hover,
.battersea-datepicker__next:hover {
  background: var(--form-field-muted-bg, #f0f0f0);
}
.battersea-datepicker__month-year {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--form-field-text, #333);
}
.battersea-datepicker__weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  margin-bottom: 4px;
}
.battersea-datepicker__weekdays span {
  font-size: 0.75rem;
  font-weight: 600;
  color: #999;
  padding: 4px 0;
}
.battersea-datepicker__days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
.battersea-datepicker__day {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 1;
  border: none;
  background: none;
  cursor: pointer;
  border-radius: 50%;
  font-size: 0.85rem;
  color: var(--form-field-text, #333);
  transition: background 0.15s ease;
}
.battersea-datepicker__day:hover {
  background: var(--form-field-muted-bg, #f0f0f0);
}
.battersea-datepicker__day--today {
  font-weight: 700;
  color: var(--form-datepicker-today);
}
.battersea-datepicker__day--selected {
  background: var(--form-datepicker-selected) !important;
  color: #fff !important;
  font-weight: 600;
}
.battersea-datepicker__day--outside {
  opacity: 0.35;
}
.battersea-datepicker__day--disabled {
  opacity: 0.2;
  cursor: default;
}
.battersea-datepicker__day--disabled:hover {
  background: none;
}
/* Native mode */
.battersea-datepicker--native {
  display: inline-block;
}
.battersea-datepicker--native input[type="date"] {
  font-family: inherit;
  font-size: 0.95rem;
}
/* ──────────────────────────────────────────────
   Time Picker
   ────────────────────────────────────────────── */
.battersea-timepicker {
  position: relative;
  display: inline-block;
}
.battersea-timepicker__input {
  cursor: pointer;
  padding-right: 36px !important;
}
.battersea-timepicker__icon {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.1rem;
  cursor: pointer;
  pointer-events: auto;
  line-height: 1;
}
.battersea-timepicker__dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 50;
  background: var(--form-timepicker-bg);
  border: 1px solid var(--form-timepicker-border);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  display: none;
  padding: 8px;
}
.battersea-timepicker--open .battersea-timepicker__dropdown {
  display: block;
}
.battersea-timepicker__columns {
  display: flex;
  align-items: stretch;
}
.battersea-timepicker__col {
  height: var(--form-timepicker-col-height);
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  padding: 4px;
  min-width: 52px;
  /* Custom scrollbar */
}
.battersea-timepicker__col::-webkit-scrollbar {
  width: 4px;
}
.battersea-timepicker__col::-webkit-scrollbar-track {
  background: transparent;
}
.battersea-timepicker__col::-webkit-scrollbar-thumb {
  background: #ddd;
  border-radius: 2px;
}
.battersea-timepicker__separator {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 600;
  color: #999;
  padding: 0 2px;
}
.battersea-timepicker__option {
  display: block;
  width: 100%;
  padding: 6px 12px;
  text-align: center;
  border: none;
  background: none;
  cursor: pointer;
  border-radius: 4px;
  font-size: 0.9rem;
  color: var(--form-field-text, #333);
  scroll-snap-align: center;
  transition: background 0.15s ease;
  white-space: nowrap;
}
.battersea-timepicker__option:hover {
  background: var(--form-field-muted-bg, #f0f0f0);
}
.battersea-timepicker__option--selected {
  background: var(--form-timepicker-selected) !important;
  color: #fff !important;
  font-weight: 500;
}
.battersea-timepicker__option--disabled {
  opacity: 0.3;
  cursor: default;
}
.battersea-timepicker__period {
  border-left: 1px solid #eee;
  margin-left: 4px;
  padding-left: 4px;
  height: auto;
  overflow: visible;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}
/* ──────────────────────────────────────────────
   Colour Swatch
   ────────────────────────────────────────────── */
.battersea-colourswatch {
  position: relative;
  display: inline-block;
}
.battersea-colourswatch__preview {
  width: 50px;
  height: 20px;
  border-radius: 3rem;
  border: 2px solid #ddd;
  cursor: pointer;
  transition: border-color 0.2s ease;
  padding: 0;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.05);
}
.battersea-colourswatch__preview:hover {
  border-color: #999;
}
.battersea-colourswatch__preview:focus-visible {
  outline: 2px solid #667eea;
  outline-offset: 2px;
}
.battersea-colourswatch__dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 50;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  padding: 12px;
  display: none;
  min-width: 200px;
}
.battersea-colourswatch--open .battersea-colourswatch__dropdown {
  display: block;
}
.battersea-colourswatch__grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--form-swatch-gap);
}
.battersea-colourswatch__swatch {
  width: var(--form-swatch-size);
  height: var(--form-swatch-size);
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  position: relative;
  padding: 0;
  transition: border-color 0.15s ease, transform 0.15s ease;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1);
}
.battersea-colourswatch__swatch:hover {
  transform: scale(1.1);
}
.battersea-colourswatch__swatch:focus-visible {
  outline: 2px solid #667eea;
  outline-offset: 2px;
}
.battersea-colourswatch__swatch--selected {
  border-color: var(--form-swatch-selected-border);
}
.battersea-colourswatch__check {
  display: none;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  pointer-events: none;
}
.battersea-colourswatch__swatch--selected .battersea-colourswatch__check {
  display: block;
}
.battersea-colourswatch__custom-btn {
  width: var(--form-swatch-size);
  height: var(--form-swatch-size);
  border-radius: 50%;
  border: 2px dashed #ccc;
  background: none;
  cursor: pointer;
  font-size: 1.1rem;
  color: #999;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.battersea-colourswatch__custom-btn:hover {
  border-color: #999;
  color: #666;
}
/* ──────────────────────────────────────────────
   Colour Picker (full picker panel)
   ────────────────────────────────────────────── */
.battersea-colourswatch__picker {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #eee;
}
.battersea-colourswatch__satval {
  width: 100%;
  height: var(--form-picker-height);
  position: relative;
  cursor: crosshair;
  border-radius: 4px;
  margin-bottom: 10px;
  background-image: linear-gradient(to right, #fff, transparent), linear-gradient(to top, #000, transparent);
  background-size: 100% 100%;
}
.battersea-colourswatch__pointer {
  position: absolute;
  width: 14px;
  height: 14px;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.3), 0 1px 3px rgba(0, 0, 0, 0.3);
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.battersea-colourswatch__hue {
  width: 100%;
  height: 14px;
  background: linear-gradient(to right, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00);
  border-radius: 7px;
  cursor: pointer;
  position: relative;
  margin-bottom: 10px;
}
.battersea-colourswatch__hue-handle {
  position: absolute;
  top: 50%;
  width: 14px;
  height: 14px;
  background: #fff;
  border: 2px solid #ccc;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  pointer-events: none;
}
.battersea-colourswatch__hex {
  width: 90px;
  padding: 6px 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-family: monospace;
  font-size: 0.85rem;
  text-align: center;
}
.battersea-colourswatch__hex:focus {
  outline: none;
  border-color: #667eea;
}
/**
 * Battersea Library - FormValidation Styles
 * Version: 2.22.0
 */
:root {
  --form-error-color: #e74c3c;
  --form-success-color: #27ae60;
  --form-warning-color: #f39c12;
  --form-border-color: #ddd;
  --form-border-radius: 4px;
  --form-accent-color: #667eea;
  --form-strength-weak: #e74c3c;
  --form-strength-medium: #f39c12;
  --form-strength-strong: #27ae60;
  --form-file-border: #ddd;
  --form-file-bg: #fafafa;
  --form-file-dragover-bg: #f0f4ff;
  --form-file-dragover-border: #667eea;
  --form-file-icon-color: #999;
  --form-file-text-color: #666;
  --form-file-browse-color: #667eea;
  --form-validation-input-disabled-bg: #e9ecef;
  --form-validation-text: #333;
}
[data-theme="dark"] {
  --form-border-color: #2e3047;
  --form-file-border: #2e3047;
  --form-file-bg: #252738;
  --form-file-dragover-bg: rgba(77, 179, 255, 0.12);
  --form-file-icon-color: #8688a0;
  --form-file-text-color: #8688a0;
  --form-validation-input-disabled-bg: #252738;
  --form-validation-text: #d8dae0;
}
@media (prefers-color-scheme: dark) {
  [data-theme="auto"] {
    --form-border-color: #2e3047;
    --form-file-border: #2e3047;
    --form-file-bg: #252738;
    --form-file-dragover-bg: rgba(77, 179, 255, 0.12);
    --form-file-icon-color: #8688a0;
    --form-file-text-color: #8688a0;
    --form-validation-input-disabled-bg: #252738;
    --form-validation-text: #d8dae0;
  }
}
.battersea-form-field--error {
  border-color: var(--form-error-color, #e74c3c) !important;
  box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.15);
}
.battersea-form-field--error:focus {
  border-color: var(--form-error-color, #e74c3c) !important;
  box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.2);
}
.battersea-form-field--valid {
  border-color: var(--form-success-color, #27ae60) !important;
  box-shadow: 0 0 0 2px rgba(39, 174, 96, 0.15);
}
.battersea-form-field--valid:focus {
  border-color: var(--form-success-color, #27ae60) !important;
  box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.2);
}
.battersea-form-error {
  display: block;
  color: var(--form-error-color, #e74c3c);
  font-size: 0.85rem;
  margin-top: 4px;
  padding: 0;
  animation: batterseaFormErrorIn 0.25s ease;
}
@keyframes batterseaFormErrorIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.battersea-form-message {
  padding: 0.85rem 1rem;
  border-radius: var(--form-border-radius, 4px);
  margin-bottom: 1.25rem;
  font-size: 0.95rem;
  animation: batterseaFormErrorIn 0.3s ease;
}
.battersea-form-message--success {
  background: rgba(39, 174, 96, 0.1);
  color: #1e8449;
  border: 1px solid rgba(39, 174, 96, 0.25);
}
.battersea-form-message--error {
  background: rgba(231, 76, 60, 0.1);
  color: #c0392b;
  border: 1px solid rgba(231, 76, 60, 0.25);
}
.battersea-form-password-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}
.battersea-form-password-wrapper input {
  flex: 1;
  padding-right: 44px;
}
.battersea-form-password-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: #999;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  transition: color 0.2s ease;
}
.battersea-form-password-toggle:hover {
  color: #555;
}
.battersea-form-password-toggle .battersea-form-eye-closed {
  display: none;
}
.battersea-form-password-toggle--visible {
  color: var(--form-accent-color, #667eea);
}
.battersea-form-password-toggle--visible .battersea-form-eye-open {
  display: none;
}
.battersea-form-password-toggle--visible .battersea-form-eye-closed {
  display: block;
}
.battersea-form-password-toggle--visible:hover {
  color: var(--form-accent-color, #667eea);
  opacity: 0.8;
}
.battersea-form-strength {
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.battersea-form-strength__bar {
  flex: 1;
  height: 4px;
  background: var(--form-validation-input-disabled-bg, #e9ecef);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
  width: 0%;
  max-width: 100%;
  transition: width 0.3s ease, background-color 0.3s ease;
}
.battersea-form-strength__label {
  font-size: 0.8rem;
  font-weight: 500;
  white-space: nowrap;
  min-width: 80px;
}
.battersea-form-strength--weak .battersea-form-strength__bar {
  background: var(--form-strength-weak, #e74c3c);
}
.battersea-form-strength--weak .battersea-form-strength__label {
  color: var(--form-strength-weak, #e74c3c);
}
.battersea-form-strength--medium .battersea-form-strength__bar {
  background: var(--form-strength-medium, #f39c12);
}
.battersea-form-strength--medium .battersea-form-strength__label {
  color: var(--form-strength-medium, #f39c12);
}
.battersea-form-strength--strong .battersea-form-strength__bar {
  background: var(--form-strength-strong, #27ae60);
}
.battersea-form-strength--strong .battersea-form-strength__label {
  color: var(--form-strength-strong, #27ae60);
}
.battersea-form-file-wrapper {
  position: relative;
}
.battersea-form-file-wrapper input[type="file"] {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
}
.battersea-form-file-dropzone {
  border: 2px dashed var(--form-file-border, #ddd);
  border-radius: var(--form-border-radius, 4px);
  background: var(--form-file-bg, #fafafa);
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.battersea-form-file-dropzone:hover {
  border-color: var(--form-file-dragover-border, #667eea);
}
.battersea-form-file-dropzone:focus-visible {
  outline: 2px solid var(--form-file-dragover-border, #667eea);
  outline-offset: 2px;
}
.battersea-form-file-dropzone--dragover {
  border-color: var(--form-file-dragover-border, #667eea);
  background: var(--form-file-dragover-bg, #f0f4ff);
}
.battersea-form-file-dropzone.battersea-form-field--error {
  border-color: var(--form-error-color, #e74c3c) !important;
  background: rgba(231, 76, 60, 0.03);
}
.battersea-form-file-dropzone.battersea-form-field--valid {
  border-color: var(--form-success-color, #27ae60) !important;
}
.battersea-form-file-icon {
  display: block;
  margin: 0 auto 0.75rem;
  color: var(--form-file-icon-color, #999);
  transition: color 0.2s ease;
}
.battersea-form-file-dropzone--dragover .battersea-form-file-icon {
  color: var(--form-file-dragover-border, #667eea);
}
.battersea-form-file-text {
  color: var(--form-file-text-color, #666);
  font-size: 0.95rem;
  margin: 0;
}
.battersea-form-file-browse {
  background: none;
  border: none;
  color: var(--form-file-browse-color, #667eea);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.battersea-form-file-browse:hover {
  opacity: 0.8;
}
.battersea-form-file-browse:focus-visible {
  outline: 2px solid var(--form-file-browse-color, #667eea);
  outline-offset: 2px;
  border-radius: 2px;
}
.battersea-form-file-list {
  margin-top: 1rem;
  text-align: left;
}
.battersea-form-file-item {
  display: flex;
  align-items: center;
  padding: 0.4rem 0;
  font-size: 0.9rem;
  color: var(--form-validation-text, #333);
  border-bottom: 1px solid var(--form-border-color, #eee);
}
.battersea-form-file-item:last-child {
  border-bottom: none;
}
.battersea-form-file-dropzone--has-files .battersea-form-file-icon,
.battersea-form-file-dropzone--has-files .battersea-form-file-text {
  display: none;
}
.battersea-form-btn--loading {
  opacity: 0.7;
  cursor: wait;
  pointer-events: none;
}
/**
 * Battersea Library - Pagination Styles
 * Version: 1.0.0
 */
:root {
  --pagination-border-color: #ddd;
  --pagination-accent-color: #667eea;
  --pagination-text-color: #444;
  --pagination-info-color: #666;
  --pagination-btn-bg: #fff;
  --pagination-btn-hover-bg: #f5f5f5;
  --pagination-input-bg: #fff;
  --pagination-disabled-opacity: 0.4;
}
[data-theme="dark"] {
  --pagination-border-color: #2e3047;
  --pagination-text-color: #d8dae0;
  --pagination-info-color: #8688a0;
  --pagination-btn-bg: #1c1e2e;
  --pagination-btn-hover-bg: #252738;
  --pagination-input-bg: #1c1e2e;
}
@media (prefers-color-scheme: dark) {
  [data-theme="auto"] {
    --pagination-border-color: #2e3047;
    --pagination-text-color: #d8dae0;
    --pagination-info-color: #8688a0;
    --pagination-btn-bg: #1c1e2e;
    --pagination-btn-hover-bg: #252738;
    --pagination-input-bg: #1c1e2e;
  }
}
.battersea-pagination {
  font-size: 0.95rem;
  color: var(--pagination-text-color);
  margin-top: 1.25rem;
}
.battersea-pagination__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.battersea-pagination__row--secondary {
  margin-top: 0.75rem;
}
.battersea-pagination__info {
  font-size: 0.85rem;
  color: var(--pagination-info-color);
}
.battersea-pagination__controls {
  display: flex;
  align-items: center;
  gap: 2px;
}
.battersea-pagination__btn {
  padding: 0.4rem 0.65rem;
  border: 1px solid var(--pagination-border-color);
  background: var(--pagination-btn-bg);
  cursor: pointer;
  font-size: 0.85rem;
  font-family: inherit;
  min-width: 32px;
  text-align: center;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  border-radius: 3px;
  line-height: 1.4;
}
.battersea-pagination__btn:hover:not(:disabled) {
  background: var(--pagination-btn-hover-bg);
  border-color: #ccc;
}
.battersea-pagination__btn:focus {
  outline: 2px solid var(--pagination-accent-color);
  outline-offset: 1px;
}
.battersea-pagination__btn:disabled {
  opacity: var(--pagination-disabled-opacity);
  cursor: not-allowed;
}
.battersea-pagination__btn--active {
  background: var(--pagination-accent-color);
  color: #fff;
  border-color: var(--pagination-accent-color);
  font-weight: 600;
}
.battersea-pagination__btn--active:hover:not(:disabled) {
  background: var(--pagination-accent-color);
  border-color: var(--pagination-accent-color);
}
.battersea-pagination__btn--first,
.battersea-pagination__btn--last {
  font-size: 1rem;
}
.battersea-pagination__btn--prev,
.battersea-pagination__btn--next {
  font-size: 1.1rem;
}
.battersea-pagination__ellipsis {
  padding: 0.4rem 0.5rem;
  font-size: 0.85rem;
  color: #999;
}
.battersea-pagination__input-group {
  display: inline-flex;
  align-items: center;
  margin-left: 0.5rem;
}
.battersea-pagination__input {
  width: 6.5rem;
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--pagination-border-color);
  border-radius: 3px;
  font-size: 0.85rem;
  font-family: inherit;
  background: var(--pagination-input-bg, #fff);
  color: var(--pagination-text-color);
  transition: border-color 0.2s;
  -moz-appearance: textfield;
}
.battersea-pagination__input::placeholder {
  color: #aaa;
  font-size: 0.8rem;
}
.battersea-pagination__input::-webkit-outer-spin-button,
.battersea-pagination__input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.battersea-pagination__input:focus {
  outline: none;
  border-color: var(--pagination-accent-color);
}
.battersea-pagination__sizes {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.battersea-pagination__sizes-label {
  font-size: 0.85rem;
  color: var(--pagination-info-color);
}
.battersea-pagination__sizes-select {
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--pagination-border-color);
  border-radius: 3px;
  font-size: 0.85rem;
  font-family: inherit;
  background: var(--pagination-input-bg, #fff);
  color: var(--pagination-text-color);
  cursor: pointer;
  transition: border-color 0.2s;
}
.battersea-pagination__sizes-select:focus {
  outline: none;
  border-color: var(--pagination-accent-color);
}
@media (max-width: 767px) {
  .battersea-pagination__row {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .battersea-pagination__controls {
    flex-wrap: wrap;
    justify-content: center;
  }
  .battersea-pagination__row--secondary {
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
  }
}
/**
 * Battersea Library - Breadcrumbs
 * Version: 1.0.0
 */
.battersea-breadcrumb {
  font-size: var(--battersea-breadcrumb-font-size, 0.875rem);
  padding: var(--battersea-breadcrumb-padding, 0.75rem 0);
}
.battersea-breadcrumb__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--battersea-breadcrumb-spacing, 0.5rem);
}
.battersea-breadcrumb__item {
  display: flex;
  align-items: center;
  gap: var(--battersea-breadcrumb-spacing, 0.5rem);
}
.battersea-breadcrumb__item + .battersea-breadcrumb__item::before {
  content: var(--battersea-breadcrumb-sep, "|");
  color: var(--battersea-breadcrumb-separator-color, #999);
  font-size: 0.8em;
}
.battersea-breadcrumb__link {
  color: var(--battersea-breadcrumb-link, #667eea);
  text-decoration: none;
  transition: color 0.2s ease;
}
.battersea-breadcrumb__link:hover {
  color: var(--battersea-breadcrumb-link-hover, #4c5fd5);
  text-decoration: underline;
}
.battersea-breadcrumb__link:focus-visible {
  outline: 2px solid var(--battersea-breadcrumb-link, #667eea);
  outline-offset: 2px;
  border-radius: 2px;
}
.battersea-breadcrumb__current {
  color: var(--battersea-breadcrumb-text, #666);
}
/**
 * Battersea Library - Flipbox Styles Version: 2.0.4
*/
[data-flipbox] {
  perspective: 1000px;
  cursor: pointer;
  width: 100%;
  min-height: 200px;
}
[data-flipbox] [data-flipbox-front],
[data-flipbox] [data-flipbox-back] {
  width: 100%;
  height: 100%;
  min-height: 200px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transition: transform 0.6s;
  transform-style: preserve-3d;
}
[data-flipbox] [data-flipbox-front] {
  position: relative;
  z-index: 2;
  transform: rotateY(0deg) rotateX(0deg);
}
[data-flipbox] [data-flipbox-back] {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
}
[data-flipbox].battersea-flipbox-horizontal [data-flipbox-back] {
  transform: rotateY(180deg);
}
[data-flipbox].battersea-flipbox-horizontal.battersea-flipbox-flipped [data-flipbox-front] {
  transform: rotateY(180deg);
}
[data-flipbox].battersea-flipbox-horizontal.battersea-flipbox-flipped [data-flipbox-back] {
  transform: rotateY(0deg);
}
[data-flipbox].battersea-flipbox-vertical [data-flipbox-back] {
  transform: rotateX(180deg);
}
[data-flipbox].battersea-flipbox-vertical.battersea-flipbox-flipped [data-flipbox-front] {
  transform: rotateX(180deg);
}
[data-flipbox].battersea-flipbox-vertical.battersea-flipbox-flipped [data-flipbox-back] {
  transform: rotateX(0deg);
}
/**
 * Battersea Library - Training Donut Styles
 * Version: 1.0.0
 * SVG donut chart for per-module training status
 */
[data-training-donut] {
  position: relative;
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
}
.battersea-donut-wrapper {
  position: relative;
  width: 100%;
}
.battersea-donut-svg {
  display: block;
  width: 100%;
  height: auto;
}
.battersea-donut-segment {
  cursor: pointer;
  transition: opacity 0.2s ease;
}
.battersea-donut-segment:hover {
  opacity: 0.75;
  filter: drop-shadow(0 0 4px rgba(0, 0, 0, 0.25));
}
.battersea-donut-percent {
  font-size: 2rem;
  font-weight: var(--f-bold, 700);
  fill: var(--text-colour, #333);
}
.dark .battersea-donut-percent {
  fill: var(--white, #fff);
}
.battersea-donut-label {
  font-size: 0.7rem;
  font-weight: var(--f-normal, 400);
  fill: var(--text-light, #888);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.dark .battersea-donut-label {
  fill: var(--grey, #aaa);
}
.battersea-donut-tooltip {
  position: absolute;
  z-index: 100;
  background: var(--battersea-tooltip-bg, rgba(0, 0, 0, 0.9));
  color: var(--battersea-tooltip-text, #fff);
  padding: 8px 14px;
  border-radius: var(--battersea-tooltip-radius, 4px);
  font-size: 0.825rem;
  line-height: 1.4;
  pointer-events: none;
  transform: translate(-50%, -100%);
  white-space: nowrap;
}
.battersea-donut-tooltip .battersea-donut-tooltip-name {
  display: block;
  font-weight: var(--f-semi-bold, 600);
  margin-bottom: 2px;
}
.battersea-donut-tooltip .battersea-donut-tooltip-status {
  display: inline-block;
  font-size: 0.75rem;
}
.battersea-donut-tooltip .battersea-donut-tooltip-status.status-pass {
  color: var(--colour-success, #009445);
}
.battersea-donut-tooltip .battersea-donut-tooltip-status.status-fail {
  color: var(--colour-danger, #901e25);
}
.battersea-donut-tooltip .battersea-donut-tooltip-status.status-incomplete {
  color: var(--colour-warning, #ef592a);
}
.battersea-donut-tooltip .battersea-donut-tooltip-status.status-noassessment {
  color: var(--no-test, #aaaaaa);
}
.battersea-donut-tooltip .battersea-donut-tooltip-percent {
  display: inline-block;
  margin-left: 6px;
  font-size: 0.75rem;
  opacity: 0.8;
}
.battersea-donut-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 24px;
  margin-top: 16px;
  padding: 0 8px;
}
.battersea-donut-legend-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--text-colour, #555);
}
.dark .battersea-donut-legend-item {
  color: var(--grey, #aaa);
}
.battersea-donut-legend-pill {
  display: block;
  width: 32px;
  height: 8px;
  border-radius: 4px;
}
.battersea-donut-legend-label {
  white-space: nowrap;
  font-size: 1rem;
}
.battersea-donut-tooltip-detail {
  display: block;
  font-size: 0.7rem;
  opacity: 0.65;
  margin-top: 2px;
}
.battersea-donut-breadcrumb {
  margin-bottom: 8px;
}
.battersea-donut-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  padding: 4px 8px;
  cursor: pointer;
  font-size: 0.825rem;
  color: var(--hyperlink, var(--battersea-primary, #5a7fa0));
  transition: opacity 0.2s ease;
}
.battersea-donut-back-btn:hover {
  opacity: 0.7;
}
.battersea-donut-back-btn svg {
  flex-shrink: 0;
}
.battersea-donut-summary {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-top: 12px;
  padding: 8px 0;
}
.battersea-donut-summary-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.battersea-donut-summary-value {
  font-size: 1.3rem;
  font-weight: var(--f-semi-bold, 600);
  color: var(--text-colour, #333);
}
.dark .battersea-donut-summary-value {
  color: var(--white, #fff);
}
.battersea-donut-summary-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-light, #888);
}
.dark .battersea-donut-summary-label {
  color: var(--grey, #aaa);
}
.battersea-donut-loading {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-light, #888);
  font-size: 0.9rem;
}
.dark .battersea-donut-loading {
  color: var(--grey, #aaa);
}
.battersea-donut-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-light, #888);
  font-size: 0.9rem;
}
.dark .battersea-donut-empty {
  color: var(--grey, #aaa);
}
.battersea-donut-flip-trigger {
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.2s ease;
  width: 20px;
  height: 20px;
}
.battersea-donut-flip-trigger:hover {
  opacity: 1;
}
#donutFlipbox {
  perspective: 1000px;
  position: relative;
}
#donutFlipbox [data-flipbox-front],
#donutFlipbox [data-flipbox-back] {
  backface-visibility: hidden;
  transition: transform 0.6s;
  transform-style: preserve-3d;
}
#donutFlipbox [data-flipbox-front] {
  position: relative;
  z-index: 2;
  transform: rotateY(0deg);
}
#donutFlipbox [data-flipbox-back] {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1;
  transform: rotateY(180deg);
}
#donutFlipbox.battersea-flipbox-flipped [data-flipbox-front] {
  transform: rotateY(180deg);
}
#donutFlipbox.battersea-flipbox-flipped [data-flipbox-back] {
  transform: rotateY(0deg);
}
.bt-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 60px 20px;
  color: var(--admin-text-muted, #7f8c9b);
  font-size: 1.1em;
}
.bt-spinner {
  width: 24px;
  height: 24px;
  border: 3px solid var(--admin-border, #dae2ea);
  border-top-color: var(--primary1, var(--battersea-primary, #3a7bd5));
  border-radius: 50%;
  animation: bt-spin 0.8s linear infinite;
}
@keyframes bt-spin {
  to {
    transform: rotate(360deg);
  }
}
.bt-panel {
  background: var(--admin-surface, #fff);
  color: var(--admin-text, var(--battersea-heading, #2c3e50));
  border: 1px solid var(--admin-border, #dae2ea);
  border-radius: 6px;
  box-shadow: var(--admin-shadow, 0 2px 8px rgba(0, 0, 0, 0.08));
  overflow: hidden;
}
.bt-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--admin-surface-alt, #f8faff);
  border-bottom: 1px solid var(--admin-border, #dae2ea);
}
.bt-test-name {
  margin: 0;
  font-size: 1.2em;
  font-weight: 600;
  color: var(--admin-text-heading, var(--battersea-heading, #2c3e50));
}
.bt-timer {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: 6px;
  background: var(--admin-surface, #fff);
  border: 1px solid var(--admin-border, #dae2ea);
  font-size: 0.95em;
  font-variant-numeric: tabular-nums;
}
.bt-timer-warning {
  background: var(--battersea-danger, #e74c3c);
  border-color: var(--battersea-danger, #e74c3c);
  color: #fff;
}
.bt-timer-warning .bt-timer-label,
.bt-timer-warning .bt-timer-value {
  color: #fff;
}
.bt-progress {
  position: relative;
  height: 28px;
  background: var(--admin-surface-alt, #f8faff);
  border-bottom: 1px solid var(--admin-border, #dae2ea);
}
.bt-progress-bar {
  height: 100%;
  background: var(--primary1, var(--battersea-primary, #3a7bd5));
  opacity: 0.15;
  transition: width 0.3s ease;
}
.bt-progress-text {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  line-height: 28px;
  text-align: center;
  font-size: 0.8em;
  font-weight: 600;
  color: var(--admin-text-muted, #7f8c9b);
}
.bt-scene {
  padding: 16px 20px;
  background: var(--admin-surface-alt, #f8faff);
  border-bottom: 1px solid var(--admin-border, #dae2ea);
  font-size: 1.05em;
  font-weight: 500;
}
.bt-body {
  padding: 20px;
}
.bt-question-text {
  font-size: 1.15em;
  font-weight: 500;
  margin-bottom: 20px;
  color: var(--admin-text-heading, var(--battersea-heading, #2c3e50));
  line-height: 1.5;
}
.bt-instruction {
  font-size: 0.9em;
  color: var(--admin-text-muted, #7f8c9b);
  margin-bottom: 12px;
  font-style: italic;
}
.bt-answers {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.bt-answer-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border: 2px solid var(--admin-border, #dae2ea);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  background: var(--admin-surface, #fff);
}
.bt-answer-card:hover {
  border-color: var(--primary1, var(--battersea-primary, #3a7bd5));
  background: var(--admin-surface-muted, #f0f4ff);
}
.bt-answer-card.bt-selected {
  border-color: var(--primary1, var(--battersea-primary, #3a7bd5));
  background: color-mix(in srgb, var(--primary1, var(--battersea-primary, #3a7bd5)) 8%, transparent);
}
.bt-radio,
.bt-checkbox {
  margin-top: 3px;
  flex-shrink: 0;
  accent-color: var(--primary1, var(--battersea-primary, #3a7bd5));
}
.bt-answer-label {
  flex: 1;
  font-size: 1em;
  line-height: 1.5;
  cursor: pointer;
}
.bt-drag-item {
  padding: 10px 14px;
  border: 1px solid var(--admin-border, #dae2ea);
  border-radius: 6px;
  background: var(--admin-surface, #fff);
  color: var(--admin-text, var(--battersea-heading, #2c3e50));
  cursor: grab;
  transition: all 0.15s ease;
  user-select: none;
  touch-action: none;
}
.bt-drag-item:hover {
  border-color: var(--primary1, var(--battersea-primary, #3a7bd5));
  background: var(--admin-surface-muted, #f0f4ff);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}
.bt-drag-item.bt-dragging {
  opacity: 0.4;
}
.bt-drag-ghost {
  opacity: 0.85;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  transform: rotate(2deg);
}
.bt-drag-placeholder {
  height: 44px;
  margin: 4px 0;
  border: 2px dashed var(--primary1, var(--battersea-primary, #3a7bd5));
  border-radius: 6px;
  background: color-mix(in srgb, var(--primary1, var(--battersea-primary, #3a7bd5)) 5%, transparent);
}
.bt-drop-zone {
  min-height: 48px;
  transition: background 0.15s ease;
}
.bt-drop-zone.bt-drop-hover {
  background: color-mix(in srgb, var(--primary1, var(--battersea-primary, #3a7bd5)) 8%, transparent);
}
.bt-drag-handle {
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-right: 4px;
  vertical-align: middle;
  background-color: var(--admin-text-muted, #7f8c9b);
  -webkit-mask-image: url('/Content/images/Icons/icon-grip-white.svg');
  mask-image: url('/Content/images/Icons/icon-grip-white.svg');
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  opacity: 0.5;
}
.bt-order-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--admin-border, #dae2ea);
  border-radius: 6px;
  background: var(--admin-surface-alt, #f8faff);
}
.bt-order-item {
  display: flex;
  align-items: center;
  gap: 10px;
}
.bt-order-number {
  font-weight: 700;
  color: var(--admin-text-muted, #7f8c9b);
  min-width: 24px;
  text-align: right;
}
.bt-order-text {
  flex: 1;
}
.bt-match-area {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.bt-match-prompts {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.bt-match-slot {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.bt-match-prompt-text {
  font-weight: 600;
  padding: 8px 12px;
  background: var(--admin-surface-alt, #f8faff);
  border-radius: 6px;
  border: 1px solid var(--admin-border, #dae2ea);
}
.bt-match-drop {
  min-height: 48px;
  padding: 6px;
  border: 2px dashed var(--admin-border, #dae2ea);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.bt-match-placeholder {
  color: var(--admin-text-muted, #7f8c9b);
  font-size: 0.85em;
  font-style: italic;
}
.bt-match-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.bt-match-targets {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.bt-match-target-label {
  font-weight: 600;
  padding: 8px 12px;
  color: var(--admin-text, var(--battersea-heading, #2c3e50));
}
.bt-drag-item + .bt-match-target-label {
  font-size: 0.85em;
  font-weight: 400;
  color: var(--admin-text-muted, #7f8c9b);
  padding: 4px 12px;
}
.bt-match-item {
  display: flex;
  align-items: center;
  gap: 6px;
}
.bt-match-pool {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.bt-match-pool-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--admin-border, #dae2ea);
  border-radius: 6px;
  background: var(--admin-surface-alt, #f8faff);
}
.bt-match-response {
  background: var(--admin-surface, #fff);
}
.bt-pool-title {
  margin: 0 0 4px;
  font-size: 0.85em;
  font-weight: 600;
  color: var(--admin-text-muted, #7f8c9b);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.bt-match-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.bt-match-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--admin-border, #dae2ea);
  border-radius: 6px;
  background: var(--admin-surface-alt, #f8faff);
}
.bt-match-prompt {
  font-weight: 600;
}
.bt-match-select,
.bt-group-select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--admin-border, #dae2ea);
  border-radius: 4px;
  font-size: 0.95em;
  background: var(--admin-surface, #fff);
  color: var(--admin-text, var(--battersea-heading, #2c3e50));
}
.bt-group-area {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.bt-group-categories {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}
.bt-group-category {
  border: 1px solid var(--admin-border, #dae2ea);
  border-radius: 6px;
  overflow: hidden;
}
.bt-group-category-title {
  margin: 0;
  padding: 10px 14px;
  font-size: 0.95em;
  font-weight: 700;
  background: var(--admin-surface-alt, #f8faff);
  border-bottom: 1px solid var(--admin-border, #dae2ea);
  color: var(--admin-text, var(--battersea-heading, #2c3e50));
}
.bt-group-drop {
  min-height: 60px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.bt-group-pool {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.bt-group-pool-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--admin-border, #dae2ea);
  border-radius: 6px;
  background: var(--admin-surface-alt, #f8faff);
}
.bt-group-item {
  background: var(--admin-surface, #fff);
}
.bt-group-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.bt-group-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--admin-border, #dae2ea);
  border-radius: 6px;
  background: var(--admin-surface-alt, #f8faff);
}
.bt-group-item-text {
  font-weight: 500;
}
.bt-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--admin-border, #dae2ea);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.bt-btn {
  display: inline-flex;
  align-items: center;
  padding: 10px 24px;
  border: none;
  border-radius: 6px;
  font-size: 1em;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
  color: #fff;
  background: var(--primary1, var(--battersea-primary, #3a7bd5));
}
.bt-btn:hover {
  opacity: 0.9;
}
.bt-btn[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
}
.bt-btn-submit {
  background: var(--battersea-success, #27ae60);
}
.bt-btn-repeat {
  background: var(--battersea-warning, #f39c12);
}
.bt-btn-toc {
  background: var(--admin-surface-alt, #f8faff);
  color: var(--admin-text, var(--battersea-heading, #2c3e50));
  border: 1px solid var(--admin-border, #dae2ea);
}
.bt-btn-toc:hover {
  background: var(--admin-surface-muted, #f0f4ff);
}
.bt-results .bt-header {
  border-bottom: 2px solid var(--admin-border, #dae2ea);
}
.bt-result-score {
  font-size: 1.1em;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 6px;
}
.bt-result-score.bt-pass {
  background: var(--admin-status-active-bg, rgba(39, 174, 96, 0.12));
  color: var(--admin-status-active, #1e8449);
}
.bt-result-score.bt-fail {
  background: var(--admin-status-danger-bg, rgba(231, 76, 60, 0.12));
  color: var(--admin-status-danger, #c0392b);
}
.bt-fail-message {
  padding: 16px 20px;
  background: var(--admin-status-danger-bg, rgba(231, 76, 60, 0.12));
  border-bottom: 1px solid var(--admin-border, #dae2ea);
  color: var(--admin-status-danger, #c0392b);
}
.bt-results-questions {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.bt-result-question {
  border: 1px solid var(--admin-border, #dae2ea);
  border-radius: 6px;
  overflow: hidden;
}
.bt-result-question.bt-result-correct {
  border-left: 4px solid var(--battersea-success, #27ae60);
}
.bt-result-question.bt-result-wrong {
  border-left: 4px solid var(--battersea-danger, #e74c3c);
}
.bt-result-q-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--admin-surface-alt, #f8faff);
  border-bottom: 1px solid var(--admin-border, #dae2ea);
}
.bt-result-q-num {
  font-weight: 700;
  color: var(--admin-text, var(--battersea-heading, #2c3e50));
}
.bt-result-q-status {
  font-weight: 600;
  font-size: 0.85em;
  padding: 2px 8px;
  border-radius: 3px;
}
.bt-result-q-status.bt-pass {
  background: var(--admin-status-active-bg, rgba(39, 174, 96, 0.12));
  color: var(--admin-status-active, #1e8449);
}
.bt-result-q-status.bt-fail {
  background: var(--admin-status-danger-bg, rgba(231, 76, 60, 0.12));
  color: var(--admin-status-danger, #c0392b);
}
.bt-result-q-text {
  padding: 12px 14px;
  font-weight: 500;
}
.bt-result-answers {
  padding: 0 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.bt-result-answer {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 4px;
  border: 1px solid transparent;
}
.bt-result-answer.bt-answer-correct {
  background: var(--admin-status-active-bg, rgba(39, 174, 96, 0.12));
  border-color: color-mix(in srgb, var(--battersea-success, #27ae60) 25%, transparent);
}
.bt-result-answer.bt-answer-wrong {
  background: var(--admin-status-danger-bg, rgba(231, 76, 60, 0.12));
  border-color: color-mix(in srgb, var(--battersea-danger, #e74c3c) 25%, transparent);
}
.bt-result-answer.bt-answer-missed {
  background: var(--admin-status-warning-bg, rgba(243, 156, 18, 0.12));
  border-color: color-mix(in srgb, var(--battersea-warning, #f39c12) 25%, transparent);
}
.bt-result-answer-text {
  flex: 1;
}
.bt-result-answer-tag {
  font-size: 0.8em;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 3px;
  background: var(--admin-status-danger-bg, rgba(231, 76, 60, 0.12));
  color: var(--admin-status-danger, #c0392b);
}
.bt-result-answer-tag.bt-tag-correct {
  background: var(--admin-status-active-bg, rgba(39, 174, 96, 0.12));
  color: var(--admin-status-active, #1e8449);
}
.bt-result-pair {
  justify-content: flex-start;
}
.bt-result-pair-text {
  flex: 0 1 auto;
}
.bt-result-pair-arrow {
  color: var(--admin-text-muted, #7f8c9b);
  flex-shrink: 0;
  font-size: 1.1em;
}
.bt-result-answer-placed,
.bt-result-answer-correct-group {
  font-size: 0.85em;
  color: var(--admin-text-muted, #7f8c9b);
}
.bt-result-answer-correct-group {
  font-weight: 600;
}
.bt-result-why {
  padding: 10px 14px;
  background: color-mix(in srgb, var(--primary1, var(--battersea-primary, #3a7bd5)) 5%, transparent);
  border-top: 1px solid var(--admin-border, #dae2ea);
  font-size: 0.9em;
}
.bt-results-footer {
  justify-content: center;
}
.bt-error {
  padding: 40px 20px;
  text-align: center;
  color: var(--battersea-danger, #e74c3c);
}
@media (max-width: 768px) {
  .bt-match-area {
    grid-template-columns: 1fr;
  }
  .bt-group-categories {
    grid-template-columns: 1fr;
  }
  .bt-header {
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
  }
  .bt-footer {
    flex-direction: column;
  }
  .bt-footer .bt-btn {
    width: 100%;
    justify-content: center;
  }
  .bt-results-footer {
    flex-direction: column;
  }
}
.battersea-toast-stack {
  position: fixed;
  top: 1rem;
  right: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 10000;
  pointer-events: none;
}
.battersea-toast {
  pointer-events: auto;
  min-width: 220px;
  max-width: 360px;
  padding: 0.65rem 0.9rem;
  border-radius: 4px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  line-height: 1.4;
  color: #fff;
  background: #3e4248;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.18s ease-out, transform 0.18s ease-out;
}
.battersea-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.battersea-toast--success {
  background: #146c2e;
}
.battersea-toast--error {
  background: #b3261e;
}
.battersea-toast--warn {
  background: #b25b00;
}
/**
 * Admin Styles - Master Import
 * Battersea Systems LMS
 *
 * These styles build on the existing Battersea CSS foundation and add
 * admin-specific patterns: page layout, KPI cards, status badges,
 * filter bars, confirmation dialogs, and utilities.
 *
 * Existing patterns used as-is (no overrides needed):
 *   - .panel / .panel-header / .panel-body / .panel-footer
 *   - .btn / .btn-icon / .btn-icon-text
 *   - .form-group / .form-control / .form-label / .toggle
 *   - .battersea-datatable
 *   - .grid / grid utilities
 *   - All Battersea JS Library component styles
 */
/**
 * Admin Variables for Battersea Systems
 * CSS custom properties for admin-specific styling.
 *
 * Brand colours come from palette-admin.less (generated by the colour engine)
 * which defines --brand-*, --neutral-*, --surface-*, --text-*, --semantic-*
 * for both :root (light) and [data-theme="dark"].
 *
 * This file maps those palette properties → admin-specific --admin-* properties,
 * and bridges old LESS variables for backward compatibility.
 */
:root {
  --draft: #b2a798;
  --administration: #a7b9c9;
  --active: #399ecc;
  --inactive: #5f6368;
  --expired: #cc7d8c;
  --archived: #c6ccb5;
  --blue: #628ec5;
  --closed: #cc7d8c;
  --cyan: #01c1d0;
  --lime: #ABC059;
  --lavender: #A5ABCD;
  --sea: #242657;
  --apricot: #f3ae53;
  --purple: #5D4786;
  --no-test: var(--tenant-secondary2);
  --primary1: var(--tenant-primary1);
  --primary1-light: var(--brand-primary1-light, var(--tenant-primary1-lighter));
  --primary1-dark: var(--brand-primary1-dark, var(--tenant-primary1-darker));
  --primary2: var(--tenant-primary2);
  --primary2-light: var(--brand-primary2-light, var(--tenant-primary2-lighter));
  --primary2-dark: var(--brand-primary2-dark, var(--tenant-primary2-darker));
  --accent: var(--tenant-primary3);
  --accent-light: var(--brand-accent-light, var(--tenant-primary3-lighter));
  --accent-dark: var(--brand-accent-dark, var(--tenant-primary3-darker));
  --secondary1: var(--tenant-secondary1);
  --secondary1-light: var(--brand-secondary1-light, var(--tenant-secondary1-lighter));
  --secondary1-dark: var(--brand-secondary1-dark, var(--tenant-secondary1-darker));
  --secondary2: var(--tenant-secondary2);
  --secondary2-light: var(--brand-secondary2-light, var(--tenant-secondary2-lighter));
  --secondary2-dark: var(--brand-secondary2-dark, var(--tenant-secondary2-darker));
  --primary3: var(--tenant-primary3);
  --primary4: var(--tenant-primary4);
  --secondary3: var(--tenant-secondary3);
  --secondary4: var(--tenant-secondary4);
  --heading-colour: var(--tenant-headings);
  --text-colour: #666666;
  --text-light: #cccccc;
  --link-colour: var(--tenant-primary3);
  --link-hover: var(--tenant-primary3-darker);
  --colour-default: var(--tenant-default);
  --colour-success: var(--tenant-success);
  --colour-information: var(--tenant-information);
  --colour-warning: var(--tenant-warning);
  --colour-danger: var(--tenant-danger);
  --colour-important: var(--tenant-important);
  --neutral-50: #f7f7f7;
  --neutral-200: #CCCCCC;
  --neutral-500: #999999;
  --neutral-700: #666666;
  --neutral-900: #1a1a1a;
  --black: #000000;
  --dark-grey: #666666;
  --grey: #999999;
  --light-grey: #CCCCCC;
  --white-grey: #f7f7f7;
  --white: #ffffff;
  --admin-font-family: "neue-haas-grotesk-display", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --admin-font-size: 14px;
  --admin-line-height: 1.5;
  --admin-sidebar-width: 248px;
  --admin-sidebar-collapsed-width: 64px;
  --admin-header-height: 56px;
  --admin-footer-height: 44px;
  --admin-content-max-width: 1200px;
  --admin-content-padding: 2rem;
  --admin-bg: var(--surface-page, #f3f4f7);
  --admin-surface: var(--surface-card, #ffffff);
  --admin-surface-alt: #fafbfc;
  --admin-surface-muted: #f5f6f8;
  --admin-input-readonly-bg: #f5f6f8;
  --admin-border: var(--neutral-200, #e2e5ea);
  --admin-border-light: #eef0f3;
  --admin-border-strong: #eaeaea;
  --admin-text: var(--text-primary, var(--tenant-text));
  --admin-text-muted: var(--text-muted, #8a8a8a);
  --admin-text-heading: var(--text-primary, var(--tenant-headings));
  --admin-accent: var(--brand-accent, var(--tenant-primary3));
  --admin-accent-hover: var(--brand-accent-dark, var(--tenant-primary3-d10));
  --admin-accent-subtle: color-mix(in srgb, var(--tenant-primary3) 8%, transparent);
  --admin-sidebar-bg: var(--neutral-900, #1a1a2e);
  --admin-sidebar-text: rgba(255, 255, 255, 0.65);
  --admin-sidebar-text-active: #ffffff;
  --admin-sidebar-hover: rgba(255, 255, 255, 0.06);
  --admin-sidebar-active: color-mix(in srgb, var(--tenant-primary1) 18%, transparent);
  --admin-sidebar-active-border: var(--brand-primary1, var(--tenant-primary1));
  --admin-sidebar-group-text: rgba(255, 255, 255, 0.35);
  --admin-sidebar-border: rgba(255, 255, 255, 0.07);
  --admin-status-active: var(--semantic-success, var(--tenant-success));
  --admin-status-active-bg: var(--semantic-success-bg, color-mix(in srgb, var(--tenant-success) 10%, transparent));
  --admin-status-expired: var(--expired, #8a4a55);
  --admin-status-expired-bg: rgba(204, 125, 140, 0.15);
  --admin-status-inactive: var(--inactive, #8a8a8a);
  --admin-status-inactive-bg: #eef0f3;
  --admin-status-warning: var(--semantic-warning, var(--tenant-warning));
  --admin-status-warning-bg: var(--semantic-warning-bg, color-mix(in srgb, var(--tenant-warning) 10%, transparent));
  --admin-status-danger: var(--semantic-error, var(--tenant-danger));
  --admin-status-danger-bg: var(--semantic-error-bg, color-mix(in srgb, var(--tenant-danger) 10%, transparent));
  --admin-status-info: var(--semantic-info, var(--tenant-information));
  --admin-status-info-bg: var(--semantic-info-bg, color-mix(in srgb, var(--tenant-information) 10%, transparent));
  --admin-status-draft: var(--draft, #b2a798);
  --admin-outer-margin: 0px;
  --admin-sidebar-horz-padding: 1rem;
  --admin-icon-size: 25px;
  --admin-radius-outer: 0;
  --admin-radius-sm: 4px;
  --admin-radius: 6px;
  --admin-radius-lg: 8px;
  --admin-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --admin-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
  --admin-shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.1);
  --admin-kpi-radius: 8px;
  --admin-kpi-padding: 1.5rem;
  --admin-filter-bg: var(--admin-surface, #ffffff);
  --admin-filter-border: var(--admin-border, #e2e5ea);
  --admin-filter-radius: 6px;
  --admin-dialog-overlay: rgba(0, 0, 0, 0.4);
  --admin-dialog-radius: 8px;
  --admin-dialog-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  --datatable-border-color: var(--admin-border);
  --datatable-header-bg: #fafbfc;
  --datatable-header-color: var(--admin-text-muted);
  --datatable-row-hover-bg: #fafbfc;
  --datatable-stripe-bg: #fafcfe;
  --datatable-accent-color: var(--admin-accent);
  --datatable-text-color: var(--admin-text);
  --datatable-empty-color: var(--admin-text-muted);
  --datatable-header-hover-bg: #ebeff2;
  --admin-logo: var(--tenant-logo);
  --admin-logo-dark: var(--tenant-logo-dark);
  --admin-logo-height: var(--tenant-logo-height);
  --admin-logo-spacing: var(--tenant-logo-spacing);
  --admin-mobile-logo: var(--tenant-mobilelogo);
  --admin-mobile-logo-dark: var(--tenant-mobilelogo-dark);
  --admin-mobile-logo-height: var(--tenant-mobile-logo-height);
  --admin-mobile-logo-spacing: var(--tenant-mobile-logo-spacing);
  --admin-product-logo: var(--tenant-product-logo);
  --admin-product-logo-dark: var(--tenant-product-logo-dark);
  --admin-product-logo-spacing: var(--tenant-product-logo-spacing);
  --admin-product-logo-height: var(--tenant-product-logo-height);
  --admin-reseller-logo: var(--tenant-reseller-logo);
  --admin-reseller-logo-dark: var(--tenant-reseller-logo-dark);
  --admin-reseller-logo-spacing: var(--tenant-reseller-logo-spacing);
  --admin-reseller-logo-height: var(--tenant-reseller-logo-height);
  --admin-mobile-reseller-logo: var(--tenant-reseller-mobile-logo);
  --admin-mobile-reseller-logo-dark: var(--tenant-reseller-mobile-logo-dark);
  --admin-mobile-reseller-logo-spacing: var(--tenant-mobile-logo-spacing);
  --admin-mobile-reseller-logo-height: var(--tenant-reseller-mobile-logo-height);
}
/* ─── Dark Mode ───
 * Now driven by the palette-admin.less file which sets --brand-*, --neutral-*,
 * --surface-*, --text-*, --semantic-* for [data-theme="dark"].
 * We only need to override the --admin-* mappings that don't use var() above.
 */
[data-theme="dark"] {
  --admin-bg: var(--surface-page, #131520);
  --admin-surface: var(--surface-card, #1c1e2e);
  --admin-surface-alt: #13141f;
  --admin-surface-muted: #252738;
  --admin-input-readonly-bg: #252738;
  --admin-border: var(--neutral-700, #2e3047);
  --admin-border-light: var(--neutral-700, #252738);
  --admin-border-strong: #2e3047;
  --admin-text: var(--text-primary, #d8dae0);
  --admin-text-muted: var(--text-muted, #8688a0);
  --admin-text-heading: var(--text-primary, #eaebf0);
  --admin-accent: var(--brand-accent, #4db3ff);
  --admin-accent-hover: var(--brand-accent-dark, #3aa0f0);
  --admin-accent-subtle: rgba(77, 179, 255, 0.12);
  --admin-sidebar-bg: var(--neutral-900, #0e0f1a);
  --admin-sidebar-text: rgba(255, 255, 255, 0.55);
  --admin-sidebar-text-active: #ffffff;
  --admin-sidebar-hover: rgba(255, 255, 255, 0.08);
  --admin-sidebar-active: rgba(77, 179, 255, 0.15);
  --admin-sidebar-active-border: var(--brand-primary1, #4db3ff);
  --admin-sidebar-group-text: rgba(255, 255, 255, 0.3);
  --admin-sidebar-border: rgba(255, 255, 255, 0.06);
  --admin-status-active: var(--semantic-success, #2dd4a0);
  --admin-status-active-bg: var(--semantic-success-bg, rgba(45, 212, 160, 0.12));
  --admin-status-inactive: #6b6d84;
  --admin-status-inactive-bg: #252738;
  --admin-status-warning: var(--semantic-warning, #f0b429);
  --admin-status-warning-bg: var(--semantic-warning-bg, rgba(240, 180, 41, 0.12));
  --admin-status-danger: var(--semantic-error, #f07070);
  --admin-status-danger-bg: var(--semantic-error-bg, rgba(240, 112, 112, 0.12));
  --admin-status-info: var(--semantic-info, color-mix(in srgb, var(--tenant-information) 55%, #ffffff));
  --admin-status-info-bg: var(--semantic-info-bg, color-mix(in srgb, var(--tenant-information) 22%, transparent));
  --admin-status-draft: #6b6d84;
  --admin-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.25);
  --admin-shadow: 0 1px 3px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.2);
  --admin-shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.35);
  --admin-dialog-overlay: rgba(0, 0, 0, 0.6);
  --admin-dialog-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  --datatable-header-bg: #13141f;
  --datatable-header-hover-bg: #202436;
  --datatable-row-hover-bg: #2c3044;
  --datatable-stripe-bg: #202436;
}
[data-theme="dark"] .footer__product-logo-light {
  display: none!important;
}
[data-theme="dark"] .footer__product-logo-dark {
  display: inline-block !important;
}
[data-theme="dark"] .footer__powered-by-light {
  display: none!important;
}
[data-theme="dark"] .footer__powered-by-dark {
  display: block!important;
}
@media (prefers-color-scheme: dark) {
  [data-theme="auto"] {
    --admin-bg: var(--surface-page, #131520);
    --admin-surface: var(--surface-card, #1c1e2e);
    --admin-surface-alt: #13141f;
    --admin-surface-muted: #252738;
    --admin-input-readonly-bg: #252738;
    --admin-border: var(--neutral-700, #2e3047);
    --admin-border-light: var(--neutral-700, #252738);
    --admin-border-strong: #2e3047;
    --admin-text: var(--text-primary, #d8dae0);
    --admin-text-muted: var(--text-muted, #8688a0);
    --admin-text-heading: var(--text-primary, #eaebf0);
    --admin-accent: var(--brand-accent, #4db3ff);
    --admin-accent-hover: var(--brand-accent-dark, #3aa0f0);
    --admin-accent-subtle: rgba(77, 179, 255, 0.12);
    --admin-sidebar-bg: var(--neutral-900, #0e0f1a);
    --admin-sidebar-text: rgba(255, 255, 255, 0.55);
    --admin-sidebar-text-active: #ffffff;
    --admin-sidebar-hover: rgba(255, 255, 255, 0.08);
    --admin-sidebar-active: rgba(77, 179, 255, 0.15);
    --admin-sidebar-active-border: var(--brand-primary1, #4db3ff);
    --admin-sidebar-group-text: rgba(255, 255, 255, 0.3);
    --admin-sidebar-border: rgba(255, 255, 255, 0.06);
    --admin-status-active: var(--semantic-success, #2dd4a0);
    --admin-status-active-bg: var(--semantic-success-bg, rgba(45, 212, 160, 0.12));
    --admin-status-inactive: #6b6d84;
    --admin-status-inactive-bg: #252738;
    --admin-status-warning: var(--semantic-warning, #f0b429);
    --admin-status-warning-bg: var(--semantic-warning-bg, rgba(240, 180, 41, 0.12));
    --admin-status-danger: var(--semantic-error, #f07070);
    --admin-status-danger-bg: var(--semantic-error-bg, rgba(240, 112, 112, 0.12));
    --admin-status-info: var(--semantic-info, color-mix(in srgb, var(--tenant-information) 55%, #ffffff));
    --admin-status-info-bg: var(--semantic-info-bg, color-mix(in srgb, var(--tenant-information) 22%, transparent));
    --admin-status-draft: #6b6d84;
    --admin-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.25);
    --admin-shadow: 0 1px 3px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.2);
    --admin-shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.35);
    --admin-dialog-overlay: rgba(0, 0, 0, 0.6);
    --admin-dialog-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    --datatable-header-bg: #13141f;
    --datatable-header-hover-bg: #202436;
    --datatable-row-hover-bg: #2c3044;
    --datatable-stripe-bg: #202436;
  }
  [data-theme="auto"] .footer__product-logo-light {
    display: none!important;
  }
  [data-theme="auto"] .footer__product-logo-dark {
    display: inline-block !important;
  }
  [data-theme="auto"] .footer__powered-by-light {
    display: none!important;
  }
  [data-theme="auto"] .footer__powered-by-dark {
    display: block!important;
  }
}
/**
 * Admin Utilities
 * Spacing, visibility, and layout helpers for admin pages
 * Battersea Systems LMS
 */
.admin-text-muted {
  color: var(--admin-text-muted);
}
.admin-text-small {
  font-size: 0.85rem;
}
.admin-text-mono {
  font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;
  font-size: 0.85em;
}
.admin-truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.admin-divider {
  border: none;
  border-top: 1px solid var(--admin-border);
  margin: 1rem 0;
}
.admin-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.6;
}
.admin-loading:after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 24px;
  height: 24px;
  margin: -12px 0 0 -12px;
  border: 2px solid var(--admin-border);
  border-top-color: var(--admin-status-info);
  border-radius: 50%;
  animation: admin-spin 0.6s linear infinite;
}
@keyframes admin-spin {
  to {
    transform: rotate(360deg);
  }
}
.admin-conditional {
  display: inline-flex;
  align-items: center;
  padding: 0.15em 0.5em;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--admin-text-muted);
  background: var(--admin-surface-muted, #f0f0f0);
  border-radius: 3px;
  margin-left: 0.5em;
}
/**
 * Admin Buttons
 * Button formatting for admin pages
 * Battersea Systems LMS
 */
/* Every selector below carries :not(:where(.bq-course *)): page content on a builder canvas that
   has the content stylesheet (.bq-course) is styled by that stylesheet, whose rules are weaker than
   these on purpose. :where() keeps the exclusion at no weight, so nothing else in the admin shifts. */
.ext-btn .btn:not(:where(.bq-course *)),
.app .btn:not(:where(.bq-course *)),
.battersea-popup-overlay .btn:not(:where(.bq-course *)),
.bcu-overlay .btn:not(:where(.bq-course *)),
.library-clash-overlay .btn:not(:where(.bq-course *)) {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1.25rem;
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-family: inherit;
  line-height: 1;
  white-space: nowrap;
  border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius-sm);
  background: var(--admin-surface);
  color: var(--admin-text);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.15s ease-out, box-shadow 0.15s ease-out;
}
.ext-btn .btn:not(:where(.bq-course *)):hover,
.app .btn:not(:where(.bq-course *)):hover,
.battersea-popup-overlay .btn:not(:where(.bq-course *)):hover,
.bcu-overlay .btn:not(:where(.bq-course *)):hover,
.library-clash-overlay .btn:not(:where(.bq-course *)):hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12);
  background: var(--admin-bg);
  border-color: var(--admin-text-muted);
}
.ext-btn .btn:not(:where(.bq-course *)):disabled,
.ext-btn .btn:not(:where(.bq-course *))[disabled],
.app .btn:not(:where(.bq-course *)):disabled,
.app .btn:not(:where(.bq-course *))[disabled],
.battersea-popup-overlay .btn:not(:where(.bq-course *)):disabled,
.battersea-popup-overlay .btn:not(:where(.bq-course *))[disabled],
.bcu-overlay .btn:not(:where(.bq-course *)):disabled,
.bcu-overlay .btn:not(:where(.bq-course *))[disabled],
.library-clash-overlay .btn:not(:where(.bq-course *)):disabled,
.library-clash-overlay .btn:not(:where(.bq-course *))[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}
.ext-btn .btn-accent:not(:where(.bq-course *)),
.app .btn-accent:not(:where(.bq-course *)),
.battersea-popup-overlay .btn-accent:not(:where(.bq-course *)),
.bcu-overlay .btn-accent:not(:where(.bq-course *)),
.library-clash-overlay .btn-accent:not(:where(.bq-course *)) {
  background: var(--admin-accent);
  border-color: var(--admin-accent);
  color: #fff;
}
.ext-btn .btn-accent:not(:where(.bq-course *)):hover,
.app .btn-accent:not(:where(.bq-course *)):hover,
.battersea-popup-overlay .btn-accent:not(:where(.bq-course *)):hover,
.bcu-overlay .btn-accent:not(:where(.bq-course *)):hover,
.library-clash-overlay .btn-accent:not(:where(.bq-course *)):hover {
  background: var(--admin-accent-hover);
  border-color: var(--admin-accent-hover);
  color: #fff;
}
.ext-btn .btn-primary:not(:where(.bq-course *)),
.app .btn-primary:not(:where(.bq-course *)),
.battersea-popup-overlay .btn-primary:not(:where(.bq-course *)),
.bcu-overlay .btn-primary:not(:where(.bq-course *)),
.library-clash-overlay .btn-primary:not(:where(.bq-course *)) {
  background: var(--primary1);
  border-color: var(--primary1);
  color: #fff;
}
.ext-btn .btn-primary:not(:where(.bq-course *)):hover,
.app .btn-primary:not(:where(.bq-course *)):hover,
.battersea-popup-overlay .btn-primary:not(:where(.bq-course *)):hover,
.bcu-overlay .btn-primary:not(:where(.bq-course *)):hover,
.library-clash-overlay .btn-primary:not(:where(.bq-course *)):hover {
  background: color-mix(in srgb, var(--brand-primary1, #010101), #000 8%);
  border-color: color-mix(in srgb, var(--brand-primary1, #010101), #000 10%);
  color: #fff;
}
.ext-btn .btn-secondary:not(:where(.bq-course *)),
.app .btn-secondary:not(:where(.bq-course *)),
.battersea-popup-overlay .btn-secondary:not(:where(.bq-course *)),
.bcu-overlay .btn-secondary:not(:where(.bq-course *)),
.library-clash-overlay .btn-secondary:not(:where(.bq-course *)) {
  background: var(--secondary1);
  border-color: var(---secondary1);
  color: #fff;
}
.ext-btn .btn-secondary:not(:where(.bq-course *)):hover,
.app .btn-secondary:not(:where(.bq-course *)):hover,
.battersea-popup-overlay .btn-secondary:not(:where(.bq-course *)):hover,
.bcu-overlay .btn-secondary:not(:where(.bq-course *)):hover,
.library-clash-overlay .btn-secondary:not(:where(.bq-course *)):hover {
  background: color-mix(in srgb, var(--brand-secondary1, #9B4F9F), #000 8%);
  border-color: color-mix(in srgb, var(--brand-secondary1, #9B4F9F), #000 10%);
  color: #fff;
}
.ext-btn .btn-danger:not(:where(.bq-course *)),
.app .btn-danger:not(:where(.bq-course *)),
.battersea-popup-overlay .btn-danger:not(:where(.bq-course *)),
.bcu-overlay .btn-danger:not(:where(.bq-course *)),
.library-clash-overlay .btn-danger:not(:where(.bq-course *)) {
  background: var(--admin-status-danger, #a94442);
  border-color: var(--admin-status-danger, #8b3735);
  color: #fff;
}
.ext-btn .btn-danger:not(:where(.bq-course *)):hover,
.app .btn-danger:not(:where(.bq-course *)):hover,
.battersea-popup-overlay .btn-danger:not(:where(.bq-course *)):hover,
.bcu-overlay .btn-danger:not(:where(.bq-course *)):hover,
.library-clash-overlay .btn-danger:not(:where(.bq-course *)):hover {
  background: color-mix(in srgb, var(--admin-status-danger, #a94442), #000 8%);
  border-color: color-mix(in srgb, var(--admin-status-danger, #a94442), #000 10%);
  color: #fff;
}
.ext-btn .btn-success:not(:where(.bq-course *)),
.app .btn-success:not(:where(.bq-course *)),
.battersea-popup-overlay .btn-success:not(:where(.bq-course *)),
.bcu-overlay .btn-success:not(:where(.bq-course *)),
.library-clash-overlay .btn-success:not(:where(.bq-course *)) {
  background: var(--admin-status-success, #0a6242);
  color: #fff;
  border-color: var(--admin-status-success, #084f35);
}
.ext-btn .btn-success:not(:where(.bq-course *)):hover,
.app .btn-success:not(:where(.bq-course *)):hover,
.battersea-popup-overlay .btn-success:not(:where(.bq-course *)):hover,
.bcu-overlay .btn-success:not(:where(.bq-course *)):hover,
.library-clash-overlay .btn-success:not(:where(.bq-course *)):hover {
  background: color-mix(in srgb, var(--admin-status-success, #0a6242), #000 8%);
  border-color: color-mix(in srgb, var(--admin-status-success, #0a6242), #000 10%);
  color: #fff;
}
.ext-btn .btn-warning:not(:where(.bq-course *)),
.app .btn-warning:not(:where(.bq-course *)),
.battersea-popup-overlay .btn-warning:not(:where(.bq-course *)),
.bcu-overlay .btn-warning:not(:where(.bq-course *)),
.library-clash-overlay .btn-warning:not(:where(.bq-course *)) {
  background: var(--admin-status-warning, #0a6242);
  color: #fff;
  border-color: var(--admin-status-warning, #084f35);
}
.ext-btn .btn-warning:not(:where(.bq-course *)):hover,
.app .btn-warning:not(:where(.bq-course *)):hover,
.battersea-popup-overlay .btn-warning:not(:where(.bq-course *)):hover,
.bcu-overlay .btn-warning:not(:where(.bq-course *)):hover,
.library-clash-overlay .btn-warning:not(:where(.bq-course *)):hover {
  background: color-mix(in srgb, var(--admin-status-warning, #0a6242), #000 8%);
  border-color: color-mix(in srgb, var(--admin-status-warning, #0a6242), #000 10%);
  color: #fff;
}
.ext-btn .btn-information:not(:where(.bq-course *)),
.app .btn-information:not(:where(.bq-course *)),
.battersea-popup-overlay .btn-information:not(:where(.bq-course *)),
.bcu-overlay .btn-information:not(:where(.bq-course *)),
.library-clash-overlay .btn-information:not(:where(.bq-course *)) {
  background: var(--admin-status-information, #628ec5);
  color: #fff;
  border-color: var(--admin-status-information, #5179b0);
}
.ext-btn .btn-information:not(:where(.bq-course *)):hover,
.app .btn-information:not(:where(.bq-course *)):hover,
.battersea-popup-overlay .btn-information:not(:where(.bq-course *)):hover,
.bcu-overlay .btn-information:not(:where(.bq-course *)):hover,
.library-clash-overlay .btn-information:not(:where(.bq-course *)):hover {
  background: color-mix(in srgb, var(--admin-status-information, #628ec5), #000 8%);
  border-color: color-mix(in srgb, var(--admin-status-information, #628ec5), #000 10%);
  color: #fff;
}
.ext-btn .btn-important:not(:where(.bq-course *)),
.app .btn-important:not(:where(.bq-course *)),
.battersea-popup-overlay .btn-important:not(:where(.bq-course *)),
.bcu-overlay .btn-important:not(:where(.bq-course *)),
.library-clash-overlay .btn-important:not(:where(.bq-course *)) {
  background: var(--admin-status-important, #f26901);
  color: #fff;
  border-color: var(--admin-status-important, #df6406);
}
.ext-btn .btn-important:not(:where(.bq-course *)):hover,
.app .btn-important:not(:where(.bq-course *)):hover,
.battersea-popup-overlay .btn-important:not(:where(.bq-course *)):hover,
.bcu-overlay .btn-important:not(:where(.bq-course *)):hover,
.library-clash-overlay .btn-important:not(:where(.bq-course *)):hover {
  background: color-mix(in srgb, var(--admin-status-important, #f26901), #000 8%);
  border-color: color-mix(in srgb, var(--admin-status-important, #f26901), #000 10%);
  color: #fff;
}
/* Admin buttons — scoped to .app to avoid leaking into legacy pages */
.app {
  /* Text button */
  /* Action links */
  /* Working state — button in flight (Phase 7).
	   The button text gets wrapped in <span class="shimmer-text"> by
	   the battersea-shimmer.js helper. This modifier just adds the
	   progress cursor + a small dim so the disabled state still reads
	   as "busy" rather than "inactive". */
  /* White-text buttons: the default shimmer is dark grey and would
	   vanish. background-image only, as the shorthand resets the clip. */
}
.filter-bar__actions .app .btn {
  font-size: 0.88rem;
  line-height: 1.4;
  font-weight: 400;
}
.app .kpi-card[data-flipbox] .btn {
  padding: 0.25rem 1rem;
}
.app .btn-text {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  padding: 0.25em 0.5em;
  font-size: 0.8rem;
  font-weight: 500;
  border: none;
  border-radius: 3px;
  background: none;
  color: var(--admin-accent);
  cursor: pointer;
  font-family: inherit;
}
.app .btn-text:hover {
  background: rgba(34, 157, 245, 0.08);
}
.app .import-action-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--admin-accent);
  text-decoration: none;
}
.app .import-action-link:hover {
  text-decoration: underline;
}
.app .import-action-link__icon {
  display: inline-block;
  width: 16px;
  height: 16px;
  background-color: var(--admin-accent);
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}
.app .btn--working,
.app .btn-primary.btn--working,
.app .btn-accent.btn--working,
.app .btn-secondary.btn--working {
  cursor: progress;
  opacity: 0.85;
}
.app .btn--working:hover,
.app .btn-primary.btn--working:hover,
.app .btn-accent.btn--working:hover,
.app .btn-secondary.btn--working:hover {
  transform: none;
  box-shadow: none;
}
.app .btn-primary.btn--working .shimmer-text,
.app .btn-accent.btn--working .shimmer-text {
  background-image: linear-gradient(90deg, rgba(255, 255, 255, 0.6) 0%, rgba(255, 255, 255, 0.6) 35%, #fff 50%, rgba(255, 255, 255, 0.6) 65%, rgba(255, 255, 255, 0.6) 100%);
}
/**
 * Admin  Cards
 * Dashboard metric cards with optional flip animation
 * Battersea Systems LMS
 */
.ext-card,
.admin-card,
.import-summary__card,
.kpi-card {
  background: var(--admin-surface);
  border: 1px solid var(--admin-border);
  border-radius: var(--admin-kpi-radius);
  padding: var(--admin-kpi-padding);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  position: relative;
  overflow: hidden;
  border-left: 3px solid var(--admin-border);
  margin-bottom: 1.5rem;
  /* Flip box integration — fixed height needed for 3D transform */
  /* Clickable card variant */
  /* Type card variant */
}
.ext-card:last-child,
.admin-card:last-child,
.import-summary__card:last-child,
.kpi-card:last-child {
  margin-bottom: 0;
}
.ext-card[data-flipbox],
.admin-card[data-flipbox],
.import-summary__card[data-flipbox],
.kpi-card[data-flipbox] {
  padding: 0;
  min-height: 120px;
}
.ext-card[data-flipbox] [data-flipbox-front],
.ext-card[data-flipbox] [data-flipbox-back],
.admin-card[data-flipbox] [data-flipbox-front],
.admin-card[data-flipbox] [data-flipbox-back],
.import-summary__card[data-flipbox] [data-flipbox-front],
.import-summary__card[data-flipbox] [data-flipbox-back],
.kpi-card[data-flipbox] [data-flipbox-front],
.kpi-card[data-flipbox] [data-flipbox-back] {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 0.25rem;
  min-height: 120px;
  height: 120px;
  padding: var(--admin-kpi-padding);
}
.ext-card--link,
.admin-card--link,
.import-summary__card--link,
.kpi-card--link {
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s;
}
.ext-card--link:hover,
.admin-card--link:hover,
.import-summary__card--link:hover,
.kpi-card--link:hover {
  border-color: var(--admin-text-muted);
}
.ext-card--success,
.admin-card--success,
.import-summary__card--success,
.kpi-card--success {
  border-left-color: var(--admin-status-active);
}
.ext-card--success .kpi-card__value,
.admin-card--success .kpi-card__value,
.import-summary__card--success .kpi-card__value,
.kpi-card--success .kpi-card__value {
  color: var(--admin-status-active);
}
.ext-card--warning,
.admin-card--warning,
.import-summary__card--warning,
.kpi-card--warning {
  border-left-color: var(--admin-status-warning);
}
.ext-card--warning .kpi-card__value,
.admin-card--warning .kpi-card__value,
.import-summary__card--warning .kpi-card__value,
.kpi-card--warning .kpi-card__value {
  color: var(--admin-status-warning);
}
.ext-card--warning .import-summary__value,
.admin-card--warning .import-summary__value,
.import-summary__card--warning .import-summary__value,
.kpi-card--warning .import-summary__value {
  color: var(--admin-status-warning);
}
.ext-card--danger,
.admin-card--danger,
.import-summary__card--danger,
.kpi-card--danger {
  border-left-color: var(--admin-status-danger);
}
.ext-card--danger .kpi-card__value,
.admin-card--danger .kpi-card__value,
.import-summary__card--danger .kpi-card__value,
.kpi-card--danger .kpi-card__value {
  color: var(--admin-status-danger);
}
.ext-card--info,
.admin-card--info,
.import-summary__card--info,
.kpi-card--info {
  border-left-color: var(--admin-status-info);
}
.ext-card--info .kpi-card__value,
.admin-card--info .kpi-card__value,
.import-summary__card--info .kpi-card__value,
.kpi-card--info .kpi-card__value {
  color: var(--admin-status-info);
}
.ext-card--draft,
.admin-card--draft,
.import-summary__card--draft,
.kpi-card--draft {
  border-left-color: var(--admin-status-draft);
}
.ext-card--draft .kpi-card__value,
.admin-card--draft .kpi-card__value,
.import-summary__card--draft .kpi-card__value,
.kpi-card--draft .kpi-card__value {
  color: var(--admin-status-draft);
}
.ext-card--ok,
.admin-card--ok,
.import-summary__card--ok,
.kpi-card--ok {
  border-left: 3px solid var(--admin-status-active);
}
.ext-card--ok .import-summary__value,
.admin-card--ok .import-summary__value,
.import-summary__card--ok .import-summary__value,
.kpi-card--ok .import-summary__value {
  color: var(--admin-status-active);
}
.ext-card--error,
.admin-card--error,
.import-summary__card--error,
.kpi-card--error {
  border-left: 3px solid var(--admin-status-danger);
}
.ext-card--error .import-summary__value,
.admin-card--error .import-summary__value,
.import-summary__card--error .import-summary__value,
.kpi-card--error .import-summary__value {
  color: var(--admin-status-danger);
}
/* Admin card */
.admin-card {
  overflow: visible;
}
.admin-card__header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--admin-border-light, #e8eaed);
  background: var(--admin-surface-alt, #fafbfc);
  border-radius: var(--admin-radius) var(--admin-radius) 0 0;
}
.admin-card__header .btn {
  padding: 0.25rem 1rem;
}
.app .admin-card__header .btn {
  padding: 0.25rem 1rem;
}
.admin-card__title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--admin-text-heading, #1a1a2e);
  margin: 0;
}
.admin-card__body {
  padding: 1.25rem;
}
.admin-card__footer {
  padding: 0.75rem 1.25rem;
  border-top: 1px solid var(--admin-border-light, #e8eaed);
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  background: var(--admin-bg, #f8f9fb);
  border-radius: 0 0 var(--admin-radius) var(--admin-radius);
}
/* import card */
.import-summary__card {
  text-align: center;
}
/**
 * Admin Forms
 * form and form field formatting for admin pages
 * Battersea Systems LMS
 */
/* Shared field sizing */
.ext-button,
form .btn,
.filter-bar__actions button.btn {
  font-size: 0.88rem;
  line-height: 1.4;
  font-weight: 400;
}
.ext-form-layout,
.app .form-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
.ext-form-group,
.app .form-group,
.battersea-popup-overlay .form-group {
  margin-bottom: 1rem;
}
.ext-form-row,
.app .form-row,
.battersea-popup-overlay .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 0.75rem;
}
@media (max-width: 768px) {
  .ext-form-row,
  .app .form-row,
  .battersea-popup-overlay .form-row {
    grid-template-columns: 1fr;
  }
}
.ext-form-row .form-group,
.app .form-row .form-group,
.battersea-popup-overlay .form-row .form-group {
  margin-bottom: 0;
}
.ext-form-section-title,
.app .form-section-title,
.battersea-popup-overlay .form-section-title {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--admin-text-muted);
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--admin-border, #dfe1e6);
  margin-bottom: 1rem;
  margin-top: 1.5rem;
}
.ext-form-section-title:first-child,
.app .form-section-title:first-child,
.battersea-popup-overlay .form-section-title:first-child {
  margin-top: 0;
}
.ext-form-section-title + .form-row,
.app .form-section-title + .form-row,
.battersea-popup-overlay .form-section-title + .form-row {
  margin-top: 0rem;
}
.ext-form-label,
.app .form-label,
.battersea-popup-overlay .form-label {
  font-size: 0.85rem;
  font-weight: 600;
  display: block;
  margin-bottom: 0.25rem;
  color: var(--admin-text-heading, #3d3d4e);
}
.ext-form-label .required,
.app .form-label .required,
.battersea-popup-overlay .form-label .required {
  color: var(--admin-status-danger);
  margin-left: 0.15em;
}
.ext-form-input-select,
.app .form-select,
.battersea-popup-overlay .form-input,
.battersea-popup-overlay .form-select,
input:not([type="range"]):not([type="checkbox"]):not([type="radio"]),
select,
textarea {
  display: block;
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  line-height: 1.4;
  color: var(--admin-text, #3d3d4e);
  background-color: var(--admin-surface, #fff);
  border: 1px solid var(--admin-border, #dfe1e6);
  border-radius: var(--admin-radius-sm, 6px);
  transition: border-color 0.15s;
  box-sizing: border-box;
}
.ext-form-input-select:focus,
.app .form-select:focus,
.battersea-popup-overlay .form-input:focus,
.battersea-popup-overlay .form-select:focus,
input:not([type="range"]):not([type="checkbox"]):not([type="radio"]):focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--admin-accent);
  box-shadow: 0 0 0 2px rgba(34, 157, 245, 0.15);
}
.ext-form-input-select[readonly],
.app .form-select[readonly],
.battersea-popup-overlay .form-input[readonly],
.battersea-popup-overlay .form-select[readonly],
input:not([type="range"]):not([type="checkbox"]):not([type="radio"])[readonly],
select[readonly],
textarea[readonly] {
  background: var(--admin-input-readonly-bg, #f5f6f8);
  color: var(--admin-text-muted);
}
.ext-form-input-select.is-error,
.app .form-select.is-error,
.battersea-popup-overlay .form-input.is-error,
.battersea-popup-overlay .form-select.is-error,
input:not([type="range"]):not([type="checkbox"]):not([type="radio"]).is-error,
select.is-error,
textarea.is-error {
  border-color: var(--admin-status-danger);
}
.ext-form-input-select.is-valid,
.app .form-select.is-valid,
.battersea-popup-overlay .form-input.is-valid,
.battersea-popup-overlay .form-select.is-valid,
input:not([type="range"]):not([type="checkbox"]):not([type="radio"]).is-valid,
select.is-valid,
textarea.is-valid {
  border-color: var(--admin-status-active);
}
.ext-form-input-select.is-error,
.app .form-select.is-error,
.battersea-popup-overlay .form-input.is-error,
.battersea-popup-overlay .form-select.is-error,
input:not([type="range"]):not([type="checkbox"]):not([type="radio"]).is-error,
select.is-error,
textarea.is-error {
  border-color: var(--admin-status-danger);
}
.ext-form-error,
.app .form-error,
.battersea-popup-overlay .form-error {
  font-size: 0.8rem;
  color: var(--admin-status-danger);
  display: none;
  margin-top: 0.2rem;
}
.ext-form-error.is-visible,
.ext-form-error.form-error--visible,
.app .form-error.is-visible,
.app .form-error.form-error--visible,
.battersea-popup-overlay .form-error.is-visible,
.battersea-popup-overlay .form-error.form-error--visible {
  display: block;
}
.ext-form-error.field-validation-valid,
.ext-form-error.validation-summary-valid,
.app .form-error.field-validation-valid,
.app .form-error.validation-summary-valid,
.battersea-popup-overlay .form-error.field-validation-valid,
.battersea-popup-overlay .form-error.validation-summary-valid {
  display: none;
}
.ext-form-hint,
.app .form-hint,
.battersea-popup-overlay .form-hint {
  font-size: 0.75rem;
  color: var(--admin-text-muted, #7c8091);
  margin-top: 0.2rem;
}
.ext-password-field,
.app .password-field,
.battersea-popup-overlay .password-field {
  position: relative;
  display: flex;
  align-items: center;
}
.ext-password-field .form-input,
.app .password-field .form-input,
.battersea-popup-overlay .password-field .form-input {
  padding-right: 2.5rem;
}
.ext-password-field__toggle,
.app .password-field__toggle,
.battersea-popup-overlay .password-field__toggle {
  position: absolute;
  right: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  color: var(--admin-text-muted, #7c8091);
  border-radius: 3px;
}
.ext-password-field__toggle:hover,
.app .password-field__toggle:hover,
.battersea-popup-overlay .password-field__toggle:hover {
  color: var(--admin-text-heading, #3d3d4e);
  background: rgba(0, 0, 0, 0.04);
}
.ext-password-field__icon,
.app .password-field__icon,
.battersea-popup-overlay .password-field__icon {
  display: block;
}
.ext-password-strength,
.app .password-strength {
  display: flex;
  gap: 3px;
  margin-top: 0.35rem;
}
.ext-password-strength__bar,
.app .password-strength__bar {
  flex: 1;
  height: 4px;
  background: var(--admin-border-light, #e8eaed);
  border-radius: 2px;
  transition: background 0.2s;
}
.ext-password-strength__bar--filled,
.app .password-strength__bar--filled {
  background: var(--admin-status-active);
}
.ext-password-strength__bar--warning,
.app .password-strength__bar--warning {
  background: var(--admin-status-warning);
}
.ext-password-strength__bar--danger,
.app .password-strength__bar--danger {
  background: var(--admin-status-danger);
}
.ext-password-rules,
.app .password-rules {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.15rem 1rem;
  margin-top: 0.35rem;
  font-size: 0.75rem;
  color: var(--admin-text-muted);
}
.ext-password-rules__item,
.app .password-rules__item {
  display: flex;
  align-items: center;
  gap: 0.3em;
}
.ext-password-rules__item--pass,
.app .password-rules__item--pass {
  color: var(--admin-status-active);
}
.ext-password-rules__item--fail,
.app .password-rules__item--fail {
  color: var(--admin-text-muted);
}
.ext-password-rules__icon,
.app .password-rules__icon {
  font-size: 0.85rem;
}
@media (max-width: 768px) {
  .ext-password-rules,
  .app .password-rules {
    grid-template-columns: 1fr;
  }
}
.ext-import-dropzone,
.app .import-dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 2rem;
  border: 2px dashed var(--admin-border);
  border-radius: var(--admin-radius-lg);
  text-align: center;
  transition: border-color 0.2s, background 0.2s;
  cursor: pointer;
}
.ext-import-dropzone--hover,
.app .import-dropzone--hover {
  border-color: var(--admin-accent);
  background: rgba(34, 157, 245, 0.04);
}
.ext-import-dropzone__icon,
.app .import-dropzone__icon {
  display: inline-block;
  width: 48px;
  height: 48px;
  margin-bottom: 1rem;
  background-color: var(--admin-text-muted);
  opacity: 0.5;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}
.ext-import-dropzone__text,
.app .import-dropzone__text {
  font-size: 0.95rem;
  color: var(--admin-text);
  margin: 0 0 0.25rem;
}
.ext-import-dropzone__or,
.app .import-dropzone__or {
  font-size: 0.8rem;
  color: var(--admin-text-muted);
  margin: 0.25rem 0 0.75rem;
}
.ext-import-dropzone__btn,
.app .import-dropzone__btn {
  cursor: pointer;
}
.ext-import-dropzone__hint,
.app .import-dropzone__hint {
  font-size: 0.8rem;
  color: var(--admin-text-muted);
  margin: 0.75rem 0 0;
  min-height: 1.2em;
}
.ext-import-dropzone__hint--error,
.app .import-dropzone__hint--error {
  color: var(--admin-status-danger);
}
.ext-import-dropzone__hint--success,
.app .import-dropzone__hint--success {
  color: var(--admin-status-active);
}
.ext-username-field,
.app .username {
  /* Username change panel */
  /* Username availability check */
}
.ext-username-field-field,
.app .username-field {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
}
.ext-username-field-field .form-input,
.app .username-field .form-input {
  flex: 1;
}
.ext-username-field-field__actions,
.app .username-field__actions {
  padding-top: 0.15rem;
}
.ext-username-field-change-panel,
.app .username-change-panel {
  margin-top: 0.5rem;
  padding: 0.75rem;
  background: var(--admin-surface-alt, #fafbfc);
  border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius-sm);
}
.ext-username-field-check,
.app .username-check {
  display: flex;
  align-items: center;
  gap: 0.3em;
  font-size: 0.8rem;
  margin-top: 0.2rem;
}
.ext-username-field-check--available,
.app .username-check--available {
  color: var(--admin-status-active);
}
.ext-username-field-check--taken,
.app .username-check--taken {
  color: var(--admin-status-danger);
}
.ext-username-field-check--checking,
.app .username-check--checking {
  color: var(--admin-text-muted);
}
.ext-form-toggle,
.app .toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  cursor: pointer;
}
.ext-form-toggle input[type="checkbox"],
.app .toggle input[type="checkbox"] {
  display: none;
}
.ext-form-toggle__track,
.app .toggle__track {
  width: 40px;
  height: 20px;
  border-radius: 10px;
  background: #ccc;
  position: relative;
  transition: background 0.2s;
  border: 1px solid #999;
  flex-shrink: 0;
}
.ext-form-toggle__track:after,
.app .toggle__track:after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s;
  border: 1px solid #999;
}
.ext-form-toggle input:checked ~ .toggle__track,
.app .toggle input:checked ~ .toggle__track {
  background: var(--admin-status-active);
  border-color: #084f35;
}
.ext-form-toggle input:checked ~ .toggle__track:after,
.app .toggle input:checked ~ .toggle__track:after {
  transform: translateX(20px);
}
.ext-form-toggle__label,
.app .toggle__label {
  font-size: 0.9rem;
}
.ext-form-textarea,
.app textarea.form-input {
  resize: vertical;
  min-height: 80px;
  height: auto;
  width: 100%;
  border-color: var(--admin-border);
  padding: 5px;
}
/* Form layout */
.app {
  /* Form elements */
  /* In-card informational block. Use for "always on / can't change" style
	   notices that apply to the whole form rather than a single field. */
  /* Two-column form row */
  /* Section heading */
  /* Toggle switch */
  /* Toggle row */
  /* Username field with change button */
  /* Password field with visibility toggle */
  /* Password strength */
  /* Drop zone */
}
.app .form-required {
  color: var(--admin-danger, #a94442);
  margin-left: 0.15em;
}
.app .form-hint {
  /* Links inside hint text — e.g. the 2FA "send the code by email
		   instead" fallback on VerifyCode. Without this they render in the
		   browser's default blue, which is barely legible against the dark
		   theme's card surface. --admin-accent is theme-aware (branded in
		   light, #4db3ff in dark), so one rule covers both. */
}
.app .form-hint--success {
  color: var(--admin-success, #0a6242);
}
.app .form-hint--error {
  color: var(--admin-danger, #a94442);
}
.app .form-hint a {
  color: var(--admin-accent, #3363AF);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}
.app .form-hint a:hover,
.app .form-hint a:focus {
  color: var(--admin-accent-hover, #20406e);
}
.app .form-hint a:focus-visible {
  outline: 2px solid var(--admin-accent, #3363AF);
  outline-offset: 2px;
  border-radius: 2px;
}
.app .admin-notice {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.75rem 0.9rem;
  margin-top: 1rem;
  background: var(--admin-accent-subtle, #edf2f8);
  border: 1px solid var(--admin-border, #d8dde4);
  border-radius: var(--admin-radius-sm, 4px);
  font-size: 0.82rem;
  color: var(--admin-text, #333);
  line-height: 1.45;
}
.app .admin-notice__icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 1px;
  background-color: var(--admin-accent, #4a6a94);
  -webkit-mask: url("/Content/images/Icons/icon-information-white.svg") no-repeat center / contain;
  mask: url("/Content/images/Icons/icon-information-white.svg") no-repeat center / contain;
}
.app .admin-notice__body {
  flex: 1;
}
.app .admin-notice__body strong {
  font-weight: 600;
}
.app .user-form__toggles {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}
.app .user-form__toggles .form-group {
  margin-bottom: 0;
}
.app .import-dropzone--compact {
  padding: 1.25rem 1rem;
}
.app .import-dropzone--compact .import-dropzone__icon {
  width: 32px;
  height: 32px;
  margin-bottom: 0.5rem;
}
.app .import-dropzone--compact .import-dropzone__text {
  font-size: 0.85rem;
}
/**
 * Popup form styles — popups get moved to document.body (outside .app),
 * so admin form classes don't apply. Duplicate the essentials here unscoped.
 */
.battersea-popup-overlay {
  /* Two-column form row */
  /* Section heading */
  /* Password field with toggle */
  /* Required field indicator */
  /* Validation error state */
  /* Inline error message (hidden by default, shown by JS) */
  /* Form-level alert banner */
}
@media (max-width: 640px) {
  .battersea-popup-overlay .form-row {
    grid-template-columns: 1fr;
  }
}
.battersea-popup-overlay .form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 5l3 3 3-3' fill='none' stroke='%237c8091' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2rem;
}
.battersea-popup-overlay .form-hint {
  display: block;
}
.battersea-popup-overlay .search-panel__close {
  background: none;
  border: none;
  font-size: 1.25rem;
  color: var(--admin-text-muted, #7c8091);
  cursor: pointer;
  padding: 0 0.25rem;
  line-height: 1;
}
.battersea-popup-overlay .search-panel__close:hover {
  color: var(--admin-text, #3d3d4e);
}
.battersea-popup-overlay .required {
  color: var(--admin-danger, #e53935);
  font-weight: 600;
}
.battersea-popup-overlay .battersea-form-field--error {
  border-color: var(--admin-danger, #e53935) !important;
}
.battersea-popup-overlay .battersea-form-field--error:focus {
  box-shadow: 0 0 0 3px rgba(229, 57, 53, 0.15) !important;
}
.battersea-popup-overlay .import-form-alert {
  padding: 0.625rem 0.875rem;
  font-size: 0.8rem;
  color: var(--admin-danger, #e53935);
  background: rgba(229, 57, 53, 0.06);
  border: 1px solid rgba(229, 57, 53, 0.2);
  border-radius: var(--admin-radius-sm, 6px);
  margin-bottom: 1rem;
}
/* textarea was omitted here, so multi-line fields (e.g. the seat-report
   Recipients box) kept the browser-default white background in dark mode.
   Element-level specificity means widget-specific textareas (pb-source,
   RTE source) still win with their own class rules. */
input:not([type="range"]):not([type="checkbox"]):not([type="radio"]),
select {
  font-size: 0.9rem;
  /* rem, not px, so the field grows with the accessibility text-size
	   slider (it scales the root font size); 38px at the 14px root. */
  min-height: 2.71428571rem;
  height: 2.71428571rem;
  font-family: inherit;
}
select {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 2rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23666' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.65rem center;
  background-size: 0.71428571rem 0.42857143rem;
  cursor: pointer;
}
/* Disabled fields. Until 2026-09-23 a disabled .form-input looked identical
   to a live one, so a Company Admin on a shared Core module could not tell
   which Settings were locked (the server ignored the fields either way). */
.form-input:disabled,
.form-select:disabled,
textarea.form-input:disabled {
  background: var(--admin-input-readonly-bg, #f3f4f6);
  color: var(--admin-text-muted, #7c8091);
  cursor: not-allowed;
}
.toggle input:disabled ~ .toggle__track,
.toggle input:disabled ~ .toggle__label {
  opacity: 0.5;
  cursor: not-allowed;
}
input[type="radio"]:disabled,
input[type="radio"]:disabled + span {
  opacity: 0.5;
  cursor: not-allowed;
}
/**
 * Admin Shimmer
 * Self-contained shimmer text class for the admin shell.
 *
 * The original `.shimmer-text` lives in `Content/less/typography.less`
 * (with the matching `@keyframes shimmer` in `animation.less`), but the
 * admin bundle (`admin.less`) doesn't import either of those files —
 * they belong to the legacy customer / training stylesheet chain.
 *
 * This redefines just the bits the admin shell needs so the loading-
 * text + button-working states from `battersea-shimmer.js` render
 * properly.
 */
@keyframes shimmer-admin {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: -100% 0;
  }
}
.shimmer-text {
  background: linear-gradient(90deg, #4a4a6a 0%, #4a4a6a 35%, #e8e8f0 50%, #4a4a6a 65%, #4a4a6a 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer-admin 2.5s ease-in-out infinite;
  /* Letting it shrink to text width keeps the gradient lined up
       with the actual characters rather than the parent block. */
  display: inline-block;
}
@media (prefers-reduced-motion: reduce) {
  .shimmer-text {
    animation: none;
    -webkit-text-fill-color: currentColor;
  }
}
/**
 * Admin badges
 * Bradges styling
 * Battersea Systems LMS
 */
.app {
  /* Role badge */
  /* Test user badge */
}
.app .role-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15em 0.5em;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 3px;
  white-space: nowrap;
  background: var(--admin-surface-muted, #f0f0f0);
  color: var(--admin-text-muted, #666);
}
.app .role-badge--admin {
  background: rgba(68, 108, 169, 0.1);
  color: #446ca9;
}
.app .test-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.1em 0.4em;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  border-radius: 2px;
  background: rgba(198, 138, 10, 0.15);
  color: #9a6e0a;
  margin-left: 0.4em;
  vertical-align: middle;
}
/**
 * Admin Breadcrumbs
 * Breadcrumb styling
 * Battersea Systems LMS
 */
.app {
  /* Breadcrumb */
}
.app .breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  margin-bottom: 1rem;
  color: var(--admin-text-muted);
}
.app .breadcrumb a {
  color: var(--admin-accent);
  text-decoration: none;
}
.app .breadcrumb a:hover {
  text-decoration: underline;
}
.breadcrumb__separator {
  color: var(--admin-border-strong, #ccc);
}
/**
 * Admin Dashboard
 * Quick actions, dashboard grid, detail list, activity timeline,
 * org tree, context banner — used on the Company Dashboard page
 * Battersea Systems LMS
 */
/* ─── Context Banner (Super Admin viewing a company) ─── */
.context-banner {
  background: var(--admin-accent-subtle, #edf2f8);
  border-bottom: 1px solid var(--admin-border);
  padding: 0.5rem 2rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.82rem;
  color: var(--admin-accent, #4a6a94);
  margin: -1.5rem -2rem 1.5rem;
}
.context-banner__text {
  flex: 1;
}
.context-banner__text strong {
  font-weight: 600;
}
.context-banner__dismiss {
  width: 24px;
  height: 24px;
  border: none;
  background: transparent;
  color: currentColor;
  cursor: pointer;
  border-radius: var(--admin-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.context-banner__dismiss:hover {
  background: rgba(0, 0, 0, 0.06);
}
/* ─── Quick Actions Banner ─── */
.quick-actions-banner {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.quick-action {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.25rem;
  background: var(--admin-surface);
  border: 1px solid var(--admin-border);
  border-radius: 6px;
  text-decoration: none;
  color: var(--admin-text);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
  flex: 1;
  min-width: 0;
  justify-content: center;
}
.quick-action:hover {
  border-color: var(--admin-accent);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
.quick-action__icon {
  width: var(--admin-icon-size);
  height: var(--admin-icon-size);
  flex-shrink: 0;
  display: inline-block;
  background-color: var(--admin-text-muted);
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  transition: background-color 0.15s;
}
.quick-action:hover .quick-action__icon {
  background-color: var(--admin-accent);
}
/* ─── Dashboard Grid (60/40) ─── */
.dashboard__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media only screen and (min-width: 992px) {
  .dashboard__grid {
    grid-template-columns: 3fr 2fr;
  }
}
.dashboard__col {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
/* ─── Admin Card Footer Link ─── */
.admin-card__footer-link {
  font-size: 0.85rem;
  color: var(--admin-accent);
  text-decoration: none;
  font-weight: 500;
}
.admin-card__footer-link:hover {
  text-decoration: underline;
}
.admin-card__empty {
  color: var(--admin-text-muted);
  font-size: 0.88rem;
  padding: 1rem 0;
}
/* ─── KPI Sub-text ─── */
.kpi-card__sub {
  font-size: 0.8rem;
  color: var(--admin-text-muted);
  margin-top: 0.25rem;
}
/* ─── Activity Timeline ─── */
.activity-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.activity-list__item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--admin-border-light, #f0f0f0);
}
.activity-list__item:last-child {
  border-bottom: none;
}
.activity-list__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 0.4rem;
  background: var(--admin-border);
}
.activity-list__dot--success {
  background: var(--admin-status-active);
}
.activity-list__dot--info {
  background: var(--admin-status-info);
}
.activity-list__dot--warning {
  background: var(--admin-status-warning);
}
.activity-list__dot--danger {
  background: var(--admin-status-danger);
}
.activity-list__content {
  flex: 1;
  font-size: 0.88rem;
  color: var(--admin-text);
  line-height: 1.45;
}
.activity-list__name {
  font-weight: 600;
}
.activity-list__time {
  font-size: 0.78rem;
  color: var(--admin-text-muted);
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 0.1rem;
}
/* ─── Detail List (label/value pairs) ─── */
.detail-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
}
.detail-list__item {
  display: flex;
  flex-direction: column;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--admin-border-light, #f0f0f0);
}
.detail-list__item--full {
  grid-column: 1 / -1;
}
.detail-list__item:nth-last-child(-n+2) {
  border-bottom: none;
}
.detail-list__label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--admin-text-muted);
  font-weight: 600;
  margin-bottom: 0.15rem;
}
.detail-list__value {
  font-size: 0.88rem;
  color: var(--admin-text);
}
.detail-list__value a {
  color: var(--admin-accent);
  text-decoration: none;
}
.detail-list__value a:hover {
  text-decoration: underline;
}
/* ─── Organisation Tree ─── */
.org-tree {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.88rem;
}
.org-tree__item {
  padding: 0.35rem 0;
}
.org-tree__branch {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--admin-text);
  font-weight: 500;
}
.org-tree__icon {
  width: 14px;
  height: 14px;
  display: inline-block;
  background-color: var(--admin-text-muted);
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  flex-shrink: 0;
}
.org-tree__count {
  font-size: 0.78rem;
  color: var(--admin-text-muted);
  font-weight: 400;
}
.org-tree__children {
  list-style: none;
  padding-left: 1.5rem;
  border-left: 1px solid var(--admin-border);
  margin-left: 0.5rem;
  margin-top: 0.2rem;
}
.org-tree__children .org-tree__branch {
  font-weight: 400;
}
/* ─── Rate Badges ─── */
.rate-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15em 0.5em;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: 3px;
  white-space: nowrap;
}
.rate-badge--good {
  background: rgba(10, 98, 66, 0.1);
  color: var(--admin-status-active);
}
.rate-badge--ok {
  background: rgba(198, 138, 10, 0.12);
  color: var(--admin-status-warning);
}
.rate-badge--poor {
  background: rgba(169, 68, 66, 0.1);
  color: var(--admin-status-danger);
}
/* ─── Responsive ─── */
@media only screen and (max-width: 768px) {
  .quick-actions-banner {
    flex-wrap: wrap;
  }
  .quick-actions-banner .quick-action {
    flex: 0 1 auto;
  }
}
/**
 * Admin Popup Content Patterns
 * Styling for popup content inside Battersea Popup overlay
 * Patterns: confirm-dialog (simple confirmations), search-panel (interactive search)
 * Battersea Systems LMS
 */
/* Ensure popups (moved to body by JS) inherit the admin font and button styles.
   The popup overlay sits outside .app so .app .btn rules don't reach it.
   .bcu-overlay (crop-on-upload modal, admin-crop.less) is body-appended
   the same way, so it rides the same block.
   NB: `.battersea-popup-overlay .btn:hover` outranks every variant's
   non-hover rule (extra pseudo-class) AND, because this file is imported
   after admin-buttons.less, ties-and-beats the variants' own :hover rules
   from there — so every filled variant must re-declare background/border/
   colour in a :hover block IN THIS FILE or it washes out grey on hover. */
.battersea-popup-overlay,
.bcu-overlay,
.library-clash-overlay {
  font-family: var(--admin-font-family);
  /* Explicit button overrides for popup content. The legacy `.btn` in
	   buttons-new.less (loaded by battersea_system.less on the pre-auth pages)
	   is unscoped and leaks into the popup, washing the buttons out. These
	   rules pin the popup buttons to the admin look-and-feel regardless of
	   whatever .btn the legacy bundle injects. */
  /* The variant hover blocks must re-declare background + border-color:
	   the base `.btn:hover` above has HIGHER specificity than the variants'
	   non-hover rules (three simple selectors vs two), so without these the
	   hover washed the buttons out to light grey with white text. */
  /* Deactivate on the Users and Administrators confirms. Was the one
	   variant not pinned here, so hovering it washed to white on white. */
  /* Accent / secondary live in admin-buttons.less, but this file loads
	   later, so its `.btn:hover` above outranks their hover backgrounds
	   inside the popup — pin them here like the variants above. */
}
.battersea-popup-overlay div[data-popup],
.bcu-overlay div[data-popup],
.library-clash-overlay div[data-popup] {
  padding: 0;
}
.battersea-popup-overlay .btn,
.bcu-overlay .btn,
.library-clash-overlay .btn {
  background: var(--admin-surface, #fff);
  background-image: none;
  color: var(--admin-text, #1f2937);
  border: 1px solid var(--admin-border, #d1d5db);
  box-shadow: none;
  padding: 0.55rem 1.25rem;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-radius: var(--admin-radius-sm, 4px);
  cursor: pointer;
}
.battersea-popup-overlay .btn:hover,
.bcu-overlay .btn:hover,
.library-clash-overlay .btn:hover {
  background: var(--admin-bg, #f3f4f6);
  background-image: none;
  border-color: var(--admin-text-muted, #6b7280);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}
.battersea-popup-overlay .btn-primary,
.bcu-overlay .btn-primary,
.library-clash-overlay .btn-primary {
  background: var(--primary1, #2563eb);
  background-image: none;
  border-color: var(--primary1, #2563eb);
  color: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}
.battersea-popup-overlay .btn-primary:hover,
.bcu-overlay .btn-primary:hover,
.library-clash-overlay .btn-primary:hover {
  background: var(--primary1, #2563eb);
  border-color: var(--primary1, #2563eb);
  filter: brightness(0.92);
  background-image: none;
  color: #fff;
}
.battersea-popup-overlay .btn-danger,
.bcu-overlay .btn-danger,
.library-clash-overlay .btn-danger {
  background: var(--admin-status-danger, #a94442);
  background-image: none;
  border-color: var(--admin-status-danger, #a94442);
  color: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}
.battersea-popup-overlay .btn-danger:hover,
.bcu-overlay .btn-danger:hover,
.library-clash-overlay .btn-danger:hover {
  background: var(--admin-status-danger, #a94442);
  border-color: var(--admin-status-danger, #a94442);
  filter: brightness(0.92);
  color: #fff;
  background-image: none;
}
.battersea-popup-overlay .btn-success,
.bcu-overlay .btn-success,
.library-clash-overlay .btn-success {
  background: var(--admin-status-active, #1f7a3a);
  background-image: none;
  border-color: var(--admin-status-active, #1f7a3a);
  color: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}
.battersea-popup-overlay .btn-success:hover,
.bcu-overlay .btn-success:hover,
.library-clash-overlay .btn-success:hover {
  background: var(--admin-status-active, #1f7a3a);
  border-color: var(--admin-status-active, #1f7a3a);
  filter: brightness(0.92);
  color: #fff;
  background-image: none;
}
.battersea-popup-overlay .btn-warning,
.bcu-overlay .btn-warning,
.library-clash-overlay .btn-warning {
  background: var(--admin-status-warning, #f0b429);
  background-image: none;
  border-color: var(--admin-status-warning, #f0b429);
  color: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}
.battersea-popup-overlay .btn-warning:hover,
.bcu-overlay .btn-warning:hover,
.library-clash-overlay .btn-warning:hover {
  background: var(--admin-status-warning, #f0b429);
  border-color: var(--admin-status-warning, #f0b429);
  filter: brightness(0.92);
  color: #fff;
  background-image: none;
}
.battersea-popup-overlay .btn-accent:hover,
.bcu-overlay .btn-accent:hover,
.library-clash-overlay .btn-accent:hover {
  background: var(--admin-accent-hover);
  border-color: var(--admin-accent-hover);
  color: #fff;
  background-image: none;
}
.battersea-popup-overlay .btn-secondary:hover,
.bcu-overlay .btn-secondary:hover,
.library-clash-overlay .btn-secondary:hover {
  background: var(--secondary1);
  border-color: var(--secondary1);
  filter: brightness(0.92);
  color: #fff;
  background-image: none;
}
/* ---- Confirm dialog ---- */
.confirm-dialog {
  text-align: center;
  /* Form variant — left-aligns labels / titles / body text so the
	   dialog reads as a form rather than a confirm prompt. Apply to
	   the library Edit-Item / folder-rename / Save-as-Layout popups. */
}
.confirm-dialog__body {
  padding: 1.5rem 1rem;
  text-align: center;
}
.confirm-dialog__icon {
  margin-bottom: 0.75rem;
  /* When callers drop an <img> in (instead of a masked <span>)
		   it otherwise renders at the SVG's native viewBox size —
		   on icon-bin.svg that's huge. Cap it to match the span. */
}
.confirm-dialog__icon span {
  display: inline-block;
  width: calc(var(--admin-icon-size) + 28px);
  height: calc(var(--admin-icon-size) + 28px);
  background-color: var(--admin-status-warning);
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}
.confirm-dialog__icon img {
  display: inline-block;
  width: calc(var(--admin-icon-size) + 28px);
  height: calc(var(--admin-icon-size) + 28px);
  object-fit: contain;
}
.confirm-dialog__title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--admin-text-heading);
  margin: 0 0 0.5rem;
}
.confirm-dialog__message {
  font-size: 0.9rem;
  color: var(--admin-text-muted);
  margin: 0;
  line-height: 1.5;
}
.confirm-dialog__actions {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--admin-border);
  background: var(--admin-surface-alt, #fafbfc);
  border-radius: 0 0 var(--admin-radius) var(--admin-radius);
}
.confirm-dialog__icon--delete {
  -webkit-mask-image: url(/Content/images/Icons/icon-alert-white.svg);
  mask-image: url(/Content/images/Icons/icon-alert-white.svg);
}
.confirm-dialog--danger .confirm-dialog__icon span {
  background-color: var(--admin-status-danger);
}
.confirm-dialog--form {
  text-align: left;
}
.confirm-dialog--form .confirm-dialog__body {
  text-align: left;
  padding: 1.25rem 1.25rem 0.5rem;
}
.confirm-dialog--form .confirm-dialog__title {
  text-align: left;
  margin: 0 0 0.75rem;
}
.confirm-dialog--form .confirm-dialog__message {
  text-align: left;
  margin: 0 0 1rem;
}
.confirm-dialog--form .confirm-dialog__actions {
  justify-content: flex-end;
}
.confirm-dialog--form .form-group {
  margin-bottom: 0.85rem;
  text-align: left;
}
.confirm-dialog--form .form-group label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--admin-text-muted);
  margin-bottom: 0.3rem;
  text-align: left;
}
.confirm-dialog--form .form-group .form-control {
  display: block;
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius-sm);
  background: var(--admin-surface);
  color: var(--admin-text);
  font: inherit;
  font-size: 0.9rem;
  box-sizing: border-box;
}
.confirm-dialog--form .form-group .form-control:focus {
  outline: 2px solid var(--primary1);
  outline-offset: -1px;
  border-color: var(--primary1);
}
.confirm-dialog--form .form-group textarea.form-control {
  min-height: 90px;
  resize: vertical;
}
.confirm-dialog--form .form-error {
  color: var(--admin-status-danger, #c0392b);
  font-size: 0.85rem;
  margin: 0.5rem 0 0;
  text-align: left;
}
.battersea-popup-overlay .admin-card__header {
  justify-content: space-between;
  padding: 1rem 1.25rem;
}
.battersea-popup-overlay .admin-card__title {
  font-size: 1rem;
}
.battersea-popup-overlay .admin-card__footer {
  padding: 1rem 1.25rem;
}
/* ---- Search Panel ----
   Interactive search content for popups (user lookup, module search, etc).
   Override --battersea-popup-max-width on the [data-popup] element for wider panels. */
.search-panel__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--admin-border);
}
.search-panel__title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--admin-text-heading);
  margin: 0;
}
.search-panel__close {
  background: none;
  border: none;
  font-size: 1.4rem;
  color: var(--admin-text-muted);
  cursor: pointer;
  padding: 0 0.25rem;
  line-height: 1;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--admin-radius-sm);
}
.search-panel__close:hover {
  color: var(--admin-text);
  background: var(--admin-accent-subtle);
}
.search-panel__search {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--admin-border-light);
  background: var(--admin-bg);
}
.search-panel__search input,
.search-panel__search select {
  font-family: inherit;
  font-size: 0.9rem;
  padding: 0.5rem 0.75rem;
  height: auto;
  min-height: auto;
  border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius-sm);
  background: var(--admin-surface);
  color: var(--admin-text);
  outline: none;
}
.search-panel__search input {
  flex: 1;
  min-width: 0;
}
.search-panel__search input:focus {
  border-color: var(--admin-accent);
  box-shadow: 0 0 0 2px rgba(34, 157, 245, 0.15);
}
.search-panel__search select {
  min-width: 160px;
  max-width: 220px;
}
.search-panel__body {
  max-height: 400px;
  overflow-y: auto;
}
.search-panel__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.search-panel__table th {
  background: var(--datatable-header-bg, #eaeaea);
  color: var(--datatable-header-color, #555);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.5rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--admin-border);
}
.search-panel__table td {
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--admin-border-light);
  color: var(--admin-text);
  vertical-align: middle;
}
.search-panel__table tbody tr:hover td {
  background: var(--datatable-row-hover-bg, #fafbfc);
}
.search-panel__table tbody tr:last-child td {
  border-bottom: none;
}
.search-panel__user-name {
  font-weight: 600;
  color: var(--admin-text-heading);
}
.search-panel__user-detail {
  font-size: 0.8rem;
  color: var(--admin-text-muted);
}
.search-panel__action-cell {
  text-align: right;
  width: 50px;
}
.search-panel__action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: none;
  background: transparent;
  border-radius: var(--admin-radius-sm);
  cursor: pointer;
  transition: background 0.15s;
}
.search-panel__action-btn:hover {
  background: var(--admin-accent-subtle);
}
.search-panel__action-btn:hover .search-panel__action-icon {
  background-color: var(--admin-accent);
}
.search-panel__footer {
  text-align: center;
  padding: 0.6rem 1rem;
  font-size: 0.8rem;
  color: var(--admin-text-muted);
  border-top: 1px solid var(--admin-border-light);
}
.search-panel__empty {
  text-align: center;
  padding: 2.5rem 1.5rem;
  color: var(--admin-text-muted);
  font-size: 0.9rem;
}
.search-panel__empty-icon {
  display: inline-block;
  width: 40px;
  height: 40px;
  margin-bottom: 0.75rem;
  background-color: var(--admin-text-muted);
  opacity: 0.4;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}
.search-panel__loading {
  text-align: center;
  padding: 2.5rem 1.5rem;
  color: var(--admin-text-muted);
  font-size: 0.9rem;
}
.search-panel__spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid var(--admin-border);
  border-top-color: var(--admin-accent);
  border-radius: 50%;
  animation: admin-spin 0.6s linear infinite;
  vertical-align: middle;
  margin-right: 0.5rem;
}
/**
 * Admin Filter Bar
 * Search and filter controls for list pages
 * Battersea Systems LMS
 */
.filter-bar {
  display: grid;
  gap: 0.75rem;
  padding: 1rem;
  background: var(--admin-filter-bg);
  border: 1px solid var(--admin-filter-border);
  border-radius: var(--admin-filter-radius);
  margin-bottom: 1rem;
}
@media only screen and (min-width: 768px) {
  .filter-bar {
    grid-template-columns: 1fr auto auto;
    align-items: end;
  }
}
.filter-bar__search {
  display: flex;
  gap: 0.5rem;
}
.filter-bar__search input {
  flex: 1;
  min-width: 0;
}
.filter-bar__filters {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.filter-bar__filters select,
.filter-bar__filters input {
  min-width: 140px;
  width: auto;
}
.filter-bar__filters input[type="date"] {
  min-width: 0;
  width: 9.5rem;
  max-width: 9.5rem;
  flex: 0 0 9.5rem;
}
.filter-bar__actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.filter-bar--compact {
  background: none;
  border: none;
  padding: 0;
  margin-bottom: 0.75rem;
}
/**
 * Admin Footer
 * Product logo, version, copyright, powered-by
 * Battersea Systems LMS
 *
 * Un-scoped from .app so the same footer styles apply to the
 * training layout too (Training pages include admin-footer.less
 * via training-common.less so the _AdminFooter partial renders
 * consistently there). .app only gave us the grid-area hook; we
 * keep that line scoped so it doesn't affect training, which has
 * a non-grid layout.
 */
.app .footer {
  grid-area: footer;
}
.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  min-height: var(--admin-footer-height, 44px);
  font-size: 0.75rem;
  color: var(--admin-text-muted);
  border-top: 1px solid var(--admin-border);
  background: var(--admin-surface);
}
.footer__left,
.footer__centre,
.footer__right {
  display: flex;
  align-items: center;
}
.footer__left {
  flex: 1;
}
.footer__centre {
  flex: 0 0 auto;
  gap: 0.4rem;
}
.footer__right {
  flex: 1;
  justify-content: flex-end;
}
.footer__product-logo {
  display: flex;
  align-items: center;
  opacity: 0.6;
  transition: opacity 0.15s;
}
.footer__product-logo:hover {
  opacity: 1;
}
.footer__product-logo-light,
.footer__product-logo-dark {
  display: inline-block;
  width: 120px;
  height: var(--admin-product-logo-height, 18px);
  max-height: 26px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: left center;
}
.footer__product-logo-light {
  background-image: var(--admin-product-logo);
}
.footer__product-logo-dark {
  background-image: var(--admin-product-logo-dark);
  display: none;
}
.footer__meta {
  font-size: 0.68rem;
  color: var(--admin-text-muted);
  opacity: 0.6;
}
.footer__meta a {
  color: var(--admin-text-muted);
  text-decoration: none;
}
.footer__meta a:hover {
  color: var(--admin-text);
}
.footer__powered-by {
  display: flex;
  align-items: center;
  opacity: 0.6;
  transition: opacity 0.15s;
}
.footer__powered-by:hover {
  opacity: 1;
}
.footer__powered-by img {
  display: block;
  height: 16px;
  width: auto;
}
.footer__powered-by .footer__powered-by-dark {
  display: none;
}
@media (max-width: 768px) {
  .footer {
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    gap: 0.5rem;
    min-height: 0;
    padding: 0.75rem 1rem;
  }
  .footer__left,
  .footer__right {
    flex: 0 0 auto;
    justify-content: center;
  }
  .footer__product-logo-light,
  .footer__product-logo-dark {
    background-position: center;
  }
  .footer__centre {
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
    max-width: 100%;
    row-gap: 0.25rem;
  }
  .footer__centre .footer__meta:last-child {
    flex-basis: 100%;
    text-align: center;
  }
  .footer__centre .footer__meta:nth-last-child(2) {
    display: none;
  }
}
/**
 * Admin Header
 * Top bar with breadcrumb, actions, user info
 * Battersea Systems LMS
 */
.app {
  /* Breadcrumb */
  /* Company context header (shown when viewing a company) */
  /* Action buttons */
  /* Header icons — mask-image */
  /* User info */
  /* Header brand — used by _LearnerHeader. Holds the customer logo on the
     left of the bar and acts as a click-through to the learner's home page. */
}
.app .header {
  grid-area: header;
  background: var(--admin-surface);
  border-bottom: 1px solid var(--admin-border);
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  gap: 1rem;
  z-index: 20;
  position: sticky;
  top: 0;
}
.app .header__breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--admin-text-muted);
}
.app .header__breadcrumb a {
  color: var(--admin-text-muted);
  text-decoration: none;
  transition: color 0.15s;
}
.app .header__breadcrumb a:hover {
  color: var(--admin-accent);
}
.app .header__breadcrumb-sep {
  font-size: 0.7rem;
  opacity: 0.5;
}
.app .header__breadcrumb-current {
  color: var(--admin-text);
  font-weight: 500;
}
.app .header__company {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--admin-text-heading);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.app .header__company-suffix {
  font-weight: 400;
  color: var(--admin-text-muted);
  margin-left: 0.25rem;
}
.app .header__spacer {
  flex: 1;
}
.app .header__actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.app .header__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--admin-radius);
  border: none;
  background: transparent;
  color: var(--admin-text-muted);
  cursor: pointer;
  position: relative;
  transition: background 0.15s, color 0.15s;
}
.app .header__btn:hover {
  background: var(--admin-accent-subtle);
  color: var(--admin-accent);
}
.app .header__btn--logout:hover {
  background: var(--admin-status-danger-bg);
  color: var(--admin-status-danger);
}
.app .header__btn .badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--admin-status-danger);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  box-shadow: 0 0 0 2px var(--admin-surface, #fff);
  border: none;
  display: inline-block;
}
.app .header__icon {
  display: block;
  width: var(--admin-icon-size);
  height: var(--admin-icon-size);
  background-color: currentColor;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}
.app .header__divider {
  width: 1px;
  height: 24px;
  background: var(--admin-border);
  margin: 0 0.5rem;
}
.app .header__user {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.35rem 0.75rem 0.35rem 0.35rem;
  border-radius: var(--admin-radius);
  cursor: pointer;
  transition: background 0.15s;
  border: none;
  background: transparent;
  color: var(--admin-text);
  text-decoration: none;
  font-size: inherit;
  font-family: inherit;
}
.app .header__user:hover {
  background: var(--admin-bg);
  color: var(--admin-text);
}
.app .header__avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--admin-accent);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.app .header__user-info {
  text-align: left;
  line-height: 1.25;
}
.app .header__user-name {
  font-weight: 500;
  font-size: 0.85rem;
  color: var(--admin-text);
}
.app .header__user-role {
  font-size: 0.72rem;
  color: var(--admin-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.app .header__brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
}
.app .header__brand-logo {
  display: inline-flex;
  align-items: center;
  max-height: 32px;
}
/**
 * Admin icons
 * CSS icons
 * Battersea Systems LMS
 */
.ext-icons-base,
.context-banner__icon,
.search-panel__action-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  display: inline-block;
  background-color: currentColor;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}
.ext-icon--alert,
.app .header__icon--alert {
  -webkit-mask-image: url("/content/images/Icons/icon-alert-white.svg");
  mask-image: url("/content/images/Icons/icon-alert-white.svg");
}
.ext-icon--archive,
.app .data-table__action-icon--archive {
  -webkit-mask-image: url("/content/images/Icons/icon-safe-open-white.svg");
  mask-image: url("/content/images/Icons/icon-safe-open-white.svg");
}
.ext-icon--audit,
.app .sidebar__link-icon--audit {
  -webkit-mask-image: url("/content/images/Icons/icon-audit-white.svg");
  mask-image: url("/content/images/Icons/icon-audit-white.svg");
}
.ext-icon--auto,
.app .utility__icon--auto {
  -webkit-mask-image: url("/content/images/Icons/icon-light-dark-white.svg");
  mask-image: url("/content/images/Icons/icon-light-dark-white.svg");
}
.ext-icon--bin,
.app .data-table__action-icon--bin {
  -webkit-mask-image: url("/content/images/Icons/icon-bin-white.svg");
  mask-image: url("/content/images/Icons/icon-bin-white.svg");
}
.ext-icon--back,
.app .header__icon--back {
  -webkit-mask-image: url("/content/images/Icons/icon-back-white.svg");
  mask-image: url("/content/images/Icons/icon-back-white.svg");
}
.ext-icon--board,
.app .sidebar__link-icon--board {
  -webkit-mask-image: url("/content/images/Icons/icon-board-white.svg");
  mask-image: url("/content/images/Icons/icon-board-white.svg");
}
.ext-icon--book,
.app .sidebar__link-icon--book {
  -webkit-mask-image: url("/content/images/Icons/icon-book-white.svg");
  mask-image: url("/content/images/Icons/icon-book-white.svg");
}
.ext-icon--brand,
.app .sidebar__link-icon--brand {
  -webkit-mask-image: url("/content/images/Icons/icon-brand-white.svg");
  mask-image: url("/content/images/Icons/icon-brand-white.svg");
}
.ext-icon--box,
.ext-import-dropzone__icon,
.app .sidebar__link-icon--box,
.app .import-dropzone__icon {
  -webkit-mask-image: url('/Content/images/Icons/icon-box-white.svg');
  mask-image: url('/Content/images/Icons/icon-box-white.svg');
}
.ext-icon--chat,
.quick-action__icon--chat,
.app .header__icon--chat,
.app .sidebar__link-icon--chat {
  -webkit-mask-image: url("/content/images/Icons/icon-chat-white.svg");
  mask-image: url("/content/images/Icons/icon-chat-white.svg");
}
.ext-icon--cog,
.app .sidebar__link-icon--cog,
.app .data-table__action-icon--cog {
  -webkit-mask-image: url("/content/images/Icons/icon-cog-white.svg");
  mask-image: url("/content/images/Icons/icon-cog-white.svg");
}
.ext-icon--copy,
.app .data-table__action-icon--copy {
  -webkit-mask-image: url("/content/images/Icons/icon-copy-white.svg");
  mask-image: url("/content/images/Icons/icon-copy-white.svg");
}
.ext-icon--dark,
.app .utility__icon--dark {
  -webkit-mask-image: url("/content/images/Icons/icon-dark-white.svg");
  mask-image: url("/content/images/Icons/icon-dark-white.svg");
}
.ext-icon--dashboard,
.app .header__icon--dashboard,
.app .header__icon--admin,
.app .sidebar__link-icon--dashboard {
  -webkit-mask-image: url("/content/images/Icons/icon-dashboard-white.svg");
  mask-image: url("/content/images/Icons/icon-dashboard-white.svg");
}
.ext-icon--document,
.app .sidebar__link-icon--document {
  -webkit-mask-image: url("/content/images/Icons/icon-document-white.svg");
  mask-image: url("/content/images/Icons/icon-document-white.svg");
}
.ext-icon--download,
.app .import-action-link__icon--download {
  -webkit-mask-image: url('/Content/images/Icons/icon-download-white.svg');
  mask-image: url('/Content/images/Icons/icon-download-white.svg');
}
.ext-icon--edit,
.app .data-table__action-icon--edit {
  -webkit-mask-image: url("/content/images/Icons/icon-edit-white.svg");
  mask-image: url("/content/images/Icons/icon-edit-white.svg");
}
.ext-icon--error,
.app .import-results__icon--error {
  background-color: var(--admin-status-danger);
  -webkit-mask-image: url('/Content/images/Icons/icon-cross-white.svg');
  mask-image: url('/Content/images/Icons/icon-cross-white.svg');
}
.ext-icon--eye,
.app .data-table__action-icon--eye {
  -webkit-mask-image: url("/content/images/Icons/icon-visible-white.svg");
  mask-image: url("/content/images/Icons/icon-visible-white.svg");
}
.ext-icon--exit,
.app .header__icon--exit {
  -webkit-mask-image: url("/content/images/Icons/icon-exit-white.svg");
  mask-image: url("/content/images/Icons/icon-exit-white.svg");
}
.ext-icon--export,
.app .import-action-link__icon--export {
  -webkit-mask-image: url('/Content/images/Icons/icon-document-white.svg');
  mask-image: url('/Content/images/Icons/icon-document-white.svg');
}
.ext-icon--glasses,
.context-banner__icon {
  -webkit-mask-image: url("/content/images/Icons/icon-glasses-white.svg");
  mask-image: url("/content/images/Icons/icon-glasses-white.svg");
}
.ext-icon--impersonate,
.search-panel__action-icon,
.app .sidebar__link-icon--glasses {
  -webkit-mask-image: url("/content/images/Icons/icon-impersonate-white.svg");
  mask-image: url("/content/images/Icons/icon-impersonate-white.svg");
}
.ext-icon--help,
.app .header__icon--help,
.app .sidebar__link-icon--help {
  -webkit-mask-image: url("/content/images/Icons/icon-help-white.svg");
  mask-image: url("/content/images/Icons/icon-help-white.svg");
}
.ext-icon--key {
  -webkit-mask-image: url("/content/images/Icons/icon-key-white.svg");
  mask-image: url("/content/images/Icons/icon-key-white.svg");
}
.ext-icon--left,
.app .utility__back-icon,
.learner-back-link__icon,
body.learner-shell .btn-arrow--left {
  -webkit-mask-image: url("/content/images/Icons/icon-left-white.svg");
  mask-image: url("/content/images/Icons/icon-left-white.svg");
}
.ext-icon--light,
.app .utility__icon--light {
  -webkit-mask-image: url("/content/images/Icons/icon-light-white.svg");
  mask-image: url("/content/images/Icons/icon-light-white.svg");
}
.ext-icon--location,
.app .sidebar__link-icon--location {
  -webkit-mask-image: url("/content/images/Icons/icon-location-white.svg");
  mask-image: url("/content/images/Icons/icon-location-white.svg");
}
.ext-icon--lock,
.search-panel__empty-icon--lock {
  -webkit-mask-image: url('/Content/images/Icons/icon-unlock-white.svg');
  mask-image: url('/Content/images/Icons/icon-unlock-white.svg');
}
.ext-icon--module,
.quick-action__icon--module,
.app .sidebar__link-icon--module {
  -webkit-mask-image: url("/content/images/Icons/icon-module-white.svg");
  mask-image: url("/content/images/Icons/icon-module-white.svg");
}
.ext-icon--organisation,
.app .sidebar__link-icon--organisation {
  -webkit-mask-image: url("/content/images/Icons/icon-organisation-white.svg");
  mask-image: url("/content/images/Icons/icon-organisation-white.svg");
}
.ext-icon--people,
.app .sidebar__link-icon--people {
  -webkit-mask-image: url("/content/images/Icons/icon-people-white.svg");
  mask-image: url("/content/images/Icons/icon-people-white.svg");
}
.ext-icon--report,
.quick-action__icon--report,
.app .header__icon--report,
.app .sidebar__link-icon--report {
  -webkit-mask-image: url("/content/images/Icons/icon-report-white.svg");
  mask-image: url("/content/images/Icons/icon-report-white.svg");
}
.ext-icon--search,
.search-panel__empty-icon--search {
  -webkit-mask-image: url('/Content/images/Icons/icon-search-white.svg');
  mask-image: url('/Content/images/Icons/icon-search-white.svg');
}
.ext-icon--settings,
.app .sidebar__link-icon--settings {
  -webkit-mask-image: url("/content/images/Icons/icon-settings-white.svg");
  mask-image: url("/content/images/Icons/icon-settings-white.svg");
}
.ext-icon--shield,
.quick-action__icon--shield,
.app .sidebar__link-icon--shield {
  -webkit-mask-image: url("/content/images/Icons/icon-shield-white.svg");
  mask-image: url("/content/images/Icons/icon-shield-white.svg");
}
.ext-icon--success,
.app .import-results__icon--success {
  background-color: var(--admin-status-active);
  -webkit-mask-image: url('/Content/images/Icons/icon-tick-white.svg');
  mask-image: url('/Content/images/Icons/icon-tick-white.svg');
}
.ext-icon--team,
.org-tree__icon,
.app .sidebar__link-icon--team {
  -webkit-mask-image: url("/content/images/Icons/icon-team-white.svg");
  mask-image: url("/content/images/Icons/icon-team-white.svg");
}
.ext-icon--training,
.app .sidebar__link-icon--training {
  -webkit-mask-image: url("/content/images/Icons/icon-online-training-white.svg");
  mask-image: url("/content/images/Icons/icon-online-training-white.svg");
}
.ext-icon--unlock,
.search-panel__action-icon--unlock,
.app .sidebar__link-icon--unlock {
  -webkit-mask-image: url('/Content/images/Icons/icon-unlock-white.svg');
  mask-image: url('/Content/images/Icons/icon-unlock-white.svg');
}
.ext-icon--upload,
.quick-action__icon--upload {
  -webkit-mask-image: url("/content/images/Icons/icon-upload-white.svg");
  mask-image: url("/content/images/Icons/icon-upload-white.svg");
}
.ext-icon--user,
.quick-action__icon--user,
.search-panel__empty-icon--user {
  -webkit-mask-image: url('/Content/images/Icons/icon-user-white.svg');
  mask-image: url('/Content/images/Icons/icon-user-white.svg');
}
.ext-icon--unarchive,
.app .data-table__action-icon--unarchive {
  -webkit-mask-image: url("/content/images/Icons/icon-safe-white.svg");
  mask-image: url("/content/images/Icons/icon-safe-white.svg");
}
.ext-icon--warning,
.app .import-results__icon--warning {
  background-color: var(--admin-status-warning);
  -webkit-mask-image: url('/Content/images/Icons/icon-alert-white.svg');
  mask-image: url('/Content/images/Icons/icon-alert-white.svg');
}
.ext-icon--add,
.app .sidebar__link-icon--add {
  -webkit-mask-image: url('/Content/images/Icons/icon-add-white.svg');
  mask-image: url('/Content/images/Icons/icon-add-white.svg');
}
.ext-icon--new-folder {
  -webkit-mask-image: url('/Content/images/Icons/icon-new-folder-white.svg');
  mask-image: url('/Content/images/Icons/icon-new-folder-white.svg');
}
.ext-icon--folder,
.quick-action__icon--folder {
  -webkit-mask-image: url('/Content/images/Icons/icon-folder-white.svg');
  mask-image: url('/Content/images/Icons/icon-folder-white.svg');
}
.ext-icon--plus {
  -webkit-mask-image: url('/Content/images/Icons/icon-plus-white.svg');
  mask-image: url('/Content/images/Icons/icon-plus-white.svg');
}
.ext-icon--grip {
  -webkit-mask-image: url('/Content/images/Icons/icon-grip-white.svg');
  mask-image: url('/Content/images/Icons/icon-grip-white.svg');
}
.ext-icon--reset {
  -webkit-mask-image: url('/Content/images/Icons/icon-reset-white.svg');
  mask-image: url('/Content/images/Icons/icon-reset-white.svg');
}
.ext-icon--right,
body.learner-shell .btn-arrow--right {
  -webkit-mask-image: url('/Content/images/Icons/icon-right-white.svg');
  mask-image: url('/Content/images/Icons/icon-right-white.svg');
}
.ext-icon--up,
body.learner-shell .btn-arrow--up {
  -webkit-mask-image: url('/Content/images/Icons/icon-up-white.svg');
  mask-image: url('/Content/images/Icons/icon-up-white.svg');
}
.ext-icon--down,
body.learner-shell .btn-arrow--down {
  -webkit-mask-image: url('/Content/images/Icons/icon-down-white.svg');
  mask-image: url('/Content/images/Icons/icon-down-white.svg');
}
/**
 * Admin Import — Wizard steps, upload zone, summary cards, progress bars
 * Battersea Systems LMS
 */
.app {
  /* Step indicator */
  /* Panels */
  /* Inline progress (upload phase) */
  /* Previous uploads list */
  /* Empty text */
  /* Summary cards (step 2) */
  /* Step navigation */
  /* Import confirmation stats */
  /* Progress bar (import phase) */
  /* Results */
  /* Inactive users intro */
  /* Status cell on review table */
  /* Responsive */
}
.app .import-panel {
  margin-bottom: 1.5rem;
}
.app .import-upload-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--admin-border-light);
  cursor: pointer;
  transition: background 0.1s;
}
.app .import-upload-item:last-child {
  border-bottom: none;
}
.app .import-upload-item:hover {
  background: rgba(0, 0, 0, 0.02);
}
.app .import-upload-item__name {
  font-size: 0.9rem;
  color: var(--admin-text);
  font-weight: 500;
}
.app .import-upload-item__date {
  font-size: 0.8rem;
  color: var(--admin-text-muted);
}
.app .import-upload-item__arrow {
  font-size: 0.8rem;
  color: var(--admin-accent);
}
.app .import-empty-text {
  text-align: center;
  padding: 1.5rem;
  color: var(--admin-text-muted);
  font-size: 0.9rem;
}
.app .import-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1rem;
}
.app .import-summary__value {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--admin-text-heading);
  line-height: 1.2;
}
.app .import-summary__label {
  display: block;
  font-size: 0.8rem;
  color: var(--admin-text-muted);
  margin-top: 0.25rem;
}
.app .import-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px solid var(--admin-border-light);
  margin-top: 1rem;
}
.app .import-nav__right {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.app .import-nav__count {
  font-size: 0.85rem;
  color: var(--admin-text-muted);
  font-weight: 500;
}
.app .import-confirm-stats {
  margin-bottom: 1.5rem;
}
.app .import-confirm-stats__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--admin-border-light);
}
.app .import-confirm-stats__row:last-child {
  border-bottom: none;
}
.app .import-confirm-stats__label {
  font-size: 0.9rem;
  color: var(--admin-text);
}
.app .import-confirm-stats__value {
  font-size: 1rem;
  font-weight: 600;
  color: var(--admin-text-heading);
}
.app .import-confirm-stats__row--warning .import-confirm-stats__value {
  color: var(--admin-status-warning);
}
.app .import-confirm-stats_row--error .import-confirm-stats__value {
  color: var(--admin-status-danger);
}
.app .import-capacity-note {
  font-size: 0.85rem;
  color: var(--admin-text-muted);
  margin: 0 0 1rem;
  padding: 0 1rem;
}
.app .import-results {
  padding: 1rem 0 1.5rem;
}
.app .import-results__row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0;
  font-size: 0.9rem;
}
.app .import-results__icon {
  display: inline-block;
  width: 16px;
  height: 16px;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}
.app .import-inactive-intro {
  font-size: 0.9rem;
  color: var(--admin-text);
  line-height: 1.5;
  margin: 0 0 1.5rem;
  padding: 0.75rem 1rem;
  background: rgba(34, 157, 245, 0.04);
  border: 1px solid rgba(34, 157, 245, 0.15);
  border-radius: var(--admin-radius);
}
.app .import-status-cell {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.app .import-status-cell__message {
  display: block;
  font-size: 0.75rem;
  line-height: 1.3;
  color: var(--admin-text-muted);
}
.app .import-status-cell__message--warning {
  color: var(--admin-status-warning);
}
.app .import-status-cell__message--danger {
  color: var(--admin-status-danger);
}
@media (max-width: 640px) {
  .app .import-summary {
    grid-template-columns: repeat(2, 1fr);
  }
  .app .import-steps__label {
    display: none;
  }
}
/* Pulse animation for indeterminate progress */
@keyframes import-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.6;
  }
}
/**
 * Admin KPI Cards
 * Dashboard metric cards with optional counter animation
 * Battersea Systems LMS
 */
.kpi-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 2.5rem;
}
@media only screen and (min-width: 768px) {
  .kpi-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }
}
.kpi-grid .kpi-card {
  margin-bottom: 0;
}
.kpi-card {
  /* Period selector buttons on flip back */
  /* Dual counter separator */
  /* Subtitle line */
  /* Mini-list for expiring companies */
}
.kpi-card__value {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
  color: var(--admin-text-heading);
}
.kpi-card__label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--admin-text-muted);
  font-weight: 500;
}
.kpi-card__change {
  font-size: 0.8rem;
  font-weight: 500;
  margin-top: 0.25rem;
}
.kpi-card__period-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
  margin-top: 0.5rem;
}
.kpi-card__period-buttons .btn-sm {
  padding: 0.25rem 0.6rem;
  font-size: 0.75rem;
  border-radius: var(--admin-radius-sm);
  min-width: 0;
  text-align: center;
}
.kpi-card__separator {
  font-weight: 300;
  opacity: 0.5;
  margin: 0 0.15em;
}
.kpi-card__subtitle {
  font-size: 0.75rem;
  color: var(--admin-text-muted);
}
.kpi-card__list {
  list-style: none;
  margin: 0.35rem 0 0;
  padding: 0;
  font-size: 0.78rem;
}
.kpi-card__list li {
  display: flex;
  justify-content: space-between;
  padding: 0.2rem 0;
  border-bottom: 1px solid var(--admin-border-light);
}
.kpi-card__list li:last-child {
  border-bottom: none;
}
.kpi-card__list a {
  color: var(--admin-text-heading);
  text-decoration: none;
}
.kpi-card__list a:hover {
  color: var(--admin-accent);
}
.kpi-card__list span {
  color: var(--admin-text-muted);
  white-space: nowrap;
  margin-left: 0.5rem;
}
/**
 * Admin Layout
 * Page structure, content area, and spacing for admin pages
 * Battersea Systems LMS
 * © 2026 Idaho Design and Communication Pty Ltd 12/3/2026
 */
body {
  margin: 0;
  padding: 0;
}
.admin-page {
  max-width: var(--admin-content-max-width);
  padding: var(--admin-content-padding);
  margin: 0 auto;
}
.admin-page__header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--admin-border);
}
.admin-page__title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--admin-text-heading);
  margin: 0;
  line-height: 1.2;
}
.admin-page__subtitle {
  font-size: 0.9rem;
  color: var(--admin-text-muted);
  margin: 0;
}
.admin-page__actions {
  margin-left: auto;
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.admin-page__content {
  display: grid;
  gap: 1.5rem;
}
.admin-section__heading {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--admin-text-heading);
  margin: 0 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--admin-border);
}
.admin-grid {
  display: grid;
  gap: 1.5rem;
}
.admin-grid--2 {
  grid-template-columns: 1fr;
}
@media only screen and (min-width: 768px) {
  .admin-grid--2 {
    grid-template-columns: 1fr 1fr;
  }
}
.admin-grid--3 {
  grid-template-columns: 1fr;
}
@media only screen and (min-width: 570px) {
  .admin-grid--3 {
    grid-template-columns: 1fr 1fr;
  }
}
@media only screen and (min-width: 992px) {
  .admin-grid--3 {
    grid-template-columns: 1fr 1fr 1fr;
  }
}
.admin-grid--4 {
  grid-template-columns: 1fr 1fr;
}
@media only screen and (min-width: 768px) {
  .admin-grid--4 {
    grid-template-columns: 1fr 1fr 1fr 1fr;
  }
}
.admin-grid--sidebar {
  grid-template-columns: 1fr;
}
@media only screen and (min-width: 992px) {
  .admin-grid--sidebar {
    grid-template-columns: 1fr 320px;
  }
}
.admin-card {
  background: var(--admin-surface);
  border: 1px solid var(--admin-border);
  border-radius: 6px;
  padding: 0;
}
.admin-card__header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--admin-border);
}
.admin-card__title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--admin-text-heading);
  margin: 0;
}
.admin-card__actions {
  margin-left: auto;
  display: flex;
  gap: 0.25rem;
}
.admin-card__footer {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--admin-border);
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}
.admin-empty {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--admin-text-muted);
}
.admin-empty__icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  opacity: 0.4;
}
.admin-empty__title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--admin-text);
  margin: 0 0 0.5rem;
}
.admin-empty__text {
  font-size: 0.9rem;
  margin: 0 0 1rem;
}
/**
 * Admin Progress progress bars
 * Battersea Systems LMS
 */
/* Inline progress */
.ext-progress-inline,
.app .import-progress-inline {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0;
}
.ext-progress-inline__bar,
.app .import-progress-inline__bar {
  flex: 1;
  height: 6px;
  background: var(--admin-border-light, #e8eaed);
  border-radius: 3px;
  overflow: hidden;
}
.ext-progress-inline__fill,
.app .import-progress-inline__fill {
  height: 100%;
  border-radius: 3px;
  background: var(--admin-accent);
  transition: width 0.3s;
  animation: import-pulse 1.5s ease-in-out infinite;
  width: 60%;
}
.ext-progress-inline__text,
.app .import-progress-inline__text {
  font-size: 0.85rem;
  color: var(--admin-text-muted);
  white-space: nowrap;
}
/* Progress bar (import phase) */
.ext-progress-bar,
.app .import-progress-bar {
  text-align: center;
  padding: 1.5rem 0;
}
.ext-progress-bar__track,
.app .import-progress-bar__track {
  width: 100%;
  height: 10px;
  background: var(--admin-border-light, #e8eaed);
  border-radius: 5px;
  overflow: hidden;
  margin-bottom: 0.75rem;
}
.ext-progress-bar__fill,
.app .import-progress-bar__fill {
  height: 100%;
  border-radius: 5px;
  background: var(--admin-accent);
  transition: width 0.5s ease;
}
.ext-progress-bar__fill--complete,
.app .import-progress-bar__fill--complete {
  background: var(--admin-status-active);
}
.ext-progress-bar__text,
.app .import-progress-bar__text {
  font-size: 0.9rem;
  color: var(--admin-text);
  font-weight: 500;
}
.ext-progress-bar__note,
.app .import-progress-bar__note {
  font-size: 0.8rem;
  color: var(--admin-text-muted);
  margin-top: 0.5rem;
}
/**
 * Admin Steps — Wizard steps
 * Battersea Systems LMS
 */
.ext-progress-steps,
.app .import-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 1.5rem;
  padding: 1rem 0;
}
.ext-progress-steps__item,
.app .import-steps__item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.ext-progress-steps__number,
.app .import-steps__number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: 600;
  border: 2px solid var(--admin-border);
  color: var(--admin-text-muted);
  background: var(--admin-surface);
  transition: all 0.2s;
}
.ext-progress-steps__label,
.app .import-steps__label {
  font-size: 0.85rem;
  color: var(--admin-text-muted);
  font-weight: 500;
  transition: color 0.2s;
}
.ext-progress-steps__connector,
.app .import-steps__connector {
  width: 40px;
  height: 2px;
  background: var(--admin-border);
  margin: 0 0.5rem;
  transition: background 0.2s;
}
.ext-progress-steps__item--active .steps__number,
.app .import-steps__item--active .steps__number {
  border-color: var(--admin-accent);
  background: var(--admin-accent);
  color: #fff;
}
.ext-progress-steps__item--active .steps__label,
.app .import-steps__item--active .steps__label {
  color: var(--admin-text-heading);
}
.ext-progress-steps__item-complete .steps__number,
.app .import-steps__item-complete .steps__number {
  border-color: var(--admin-status-active);
  background: var(--admin-status-active);
  color: #fff;
}
.ext-progress-steps__item-complete .steps__label,
.app .import-steps__item-complete .steps__label {
  color: var(--admin-text);
}
.ext-progress-steps__item-complete + .steps__connector,
.app .import-steps__item-complete + .steps__connector {
  background: var(--admin-status-active);
}
/**
 * Admin Shell
 * CSS grid layout, responsive breakpoints, mobile overlay
 * Battersea Systems LMS
 */
.impersonation-banner {
  background: #d9534f;
  color: #fff;
  text-align: center;
  padding: 8px 16px;
  font-size: 14px;
  font-family: var(--admin-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif);
}
.impersonation-banner form {
  display: inline;
}
.impersonation-banner button {
  background: transparent;
  border: 1px solid #fff;
  color: #fff;
  padding: 2px 12px;
  border-radius: 3px;
  cursor: pointer;
  font-size: 13px;
  margin-left: 4px;
  font-family: inherit;
}
.app {
  margin: var(--admin-outer-margin);
  border-radius: var(--admin-radius-outer);
  font-family: var(--admin-font-family);
  font-size: var(--admin-font-size);
  line-height: var(--admin-line-height);
  color: var(--admin-text);
  border: 1px solid var(--admin-border);
  display: grid;
  grid-template-columns: var(--admin-sidebar-width) 1fr;
  grid-template-rows: var(--admin-header-height) auto 1fr minmax(var(--admin-footer-height), auto);
  grid-template-areas: "sidebar header" "sidebar utility" "sidebar main" "sidebar footer";
  min-height: calc(100vh - (var(--admin-outer-margin) * 2));
  transition: grid-template-columns 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.app *,
.app *:before,
.app *:after {
  box-sizing: border-box;
}
.app.collapsed {
  grid-template-columns: var(--admin-sidebar-collapsed-width) 1fr;
}
.app--no-sidebar {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: var(--admin-header-height) 1fr minmax(var(--admin-footer-height), auto);
  grid-template-areas: "header" "main" "footer";
}
.app--no-sidebar.collapsed {
  grid-template-columns: minmax(0, 1fr);
}
.app .utility {
  grid-area: utility;
  position: relative;
}
.app .main {
  grid-area: main;
  overflow-y: auto;
  padding: var(--admin-content-padding);
  background: var(--admin-bg);
}
.app .main__inner {
  max-width: var(--admin-content-max-width);
  margin: 0 auto;
}
.mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 25;
}
.mobile-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  color: var(--admin-text-muted);
  cursor: pointer;
  border-radius: var(--admin-radius);
}
.mobile-toggle:hover {
  background: var(--admin-bg);
}
/* Tablet — JS auto-adds .collapsed class; just adjust padding here */
@media (max-width: 1024px) {
  .app .main {
    padding: 1.5rem;
  }
}
/* Mobile — sidebar becomes drawer */
@media (max-width: 640px) {
  .app,
  .app.collapsed {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "header" "utility" "main" "footer";
    overflow: hidden;
  }
  .app .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--admin-sidebar-width);
    height: calc(100vh - (var(--admin-outer-margin) * 2));
    transform: translateX(-100%);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  }
  .app.mobile-open .sidebar {
    transform: translateX(0);
    box-shadow: var(--admin-shadow-lg);
  }
  .app.mobile-open .sidebar .sidebar__brand-logo {
    display: block;
  }
  .app.mobile-open .sidebar .sidebar__brand-icon {
    display: none;
  }
  .app.mobile-open .sidebar .sidebar__brand-text-wrap {
    display: block;
  }
  .app.mobile-open .sidebar .sidebar__group-label {
    opacity: 1;
    height: auto;
    padding: 0.6rem 1rem 0.35rem;
  }
  .app.mobile-open .sidebar .sidebar__link-text {
    opacity: 1;
    width: auto;
  }
  .app.mobile-open .sidebar .sidebar__link {
    justify-content: flex-start;
    padding: 0.5rem 1rem;
  }
  .app.mobile-open .sidebar .sidebar__toggle-text {
    opacity: 1;
    width: auto;
  }
  .app.mobile-open .mobile-overlay {
    display: block;
  }
  .mobile-toggle {
    display: flex !important;
  }
  .app .header__breadcrumb {
    display: none;
  }
  .app .header__user-info {
    display: none;
  }
  .app .main {
    padding: 1rem;
  }
  .app .kpi-grid {
    grid-template-columns: 1fr 1fr;
  }
  .app .footer__product-logo {
    display: none;
  }
  /* Header / utility bars — reclaim horizontal room so nothing is clipped
	   off the right edge on a phone. */
  .app .header {
    padding: 0 0.75rem;
    gap: 0.5rem;
  }
  .app .utility {
    padding: 0 0.5rem;
  }
  /* Documentation is a desktop convenience; drop it on phones so the
	   accessibility + theme controls fit on one row. */
  .app .utility__link {
    display: none;
  }
  .app .utility__divider:last-of-type {
    display: none;
  }
}
/**
 * Admin Sidebar
 * Navigation sidebar with brand, menu, icons, collapse
 * Battersea Systems LMS
 */
.app {
  /* Brand / Logo */
  /* Navigation */
  /* Sidebar icons — mask-image */
  /* Collapse toggle */
}
.app .sidebar {
  grid-area: sidebar;
  background: var(--admin-sidebar-bg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 30;
  transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.app .sidebar__brand {
  margin-top: 10px;
  height: calc(var(--admin-header-height) - 10px);
  display: flex;
  align-items: center;
  padding: 0 var(--admin-sidebar-horz-padding);
  gap: 0.75rem;
  border-bottom: 1px solid var(--admin-sidebar-border);
  flex-shrink: 0;
  overflow: hidden;
}
.app .sidebar__brand-logo {
  height: var(--admin-logo-height, 38px);
  max-height: 100%;
  min-width: 120px;
  flex: 1 1 auto;
  background-image: var(--admin-logo-dark);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}
.app .sidebar__brand-icon {
  width: calc(var(--admin-sidebar-collapsed-width) - 1rem);
  height: min();
  flex-shrink: 0;
  display: none;
  border-radius: var(--admin-radius);
  background-image: var(--admin-mobile-logo-dark);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}
.app.collapsed .sidebar__brand-logo {
  display: none;
}
.app.collapsed .sidebar__brand-icon {
  display: block;
  border-radius: 0;
  height: 100%;
}
.app.collapsed .sidebar__brand {
  justify-content: center;
  padding: 0 0.5rem;
}
.app .sidebar__brand-text-wrap {
  white-space: nowrap;
  overflow: hidden;
}
.app.collapsed .sidebar__brand-text-wrap {
  display: none;
}
.app .sidebar__brand-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.app .sidebar__brand-sub {
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.35);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.app .sidebar__nav {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0.75rem 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}
.app .sidebar__nav a {
  text-decoration: none;
}
.app .sidebar__nav::-webkit-scrollbar {
  width: 4px;
}
.app .sidebar__nav::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
}
.app .sidebar__group {
  margin-bottom: 0.25rem;
}
.app .sidebar__group-label {
  padding: 0.6rem var(--admin-sidebar-horz-padding) 0.35rem;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--admin-sidebar-group-text);
  white-space: nowrap;
  overflow: hidden;
  transition: opacity 0.2s, height 0.2s, padding 0.2s;
}
.app.collapsed .sidebar__group-label {
  opacity: 0;
  height: 0;
  padding: 0;
}
.app .sidebar__link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem var(--admin-sidebar-horz-padding);
  color: var(--admin-sidebar-text);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 400;
  white-space: nowrap;
  transition: background 0.12s, color 0.12s;
  border-left: 2px solid transparent;
  cursor: pointer;
}
.app .sidebar__link:hover {
  background: var(--admin-sidebar-hover);
  color: var(--admin-sidebar-text-active);
}
.app .sidebar__link.active {
  background: var(--admin-sidebar-active);
  color: var(--admin-sidebar-text-active);
  border-left-color: var(--admin-sidebar-active-border);
  font-weight: 500;
}
.app .sidebar__link-icon {
  width: var(--admin-icon-size);
  height: var(--admin-icon-size);
  flex-shrink: 0;
  background-color: currentColor;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  opacity: 0.7;
  transition: opacity 0.15s;
}
.app .sidebar__link:hover .sidebar__link-icon,
.app .sidebar__link.active .sidebar__link-icon {
  opacity: 1;
}
.app .sidebar__link-text {
  overflow: hidden;
  text-overflow: ellipsis;
  transition: opacity 0.2s, width 0.2s;
}
.app.collapsed .sidebar__link-text {
  opacity: 0;
  width: 0;
}
.app.collapsed .sidebar__link {
  justify-content: center;
  padding: 0.6rem;
}
.app .sidebar__footer {
  border-top: 1px solid var(--admin-sidebar-border);
  padding: 0.5rem;
  flex-shrink: 0;
}
.app .sidebar__toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.5rem;
  width: 100%;
  border: none;
  background: transparent;
  color: var(--admin-sidebar-text);
  cursor: pointer;
  border-radius: var(--admin-radius-sm);
  transition: background 0.15s;
  font-size: 0.82rem;
  font-family: inherit;
}
.app .sidebar__toggle:hover {
  background: var(--admin-sidebar-hover);
}
.app .sidebar__toggle-icon {
  width: var(--admin-icon-size);
  height: var(--admin-icon-size);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.app .sidebar__toggle-icon svg {
  transition: transform 0.25s;
}
.app.collapsed .sidebar__toggle-icon svg {
  transform: rotate(180deg);
}
.app .sidebar__toggle-text {
  overflow: hidden;
  white-space: nowrap;
  transition: opacity 0.2s, width 0.2s;
}
.app.collapsed .sidebar__toggle-text {
  opacity: 0;
  width: 0;
}
/**
 * Admin Utility Bar
 * Accessibility, theme toggle, documentation link
 * Battersea Systems LMS
 */
.app .utility {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0 1rem;
  height: 36px;
  background: var(--admin-surface);
  border-bottom: 1px solid var(--admin-border);
  font-size: 13px;
  z-index: 20;
}
.app .utility__spacer {
  flex: 1;
}
.app .utility__back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--admin-text-muted);
  text-decoration: none;
  font-size: 13px;
  padding: 4px 8px 4px 4px;
  border-radius: var(--admin-radius-sm);
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
}
.app .utility__back-link:hover {
  color: var(--admin-accent);
  background: var(--admin-accent-subtle);
}
.app .utility__back-icon {
  display: block;
  width: 14px;
  height: 14px;
  background: currentColor;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}
.app .utility__group {
  display: flex;
  align-items: center;
  gap: 2px;
}
.app .utility__divider {
  width: 1px;
  height: 18px;
  background: var(--admin-border);
  margin: 0 0.5rem;
}
.app .utility__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  min-width: 28px;
  padding: 0 6px;
  border: none;
  background: transparent;
  color: var(--admin-text-muted);
  cursor: pointer;
  border-radius: var(--admin-radius-sm);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  line-height: 1;
  transition: background 0.15s, color 0.15s;
}
.app .utility__btn:hover {
  background: var(--admin-bg);
  color: var(--admin-text);
}
.app .utility__btn--active {
  background: var(--admin-accent-subtle);
  color: var(--admin-accent);
}
.app .utility__btn--active:hover {
  background: var(--admin-accent-subtle);
  color: var(--admin-accent);
}
.app .utility__icon {
  display: block;
  width: calc(var(--admin-icon-size) - 5px);
  height: calc(var(--admin-icon-size) - 5px);
  background: currentColor;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}
.app .utility__link {
  color: var(--admin-text-muted);
  text-decoration: none;
  font-size: 13px;
  padding: 4px 6px;
  border-radius: var(--admin-radius-sm);
  transition: color 0.15s, background 0.15s;
}
.app .utility__link:hover {
  color: var(--admin-accent);
  background: var(--admin-accent-subtle);
}
/* ─── Tooltip font fix ─── */
.battersea-tooltip {
  font-family: var(--admin-font-family);
}
/* ─── Sidebar tooltips: hidden when sidebar is expanded ─── */
.sidebar-tooltip {
  visibility: hidden !important;
  pointer-events: none !important;
}
.app.collapsed ~ .sidebar-tooltip {
  visibility: visible !important;
  pointer-events: auto !important;
}
/**
 * Learner Shell — background image + transparent chrome
 *
 * Scoped to `body.learner-shell` so it only affects pages rendered via
 * `_LearnerLayout.cshtml`. The admin shell (`_AdminLayout`) is unaffected.
 *
 * Pattern mirrors the pre-login chrome in `admin-prelogin.less` — same
 * `@background-image` from the customer/reseller LESS variables, same
 * `overlay-on` opt-in driven by `ViewBag.OverlayClass` (set by
 * BaseController from `CompanyBranding.BackgroundOverlayEnabled`).
 *
 * Cards and header keep their opaque surfaces so content reads cleanly;
 * the image shows through the gap around the `.app` box and behind
 * `.main`, giving learners the visual continuity with /Account/Login.
 */
body.learner-shell {
  position: relative;
  min-height: 100vh;
  background-image: var(--tenant-background-image);
  background-size: cover;
  background-position: 50% 50%;
  background-attachment: fixed;
  background-repeat: no-repeat;
  --admin-font-family: var(--tenant-font-sans), Helvetica, Arial, sans-serif;
  font-family: var(--tenant-font-sans), Helvetica, Arial, sans-serif;
  font-weight: var(--tenant-font-weight);
}
body.learner-shell.overlay-on::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: var(--tenant-back-overlay-colour);
  opacity: var(--tenant-back-overlay-opacity);
  z-index: 0;
  pointer-events: none;
}
body.learner-shell.learner-shell--plain {
  background-image: none;
  background-color: var(--module-page-bg, var(--admin-bg));
}
body.learner-shell.learner-shell--plain.overlay-on::before {
  display: none;
}
[data-theme="dark"] body.learner-shell.learner-shell--plain {
  background-color: var(--admin-bg);
}
@media (prefers-color-scheme: dark) {
  [data-theme="auto"] body.learner-shell.learner-shell--plain {
    background-color: var(--admin-bg);
  }
}
body.learner-shell .app--no-sidebar {
  position: relative;
  z-index: 1;
  background: transparent;
  border: none;
  margin: 0;
  border-radius: 0;
}
body.learner-shell .app--no-sidebar .main {
  background: transparent;
}
body.learner-shell .learner-header .brand.CustomerLogo {
  display: inline-block;
  background-image: var(--tenant-mobilelogo);
  background-repeat: no-repeat;
  background-size: contain;
  background-position: left center;
  height: var(--tenant-mobile-logo-height);
  width: 160px;
}
@media only screen and (min-width: 768px) {
  body.learner-shell .learner-header .brand.CustomerLogo {
    background-image: var(--tenant-logo);
    height: var(--tenant-logo-height);
    width: 220px;
  }
}
[data-theme="dark"] body.learner-shell .learner-header .brand.CustomerLogo {
  background-image: var(--tenant-mobilelogo-dark);
}
@media only screen and (min-width: 768px) {
  [data-theme="dark"] body.learner-shell .learner-header .brand.CustomerLogo {
    background-image: var(--tenant-logo-dark);
  }
}
@media (prefers-color-scheme: dark) {
  [data-theme="auto"] body.learner-shell .learner-header .brand.CustomerLogo {
    background-image: var(--tenant-mobilelogo-dark);
  }
}
@media (prefers-color-scheme: dark) and only screen and (min-width: 768px) {
  [data-theme="auto"] body.learner-shell .learner-header .brand.CustomerLogo {
    background-image: var(--tenant-logo-dark);
  }
}
body.learner-shell .learner-header .brand .hide {
  position: absolute;
  left: -9999px;
}
@media only screen and (max-width: 640px) {
  body.learner-shell .learner-header .brand.CustomerLogo {
    width: 120px;
  }
  body.learner-shell .learner-header .header__divider {
    display: none;
  }
  body.learner-shell .learner-header .learner-theme-group {
    display: none;
  }
  body.learner-shell .learner-header .header__actions {
    gap: 0.15rem;
  }
}
.learner-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 1rem;
  padding: 6px 10px 6px 6px;
  border-radius: var(--admin-radius-sm);
  background: var(--admin-surface);
  color: var(--admin-text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid var(--admin-border);
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}
.learner-back-link:hover {
  color: var(--admin-accent);
  background: linear-gradient(var(--admin-accent-subtle), var(--admin-accent-subtle)), var(--admin-surface);
  border-color: var(--admin-accent);
}
.learner-back-link__icon {
  display: inline-block;
  width: 14px;
  height: 14px;
  background-color: currentColor;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}
/**
 * Learner Dashboard — /User/Modules
 *
 * Card vocabulary used by the rebuilt learner dashboard view. All rules
 * scoped to `body.learner-shell` to avoid bleed into admin pages that
 * share the same LESS chain. Mirrors the mockup at
 * Docs/mockups/mockup-learner-pages.html.
 */
body.learner-shell {
  /* ── Inline icon arrows (replaces Unicode glyphs on CTAs / links) ── */
  /* ── Up Next hero ───────────────────────────────────────────── */
  /* ── Donut + welcome row ────────────────────────────────────── */
  /* Shared panel heading — same treatment used by the donut card,
     welcome card, and (eventually) any other learner-page panel. Sits
     on a thin bottom-border divider; ~1.1rem so it has presence
     without competing with body content. */
  /* Donut card */
  /* Welcome card — wraps the optional rich-text content (TrainingIntro
     + CompanyInformation). The card title is the personalised greeting,
     so the size matches the Training status heading for parity across
     panels (see .panel-heading rule above). */
  /* ── Training grid section ──────────────────────────────────── */
  /* ── Module card ────────────────────────────────────────────── */
  /* Status dots — colour + dot + text. WCAG SC 1.4.1: dot is shape,
     text reinforces, colour is supplementary. */
  /* ── Chips (status + meta) ──────────────────────────────────── */
  /* Category-tinted media chip on the module card. The plain "Event"
     chip on offline modules keeps the original dark fallback. */
}
body.learner-shell .btn-arrow {
  display: inline-block;
  width: 0.9em;
  height: 0.9em;
  background-color: currentColor;
  vertical-align: -0.1em;
  margin-left: 0.4em;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}
body.learner-shell .btn-arrow--left {
  margin-left: 0;
  margin-right: 0.4em;
}
body.learner-shell .up-next {
  background: var(--admin-surface);
  border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.25rem;
  display: grid;
  grid-template-columns: 96px 1fr auto;
  gap: 1.25rem;
  align-items: center;
  box-shadow: var(--admin-shadow);
}
body.learner-shell .up-next__media {
  width: 96px;
  height: 72px;
  border-radius: var(--admin-radius-sm);
  background-color: var(--admin-bg);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  flex-shrink: 0;
}
body.learner-shell .up-next__label {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--admin-accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
body.learner-shell .up-next__title {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--admin-text-heading);
  margin: 0.15rem 0 0.4rem;
}
body.learner-shell .up-next__meta {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.8rem;
  color: var(--admin-text-muted);
  flex-wrap: wrap;
}
body.learner-shell .up-next__cta {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  align-items: flex-end;
}
body.learner-shell .up-next__secondary {
  font-size: 0.75rem;
  color: var(--admin-text-muted);
  text-decoration: none;
}
body.learner-shell .up-next__secondary:hover {
  color: var(--admin-accent);
}
@media (max-width: 720px) {
  body.learner-shell .up-next {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  body.learner-shell .up-next__media {
    width: 100%;
    height: 140px;
  }
  body.learner-shell .up-next__cta {
    align-items: stretch;
  }
}
body.learner-shell .status-row {
  display: grid;
  grid-template-columns: 350px 1fr;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}
@media (max-width: 820px) {
  body.learner-shell .status-row {
    grid-template-columns: 1fr;
  }
}
body.learner-shell .donut-card,
body.learner-shell .welcome-card {
  background: var(--admin-surface);
  border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--admin-shadow);
}
body.learner-shell .panel-heading {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--admin-text-heading);
  margin: 0 0 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--admin-border);
  line-height: 1.25;
}
body.learner-shell .donut-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--admin-border);
  gap: 0.75rem;
}
body.learner-shell .donut-card__title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--admin-text-heading);
  margin: 0;
  line-height: 1.25;
}
body.learner-shell .donut-tabs {
  display: inline-flex;
  background: var(--admin-bg);
  border-radius: 99px;
  padding: 2px;
}
body.learner-shell .donut-tabs__btn {
  padding: 4px 14px;
  border: none;
  background: transparent;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--admin-text-muted);
  cursor: pointer;
  border-radius: 99px;
  font-family: inherit;
}
body.learner-shell .donut-tabs__btn.is-active {
  background: var(--admin-surface);
  color: var(--admin-text-heading);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}
body.learner-shell .donut-card__alt {
  font-size: 0.85rem;
  color: var(--admin-text-muted);
  text-align: center;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--admin-border);
  line-height: 1.5;
}
body.learner-shell .welcome-card__title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--admin-text-heading);
  margin: 0 0 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--admin-border);
  line-height: 1.25;
}
body.learner-shell .welcome-card__body {
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--admin-text);
}
body.learner-shell .welcome-card__body h1,
body.learner-shell .welcome-card__body h2,
body.learner-shell .welcome-card__body h3,
body.learner-shell .welcome-card__body h4,
body.learner-shell .welcome-card__body h5,
body.learner-shell .welcome-card__body h6 {
  font-weight: 600;
  color: var(--admin-text-heading);
  margin: 0.85rem 0 0.4rem;
  line-height: 1.3;
}
body.learner-shell .welcome-card__body h1:first-child,
body.learner-shell .welcome-card__body h2:first-child,
body.learner-shell .welcome-card__body h3:first-child,
body.learner-shell .welcome-card__body h4:first-child,
body.learner-shell .welcome-card__body h5:first-child,
body.learner-shell .welcome-card__body h6:first-child {
  margin-top: 0;
}
body.learner-shell .welcome-card__body h1 {
  font-size: 1.15rem;
}
body.learner-shell .welcome-card__body h2 {
  font-size: 1.05rem;
}
body.learner-shell .welcome-card__body h3 {
  font-size: 1rem;
}
body.learner-shell .welcome-card__body h4,
body.learner-shell .welcome-card__body h5,
body.learner-shell .welcome-card__body h6 {
  font-size: 0.95rem;
}
body.learner-shell .welcome-card__body p {
  margin: 0 0 0.65rem;
}
body.learner-shell .welcome-card__body p:last-child {
  margin-bottom: 0;
}
body.learner-shell .welcome-card__body ul,
body.learner-shell .welcome-card__body ol {
  margin: 0 0 0.65rem 1.25rem;
}
body.learner-shell .welcome-card__body li {
  margin-bottom: 0.25rem;
}
body.learner-shell .welcome-card__body a {
  color: var(--admin-accent);
  text-decoration: underline;
}
body.learner-shell .welcome-card__body a:hover {
  color: var(--admin-accent-strong);
}
body.learner-shell .welcome-card__body img {
  max-width: 100%;
  height: auto;
  border-radius: var(--admin-radius-sm);
}
body.learner-shell .welcome-card__body video,
body.learner-shell .welcome-card__body iframe {
  max-width: 100%;
}
body.learner-shell .training-section {
  background: var(--admin-surface);
  border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius);
  box-shadow: var(--admin-shadow);
}
body.learner-shell .training-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--admin-border);
  gap: 1rem;
  flex-wrap: wrap;
}
body.learner-shell .training-section__title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--admin-text-heading);
}
body.learner-shell .filter-row {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}
body.learner-shell .filter-pill {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 99px;
  border: 1px solid var(--admin-border);
  background: var(--admin-surface);
  color: var(--admin-text-muted);
  cursor: pointer;
  font-family: inherit;
}
body.learner-shell .filter-pill.is-active {
  background: var(--admin-accent-subtle);
  color: var(--admin-accent);
  border-color: var(--admin-accent-subtle);
}
body.learner-shell .filter-pill:hover:not(.is-active) {
  background: var(--admin-bg);
  color: var(--admin-text);
}
body.learner-shell .training-section__course-heading {
  padding: 1rem 1.5rem 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--admin-text-heading);
}
body.learner-shell .training-grid {
  padding: 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.25rem;
}
body.learner-shell .training-grid--empty {
  padding: 2rem 1.5rem;
  text-align: center;
  color: var(--admin-text-muted);
  font-size: 0.9rem;
}
body.learner-shell .module-card {
  background: var(--admin-surface);
  border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: transform 0.18s, box-shadow 0.18s;
}
body.learner-shell .module-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--admin-shadow-lg);
}
body.learner-shell .module-card__media {
  height: 120px;
  background-color: var(--admin-bg);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
}
body.learner-shell .module-card__media-chip {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(20, 25, 40, 0.7);
  color: #fff;
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 0.7rem;
  font-weight: 600;
}
body.learner-shell .module-card__body {
  padding: 0.9rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  flex: 1;
}
body.learner-shell .module-card__title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--admin-text-heading);
  line-height: 1.3;
}
body.learner-shell .module-card__meta {
  font-size: 0.75rem;
  color: var(--admin-text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
body.learner-shell .module-card__status {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 600;
}
body.learner-shell .module-card__cta {
  margin-top: auto;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding-top: 0.4rem;
}
body.learner-shell .module-card__cta-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--admin-accent);
}
body.learner-shell .status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-block;
}
body.learner-shell .status-dot--pass {
  background: var(--admin-status-active);
}
body.learner-shell .status-dot--fail {
  background: var(--admin-status-danger);
}
body.learner-shell .status-dot--incomplete {
  background: var(--admin-status-warning);
}
body.learner-shell .status-dot--notstarted {
  background: var(--admin-border-strong);
}
body.learner-shell .status-dot--noassessment {
  background: var(--admin-status-info);
}
body.learner-shell .status-dot--rsvp {
  background: var(--admin-status-warning);
}
body.learner-shell .status-dot--accepted {
  background: var(--admin-status-active);
}
body.learner-shell .chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.6;
  border: 1px solid transparent;
  white-space: nowrap;
}
body.learner-shell .chip::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
body.learner-shell .chip--required {
  background: var(--admin-status-info-bg);
  color: var(--admin-status-info);
}
body.learner-shell .chip--required::before {
  background: var(--admin-status-info);
}
body.learner-shell .chip--recommended {
  background: #f1ecf8;
  color: #7e57c2;
}
body.learner-shell .chip--recommended::before {
  background: #7e57c2;
}
body.learner-shell .chip--time {
  background: var(--admin-bg);
  color: var(--admin-text-muted);
  border-color: var(--admin-border);
}
body.learner-shell .chip--time::before {
  display: none;
}
body.learner-shell .chip--due-soon {
  background: var(--admin-status-warning-bg);
  color: var(--admin-status-warning);
}
body.learner-shell .chip--due-soon::before {
  background: var(--admin-status-warning);
}
body.learner-shell .chip--overdue {
  background: var(--admin-status-danger-bg);
  color: var(--admin-status-danger);
}
body.learner-shell .chip--overdue::before {
  background: var(--admin-status-danger);
}
body.learner-shell .chip--refresher {
  background: var(--admin-status-info-bg);
  color: var(--admin-status-info);
}
body.learner-shell .chip--refresher::before {
  background: var(--admin-status-info);
}
body.learner-shell .module-card__media-chip--required {
  background: var(--admin-status-info);
  color: #fff;
}
body.learner-shell .module-card__media-chip--recommended {
  background: #7e57c2;
  color: #fff;
}
/* Reduced motion: respect the user's preference on the module-card hover
   lift. (The donut component handles its own animation gating.) */
@media (prefers-reduced-motion: reduce) {
  body.learner-shell .module-card {
    transition: none;
  }
  body.learner-shell .module-card:hover {
    transform: none;
  }
}
/**
 * Module Dashboard — /User/ModulesDetails
 *
 * Card vocabulary used by the rebuilt module-detail page. Scoped to
 * `body.learner-shell` to avoid bleed into admin pages that share the
 * same LESS chain. Mockup: Docs/mockups/mockup-learner-pages.html.
 */
body.learner-shell {
  /* ── Module header card (banner + title + status row) ─────── */
  /* ── Two-column body (introduction + assessment / TOC sidebar) ── */
  /* ── Cards used inside the module grid ──────────────────────── */
  /* "Must complete in order" notice block at the top of the
     introduction panel — same vocabulary as admin-notice cards. */
  /* ── Table of contents ─────────────────────────────────────── */
  /* Expandable page list under a section (collapsed by default).
     Currently rendered server-side based on a per-company branding
     flag; for now it's just hidden. */
  /* ── Assessment block ───────────────────────────────────────── */
  /* Certificate download button sits inside the assessment panel
     when the module is passed. */
}
body.learner-shell .module-header {
  background: var(--admin-surface);
  border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius);
  overflow: hidden;
  margin-bottom: 1.25rem;
  box-shadow: var(--admin-shadow);
}
body.learner-shell .module-header__banner {
  min-height: 180px;
  background-color: var(--admin-bg);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: 1.25rem 1.5rem;
}
body.learner-shell .module-header__banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20, 30, 50, 0.05) 40%, rgba(20, 30, 50, 0.65) 100%);
  pointer-events: none;
}
body.learner-shell .module-header__banner-content {
  position: relative;
  z-index: 1;
}
body.learner-shell .module-header__eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 0.25rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}
body.learner-shell .module-header__title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  margin: 0;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
}
body.learner-shell .module-header__bar {
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  border-top: 1px solid var(--admin-border);
}
body.learner-shell .module-header__meta {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: var(--admin-text-muted);
}
body.learner-shell .module-header__meta .module-card__status {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--admin-text);
}
body.learner-shell .module-header__cta {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
body.learner-shell .module-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}
@media (max-width: 920px) {
  body.learner-shell .module-grid {
    grid-template-columns: 1fr;
  }
}
body.learner-shell .module-panel {
  background: var(--admin-surface);
  border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius);
  padding: 1.1rem 1.25rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--admin-shadow);
}
body.learner-shell .module-panel:last-child {
  margin-bottom: 0;
}
body.learner-shell .module-panel__title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--admin-text-heading);
  margin: 0 0 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--admin-border);
  line-height: 1.25;
}
body.learner-shell .module-panel__body {
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--admin-text);
}
body.learner-shell .module-panel__body h1,
body.learner-shell .module-panel__body h2,
body.learner-shell .module-panel__body h3,
body.learner-shell .module-panel__body h4,
body.learner-shell .module-panel__body h5,
body.learner-shell .module-panel__body h6 {
  font-weight: 600;
  color: var(--admin-text-heading);
  margin: 0.85rem 0 0.4rem;
  line-height: 1.3;
}
body.learner-shell .module-panel__body h1:first-child,
body.learner-shell .module-panel__body h2:first-child,
body.learner-shell .module-panel__body h3:first-child,
body.learner-shell .module-panel__body h4:first-child,
body.learner-shell .module-panel__body h5:first-child,
body.learner-shell .module-panel__body h6:first-child {
  margin-top: 0;
}
body.learner-shell .module-panel__body h1 {
  font-size: 1.15rem;
}
body.learner-shell .module-panel__body h2 {
  font-size: 1.05rem;
}
body.learner-shell .module-panel__body h3 {
  font-size: 1rem;
}
body.learner-shell .module-panel__body h4,
body.learner-shell .module-panel__body h5,
body.learner-shell .module-panel__body h6 {
  font-size: 0.95rem;
}
body.learner-shell .module-panel__body p {
  margin: 0 0 0.65rem;
}
body.learner-shell .module-panel__body p:last-child {
  margin-bottom: 0;
}
body.learner-shell .module-panel__body ul,
body.learner-shell .module-panel__body ol {
  margin: 0 0 0.65rem 1.25rem;
}
body.learner-shell .module-panel__body li {
  margin-bottom: 0.25rem;
}
body.learner-shell .module-panel__body a {
  color: var(--admin-accent);
  text-decoration: underline;
}
body.learner-shell .module-panel__body a:hover {
  color: var(--admin-accent-strong);
}
body.learner-shell .module-panel__body img {
  max-width: 100%;
  height: auto;
  border-radius: var(--admin-radius-sm);
}
body.learner-shell .module-panel__body video,
body.learner-shell .module-panel__body iframe {
  max-width: 100%;
}
body.learner-shell .module-notice {
  background: var(--admin-status-warning-bg);
  border-left: 3px solid var(--admin-status-warning);
  padding: 0.75rem 1rem;
  border-radius: 0 var(--admin-radius-sm) var(--admin-radius-sm) 0;
  margin-bottom: 1rem;
  font-size: 0.85rem;
  line-height: 1.5;
}
body.learner-shell .module-notice strong {
  display: block;
  color: var(--admin-text-heading);
  margin-bottom: 0.15rem;
}
body.learner-shell .toc__list {
  list-style: none;
  margin: 0;
  padding: 0;
}
body.learner-shell .toc__item {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.55rem 0;
  font-size: 0.9rem;
  border-top: 1px dashed var(--admin-border);
  text-decoration: none;
  color: var(--admin-text);
}
body.learner-shell .toc__item:first-child {
  border-top: none;
}
body.learner-shell .toc__item .toc__num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--admin-bg);
  color: var(--admin-text-muted);
  font-size: 0.72rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  line-height: 1;
}
body.learner-shell .toc__item .toc__title {
  flex: 1;
  line-height: 1.35;
}
body.learner-shell .toc__item .toc__tick {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: var(--admin-status-active);
  background-color: currentColor;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-image: url('/Content/images/Icons/icon-tick-white.svg');
  mask-image: url('/Content/images/Icons/icon-tick-white.svg');
  margin-top: 6px;
}
body.learner-shell .toc__item .toc__cross {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: var(--admin-status-danger);
  background-color: currentColor;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-image: url('/Content/images/Icons/icon-cross-white.svg');
  mask-image: url('/Content/images/Icons/icon-cross-white.svg');
  margin-top: 6px;
}
body.learner-shell .toc__item .toc__lock {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: var(--admin-text-muted);
  background-color: currentColor;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-image: url('/Content/images/Icons/icon-lock-white.svg');
  mask-image: url('/Content/images/Icons/icon-lock-white.svg');
  margin-top: 6px;
}
body.learner-shell a.toc__item {
  transition: background 0.15s;
}
body.learner-shell a.toc__item:hover {
  background: var(--admin-accent-subtle);
}
body.learner-shell a.toc__item:hover .toc__num {
  background: var(--admin-accent);
  color: #fff;
}
body.learner-shell .toc__item--locked {
  opacity: 0.55;
  cursor: not-allowed;
}
body.learner-shell .toc__item--done .toc__num {
  background: var(--admin-status-active-bg);
  color: var(--admin-status-active);
}
body.learner-shell .toc__pages {
  list-style: none;
  margin: 0.35rem 0 0 2.1rem;
  padding: 0;
  font-size: 0.85rem;
}
body.learner-shell .toc__page {
  padding: 0.25rem 0;
  color: var(--admin-text-muted);
  text-decoration: none;
  display: block;
}
body.learner-shell .toc__page:hover {
  color: var(--admin-accent);
}
body.learner-shell .assessment-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
  background: var(--admin-bg);
  border-radius: var(--admin-radius-sm);
  margin-bottom: 0.75rem;
  font-size: 0.85rem;
}
body.learner-shell .assessment-summary .label {
  color: var(--admin-text-muted);
}
body.learner-shell .assessment-summary .value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--admin-text-heading);
}
body.learner-shell .assessment-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
body.learner-shell .assessment-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0;
  border-top: 1px dashed var(--admin-border);
  font-size: 0.9rem;
}
body.learner-shell .assessment-row:first-child {
  border-top: none;
}
body.learner-shell .assessment-row .assessment-row__title {
  flex: 1;
  color: var(--admin-text);
}
body.learner-shell .assessment-row .assessment-row__title.is-link {
  text-decoration: none;
}
body.learner-shell .assessment-row .assessment-row__title.is-link:hover {
  color: var(--admin-accent);
}
body.learner-shell .assessment-row .assessment-row__status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 600;
}
body.learner-shell .assessment-row .assessment-row__score {
  font-size: 0.85rem;
  color: var(--admin-text-muted);
  min-width: 3em;
  text-align: right;
}
body.learner-shell .assessment-row .assessment-row__review {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--admin-accent);
  text-decoration: none;
  white-space: nowrap;
}
body.learner-shell .assessment-row .assessment-row__review:hover {
  color: var(--admin-accent-strong);
  text-decoration: underline;
}
body.learner-shell .module-certificate {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--admin-border);
  display: flex;
  justify-content: flex-end;
}
/**
 * Module Test page — /User/TesInfoById
 *
 * Pre-test info card + light wrapper around the existing
 * `battersea-test.js` test surface. Scoped to `body.learner-shell`
 * so it only affects the learner shell, not anywhere else the
 * test component is reused.
 */
body.learner-shell {
  /* ── Test page heading ─────────────────────────────────────── */
  /* ── Pre-test info card ────────────────────────────────────── */
  /* ── Test surface wrapper ──────────────────────────────────── */
}
body.learner-shell .test-page__heading {
  background: var(--admin-surface);
  border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
  box-shadow: var(--admin-shadow);
}
body.learner-shell .test-page__eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--admin-text-muted);
  margin-bottom: 0.25rem;
}
body.learner-shell .test-page__title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--admin-text-heading);
  line-height: 1.2;
  margin: 0;
}
body.learner-shell .test-pre {
  background: var(--admin-surface);
  border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
  box-shadow: var(--admin-shadow);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
}
body.learner-shell .test-pre__item .label {
  font-size: 0.7rem;
  color: var(--admin-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}
body.learner-shell .test-pre__item .value {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--admin-text-heading);
  margin-top: 0.1rem;
}
body.learner-shell .test-surface {
  background: var(--admin-surface);
  border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius);
  box-shadow: var(--admin-shadow);
  overflow: hidden;
}
/**
 * Test Results — /User/Conclution
 *
 * Module-level results screen rendered after a learner submits a test.
 * Branches on `StudentModule.IsPass` to render a Pass or a "Not yet
 * passed" hero. Scoped to `body.learner-shell` so other usages of the
 * vocabulary (e.g. admin previews) aren't affected.
 */
body.learner-shell {
  /* ── Hero card (the headline result panel) ─────────────────── */
  /* Three-up score block — your score / pass mark / correct count. */
  /* ── Per-test breakdown ────────────────────────────────────── */
}
body.learner-shell .results-hero {
  background: var(--admin-surface);
  border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius);
  padding: 2rem 1.75rem;
  margin-bottom: 1.25rem;
  text-align: center;
  box-shadow: var(--admin-shadow);
}
body.learner-shell .results-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}
body.learner-shell .results-icon .results-icon__mask {
  width: 36px;
  height: 36px;
  background-color: currentColor;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}
body.learner-shell .results-icon--pass {
  background: var(--admin-status-active);
}
body.learner-shell .results-icon--pass .results-icon__mask {
  -webkit-mask-image: url('/Content/images/Icons/icon-tick-white.svg');
  mask-image: url('/Content/images/Icons/icon-tick-white.svg');
}
body.learner-shell .results-icon--fail {
  background: var(--admin-status-danger);
}
body.learner-shell .results-icon--fail .results-icon__mask {
  -webkit-mask-image: url('/Content/images/Icons/icon-cross-white.svg');
  mask-image: url('/Content/images/Icons/icon-cross-white.svg');
}
body.learner-shell .results-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--admin-text-heading);
  margin: 0 0 0.4rem;
  line-height: 1.2;
}
body.learner-shell .results-subtitle {
  color: var(--admin-text-muted);
  margin: 0 0 1.5rem;
  font-size: 0.95rem;
}
body.learner-shell .results-score {
  display: inline-flex;
  align-items: stretch;
  gap: 1.5rem;
  background: var(--admin-bg);
  padding: 1rem 1.5rem;
  border-radius: var(--admin-radius);
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
}
body.learner-shell .results-score__item {
  text-align: center;
  min-width: 96px;
}
body.learner-shell .results-score__item + .results-score__item {
  border-left: 1px solid var(--admin-border);
  padding-left: 1.5rem;
}
body.learner-shell .results-score__item .value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--admin-text-heading);
  line-height: 1.1;
}
body.learner-shell .results-score__item .value--pass {
  color: var(--admin-status-active);
}
body.learner-shell .results-score__item .value--fail {
  color: var(--admin-status-danger);
}
body.learner-shell .results-score__item .label {
  font-size: 0.7rem;
  color: var(--admin-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 0.25rem;
}
@media (max-width: 540px) {
  body.learner-shell .results-score__item + .results-score__item {
    border-left: none;
    padding-left: 0;
    border-top: 1px solid var(--admin-border);
    padding-top: 0.65rem;
    margin-top: 0.65rem;
  }
}
body.learner-shell .results-message {
  color: var(--admin-text);
  font-size: 0.95rem;
  line-height: 1.55;
  max-width: 540px;
  margin: 0 auto 1.5rem;
}
body.learner-shell .results-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
}
body.learner-shell .results-breakdown {
  background: var(--admin-surface);
  border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius);
  padding: 1.1rem 1.25rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--admin-shadow);
}
body.learner-shell .results-breakdown__title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--admin-text-heading);
  margin: 0 0 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--admin-border);
  line-height: 1.25;
}
/**
 * Per-question review — /User/TestReview
 *
 * The detail screen shown after each completed test. Reuses the
 * results-hero / results-score vocabulary above for the score banner;
 * the styles below cover the per-question cards. Every question is
 * shown, with the wrong ones emphasised.
 */
body.learner-shell {
  /* tick / cross glyph that colours from the parent text colour
     (mask-image technique, single SVG source) */
  /* ── Review panel — wraps the "Your answers" heading + the test
        accordions on one readable surface (the learner background image
        otherwise shows through behind a bare heading). ─────────────── */
  /* ── Per-question cards ─────────────────────────────────────── */
  /* ── Answer rows (multiple choice / true-false) ─────────────── */
  /* ── Matching / grouping / ordering (basic table form) ──────── */
  /* ── Explanation ────────────────────────────────────────────── */
  /* ── Foot actions (repeated below the list) ─────────────────── */
  /* ── Per-test accordion (module results page) ───────────────── */
  /* the question list inside an accordion shouldn't add its own card chrome
     spacing at the very top */
  /* Inside the review panel the accordions sit flat — divider rows, not
     card-on-card chrome. */
}
body.learner-shell .review-ico {
  display: inline-block;
  width: 1em;
  height: 1em;
  background-color: currentColor;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  vertical-align: -0.125em;
  flex: none;
}
body.learner-shell .review-ico--tick {
  -webkit-mask-image: url('/Content/images/Icons/icon-tick-white.svg');
  mask-image: url('/Content/images/Icons/icon-tick-white.svg');
}
body.learner-shell .review-ico--cross {
  -webkit-mask-image: url('/Content/images/Icons/icon-cross-white.svg');
  mask-image: url('/Content/images/Icons/icon-cross-white.svg');
}
body.learner-shell .review-ico--refresh {
  -webkit-mask-image: url('/Content/images/Icons/icon-refresh-white.svg');
  mask-image: url('/Content/images/Icons/icon-refresh-white.svg');
}
body.learner-shell .review-panel {
  background: var(--admin-surface);
  border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius);
  box-shadow: var(--admin-shadow);
  padding: 0.25rem 1.25rem 1rem;
  margin-bottom: 1.25rem;
}
body.learner-shell .review-panel__title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--admin-text-heading);
  margin: 0;
  padding: 1rem 0 0.85rem;
  border-bottom: 1px solid var(--admin-border);
}
body.learner-shell .review-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
body.learner-shell .review-card {
  background: var(--admin-surface);
  border: 1px solid var(--admin-border);
  border-left: 4px solid var(--admin-border);
  border-radius: var(--admin-radius);
  box-shadow: var(--admin-shadow);
  padding: 1.1rem 1.25rem 1.25rem;
}
body.learner-shell .review-card--correct {
  border-left-color: var(--admin-status-active);
}
body.learner-shell .review-card--incorrect {
  border-left-color: var(--admin-status-danger);
}
body.learner-shell .review-card__head {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin-bottom: 0.85rem;
}
body.learner-shell .review-card__number {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--admin-bg);
  border: 1px solid var(--admin-border);
  color: var(--admin-text-muted);
  font-size: 0.8rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.1rem;
}
body.learner-shell .review-card__question {
  flex: 1;
  font-size: 1rem;
  font-weight: 600;
  color: var(--admin-text-heading);
  line-height: 1.4;
}
body.learner-shell .review-card__question p {
  margin: 0;
}
body.learner-shell .review-card__mark {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  white-space: nowrap;
}
body.learner-shell .review-card__mark--correct {
  background: var(--admin-status-active-bg);
  color: var(--admin-status-active);
}
body.learner-shell .review-card__mark--incorrect {
  background: var(--admin-status-danger-bg);
  color: var(--admin-status-danger);
}
body.learner-shell .review-answers {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
body.learner-shell .review-answer {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  padding: 0.55rem 0.7rem;
  border-radius: var(--admin-radius-sm);
  font-size: 0.9rem;
  background: var(--admin-bg);
  border: 1px solid var(--admin-border);
}
body.learner-shell .review-answer__role {
  flex: none;
  min-width: 104px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--admin-text-muted);
  padding-top: 0.12rem;
}
body.learner-shell .review-answer__text {
  flex: 1;
}
body.learner-shell .review-answer__text p {
  margin: 0;
}
body.learner-shell .review-answer--yours-wrong {
  background: var(--admin-status-danger-bg);
  border-color: var(--admin-status-danger-bg);
  color: var(--admin-status-danger);
}
body.learner-shell .review-answer--yours-wrong .review-answer__role {
  color: var(--admin-status-danger);
}
body.learner-shell .review-answer--yours-right,
body.learner-shell .review-answer--correct {
  background: var(--admin-status-active-bg);
  border-color: var(--admin-status-active-bg);
  color: var(--admin-status-active);
}
body.learner-shell .review-answer--yours-right .review-answer__role,
body.learner-shell .review-answer--correct .review-answer__role {
  color: var(--admin-status-active);
}
body.learner-shell .review-type-note {
  font-size: 0.75rem;
  color: var(--admin-text-muted);
  font-style: italic;
  margin: 0 0 0.5rem;
}
body.learner-shell .review-pairs {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
body.learner-shell .review-pairs th,
body.learner-shell .review-pairs td {
  text-align: left;
  padding: 0.4rem 0.6rem;
  border-bottom: 1px solid var(--admin-border);
  vertical-align: top;
}
body.learner-shell .review-pairs th {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--admin-text-muted);
  font-weight: 600;
}
body.learner-shell .review-pairs .pair-ok {
  color: var(--admin-status-active);
}
body.learner-shell .review-pairs .pair-bad {
  color: var(--admin-status-danger);
}
body.learner-shell .review-pairs .review-ico {
  margin-right: 0.25rem;
}
body.learner-shell .review-explanation {
  margin-top: 0.85rem;
  background: var(--admin-accent-subtle);
  border-left: 3px solid var(--admin-accent);
  border-radius: 0 var(--admin-radius-sm) var(--admin-radius-sm) 0;
  padding: 0.65rem 0.85rem;
  font-size: 0.88rem;
}
body.learner-shell .review-explanation p {
  margin: 0;
}
body.learner-shell .review-explanation__label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--admin-accent-strong);
  font-weight: 700;
  margin-bottom: 0.2rem;
}
body.learner-shell .review-foot {
  margin-top: 1.5rem;
  background: var(--admin-surface);
  border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius);
  box-shadow: var(--admin-shadow);
  padding: 1.1rem 1.25rem;
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  flex-wrap: wrap;
}
body.learner-shell .review-accordion {
  background: var(--admin-surface);
  border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius);
  box-shadow: var(--admin-shadow);
  margin-bottom: 0.85rem;
  overflow: hidden;
}
body.learner-shell .review-accordion__summary {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.95rem 1.25rem;
  cursor: pointer;
  list-style: none;
  user-select: none;
  /* hide the native disclosure triangle */
}
body.learner-shell .review-accordion__summary::-webkit-details-marker {
  display: none;
}
body.learner-shell .review-accordion__summary:hover {
  background: var(--admin-surface-alt);
}
body.learner-shell .review-accordion__title {
  flex: 1;
  font-size: 1rem;
  font-weight: 600;
  color: var(--admin-text-heading);
}
body.learner-shell .review-accordion__meta {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.82rem;
  color: var(--admin-text-muted);
}
body.learner-shell .review-accordion__status {
  font-weight: 600;
}
body.learner-shell .review-accordion__score {
  font-weight: 700;
  color: var(--admin-text-heading);
  min-width: 3em;
  text-align: right;
}
body.learner-shell .review-accordion__chevron {
  width: 0.85em;
  height: 0.85em;
  background-color: currentColor;
  -webkit-mask-image: url('/Content/images/Icons/icon-down-white.svg');
  mask-image: url('/Content/images/Icons/icon-down-white.svg');
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  transition: transform 0.15s ease;
}
body.learner-shell .review-accordion[open] .review-accordion__chevron {
  transform: rotate(180deg);
}
body.learner-shell .review-accordion__body {
  padding: 0.25rem 1.25rem 1.25rem;
  border-top: 1px solid var(--admin-border);
}
body.learner-shell .review-accordion__body .review-list {
  margin-top: 1rem;
}
body.learner-shell .review-empty {
  color: var(--admin-text-muted);
  font-size: 0.9rem;
  padding: 0.75rem 0;
}
body.learner-shell .review-panel .review-accordion {
  border: none;
  border-radius: 0;
  box-shadow: none;
  margin-bottom: 0;
  border-top: 1px solid var(--admin-border);
}
body.learner-shell .review-panel .review-accordion:first-of-type {
  border-top: none;
}
body.learner-shell .review-panel .review-accordion__summary {
  padding-left: 0;
  padding-right: 0;
}
body.learner-shell .review-panel .review-accordion__body {
  padding-left: 0;
  padding-right: 0;
}
/**
 * Admin Data Tables & Pagination
 * Table styling and pagination controls for admin list pages
 * Battersea Systems LMS
 */
.app {
  /* Data Table */
  /* Table action buttons */
  /* Action icon variants for table rows */
  /* Disabled variant — looks like an action icon but doesn't respond.
	   Used for "delete is blocked because the module is in use" affordance
	   on the module list. Retains hover tooltip for explanation. */
  /* DragTable — inherit admin font and match DataTable look */
  /* Pagination */
  /* PagedList pager integration — restyle the generated markup */
}
.app .data-table-wrap {
  background: var(--admin-surface);
  border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius);
  overflow: hidden;
}
.app .data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  background: var(--admin-surface);
}
.app .battersea-datatable__table {
  background: var(--admin-surface);
}
.app .data-table thead {
  background: var(--datatable-header-bg, #fafbfc);
  border-bottom: 1px solid var(--admin-border);
}
.app .data-table th {
  padding: 0.65rem 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--admin-text-muted);
  white-space: nowrap;
  background: var(--admin-border-strong, #eaeaea);
}
.app .data-table th:hover {
  background: var(--datatable-header-hover-bg, #ebeff2);
}
.app .data-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--admin-border-light);
  vertical-align: middle;
}
.app .data-table td.battersea-datatable__td[data-label="Login URL"] {
  white-space: nowrap;
}
.app .data-table tbody tr:last-child td {
  border-bottom: none;
}
.app .data-table tbody tr {
  transition: background 0.1s;
}
.app .data-table tbody tr:hover {
  background: var(--datatable-row-hover-bg, #fafbfc);
}
.app .battersea-datatable__th--sortable:hover {
  background: var(--datatable-header-hover-bg, #fafbfc);
}
.app .data-table__title-link {
  color: var(--admin-text-heading);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s;
}
.app .data-table__title-link:hover {
  color: var(--admin-accent);
}
.app .data-table__actions {
  display: flex;
  gap: 0.25rem;
}
.app .data-table__action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: var(--admin-radius-sm);
  border: none;
  background: transparent;
  color: var(--admin-text-muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.app .data-table__action:hover {
  background: var(--admin-accent-subtle);
  color: var(--admin-accent);
}
.app .data-table__action--danger .data-table__action-icon {
  background-color: var(--admin-status-danger);
}
.app .data-table__action--danger:hover {
  background: var(--admin-status-danger-bg);
  color: var(--admin-status-danger);
}
.app .data-table__action--danger:hover .data-table__action-icon {
  background-color: var(--admin-status-danger);
}
.app .data-table__action--success .data-table__action-icon {
  background-color: var(--admin-status-active);
}
.app .data-table__action--success:hover {
  background: var(--admin-status-active);
  color: var(--admin-status-active);
}
.app .data-table__action--success:hover .data-table__action-icon {
  background-color: var(--admin-status-active);
}
.app .battersea-datatable__td[data-label="Login URL"] {
  white-space: nowrap;
  text-overflow: ellipsis;
}
.app .battersea-datatable__td[data-label="Login URL"] .data-table__action {
  transform: translateY(4px);
}
.app .data-table__action-icon {
  display: block;
  width: var(--admin-icon-size);
  height: var(--admin-icon-size);
  background-color: currentColor;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}
.app .data-table__action-icon--eye {
  width: calc(var(--admin-icon-size) - 5px);
  height: calc(var(--admin-icon-size) - 5px);
}
.app .data-table__action-icon--copy {
  width: calc(var(--admin-icon-size) - 5px);
  height: calc(var(--admin-icon-size) - 5px);
}
.app .data-table__action--success {
  /*&:hover .data-table__action-icon { background-color: #fff; }*/
}
.app .data-table__action--success .data-table__action-icon {
  background-color: var(--admin-status-active);
}
.app .data-table__action--success:hover {
  background: var(--admin-status-active);
}
.app .data-table__action--disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: auto;
  background: none;
}
.app .data-table__action--disabled:hover {
  background: none;
  opacity: 0.35;
}
.app .battersea-dragtable {
  font-family: inherit;
}
.app .battersea-dragtable__ghost {
  font-family: inherit;
}
.app .pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--admin-border);
  font-size: 0.82rem;
  color: var(--admin-text-muted);
  background: var(--admin-surface);
}
.app .pagination-bar__pages {
  display: flex;
  gap: 2px;
}
.app .pagination-bar__page {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 30px;
  padding: 0 0.5rem;
  border: 1px solid transparent;
  border-radius: var(--admin-radius-sm);
  background: transparent;
  color: var(--admin-text-muted);
  font-size: 0.82rem;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.12s;
  text-decoration: none;
}
.app .pagination-bar__page:hover {
  background: var(--admin-bg);
  color: var(--admin-text);
}
.app .pagination-bar__page.active {
  background: var(--admin-accent);
  color: #fff;
  border-color: var(--admin-accent);
  font-weight: 600;
}
.app .pagination-bar__page--all {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0 0.6rem;
}
.app .pagination-bar .pagination-container ul {
  display: flex;
  gap: 2px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.app .pagination-bar .pagination-container li a,
.app .pagination-bar .pagination-container li span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 30px;
  padding: 0 0.5rem;
  border: 1px solid transparent;
  border-radius: var(--admin-radius-sm);
  background: transparent;
  color: var(--admin-text-muted);
  font-size: 0.82rem;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.12s;
  text-decoration: none;
}
.app .pagination-bar .pagination-container li a:hover {
  background: var(--admin-bg);
  color: var(--admin-text);
}
.app .pagination-bar .pagination-container li.active span {
  background: var(--admin-accent);
  color: #fff;
  border-color: var(--admin-accent);
  font-weight: 600;
}
.app .pagination-bar .pagination-container li.disabled span {
  opacity: 0.35;
  cursor: default;
}
/* Battersea DataTable — admin theme overrides */
.app .battersea-datatable {
  font-size: 0.85rem;
}
/**
 * Admin Status Badges
 * Consistent status indicators across admin pages
 * Battersea Systems LMS
 */
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2em 0.6em;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.4;
  border-radius: 3px;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  background-color: var(--admin-status-inactive-bg, #e8eaed);
  color: var(--admin-status-inactive, #5f6368);
}
.status-badge--active {
  background-color: var(--admin-status-active-bg, color-mix(in srgb, var(--tenant-success) 12%, transparent));
  color: var(--admin-status-active, var(--tenant-success));
}
.status-badge--inactive {
  background-color: var(--admin-status-inactive-bg, #e8eaed);
  color: var(--admin-status-inactive, #5f6368);
}
.status-badge--warning {
  background-color: var(--admin-status-warning-bg, color-mix(in srgb, var(--tenant-warning) 15%, transparent));
  color: var(--admin-status-warning, var(--tenant-warning-d20));
}
.status-badge--danger {
  background-color: var(--admin-status-danger-bg, color-mix(in srgb, var(--tenant-danger) 12%, transparent));
  color: var(--admin-status-danger, var(--tenant-danger));
}
.status-badge--info {
  background-color: var(--admin-status-info-bg, color-mix(in srgb, var(--tenant-information) 12%, transparent));
  color: var(--admin-status-info, var(--tenant-information));
}
.status-badge--draft {
  background-color: var(--admin-status-draft-bg, rgba(178, 167, 152, 0.2));
  color: var(--admin-status-draft, #746757);
}
.status-badge--expired {
  background-color: var(--admin-status-expired-bg, rgba(204, 125, 140, 0.15));
  color: var(--admin-status-expired, #a34053);
}
.status-badge--dot {
  background: none;
  padding-left: 0;
}
.status-badge--dot:before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 0.4em;
  background-color: currentColor;
}
/**
 * Admin Users — User management list styles
 * Capacity indicator, bulk actions bar, role/test badges
 * Battersea Systems LMS
 */
.app {
  /* User cell (checkbox + name + username) */
  /* Archived row dimming */
  /* Clickable status badge */
  /* Capacity indicator */
  /* Bulk actions bar */
  /* Toast notification */
}
.app .user-cell {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.app .user-cell__info {
  flex: 1;
  min-width: 0;
}
.app .user-cell__name {
  font-weight: 600;
  color: var(--admin-text-heading);
}
.app .user-cell__name a {
  color: inherit;
  text-decoration: none;
}
.app .user-cell__name a:hover {
  color: var(--admin-accent);
}
.app .user-cell__username {
  font-size: 0.8rem;
  color: var(--admin-text-muted);
}
.app tr.row--archived td {
  opacity: 0.6;
}
.app .status-badge--toggle {
  cursor: pointer;
  transition: opacity 0.15s;
}
.app .status-badge--toggle:hover {
  opacity: 0.75;
}
.app .capacity {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--admin-text-muted);
}
.app .capacity__bar {
  width: 60px;
  height: 6px;
  background: var(--admin-border-light, #e8eaed);
  border-radius: 3px;
  overflow: hidden;
}
.app .capacity__fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s;
}
.app .capacity__fill--active {
  background: var(--admin-status-active);
}
.app .capacity__fill--warning {
  background: var(--admin-status-warning);
}
.app .capacity__fill--danger {
  background: var(--admin-status-danger);
}
.app .bulk-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: rgba(34, 157, 245, 0.06);
  border: 1px solid rgba(34, 157, 245, 0.2);
  border-radius: var(--admin-radius);
  margin-bottom: 1rem;
  font-size: 0.85rem;
}
.app .bulk-bar__count {
  font-weight: 600;
  color: var(--admin-text-heading);
  white-space: nowrap;
}
.app .bulk-bar__actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.app .bulk-bar__separator {
  width: 1px;
  height: 20px;
  background: var(--admin-border);
}
.app .bulk-bar__link {
  font-size: 0.8rem;
  color: var(--admin-accent);
  cursor: pointer;
  text-decoration: none;
  border: none;
  background: none;
  font-family: inherit;
  padding: 0;
}
.app .bulk-bar__link:hover {
  text-decoration: underline;
}
.app .bulk-bar__link--highlight {
  font-weight: 600;
  color: #8b1a1a;
}
.app .bulk-bar--info {
  background: var(--admin-accent-subtle, #f0f6ff);
  border-color: rgba(34, 157, 245, 0.15);
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  margin-top: -0.5rem;
  border-top: none;
  border-radius: 0 0 var(--admin-radius) var(--admin-radius);
}
.app .toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  padding: 0.75rem 1.5rem;
  border-radius: var(--admin-radius);
  font-size: 0.9rem;
  font-weight: 500;
  z-index: 9999;
  box-shadow: var(--admin-shadow-lg);
}
.app .toast--success {
  background: var(--admin-status-active);
  color: #fff;
}
.app .toast--error {
  background: var(--admin-status-danger);
  color: #fff;
}
/**
 * Admin Company Profile
 * Styles for the tabbed company administration page
 * Battersea Systems LMS
 * © 2026 Idaho Design & Communication Pty Ltd
 */
/* ─── Tab Navigation ─── */
.profile-tabs {
  display: flex;
  border-bottom: 2px solid var(--admin-border);
  margin-bottom: 1.5rem;
  gap: 0;
}
.profile-tabs__tab {
  padding: 0.65rem 1.25rem;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  font-size: 0.9rem;
  font-family: inherit;
  color: var(--admin-text-muted);
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.profile-tabs__tab:hover {
  color: var(--admin-text);
  background: rgba(0, 0, 0, 0.02);
}
.profile-tabs__tab--active {
  color: var(--admin-accent);
  border-bottom-color: var(--admin-accent);
  font-weight: 600;
}
.profile-tabs__tab--disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}
.profile-tabs__tab--disabled:hover {
  color: var(--admin-text-muted);
  background: transparent;
}
/* ─── Profile Grid (two-column layout) ─── */
.profile-grid {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 1.5rem;
  align-items: start;
}
@media (max-width: 900px) {
  .profile-grid {
    grid-template-columns: 1fr;
  }
}
/* ─── Admin-only badge ─── */
.admin-only {
  font-size: 0.7rem;
  color: var(--admin-accent);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
/* ─── Form actions bar ─── */
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  /* Sit off the setting panels above so the Save bar doesn't crowd
	   the last card; the border still reads as a divider. */
  margin-top: 1.25rem;
  border-top: 1px solid var(--admin-border);
}
/* ─── Toast notification ─── */
.toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  padding: 0.75rem 1.25rem;
  border-radius: var(--admin-radius);
  font-size: 0.875rem;
  font-weight: 500;
  color: #fff;
  z-index: 9000;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
}
.toast--visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.toast--success {
  background: var(--admin-status-active, #0a6242);
}
.toast--error {
  background: var(--admin-status-danger, #a94442);
}
/* ─── Tab action bar ─── */
.tab-action-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.tab-action-bar__left {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
/* ─── Organisation Tree ─── */
.org-tree {
  list-style: none;
  padding: 0;
  margin: 0;
}
.org-tree__division {
  border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius);
  margin-bottom: 0.5rem;
  background: var(--admin-surface);
}
.org-tree__division:last-child {
  margin-bottom: 0;
}
.org-tree__division-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1rem;
  cursor: pointer;
  user-select: none;
}
.org-tree__division-header:hover {
  background: rgba(0, 0, 0, 0.02);
}
.org-tree__division-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--admin-text-heading);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.org-tree__chevron {
  display: inline-flex;
  width: 16px;
  height: 16px;
  transition: transform 0.2s;
  flex-shrink: 0;
}
.org-tree__division--open > .org-tree__division-header .org-tree__chevron {
  transform: rotate(90deg);
}
.org-tree__departments {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid var(--admin-border);
  display: none;
}
.org-tree__division--open > .org-tree__departments {
  display: block;
}
.org-tree__department {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 1rem 0.5rem 2.5rem;
  font-size: 0.88rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}
.org-tree__department:last-child {
  border-bottom: none;
}
.org-tree__department:hover {
  background: rgba(0, 0, 0, 0.015);
}
.org-tree__department-name {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--admin-text);
}
.org-tree__name-text {
  display: inline-flex;
  align-items: center;
}
.org-tree__actions {
  display: flex;
  gap: 0.25rem;
  opacity: 0;
  transition: opacity 0.15s;
}
.org-tree__division-header:hover .org-tree__actions,
.org-tree__department:hover .org-tree__actions {
  opacity: 1;
}
/* Drag handle */
.drag-handle {
  cursor: grab;
  color: var(--admin-text-muted);
  display: flex;
  align-items: center;
  opacity: 0;
  transition: opacity 0.15s;
}
.org-tree__division-header:hover .drag-handle,
.org-tree__department:hover .drag-handle {
  opacity: 0.5;
}
/* Drag placeholder and ghost */
.org-tree__drag-placeholder {
  border: 2px dashed var(--admin-accent);
  border-radius: var(--admin-radius);
  margin-bottom: 0.5rem;
  background: rgba(34, 157, 245, 0.04);
  list-style: none;
  min-height: 20px;
}
.org-tree__drag-ghost {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  border-radius: var(--admin-radius);
  background: var(--admin-surface);
  border: 1px solid var(--admin-border);
  font-family: var(--admin-font-family);
  list-style: none;
}
/* Ghost buttons for tree actions */
.btn-ghost {
  background: transparent;
  border: none;
  color: var(--admin-text-muted);
  padding: 0.3rem 0.4rem;
  border-radius: var(--admin-radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  transition: color 0.15s, background 0.15s;
}
.btn-ghost:hover {
  color: var(--admin-text);
  background: rgba(0, 0, 0, 0.06);
}
.btn-ghost--delete:hover {
  color: var(--admin-status-danger);
  background: rgba(169, 68, 66, 0.08);
}
.btn-ghost--disabled {
  opacity: 0.25;
  cursor: not-allowed;
  pointer-events: none;
}
/* Inline form (add division/department) */
.inline-form {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--admin-border);
  background: rgba(34, 157, 245, 0.03);
  align-items: center;
}
.inline-form .form-input {
  flex: 1;
}
/* Inline edit input */
.form-input--inline {
  display: inline;
  width: auto;
  min-width: 150px;
  max-width: 300px;
  padding: 0.2rem 0.5rem;
  font-size: inherit;
  min-height: auto;
}
/* ─── Locations List ─── */
.locations-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.locations-list__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}
.locations-list__item:last-child {
  border-bottom: none;
}
.locations-list__item:hover {
  background: rgba(0, 0, 0, 0.015);
}
.locations-list__item:hover .locations-list__actions {
  opacity: 1;
}
.locations-list__name {
  font-size: 0.9rem;
  color: var(--admin-text-heading);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.locations-list__name-text {
  display: inline-flex;
  align-items: center;
}
.locations-list__icon {
  width: 16px;
  height: 16px;
  color: var(--admin-text-muted);
  flex-shrink: 0;
}
.locations-list__actions {
  display: flex;
  gap: 0.25rem;
  opacity: 0;
  transition: opacity 0.15s;
}
/* ─── Empty state ─── */
.empty-state {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--admin-text-muted);
}
.empty-state__title {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--admin-text);
  margin-bottom: 0.25rem;
}
.empty-state__text {
  font-size: 0.85rem;
  margin-bottom: 1rem;
}
/* ─── Loading placeholder ─── */
.loading-placeholder {
  text-align: center;
  padding: 2rem;
  color: var(--admin-text-muted);
  font-size: 0.85rem;
}
/* ─── Unsaved changes indicator ─── */
.form-unsaved {
  display: none;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: var(--admin-status-warning);
}
.form-unsaved--visible {
  display: inline-flex;
}
.form-unsaved__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--admin-status-warning);
}
/* ─── Module Management Styles ─── */
/* Module link in list table */
.module-link {
  color: var(--admin-text, #3d3d4e);
  text-decoration: none;
  font-weight: 500;
}
.module-link:hover {
  color: var(--admin-accent, #4a90d9);
  text-decoration: underline;
}
/* Non-interactive variant used for read-only module rows
   (e.g. core modules shown in a customer's module list). */
.module-link--readonly {
  color: var(--admin-text, #3d3d4e);
  cursor: default;
}
.module-link--readonly:hover {
  color: var(--admin-text, #3d3d4e);
  text-decoration: none;
}
/* ─── Section tree on detail page ─── */
.module-section {
  position: relative;
  /* anchors .module-section__actions over the header */
  border-bottom: 1px solid var(--admin-border, #e2e5ea);
}
.module-section:last-child {
  border-bottom: none;
}
.module-section[open] > .module-section__header {
  border-bottom: 1px solid var(--admin-border, #e2e5ea);
}
.module-section__header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 6rem 0.75rem 1rem;
  /* right space for the overlaid actions */
  cursor: pointer;
  user-select: none;
  list-style: none;
}
.module-section__header::-webkit-details-marker {
  display: none;
}
.module-section__header::marker {
  display: none;
}
.module-section__header:hover {
  background: var(--admin-bg, #f3f4f7);
}
/* Section rename/delete: rendered after the <summary> (buttons inside a
   summary are not reliably accessible) and overlaid on the header row. */
.module-section__actions {
  position: absolute;
  top: 0.55rem;
  right: 1rem;
}
.module-section__grip {
  width: 16px;
  height: 16px;
  opacity: 0.3;
  cursor: grab;
  flex-shrink: 0;
  touch-action: none;
}
.module-section__name {
  font-weight: 600;
  flex: 1;
  color: var(--admin-text, #3d3d4e);
}
.module-section__meta {
  font-size: 0.8rem;
  color: var(--admin-text-muted, #8a8a8a);
}
.module-section__actions {
  display: flex;
  gap: 0.25rem;
}
.module-section--dragging {
  opacity: 0.5;
  position: relative;
  z-index: 10;
}
.module-section__placeholder {
  background: var(--admin-bg, #f3f4f7);
  border: 2px dashed var(--admin-accent, #667eea);
  border-radius: 4px;
  margin: 0.25rem 0;
}
.module-page--dragging {
  opacity: 0.5;
  position: relative;
  z-index: 10;
}
.module-page__placeholder {
  background: var(--admin-bg, #f3f4f7);
  border: 2px dashed var(--admin-accent, #667eea);
  border-radius: 4px;
  margin: 0.15rem 1rem 0.15rem 2.75rem;
}
.module-section__body {
  padding: 0.25rem 0 0.5rem 0;
}
.module-section__add-page {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 1rem 0.5rem 2.75rem;
  background: none;
  border: none;
  color: var(--admin-accent, #4a90d9);
  cursor: pointer;
  font-size: 0.8rem;
}
.module-section__add-page .ext-icons-base,
.module-section__add-page .context-banner__icon,
.module-section__add-page .search-panel__action-icon {
  width: 14px;
  height: 14px;
}
.module-section__add-page:hover {
  text-decoration: underline;
}
/* ─── Page item within a section ─── */
.module-page {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem 0.4rem 2.75rem;
}
.module-page:hover {
  background: var(--admin-bg, #f3f4f7);
}
.module-page__grip {
  width: 14px;
  height: 14px;
  opacity: 0.2;
  cursor: grab;
  flex-shrink: 0;
  touch-action: none;
}
.module-page__icon {
  width: 16px;
  height: 16px;
  opacity: 0.4;
  flex-shrink: 0;
}
.module-page__name {
  flex: 1;
  font-size: 0.85rem;
  color: var(--admin-text, #3d3d4e);
}
/* Ghost "test" row inside a section body. Looks like a page row but
   dashed + muted so it's clearly not a builder-authored page, with a
   small "Test" pill on the right. Whole row is an anchor — no grip,
   no edit / delete actions (those live on /ModuleAdmin/Test). */
.module-page--test {
  text-decoration: none;
  color: var(--admin-text-muted, #8a8a8a);
  border: 1px dashed var(--admin-border, #d3d7de);
  border-radius: 4px;
  margin: 0.25rem 1rem 0.25rem 2.75rem;
  padding: 0.4rem 0.75rem;
  background: color-mix(in srgb, var(--tenant-information) 5%, transparent);
  transition: background 0.15s ease, border-color 0.15s ease;
}
.module-page--test:hover {
  background: color-mix(in srgb, var(--tenant-information) 10%, transparent);
  border-color: color-mix(in srgb, var(--tenant-information) 60%, transparent);
  text-decoration: none;
}
.module-page--test .module-page__icon {
  opacity: 0.65;
}
.module-page--test .module-page__name {
  color: var(--admin-text, #3d3d4e);
  font-weight: 500;
}
.module-page__pill {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  background: color-mix(in srgb, var(--tenant-information) 18%, transparent);
  color: var(--tenant-information);
  line-height: 1.3;
  flex-shrink: 0;
}
.module-page__actions {
  display: flex;
  gap: 0.25rem;
}
/* ─── Test list on detail page ─── */
.module-test-list {
  display: flex;
  flex-direction: column;
}
.module-test {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--admin-border-light, #eef0f3);
}
.module-test:last-child {
  border-bottom: none;
}
.module-test__info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.module-test__name-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.module-test__name {
  font-weight: 500;
  color: var(--admin-text, #3d3d4e);
  text-decoration: none;
}
.module-test__name:hover {
  color: var(--admin-accent, #4a90d9);
  text-decoration: underline;
}
.module-test__meta {
  font-size: 0.75rem;
  color: var(--admin-text-muted, #8a8a8a);
}
/* ─── Summary list (key-value pairs) ─── */
.summary-list {
  display: flex;
  flex-direction: column;
}
.summary-list__item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--admin-border-light, #eef0f3);
}
.summary-list__item:last-child {
  border-bottom: none;
}
.summary-list__label {
  font-size: 0.8rem;
  color: var(--admin-text-muted, #8a8a8a);
}
.summary-list__value {
  font-weight: 500;
  color: var(--admin-text, #3d3d4e);
}
/* Admin card action link in header */
.admin-card__action {
  font-size: 0.8rem;
  color: var(--admin-accent, #4a90d9);
  text-decoration: none;
}
.admin-card__action:hover {
  text-decoration: underline;
}
.admin-card__count {
  font-size: 0.8rem;
  color: var(--admin-text-muted, #8a8a8a);
  background: var(--admin-bg, #f3f4f7);
  padding: 0.15rem 0.5rem;
  border-radius: 10px;
}
/* Small status badge variant */
.status-badge--sm {
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
}
/* ─── Test Page Styles ─── */
/* Slide-out question panel */
.slide-panel {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9998;
  pointer-events: none;
  visibility: hidden;
}
.slide-panel--open {
  pointer-events: auto;
  visibility: visible;
}
.slide-panel--open .slide-panel__backdrop {
  opacity: 1;
}
.slide-panel--open .slide-panel__content {
  transform: translateX(0);
}
.slide-panel__backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  opacity: 0;
  transition: opacity 0.3s;
}
.slide-panel__content {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 50%;
  max-width: 640px;
  min-width: 320px;
  background: var(--admin-surface, #fff);
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.12);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  z-index: 1;
}
@media (max-width: 768px) {
  .slide-panel__content {
    width: 100%;
    max-width: none;
  }
}
.slide-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--admin-border, #e2e5ea);
  flex-shrink: 0;
}
.slide-panel__title {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
  color: var(--admin-text, #3d3d4e);
}
.slide-panel__close {
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--admin-text-muted, #8a8a8a);
  cursor: pointer;
  padding: 0;
}
.slide-panel__close:hover {
  color: var(--admin-text, #3d3d4e);
}
.slide-panel__body {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem;
}
.slide-panel__footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--admin-border, #e2e5ea);
  flex-shrink: 0;
}
/* ─── Question list items ─── */
.test-question {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--admin-border-light, #eef0f3);
}
.test-question:last-child {
  border-bottom: none;
}
.test-question:hover {
  background: var(--admin-bg, #f3f4f7);
}
.test-question__info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.test-question__type {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--admin-accent, #4a90d9);
}
.test-question__text {
  font-size: 0.85rem;
  color: var(--admin-text, #3d3d4e);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.test-question__meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}
.test-question__answers {
  font-size: 0.75rem;
  color: var(--admin-text-muted, #8a8a8a);
}
/* ─── Answer items in slide panel ─── */
.answer-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.5rem 0.6rem;
  border: 1px solid transparent;
  border-bottom: 1px solid var(--admin-border-light, #eef0f3);
  border-radius: 4px;
  transition: background 0.15s ease, border-color 0.15s ease;
  /* Highlighted state — replaces the old "Correct" checkbox. Light
	   success tint + stronger border so the correct answer stands out
	   at a glance, matching the learner-facing True/False preview. */
}
.answer-item:last-child {
  border-bottom: 1px solid transparent;
}
.answer-item--correct {
  background: color-mix(in srgb, var(--tenant-success) 10%, transparent);
  border-color: color-mix(in srgb, var(--tenant-success) 45%, transparent);
  border-bottom-color: color-mix(in srgb, var(--tenant-success) 45%, transparent);
}
.answer-item__row {
  flex: 1;
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.answer-item__input {
  flex: 1;
  font-size: 0.85rem;
}
.answer-item__input--sm {
  max-width: 120px;
  flex: 0 0 120px;
}
.answer-item__correct {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.8rem;
  color: var(--admin-text-muted, #8a8a8a);
  white-space: nowrap;
  cursor: pointer;
  flex-shrink: 0;
}
/* Mark-correct toggle pill — takes the place of the old checkbox. */
.answer-item__mark {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--admin-border, #d3d7de);
  background: var(--admin-surface, #fff);
  color: var(--admin-text-muted, #8a8a8a);
  font-size: 0.78rem;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.answer-item__mark:hover {
  border-color: var(--tenant-success);
  color: var(--tenant-success);
}
.answer-item__mark--on {
  background: var(--tenant-success);
  border-color: var(--tenant-success);
  color: #fff;
}
.answer-item__mark--on:hover {
  background: var(--tenant-success-d5);
  border-color: var(--tenant-success-d5);
  color: #fff;
}
.answer-item__delete {
  background: none;
  border: none;
  font-size: 1.25rem;
  line-height: 1;
  color: var(--admin-text-muted, #8a8a8a);
  cursor: pointer;
  padding: 0.25rem;
  flex-shrink: 0;
}
.answer-item__delete:hover {
  color: var(--admin-danger, #a94442);
}
/* Admin card footer */
.admin-card__footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-top: 1px solid var(--admin-border, #e2e5ea);
}
/**
 * Colour Picker Styles
 * Extracted from Battersea Library battersea-form-elements.less
 */
:root {
  --form-swatch-size: 32px;
  --form-swatch-gap: 8px;
  --form-swatch-selected-border: #333;
  --form-picker-height: 150px;
}
.battersea-colourswatch {
  position: relative;
  display: inline-block;
}
.battersea-colourswatch__preview {
  width: 50px;
  height: 20px;
  border-radius: 3rem;
  border: 2px solid var(--admin-border, #ddd);
  cursor: pointer;
  transition: border-color 0.2s ease;
  padding: 0;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.05);
}
.battersea-colourswatch__preview:hover {
  border-color: #999;
}
.battersea-colourswatch__preview:focus-visible {
  outline: 2px solid var(--colour-interactive-focus-ring, #667eea);
  outline-offset: 2px;
}
.battersea-colourswatch__dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 50;
  background: var(--admin-surface, #fff);
  border: 1px solid var(--admin-border, #ddd);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  padding: 12px;
  display: none;
  min-width: 200px;
}
.battersea-colourswatch--open .battersea-colourswatch__dropdown {
  display: block;
}
.battersea-colourswatch--flip .battersea-colourswatch__dropdown {
  top: auto;
  bottom: calc(100% + 4px);
}
.battersea-colourswatch__grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--form-swatch-gap);
}
.battersea-colourswatch__swatch {
  width: var(--form-swatch-size);
  height: var(--form-swatch-size);
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  position: relative;
  padding: 0;
  transition: border-color 0.15s ease, transform 0.15s ease;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1);
}
.battersea-colourswatch__swatch:hover {
  transform: scale(1.1);
}
.battersea-colourswatch__swatch:focus-visible {
  outline: 2px solid var(--colour-interactive-focus-ring, #667eea);
  outline-offset: 2px;
}
.battersea-colourswatch__swatch--selected {
  border-color: var(--form-swatch-selected-border);
}
.battersea-colourswatch__check {
  display: none;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  pointer-events: none;
}
.battersea-colourswatch__swatch--selected .battersea-colourswatch__check {
  display: block;
}
.battersea-colourswatch__custom-btn {
  width: var(--form-swatch-size);
  height: var(--form-swatch-size);
  border-radius: 50%;
  border: 2px dashed var(--admin-border, #ccc);
  background: none;
  cursor: pointer;
  font-size: 1.1rem;
  color: var(--admin-text-muted, #999);
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.battersea-colourswatch__custom-btn:hover {
  border-color: var(--admin-text-muted, #999);
  color: var(--admin-text, #666);
}
/* Brand palette mode — grouped rows, smaller swatches */
.battersea-colourswatch--brand .battersea-colourswatch__dropdown {
  min-width: 190px;
}
.battersea-colourswatch--brand .battersea-colourswatch__grid {
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}
.battersea-colourswatch__group {
  display: flex;
  align-items: center;
  gap: 10px;
}
.battersea-colourswatch__group-label {
  flex: 0 0 78px;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--admin-text-muted, #666);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.battersea-colourswatch__group-swatches {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.battersea-colourswatch--brand .battersea-colourswatch__swatch,
.battersea-colourswatch--brand .battersea-colourswatch__custom-btn {
  width: 20px;
  height: 20px;
}
.battersea-colourswatch--brand .battersea-colourswatch__custom-btn {
  font-size: 0.85rem;
  line-height: 1;
}
/* Colour Picker (full picker panel) */
.battersea-colourswatch__picker {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--admin-border-light, #eee);
}
.battersea-colourswatch__satval {
  width: 100%;
  height: var(--form-picker-height);
  position: relative;
  cursor: crosshair;
  border-radius: 4px;
  margin-bottom: 10px;
  background-image: linear-gradient(to right, #fff, transparent), linear-gradient(to top, #000, transparent);
  background-size: 100% 100%;
}
.battersea-colourswatch__pointer {
  position: absolute;
  width: 14px;
  height: 14px;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.3), 0 1px 3px rgba(0, 0, 0, 0.3);
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.battersea-colourswatch__hue {
  width: 100%;
  height: 14px;
  background: linear-gradient(to right, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00);
  border-radius: 7px;
  cursor: pointer;
  position: relative;
  margin-bottom: 10px;
}
.battersea-colourswatch__hue-handle {
  position: absolute;
  top: 50%;
  width: 14px;
  height: 14px;
  background: #fff;
  border: 2px solid #ccc;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  pointer-events: none;
}
.battersea-colourswatch__hex {
  width: 90px;
  padding: 6px 8px;
  border: 1px solid var(--admin-border, #ddd);
  border-radius: 4px;
  font-family: monospace;
  font-size: 0.85rem;
  text-align: center;
  background: var(--admin-surface, #fff);
  color: var(--admin-text, #3d3d4e);
}
.battersea-colourswatch__hex:focus {
  outline: none;
  border-color: var(--colour-interactive-focus-ring, #667eea);
}
/* ─── Branding Page Styles ─── */
/* Picker row — horizontal layout for colour pickers */
.branding-picker-row {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 0.75rem;
}
.branding-picker-col {
  flex: 1;
  min-width: 0;
}
/* Colour picker preview swatch — override library sizing for admin context */
.admin-card .battersea-colourswatch__preview {
  width: 50px;
  height: 22px;
  border-radius: 3rem;
}
/* Palette preview swatches */
.palette-preview {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--admin-border, #e8e8ed);
}
.branding-swatch-row {
  display: flex;
  align-items: center;
  margin-bottom: 0.5rem;
  gap: 0.5rem;
}
.branding-swatch-row__title {
  width: 90px;
  flex-shrink: 0;
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--admin-text-muted, #7c8091);
}
.branding-swatch-row__colours {
  display: flex;
  gap: 3px;
  flex-wrap: wrap;
}
.branding-swatch {
  width: 52px;
  height: 36px;
  border-radius: 5px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(0, 0, 0, 0.06);
  cursor: default;
}
.branding-swatch__label {
  font-size: 0.55rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  opacity: 0.85;
}
.branding-swatch__hex {
  font-size: 0.5rem;
  font-family: 'SF Mono', Monaco, 'Courier New', monospace;
  opacity: 0.7;
}
/* Skin toggle */
.skin-toggle {
  display: flex;
  gap: 2px;
  background: var(--admin-bg-subtle, #f0f0f5);
  border-radius: 6px;
  padding: 2px;
}
.skin-toggle__btn {
  padding: 0.25rem 0.75rem;
  border: none;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
  background: transparent;
  color: var(--admin-text-muted, #7c8091);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.skin-toggle__btn:hover {
  color: var(--admin-text, #3d3d4e);
}
.skin-toggle__btn--active {
  background: var(--admin-surface, #fff);
  color: var(--admin-text, #3d3d4e);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}
/* Sample components in skin preview */
.branding-sample-btn {
  display: inline-block;
  padding: 0.35rem 0.9rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  margin-right: 0.4rem;
  margin-bottom: 0.4rem;
  border: none;
  cursor: default;
}
.branding-sample-alert {
  padding: 0.5rem 0.85rem;
  border-radius: 6px;
  font-size: 0.8rem;
  margin-bottom: 0.4rem;
  border-left: 3px solid;
}
.branding-sample-card {
  border-radius: 8px;
  padding: 0.85rem;
  margin-top: 0.5rem;
  border: 1px solid;
}
/* File upload with preview */
.branding-file-upload {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.25rem;
}
.branding-image-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 120px;
  height: 60px;
  border-radius: var(--admin-radius, 6px);
  border: 1px solid var(--admin-border, #e2e5ea);
  background: #fafbfc;
  overflow: hidden;
  flex-shrink: 0;
}
.branding-image-preview img {
  max-height: 52px;
  max-width: 112px;
  object-fit: contain;
}
.branding-image-preview--dark {
  background: #1a1a2e;
}
.branding-image-preview--wide {
  width: 200px;
  height: 80px;
}
.branding-image-preview--wide img {
  max-height: 72px;
  max-width: 192px;
}
/* ─── Mini Previews ─── */
.branding-mini-preview {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--admin-border, #e8e8ed);
}
.branding-mini-preview__row {
  display: flex;
  gap: 1rem;
}
.branding-mini-preview__row > * {
  flex: 1;
}
/* Logo preview boxes */
.branding-logo-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem;
  border: 1px solid var(--admin-border, #e2e5ea);
  border-radius: var(--admin-radius, 6px);
  background: #fafbfc;
  margin-bottom: 0.75rem;
  min-height: 70px;
}
.branding-logo-preview img {
  object-fit: contain;
  max-width: 100%;
}
.branding-logo-preview__label {
  font-size: 0.65rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--admin-text-muted, #8a8a8a);
}
.branding-logo-preview__empty {
  font-size: 0.8rem;
  color: var(--admin-text-muted, #8a8a8a);
  font-style: italic;
}
.branding-logo-preview--dark {
  background: #1a1a2e;
  border-color: #2e3047;
}
.branding-logo-preview--dark .branding-logo-preview__label {
  color: rgba(255, 255, 255, 0.4);
}
.branding-logo-preview--dark .branding-logo-preview__empty {
  color: rgba(255, 255, 255, 0.35);
}
/* Logo preview — mini header bars */
.branding-mini-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  background: #fff;
  border: 1px solid var(--admin-border, #e2e5ea);
  border-radius: var(--admin-radius, 6px);
  min-height: 44px;
}
.branding-mini-header img {
  max-height: 32px;
  object-fit: contain;
}
.branding-mini-header--dark {
  background: #1a1a2e;
  border-color: #2e3047;
}
.branding-mini-header__nav {
  display: flex;
  gap: 0.35rem;
}
.branding-mini-header__nav span {
  width: 28px;
  height: 6px;
  border-radius: 3px;
  background: var(--admin-border, #e2e5ea);
}
.branding-mini-header--dark .branding-mini-header__nav span {
  background: rgba(255, 255, 255, 0.15);
}
/* Background preview — mini login page */
.branding-mini-login {
  position: relative;
  border-radius: var(--admin-radius, 6px);
  overflow: hidden;
  background-size: cover;
  background-position: center;
  background-color: #1a1a2e;
  min-height: 140px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--admin-border, #e2e5ea);
}
.branding-mini-login__overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
/* Logo sits above the panel (mirrors the real login page, where the customer
   logo is in the header above the .introbox). */
.branding-mini-login__logo {
  position: relative;
  z-index: 1;
  max-height: 26px;
  max-width: 115px;
  margin-bottom: 0.6rem;
}
.branding-mini-login__form {
  position: relative;
  z-index: 1;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 8px;
  padding: 1rem;
  width: 140px;
  text-align: center;
}
.branding-mini-login__field {
  height: 8px;
  background: #e8e8ed;
  border-radius: 4px;
  margin-bottom: 0.4rem;
}
.branding-mini-login__btn {
  height: 10px;
  background: var(--primary1, #DD2720);
  border-radius: 4px;
  margin-top: 0.25rem;
}
/* Structure preview — mini page layout */
.branding-mini-page {
  border-radius: var(--admin-radius, 6px);
  overflow: hidden;
  border: 1px solid var(--admin-border, #e2e5ea);
  background: #f3f4f7;
  min-height: 100px;
}
.branding-mini-page__header {
  background: var(--primary1, #DD2720);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 500;
  padding: 0.35rem 0.5rem;
}
.branding-mini-page__content {
  padding: 0.5rem;
}
.branding-mini-page__panel {
  background: #fff;
  border-radius: 4px;
  padding: 0.35rem 0.5rem;
  font-size: 0.6rem;
  color: var(--admin-text-muted, #8a8a8a);
  border: 1px solid var(--admin-border-light, #eef0f3);
}
.branding-mini-page--dark {
  background: #131520;
}
.branding-mini-page--dark .branding-mini-page__header {
  background: var(--primary1, #DD2720);
}
.branding-mini-page--dark .branding-mini-page__panel {
  background: #1c1e2e;
  border-color: #2e3047;
  color: rgba(255, 255, 255, 0.5);
}
/* Font preview */
.branding-font-preview {
  border: 1px solid var(--admin-border, #e2e5ea);
  border-radius: var(--admin-radius, 6px);
  padding: 1rem;
  background: #fafbfc;
}
.branding-font-preview__heading {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--admin-text-heading, #1a1a2e);
  margin-bottom: 0.5rem;
}
.branding-font-preview__body {
  font-size: 0.9rem;
  color: var(--admin-text, #3d3d4e);
  line-height: 1.6;
  margin-bottom: 0.35rem;
}
.branding-font-preview__small {
  font-size: 0.75rem;
  color: var(--admin-text-muted, #8a8a8a);
}
/* CSS warning alert */
.branding-css-warning {
  background: rgba(237, 173, 68, 0.1);
  border-left: 3px solid #EDAD44;
  border-radius: var(--admin-radius, 6px);
  padding: 0.75rem 1rem;
  font-size: 0.8rem;
  color: var(--admin-text, #3d3d4e);
  line-height: 1.5;
  margin-bottom: 1rem;
}
/* Code editor with line numbers */
.code-editor {
  display: flex;
  border: 1px solid var(--admin-border, #e2e5ea);
  border-radius: var(--admin-radius, 6px);
  overflow: hidden;
  font-family: 'SF Mono', Monaco, 'Courier New', monospace;
  font-size: 0.8rem;
  line-height: 1.5;
}
.code-editor__lines {
  width: 40px;
  flex-shrink: 0;
  background: #f3f4f7;
  border-right: 1px solid var(--admin-border, #e2e5ea);
  padding: 0.6rem 0;
  text-align: right;
  color: var(--admin-text-muted, #8a8a8a);
  font-size: 0.7rem;
  user-select: none;
  overflow: hidden;
}
.code-editor__lines span {
  display: block;
  padding: 0 0.4rem;
  line-height: 1.2rem;
}
.code-editor__textarea {
  flex: 1;
  border: none;
  outline: none;
  resize: vertical;
  padding: 0.6rem;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  tab-size: 4;
  background: var(--admin-surface, #fff);
  color: var(--admin-text, #3d3d4e);
  min-height: 200px;
}
/**
 * Admin Rich Text Editor Styles
 *
 * Toolbar + popups for the Page Builder rich text editor (pb-richtext.js)
 * when used on admin pages outside the page builder itself — e.g. the
 * Introduction field on the Module Settings tab.
 *
 * Styles are a carbon copy of the .pb-rte* rules in Content/shared/editor/editor.css
 * so both consumers stay in sync.
 */
/* ── Toolbar ──
   position: fixed (not absolute) so the toolbar escapes any stacking
   context created by the admin shell / sidebar / slide panels. Parent
   contexts with position:relative + z-index were clipping the toolbar
   under the sidebar no matter how high we pushed z-index. Fixed
   positioning anchors to the viewport at the root stacking context.

   pb-richtext.js's positionToolbar already computes viewport-relative
   coordinates (getBoundingClientRect is viewport-based, and the
   containerRect.top / scrollTop values collapse to zero when the
   container is document.body), so the existing coordinates work as-is.

   Link and colour popups follow the same treatment with a slightly
   higher z so they sit above the toolbar when open. */
.pb-rte {
  display: flex;
  position: fixed;
  z-index: 9999;
  background: #fff;
  border: 1px solid #e0e2e8;
  border-radius: 6px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  padding: 3px;
  align-items: center;
  gap: 1px;
  flex-wrap: nowrap;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease;
}
@media (max-width: 305px) {
  .pb-rte {
    flex-wrap: wrap;
  }
}
.pb-rte--visible {
  opacity: 1;
  pointer-events: auto;
}
.pb-rte__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 13px;
  font-family: var(--admin-font-family);
  color: #334155;
  border-radius: 4px;
  padding: 0 5px;
  transition: all 100ms ease;
}
.pb-rte__btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}
.pb-rte__btn--active {
  background: #e0e7ff;
  color: #3b82f6;
}
.pb-rte__btn--disabled {
  opacity: 0.3;
  pointer-events: none;
}
.pb-rte__sep {
  width: 1px;
  height: 18px;
  background: #e2e8f0;
  margin: 0 2px;
  flex-shrink: 0;
}
.pb-rte__select {
  height: 28px;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  font-size: 12px;
  font-family: var(--admin-font-family);
  color: #334155;
  background: #fff;
  padding: 0 4px;
  cursor: pointer;
}
.pb-rte__select:focus {
  outline: 2px solid #3b82f6;
  outline-offset: -1px;
}
/* ── Link popup ── */
.pb-rte-link-popup {
  display: none;
  position: fixed;
  z-index: 10000;
  background: #fff;
  border: 1px solid #e0e2e8;
  border-radius: 6px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  padding: 8px;
  align-items: center;
  gap: 4px;
  /* Inherit the surrounding admin / customer brand font instead of the
       browser default. The popup is appended to <body>, so without this
       it falls back to the system serif. */
  font-family: var(--admin-font-family);
  /* The JS sets a 300px wrapper inline; widen to fit a typical URL.
       !important wins over the inline width attribute. */
}
.pb-rte-link-popup > div {
  width: 420px !important;
}
/* Explicit widths on the row's select + input — JS uses flex but the
   select grabbed too much space in some chains, collapsing the input. */
.pb-rte-link-popup__type {
  flex: 0 0 90px;
  width: 90px !important;
  height: 30px !important;
  font-family: var(--admin-font-family) !important;
  font-size: 13px !important;
}
.pb-rte-link-popup__input {
  flex: 1 1 auto !important;
  width: auto !important;
  min-width: 0;
  height: 30px !important;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  font-size: 13px !important;
  font-family: var(--admin-font-family) !important;
  padding: 0 10px !important;
}
.pb-rte-link-popup__input:focus {
  outline: 2px solid #3b82f6;
  outline-offset: -1px;
}
.pb-rte-link-popup__btn {
  height: 30px;
  border: none;
  border-radius: 4px;
  font-size: 12px;
  font-family: var(--admin-font-family);
  font-weight: 600;
  padding: 0 12px;
  cursor: pointer;
}
.pb-rte-link-popup__btn--apply {
  background: #3b82f6;
  color: #fff;
}
.pb-rte-link-popup__btn--apply:hover {
  background: #2563eb;
}
.pb-rte-link-popup__btn--remove {
  background: #fee2e2;
  color: #dc2626;
}
.pb-rte-link-popup__btn--remove:hover {
  background: #fecaca;
}
/* ── Colour popup ── */
.pb-rte-colour-popup {
  position: fixed;
  z-index: 10000;
  background: #fff;
  border: 1px solid #e0e2e8;
  border-radius: 6px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}
.pb-rte-colour-popup__swatch {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 3px 4px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: none;
  cursor: pointer;
  transition: all 100ms;
}
.pb-rte-colour-popup__swatch:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}
/* ── Source textarea ── */
.pb-rte-source {
  display: block;
  width: 100%;
  min-height: 100px;
  padding: 10px;
  font-family: "SF Mono", Consolas, "Courier New", monospace;
  font-size: 12px;
  line-height: 1.5;
  color: #e2e8f0;
  background: #1e293b;
  border: 2px solid #3b82f6;
  border-radius: 6px;
  resize: vertical;
  tab-size: 2;
}
.pb-rte-source:focus {
  outline: none;
}
/* ── Editable field (admin form usage) ── */
.admin-rte-editable {
  display: block;
  min-height: 9rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--admin-border, #ddd);
  border-radius: 4px;
  background: var(--admin-surface, #fff);
  color: var(--admin-text, #333);
  font: inherit;
  line-height: 1.45;
  overflow-y: auto;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.admin-rte-editable:focus {
  outline: none;
  border-color: var(--colour-interactive-focus-ring, #667eea);
  box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.15);
}
/* Cap the field below the viewport height so a long body scrolls INTERNALLY
   instead of pushing the field (and the floating toolbar that tracks its top
   edge) off the top of the window. Opt-in modifier — used only on the tall
   legal-page editors (Reseller Preferences), not the shorter shared fields. */
.admin-rte-editable--capped {
  max-height: calc(100vh - 12rem);
  overflow-y: auto;
}
.admin-rte-editable:empty::before {
  content: attr(data-placeholder);
  color: var(--admin-text-muted, #999);
  pointer-events: none;
}
/* Links default to browser dark-blue, which is unreadable on the dark
   editor surface. Use the accent var so they stay legible in both themes. */
.admin-rte-editable a {
  color: var(--admin-accent, #3363AF);
}
/**
 * Admin Module — Allocations tab
 * See Docs/_scope-module-allocation.md for the data model.
 */
.alloc-unit-tree {
  list-style: none;
  margin: 0;
  padding: 0;
}
.alloc-unit-tree ul {
  list-style: none;
  margin: 0.2rem 0 0.4rem 1.5rem;
  padding: 0;
}
.alloc-unit-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.35rem 0.15rem;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--admin-text, #3d3d4e);
}
.alloc-unit-row--division {
  font-weight: 600;
}
.alloc-unit-row--department {
  color: var(--admin-text, #3d3d4e);
}
.alloc-unit-row:hover {
  background: var(--admin-bg, #f6f7f9);
}
.alloc-unit-row input[type="checkbox"] {
  flex-shrink: 0;
}
.alloc-learner-row {
  display: grid;
  grid-template-columns: 24px 1fr 1fr auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--admin-border-light, #eef0f3);
  cursor: pointer;
  font-size: 0.9rem;
}
.alloc-learner-row:last-child {
  border-bottom: none;
}
.alloc-learner-row:hover {
  background: var(--admin-bg, #f6f7f9);
}
.alloc-learner-name {
  color: var(--admin-text, #3d3d4e);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.alloc-learner-dept {
  color: var(--admin-text-muted, #8a8a8a);
  font-size: 0.82rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.alloc-learner-sources {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}
/* Source pills — colour-coded by route, small uppercase chips */
.alloc-source {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  background: var(--admin-surface-muted, #f1f2f5);
  color: var(--admin-text, #3d3d4e);
  line-height: 1.2;
}
.alloc-source--all-company {
  background: color-mix(in srgb, var(--tenant-information) 15%, transparent);
  color: var(--tenant-information);
}
.alloc-source--division {
  background: color-mix(in srgb, var(--tenant-success) 15%, transparent);
  color: var(--tenant-success);
}
.alloc-source--department {
  background: color-mix(in srgb, var(--tenant-warning) 18%, transparent);
  color: var(--tenant-warning-d20);
}
.alloc-source--individual {
  background: rgba(178, 167, 152, 0.18);
  color: #746757;
}
.alloc-source--role {
  background: rgba(123, 94, 167, 0.15);
  color: #7b5ea7;
}
/**
 * Admin Library — styling for /Library/Index
 *
 * Two-pane layout: folder tree on the left, item grid on the right.
 * Uses the shared --admin-* tokens so dark mode comes for free.
 * Mask-image + currentColor for icons, matching the rest of admin.
 */
.library-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 20px;
  margin-top: 16px;
  align-items: start;
}
@media (max-width: 900px) {
  .library-layout {
    grid-template-columns: 1fr;
  }
}
@media (min-width: 901px) {
  body.library-shell .main {
    overflow: visible;
  }
}
.library-tree {
  background: var(--admin-surface);
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  padding: 12px 8px;
  height: fit-content;
  position: sticky;
  top: calc(var(--admin-header-height) + 16px);
}
.library-tree__header {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--admin-text-muted);
  padding: 4px 8px 10px;
}
.library-tree__list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.library-tree__item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border-radius: 6px;
  color: var(--admin-text);
  cursor: default;
  position: relative;
}
.library-tree__item:hover {
  background: var(--admin-surface-muted);
}
.library-tree__item.is-current {
  background: var(--primary1-light, rgba(0, 122, 255, 0.08));
  color: var(--primary1);
}
.library-tree__item.is-current .library-tree__name {
  font-weight: 600;
  color: var(--primary1);
}
.library-tree__item.is-loading,
.library-tree__item.is-error {
  color: var(--admin-text-muted);
  font-style: italic;
  cursor: default;
  padding: 8px 10px;
}
.library-tree__item--drop-target {
  outline: 2px dashed var(--primary1);
  outline-offset: -2px;
  background: var(--primary1-light, rgba(0, 122, 255, 0.12));
}
.library-tree__indent {
  display: inline-block;
  flex-shrink: 0;
}
.library-tree__toggle {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--admin-text-muted);
  font-size: 10px;
  line-height: 1;
  cursor: pointer;
  border-radius: 4px;
  transform: rotate(90deg);
  transition: transform 120ms ease;
}
.library-tree__toggle:hover {
  background: var(--admin-border-light);
  color: var(--admin-text);
}
.library-tree__toggle.is-collapsed {
  transform: rotate(0deg);
}
.library-tree__toggle--leaf {
  cursor: default;
  pointer-events: none;
  background: transparent;
}
.library-tree__children {
  list-style: none;
  margin: 0;
  padding: 0;
}
.library-tree__children.is-collapsed {
  display: none;
}
.library-tree__icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  background-color: currentColor;
  -webkit-mask: url('/Content/images/Icons/icon-folder-white.svg') no-repeat center / contain;
  mask: url('/Content/images/Icons/icon-folder-white.svg') no-repeat center / contain;
}
.library-tree__icon--root {
  -webkit-mask-image: url('/Content/images/Icons/icon-home-white.svg');
  mask-image: url('/Content/images/Icons/icon-home-white.svg');
}
.library-tree__name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: inherit;
  text-decoration: none;
}
.library-tree__name:hover {
  text-decoration: underline;
}
.library-tree__menu {
  background: transparent;
  border: 0;
  padding: 2px 6px;
  line-height: 1;
  color: var(--admin-text-muted);
  cursor: pointer;
  border-radius: 4px;
  opacity: 0;
  transition: opacity 120ms ease;
}
.library-tree__menu:hover {
  background: var(--admin-border-light);
  color: var(--admin-text);
}
.library-tree__item:hover .library-tree__menu,
.library-tree__item.is-current .library-tree__menu {
  opacity: 1;
}
.library-grid-wrap {
  min-width: 0;
}
.library-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  /* Sentinel row — a tall, invisible strip at the bottom that the
       IntersectionObserver watches. When it scrolls into view the JS
       advances the visible window and re-renders. */
}
.library-grid.is-view-list {
  grid-template-columns: 1fr;
  gap: 8px;
}
.library-grid.is-view-list .library-card {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 14px;
  padding: 8px;
}
.library-grid.is-view-list .library-card__thumb {
  aspect-ratio: 1;
  height: 80px;
}
.library-grid.is-view-list .library-card__body {
  padding: 4px 6px;
}
.library-grid__empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px 20px;
  border: 1px dashed var(--admin-border);
  border-radius: 10px;
  background: var(--admin-surface-alt);
}
.library-grid__empty-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--admin-text);
  margin-bottom: 4px;
}
.library-grid__empty-hint {
  font-size: 13px;
  color: var(--admin-text-muted);
}
.library-grid__sentinel {
  grid-column: 1 / -1;
  height: 40px;
}
.library-card {
  background: var(--admin-surface);
  border: 1px solid var(--admin-border);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 120ms ease, transform 120ms ease, box-shadow 120ms ease;
}
.library-card[draggable="true"] {
  cursor: grab;
}
.library-card[draggable="true"]:active {
  cursor: grabbing;
}
.library-card--dragging {
  opacity: 0.4;
}
.library-card:hover {
  border-color: var(--primary1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.library-card__thumb {
  background: var(--admin-surface-muted);
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.library-card__thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.library-card__thumb-icon {
  color: var(--admin-text-muted);
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 16px;
  text-align: center;
}
.library-card__ext {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 6px;
  background: var(--admin-border-light);
  color: var(--admin-text);
  font-size: 12px;
}
.library-card__body {
  padding: 10px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.library-card__header {
  display: flex;
  align-items: center;
  gap: 6px;
}
.library-card__name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
  font-size: 14px;
  color: var(--admin-text);
}
.library-card__menu {
  background: transparent;
  border: 0;
  padding: 2px 6px;
  line-height: 1;
  color: var(--admin-text-muted);
  cursor: pointer;
  border-radius: 4px;
}
.library-card__menu:hover {
  background: var(--admin-border-light);
  color: var(--admin-text);
}
.library-card__meta {
  display: flex;
  gap: 10px;
  font-size: 12px;
  color: var(--admin-text-muted);
}
.library-card__meta > span + span::before {
  content: '·';
  margin-right: 10px;
}
.library-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.library-card__badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
}
.library-card__ratio {
  flex: 0 0 auto;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.4;
  padding: 1px 7px;
  border-radius: 9px;
  background: var(--primary1, #007aff);
  color: #fff;
  white-space: nowrap;
  letter-spacing: 0.2px;
}
.library-card__ratio--none {
  background: var(--admin-surface-muted);
  color: var(--admin-text-muted);
  border: 1px solid var(--admin-border-light);
}
.library-card__core-tag {
  flex: 0 0 auto;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.4;
  padding: 1px 7px;
  border-radius: 9px;
  background: var(--admin-surface-muted);
  color: var(--admin-text-muted);
  border: 1px solid var(--admin-border);
  white-space: nowrap;
}
.library-card__tag {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  background: var(--admin-surface-muted);
  color: var(--admin-text-muted);
  border: 1px solid var(--admin-border-light);
}
.library-card__usage {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--admin-text-muted);
  margin-top: 4px;
}
.library-card__usage-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--admin-border);
  flex-shrink: 0;
}
.library-card__usage-dot--active {
  background: var(--active, #2ecc71);
}
.tag-autocomplete {
  position: relative;
}
.tag-autocomplete__list {
  position: absolute;
  top: calc(100% + 2px);
  left: 0;
  right: 0;
  max-height: 180px;
  overflow-y: auto;
  margin: 0;
  padding: 4px 0;
  list-style: none;
  background: var(--admin-surface);
  border: 1px solid var(--admin-border);
  border-radius: 6px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  z-index: 20;
}
.tag-autocomplete__item {
  padding: 6px 12px;
  cursor: pointer;
  font-size: 13px;
  color: var(--admin-text);
}
.tag-autocomplete__item:hover,
.tag-autocomplete__item.is-active {
  background: var(--primary1-light, rgba(0, 122, 255, 0.08));
  color: var(--primary1);
}
.tag-autocomplete__hint {
  margin-top: 4px;
  font-size: 11px;
  color: var(--admin-text-muted);
}
.library-card--layout .library-card__thumb-img,
.library-picker__tile--layout .library-picker__thumb-img {
  object-fit: contain;
  padding: 6px;
  background: var(--admin-surface);
}
.library-sizes-panel__dims {
  font-size: 11px;
  color: var(--admin-text-muted);
  margin-left: 4px;
}
.library-delete-intro,
.library-delete-hint {
  margin: 0 0 10px;
}
.library-delete-hint {
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--admin-text-muted);
}
.library-delete-places {
  margin: 0;
  padding: 8px 12px 8px 28px;
  list-style: disc;
  text-align: left;
  font-size: 13px;
  line-height: 1.45;
  color: var(--admin-text);
  background: var(--admin-surface-alt);
  border: 1px solid var(--admin-border-light);
  border-radius: 8px;
  max-height: 160px;
  overflow-y: auto;
}
.library-delete-places li + li {
  margin-top: 4px;
}
.library-usage-panel {
  border: 1px solid var(--admin-border-light);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--admin-surface-alt);
  margin-top: 6px;
}
.library-usage-panel__header {
  font-size: 12px;
  font-weight: 600;
  color: var(--admin-text);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.library-usage-panel__list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 180px;
  overflow-y: auto;
}
.library-usage-panel__row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  border-top: 1px solid var(--admin-border-light);
  font-size: 12px;
  color: var(--admin-text);
}
.library-usage-panel__row:first-child {
  border-top: 0;
}
.library-usage-panel__row--muted {
  color: var(--admin-text-muted);
  font-style: italic;
}
.library-usage-panel__where {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.library-usage-panel__sep {
  color: var(--admin-text-muted);
  margin: 0 2px;
}
.library-usage-panel__link {
  font-size: 11px;
  color: var(--primary1);
  text-decoration: none;
  flex-shrink: 0;
  padding: 2px 8px;
  border-radius: 4px;
}
.library-usage-panel__link:hover {
  background: var(--primary1-light, rgba(0, 122, 255, 0.08));
  text-decoration: underline;
}
.library-view-toggle {
  display: inline-flex;
  border: 1px solid var(--admin-border);
  border-radius: 6px;
  overflow: hidden;
}
.library-view-toggle__btn {
  background: var(--admin-surface);
  border: 0;
  border-left: 1px solid var(--admin-border);
  padding: 6px 10px;
  color: var(--admin-text-muted);
  cursor: pointer;
}
.library-view-toggle__btn:first-child {
  border-left: 0;
}
.library-view-toggle__btn:hover {
  background: var(--admin-surface-muted);
  color: var(--admin-text);
}
.library-view-toggle__btn.is-active {
  background: var(--primary1-light, rgba(0, 122, 255, 0.08));
  color: var(--primary1);
}
.library-view-toggle__btn .library-view-toggle__glyph {
  width: 16px;
  height: 16px;
  display: inline-block;
  background-color: currentColor;
  -webkit-mask: no-repeat center / contain;
  mask: no-repeat center / contain;
}
.library-view-toggle__btn .library-view-toggle__glyph--grid {
  -webkit-mask-image: url('/Content/images/Icons/icon-grid-white.svg');
  mask-image: url('/Content/images/Icons/icon-grid-white.svg');
}
.library-view-toggle__btn .library-view-toggle__glyph--list {
  -webkit-mask-image: url('/Content/images/Icons/icon-list-white.svg');
  mask-image: url('/Content/images/Icons/icon-list-white.svg');
}
.library-upload-toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  background: var(--admin-surface);
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  padding: 10px 14px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  z-index: 900;
  min-width: 260px;
}
.library-upload-toast__label {
  display: block;
  font-size: 13px;
  color: var(--admin-text);
  margin-bottom: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.library-upload-toast__bar {
  height: 4px;
  background: var(--admin-border-light);
  border-radius: 2px;
  overflow: hidden;
}
.library-upload-toast__fill {
  height: 100%;
  width: 0;
  background: var(--primary1);
  transition: width 200ms ease;
}
.library-menu {
  background: var(--admin-surface);
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
  padding: 6px;
  min-width: 180px;
  z-index: 1100;
  max-height: calc(100vh - 16px);
  overflow-y: auto;
}
.library-menu__item {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  padding: 8px 12px;
  border-radius: 6px;
  color: var(--admin-text);
  cursor: pointer;
  font-size: 13px;
}
.library-menu__item:hover {
  background: var(--admin-surface-muted);
}
.library-menu__item--danger {
  color: #c0392b;
}
.library-menu__item--danger:hover {
  background: rgba(192, 57, 43, 0.08);
}
/**
 * Library Picker — shared modal invoked by window.LibraryPicker.open().
 * Uses the Battersea Popup for chrome; this file styles the inner shell
 * (tabs, search, grid). Tokens come from admin-variables for dark mode.
 */
.library-picker {
  display: flex;
  flex-direction: column;
  max-height: 80vh;
  min-height: 420px;
}
.library-picker__header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--admin-border);
}
.library-picker__title {
  flex: 1;
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--admin-text-heading);
}
.library-picker__upload {
  background: var(--primary1, #007aff);
  border: 0;
  color: #fff;
  cursor: pointer;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 4px;
  margin-right: 8px;
}
.library-picker__upload:hover {
  filter: brightness(1.05);
}
.library-picker__upload[hidden] {
  display: none;
}
.library-picker__close {
  background: transparent;
  border: 0;
  font-size: 22px;
  line-height: 1;
  color: var(--admin-text-muted);
  cursor: pointer;
  padding: 2px 8px;
  border-radius: 4px;
}
.library-picker__close:hover {
  background: var(--admin-surface-muted);
  color: var(--admin-text);
}
.library-picker__tabs {
  display: flex;
  gap: 4px;
  padding: 10px 18px 0;
  border-bottom: 1px solid var(--admin-border);
}
.library-picker__tabs.is-single .library-picker__tab {
  pointer-events: none;
}
.library-picker__tab {
  background: transparent;
  border: 0;
  padding: 8px 14px 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--admin-text-muted);
  border-bottom: 2px solid transparent;
  cursor: pointer;
}
.library-picker__tab:hover {
  color: var(--admin-text);
}
.library-picker__tab.is-active {
  color: var(--primary1);
  border-bottom-color: var(--primary1);
}
.library-picker__tab[hidden] {
  display: none;
}
.library-picker__search {
  padding: 12px 18px;
  border-bottom: 1px solid var(--admin-border-light);
  display: flex;
  gap: 10px;
  align-items: center;
}
.library-picker__search input {
  flex: 1;
  min-width: 0;
  padding: 8px 12px;
  border: 1px solid var(--admin-border);
  border-radius: 6px;
  background: var(--admin-surface);
  color: var(--admin-text);
  font-size: 13px;
}
.library-picker__search input:focus {
  outline: 2px solid var(--primary1);
  outline-offset: -1px;
  border-color: var(--primary1);
}
.library-picker__folder {
  flex: 0 0 auto;
  max-width: 200px;
  padding: 8px 12px;
  border: 1px solid var(--admin-border);
  border-radius: 6px;
  background: var(--admin-surface);
  color: var(--admin-text);
  font-size: 13px;
  cursor: pointer;
}
.library-picker__folder:focus {
  outline: 2px solid var(--primary1);
  outline-offset: -1px;
  border-color: var(--primary1);
}
.library-picker__body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 14px 18px 18px;
}
.library-picker__grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}
.library-picker__tile {
  background: var(--admin-surface);
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  padding: 0;
  font: inherit;
  text-align: left;
  display: flex;
  flex-direction: column;
  transition: border-color 120ms ease, transform 120ms ease, box-shadow 120ms ease;
}
.library-picker__tile:hover {
  border-color: var(--primary1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.library-picker__tile:focus-visible {
  outline: 2px solid var(--primary1);
  outline-offset: 2px;
}
.library-picker__thumb {
  position: relative;
  aspect-ratio: 1;
  background: var(--admin-surface-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.library-picker__ratio {
  position: absolute;
  left: 6px;
  bottom: 6px;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.4;
  padding: 1px 7px;
  border-radius: 9px;
  background: var(--primary1, #007aff);
  color: #fff;
  white-space: nowrap;
  pointer-events: none;
}
.library-picker__sizes {
  flex: 0 0 auto;
  padding: 1px 7px;
  border: 1px solid var(--admin-border);
  border-radius: 9px;
  background: var(--admin-surface);
  color: var(--admin-text-muted);
  font: inherit;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
}
.library-picker__sizes:hover {
  color: var(--primary1);
  border-color: var(--primary1);
}
.library-picker__sizes-panel {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.library-picker__sizes-head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.library-picker__sizes-back {
  background: transparent;
  border: 1px solid var(--admin-border);
  border-radius: 6px;
  padding: 5px 10px;
  font: inherit;
  font-size: 12px;
  color: var(--admin-text);
  cursor: pointer;
}
.library-picker__sizes-back:hover {
  border-color: var(--primary1);
  color: var(--primary1);
}
.library-picker__sizes-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--admin-text-heading);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.library-picker__sizes-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}
.library-picker__sizes-create {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--admin-border-light);
}
.library-picker__sizes-create-label {
  font-size: 12px;
  color: var(--admin-text-muted);
}
.library-picker__sizes-create-btn {
  padding: 4px 10px;
  border: 1px dashed var(--admin-border);
  border-radius: 12px;
  background: var(--admin-surface);
  color: var(--admin-text);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.library-picker__sizes-create-btn::before {
  content: '+ ';
  color: var(--admin-text-muted);
}
.library-picker__sizes-create-btn:hover {
  border-style: solid;
  border-color: var(--primary1);
  color: var(--primary1);
}
.library-picker__thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.library-picker__thumb-ext {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.4px;
  color: var(--admin-text);
  background: var(--admin-border-light);
  padding: 6px 10px;
  border-radius: 6px;
}
.library-picker__name {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 500;
  color: var(--admin-text);
}
.library-picker__name-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.library-picker__empty,
.library-picker__error {
  grid-column: 1 / -1;
  text-align: center;
  padding: 36px 16px;
  color: var(--admin-text-muted);
  font-size: 13px;
}
.library-picker__error {
  color: #c0392b;
}
.pb-props__picker-row {
  display: flex;
  gap: 4px;
}
.pb-props__picker-row .pb-props__input {
  flex: 1;
  min-width: 0;
}
.pb-props__picker-btn {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border: 1px solid var(--admin-border, #e2e8f0);
  border-radius: 4px;
  background: var(--admin-surface, #fff);
  color: var(--admin-text-muted, #64748b);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.pb-props__picker-btn:hover {
  color: var(--primary1, #007aff);
  border-color: var(--primary1, #007aff);
}
.pb-props__picker-btn__glyph {
  width: 16px;
  height: 16px;
  display: inline-block;
  background-color: currentColor;
  -webkit-mask: url('/Content/images/Icons/icon-folder-white.svg') no-repeat center / contain;
  mask: url('/Content/images/Icons/icon-folder-white.svg') no-repeat center / contain;
}
.library-clash-overlay {
  position: fixed;
  inset: 0;
  z-index: 10700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: var(--battersea-popup-overlay-bg, rgba(0, 0, 0, 0.55));
}
.library-clash {
  width: min(480px, 100%);
  background: var(--admin-surface, #fff);
  color: var(--admin-text, #333);
  border-radius: var(--admin-radius, 8px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}
.library-clash__existing {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 1rem;
  padding: 0.6rem;
  border: 1px solid var(--admin-border, #e5e7eb);
  border-radius: var(--admin-radius-sm, 4px);
  font-size: 0.9rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.library-clash__thumb {
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: var(--admin-radius-sm, 4px);
  background: var(--admin-bg, #f3f4f6);
}
.library-clash__thumb--none {
  display: block;
}
.library-clash__warning {
  color: var(--admin-status-danger);
}
.library-clash .confirm-dialog__actions {
  flex-wrap: wrap;
}
.bcu-overlay {
  position: fixed;
  inset: 0;
  z-index: 10600;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: var(--battersea-popup-overlay-bg, rgba(0, 0, 0, 0.55));
}
.bcu-overlay.is-open {
  display: flex;
}
.bcu-modal {
  display: flex;
  flex-direction: column;
  width: min(860px, 100%);
  max-height: min(90vh, 780px);
  background: var(--admin-surface, #fff);
  color: var(--admin-text, #333);
  border-radius: var(--admin-radius, 8px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}
.bcu-modal__head {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  padding: 1.25rem 1.25rem 0.5rem;
}
.bcu-modal__head h2 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--admin-text-heading);
}
.bcu-modal__count {
  font-size: 0.85rem;
  color: var(--admin-text-muted);
}
.bcu-step {
  padding: 0.25rem 1.25rem;
  overflow: auto;
}
.bcu-hint {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
  color: var(--admin-text-muted);
  line-height: 1.5;
}
.bcu-presets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 0.6rem;
  padding-bottom: 1rem;
}
.bcu-preset {
  border: 1px solid var(--admin-border, #d5d5d5);
  border-radius: 6px;
  background: var(--admin-surface, #fff);
}
.bcu-preset--default {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.75rem;
  text-align: left;
  cursor: pointer;
}
.bcu-preset--default:hover {
  border-color: var(--accent, #4a90d9);
}
.bcu-preset__pick {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.75rem;
  border: 0;
  background: none;
  text-align: left;
  cursor: pointer;
}
.bcu-preset__pick:hover .bcu-ratio-box {
  border-color: var(--accent, #4a90d9);
}
.bcu-ratio-box {
  flex: 0 0 auto;
  border: 2px solid var(--admin-border, #999);
  border-radius: 2px;
}
.bcu-preset__text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}
.bcu-preset__label {
  font-weight: 600;
}
.bcu-preset__meta {
  font-size: 0.8rem;
  color: var(--admin-text-muted);
}
.bcu-preset--tile {
  position: relative;
}
.bcu-preset--disabled {
  opacity: 0.5;
}
.bcu-preset--disabled .bcu-preset__pick {
  cursor: default;
}
.bcu-preset__tick {
  position: absolute;
  top: 0.45rem;
  right: 0.5rem;
  display: flex;
  align-items: center;
  cursor: pointer;
}
.bcu-preset__tick input {
  margin: 0;
  width: 16px;
  height: 16px;
  cursor: pointer;
}
.bcu-preset--tile .bcu-preset__pick {
  padding-right: 2.2rem;
}
.bcu-preset__enforce {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.75rem 0.6rem;
  font-size: 0.8rem;
  cursor: pointer;
}
.bcu-preset__enforce input {
  margin: 0;
}
.bcu-stage {
  height: min(60vh, 520px);
  background: #222;
}
.bcu-stage img {
  display: block;
  max-width: 100%;
}
.bcu-warning {
  margin: 0.6rem 0 0;
  font-size: 0.85rem;
  color: var(--admin-status-warning-text, #8a6d3b);
}
.bcu-modal__foot {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--admin-border, #e5e5e5);
  background: var(--admin-surface-alt, #fafbfc);
}
.bcu-spacer {
  flex: 1;
}
#cropPresetsApp {
  overflow-x: auto;
}
.crop-presets-table {
  width: 100%;
  border-collapse: collapse;
}
.crop-presets-table th,
.crop-presets-table td {
  padding: 0.4rem 0.35rem;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid var(--admin-border, #e5e5e5);
}
.crop-presets-table th {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--admin-text-muted);
  white-space: nowrap;
}
.crop-presets-table input.form-control {
  width: 100%;
  min-width: 9rem;
  padding: 0.45rem 0.55rem;
}
.crop-presets-table input[type="number"].form-control {
  width: 5.5rem;
  min-width: 5.5rem;
}
.crop-presets-table .crop-presets-table__num {
  width: 5.5rem;
  white-space: nowrap;
}
.crop-presets-table .crop-presets-table__actions {
  width: 1%;
  white-space: nowrap;
  text-align: right;
}
.crop-presets-table .crop-presets-table__actions .btn {
  padding: 0.45rem 0.6rem;
}
.crop-presets-table__row--global td {
  opacity: 0.75;
}
.crop-presets-global-tag {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0.05rem 0.4rem;
  border-radius: 3px;
  background: var(--admin-border, #e5e5e5);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.crop-presets-toolbar {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}
.crop-presets-empty {
  padding: 0.75rem 0.25rem;
  font-size: 0.9rem;
  opacity: 0.7;
}
/* =========================================================================
   Reporting redesign — Commit 1: landing page only.
   Adds: section-heading, admin-notice, report-grid + report-card.
   Later commits (viewer, summary, builder) extend this file.
   See Docs/plan-reporting-redesign.md.
   ========================================================================= */
/* Section heading strip above each card group. */
.section-heading {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--admin-text-muted, #8a8a8a);
  margin: 2rem 0 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--admin-border, #e2e5ea);
}
.section-heading:first-of-type {
  margin-top: 0;
}
.section-heading__count {
  font-weight: 500;
  color: var(--admin-text-muted, #8a8a8a);
  margin-left: 0.3rem;
}
/* One-off info banner used on the landing page while the rebuild is
   in-flight. Generic enough to live here; if it gets reused elsewhere
   we'll lift it into admin-utility.less. */
.admin-notice {
  padding: 0.75rem 1rem;
  border-radius: var(--admin-radius, 6px);
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
  background: #fff8e1;
  border: 1px solid #ffe08a;
  color: #5c4a0e;
}
.admin-notice a {
  color: inherit;
  text-decoration: underline;
}
.admin-notice--info {
  background: rgba(34, 157, 245, 0.08);
  border-color: rgba(34, 157, 245, 0.25);
  color: #2063a2;
}
/* Card grid matching the mockup. Disabled-state is used in Commit 1
   while each report is a placeholder; live cards drop the modifier. */
.report-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}
.report-card {
  background: var(--admin-surface, #fff);
  border: 1px solid var(--admin-border, #e2e5ea);
  border-radius: var(--admin-radius, 6px);
  padding: 1.1rem 1.2rem;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  position: relative;
  transition: box-shadow 0.15s, transform 0.15s, border-color 0.15s;
  /* Saved-report variant — accent-tinted icon square. */
  /* Saved-report card with Edit + Delete corner actions. The whole
       card is no longer a single <a>; instead an inner __link covers
       the body and small action buttons sit absolutely positioned
       in the top-right. */
  /* Summary variant — orange-tinted icon square. */
  /* New-report call-to-action tile. */
}
.report-card:hover:not(.report-card--disabled) {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
  transform: translateY(-1px);
  border-color: var(--admin-accent, #229DF5);
}
.report-card--disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.report-card__icon {
  width: 34px;
  height: 34px;
  border-radius: 6px;
  background: rgba(34, 157, 245, 0.1);
  color: var(--admin-accent, #229DF5);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  font-weight: 700;
}
.report-card__title {
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--admin-text-heading, #1a1a2e);
}
.report-card__desc {
  font-size: 0.82rem;
  color: var(--admin-text-muted, #8a8a8a);
  line-height: 1.45;
}
.report-card__meta {
  margin-top: auto;
  font-size: 0.75rem;
  color: var(--admin-text-muted, #8a8a8a);
  display: flex;
  gap: 0.75rem;
  padding-top: 0.5rem;
  border-top: 1px solid #f0f0f0;
}
.report-card__badge {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.15em 0.5em;
  border-radius: 3px;
  background: #e8eaed;
  color: #5f6368;
}
.report-card__badge--core {
  background: rgba(34, 157, 245, 0.12);
  color: #2063a2;
}
.report-card__badge--summary {
  background: rgba(237, 173, 68, 0.18);
  color: #8a5d10;
}
.report-card__badge--custom {
  background: rgba(10, 98, 66, 0.12);
  color: #0a6242;
}
.report-card__badge--saved {
  background: rgba(34, 157, 245, 0.12);
  color: #2063a2;
}
.report-card--saved .report-card__icon {
  background: rgba(34, 157, 245, 0.1);
  color: #2063a2;
}
.report-card__sub {
  margin-left: 0.5rem;
  font-size: 0.72rem;
  color: var(--admin-text-muted, #8a8a8a);
}
.report-card--has-actions {
  position: relative;
  padding: 0;
}
.report-card--has-actions .report-card__badge--saved {
  display: none;
}
.report-card--has-actions .report-card__badge {
  top: 0.6rem;
  right: auto;
  left: 0.6rem;
}
.report-card--has-actions .report-card__link {
  padding-top: 2.4rem;
}
.report-card__link {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 1rem 1.1rem;
  text-decoration: none;
  color: inherit;
  border-radius: inherit;
}
.report-card__actions {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  display: flex;
  gap: 0.25rem;
  z-index: 2;
}
.report-card__action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 4px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.85);
  color: var(--admin-text-muted, #8a8a8a);
  cursor: pointer;
  font-size: 0.95rem;
  line-height: 1;
  text-decoration: none;
  font-family: inherit;
}
.report-card__action:hover {
  border-color: var(--admin-border, #e2e5ea);
  color: var(--admin-text, #3e3b3f);
  background: #fff;
}
.report-card__action--danger:hover {
  color: var(--status-fail, #a94442);
  border-color: var(--status-fail, #a94442);
}
.report-card--summary .report-card__icon {
  background: rgba(237, 173, 68, 0.15);
  color: #b97b15;
}
.report-card--new {
  background: transparent;
  border-style: dashed;
  color: var(--admin-accent, #229DF5);
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 140px;
}
.report-card--new .report-card__title {
  color: var(--admin-accent, #229DF5);
}
.report-card--new:hover:not(.report-card--disabled) {
  background: rgba(34, 157, 245, 0.04);
}
/* =========================================================================
   Reporting redesign — Commit 2: viewer (Completion by Module).
   Saved-views strip, filter bar, applied chips, summary cards, results
   table, status badges, export menu, save-as-view modal.
   ========================================================================= */
.report-viewer {
  --status-pass: #0a6242;
  --status-pass-bg: rgba(10, 98, 66, 0.12);
  --status-fail: #a94442;
  --status-fail-bg: rgba(169, 68, 66, 0.12);
  --status-prog: #446ca9;
  --status-prog-bg: rgba(68, 108, 169, 0.12);
}
.saved-views {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.5rem 0 1rem;
  align-items: center;
}
.saved-views__label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--admin-text-muted, #8a8a8a);
  margin-right: 0.3rem;
}
.view-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.82rem;
  padding: 0.35em 0.8em;
  background: #fff;
  border: 1px solid var(--admin-border, #e2e5ea);
  border-radius: 999px;
  color: var(--admin-text, #3e3b3f);
  cursor: pointer;
  text-decoration: none;
}
.view-chip:hover {
  border-color: var(--admin-accent, #229DF5);
  color: var(--admin-accent, #229DF5);
}
.view-chip--active {
  background: var(--admin-accent, #229DF5);
  color: #fff;
  border-color: var(--admin-accent, #229DF5);
}
.view-chip--active:hover {
  color: #fff;
}
.view-chip--new {
  background: transparent;
  border-style: dashed;
  color: var(--admin-text-muted, #8a8a8a);
}
.view-chip__remove {
  margin-left: 0.3rem;
  opacity: 0.6;
  cursor: pointer;
}
.view-chip__remove:hover {
  opacity: 1;
}
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 1rem;
  background: var(--admin-surface, #fff);
  border: 1px solid var(--admin-border, #e2e5ea);
  border-radius: var(--admin-radius, 6px);
  margin-bottom: 0.75rem;
  align-items: end;
}
.filter-bar__actions {
  margin-left: auto;
  display: flex;
  gap: 0.4rem;
}
.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 160px;
}
.filter-group[hidden] {
  display: none;
}
.filter-group__label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--admin-text-muted, #8a8a8a);
}
.filter-group select,
.filter-group input[type="text"],
.filter-group input[type="search"],
.filter-group input[type="date"] {
  padding: 0.4rem 0.65rem;
  font-size: 0.88rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #fff;
  color: var(--admin-text, #3e3b3f);
  font-family: inherit;
}
.applied-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  margin-bottom: 1rem;
}
.applied-filters__chips {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}
.applied-filters__label {
  font-size: 0.75rem;
  color: var(--admin-text-muted, #8a8a8a);
  margin-right: 0.3rem;
}
.chip-filter {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  padding: 0.3em 0.3em 0.3em 0.7em;
  background: rgba(34, 157, 245, 0.08);
  border: 1px solid rgba(34, 157, 245, 0.25);
  border-radius: 4px;
  color: #2063a2;
}
.chip-filter__remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 3px;
  background: rgba(34, 157, 245, 0.15);
  color: #2063a2;
  cursor: pointer;
  font-size: 0.9rem;
  line-height: 1;
}
.chip-filter__remove:hover {
  background: #2063a2;
  color: #fff;
}
.chip-filter__clear {
  font-size: 0.78rem;
  color: var(--admin-text-muted, #8a8a8a);
  margin-left: 0.5rem;
  cursor: pointer;
  text-decoration: underline;
}
.summary-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.summary-card {
  background: #fff;
  border: 1px solid var(--admin-border, #e2e5ea);
  border-radius: var(--admin-radius, 6px);
  padding: 0.9rem 1rem;
}
.summary-card__label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--admin-text-muted, #8a8a8a);
  font-weight: 600;
}
.summary-card__value {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--admin-text-heading, #1a1a2e);
  margin-top: 0.3rem;
}
.summary-card__delta {
  font-size: 0.78rem;
  color: var(--admin-text-muted, #8a8a8a);
  margin-top: 0.2rem;
}
.summary-card--pass .summary-card__value {
  color: var(--status-pass, #0a6242);
}
.summary-card--fail .summary-card__value {
  color: var(--status-fail, #a94442);
}
.summary-card--prog .summary-card__value {
  color: var(--status-prog, #446ca9);
}
.data-table-wrap {
  background: var(--admin-surface, #fff);
  border: 1px solid var(--admin-border, #e2e5ea);
  border-radius: var(--admin-radius, 6px);
  overflow: visible;
}
.drill-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1rem;
  margin-bottom: 0.75rem;
  background: var(--admin-surface, #fff);
  border: 1px solid var(--admin-border, #e2e5ea);
  border-left: 3px solid var(--admin-accent, #229DF5);
  border-radius: var(--admin-radius, 6px);
}
.drill-banner[hidden] {
  display: none;
}
.drill-banner__heading {
  flex: 1 1 auto;
  min-width: 0;
}
.drill-banner__title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--admin-text-heading, #1a1a2e);
  margin: 0;
  word-break: break-word;
}
.drill-banner__subtitle {
  font-size: 0.82rem;
  color: var(--admin-text-muted, #8a8a8a);
  margin: 0.15rem 0 0 0;
}
.drill-banner__search {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.drill-banner__search input[type="search"] {
  padding: 0.4rem 0.65rem;
  font-size: 0.88rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #fff;
  min-width: 200px;
}
.columns-picker {
  position: relative;
  display: inline-block;
}
.columns-picker__panel {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  z-index: 50;
  min-width: 260px;
  max-height: 360px;
  overflow: auto;
  background: #fff;
  border: 1px solid var(--admin-border, #e2e5ea);
  border-radius: var(--admin-radius, 6px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
  padding: 0.4rem 0;
}
.columns-picker__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.75rem 0.5rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--admin-text-muted, #8a8a8a);
  border-bottom: 1px solid var(--admin-border, #e2e5ea);
}
.columns-picker__reset {
  font-size: 0.75rem;
  text-transform: none;
  letter-spacing: 0;
  color: var(--admin-accent, #229DF5);
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 0;
}
.columns-picker__list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.columns-picker__item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.75rem;
  font-size: 0.85rem;
}
.columns-picker__item:hover {
  background: #f6f7f9;
}
.columns-picker__item input[type="checkbox"] {
  margin: 0;
}
.columns-picker__item label {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.data-table th.sortable {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
.data-table th.sortable:hover {
  color: var(--admin-text, #3e3b3f);
}
.data-table th .sort-indicator {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-left: 0.35rem;
  vertical-align: -1px;
  opacity: 0.85;
}
.data-table th .sort-indicator--asc {
  background: url('/Content/images/Icons/icon-order-down-dark-grey.svg') no-repeat center / contain;
}
.data-table th .sort-indicator--desc {
  background: url('/Content/images/Icons/icon-order-up-dark-grey.svg') no-repeat center / contain;
}
.report-viewer--drillable:not(.report-viewer--in-drill) .data-table tbody tr {
  cursor: pointer;
}
.report-viewer--drillable:not(.report-viewer--in-drill) .data-table tbody tr:hover td:last-child::after {
  content: "›";
  position: absolute;
  right: 0.6rem;
  color: var(--admin-text-muted, #8a8a8a);
  font-size: 1.1rem;
}
.report-viewer--drillable:not(.report-viewer--in-drill) .data-table tbody tr td:last-child {
  position: relative;
  padding-right: 1.5rem;
}
.data-table-toolbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--admin-border, #e2e5ea);
  background: #fafbfc;
  font-size: 0.85rem;
  color: var(--admin-text-muted, #8a8a8a);
  border-radius: var(--admin-radius, 6px) var(--admin-radius, 6px) 0 0;
}
.data-table-toolbar__actions {
  margin-left: auto;
  display: flex;
  gap: 0.4rem;
}
.data-table-scroll {
  overflow: auto;
  max-height: calc(100vh - 280px);
}
.data-table-scroll .data-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  border-bottom: 0;
  box-shadow: 0 2px 0 var(--admin-border, #e2e5ea);
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.data-table th {
  text-align: left;
  padding: 0.55rem 0.75rem;
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #666;
  border-bottom: 2px solid var(--admin-border, #e2e5ea);
  background: #fafbfc;
}
.data-table th.num,
.data-table td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.data-table td {
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid #f0f0f0;
  vertical-align: middle;
}
.report-viewer--drillable:not(.report-viewer--in-drill) .data-table tr:hover td {
  background: #f8f9fb;
}
.report-viewer:not(.report-viewer--drillable) .data-table tbody tr:hover,
.report-viewer:not(.report-viewer--drillable) .data-table tbody tr:hover td,
.report-viewer--in-drill .data-table tbody tr:hover,
.report-viewer--in-drill .data-table tbody tr:hover td {
  background: transparent;
}
.data-table__empty {
  text-align: center;
  color: var(--admin-text-muted, #8a8a8a);
  padding: 2rem 1rem !important;
}
.cell-module {
  font-weight: 600;
  color: var(--admin-text-heading, #1a1a2e);
}
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.18em 0.55em;
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.status-badge--pass {
  background: var(--status-pass-bg, rgba(10, 98, 66, 0.12));
  color: var(--status-pass, #0a6242);
}
.status-badge--fail {
  background: var(--status-fail-bg, rgba(169, 68, 66, 0.12));
  color: var(--status-fail, #a94442);
}
.status-badge--prog {
  background: var(--status-prog-bg, rgba(68, 108, 169, 0.12));
  color: var(--status-prog, #446ca9);
}
.data-table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1rem;
  border-top: 1px solid var(--admin-border, #e2e5ea);
  font-size: 0.82rem;
  color: var(--admin-text-muted, #8a8a8a);
  background: #fafbfc;
  border-radius: 0 0 var(--admin-radius, 6px) var(--admin-radius, 6px);
}
.report-export {
  position: relative;
}
.report-export__menu {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  list-style: none;
  margin: 0;
  padding: 0.25rem 0;
  background: #fff;
  border: 1px solid var(--admin-border, #e2e5ea);
  border-radius: var(--admin-radius, 6px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  min-width: 140px;
  z-index: 10;
}
.report-export__menu li a {
  display: block;
  padding: 0.4rem 0.85rem;
  font-size: 0.85rem;
  color: var(--admin-text, #3e3b3f);
  text-decoration: none;
}
.report-export__menu li a:hover {
  background: #f5f6f8;
}
.report-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.report-modal[hidden] {
  display: none;
}
.report-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(26, 26, 46, 0.45);
}
.report-modal__panel {
  position: relative;
  background: #fff;
  border-radius: var(--admin-radius, 6px);
  padding: 1.5rem;
  width: min(440px, 92vw);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}
.report-modal__title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--admin-text-heading, #1a1a2e);
  margin-bottom: 1rem;
}
.report-modal__field {
  display: block;
  margin-bottom: 0.85rem;
}
.report-modal__field > span {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--admin-text-muted, #8a8a8a);
  margin-bottom: 0.3rem;
}
.report-modal__field input,
.report-modal__field textarea,
.report-modal__field select {
  width: 100%;
  padding: 0.5rem 0.65rem;
  font-size: 0.9rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-family: inherit;
}
.report-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1rem;
}
/* Customer picker on the landing page (Super / System Admin only).
   When no customer is selected yet we show a prominent heading
   directly above the picker so it's clear the page is waiting on an
   action; once a customer is picked the picker shrinks back to a
   quiet utility strip. */
/* Matches .report-card__title (font-weight 600, heading colour) just
   a touch larger so it carries the page without shouting. */
.reports-customer-prompt {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--admin-text-heading, #1a1a2e);
  margin: 0 0 0.75rem;
  line-height: 1.3;
}
.reports-customer-picker {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1rem;
  background: var(--admin-surface, #fff);
  border: 1px solid var(--admin-border, #e2e5ea);
  border-radius: var(--admin-radius, 6px);
  margin-bottom: 1.5rem;
}
.reports-customer-picker--prominent {
  padding: 1.1rem 1.25rem;
  border-color: var(--admin-accent, #229DF5);
  box-shadow: 0 0 0 3px rgba(34, 157, 245, 0.12);
}
.reports-customer-picker__label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--admin-text-muted, #8a8a8a);
}
.reports-customer-picker__select {
  padding: 0.5rem 0.75rem;
  font-size: 0.95rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #fff;
  font-family: inherit;
  min-width: 280px;
}
.reports-customer-picker--prominent .reports-customer-picker__select {
  font-size: 1rem;
}
/* Customer context strip under the viewer title. */
.admin-page__context {
  font-size: 0.85rem;
  color: var(--admin-text-muted, #8a8a8a);
  margin-top: 0.3rem;
}
.admin-page__context strong {
  color: var(--admin-text-heading, #1a1a2e);
}
/* Custom date inputs for the "Custom..." date-range option. Two
   independent filter-group columns (From / To) so they line up with
   the rest of the filter bar rather than stacking inside one group. */
.filter-group--custom-date {
  min-width: 150px;
}
.filter-group--custom-date input[type="date"] {
  padding: 0.4rem 0.5rem;
}
/* Small inline caret for Export dropdown. ASCII-safe &#9662; / &#x25BE;
   rendering in a span keeps the button text ASCII in source. */
.caret-down {
  display: inline-block;
  margin-left: 0.25em;
  font-size: 0.85em;
  line-height: 1;
}
/* ──────────────────────────────────────────────────────────────────────
   Summary dashboards (Commit 6) — Department / Division Status.
   CSS-only charts: stacked bars, conic-gradient donut, heat matrix.
   ────────────────────────────────────────────────────────────────────── */
.scope-toggle {
  display: inline-flex;
  border: 1px solid var(--admin-border, #e2e5ea);
  border-radius: 999px;
  background: #fff;
  padding: 3px;
  margin-bottom: 1rem;
  gap: 2px;
}
.scope-toggle__btn {
  padding: 0.35em 1em;
  font-size: 0.82rem;
  border: none;
  background: transparent;
  border-radius: 999px;
  cursor: pointer;
  color: var(--admin-text, #3e3b3f);
  font-family: inherit;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
  text-decoration: none;
  line-height: 1.6;
}
.scope-toggle__btn.is-active {
  background: var(--admin-accent, #229DF5);
  color: #fff;
}
.scope-toggle__btn:hover:not(.is-active) {
  background: #f6f7f9;
}
.kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
.kpi {
  background: #fff;
  border: 1px solid var(--admin-border, #e2e5ea);
  border-radius: var(--admin-radius, 6px);
  padding: 0.9rem 1rem;
}
.kpi__label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--admin-text-muted, #8a8a8a);
  font-weight: 600;
}
.kpi__value {
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--admin-text-heading, #1a1a2e);
  margin-top: 0.2rem;
}
.kpi__sub {
  font-size: 0.78rem;
  color: var(--admin-text-muted, #8a8a8a);
  margin-top: 0.15rem;
}
.kpi--pass .kpi__value {
  color: var(--status-pass, #0a6242);
}
.kpi--fail .kpi__value {
  color: var(--status-fail, #a94442);
}
.kpi--prog .kpi__value {
  color: var(--status-prog, #446ca9);
}
.chart-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}
@media (max-width: 900px) {
  .chart-grid {
    grid-template-columns: 1fr;
  }
}
.chart-card {
  background: #fff;
  border: 1px solid var(--admin-border, #e2e5ea);
  border-radius: var(--admin-radius, 6px);
  padding: 1rem 1.1rem;
  margin-bottom: 1rem;
}
.chart-card__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.chart-card__title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--admin-text-heading, #1a1a2e);
}
.chart-card__sub {
  font-size: 0.78rem;
  color: var(--admin-text-muted, #8a8a8a);
}
.chart-card__empty {
  font-size: 0.85rem;
  color: var(--admin-text-muted, #8a8a8a);
  padding: 1rem 0;
}
/* Stacked bars */
.stacked-bars {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.stacked-row {
  display: grid;
  grid-template-columns: 160px 1fr 60px;
  gap: 0.75rem;
  align-items: center;
  text-decoration: none;
  color: inherit;
  padding: 0.25rem 0.4rem;
  border-radius: 4px;
}
.stacked-row:hover {
  background: #f6f7f9;
}
.stacked-row__label {
  font-size: 0.85rem;
  color: var(--admin-text-heading, #1a1a2e);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.stacked-row__bar {
  display: flex;
  height: 22px;
  border-radius: 3px;
  overflow: hidden;
  background: #eee;
}
.stacked-row__bar > div {
  height: 100%;
}
.stacked-row__pct {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--admin-text-heading, #1a1a2e);
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.seg-pass {
  background: var(--status-pass, #0a6242);
}
.seg-fail {
  background: var(--status-fail, #a94442);
}
.seg-prog {
  background: var(--status-prog, #446ca9);
}
.seg-todo {
  background: #d0d4da;
}
.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.78rem;
  color: var(--admin-text-muted, #8a8a8a);
  margin-top: 0.75rem;
}
.chart-legend--center {
  justify-content: center;
}
.chart-legend__swatch {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 2px;
  vertical-align: -1px;
  margin-right: 0.3rem;
}
/* Donut chart — gradient comes from inline style. */
.donut {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  margin: 0.5rem auto 1rem;
  position: relative;
}
.donut::after {
  content: "";
  position: absolute;
  inset: 25px;
  border-radius: 50%;
  background: #fff;
}
.donut__label {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1;
}
.donut__big {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--status-pass, #0a6242);
}
.donut__small {
  font-size: 0.78rem;
  color: var(--admin-text-muted, #8a8a8a);
}
/* Heat matrix (Module × OU) */
.matrix-wrap {
  overflow-x: auto;
}
.matrix {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.83rem;
}
.matrix th,
.matrix td {
  padding: 0.4rem 0.5rem;
  border: 1px solid #f0f0f0;
  text-align: center;
}
.matrix th {
  background: #fafbfc;
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  color: #666;
}
.matrix__corner {
  text-align: left !important;
}
.matrix__label {
  text-align: left !important;
  font-weight: 600;
  color: var(--admin-text-heading, #1a1a2e);
  background: #fafbfc;
  white-space: nowrap;
}
.cell {
  display: inline-block;
  min-width: 42px;
  padding: 0.2em 0.5em;
  border-radius: 3px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.cell--strong {
  background: rgba(10, 98, 66, 0.18);
  color: #084f35;
}
.cell--good {
  background: rgba(10, 98, 66, 0.1);
  color: #0a6242;
}
.cell--ok {
  background: rgba(68, 108, 169, 0.1);
  color: #2a4d80;
}
.cell--weak {
  background: rgba(237, 173, 68, 0.2);
  color: #7a5408;
}
.cell--poor {
  background: rgba(169, 68, 66, 0.18);
  color: #7a2c2b;
}
.cell--none {
  color: #bbb;
  background: transparent;
}
/* ──────────────────────────────────────────────────────────────────────
   Custom Report Builder (Commit 7).
   Stepper, type tiles, filter rows, column chips, live-preview panel.
   ────────────────────────────────────────────────────────────────────── */
.builder__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.builder__left,
.builder__right {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}
.builder__hint {
  font-size: 0.78rem;
  color: var(--admin-text-muted, #8a8a8a);
  margin-top: 0.4rem;
}
@media (max-width: 1100px) {
  .builder__grid {
    grid-template-columns: 1fr;
  }
}
.stepper {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.step {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.9rem;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border: 1px solid var(--admin-border, #e2e5ea);
  border-radius: 999px;
  background: var(--admin-surface, #fff);
  color: var(--admin-text-muted, #8a8a8a);
}
.step__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  font-size: 0.7rem;
  border-radius: 50%;
  background: var(--admin-surface-muted, #eef0f4);
  color: var(--admin-text-muted, #8a8a8a);
}
.step--current {
  background: var(--admin-accent, #229DF5);
  color: #fff;
  border-color: var(--admin-accent, #229DF5);
}
.step--current .step__num {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}
.step--done {
  color: var(--status-pass, #0a6242);
  border-color: var(--status-pass, #0a6242);
}
.step--done .step__num {
  background: var(--status-pass, #0a6242);
  color: #fff;
}
.panel {
  background: var(--admin-surface, #fff);
  color: var(--admin-text, inherit);
  border: 1px solid var(--admin-border, #e2e5ea);
  border-radius: var(--admin-radius, 6px);
  padding: 1rem 1.1rem;
}
.panel__title {
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--admin-text-muted, #8a8a8a);
  margin-bottom: 0.75rem;
}
/* Type tiles */
.type-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.5rem;
}
.type-tile {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--admin-border, #e2e5ea);
  border-radius: var(--admin-radius, 6px);
  background: var(--admin-surface, #fff);
  color: var(--admin-text, inherit);
  cursor: pointer;
  transition: border-color 0.1s, background 0.1s;
}
.type-tile:hover {
  border-color: var(--admin-accent, #229DF5);
}
.type-tile--active {
  border-color: var(--admin-accent, #229DF5);
  background: rgba(34, 157, 245, 0.06);
}
.type-tile__icon {
  flex: 0 0 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #eef4fb;
  color: #2063a2;
  border-radius: 50%;
  font-weight: 700;
  font-size: 0.78rem;
}
.type-tile__title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--admin-text-heading, #1a1a2e);
}
.type-tile__desc {
  font-size: 0.78rem;
  color: var(--admin-text-muted, #8a8a8a);
  margin-top: 0.15rem;
}
/* Match-ALL / ANY toggle */
.join-toggle {
  display: inline-flex;
  border: 1px solid var(--admin-border, #e2e5ea);
  border-radius: 999px;
  background: var(--admin-surface, #fff);
  padding: 3px;
  margin-bottom: 0.75rem;
  gap: 2px;
}
.join-toggle button {
  padding: 0.3em 0.9em;
  font-size: 0.78rem;
  border: none;
  background: transparent;
  border-radius: 999px;
  cursor: pointer;
  color: var(--admin-text, #3e3b3f);
  font-family: inherit;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}
.join-toggle button.is-active {
  background: var(--admin-accent, #229DF5);
  color: #fff;
}
.join-toggle button:hover:not(.is-active) {
  background: var(--admin-surface-alt, #f6f7f9);
}
/* Filter rows */
.role-picker {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}
.role-picker__item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.88rem;
  cursor: pointer;
}
.filter-rows {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.filter-rows__empty {
  font-size: 0.82rem;
  color: var(--admin-text-muted, #8a8a8a);
  font-style: italic;
  padding: 0.5rem 0;
}
.filter-row {
  /* Column / operator / value / remove. Single-value rows. Wraps rather
       than overflowing the panel: on a narrow screen the value and the
       remove button drop to a second line. */
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  /* Multi-value rows lay out vertically: head (col + op + summary + ×)
       on top, chip picker below spanning the full width. */
  /* From/To pickers shown when Date range = Custom... — sit on their
       own full-width line under the select row. */
}
.filter-row > [data-filter-col] {
  flex: 1.2 1 140px;
}
.filter-row > [data-filter-op] {
  flex: 1 1 120px;
}
.filter-row > [data-filter-val] {
  flex: 2 1 180px;
}
.filter-row > .filter-row__remove {
  flex: 0 0 auto;
}
.filter-row select,
.filter-row input {
  padding: 0.35rem 0.55rem;
  font-size: 0.85rem;
  border: 1px solid var(--admin-border, #ccc);
  border-radius: 4px;
  background: var(--admin-surface, #fff);
  color: var(--admin-text, inherit);
  font-family: inherit;
  min-width: 0;
}
.filter-row--multi {
  display: block;
  background: var(--admin-surface-alt, #fafbfc);
  border: 1px solid var(--admin-border, #e2e5ea);
  border-radius: 6px;
  padding: 0.5rem 0.6rem;
}
.filter-row__head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.filter-row__head > [data-filter-col] {
  flex: 1.2 1 140px;
}
.filter-row__head > [data-filter-op] {
  flex: 1 1 120px;
}
.filter-row__head > .filter-row__multi-summary {
  flex: 2 1 180px;
}
.filter-row__head > .filter-row__remove {
  flex: 0 0 auto;
}
.filter-row__custom-dates {
  flex: 1 0 100%;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.filter-row__custom-dates input {
  flex: 0 1 200px;
}
.filter-row__custom-dates-sep {
  font-size: 0.8rem;
  color: var(--admin-text-muted, #8a8a8a);
}
.filter-row__multi-summary {
  font-size: 0.85rem;
  color: var(--admin-text-muted, #8a8a8a);
  padding: 0.35rem 0.55rem;
  border: 1px dashed var(--admin-border, #d6d9de);
  border-radius: 4px;
  background: var(--admin-surface, #fff);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.filter-row__multi-summary.is-active {
  color: var(--admin-text, #3e3b3f);
  border-style: solid;
  border-color: var(--admin-accent, #229DF5);
}
.filter-row__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.5rem;
  padding: 0.5rem;
  background: var(--admin-surface, #fff);
  border: 1px solid var(--admin-border, #e2e5ea);
  border-radius: 4px;
  max-height: 180px;
  overflow-y: auto;
}
.filter-row__chips-empty {
  font-size: 0.8rem;
  color: var(--admin-text-muted, #8a8a8a);
  font-style: italic;
}
.filter-row__chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25em 0.7em;
  font-size: 0.78rem;
  border: 1px solid var(--admin-border, #ccc);
  border-radius: 999px;
  background: var(--admin-surface, #fff);
  color: var(--admin-text, inherit);
  cursor: pointer;
  font-family: inherit;
  line-height: 1.4;
}
.filter-row__chip:hover {
  border-color: var(--admin-accent, #229DF5);
  color: var(--admin-accent, #229DF5);
}
.filter-row__chip.is-active {
  background: rgba(34, 157, 245, 0.08);
  border-color: rgba(34, 157, 245, 0.4);
  color: #2063a2;
}
.filter-row__chip.is-active::before {
  content: "\2713 ";
  font-weight: 700;
}
.filter-row__remove {
  width: 32px;
  height: 32px;
  background: var(--admin-surface, #fff);
  border: 1px solid var(--admin-border, #ccc);
  border-radius: 4px;
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.filter-row__remove:hover {
  background: var(--status-fail, #a94442);
  border-color: var(--status-fail, #a94442);
}
.filter-row__remove-icon {
  display: block;
  width: 12px;
  height: 12px;
  background-color: var(--admin-text-muted, #8a8a8a);
  -webkit-mask: url(/Content/images/Icons/icon-times-white.svg) no-repeat center / contain;
  mask: url(/Content/images/Icons/icon-times-white.svg) no-repeat center / contain;
}
.filter-row__remove:hover .filter-row__remove-icon {
  background-color: #fff;
}
.add-filter-link {
  background: transparent;
  border: 0;
  color: var(--admin-accent, #229DF5);
  cursor: pointer;
  font-size: 0.85rem;
  padding: 0.25rem 0;
}
.add-filter-link:hover {
  text-decoration: underline;
}
/* Column chip picker */
.col-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.col-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.3em 0.75em;
  font-size: 0.82rem;
  border: 1px solid var(--admin-border, #e2e5ea);
  border-radius: 999px;
  background: var(--admin-surface, #fff);
  color: var(--admin-text-muted, #8a8a8a);
  cursor: pointer;
  font-family: inherit;
}
.col-chip:hover {
  border-color: var(--admin-accent, #229DF5);
  color: var(--admin-text, #3e3b3f);
}
.col-chip--active {
  background: var(--admin-accent, #229DF5);
  border-color: var(--admin-accent, #229DF5);
  color: #fff;
}
/* Form fields inside Save & Share */
.field {
  margin-bottom: 0.85rem;
}
.field__label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--admin-text-muted, #8a8a8a);
  margin-bottom: 0.3rem;
}
.field__optional {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}
.field__hint {
  font-size: 0.75rem;
  color: var(--admin-text-muted, #8a8a8a);
  margin-top: 0.25rem;
}
.field input[type="text"],
.field textarea,
.field select {
  width: 100%;
  padding: 0.45rem 0.65rem;
  font-size: 0.88rem;
  border: 1px solid var(--admin-border, #ccc);
  border-radius: 4px;
  background: var(--admin-surface, #fff);
  color: var(--admin-text, inherit);
  font-family: inherit;
}
.field textarea {
  resize: vertical;
}
.radio-group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.radio-group label {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.85rem;
  cursor: pointer;
}
.radio-group label.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.radio-group label small {
  display: block;
  color: var(--admin-text-muted, #8a8a8a);
  font-size: 0.75rem;
  margin-top: 0.1rem;
}
/* Live preview pane */
.preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  gap: 0.5rem;
}
.preview-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--admin-text-heading, #1a1a2e);
}
.preview-meta {
  font-size: 0.8rem;
  color: var(--admin-text-muted, #8a8a8a);
}
.preview-actions {
  display: flex;
  gap: 0.4rem;
}
.callout {
  margin-top: 1rem;
  padding: 0.7rem 0.9rem;
  background: #f1f8ff;
  border: 1px solid #cfe2f3;
  border-radius: var(--admin-radius, 6px);
  font-size: 0.8rem;
  color: #2063a2;
}
.callout strong {
  color: var(--admin-text-heading, #1a1a2e);
}
/* Multi-customer share picker — checkbox list with a search box and a
   "Share with all" toggle. Replaces the native <select multiple>, which
   is fiddly to scan and almost impossible on touch. */
.customer-picker {
  border: 1px solid var(--admin-border, #e2e5ea);
  border-radius: var(--admin-radius, 6px);
  background: #fff;
  overflow: hidden;
}
.customer-picker__bar {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  padding: 0.5rem 0.65rem;
  background: #fafbfc;
  border-bottom: 1px solid var(--admin-border, #e2e5ea);
}
.customer-picker__search {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0.35rem 0.55rem;
  font-size: 0.85rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #fff;
}
.customer-picker__all {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  cursor: pointer;
  white-space: nowrap;
  color: var(--admin-text, #3e3b3f);
}
.customer-picker__all input {
  margin: 0;
}
.customer-picker__list {
  max-height: 260px;
  overflow-y: auto;
  padding: 0.25rem 0;
}
.customer-picker__item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.75rem;
  font-size: 0.85rem;
  cursor: pointer;
  user-select: none;
}
.customer-picker__item:hover {
  background: #f6f7f9;
}
.customer-picker__item input {
  margin: 0;
}
.customer-picker__item.is-hidden {
  display: none;
}
.customer-picker__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.4rem 0.75rem;
  background: #fafbfc;
  border-top: 1px solid var(--admin-border, #e2e5ea);
  font-size: 0.78rem;
  color: var(--admin-text-muted, #8a8a8a);
}
.customer-picker__hint {
  font-style: italic;
}
.schedule-editor {
  border: 1px solid var(--admin-border, #e2e5ea);
  border-radius: 6px;
  padding: 0.75rem 1rem;
  background: var(--admin-surface-alt, #fafbfc);
  color: var(--admin-text, inherit);
}
.schedule-editor__toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  cursor: pointer;
  user-select: none;
}
.schedule-editor__body {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--admin-border, #e2e5ea);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.schedule-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
}
.schedule-row[hidden] {
  display: none;
}
.schedule-row .field__label {
  margin: 0;
  min-width: 110px;
}
.schedule-row select,
.schedule-row input[type="text"],
.schedule-row input[type="number"] {
  min-width: 130px;
  padding: 0.35rem 0.55rem;
  font-size: 0.85rem;
  border: 1px solid var(--admin-border, #ccc);
  border-radius: 4px;
  background: var(--admin-surface, #fff);
  color: var(--admin-text, inherit);
  font-family: inherit;
}
.schedule-row__sub {
  font-size: 0.78rem;
  color: var(--admin-text-muted, #8a8a8a);
}
.radio-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
}
.radio-row label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.88rem;
  cursor: pointer;
}
.recipient-picker {
  border: 1px solid var(--admin-border, #e2e5ea);
  border-radius: 6px;
  background: var(--admin-surface, #fff);
  color: var(--admin-text, inherit);
  width: 100%;
  max-width: 480px;
}
.recipient-picker__bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.6rem;
  border-bottom: 1px solid var(--admin-border, #e2e5ea);
}
.recipient-picker__search {
  flex: 1 1 auto;
}
.recipient-picker__count {
  font-size: 0.78rem;
  color: var(--admin-text-muted, #8a8a8a);
}
.recipient-picker__list {
  max-height: 220px;
  overflow-y: auto;
}
.recipient-picker__item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.5rem;
  align-items: center;
  padding: 0.35rem 0.6rem;
  font-size: 0.85rem;
  cursor: pointer;
}
.recipient-picker__item:hover {
  background: var(--admin-surface-alt, #f6f7f9);
}
.recipient-picker__item input {
  margin: 0;
}
.recipient-picker__email {
  font-size: 0.78rem;
  color: var(--admin-text-muted, #8a8a8a);
}
.recipient-picker__empty {
  padding: 0.75rem 1rem;
  font-style: italic;
  color: var(--admin-text-muted, #8a8a8a);
}
.recipient-picker__tag {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0 0.4rem;
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1.4;
  color: #fff;
  background: #2f5fa6;
  border-radius: 3px;
  vertical-align: middle;
}
.schedule-meta {
  font-size: 0.82rem;
  color: var(--admin-text-muted, #8a8a8a);
  gap: 1rem;
}
.schedule-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.25rem;
}
.schedule-status {
  font-size: 0.85rem;
}
.schedule-status--ok {
  color: #2f7a3a;
}
.schedule-status--error {
  color: #b53a30;
}
.report-card__badge--scheduled {
  background: #2f5fa6;
  color: #fff;
}
/* ────────────────────────────────────────────────────────────────
   Dark mode overrides. admin-variables.less maps the --admin-* vars
   under [data-theme="dark"] and [data-theme="auto"] (prefers-color-
   scheme:dark), so most rules above pick up dark colours automatic-
   ally via var(). The repaints below cover the rules that hard-code
   light hex values directly — table strips, popovers, callouts and
   the customer-share picker.
   ──────────────────────────────────────────────────────────────── */
[data-theme="dark"] .callout {
  background: var(--admin-surface-muted);
  border-color: var(--admin-border);
  color: var(--admin-text);
}
[data-theme="dark"] .callout strong {
  color: var(--admin-text-heading);
}
[data-theme="dark"] .filter-group select,
[data-theme="dark"] .filter-group input[type="text"],
[data-theme="dark"] .filter-group input[type="search"],
[data-theme="dark"] .filter-group input[type="date"] {
  background: var(--admin-surface);
  border-color: var(--admin-border);
  color: var(--admin-text);
}
[data-theme="dark"] .data-table-toolbar,
[data-theme="dark"] .data-table-footer {
  background: var(--admin-surface-muted);
  border-color: var(--admin-border);
}
[data-theme="dark"] .data-table th {
  background: var(--admin-surface-muted);
  color: var(--admin-text-muted);
  border-bottom-color: var(--admin-border);
}
[data-theme="dark"] .data-table td {
  border-bottom-color: var(--admin-border);
}
.report-viewer--drillable:not(.report-viewer--in-drill) [data-theme="dark"] .data-table tr:hover td {
  background: var(--admin-surface-alt);
}
[data-theme="dark"] .view-chip {
  background: var(--admin-surface);
}
[data-theme="dark"] .report-export__menu {
  background: var(--admin-surface);
}
[data-theme="dark"] .report-export__menu li a:hover {
  background: var(--admin-surface-alt);
}
[data-theme="dark"] .columns-picker__panel {
  background: var(--admin-surface);
}
[data-theme="dark"] .columns-picker__item:hover {
  background: var(--admin-surface-alt);
}
[data-theme="dark"] .report-modal__panel {
  background: var(--admin-surface);
  color: var(--admin-text);
}
[data-theme="dark"] .report-modal__field input,
[data-theme="dark"] .report-modal__field textarea,
[data-theme="dark"] .report-modal__field select {
  background: var(--admin-surface);
  border-color: var(--admin-border);
  color: var(--admin-text);
}
[data-theme="dark"] .reports-customer-picker__select {
  background: var(--admin-surface);
  border-color: var(--admin-border);
  color: var(--admin-text);
}
[data-theme="dark"] .drill-banner__search input[type="search"] {
  background: var(--admin-surface);
  border-color: var(--admin-border);
  color: var(--admin-text);
}
[data-theme="dark"] .summary-card,
[data-theme="dark"] .kpi,
[data-theme="dark"] .chart-card {
  background: var(--admin-surface);
}
[data-theme="dark"] .scope-toggle {
  background: var(--admin-surface);
}
[data-theme="dark"] .scope-toggle__btn:hover:not(.is-active) {
  background: var(--admin-surface-alt);
}
[data-theme="dark"] .stacked-row:hover {
  background: var(--admin-surface-alt);
}
[data-theme="dark"] .module-progress__bar {
  background: var(--admin-surface-muted);
}
[data-theme="dark"] .seg-todo {
  background: var(--admin-surface-muted);
}
[data-theme="dark"] .donut::after {
  background: var(--admin-surface);
}
[data-theme="dark"] .matrix th,
[data-theme="dark"] .matrix td {
  border-color: var(--admin-border);
}
[data-theme="dark"] .matrix th {
  background: var(--admin-surface-muted);
  color: var(--admin-text-muted);
}
[data-theme="dark"] .matrix__label {
  background: var(--admin-surface-muted);
}
[data-theme="dark"] .customer-picker {
  background: var(--admin-surface);
}
[data-theme="dark"] .customer-picker__bar,
[data-theme="dark"] .customer-picker__footer {
  background: var(--admin-surface-muted);
  border-color: var(--admin-border);
}
[data-theme="dark"] .customer-picker__search {
  background: var(--admin-surface);
  border-color: var(--admin-border);
  color: var(--admin-text);
}
[data-theme="dark"] .customer-picker__item:hover {
  background: var(--admin-surface-alt);
}
[data-theme="dark"] .report-card__badge {
  background: var(--admin-surface-muted);
  color: var(--admin-text-muted);
}
[data-theme="dark"] .report-card__badge--core,
[data-theme="dark"] .report-card__badge--saved {
  background: rgba(77, 179, 255, 0.15);
  color: #7cc4ff;
}
[data-theme="dark"] .report-card__badge--summary {
  background: rgba(240, 180, 41, 0.18);
  color: #f0c674;
}
[data-theme="dark"] .report-card__badge--custom {
  background: rgba(45, 212, 160, 0.15);
  color: #5fd6ad;
}
[data-theme="dark"] .report-card__badge--scheduled {
  background: var(--admin-accent-subtle);
  color: var(--admin-accent);
}
[data-theme="dark"] .report-card__action {
  background: var(--admin-surface-muted);
}
[data-theme="dark"] .report-card__action:hover {
  background: var(--admin-surface-alt);
}
@media (prefers-color-scheme: dark) {
  [data-theme="auto"] .callout {
    background: var(--admin-surface-muted);
    border-color: var(--admin-border);
    color: var(--admin-text);
  }
  [data-theme="auto"] .callout strong {
    color: var(--admin-text-heading);
  }
  [data-theme="auto"] .filter-group select,
  [data-theme="auto"] .filter-group input[type="text"],
  [data-theme="auto"] .filter-group input[type="search"],
  [data-theme="auto"] .filter-group input[type="date"] {
    background: var(--admin-surface);
    border-color: var(--admin-border);
    color: var(--admin-text);
  }
  [data-theme="auto"] .data-table-toolbar,
  [data-theme="auto"] .data-table-footer {
    background: var(--admin-surface-muted);
    border-color: var(--admin-border);
  }
  [data-theme="auto"] .data-table th {
    background: var(--admin-surface-muted);
    color: var(--admin-text-muted);
    border-bottom-color: var(--admin-border);
  }
  [data-theme="auto"] .data-table td {
    border-bottom-color: var(--admin-border);
  }
  .report-viewer--drillable:not(.report-viewer--in-drill) [data-theme="auto"] .data-table tr:hover td {
    background: var(--admin-surface-alt);
  }
  [data-theme="auto"] .view-chip {
    background: var(--admin-surface);
  }
  [data-theme="auto"] .report-export__menu {
    background: var(--admin-surface);
  }
  [data-theme="auto"] .report-export__menu li a:hover {
    background: var(--admin-surface-alt);
  }
  [data-theme="auto"] .columns-picker__panel {
    background: var(--admin-surface);
  }
  [data-theme="auto"] .columns-picker__item:hover {
    background: var(--admin-surface-alt);
  }
  [data-theme="auto"] .report-modal__panel {
    background: var(--admin-surface);
    color: var(--admin-text);
  }
  [data-theme="auto"] .report-modal__field input,
  [data-theme="auto"] .report-modal__field textarea,
  [data-theme="auto"] .report-modal__field select {
    background: var(--admin-surface);
    border-color: var(--admin-border);
    color: var(--admin-text);
  }
  [data-theme="auto"] .reports-customer-picker__select {
    background: var(--admin-surface);
    border-color: var(--admin-border);
    color: var(--admin-text);
  }
  [data-theme="auto"] .drill-banner__search input[type="search"] {
    background: var(--admin-surface);
    border-color: var(--admin-border);
    color: var(--admin-text);
  }
  [data-theme="auto"] .summary-card,
  [data-theme="auto"] .kpi,
  [data-theme="auto"] .chart-card {
    background: var(--admin-surface);
  }
  [data-theme="auto"] .scope-toggle {
    background: var(--admin-surface);
  }
  [data-theme="auto"] .scope-toggle__btn:hover:not(.is-active) {
    background: var(--admin-surface-alt);
  }
  [data-theme="auto"] .stacked-row:hover {
    background: var(--admin-surface-alt);
  }
  [data-theme="auto"] .module-progress__bar {
    background: var(--admin-surface-muted);
  }
  [data-theme="auto"] .seg-todo {
    background: var(--admin-surface-muted);
  }
  [data-theme="auto"] .donut::after {
    background: var(--admin-surface);
  }
  [data-theme="auto"] .matrix th,
  [data-theme="auto"] .matrix td {
    border-color: var(--admin-border);
  }
  [data-theme="auto"] .matrix th {
    background: var(--admin-surface-muted);
    color: var(--admin-text-muted);
  }
  [data-theme="auto"] .matrix__label {
    background: var(--admin-surface-muted);
  }
  [data-theme="auto"] .customer-picker {
    background: var(--admin-surface);
  }
  [data-theme="auto"] .customer-picker__bar,
  [data-theme="auto"] .customer-picker__footer {
    background: var(--admin-surface-muted);
    border-color: var(--admin-border);
  }
  [data-theme="auto"] .customer-picker__search {
    background: var(--admin-surface);
    border-color: var(--admin-border);
    color: var(--admin-text);
  }
  [data-theme="auto"] .customer-picker__item:hover {
    background: var(--admin-surface-alt);
  }
  [data-theme="auto"] .report-card__badge {
    background: var(--admin-surface-muted);
    color: var(--admin-text-muted);
  }
  [data-theme="auto"] .report-card__badge--core,
  [data-theme="auto"] .report-card__badge--saved {
    background: rgba(77, 179, 255, 0.15);
    color: #7cc4ff;
  }
  [data-theme="auto"] .report-card__badge--summary {
    background: rgba(240, 180, 41, 0.18);
    color: #f0c674;
  }
  [data-theme="auto"] .report-card__badge--custom {
    background: rgba(45, 212, 160, 0.15);
    color: #5fd6ad;
  }
  [data-theme="auto"] .report-card__badge--scheduled {
    background: var(--admin-accent-subtle);
    color: var(--admin-accent);
  }
  [data-theme="auto"] .report-card__action {
    background: var(--admin-surface-muted);
  }
  [data-theme="auto"] .report-card__action:hover {
    background: var(--admin-surface-alt);
  }
}
/**
 * Admin Preferences page
 * Reseller / Core preferences + Company Preferences (rebuild).
 *
 * Layout: 240px sticky sub-nav + content column. Each section is one
 * or more .admin-card blocks with .prefs-row form layout (label left,
 * control right). A .prefs-savebar sits at the foot of the content.
 */
.prefs-grid {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 1.25rem;
  align-items: start;
}
@media (max-width: 900px) {
  .prefs-grid {
    grid-template-columns: 1fr;
  }
}
/* ─── Sub-nav ─── */
.prefs-subnav {
  position: sticky;
  top: 1rem;
  background: var(--admin-surface, #fff);
  border: 1px solid var(--admin-border, #e2e5ea);
  border-radius: var(--admin-radius, 6px);
  padding: 0.4rem 0;
  max-height: calc(100vh - 2rem);
  overflow: auto;
}
.prefs-subnav__group {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--admin-text-muted);
  padding: 0.7rem 1rem 0.3rem;
  font-weight: 700;
  margin: 0;
}
.prefs-subnav__group:first-child {
  padding-top: 0.4rem;
}
.prefs-subnav__link {
  display: block;
  padding: 0.5rem 1rem;
  font-size: 0.88rem;
  color: var(--admin-text, #3e3b3f);
  text-decoration: none;
  border-left: 3px solid transparent;
}
.prefs-subnav__link:hover {
  background: var(--admin-sidebar-hover, var(--admin-bg, #f5f6f8));
  text-decoration: none;
}
.prefs-subnav__link.is-active {
  border-left-color: var(--admin-sidebar-active-border, var(--primary1, #3363AF));
  background: rgba(7, 26, 41, 0.08);
  color: var(--text-primary, #161718);
  font-weight: 600;
}
.prefs-subnav__link.is-disabled {
  color: var(--admin-text-muted);
  cursor: not-allowed;
  opacity: 0.55;
}
.prefs-subnav__link.is-disabled:hover {
  background: transparent;
}
.prefs-subnav__link.is-disabled::after {
  content: "soon";
  display: inline-block;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--admin-bg, #f0f1f4);
  color: var(--admin-text-muted);
  padding: 0.05rem 0.4rem;
  border-radius: 3px;
  margin-left: 0.4rem;
  vertical-align: middle;
  font-weight: 600;
}
[data-theme="dark"] .prefs-subnav__link.is-active {
  background: var(--admin-sidebar-active, rgba(77, 179, 255, 0.15));
  color: var(--admin-sidebar-text-active, #ffffff);
}
/* ─── Sections ─── */
.prefs-section {
  display: none;
}
.prefs-section.is-active {
  display: block;
}
.prefs-section__header {
  margin-bottom: 0.85rem;
}
.prefs-section__title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--admin-text-heading, #1a1a2e);
  margin: 0 0 0.2rem;
}
.prefs-section__intro {
  font-size: 0.88rem;
  color: var(--admin-text-muted);
  margin: 0;
  max-width: 720px;
}
/* ─── Form rows (label left / control right) ─── */
.prefs-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 1rem;
  padding: 0.75rem 0;
  align-items: start;
  /* `display: grid` above overrides the user-agent default for [hidden],
	   so honour the attribute explicitly. */
}
@media (max-width: 700px) {
  .prefs-row {
    grid-template-columns: 1fr;
    gap: 0.4rem;
  }
}
.prefs-row[hidden] {
  display: none;
}
.prefs-row + .prefs-row {
  border-top: 1px dashed var(--admin-border, #e2e5ea);
}
.prefs-row .form-label {
  font-size: 0.88rem;
  font-weight: 500;
  padding-top: 0.4rem;
  margin: 0;
}
.prefs-row__control {
  min-width: 0;
}
.prefs-row__control .form-control {
  max-width: 420px;
}
.prefs-row__control .form-hint {
  font-size: 0.78rem;
  color: var(--admin-text-muted);
  margin-top: 0.3rem;
}
.prefs-row__control .admin-rte-editable {
  max-width: 720px;
}
.prefs-row__inline {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  max-width: 420px;
}
@media (max-width: 500px) {
  .prefs-row__inline {
    grid-template-columns: 1fr;
  }
}
.prefs-row__inline .form-hint {
  margin-top: 0.25rem;
}
/* ─── Date range with shared Clear button ─── */
.prefs-daterange {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.prefs-daterange__field {
  flex: 0 1 180px;
  min-width: 0;
}
.prefs-daterange__field .form-control {
  width: 100%;
  max-width: none;
}
.prefs-daterange__field .form-hint {
  font-size: 0.78rem;
  color: var(--admin-text-muted);
  margin-top: 0.3rem;
}
.prefs-daterange__clear {
  align-self: flex-start;
  /* Sit on the same baseline as the date inputs (not their hint text). */
  margin-top: 0;
}
/* Read-only "ghost" field — e.g. the calculated End date. Uses the
   readonly surface var so it adapts in dark mode (was an inline
   light-grey background that stayed white under the dark theme). */
.form-control.is-ghost {
  background: var(--admin-input-readonly-bg, #f5f6f8);
  color: var(--admin-text-muted, #8a8a8a);
  font-style: italic;
}
/* ─── Tag chips (click-to-insert tokens) ─── */
.prefs-tags {
  background: var(--admin-surface-muted, #f7f9fc);
  border: 1px solid var(--admin-border, #e2e5ea);
  border-radius: 4px;
  padding: 0.6rem 0.8rem;
  max-width: 720px;
}
.prefs-tags__title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--admin-text-muted);
  margin-bottom: 0.5rem;
}
.prefs-tags table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}
.prefs-tags td {
  padding: 0.25rem 0.6rem 0.25rem 0;
  vertical-align: top;
}
/* What a blank email body sends: the mailer's default, shown read-only
   under the editor so an admin can see what "leave blank" means. */
.prefs-default-body {
  max-width: 720px;
  margin-top: 0.4rem;
  padding: 0.5rem 0.8rem;
  font-size: 0.82rem;
  color: var(--admin-text-muted, #8a8a8a);
  background: var(--admin-surface-muted, #f7f9fc);
  border: 1px dashed var(--admin-border, #e2e5ea);
  border-radius: 4px;
}
.prefs-default-body p {
  margin: 0 0 0.4rem;
}
.prefs-default-body p:last-child {
  margin-bottom: 0;
}
.prefs-tag {
  font-family: 'SFMono-Regular', Menlo, Consolas, monospace;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--primary1, #3363AF);
  background: var(--admin-surface, #fff);
  border: 1px solid var(--admin-border, #cfd8e3);
  border-radius: 3px;
  padding: 0.15rem 0.5rem;
  cursor: pointer;
  white-space: nowrap;
}
.prefs-tag:hover {
  background: var(--primary1, #3363AF);
  color: #fff;
  border-color: var(--primary1, #3363AF);
}
.prefs-tag:focus {
  outline: 2px solid var(--admin-accent, #229DF5);
  outline-offset: 1px;
}
/* The chip's brand-blue label is unreadable on the dark chip surface;
   lift it to the lighter accent so it stays legible in dark mode. */
[data-theme="dark"] .prefs-tag {
  color: var(--admin-accent, #4db3ff);
}
@media (prefers-color-scheme: dark) {
  [data-theme="auto"] .prefs-tag {
    color: var(--admin-accent, #4db3ff);
  }
}
/* ─── Page Builder callout (Welcome / Agreement / Declaration) ─── */
.prefs-pb-callout {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--admin-surface-alt, #fafbfc);
  border: 1px dashed var(--admin-border, #e2e5ea);
  border-radius: var(--admin-radius, 6px);
  margin-bottom: 1rem;
}
.prefs-pb-callout__icon {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: rgba(51, 99, 175, 0.1);
  color: var(--primary1, #3363AF);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.05rem;
  flex-shrink: 0;
}
.prefs-pb-callout__body {
  flex: 1;
  min-width: 0;
}
.prefs-pb-callout__body strong {
  color: var(--admin-text-heading, #1a1a2e);
  display: block;
  margin-bottom: 0.15rem;
}
.prefs-pb-callout__body small {
  font-size: 0.8rem;
  color: var(--admin-text-muted);
}
/* Dynamic-token strip below the PB topbar (Agreement / Declaration only).
   flex-shrink:0 keeps the strip from collapsing the pb-layout column when
   the page-builder-active flex chain distributes height. */
.pb-tokens {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  flex-shrink: 0;
  padding: 0.5rem 1rem;
  background: var(--admin-bg, #f5f6f8);
  border-bottom: 1px solid var(--admin-border, #e2e5ea);
  font-family: var(--admin-font-family);
  font-size: 0.82rem;
  color: var(--admin-text, #3e3b3f);
}
.pb-tokens__label {
  font-weight: 600;
  color: var(--admin-text-muted);
}
.pb-tokens__chip {
  font-family: 'SFMono-Regular', Menlo, Consolas, monospace;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--primary1, #3363AF);
  background: var(--admin-surface, #fff);
  border: 1px solid var(--admin-border, #cfd8e3);
  border-radius: 3px;
  padding: 0.2rem 0.55rem;
  cursor: pointer;
  white-space: nowrap;
}
.pb-tokens__chip:hover {
  background: var(--primary1, #3363AF);
  color: #fff;
  border-color: var(--primary1, #3363AF);
}
.pb-tokens__chip:focus {
  outline: 2px solid var(--admin-accent, #229DF5);
  outline-offset: 1px;
}
.pb-tokens__hint {
  color: var(--admin-text-muted);
  font-style: italic;
  margin-left: auto;
}
/* Canvas preview for system-* shortcodes (system-next / system-agree /
   system-disagree). Shown disabled in the builder; the live page
   replaces them with real buttons via ShortcodesV2.cs. */
.pb-system-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 1rem;
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: 4px;
  border: 1px solid var(--admin-border, #cfd8e3);
  background: #fff;
  color: var(--admin-text, #3e3b3f);
  cursor: not-allowed;
  font-family: var(--admin-font-family);
}
.pb-system-btn--next,
.pb-system-btn--agree {
  background: #28a745;
  border-color: #1f8b39;
  color: #fff;
}
.pb-system-btn--disagree {
  background: #dc3545;
  border-color: #b92a3a;
  color: #fff;
}
/* Legacy decorative system-appends strip (pre-system-buttons release).
   Kept so that any view referencing it still styles cleanly. */
.pb-canvas__appended-strip {
  position: relative;
  margin: 1rem 0 0;
  padding: 0.85rem 1.25rem;
  background: rgba(255, 248, 230, 0.95);
  border-top: 1px dashed #ead9a8;
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.82rem;
  color: #6b5a16;
  pointer-events: none;
}
.pb-canvas__appended-note {
  flex: 1;
  font-style: italic;
}
.pb-canvas__appended-buttons {
  display: flex;
  gap: 0.5rem;
}
.pb-fake-btn {
  display: inline-block;
  padding: 0.4rem 0.9rem;
  border-radius: 3px;
  background: #fff;
  border: 1px solid #cfd3da;
  color: #3e3b3f;
  font-size: 0.82rem;
  font-weight: 500;
}
.pb-fake-btn--primary {
  background: var(--primary1, #3363AF);
  color: #fff;
  border-color: #2a5494;
}
/* ─── Group save bar ─── */
.prefs-savebar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1rem;
  background: var(--admin-surface, #fff);
  border: 1px solid var(--admin-border, #e2e5ea);
  border-radius: var(--admin-radius, 6px);
  margin-top: 2rem;
  position: sticky;
  bottom: 1rem;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.04);
  /* `display: flex` above overrides the user-agent default for [hidden],
	   so we need an explicit override to honour the attribute. */
}
.prefs-savebar[hidden] {
  display: none;
}
.prefs-savebar__hint {
  font-size: 0.8rem;
  color: var(--admin-text-muted);
  margin-right: auto;
}
.prefs-savebar .btn {
  margin: 0;
}
/* ─── Reset training results — multi-select picker ───
   Used on /Company/ResetTrainingResults for divisions, departments,
   locations, students, and modules. Inline (not popup-based) so the
   admin sees their selections in context with the rest of the form. */
.reset-picker {
  border: 1px solid var(--admin-border, #e2e5ea);
  border-radius: var(--admin-radius, 6px);
  background: var(--admin-surface, #fff);
  overflow: hidden;
}
.reset-picker__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--admin-border-light, #eef0f3);
  background: var(--admin-surface-alt, #fafbfc);
  min-height: 0;
}
.reset-picker__chips:empty {
  display: none;
}
.reset-picker__chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.5rem;
  font-size: 0.85rem;
  background: var(--admin-accent-soft, #e8f0fe);
  color: var(--admin-text-heading, #1a1a2e);
  border-radius: var(--admin-radius-sm, 4px);
}
.reset-picker__chip-remove {
  background: none;
  border: none;
  font-size: 1rem;
  line-height: 1;
  color: var(--admin-text-muted, #6b6f76);
  cursor: pointer;
  padding: 0 0.1rem;
}
.reset-picker__chip-remove:hover {
  color: var(--admin-status-danger, #c93838);
}
.reset-picker__search {
  display: block;
  width: 100%;
  border: none !important;
  border-bottom: 1px solid var(--admin-border-light, #eef0f3) !important;
  border-radius: 0 !important;
  padding: 0.55rem 0.75rem;
  background: var(--admin-surface, #fff);
  font-size: 0.9rem;
  outline: none;
}
.reset-picker__search:focus {
  background: var(--admin-surface, #fff);
  box-shadow: none !important;
}
.reset-picker__list {
  max-height: 220px;
  overflow-y: auto;
}
.reset-picker__option {
  padding: 0.45rem 0.75rem;
  font-size: 0.88rem;
  cursor: pointer;
  border-bottom: 1px solid var(--admin-border-light, #f4f5f7);
}
.reset-picker__option:last-child {
  border-bottom: none;
}
.reset-picker__option:hover {
  background: var(--admin-surface-alt, #fafbfc);
}
.reset-picker__option.is-selected {
  color: var(--admin-text-muted, #b0b3b8);
  cursor: default;
}
.reset-picker__option.is-selected:hover {
  background: transparent;
}
.reset-picker__empty {
  padding: 0.75rem;
  font-size: 0.85rem;
  color: var(--admin-text-muted, #6b6f76);
  text-align: center;
}
/* ─── Certificate Designer (/Company/CertificateDesigner) ─── */
.cert-editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 460px);
  gap: 1.25rem;
  align-items: start;
  /* Single-column fallback only on truly narrow viewports — the admin
	   content area itself caps at 1200px, so don't trigger this above
	   that or admins on normal desktop windows lose the side-by-side
	   layout. */
  /* Labels above their fields. The controls column shares the width with
	   the live preview, so the Preferences pages' 200px label column left
	   the fields too narrow to use. */
  /* Tags: the description drops under its tag when there isn't room
	   beside it, instead of the table running out of its box. */
}
@media (max-width: 900px) {
  .cert-editor {
    grid-template-columns: 1fr;
  }
}
.cert-editor__controls > .admin-card + .admin-card {
  margin-top: 1rem;
}
.cert-editor .prefs-row {
  grid-template-columns: 1fr;
  gap: 0.4rem;
}
.cert-editor .prefs-row .form-label {
  padding-top: 0;
}
.cert-editor .prefs-tags tr {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 0.6rem;
  row-gap: 0.15rem;
  padding: 0.3rem 0;
}
.cert-editor .prefs-tags td {
  padding: 0;
}
.cert-editor__range {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: nowrap;
  /* `.form-control` resolves to width:100%; specificity bump to
		   pin the number input to a fixed cell beside the slider. */
}
.cert-editor__range > input[type="range"] {
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
}
.cert-editor__range > .form-control[type="number"] {
  flex: 0 0 90px;
  width: 90px;
}
.cert-editor__drop {
  border: 1px dashed var(--admin-border, #c7cbd1);
  border-radius: var(--admin-radius, 6px);
  padding: 1.25rem;
  background: var(--admin-surface-alt, #fafbfc);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}
.cert-editor__drop.is-dragover {
  border-color: var(--admin-accent, #229df5);
  background: rgba(34, 157, 245, 0.06);
}
.cert-editor__drop-text {
  font-weight: 500;
  color: var(--admin-text-heading, #1a1a2e);
}
.cert-editor__drop-or {
  font-size: 0.85rem;
  color: var(--admin-text-muted, #6b6f76);
}
.cert-editor__current {
  font-size: 0.85rem;
  color: var(--admin-status-success, #2c8a4a);
}
.cert-editor__preview-wrap {
  position: sticky;
  top: 1rem;
  /* Cap the preview column even when the layout collapses to one
		   column — otherwise the certificate aspect ratio takes over the
		   full content width and the page becomes a wall of background. */
  max-width: 460px;
  width: 100%;
}
@media (max-width: 900px) {
  .cert-editor__preview-wrap {
    margin: 1rem 0 0;
    position: static;
  }
}
.cert-editor__preview-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--admin-text-muted, #6b6f76);
  margin-bottom: 0.4rem;
}
.cert-editor__preview-actions {
  margin-top: 0.6rem;
  display: flex;
  justify-content: flex-end;
}
.cert-preview {
  position: relative;
  background: #fff;
  border: 1px solid var(--admin-border, #e2e5ea);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  width: 100%;
  /* Default = portrait A4 (210 x 297 mm). Aspect ratio drives height. */
  aspect-ratio: 210 / 297;
  /* The certificate is always rendered on a white page (and the PDF is
	   always light), so the preview text is deliberately NOT themed — fixed
	   light-mode colours here, with JS overriding them per company branding
	   for the WYSIWYG match. Admin theme vars would wash the text out under
	   dark mode against the always-white certificate. */
}
.cert-preview--portrait {
  aspect-ratio: 210 / 297;
}
.cert-preview--landscape {
  aspect-ratio: 297 / 210;
}
.cert-preview--portrait-letter {
  aspect-ratio: 8.5 / 11;
}
.cert-preview--landscape-letter {
  aspect-ratio: 11 / 8.5;
}
.cert-preview__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.cert-preview__text {
  position: relative;
  text-align: center;
  z-index: 1;
}
.cert-preview__title {
  font-size: 1.4rem;
  font-weight: 600;
  color: #1a1a2e;
  margin-bottom: 0.5rem;
}
.cert-preview__message {
  /* font-size is set inline by JS to the PDF's 16pt body, scaled to
		   the preview frame; this is the pre-JS fallback. Headings below use
		   em ratios off that base to mirror the PDF's pt heading sizes
		   (h1 26 / h2 22 / h3 19 / h4 17 / h5 15 against 16pt body). */
  font-size: 0.85rem;
  color: #2a2d33;
  line-height: 1.45;
}
.cert-preview__message p {
  margin: 0 0 0.5em;
}
.cert-preview__message em {
  font-style: italic;
}
.cert-preview__message strong {
  font-weight: 600;
}
.cert-preview__message h1,
.cert-preview__message h2,
.cert-preview__message h3,
.cert-preview__message h4,
.cert-preview__message h5,
.cert-preview__message h6 {
  font-weight: bold;
  color: var(--cert-heading-colour, #333);
  margin: 0.5em 0 0;
}
.cert-preview__message h1 {
  font-size: 1.625em;
}
.cert-preview__message h2 {
  font-size: 1.375em;
}
.cert-preview__message h3 {
  font-size: 1.1875em;
}
.cert-preview__message h4 {
  font-size: 1.0625em;
}
.cert-preview__message h5 {
  font-size: 0.9375em;
}
.cert-preview__message h6 {
  font-size: 1em;
  font-weight: normal;
}
/* ── Certificate body editor + preview: exempt from dark theme ──
   The body text editor (#certMessageEditor) authors content that always
   appears on a white certificate, so it stays light regardless of the admin
   theme. Scoped to the designer so other admin RTE fields keep their theme. */
[data-theme="dark"] .cert-editor .admin-rte-editable {
  background: #fff;
  color: #2a2d33;
  border-color: #d6dae0;
}
[data-theme="dark"] .cert-editor .admin-rte-editable:empty::before {
  color: #9aa0a8;
}
@media (prefers-color-scheme: dark) {
  [data-theme="auto"] .cert-editor .admin-rte-editable {
    background: #fff;
    color: #2a2d33;
    border-color: #d6dae0;
  }
  [data-theme="auto"] .cert-editor .admin-rte-editable:empty::before {
    color: #9aa0a8;
  }
}
/**
 * Admin Tickets — Phase 3.5 Commit 2
 *
 * Single-page list + slide-in drawer detail. Status / priority / SLA
 * pills, comments thread, history timeline, watchers, on-behalf-of
 * picker. Companion JS at Content/js/admin-tickets.js. Visual brief
 * at Docs/mockups/mockup-support-tickets.html.
 */
.app .status-pill__lock {
  display: inline-block;
  width: 0.85em;
  height: 0.85em;
  background-color: currentColor;
  -webkit-mask: url("/Content/images/Icons/icon-lock-white.svg") no-repeat center / contain;
  mask: url("/Content/images/Icons/icon-lock-white.svg") no-repeat center / contain;
  vertical-align: -0.05em;
}
.app .status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2em 0.6em;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.4;
  border-radius: 3px;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.app .status-pill__lock {
  font-size: 1.5em;
}
.app .status-pill--open {
  background: color-mix(in srgb, var(--tenant-information) 14%, transparent);
  color: var(--tenant-information-d12);
}
.app .status-pill--progress {
  background: color-mix(in srgb, var(--tenant-warning) 18%, transparent);
  color: var(--tenant-warning-d25);
}
.app .status-pill--resolved {
  background: color-mix(in srgb, var(--tenant-success) 14%, transparent);
  color: var(--tenant-success-d12);
}
.app .status-pill--closed {
  background: #e8eaed;
  color: #5f6368;
}
.app .priority {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}
.app .priority::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}
.app .priority--critical {
  color: var(--tenant-danger);
}
.app .priority--high {
  color: var(--tenant-warning-d12);
}
.app .priority--medium {
  color: var(--tenant-information);
}
.app .priority--low {
  color: #5f6368;
}
.app .vis-pill {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.1em 0.4em;
  border-radius: 2px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.app .vis-pill--internal {
  background: #fbe6a3;
  color: #6e5005;
}
.app .vis-pill--external {
  background: color-mix(in srgb, var(--tenant-success) 14%, transparent);
  color: var(--tenant-success-d12);
}
.app .role-pill {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.1em 0.4em;
  border-radius: 2px;
  background: var(--admin-border-light, #eef0f2);
  color: var(--admin-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.app .ticket-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.15em 0.55em;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--admin-text);
  background: var(--admin-surface-alt, #fafbfc);
  border: 1px solid var(--admin-border-strong, #cdd2d8);
  border-radius: 999px;
  letter-spacing: 0.01em;
}
.app .chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 1rem;
}
.app .chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: var(--admin-surface);
  border: 1px solid var(--admin-border-strong, #cdd2d8);
  color: var(--admin-text);
  font-size: 0.78rem;
  font-family: inherit;
  cursor: pointer;
  user-select: none;
  transition: border-color 0.12s, background 0.12s, color 0.12s;
}
.app .chip:hover {
  border-color: var(--admin-accent);
}
.app .chip.is-active {
  background: var(--admin-accent, var(--primary3));
  color: #fff;
  border-color: var(--admin-accent, var(--primary3));
}
.app .metrics-card {
  background: var(--admin-surface);
  border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius);
  margin-bottom: 1rem;
  overflow: hidden;
}
.app .metrics-card__header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 1rem;
  cursor: pointer;
  background: var(--admin-surface-alt, #fafbfc);
  border-bottom: 1px solid var(--admin-border);
}
.app .metrics-card__title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--admin-text-muted);
}
.app .metrics-card__sub {
  font-size: 0.72rem;
  color: var(--admin-text-muted);
  margin-left: auto;
}
.app .metrics-card__chevron {
  color: var(--admin-text-muted);
  transition: transform 0.15s;
}
.app .metrics-card.is-collapsed .app .metrics-card__chevron {
  transform: rotate(-90deg);
}
.app .metrics-card.is-collapsed .app .metrics-card__body {
  display: none;
}
.app .metrics-card__body {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  background: var(--admin-border);
}
@media (max-width: 1100px) {
  .app .metrics-card__body {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 700px) {
  .app .metrics-card__body {
    grid-template-columns: repeat(2, 1fr);
  }
}
.app .metrics-card .metric {
  background: var(--admin-surface);
  padding: 0.85rem 1rem;
  cursor: pointer;
  transition: background 0.12s;
}
.app .metrics-card .metric:hover {
  background: var(--admin-surface-alt, #fafbfc);
}
.app .metrics-card .metric__label {
  font-size: 0.72rem;
  color: var(--admin-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.app .metrics-card .metric__value {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--admin-text-heading);
  margin-top: 0.2rem;
  line-height: 1.1;
}
.app .metrics-card .metric__sub {
  font-size: 0.72rem;
  color: var(--admin-text-muted);
  margin-top: 0.15rem;
}
.app .metrics-card .metric--critical .app .metrics-card .metric__value {
  color: var(--tenant-danger);
}
.app .tickets-list {
  margin-top: 0;
}
.app .tickets-table tr[data-ticket-id] {
  cursor: pointer;
}
.app .tickets-table .ticket-id {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--admin-text-muted);
  font-size: 0.78rem;
}
.app .tickets-table .ticket-subject {
  font-weight: 500;
  color: var(--admin-text-heading);
}
.app .tickets-table .ticket-meta {
  font-size: 0.72rem;
  color: var(--admin-text-muted);
  margin-top: 0.15rem;
}
.app .tickets-table .ticket-replies {
  font-size: 0.78rem;
  color: var(--admin-text-muted);
}
.app .tickets-list__empty {
  padding: 1.5rem !important;
  text-align: center;
  color: var(--admin-text-muted);
  font-style: italic;
}
.app .assignee-cell {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.app .assignee-cell--unassigned span:not(.assignee-avatar) {
  color: var(--admin-text-muted);
  font-style: italic;
}
.app .assignee-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--admin-accent, var(--primary3));
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  flex-shrink: 0;
}
.app .assignee-avatar--unassigned {
  background: var(--admin-border-strong, #cdd2d8);
  color: var(--admin-text-muted);
}
.app .drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 23, 30, 0.35);
  display: none;
  z-index: 1040;
}
.app .drawer-overlay.is-open {
  display: block;
}
.app .ticket-drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: 720px;
  max-width: 100vw;
  background: var(--admin-surface);
  border-left: 1px solid var(--admin-border);
  box-shadow: -8px 0 24px rgba(0, 0, 0, 0.12);
  display: none;
  flex-direction: column;
  z-index: 1045;
  transform: translateX(100%);
  transition: transform 0.18s ease-out;
}
.app .ticket-drawer.is-open {
  display: flex;
  transform: translateX(0);
}
.app .ticket-drawer__content {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}
.app .ticket-drawer__loading,
.app .ticket-drawer__error {
  padding: 1.5rem;
  text-align: center;
  color: var(--admin-text-muted);
}
.app .ticket-drawer__error {
  color: var(--tenant-danger);
}
.app .ticket-drawer__header {
  padding: 1rem 1.25rem 0.9rem;
  border-bottom: 1px solid var(--admin-border);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  flex-shrink: 0;
}
.app .ticket-drawer__top {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.app .ticket-drawer__top .ticket-id {
  font-size: 0.85rem;
}
.app .ticket-drawer__close {
  margin-left: auto;
  font-size: 1.2rem;
  line-height: 1;
  padding: 0.3em 0.55em;
}
.app .ticket-drawer__title {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--admin-text-heading);
  line-height: 1.3;
  margin: 0;
}
.app .ticket-drawer__meta {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  align-items: center;
  font-size: 0.78rem;
  color: var(--admin-text-muted);
}
.app .ticket-drawer__meta-divider {
  opacity: 0.4;
}
.app .ticket-drawer__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.1rem;
}
.app .ticket-drawer__originator,
.app .ticket-drawer__assignee {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--admin-text);
}
.app .ticket-drawer__originator strong,
.app .ticket-drawer__assignee strong {
  color: var(--admin-text-heading);
  font-weight: 600;
}
.app .ticket-drawer__originator .assignee-avatar,
.app .ticket-drawer__assignee .assignee-avatar {
  width: 22px;
  height: 22px;
  font-size: 0.62rem;
}
.app .ticket-drawer__originator--unassigned,
.app .ticket-drawer__assignee--unassigned {
  color: var(--admin-text-muted);
  font-style: italic;
}
.app .ticket-drawer__props {
  padding: 0.85rem 1.25rem;
  background: var(--admin-surface-alt, #fafbfc);
  border-bottom: 1px solid var(--admin-border);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.55rem 1.25rem;
  font-size: 0.82rem;
  flex-shrink: 0;
}
.app .ticket-drawer__props .prop {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.app .ticket-drawer__props .prop__label {
  color: var(--admin-text-muted);
  min-width: 5.5rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.app .ticket-drawer__props .prop__select,
.app .ticket-drawer__props .prop__picker {
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--admin-border-strong, #cdd2d8);
  border-radius: 3px;
  background: var(--admin-surface);
  font-family: inherit;
  font-size: 0.82rem;
  cursor: pointer;
}
@media (max-width: 760px) {
  .app .ticket-drawer__props {
    grid-template-columns: 1fr;
  }
}
.app .ticket-drawer__tabs {
  display: flex;
  border-bottom: 1px solid var(--admin-border);
  background: var(--admin-surface);
  flex-shrink: 0;
}
.app .ticket-drawer__tab {
  padding: 0.7rem 1rem;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  color: var(--admin-text-muted);
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  font-family: inherit;
}
.app .ticket-drawer__tab.is-active {
  color: var(--admin-text-heading);
  border-bottom-color: var(--admin-accent, var(--primary3));
}
.app .ticket-drawer__tab .tab-count {
  display: inline-block;
  margin-left: 0.3rem;
  padding: 0 0.4em;
  background: var(--admin-border-light, #eef0f2);
  border-radius: 999px;
  font-size: 0.7rem;
  color: var(--admin-text-muted);
}
.app .ticket-drawer__body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 1rem 1.25rem;
  min-height: 0;
}
@media (max-width: 760px) {
  .app .ticket-drawer {
    width: 100vw;
  }
}
.app .ticket-comment {
  border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius);
  padding: 0.8rem 1rem;
  margin-bottom: 0.75rem;
  background: var(--admin-surface);
}
.app .ticket-comment--internal {
  background: #fffbe7;
  border-color: #f3e08c;
}
.app .ticket-comment__header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
  font-size: 0.78rem;
  color: var(--admin-text-muted);
  flex-wrap: wrap;
}
.app .ticket-comment__author {
  color: var(--admin-text-heading);
  font-weight: 600;
  font-size: 0.85rem;
}
.app .ticket-comment__when {
  margin-left: auto;
}
.app .ticket-comment__edit {
  font-size: 0.75rem;
  padding: 0.25em 0.6em;
  border: 1px solid var(--admin-border-strong, #cdd2d8);
  background: var(--admin-surface);
  color: var(--admin-text);
  border-radius: 3px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.app .ticket-comment__edit:hover {
  border-color: var(--admin-accent, var(--primary3));
  color: var(--admin-accent, var(--primary3));
}
.app .ticket-comment__edit-icon {
  font-size: 0.85em;
}
.app .ticket-comment__edit-mins {
  color: var(--admin-text-muted);
  font-size: 0.7rem;
}
.app .ticket-comment__internal-note {
  margin: 0 0 0.5rem;
  padding: 0.35rem 0.6rem;
  background: rgba(110, 80, 5, 0.08);
  border-left: 3px solid #b9881a;
  border-radius: 0 3px 3px 0;
  font-size: 0.72rem;
  color: #6e5005;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}
.app .ticket-comment__body {
  font-size: 0.88rem;
  color: var(--admin-text);
  line-height: 1.55;
}
.app .ticket-comment__body textarea {
  width: 100%;
  font-family: inherit;
  font-size: 0.88rem;
  padding: 0.5rem;
  border: 1px solid var(--admin-border-strong);
  border-radius: 3px;
}
.app .ticket-comment__attach {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.5rem;
  padding: 0.3rem 0.55rem;
  background: var(--admin-surface-alt, #fafbfc);
  border: 1px solid var(--admin-border);
  border-radius: 3px;
  font-size: 0.78rem;
  color: var(--admin-text);
  text-decoration: none;
}
.app .ticket-comment__attach:hover {
  border-color: var(--admin-accent);
}
.app .ticket-comments__empty,
.app .ticket-history__empty,
.app .ticket-watchers__empty {
  padding: 1rem;
  text-align: center;
  color: var(--admin-text-muted);
  font-style: italic;
}
.app .timeline {
  position: relative;
  padding-left: 1.4rem;
}
.app .timeline::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 4px;
  bottom: 4px;
  width: 2px;
  background: var(--admin-border);
}
.app .timeline__item {
  position: relative;
  margin-bottom: 0.85rem;
  font-size: 0.82rem;
}
.app .timeline__item::before {
  content: "";
  position: absolute;
  left: -1.4rem;
  top: 0.35rem;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--admin-surface);
  border: 2px solid var(--admin-border-strong, #cdd2d8);
}
.app .timeline__when {
  color: var(--admin-text-muted);
  font-size: 0.72rem;
}
.app .timeline__what {
  color: var(--admin-text);
  margin-top: 0.1rem;
}
.app .ticket-watchers__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.app .ticket-watchers__row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--admin-border);
  border-radius: 3px;
  background: var(--admin-surface);
}
.app .ticket-watchers__row > span:nth-child(2) {
  flex: 1;
  font-size: 0.85rem;
}
.app .ticket-watchers__add {
  margin-top: 0.6rem;
}
.app .ticket-composer {
  position: sticky;
  bottom: 0;
  background: var(--admin-surface);
  border-top: 1px solid var(--admin-border);
  padding: 0.85rem 1rem;
  flex-shrink: 0;
}
.app .ticket-composer__editor {
  width: 100%;
  min-height: 80px;
  padding: 0.5rem 0.7rem;
  border: 1px solid var(--admin-border-strong, #cdd2d8);
  border-radius: 4px;
  font-size: 0.88rem;
  font-family: inherit;
  background: var(--admin-surface);
  resize: vertical;
}
.app .ticket-composer__row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.6rem;
  flex-wrap: wrap;
  font-size: 0.8rem;
}
.app .ticket-composer__file {
  font-size: 0.78rem;
}
.app .ticket-composer__internal {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--admin-text-muted);
}
.app .ticket-composer__then {
  font-size: 0.78rem;
  padding: 0.25rem 0.5rem;
}
.app .ticket-composer__spacer {
  flex: 1;
}
.app .ticket-user-picker {
  position: fixed;
  inset: 0;
  background: rgba(20, 23, 30, 0.45);
  z-index: 1080;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 8vh;
}
.app .ticket-user-picker__panel {
  width: 480px;
  max-width: calc(100vw - 2rem);
  background: var(--admin-surface);
  border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
  display: flex;
  flex-direction: column;
  max-height: 70vh;
  overflow: hidden;
}
.app .ticket-user-picker__header {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--admin-border);
  background: var(--admin-surface-alt, #fafbfc);
}
.app .ticket-user-picker__header h3 {
  margin: 0;
  font-size: 1rem;
  flex: 1;
}
.app .ticket-user-picker__search {
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--admin-border);
}
.app .ticket-user-picker__search input {
  width: 100%;
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--admin-border-strong, #cdd2d8);
  border-radius: 4px;
  font-size: 0.85rem;
  font-family: inherit;
}
.app .ticket-user-picker__results {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem;
  font-size: 0.85rem;
  color: var(--admin-text-muted);
}
.app .ticket-user-picker__loading,
.app .ticket-user-picker__empty {
  padding: 0.85rem;
  text-align: center;
}
.app .ticket-user-picker__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.app .ticket-user-picker__list button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.7rem;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 3px;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
}
.app .ticket-user-picker__list button:hover {
  border-color: var(--admin-accent, var(--primary3));
  background: var(--admin-surface-alt, #fafbfc);
}
.app .ticket-user-picker__name {
  font-weight: 500;
  color: var(--admin-text-heading);
}
.app .ticket-user-picker__sub {
  font-size: 0.75rem;
  color: var(--admin-text-muted);
  margin-left: auto;
}
.app .ticket-user-picker__footer {
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--admin-border);
  background: var(--admin-surface-alt, #fafbfc);
  text-align: right;
}
.app .ticket-drawer__body .form-row {
  display: block;
  grid-template-columns: none;
  margin: 0 0 0.85rem;
}
.app .ticket-drawer__body .form-row label.label-block {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--admin-text-muted);
  margin-bottom: 0.3rem;
}
.app .ticket-drawer__body .form-row .grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
@media (max-width: 760px) {
  .app .ticket-drawer__body .form-row .grid-2 {
    grid-template-columns: 1fr;
  }
}
.app .ticket-drawer__body .form-row textarea,
.app .ticket-drawer__body .form-row textarea.form-control {
  width: 100%;
  box-sizing: border-box;
  min-height: 100px;
  resize: vertical;
}
.app .ticket-drawer__body .form-control {
  background: var(--admin-surface);
  color: var(--admin-text) !important;
  border-color: var(--admin-border);
}
.app .ticket-drawer__body [data-section="watchers"] [data-role="watchers-list"],
.app .ticket-drawer__body .ticket-watchers__list {
  margin-bottom: 0.5rem;
}
.app .on-behalf-of-banner {
  margin: 0.4rem 0 0;
  padding: 0.55rem 0.75rem;
  border-left: 3px solid var(--admin-accent, var(--primary3));
  background: rgba(34, 157, 245, 0.08);
  border-radius: 0 4px 4px 0;
  font-size: 0.82rem;
  color: var(--admin-text);
}
.app .on-behalf-of-banner strong {
  color: var(--admin-text-heading);
  font-weight: 600;
}
.tickets-toast-stack {
  position: fixed;
  top: 1rem;
  right: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 2000;
  pointer-events: none;
}
.tickets-toast {
  pointer-events: auto;
  min-width: 220px;
  max-width: 360px;
  padding: 0.65rem 0.9rem;
  border-radius: 4px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  line-height: 1.4;
  color: #fff;
  background: #3e4248;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.18s ease-out, transform 0.18s ease-out;
}
.tickets-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.tickets-toast--success {
  background: #146c2e;
}
.tickets-toast--error {
  background: #b3261e;
}
.tickets-toast--warn {
  background: #b25b00;
}
.app .prop.prop--flash {
  animation: tickets-prop-flash 1.6s ease-out;
}
@keyframes tickets-prop-flash {
  0% {
    box-shadow: 0 0 0 3px rgba(46, 160, 67, 0.45);
    border-radius: 3px;
  }
  60% {
    box-shadow: 0 0 0 3px rgba(46, 160, 67, 0.2);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(46, 160, 67, 0);
  }
}
.app .ticket-drawer__props .prop__input {
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--admin-border-strong, #cdd2d8);
  border-radius: 3px;
  background: var(--admin-surface);
  font-family: inherit;
  font-size: 0.82rem;
  color: var(--admin-text);
  min-width: 0;
  flex: 1;
}
.app .ticket-drawer__props .prop--full {
  grid-column: 1 / -1;
}
.app .ticket-linked__heading {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--admin-text-muted);
  margin: 0.6rem 0 0.4rem;
}
.app .ticket-linked__row,
.app .ticket-linked__list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--admin-border);
  border-radius: 3px;
  margin-bottom: 0.4rem;
  background: var(--admin-surface);
  font-size: 0.85rem;
}
.app .ticket-linked__row a,
.app .ticket-linked__list li a {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
  color: var(--admin-accent, var(--primary3));
  text-decoration: none;
}
.app .ticket-linked__row a:hover,
.app .ticket-linked__list li a:hover {
  text-decoration: underline;
}
.app .ticket-linked__row > span:nth-of-type(1),
.app .ticket-linked__list li > span:nth-of-type(1) {
  flex: 1;
}
.app .ticket-linked__row button,
.app .ticket-linked__list li button {
  margin-left: auto;
}
.app .ticket-linked__list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.app .ticket-linked__empty {
  padding: 0.6rem 0.8rem;
  background: var(--admin-surface-alt, #fafbfc);
  border: 1px dashed var(--admin-border);
  border-radius: 3px;
  color: var(--admin-text-muted);
  font-style: italic;
  font-size: 0.82rem;
  margin-bottom: 0.4rem;
}
.app .ticket-linked__add {
  margin-bottom: 0.6rem;
}
.app .ticket-csat-summary {
  padding: 0.6rem 0.8rem;
  border-left: 3px solid var(--admin-accent, var(--primary3));
  background: var(--admin-surface-alt, #fafbfc);
  font-size: 0.85rem;
}
.app .ticket-csat-summary__comment {
  margin-top: 0.3rem;
  color: var(--admin-text-muted);
  font-style: italic;
}
.app .ticket-csat-star {
  color: var(--admin-border-strong, #cdd2d8);
  font-size: 1rem;
}
.app .ticket-csat-star.is-filled {
  color: #f5a623;
}
.ticket-csat-modal {
  position: fixed;
  inset: 0;
  background: rgba(20, 23, 30, 0.45);
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.ticket-csat-modal__panel {
  width: 460px;
  max-width: calc(100vw - 2rem);
  background: var(--admin-surface, #fff);
  border-radius: 6px;
  padding: 1.25rem 1.4rem 1rem;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.25);
}
.ticket-csat-modal__header {
  display: flex;
  align-items: center;
  margin-bottom: 0.6rem;
}
.ticket-csat-modal__header h3 {
  margin: 0;
  font-size: 1.05rem;
  flex: 1;
}
.ticket-csat-modal__lead {
  color: var(--admin-text);
  font-size: 0.9rem;
  margin: 0 0 0.7rem;
}
.ticket-csat-modal__stars {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 1rem;
}
.ticket-csat-modal__stars button {
  background: none;
  border: 0;
  font-size: 1.8rem;
  color: #cdd2d8;
  cursor: pointer;
  padding: 0.1rem 0.2rem;
  transition: color 0.1s, transform 0.1s;
}
.ticket-csat-modal__stars button:hover {
  transform: scale(1.1);
}
.ticket-csat-modal__stars button.is-filled {
  color: #f5a623;
}
.ticket-csat-modal__comment {
  width: 100%;
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--admin-border-strong, #cdd2d8);
  border-radius: 3px;
  font-family: inherit;
  font-size: 0.88rem;
  margin-bottom: 0.8rem;
  resize: vertical;
}
.ticket-csat-modal__actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
}
.ticket-csat-modal .label-block {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--admin-text-muted);
  margin-bottom: 0.3rem;
}
.app .ticket-composer__templates-icon {
  display: inline-block;
  width: 1.6em;
  height: 1.6em;
  background-color: currentColor;
  -webkit-mask: url("/Content/images/Icons/icon-all-white.svg") no-repeat center / contain;
  mask: url("/Content/images/Icons/icon-all-white.svg") no-repeat center / contain;
  vertical-align: -0.15em;
  margin-right: 0.2rem;
}
.app .ticket-drawer__close-icon {
  display: inline-block;
  width: 1.1em;
  height: 1.1em;
  background-color: currentColor;
  -webkit-mask: url("/Content/images/Icons/icon-times-white.svg") no-repeat center / contain;
  mask: url("/Content/images/Icons/icon-times-white.svg") no-repeat center / contain;
  vertical-align: -0.12em;
}
.app .ticket-composer__editor-wrap {
  position: relative;
}
.app .mention-autocomplete {
  position: absolute;
  bottom: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 220px;
  overflow-y: auto;
  list-style: none;
  margin: 0;
  padding: 4px 0;
  background: var(--admin-surface);
  border: 1px solid var(--admin-border);
  border-radius: 6px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
  z-index: 30;
  font-size: 0.85rem;
}
.app .mention-autocomplete__item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.7rem;
  cursor: pointer;
}
.app .mention-autocomplete__item:hover {
  background: var(--admin-surface-alt, #fafbfc);
}
.app .mention-autocomplete__sub {
  margin-left: auto;
  color: var(--admin-text-muted);
  font-size: 0.75rem;
}
.ticket-saved-replies {
  position: fixed;
  inset: 0;
  background: rgba(20, 23, 30, 0.45);
  z-index: 1095;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 6vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.ticket-saved-replies__panel {
  width: 560px;
  max-width: calc(100vw - 2rem);
  background: var(--admin-surface, #fff);
  border: 1px solid var(--admin-border, #e2e5ea);
  border-radius: 6px;
  max-height: 80vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.18);
}
.ticket-saved-replies header {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--admin-border, #e2e5ea);
  background: var(--admin-surface-alt, #fafbfc);
}
.ticket-saved-replies header h3 {
  flex: 1;
  margin: 0;
  font-size: 1rem;
}
.ticket-saved-replies__body {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem 1rem 1rem;
}
.ticket-saved-replies__list {
  list-style: none;
  margin: 0 0 0.75rem;
  padding: 0;
}
.ticket-saved-replies__list li {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--admin-border, #e2e5ea);
  border-radius: 4px;
  margin-bottom: 0.4rem;
  background: var(--admin-surface);
}
.ticket-saved-replies__pick {
  flex: 1;
  text-align: left;
  background: none;
  border: 0;
  padding: 0.2rem 0;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.85rem;
  color: var(--admin-text);
}
.ticket-saved-replies__pick strong {
  display: block;
  color: var(--admin-text-heading);
}
.ticket-saved-replies__pick span {
  color: var(--admin-text-muted);
  font-size: 0.78rem;
}
.ticket-saved-replies__pick:hover strong {
  color: var(--admin-accent, var(--primary3));
}
.ticket-saved-replies__empty {
  padding: 0.6rem 0.8rem;
  background: var(--admin-surface-alt, #fafbfc);
  border: 1px dashed var(--admin-border, #e2e5ea);
  border-radius: 3px;
  color: var(--admin-text-muted);
  font-style: italic;
  font-size: 0.82rem;
}
.ticket-saved-replies__form .label-block {
  display: block;
  margin-top: 0.6rem;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--admin-text-muted);
  margin-bottom: 0.25rem;
}
.ticket-saved-replies__form textarea,
.ticket-saved-replies__form input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--admin-border-strong, #cdd2d8);
  border-radius: 3px;
  font-family: inherit;
  font-size: 0.88rem;
}
.ticket-saved-replies__form textarea {
  resize: vertical;
}
.ticket-saved-replies__form-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  margin-top: 0.8rem;
}
[data-theme="dark"] .app .status-pill--closed {
  background: #2a2d31;
  color: #c4c8cc;
}
[data-theme="dark"] .app .ticket-comment--internal {
  background: #3a3520;
  border-color: #6a5d2c;
}
/**
 * Help centre (/Help)
 * Index grid, article page, contextual popup contents.
 * Battersea Systems LMS - see Docs/plan-help-resources.md
 *
 * Rides the admin LESS chain only: both the admin shell and the learner
 * shell load battersea_admin.less, and the help centre never renders
 * inside the training shell.
 */
.help-search {
  display: flex;
  gap: 0.5rem;
  max-width: 560px;
  margin-bottom: 1.25rem;
}
.help-search input[type="search"] {
  flex: 1;
  min-width: 0;
}
.help-search__results {
  max-width: 560px;
  margin: -0.5rem 0 1.25rem;
  background: var(--admin-surface);
  border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius);
  box-shadow: var(--admin-shadow);
  overflow: hidden;
}
.help-search__hit {
  display: block;
  padding: 0.6rem 0.9rem;
  text-decoration: none;
  color: var(--admin-text);
  border-top: 1px solid var(--admin-border-light);
}
.help-search__hit:first-child {
  border-top: 0;
}
.help-search__hit:hover {
  background: var(--admin-accent-subtle);
}
.help-search__hit strong {
  color: var(--admin-accent);
  font-weight: 500;
}
.help-search__hit span {
  margin-left: 0.5rem;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--admin-text-muted);
}
.help-search__hit small {
  display: block;
  color: var(--admin-text-muted);
  font-size: 12.5px;
}
.help-search__empty {
  padding: 0.9rem;
  color: var(--admin-text-muted);
}
.help-pin {
  border-left: 4px solid var(--admin-accent);
}
.help-pin__row {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.help-pin__label {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--admin-status-info);
  background: var(--admin-status-info-bg);
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  white-space: nowrap;
}
.help-pin__title {
  font-weight: 600;
  color: var(--admin-accent);
  text-decoration: none;
}
.help-pin__title:hover {
  text-decoration: underline;
}
.help-pin__summary {
  display: block;
  color: var(--admin-text-muted);
  font-size: 12.5px;
}
.help-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
}
.help-grid .admin-card {
  margin-bottom: 0;
}
.help-section .admin-card__title {
  margin-bottom: 0.6rem;
}
.help-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.help-list li {
  padding: 0.45rem 0;
  border-top: 1px solid var(--admin-border-light);
}
.help-list li:first-child {
  border-top: 0;
}
.help-list a {
  color: var(--admin-accent);
  text-decoration: none;
  font-weight: 500;
}
.help-list a:hover {
  text-decoration: underline;
}
.help-list small {
  display: block;
  color: var(--admin-text-muted);
  font-size: 12.5px;
}
.help-list--compact li {
  padding: 0.3rem 0;
}
.help-tag {
  display: inline-block;
  margin-left: 0.4rem;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--admin-text-muted);
  border: 1px solid var(--admin-border);
  border-radius: 3px;
  padding: 0 0.35rem;
  vertical-align: middle;
}
.help-footer-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-top: 1.25rem;
}
.help-footer-cards .admin-card {
  margin-bottom: 0;
}
.help-footer-cards .admin-card__title {
  margin-bottom: 0.35rem;
}
.help-muted {
  color: var(--admin-text-muted);
  margin-bottom: 0.9rem;
}
.help-empty {
  color: var(--admin-text-muted);
  margin: 0;
}
.help-article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 1.25rem;
  align-items: start;
}
@media (max-width: 900px) {
  .help-article-layout {
    grid-template-columns: 1fr;
  }
}
.help-article-card .admin-card__body {
  padding: 1.75rem 2rem;
}
.help-aside {
  position: sticky;
  top: calc(var(--admin-header-height, 56px) + 16px);
  max-height: calc(100vh - var(--admin-header-height, 56px) - 32px);
  overflow-y: auto;
}
@media (max-width: 900px) {
  .help-aside {
    position: static;
    max-height: none;
  }
}
.help-aside .admin-card {
  margin-bottom: 1.25rem;
}
.help-aside__title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--admin-text-muted);
  margin-bottom: 0.5rem;
}
.help-toc a {
  display: block;
  padding: 0.25rem 0;
  color: var(--admin-text);
  text-decoration: none;
  font-size: 13px;
}
.help-toc a:hover {
  color: var(--admin-accent);
}
.help-article__title {
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--admin-text-heading);
  margin: 0 0 0.35rem;
}
.help-article__meta {
  color: var(--admin-text-muted);
  font-size: 12.5px;
  margin-bottom: 1.25rem;
}
.help-article__video {
  display: block;
  width: 100%;
  max-width: 720px;
  aspect-ratio: 16 / 9;
  background: #0e0f1a;
  border-radius: var(--admin-radius);
  margin-bottom: 1.25rem;
}
.help-article__body h2 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--admin-text-heading);
  margin: 1.5rem 0 0.5rem;
  scroll-margin-top: 80px;
}
.help-article__body h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--admin-text-heading);
  margin: 1.1rem 0 0.4rem;
}
.help-article__body p,
.help-article__body ul,
.help-article__body ol {
  margin: 0 0 0.85rem;
  max-width: 70ch;
}
.help-article__body ul,
.help-article__body ol {
  padding-left: 1.4rem;
}
.help-article__body li {
  margin-bottom: 0.3rem;
}
.help-article__body a {
  color: var(--admin-accent);
}
.help-article__body strong {
  color: var(--admin-text-heading);
}
.help-article__body code {
  font-family: SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px;
  background: var(--admin-surface-muted);
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
}
.help-article__body pre {
  background: var(--admin-surface-muted);
  border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius-sm);
  padding: 0.75rem 1rem;
  overflow: auto;
  margin: 0 0 0.85rem;
}
.help-article__body pre code {
  background: none;
  padding: 0;
}
.help-article__body img {
  display: block;
  max-width: 100%;
  height: auto;
  border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius-sm);
  margin: 0.5rem 0 1rem;
}
.help-article__body blockquote {
  margin: 1rem 0;
  padding: 0.75rem 1rem;
  max-width: 70ch;
  border-left: 4px solid var(--admin-status-warning);
  background: var(--admin-status-warning-bg);
  border-radius: 0 var(--admin-radius-sm) var(--admin-radius-sm) 0;
}
.help-article__body blockquote p {
  margin: 0;
}
.help-article__body table {
  border-collapse: collapse;
  margin: 0 0 1rem;
  font-size: 13px;
}
.help-article__body table th,
.help-article__body table td {
  border: 1px solid var(--admin-border);
  padding: 0.4rem 0.7rem;
  text-align: left;
}
.help-article__body table th {
  background: var(--admin-surface-muted);
}
.help-article__body hr {
  border: 0;
  border-top: 1px solid var(--admin-border);
  margin: 1.5rem 0;
}
.help-article__end {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--admin-border);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}
.help-article__end-spacer {
  flex: 1;
}
.help-panel__title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
}
.help-panel__route {
  font-weight: 400;
  color: var(--admin-text-muted);
  font-size: 12.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.help-panel__back {
  background: none;
  border: 0;
  font: inherit;
  font-size: 1.1rem;
  line-height: 1;
  color: var(--admin-text-muted);
  cursor: pointer;
  padding: 0.15rem 0.4rem;
  border-radius: var(--admin-radius-sm);
}
.help-panel__back:hover {
  color: var(--admin-accent);
  background: var(--admin-accent-subtle);
}
.help-panel .search-panel__body.help-panel__body {
  max-height: min(70vh, 640px);
  padding: 0.25rem 0;
}
.help-panel__loading {
  padding: 1.5rem 1.25rem;
  color: var(--admin-text-muted);
}
.help-panel__empty strong {
  display: block;
  color: var(--admin-text);
  margin-bottom: 0.25rem;
}
.help-panel__article {
  padding: 1rem 1.25rem 0.5rem;
}
.help-panel__article .help-article__title {
  font-size: 1.25rem;
}
.help-panel__article .help-article__video {
  max-width: none;
}
.help-panel__footer {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  padding: 0.85rem 1.25rem;
  border-top: 1px solid var(--admin-border);
  background: var(--admin-bg);
}
.help-panel__spacer {
  flex: 1;
}
.help-hit {
  display: block;
  padding: 0.7rem 1.25rem;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid var(--admin-border-light);
  cursor: pointer;
}
.help-hit:hover {
  background: var(--admin-accent-subtle);
}
.help-hit strong {
  display: block;
  color: var(--admin-accent);
  font-weight: 500;
}
.help-hit small {
  color: var(--admin-text-muted);
  font-size: 12.5px;
}
.help-hit__tag {
  float: right;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--admin-text-muted);
  border: 1px solid var(--admin-border);
  border-radius: 3px;
  padding: 0.05rem 0.4rem;
  margin-left: 0.5rem;
}
.help-shell {
  margin-bottom: 1.25rem;
}
.help-shell__header {
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--admin-border);
}
.help-shell__title {
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--admin-text-heading);
  margin: 0 0 0.25rem;
}
.help-shell__subtitle {
  color: var(--admin-text-muted);
  margin: 0;
}
.help-shell .help .admin-card {
  box-shadow: none;
  background: var(--admin-surface-alt);
}
.help-shell .help-article-card .admin-card__body {
  padding: 1.25rem 1.5rem;
}
@media (min-width: 901px) {
  body.help-article-page .main {
    overflow: visible;
  }
}
/**
 * Admin Pre-login Chrome — Battersea Systems
 *
 * Page shell + chrome for pre-auth views rendered via AccountStartPage.cshtml
 * and StartPage.cshtml. Built fresh on --admin-* tokens. No legacy LESS
 * imports — does NOT pull from buttons-new / forms-new / modals-new / etc.
 *
 * Loaded by battersea_learner.less (focused entry point).
 *
 * Pages on this chain:
 *   /Account/Login, /Account/ResetPassword, /Account/VerifyCode,
 *   /Manage/AddPhoneNumber, /Manage/VerifyPhoneNumber, /Manage/ManagePhoneNumber,
 *   /Account/Index (StartPage)
 *
 * Notes on selectors:
 *   - The body root keeps the legacy `.admin-login` class so any admin-shell
 *     component (popup, confirm-dialog, btn) keeps working — they already
 *     ship in admin-common via admin/*.less.
 *   - The `.outer` / `#page-background` / `.brand` / `.CustomerLogo` /
 *     `.ProductLogo` / `.powered-by-logo` / `.footer-outer` markup is the
 *     legacy AccountStartPage shell, kept intact for the pre-auth pages.
 *     The footer partial is now `_AdminFooter` so it picks up admin-tier
 *     styling from admin-footer.less.
 */
html.admin-login,
html.admin-login body {
  height: 100%;
  margin: 0;
  padding: 0;
  background: var(--admin-bg);
  color: var(--admin-text);
  overflow-x: hidden;
  /* Use the company's branding font (typekit/google loaded in the layout
	   <head> conditional). @site-font is set by variables-customer.less /
	   variables-reseller.less so the login page shows the customer's font,
	   not the admin shell's neue-haas-grotesk. */
  font-family: var(--tenant-font-sans), Helvetica, Arial, sans-serif;
  font-weight: var(--tenant-font-weight);
}
html.admin-login body {
  min-height: 100vh;
  position: relative;
  display: flex;
  flex-direction: column;
}
/* Maintenance banner (_MaintenanceBanner partial, inline-styled). It sits
   before `.outer` in the body, and `#page-background` is fixed with a
   z-index, so without a stacking position of its own the banner painted
   underneath the page image while still taking up layout space. */
.admin-login .system-banner {
  position: relative;
  z-index: 2;
  flex-shrink: 0;
}
/* ─── Full-page flex shell ───────────────────────────────────────── */
.admin-login .outer {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  flex: 1 0 auto;
  gap: 0;
}
/* AccountStartPage nests a second `.outer` inside the first. Just let it
   flow — it's transparent and provides the flex column for header/main/footer. */
.admin-login .outer .outer {
  min-height: 0;
  flex: 1;
}
/* ─── Page background (fixed image + dark overlay) ───────────────── */
.admin-login #page-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-image: var(--tenant-background-image);
  background-size: cover;
  background-position: 50% 50%;
  background-repeat: no-repeat;
  z-index: 0;
}
/* Overlay only renders when the company has "Background overlay" enabled
   on the Branding page. BaseController stamps `overlay-on` onto
   `#page-background` via ViewBag.OverlayClass; without it the `:after`
   never appears. Colour + opacity come from the company's variables-
   customer.less (`@back-overlay-colour` / `@back-overlay-opacity`). */
.admin-login #page-background.overlay-on:after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: var(--tenant-back-overlay-colour);
  opacity: var(--tenant-back-overlay-opacity);
}
/* ─── Header (customer logo only — no nav on pre-auth) ───────────── */
.admin-login header#header {
  padding: 1.5rem 1rem;
}
@media only screen and (min-width: 768px) {
  .admin-login header#header {
    padding: 2rem 2rem 1rem;
  }
}
.admin-login header#header .navbar-header {
  display: flex;
  justify-content: center;
  align-items: center;
  float: none;
  border: 0;
}
.admin-login .brand.CustomerLogo {
  background-image: var(--tenant-mobilelogo);
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
  display: block;
  height: var(--tenant-mobile-logo-height);
  width: 325px;
  max-width: 100%;
}
@media only screen and (min-width: 768px) {
  .admin-login .brand.CustomerLogo {
    background-image: var(--tenant-logo);
    height: var(--tenant-logo-height);
  }
}
/* Reversed-logo toggle from Company Branding: when the company sets
   "Use reversed logo on login page", BaseController stamps
   .company-logo-reversed on <html>. Swap the desktop + mobile logo
   sources to the -dark variants. */
.admin-login.company-logo-reversed .brand.CustomerLogo {
  background-image: var(--tenant-mobilelogo-dark);
}
@media only screen and (min-width: 768px) {
  .admin-login.company-logo-reversed .brand.CustomerLogo {
    background-image: var(--tenant-logo-dark);
  }
}
/* Reseller login (no customer cookie): AccountController adds
   .product-logo-login and the panel shows the Product Logo card's uploads
   (@reseller-logo / @reseller-logo-dark, mobile @reseller-mobile-logo*, in
   variables-reseller.less) instead of the reseller's company logo. The
   @product-logo variables are NOT these: they carry the company logo for the
   footer slot. Same height as the company logo. */
.admin-login.product-logo-login .brand.CustomerLogo {
  background-image: var(--tenant-reseller-mobile-logo);
  height: var(--tenant-reseller-mobile-logo-height);
}
@media only screen and (min-width: 768px) {
  .admin-login.product-logo-login .brand.CustomerLogo {
    background-image: var(--tenant-reseller-logo);
    height: var(--tenant-reseller-logo-height);
  }
}
.admin-login.product-logo-login.company-logo-reversed .brand.CustomerLogo {
  background-image: var(--tenant-reseller-mobile-logo-dark);
}
@media only screen and (min-width: 768px) {
  .admin-login.product-logo-login.company-logo-reversed .brand.CustomerLogo {
    background-image: var(--tenant-reseller-logo-dark);
  }
}
/* The Product Logo card's Spacing values set the gap between the product
   logo and the panel on the reseller login, as the company logo's Spacing
   does on a customer login (rule further down). */
.admin-login.product-logo-login .outer .outer:has(> .login-outer) > .login-outer {
  padding-top: var(--tenant-reseller-mobile-logo-spacing);
}
@media only screen and (min-width: 768px) {
  .admin-login.product-logo-login .outer .outer:has(> .login-outer) > .login-outer {
    padding-top: var(--tenant-reseller-logo-spacing);
  }
}
.admin-login .brand .hide,
.admin-login .hide {
  position: absolute;
  left: -9999px;
}
/* ─── Legacy panel shim for Privacy / Terms ───────────────────────
   `Views/Home/Privacy.cshtml` + `Terms.cshtml` use `.panel.panel-indent`
   markup that's styled by panels-new.less in the legacy chain. We
   don't load panels-new on the pre-auth pages, so the box renders
   unstyled. Shim it as an admin-card lookalike scoped to .admin-login. */
.admin-login .panel.panel-indent {
  background: var(--admin-surface);
  border-radius: var(--admin-radius-lg);
  box-shadow: var(--admin-shadow);
  margin: 1rem auto;
  max-width: 1100px;
  overflow: hidden;
}
@media only screen and (min-width: 570px) {
  .admin-login .panel.panel-indent {
    margin: 1.5rem auto;
  }
}
@media only screen and (min-width: 768px) {
  .admin-login .panel.panel-indent {
    margin: 2rem auto;
  }
}
.admin-login .panel.panel-indent .panel-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--admin-border);
  background: var(--admin-surface-alt);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
/* The Back link on Terms / Privacy. The pre-login chain does not carry the
   admin .btn rules, so style it here as a small outline button. */
.admin-login .panel.panel-indent .panel-back {
  flex: 0 0 auto;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.875rem;
  font-size: 0.875rem;
  font-weight: 500;
  font-family: inherit;
  line-height: 1.4;
  color: var(--admin-text);
  background-color: #fff;
  border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius);
  text-decoration: none;
  transition: border-color 0.15s, background-color 0.15s;
}
.admin-login .panel.panel-indent .panel-back:hover,
.admin-login .panel.panel-indent .panel-back:focus {
  border-color: var(--brand-primary2, #00AAE7);
  background-color: var(--admin-surface-alt);
  text-decoration: none;
}
.admin-login .panel.panel-indent .panel-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--admin-text-heading);
  margin: 0;
}
.admin-login .panel.panel-indent .panel-body {
  padding: 1.5rem;
  color: var(--admin-text);
}
@media only screen and (min-width: 768px) {
  .admin-login .panel.panel-indent .panel-body {
    padding: 2rem;
  }
}
.admin-login .panel.panel-indent .panel-body p {
  margin: 0 0 1em;
}
.admin-login .panel.panel-indent .panel-body p:last-child {
  margin-bottom: 0;
}
/* ─── Login content frame ─────────────────────────────────────────
   Login-outer expands between header and footer (flex:1 0 auto) and
   centres the introbox vertically within that space, so the panel
   sits in the middle of the viewport instead of hugging the header. */
.admin-login .login-outer {
  margin: 0 auto;
  padding: 1rem;
  width: 100%;
  box-sizing: border-box;
  max-width: 600px;
  text-align: center;
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
@media only screen and (min-width: 570px) {
  .admin-login .login-outer {
    padding: 1.5rem;
  }
}
@media only screen and (min-width: 768px) {
  .admin-login .login-outer {
    padding: 2rem 0;
  }
}
/* Static pages (Terms, Privacy) wrap their panel in .login-outer.static-outer
   so it is centred in the viewport like the login panel, with a side gutter
   at every width instead of running to the browser edge. */
.admin-login .login-outer.static-outer {
  max-width: 1132px;
  text-align: left;
}
@media only screen and (min-width: 768px) {
  .admin-login .login-outer.static-outer {
    padding: 2rem 1rem;
  }
}
/* Pages with a login panel (Login, Reset password): the logo sits the
   Branding page's logo Spacing above the panel (@logo-spacing, and
   @mobile-logo-spacing on phones) and the two are centred together, instead
   of the logo pinned to the top and the panel centred in the space below.
   The header's margin-top:auto and the footer's own margin-top:auto share
   the spare height. Browsers without :has() keep the old layout. */
.admin-login .outer .outer:has(> .login-outer) > header#header {
  margin-top: auto;
  padding-bottom: 0;
}
.admin-login .outer .outer:has(> .login-outer) > .login-outer {
  flex: 0 0 auto;
  justify-content: flex-start;
  padding-top: var(--tenant-mobile-logo-spacing);
}
@media only screen and (min-width: 768px) {
  .admin-login .outer .outer:has(> .login-outer) > .login-outer {
    padding-top: var(--tenant-logo-spacing);
  }
}
/* The translucent "intro" panel that hosts the form. Built fresh — admin
   surface token for the panel, admin radius/shadow, white text against
   the dark page background. */
.admin-login .introbox {
  background-color: var(--tenant-login-panel-background);
  -webkit-backdrop-filter: blur(var(--tenant-login-panel-blur));
  backdrop-filter: blur(var(--tenant-login-panel-blur));
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--tenant-login-panel-radius);
  padding: 2rem 1.5rem;
  box-shadow: var(--admin-shadow-lg);
  color: #fff;
}
@media only screen and (min-width: 570px) {
  .admin-login .introbox {
    padding: 2.5rem 2rem;
  }
}
.admin-login .introbox h1,
.admin-login .introbox h2,
.admin-login .introbox h3,
.admin-login .introbox h4 {
  color: #fff;
  margin: 0 0 0.5rem;
  line-height: 1.2;
}
.admin-login .introbox h1 {
  font-size: 1.75rem;
  font-weight: 600;
  font-family: var(--tenant-font-serif), Helvetica, Arial, sans-serif;
}
.admin-login .introbox h4 {
  font-size: 1rem;
  font-weight: 400;
  opacity: 0.85;
}
.admin-login .introbox p {
  color: #fff;
  font-size: 1rem;
}
.admin-login .introbox p.small {
  font-size: 0.875rem;
  opacity: 0.75;
}
.admin-login .introbox a {
  color: #fff;
  text-decoration: underline;
}
.admin-login .introbox a:hover {
  opacity: 0.85;
}
/* ─── Login form (scoped — does NOT redefine global .btn) ─────────── */
.admin-login .loginform {
  margin-top: 1.25rem;
}
.admin-login .loginform form {
  display: grid;
  gap: 0.75rem;
  max-width: 360px;
  margin: 0 auto;
}
.admin-login .loginform .form-group {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  margin: 0;
}
.admin-login .loginform .form-group label {
  color: #fff;
  font-size: 0.875rem;
  font-weight: 500;
  text-align: left;
  margin-bottom: 0.25rem;
}
.admin-login .loginform input[type="text"],
.admin-login .loginform input[type="email"],
.admin-login .loginform input[type="password"],
.admin-login .loginform input[type="tel"] {
  width: 100%;
  padding: 0.625rem 0.875rem;
  font-size: 1rem;
  font-family: inherit;
  color: var(--admin-text);
  background-color: #fff;
  border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius);
  text-align: center;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.admin-login .loginform input:focus {
  border-color: var(--brand-primary2, #00AAE7);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-primary2, #00AAE7) 20%, transparent);
}
/* Submit button — scoped to .loginform so it does NOT shadow the admin
   shell's .btn / .btn-primary. Uses the company brand `var(--brand-primary2, #00AAE7)`
   (matches the legacy login styling) with the -lighter variant on hover
   so dark brand colours stay legible. */
.admin-login .loginform form > button,
.admin-login .loginform form > input[type="submit"] {
  margin-top: 0.5rem;
  padding: 0.625rem 1.25rem;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  color: #fff;
  background-color: var(--brand-primary2, #00AAE7);
  border: 1px solid color-mix(in srgb, var(--brand-primary2, #00AAE7), #000 20%);
  border-radius: var(--admin-radius);
  cursor: pointer;
  transition: background-color 0.15s;
}
.admin-login .loginform form > button:hover,
.admin-login .loginform form > input[type="submit"]:hover {
  background-color: color-mix(in srgb, var(--brand-primary2, #00AAE7), #fff 20%);
  border-color: var(--brand-primary2, #00AAE7);
}
/* Password visibility toggle. Markup is `<i class="bi eye-toggle eye-toggle-btn"></i>`
   sitting alongside the input inside `.visible-password`. Mask-image swaps
   between the open-eye and closed-eye SVG based on `.eye-toggle`; the
   AccountStartPage JS toggles that class on click. Matches the legacy
   pattern in forms-new.less without us having to load forms-new. */
.admin-login .loginform .visible-password {
  position: relative;
}
.admin-login .loginform .visible-password input {
  padding-right: 2.5rem;
}
.admin-login .loginform .eye-toggle-btn {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  display: block;
  width: 20px;
  height: 20px;
  cursor: pointer;
  background-color: #999999;
  -webkit-mask-image: url('/Content/images/Icons/icon-visible-off-white.svg');
  mask-image: url('/Content/images/Icons/icon-visible-off-white.svg');
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-position: 50%;
  mask-position: 50%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  opacity: 0.85;
}
.admin-login .loginform .eye-toggle-btn:hover {
  opacity: 1;
}
.admin-login .loginform .eye-toggle-btn.eye-toggle {
  -webkit-mask-image: url('/Content/images/Icons/icon-visible-white.svg');
  mask-image: url('/Content/images/Icons/icon-visible-white.svg');
}
/* Validation summary — appears above the form for server-side errors. */
.admin-login .validation-summary-errors,
.admin-login .field-validation-error {
  color: #ffd5d5;
  background-color: rgba(220, 53, 69, 0.2);
  border: 1px solid rgba(220, 53, 69, 0.4);
  border-radius: var(--admin-radius);
  padding: 0.5rem 0.75rem;
  margin: 0 0 0.75rem;
  font-size: 0.875rem;
  text-align: left;
}
.admin-login .field-validation-error {
  background: transparent;
  border: 0;
  padding: 0.25rem 0;
  margin: 0;
}
/* ─── Two-factor / verify-code form spacing ──────────────────────── */
.admin-login .second-authentication form {
  margin: 0 auto;
  max-width: 360px;
}
@media only screen and (min-width: 570px) {
  .admin-login .second-authentication form {
    max-width: 480px;
  }
}
/* ─── Legacy footer markup (AccountStartPage / StartPage) ─────────
   AccountStartPage still renders the old `.footer-outer` markup. The
   new partial path is `_AdminFooter` (BEM .footer__* — already styled
   by admin-footer.less). Until both shell views are converted, support
   both. These rules are scoped to .admin-login so they don't leak.

   `margin-top: auto` is the sticky-footer trick: with the inner .outer
   as a flex column, the footer pushes itself to the bottom of the
   viewport on short pages (Privacy, Terms, password-reset prompt) and
   gets pushed down naturally when content fills the page. */
.admin-login footer {
  flex-shrink: 0;
  margin-top: auto;
  padding: 1.25rem 1rem;
  color: rgba(255, 255, 255, 0.85);
}
@media only screen and (min-width: 768px) {
  .admin-login footer {
    padding: 0 2rem;
  }
}
.admin-login footer .footer-outer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}
.admin-login footer .ProductLogo-outer {
  flex: 0 0 auto;
}
.admin-login footer .brand.ProductLogo {
  background-image: var(--tenant-product-logo-dark);
  background-repeat: no-repeat;
  background-size: contain;
  background-position: 0 50%;
  display: block;
  width: 100px;
  height: 30px;
}
.admin-login footer .footer-text {
  flex: 1 1 auto;
  font-size: 0.75rem;
  margin: 0;
  color: rgba(255, 255, 255, 0.85);
}
@media only screen and (min-width: 768px) {
  .admin-login footer .footer-text {
    text-align: right;
  }
}
.admin-login footer .footer-text a {
  color: rgba(255, 255, 255, 0.95);
  text-decoration: underline;
}
.admin-login footer .footer-text a:hover {
  opacity: 0.85;
}
.admin-login footer .footer-text .tablet-only {
  display: none;
}
@media only screen and (min-width: 768px) {
  .admin-login footer .footer-text .tablet-only {
    display: inline;
  }
}
.admin-login footer .footer-text .break-me-tablet {
  display: block;
}
@media only screen and (min-width: 768px) {
  .admin-login footer .footer-text .break-me-tablet {
    display: inline;
  }
}
.admin-login footer a.powered-by-logo {
  background-image: url('/content/images/Battersea/Branding/Battersea-powered-by-white.svg');
  background-repeat: no-repeat;
  background-size: contain;
  display: inline-block;
  vertical-align: middle;
  height: 16px;
  width: 70px;
  margin-left: 0.5rem;
}
/* ─── Popup overrides on dark pre-auth pages ─────────────────────
   The Battersea Popup is loaded via admin-common (battersea-popup.less)
   and adopts the admin shell colours. On the pre-auth pages it renders
   over a dark page background, but the popup itself sits on white so
   no further override is needed. Kept here as a reminder. */
/* Reseller updates style sheet for Battersea Systems 27/1/2026 */
/*! Reseller-icons style sheet for Battersea Systems 25/11/2025 */
/****************************************************************************** Case */
.icon-case:before {
  -webkit-mask-image: url('/content/images/icons/icon-case-white.svg');
  mask-image: url('/content/images/icons/icon-case-white.svg');
  background-color: currentColor;
}
.btn-icon.icon-case {
  -webkit-mask-image: url('/content/images/icons/icon-case-white.svg');
  mask-image: url('/content/images/icons/icon-case-white.svg');
  background-color: currentColor;
}
.btn-icon-text.icon-case:before {
  -webkit-mask-image: url('/content/images/icons/icon-case-white.svg');
  mask-image: url('/content/images/icons/icon-case-white.svg');
  background-color: currentColor;
}
.icon-badge.icon-case:before {
  -webkit-mask-image: url('/content/images/icons/icon-case-infograph.svg');
  mask-image: url('/content/images/icons/icon-case-infograph.svg');
  background-color: currentColor;
}
.iconheader-box.icon-case > *:before {
  -webkit-mask-image: url('/content/images/icons/icon-case-white.svg');
  mask-image: url('/content/images/icons/icon-case-white.svg');
  background-color: currentColor;
}
.box.iconheader > .icon-case > *:before {
  -webkit-mask-image: url('/content/images/icons/icon-case-white.svg');
  mask-image: url('/content/images/icons/icon-case-white.svg');
  background-color: currentColor;
}
/*! Reseller-colours style sheet for Battersea Systems 27/1/2026 */
/****************************************************************************** Case */
.ext-colour-case {
  color: #8a6d3b;
}
.ext-colour-case-i {
  color: #8a6d3b !important;
}
.ext-back-colour-case {
  background-color: #8a6d3b;
}
.ext-back-colour-case-i {
  background-color: #8a6d3b !important;
}
.ext-border-colour-case {
  border-color: #8a6d3b;
}
.ext-border-colour-case-i {
  border-color: #8a6d3b !important;
}
.background-case {
  background-color: #8a6d3b;
}
.back-case {
  background-color: #8a6d3b !important;
}
.back-case-90 {
  background-color: rgba(138, 109, 59, 0.1);
}
.back-case-80 {
  background-color: rgba(138, 109, 59, 0.2);
}
.back-case-70 {
  background-color: rgba(138, 109, 59, 0.3);
}
.back-case-60 {
  background-color: rgba(138, 109, 59, 0.4);
}
.back-case-50 {
  background-color: rgba(138, 109, 59, 0.5);
}
.colour-background-case {
  background-color: #8a6d3b;
}
.cell-case {
  background-color: #8a6d3b;
}
.color-case {
  color: #8a6d3b;
}
.overlay-case-default:before {
  background-color: #8a6d3b;
}
.text-highlight-case {
  background-color: #8a6d3b !important;
}
.label-case {
  background-color: #8a6d3b !important;
}
.line-case {
  border-color: #8a6d3b !important;
}
/*! Reseller-accrodions style sheet for Battersea Systems 27/1/2029 */
/****************************************************************************** Accordions | Training */
.training-content .panel-accordion-group.panel-group > .panel-accordion.accordion-item.panel-case {
  border: 1px solid #8a6d3b;
}
.training-content .panel-accordion-group.panel-group > .panel-accordion.accordion-item.panel-case > .panel-heading:before {
  background-image: url('/content/images/icons/icon-case-black.svg');
}
.dark .training-content .panel-accordion-group.panel-group > .panel-accordion.accordion-item.panel-case > .panel-heading:before {
  background-image: url('/content/images/icons/icon-case-white.svg');
}
.training-content .panel-accordion-group.panel-group > .panel-accordion.accordion-item.panel-case > .panel-heading.accordion-button *.panel-title {
  color: #8a6d3b;
}
.training-content .panel-accordion-group.panel-group > .panel-accordion.accordion-item.panel-case > .panel-heading.accordion-button *.panel-title > a:hover {
  color: #43351c;
}
.training-content .panel-accordion-group.panel-group > .panel-accordion.accordion-item.panel-case > .panel-heading[aria-expanded="true"] {
  border-bottom: 1px solid #8a6d3b;
}
/*! Reseller-Alerts style sheet for Battersea Systems 21/1/2026 */
/****************************************************************************** case */
p.alert-case {
  border-color: #8a6d3b;
  color: #8a6d3b;
}
p.alert-case .validation-summary-errors {
  color: #8a6d3b;
}
p.alert-case:before {
  background-color: #8a6d3b !important;
  background-image: url("/content/images/icons/icon-case-white.svg");
}
p.icon-list-case {
  border-color: #8a6d3b;
  color: #8a6d3b;
}
.login-outer p.icon-list-case {
  color: #8a6d3b !important;
}
p.icon-list-case:before {
  background-color: #8a6d3b !important;
  background-image: url("/content/images/icons/icon-case-white.svg");
}
.alertbox-case > .inner:before {
  background-image: url("/content/images/icons/icon-case-white.svg");
}
[class*="alertbox-"].colour-case {
  background-color: #8a6d3b !important;
}
.alertbox-case {
  background-color: #8a6d3b !important;
}
.alertbox-case > .inner:before {
  background-color: #8a6d3b !important;
}
.text-icon-box.back-case {
  background-color: #8a6d3b !important;
}
/*! Reseller Boxes style sheet for Battersea Systems 21/1/2026 */
/************************ Highlight boxes **********************/
.highlight-row {
  padding: 2em;
}
section > .highlight-row {
  background: linear-gradient(0deg, rgba(221, 39, 32, 0) 50%, #dd2720 50%);
  padding: 3em 2em;
}
.highlight-box {
  padding: 1rem;
  border-radius: 2px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
  aspect-ratio: 1;
  max-width: 13rem;
  text-align: center;
  -webkit-animation-duration: 0.75s !important;
  animation-duration: 0.75s !important;
  animation-delay: 0;
}
.highlight-box-outer {
  width: -webkit-fit-content;
  width: fit-content;
  grid-gap: 1rem;
}
@media only screen and (min-width: 768px) {
  .highlight-box-outer {
    grid-gap: 2rem;
  }
}
.highlight-box > * {
  padding: 0;
  margin: 0;
}
.highlight-box > *:first-child {
  margin-bottom: 1rem;
  font-size: 1.1rem;
  text-transform: uppercase;
  font-weight: normal;
}
.highlight-box > p {
  font-size: 0.9em;
  -webkit-animation-duration: 0.75s !important;
  animation-duration: 0.75s !important;
}
.highlight-box.big {
  max-width: 20rem;
}
/*! Reseller-Groups style sheet for Battersea Systems 14/2/2024 */
div[class*="-group"] .icon {
  background-color: #999999;
  min-height: 10rem;
  min-width: 10rem;
  border-radius: 10px 10px 0 0;
  text-align: center;
  background-repeat: no-repeat;
  background-size: auto 80%;
  background-position: 50%;
  flex: 1;
}
@media only screen and (min-width: 768px) {
  div[class*="-group"] .icon {
    min-height: 15rem;
    max-width: 15rem;
    background-color: #999999;
    border-radius: 10px 0 0 10px;
    background-size: 80% auto;
    flex: 1;
  }
}
div[class*="-group"] .icon + .copy {
  border-radius: 0 0 10px 10px;
  border: 4px solid #999999;
  border-top: none;
  flex: auto;
}
@media only screen and (min-width: 768px) {
  div[class*="-group"] .icon + .copy {
    border-radius: 0 10px 10px 0;
    border-top: 4px solid #999999;
    border-left: none;
    padding: 2rem 2.5rem;
    flex: 5;
    text-align: left;
  }
}
.ext-do-dont,
.do-group,
.dont-group {
  padding: 1.5rem 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  display: flex !important;
  grid-gap: 0!important;
}
.do-group .icon {
  background-color: var(--tenant-success) !important;
  background-image: url('https://battersea-power.com/Content/Customer_Apex_Motors/media/sign-do.svg');
}
.do-group .copy {
  border-color: var(--tenant-success) !important;
}
.dont-group .icon {
  background-color: var(--tenant-danger) !important;
  background-image: url('https://battersea-power.com/Content/Customer_Apex_Motors/media/sign-dont.svg');
}
.dont-group .copy {
  border-color: var(--tenant-danger) !important;
}
/* Build-only tenant variables (plan-less-build-pipeline.md, Phase 1).
   Imported LAST by the build entry files, so every value a company or the reseller can
   change compiles to a custom property instead of a fixed value. The server writes the
   --tenant-* values into Content/<folder>/css/tenant.css (Phase 2).
   Not imported by the less.js chains: those still get real values from
   variables-reseller.less / variables-customer.less. */
