/* SCORM Emails Admin Page Styles */

/* Main page styles */
.scorm-emails-page,
.scorm-analytics-page,
.scorm-theming-page,
.scorm-settings-page,
.scorm-setup-page,
.scorm-webhooks-page {
  background: #f1f1f1;
  margin: 0 0px -10px -22px;
  padding: 0;
  position: relative;
}

.scorm-page-header {
  background: #fff;
  border-bottom: 1px solid #ddd;
  padding: 30px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.scorm-page-title h1 {
  margin: 0 0 5px 0;
  font-size: 28px;
  font-weight: 600;
  color: #1d2327;
}

.scorm-page-subtitle {
  margin: 0;
  color: #646970;
  font-size: 14px;
}

.scorm-stats-grid {
  display: flex;
  gap: 20px;
}

.scorm-stat-card {
  background: #f8f9fa;
  border: 1px solid #e1e5e9;
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  min-width: 80px;
}

.scorm-stat-number {
  font-size: 24px;
  font-weight: 700;
  color: #2271b1;
  margin-bottom: 5px;
}

.scorm-stat-label {
  font-size: 12px;
  color: #646970;
  text-transform: uppercase;
  font-weight: 500;
  letter-spacing: 0.5px;
}

/* Navigation tabs */
.scorm-nav-tabs {
  background: #fff;
  border-bottom: 1px solid #ddd;
  margin: 0;
  padding: 0 40px;
}

.scorm-nav-tabs .nav-tab {
  border: none;
  border-bottom: 3px solid transparent;
  background: transparent;
  padding: 15px 20px;
  margin: 0;
  font-weight: 500;
  color: #646970;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.scorm-nav-tabs .nav-tab:hover {
  background: #f8f9fa;
  color: #2271b1;
}

.scorm-nav-tabs .nav-tab.nav-tab-active {
  color: #2271b1;
  border-bottom-color: #2271b1;
  background: #f8f9fa;
}

.scorm-nav-tabs .nav-tab .dashicons {
  font-size: 16px;
}

/* Tab content */
.scorm-tab-content {
  padding: 40px;
  background: #f1f1f1;
}

/* Email cards */
.scorm-email-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
  margin-bottom: 30px;
}

.scorm-email-card:hover {
  /* transform: translateY(-2px); */
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.scorm-card-header {
  padding: 25px;
  border-bottom: 1px solid #f0f0f1;
  display: flex;
  align-items: flex-start;
  gap: 15px;
}

.scorm-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #e7f3ff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.scorm-card-icon.scorm-card-icon-warning {
  background: #fff3cd;
}

.scorm-card-icon.scorm-card-icon-success {
  background: #d1f0d9;
}

.scorm-card-icon .dashicons {
  font-size: 20px;
  color: #2271b1;
}

/* MentorKit brand accent */
.scorm-card-icon-brand {
  background: #fff0eb;
}
.scorm-card-icon-brand .dashicons {
  color: #fc5623;
}

.scorm-card-icon-warning .dashicons {
  color: #856404;
}

.scorm-card-icon-success .dashicons {
  color: #0a6b2a;
}

.scorm-card-title h3 {
  margin: 0 0 5px 0;
  font-size: 18px;
  font-weight: 600;
  color: #1d2327;
}

.scorm-card-title p {
  margin: 0;
  color: #646970;
  font-size: 14px;
  line-height: 1.4;
}

.scorm-card-content {
  padding: 25px;
}

/* Collapsible card behavior */
.scorm-card-collapsible .scorm-card-header {
  cursor: pointer;
}
.scorm-card-collapsible.collapsed .scorm-card-content {
  display: none;
}

/* Getting Started steps grid */
.scorm-steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

/* Setup wizard — progress bar with track */
.scorm-setup-progress {
  position: relative;
  padding: 0 0 8px;
}

/* Horizontal track bar */
.scorm-setup-progress__track {
  position: absolute;
  top: 17px;
  left: calc(50% / var(--scorm-setup-progress-steps, 4));
  right: calc(50% / var(--scorm-setup-progress-steps, 4));
  height: 4px;
  background: #e1e5e9;
  border-radius: 2px;
  z-index: 0;
}

.scorm-setup-progress__fill {
  height: 100%;
  background: #2f8f4e;
  border-radius: 2px;
  transition: width 0.4s ease;
}

/* Step list */
.scorm-setup-progress__steps {
  display: flex;
  justify-content: space-between;
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
  z-index: 1;
}

.scorm-setup-progress__step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  flex: 1;
}

/* Circle badge */
.scorm-setup-progress__circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  background: #fff;
  border: 2px solid #dcdcde;
  color: #a7aaad;
  transition: all 0.2s ease;
}

/* Label below circle */
.scorm-setup-progress__label {
  font-size: 13px;
  font-weight: 600;
  color: #646970;
  text-align: center;
}

/* — Current step — */
.scorm-setup-progress__step.is-current .scorm-setup-progress__circle {
  background: #2271b1;
  border-color: #2271b1;
  color: #fff;
  box-shadow:
    0 0 0 4px rgba(34, 113, 177, 0.15),
    0 2px 6px rgba(34, 113, 177, 0.25);
}

.scorm-setup-progress__step.is-current .scorm-setup-progress__label {
  color: #1d2327;
  font-weight: 700;
}

/* — Completed step — */
.scorm-setup-progress__step.is-complete .scorm-setup-progress__circle {
  background: #2f8f4e;
  border-color: #2f8f4e;
  color: #fff;
}

.scorm-setup-progress__step.is-complete
  .scorm-setup-progress__circle
  .dashicons {
  font-size: 20px;
  width: 20px;
  height: 20px;
  line-height: 20px;
}

.scorm-setup-progress__step.is-complete .scorm-setup-progress__label {
  color: #2f8f4e;
}

/* — Pending step — */
.scorm-setup-progress__step.is-pending .scorm-setup-progress__circle {
  background: #fff;
  border-color: #dcdcde;
  color: #a7aaad;
}

.scorm-setup-progress__step.is-pending .scorm-setup-progress__label {
  color: #a7aaad;
}

/* Add-ons checklist */
.scorm-setup-addons {
  list-style: none;
  margin: 0;
  padding: 0;
}

.scorm-setup-addons__item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid #e1e5e9;
}

.scorm-setup-addons__item:last-child {
  border-bottom: none;
}

.scorm-setup-addons__icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #f0f6fc;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #2271b1;
}

.scorm-setup-addons__icon .dashicons {
  font-size: 20px;
  width: 20px;
  height: 20px;
}

.scorm-setup-addons__text {
  flex: 1;
  min-width: 0;
}

.scorm-setup-addons__title {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #1d2327;
  margin-bottom: 2px;
}

.scorm-setup-addons__desc {
  display: block;
  font-size: 13px;
  color: #646970;
}

.scorm-setup-addons__action {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.scorm-setup-addons__error {
  font-size: 12px;
  color: #d63638;
}

.scorm-setup-addons__no-perm {
  font-size: 12px;
  color: #646970;
  font-style: italic;
}

/* Setup captive mode */
body.scorm-setup-captive-mode .scorm-setup-page {
  margin: 0;
  min-height: 100vh;
}

.scorm-setup-page .scorm-page-header {
  position: sticky;
  top: 0;
  z-index: 20;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  height: 56px;
  padding: 0 40px;
}

.scorm-setup-page .scorm-page-title {
  display: flex;
  align-items: center;
}

.scorm-setup-page .scorm-page-title h1 {
  font-size: 18px;
  margin: 0;
}

.scorm-setup-page .scorm-page-subtitle {
  display: none;
}

.scorm-setup-header-sep {
  margin: 0 10px;
  color: #c3c4c7;
  font-size: 18px;
  line-height: 1;
}

.scorm-setup-header-detail {
  display: inline-flex;
  align-items: center;
}

/* Larger card icons in setup wizard */
.scorm-setup-page .scorm-card-icon {
  width: 44px;
  height: 44px;
}

.scorm-setup-page .scorm-card-icon .dashicons {
  font-size: 22px;
}

/* Disable card hover lift in setup wizard (only one card visible) */
.scorm-setup-page .scorm-email-card:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transform: none;
}

.scorm-setup-page .scorm-page-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-left: auto;
}

.scorm-setup-exit-link {
  font-size: 13px;
  font-weight: 500;
  color: #646970;
  text-decoration: none;
  border: 1px solid #c3c4c7;
  border-radius: 4px;
  padding: 6px 14px;
}

.scorm-setup-exit-link:hover,
.scorm-setup-exit-link:focus {
  color: #2c3338;
  text-decoration: none;
  border-color: #8c8f94;
  background: #f6f7f7;
}

.scorm-setup-page .scorm-tab-content {
  max-width: 1100px;
  margin: 0 auto;
}

body.scorm-setup-captive-mode .scorm-setup-page .notice {
  max-width: none;
  margin: 0;
}

.scorm-setup-header-pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid #fcd5c5;
  border-radius: 999px;
  padding: 2px 10px;
  background: #fff5f1;
  font-size: 12px;
  font-weight: 600;
  color: #c44518;
}

.scorm-setup-header-time {
  font-size: 12px;
  color: #646970;
}

/* Button alignment: Back on left, Continue/Skip on right */
.scorm-setup-page .scorm-form-actions {
  justify-content: flex-end;
}

.scorm-setup-back-link {
  margin-right: auto;
}

.scorm-setup-link-action {
  border: 0;
  background: transparent;
  color: #646970;
  font-size: 13px;
  font-weight: 500;
  padding: 0;
  cursor: pointer;
  text-decoration: none;
}

.scorm-setup-link-action:hover,
.scorm-setup-link-action:focus {
  color: #2c3338;
  text-decoration: underline;
}

.scorm-setup-benefits {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.scorm-setup-benefits li {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 12px 14px;
  border-radius: 10px;
  transition: background 0.15s ease;
}

.scorm-setup-benefits li:hover {
  background: #f8f9fa;
}

.scorm-setup-benefits__icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  line-height: 40px;
}

/* Different accent colors per benefit icon */
.scorm-setup-benefits li:nth-child(1) .scorm-setup-benefits__icon {
  background: #e7f3ff;
  color: #2271b1;
}

.scorm-setup-benefits li:nth-child(2) .scorm-setup-benefits__icon {
  background: #f3e8ff;
  color: #8c5fcf;
}

.scorm-setup-benefits li:nth-child(3) .scorm-setup-benefits__icon {
  background: #e8f5e9;
  color: #2f8f4e;
}

.scorm-setup-benefits li:nth-child(4) .scorm-setup-benefits__icon {
  background: #fff4de;
  color: #996800;
}

.scorm-setup-benefits li:nth-child(5) .scorm-setup-benefits__icon {
  background: #f0f6fc;
  color: #3858e9;
}

.scorm-setup-benefits__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-top: 2px;
}

.scorm-setup-benefits__title {
  font-size: 14px;
  font-weight: 600;
  color: #1d2327;
}

.scorm-setup-benefits__desc {
  font-size: 13px;
  color: #646970;
  line-height: 1.5;
}

/* Setup celebration card */
.scorm-setup-celebration {
  border-left: 4px solid #00a32a;
  overflow: hidden;
}

.scorm-setup-celebration__header {
  padding: 28px 28px 16px;
  text-align: center;
  background: linear-gradient(180deg, #f0faf2 0%, #fff 100%);
}

.scorm-setup-celebration__icon {
  font-size: 52px;
  width: 52px;
  height: 52px;
  color: #00a32a;
  margin-bottom: 8px;
}

.scorm-setup-celebration__header h3 {
  margin: 8px 0 4px;
  font-size: 22px;
  font-weight: 700;
  color: #1d2327;
}

.scorm-setup-celebration__header p {
  margin: 0;
  color: #646970;
  font-size: 14px;
}

.scorm-setup-celebration__summary {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.scorm-setup-celebration__summary li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
  color: #1d2327;
  padding: 8px 12px;
  border-radius: 8px;
  background: #f8faf9;
}

.scorm-setup-celebration__step-done {
  color: #00a32a;
  font-size: 20px;
  width: 20px;
  height: 20px;
}

.scorm-setup-celebration__step-skipped {
  color: #dba617;
  font-size: 20px;
  width: 20px;
  height: 20px;
}

.scorm-setup-celebration__skipped-label {
  font-size: 12px;
  color: #646970;
  font-style: italic;
  margin-left: auto;
}

/* Setup nudge card */
.scorm-setup-nudge {
  border-left: 4px solid #e8833a;
}

.scorm-setup-nudge__progress {
  font-size: 13px;
  color: #e8833a;
  font-weight: 600;
  margin: 6px 0 0;
}

/* Demo import feedback */
.scorm-demo-import-status {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid #dcdcde;
  border-radius: 8px;
  background: #f8f9fa;
}

.scorm-demo-import-status.is-hidden {
  display: none;
}

.scorm-demo-import-status__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 12px;
}

.scorm-demo-import-status__text h4 {
  margin: 0 0 4px 0;
  color: #1d2327;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
}

.scorm-demo-import-status__text p {
  margin: 0;
  color: #646970;
  font-size: 13px;
  line-height: 1.4;
}

.scorm-demo-import-status__count {
  flex-shrink: 0;
  padding: 4px 9px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #dcdcde;
  color: #2c3338;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}

.scorm-demo-import-progress {
  overflow: hidden;
  height: 10px;
  border-radius: 999px;
  background: #dfe6ee;
}

.scorm-demo-import-progress__bar {
  display: block;
  height: 100%;
  min-width: 0;
  border-radius: inherit;
  background: #2271b1;
  transition: width 0.35s ease;
}

.scorm-demo-import-status.is-active .scorm-demo-import-progress__bar {
  background-color: #2271b1;
  background-image: linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.24) 25%,
    transparent 25%,
    transparent 50%,
    rgba(255, 255, 255, 0.24) 50%,
    rgba(255, 255, 255, 0.24) 75%,
    transparent 75%,
    transparent
  );
  background-size: 22px 22px;
  animation: scorm-demo-progress-stripes 0.9s linear infinite;
}

.scorm-demo-import-status.is-complete .scorm-demo-import-progress__bar {
  background: #2f8f4e;
}

.scorm-demo-import-status.has-error .scorm-demo-import-progress__bar {
  background: #d63638;
}

.scorm-demo-import-list {
  display: grid;
  gap: 8px;
  list-style: none;
  margin: 14px 0 0 0;
  padding: 0;
}

.scorm-demo-import-course {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid #e1e5e9;
  border-radius: 8px;
  background: #fff;
}

.scorm-demo-import-course__icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #eef4fa;
  color: #2271b1;
}

.scorm-demo-import-course__icon .dashicons {
  width: 16px;
  height: 16px;
  font-size: 16px;
  line-height: 16px;
}

.scorm-demo-import-course--importing .scorm-demo-import-course__icon {
  background: #e7f3ff;
}

.scorm-demo-import-course--importing .dashicons {
  animation: scorm-demo-import-spin 1s linear infinite;
}

.scorm-demo-import-course--queued .scorm-demo-import-course__icon {
  background: #fff4de;
  color: #996800;
}

.scorm-demo-import-course--imported .scorm-demo-import-course__icon {
  background: #d1f0d9;
  color: #0a6b2a;
}

.scorm-demo-import-course--failed .scorm-demo-import-course__icon {
  background: #fcf0f1;
  color: #d63638;
}

.scorm-demo-import-course__body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.scorm-demo-import-course__title {
  color: #1d2327;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.scorm-demo-import-course__message {
  color: #646970;
  font-size: 12px;
  line-height: 1.35;
}

.scorm-demo-import-course__badge {
  padding: 4px 8px;
  border-radius: 999px;
  background: #f0f0f1;
  color: #50575e;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.scorm-demo-import-course--queued .scorm-demo-import-course__badge {
  background: #fff4de;
  color: #755100;
}

.scorm-demo-import-course--importing .scorm-demo-import-course__badge {
  background: #e7f3ff;
  color: #135e96;
}

.scorm-demo-import-course--imported .scorm-demo-import-course__badge {
  background: #d1f0d9;
  color: #0a6b2a;
}

.scorm-demo-import-course--failed .scorm-demo-import-course__badge {
  background: #fcf0f1;
  color: #b32d2e;
}

@keyframes scorm-demo-progress-stripes {
  from {
    background-position: 0 0;
  }

  to {
    background-position: 22px 0;
  }
}

@keyframes scorm-demo-import-spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .scorm-demo-import-progress__bar,
  .scorm-demo-import-course--importing .dashicons {
    animation: none;
    transition: none;
  }
}

/* Progress bar link (completed steps) */
.scorm-setup-progress__link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.scorm-setup-progress__link:hover .scorm-setup-progress__circle {
  box-shadow:
    0 0 0 4px rgba(47, 143, 78, 0.15),
    0 2px 6px rgba(47, 143, 78, 0.25);
}

.scorm-setup-progress__link:hover .scorm-setup-progress__label {
  text-decoration: underline;
}

/* Back link */
.scorm-setup-back-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #646970;
  font-size: 13px;
  text-decoration: none;
  font-weight: 500;
}

.scorm-setup-back-link:hover,
.scorm-setup-back-link:focus {
  color: #2c3338;
  text-decoration: underline;
}

.scorm-setup-back-link .dashicons {
  font-size: 16px;
  width: 16px;
  height: 16px;
}

/* Loading state for install buttons */
.scorm-btn-loading {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

.scorm-btn:disabled,
.scorm-btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

/* Form styles */
.scorm-email-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.scorm-form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.scorm-form-group label {
  font-weight: 600;
  color: #1d2327;
  font-size: 14px;
}

.scorm-form-group input[type="text"],
.scorm-form-group input[type="email"],
.scorm-form-group input[type="file"],
.scorm-form-group select,
.scorm-form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  background: #fff;
  transition: border-color 0.2s ease;
}

.scorm-form-group input[type="file"] {
  padding: 8px 12px;
  cursor: pointer;
}

.scorm-form-group input:focus,
.scorm-form-group select:focus,
.scorm-form-group textarea:focus {
  outline: none;
  border-color: #2271b1;
  box-shadow: 0 0 0 1px #2271b1;
}

.scorm-form-group textarea {
  resize: vertical;
}

.scorm-field-description {
  margin: 5px 0 0 0;
  font-size: 12px;
  color: #646970;
  font-style: italic;
}

.scorm-form-actions {
  margin-top: 10px;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.scorm-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none !important;
}

.scorm-btn-primary {
  background: #2271b1;
  color: #fff;
}

.scorm-btn-primary:hover {
  background: #135e96;
  color: #fff;
}

/* Brand button (MentorKit orange) */
.scorm-btn-brand {
  background: #fc5623;
  color: #fff;
}
.scorm-btn-brand:hover {
  background: #e24d1f;
  color: #fff;
}

.scorm-btn-secondary {
  background: #f0f0f1;
  color: #2c3338;
}

.scorm-btn-secondary:hover {
  background: #dcdcde;
  color: #2c3338;
}

.scorm-btn-warning {
  background: #d63638;
  color: #fff;
}

.scorm-btn-warning:hover {
  background: #b32d2e;
  color: #fff;
}

.scorm-btn .dashicons {
  font-size: 16px;
  display: flex;
  align-items: center;
}

/* Modern table styles */
.scorm-table-container {
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid #e1e5e9;
  width: 100%;
}

.scorm-modern-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  font-size: 14px;
}

.scorm-modern-table thead {
  background: #f8f9fa;
}

.scorm-modern-table th {
  padding: 15px 20px;
  text-align: left;
  font-weight: 600;
  color: #1d2327;
  border-bottom: 2px solid #e1e5e9;
}

.scorm-modern-table td {
  padding: 20px;
  border-bottom: 1px solid #f0f0f1;
  vertical-align: middle;
}

.scorm-modern-table tr:hover {
  background: #f8f9fa;
}

.scorm-modern-table tr:last-child td {
  border-bottom: none;
}

.scorm-modern-table a {
  color: #2271b1;
  text-decoration: none;
  font-weight: 500;
}

.scorm-modern-table a:hover {
  color: #135e96;
  text-decoration: underline;
}

.scorm-modern-table .scorm-btn {
  color: inherit;
}

.scorm-modern-table .scorm-btn-warning {
  color: #fff !important;
}

.scorm-modern-table .scorm-btn-warning:hover {
  color: #fff !important;
}

/* Template status badge */
.scorm-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.scorm-status-badge.active {
  background: #d1f0d9;
  color: #0a6b2a;
}

.scorm-status-badge.inactive {
  background: #f0f0f1;
  color: #646970;
}

/* Quiz "Mode" admin-list column (TSK-19297) — same .scorm-status-badge pill,
   new modifiers alongside .active/.inactive above rather than a new
   component. Neutral warm tones (not pass/fail green/red — mode isn't a
   pass/fail state). */
.scorm-status-badge.is-exam {
  background: #e7e3d8;
  color: #8a8577;
  text-transform: capitalize;
}

.scorm-status-badge.is-quiz {
  background: #f0f0f1;
  color: #646970;
  text-transform: capitalize;
}

.mklms-email-delivery-column {
  min-width: 160px;
}

.mklms-email-template-toggle {
  min-width: 126px;
  min-height: 32px;
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 2px;
  border: 0;
  background: transparent;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.4;
  text-align: left;
  vertical-align: middle;
}

button.mklms-email-template-toggle {
  cursor: pointer;
}

.mklms-email-template-toggle-track {
  position: relative;
  flex: 0 0 44px;
  width: 44px;
  height: 24px;
  border-radius: 999px;
  background: #c3c4c7;
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / 8%);
  transition:
    background-color 0.15s ease,
    box-shadow 0.15s ease;
}

.mklms-email-template-toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgb(0 0 0 / 28%);
  transition: transform 0.15s ease;
}

.mklms-email-template-toggle.active .mklms-email-template-toggle-track {
  background: #00a32a;
}

.mklms-email-template-toggle.active .mklms-email-template-toggle-thumb {
  transform: translateX(20px);
}

.mklms-email-template-toggle-label {
  color: #646970;
  font-weight: 600;
  white-space: nowrap;
}

.mklms-email-template-toggle.active .mklms-email-template-toggle-label {
  color: #0a6b2a;
}

button.mklms-email-template-toggle:hover:not([aria-disabled="true"])
  .mklms-email-template-toggle-track {
  background: #a7aaad;
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / 14%);
}

button.mklms-email-template-toggle.active:hover:not([aria-disabled="true"])
  .mklms-email-template-toggle-track {
  background: #008a20;
}

button.mklms-email-template-toggle:focus-visible {
  outline: 2px solid #2271b1;
  outline-offset: 2px;
  border-radius: 4px;
}

button.mklms-email-template-toggle:disabled {
  cursor: wait;
  opacity: 0.65;
}

button.mklms-email-template-toggle[aria-disabled="true"] {
  cursor: not-allowed;
}

.mklms-email-template-toggle-lock {
  width: 16px;
  height: 16px;
  margin-left: -2px;
  color: #0a6b2a;
  font-size: 16px;
  line-height: 16px;
  opacity: 0.8;
}

/* Radio button groups */
.scorm-radio-group {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.scorm-radio-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-weight: 500;
  color: #1d2327;
}

.scorm-radio-group input[type="radio"] {
  margin: 0;
  cursor: pointer;
}

/* Test send section */
.scorm-test-send-container {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding-top: 15px;
  border-top: 1px solid #f0f0f1;
}

.scorm-test-send-container input[type="email"] {
  width: 250px;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
}

.scorm-test-send-result {
  font-size: 13px;
  font-weight: 500;
}

.scorm-test-send-result.success {
  color: #0a6b2a;
}

.scorm-test-send-result.error {
  color: #d63638;
}

/* Empty state styling */
.scorm-empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #646970;
}

.scorm-empty-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: #f0f0f1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.scorm-empty-icon .dashicons {
  font-size: 32px;
  color: #a7aaad;
}

.scorm-empty-state h4 {
  margin: 0 0 10px 0;
  color: #1d2327;
  font-size: 18px;
}

.scorm-empty-state p {
  margin: 0;
  font-size: 14px;
}

/* Notices */
.scorm-analytics-page .notice {
  margin: 0 40px 20px 40px;
  border-left: 4px solid;
  padding: 12px;
  background: #fff;
  border-radius: 0 4px 4px 0;
}
.scorm-emails-page .notice {
  margin: 0 40px 20px 0;
  border-left: 4px solid;
  padding: 12px;
  background: #fff;
  border-radius: 0 4px 4px 0;
}

.scorm-emails-page .notice-success,
.scorm-analytics-page .notice-success {
  border-left-color: #00a32a;
  background: #f0f8f0;
}

.scorm-emails-page .notice-error,
.scorm-analytics-page .notice-error {
  border-left-color: #d63638;
  background: #fdf0f0;
}

.scorm-emails-page .notice-info,
.scorm-analytics-page .notice-info {
  border-left-color: #2271b1;
  background: #e7f3ff;
}

/* Template editor specific */
.scorm-template-editor {
  max-width: 1200px;
}

.scorm-template-meta {
  background: #f8f9fa;
  padding: 15px 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 15px;
}

.scorm-template-meta .dashicons {
  font-size: 20px;
  color: #646970;
}

.scorm-template-recipient {
  color: #646970;
  font-style: italic;
  font-size: 14px;
}

.scorm-placeholders-info {
  background: #e7f3ff;
  padding: 15px;
  border-radius: 6px;
  margin-top: 10px;
}

.scorm-placeholders-info strong {
  display: block;
  margin-bottom: 8px;
  color: #1d2327;
}

.scorm-placeholder-tag {
  display: inline-block;
  background: #fff;
  color: #2271b1;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-family: monospace;
  margin: 2px;
}

/* Compose form specific */
.scorm-compose-container {
  max-width: 1200px;
}

.scorm-audience-options {
  display: none;
}

.scorm-audience-options.active {
  display: table-row;
}

/* Analytics page components */
.scorm-analytics-section {
  margin-bottom: 40px;
}

.scorm-analytics-overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
  align-items: stretch;
}

/* Ensure cards in overview grid have equal height */
.scorm-analytics-overview-grid .scorm-email-card,
.scorm-analytics-summary-card,
.scorm-analytics-chart-card {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.scorm-analytics-summary-card .scorm-card-content {
  padding: 30px 25px;
}

.scorm-analytics-metric-grid {
  display: flex;
  gap: 20px;
  justify-content: center;
}

.scorm-analytics-metric {
  flex: 1;
  text-align: center;
}

.scorm-analytics-metric-value {
  display: block;
  font-size: 48px;
  line-height: 1;
  font-weight: 600;
  color: #1d2327;
  margin-bottom: 6px;
}

.scorm-analytics-metric-label {
  font-size: 14px;
  font-weight: 500;
  color: #646970;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.scorm-billing-note {
  margin-top: 16px;
  font-size: 12px;
  color: #646970;
  font-style: italic;
}

.scorm-billing-period-form {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
}

.scorm-billing-period-form select {
  min-width: 180px;
}

.scorm-billing-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.scorm-analytics-charts {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 30px;
  margin-bottom: 40px;
}

.scorm-analytics-chart-card {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.scorm-analytics-chart-card--wide {
  min-height: 320px;
}

.scorm-analytics-chart {
  position: relative;
  height: 260px;
}

.scorm-analytics-chart-card--wide .scorm-analytics-chart {
  height: 280px;
}

.scorm-analytics-chart canvas {
  max-width: 100% !important;
  max-height: 100% !important;
}

.scorm-analytics-progress {
  display: flex;
  align-items: center;
  gap: 10px;
}

.scorm-analytics-progress-bar {
  flex: 1;
  height: 12px;
  background: #f0f0f0;
  border-radius: 999px;
  overflow: hidden;
}

.scorm-analytics-progress-bar-fill {
  height: 100%;
  background: #4caf50;
  width: var(--progress-value, 0%);
  border-radius: inherit;
  transition: width 0.3s ease;
}

.scorm-analytics-progress-value {
  font-weight: 600;
  color: #1d2327;
  min-width: 48px;
  text-align: right;
}

.scorm-analytics-col {
  text-align: center;
}

.scorm-analytics-col--sm {
  min-width: 110px;
}

.scorm-analytics-col--md {
  min-width: 140px;
}

.scorm-analytics-table {
  margin-bottom: 40px;
}

.scorm-analytics-status {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.scorm-analytics-status--success {
  background: #e8f5e9;
  color: #0a6b2a;
}

.scorm-analytics-status--warning {
  background: #fff3cd;
  color: #856404;
}

.scorm-analytics-status--danger {
  background: #fdf0f0;
  color: #d63638;
}

.scorm-analytics-status--muted {
  background: #f0f0f1;
  color: #646970;
}

.scorm-analytics-muted {
  color: #646970;
}

.scorm-analytics-scorecard {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  margin: 30px 0;
}

.scorm-analytics-scorecard--compact {
  margin: 20px 0 30px 0;
}

.scorm-analytics-scorecard-card {
  background: #f0f0f0;
  border-radius: 12px;
  padding: 22px;
  text-align: center;
  border: 1px solid #e0e0e0;
}

.scorm-analytics-scorecard-card--info {
  background: #e3f2fd;
  border-color: #c3e1fb;
}

.scorm-analytics-scorecard-card--success {
  background: #e8f5e9;
  border-color: #c4e8c8;
}

.scorm-analytics-scorecard-card--warning {
  background: #fff3e0;
  border-color: #ffe0b2;
}

.scorm-analytics-scorecard-value {
  margin: 0;
  font-size: 40px;
  font-weight: 700;
  color: #1d2327;
}

/*
 * Course & group analytics (editor Analytics tab + Reports group detail).
 * Everything is scoped under .mklms-an so the frontend analytics shortcode and
 * the Reports overview keep their own styles. Server-rendered, no JS: the
 * editor pane loads this markup over AJAX, where enqueued scripts never run.
 */
.mklms-an {
  color: #1a2330;
}

.mklms-an.scorm-analytics-section {
  margin-bottom: 0;
}

.mklms-an .mklms-inline-form {
  display: inline;
  margin: 0;
}

.mklms-an-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin: 0 0 20px;
}

.mklms-an .mklms-an-title {
  margin: 0;
  padding: 0;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: #1a2330;
}

.mklms-an-head__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.mklms-an-back {
  font-size: 13px;
  font-weight: 600;
  color: #255c97;
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 7px;
}

.mklms-an-back:hover,
.mklms-an-back:focus {
  background: #e8effb;
  color: #255c97;
}

.mklms-an-linkbtn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 0;
  padding: 6px 10px;
  border-radius: 7px;
  font-size: 13px;
  line-height: 1.4;
  color: #6b7787;
  cursor: pointer;
}

.mklms-an-linkbtn .dashicons {
  font-size: 16px;
  width: 16px;
  height: 16px;
}

.mklms-an-linkbtn:hover,
.mklms-an-linkbtn:focus {
  color: #1a2330;
  background: #eef0f3;
}

/* Headline figures */
.mklms-an-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin: 0 0 20px;
}

.mklms-an-kpis .mklms-an-tile {
  min-width: 0;
  height: auto;
  margin: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between; /* values line up when a label wraps */
  gap: 10px;
  background: #fff;
  border: 1px solid #e6e8ee;
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05), 0 6px 18px rgba(16, 24, 40, 0.04);
  padding: 16px;
}

.mklms-an-tile__top {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.mklms-an-tile__icon,
.mklms-an-card__icon,
.mklms-an-empty__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  border-radius: 50%;
  background: #e8effb;
  color: #2f6fb3;
}

.mklms-an-tile__icon {
  width: 32px;
  height: 32px;
}

.mklms-an-tile__icon .dashicons {
  font-size: 16px;
  width: 16px;
  height: 16px;
}

.mklms-an-tile__label {
  font-size: 13px;
  font-weight: 600;
  color: #5b6b7b;
  line-height: 1.3;
}

.mklms-an-kpis .mklms-an-tile__value {
  display: block;
  margin: 0;
  font-size: 30px;
  line-height: 1.1;
  font-weight: 700;
  color: #1a2330;
  font-variant-numeric: tabular-nums;
}

/* Cards */
.mklms-an-card {
  background: #fff;
  border: 1px solid #e6e8ee;
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05), 0 6px 18px rgba(16, 24, 40, 0.04);
  overflow: hidden;
  margin: 0 0 20px;
}

.mklms-an-card__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid #eef0f3;
}

.mklms-an-card__icon {
  width: 36px;
  height: 36px;
}

.mklms-an-card__icon .dashicons {
  font-size: 18px;
  width: 18px;
  height: 18px;
}

.mklms-an .mklms-an-card__title {
  margin: 0;
  padding: 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  color: #1a2330;
  display: flex;
  align-items: center;
  gap: 10px;
}

.mklms-an-card__count {
  margin-left: auto;
  font-size: 12px;
  font-weight: 700;
  color: #255c97;
  background: #e8effb;
  border-radius: 999px;
  padding: 2px 9px;
  font-variant-numeric: tabular-nums;
}

.mklms-an-card__body {
  padding: 20px;
}

.mklms-an-card__body--flush {
  padding: 0;
}

.mklms-an .mklms-an-subhead {
  margin: 24px 0 10px;
  font-size: 14px;
  font-weight: 700;
  color: #1a2330;
}

.mklms-an .mklms-an-desc {
  margin: 0 0 14px;
  font-size: 13px;
  color: #6b7787;
}

.mklms-an-band {
  display: grid;
  grid-template-columns: minmax(300px, 2fr) minmax(0, 3fr);
  gap: 20px;
  align-items: stretch;
  margin: 0 0 20px;
}

.mklms-an-band > .mklms-an-card {
  margin: 0;
}

/* Completion distribution: horizontal bars, one row per progress bucket */
.mklms-an-dist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mklms-an-dist__row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 32px 44px;
  column-gap: 12px;
  align-items: center;
  margin: 0;
}

.mklms-an-dist__label {
  font-size: 13px;
  color: #5b6b7b;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* The track is 100% of the group, so each bar reads as its share. */
.mklms-an-dist__track {
  display: block;
  height: 12px;
  background: #eef2f7;
  border-radius: 4px;
  overflow: hidden;
}

.mklms-an-dist__bar {
  display: block;
  height: 100%;
  width: var(--mklms-an-share, 0%);
  border-radius: 4px;
}

.mklms-an-dist__bar--b0 { background: #86b6ef; }
.mklms-an-dist__bar--b1 { background: #5e9ce0; }
.mklms-an-dist__bar--b2 { background: #3b82cb; }
.mklms-an-dist__bar--b3 { background: #2f6fb3; }
.mklms-an-dist__bar--b4 { background: #22548a; }
.mklms-an-dist__bar--b5 { background: #163c63; }

.mklms-an-dist__count {
  font-size: 13px;
  font-weight: 600;
  color: #1a2330;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.mklms-an-dist__count.is-zero {
  color: #6b7787;
  font-weight: 400;
}

.mklms-an-dist__pct {
  font-size: 12px;
  color: #6b7787;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* Empty states */
.mklms-an-empty {
  padding: 32px 20px;
  text-align: center;
  color: #6b7787;
  font-size: 14px;
}

.mklms-an-empty__icon {
  width: 40px;
  height: 40px;
  margin: 0 auto 10px;
}

.mklms-an-empty__icon .dashicons {
  font-size: 20px;
  width: 20px;
  height: 20px;
}

.mklms-an .mklms-an-empty__text {
  margin: 0;
  font-size: 14px;
  color: #6b7787;
}

/* Tables */
.mklms-an .scorm-table-container {
  border: 1px solid #e6e8ee;
  border-radius: 10px;
  margin: 0;
}

.mklms-an .mklms-an-card__body--flush > .scorm-table-container {
  border: 0;
  border-radius: 0;
}

.mklms-an table.widefat {
  border: 0;
  box-shadow: none;
}

.mklms-an .scorm-modern-table thead {
  background: #f8f9fb;
}

.mklms-an .scorm-modern-table th {
  padding: 10px 16px;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #5b6b7b;
  border-bottom: 1px solid #e6e8ee;
}

.mklms-an .scorm-modern-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #eef0f3;
  color: #1a2330;
  font-size: 14px;
  vertical-align: middle;
}

.mklms-an .scorm-modern-table tbody tr:last-child td {
  border-bottom: 0;
}

.mklms-an .scorm-modern-table tbody tr:hover {
  background: #f4f8fd;
}

.mklms-an .scorm-modern-table tr.no-items:hover {
  background: transparent;
}

.mklms-an .scorm-modern-table tr.no-items td {
  padding: 32px 20px;
  text-align: center;
  color: #6b7787;
}

.mklms-an .scorm-modern-table a {
  color: #255c97;
  font-weight: 600;
}

.mklms-an .scorm-modern-table a.button,
.mklms-an .scorm-modern-table a.button:hover {
  font-weight: 400;
  text-decoration: none;
}

.mklms-an .mklms-an-col--num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.mklms-an .mklms-an-col--actions {
  text-align: right;
  white-space: nowrap;
}

.mklms-an .mklms-an-col--meter {
  min-width: 160px;
}

.mklms-an-person {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
  white-space: nowrap;
}

.mklms-an-person__email {
  font-size: 12px;
  color: #6b7787;
}

.mklms-an .scorm-analytics-progress {
  min-width: 140px;
}

.mklms-an .scorm-analytics-progress-bar {
  height: 8px;
  background: #e8effb;
  border-radius: 4px;
}

.mklms-an .scorm-analytics-progress-bar-fill {
  background: #2f6fb3;
  transition: none;
}

.mklms-an .scorm-analytics-progress-value {
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.mklms-an .scorm-analytics-status {
  gap: 6px;
  padding: 3px 10px 3px 8px;
  font-size: 12px;
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
}

.mklms-an .scorm-analytics-status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}

.mklms-an .scorm-analytics-status--danger {
  color: #b3261e;
}

/* Quiz-attempt figures: flatter secondary tiles inside the card */
.mklms-an .mk-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin: 0 0 8px;
}

.mklms-an .mk-stat-card {
  min-width: 0;
  background: #f8f9fb;
  border: 1px solid #eef0f3;
  border-radius: 10px;
  padding: 12px 14px;
}

.mklms-an .mk-stat-label {
  font-size: 12px;
  font-weight: 600;
  color: #5b6b7b;
  margin-bottom: 4px;
}

.mklms-an .mk-stat-value {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.15;
  color: #1a2330;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 1099px) {
  .mklms-an-band {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 782px) {
  .mklms-an-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .mklms-an-head__actions {
    margin-left: 0;
    flex-wrap: wrap;
  }

  .mklms-an-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mklms-an-kpis .mklms-an-tile__value {
    font-size: 24px;
  }

  .mklms-an-card__body {
    padding: 16px;
  }

  .mklms-an-card__body--flush {
    padding: 0;
  }

  .mklms-an .scorm-modern-table th,
  .mklms-an .scorm-modern-table td {
    padding: 10px 12px;
  }

  .mklms-an-dist__row {
    grid-template-columns: 48px minmax(0, 1fr) 28px 40px;
    column-gap: 10px;
  }
}

/* Logs table specific */
.scorm-log-status {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}

.scorm-log-status.sent {
  background: #d1f0d9;
  color: #0a6b2a;
}

.scorm-log-status.failed {
  background: #fdf0f0;
  color: #d63638;
}

.scorm-log-status.pending {
  background: #fff3cd;
  color: #856404;
}

.scorm-log-date {
  color: #646970;
  font-size: 13px;
}

.scorm-log-count {
  background: #2271b1;
  color: #fff;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  display: inline-block;
}

/* Back link */
.scorm-back-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #2271b1;
  text-decoration: none;
  font-size: 14px;
  margin-bottom: 20px;
  padding: 8px 12px;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.scorm-back-link:hover {
  background: #f8f9fa;
  color: #135e96;
}

.scorm-back-link .dashicons {
  font-size: 16px;
}

/* Allow dropdowns (e.g. Astra palette selects) to overflow the card on the theming page */
.scorm-theming-page .scorm-email-card {
  overflow: visible;
}

/* WordPress form table compatibility */
.scorm-emails-page .form-table th,
.scorm-analytics-page .form-table th,
.scorm-theming-page .form-table th,
.scorm-settings-page .form-table th {
  font-weight: 600;
  color: #1d2327;
}

.scorm-emails-page .form-table td,
.scorm-analytics-page .form-table td,
.scorm-theming-page .form-table td,
.scorm-settings-page .form-table td {
  color: #2c3338;
}

.scorm-emails-page .form-table input[type="text"],
.scorm-emails-page .form-table input[type="email"],
.scorm-emails-page .form-table select,
.scorm-emails-page .form-table textarea,
.scorm-analytics-page .form-table input[type="text"],
.scorm-analytics-page .form-table input[type="email"],
.scorm-analytics-page .form-table select,
.scorm-analytics-page .form-table textarea,
.scorm-theming-page .form-table input[type="text"],
.scorm-theming-page .form-table input[type="email"],
.scorm-theming-page .form-table input[type="color"],
.scorm-theming-page .form-table select,
.scorm-theming-page .form-table textarea,
.scorm-settings-page .form-table input[type="text"],
.scorm-settings-page .form-table input[type="email"],
.scorm-settings-page .form-table input[type="number"],
.scorm-settings-page .form-table select,
.scorm-settings-page .form-table textarea {
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 8px 12px;
  transition: border-color 0.2s ease;
}

/* Emails → Sender: what mail goes out as, and where the setting applies. */
.scorm-email-sender .form-table {
  margin-top: 0;
}

.mklms-email-sender-note {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  padding: 13px 16px;
  background: #f4f8fd;
  border: 1px solid #dce8f5;
  border-radius: 11px;
  color: #5b6b7b;
}

.mklms-email-sender-note__badge {
  flex: 0 0 auto;
  padding: 4px 9px;
  border-radius: 999px;
  background: #dcebfb;
  color: #255c97;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.mklms-email-sender-note p {
  margin: 0 0 8px;
}

.mklms-email-sender-note p:last-child {
  margin-bottom: 0;
}

.mklms-email-sender-note strong {
  color: #1d2327;
  overflow-wrap: anywhere;
}

.mklms-email-sender-note__warning {
  padding: 8px 10px;
  border-left: 3px solid #dba617;
  background: #fcf9e8;
  color: #3c434a;
}

/* Native <select> needs extra right padding so the dropdown arrow doesn't
   overlap the option text (it is drawn inside the 12px right padding above). */
.scorm-emails-page .form-table select,
.scorm-analytics-page .form-table select,
.scorm-theming-page .form-table select,
.scorm-settings-page .form-table select {
  padding-right: 32px;
  min-width: 200px;
}

.scorm-emails-page .form-table input:focus,
.scorm-emails-page .form-table select:focus,
.scorm-emails-page .form-table textarea:focus,
.scorm-analytics-page .form-table input:focus,
.scorm-analytics-page .form-table select:focus,
.scorm-analytics-page .form-table textarea:focus,
.scorm-theming-page .form-table input:focus,
.scorm-theming-page .form-table select:focus,
.scorm-theming-page .form-table textarea:focus,
.scorm-settings-page .form-table input:focus,
.scorm-settings-page .form-table select:focus,
.scorm-settings-page .form-table textarea:focus {
  border-color: #2271b1;
  box-shadow: 0 0 0 1px #2271b1;
  outline: none;
}

.scorm-settings-page .mk-security-select-wrap {
  position: relative;
  display: inline-block;
  width: min(100%, 280px);
  max-width: 100%;
}

.scorm-settings-page .mk-security-select-wrap--wide {
  width: min(100%, 390px);
}

.scorm-settings-page .mk-security-select-wrap::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 18px;
  width: 9px;
  height: 9px;
  border-right: 2px solid #50575e;
  border-bottom: 2px solid #50575e;
  transform: translateY(-65%) rotate(45deg);
  pointer-events: none;
}

.scorm-settings-page .mk-security-select {
  width: 100%;
  min-height: 48px;
  padding: 10px 44px 10px 16px;
  border: 1px solid #d0d7de;
  border-radius: 12px;
  background: #fff;
  color: #2c3338;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.35;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  cursor: pointer;
}

.scorm-settings-page .mk-security-select:hover {
  border-color: #b6c0c9;
}

.scorm-settings-page .mk-security-select:focus {
  border-color: #2271b1;
  box-shadow:
    0 0 0 1px #2271b1,
    0 4px 14px rgba(34, 113, 177, 0.12);
}

/* Theming page specific styles */
.scorm-theming-page .form-table th {
  width: 200px;
  padding: 20px 20px 20px 0;
}

.scorm-theming-page .form-table td {
  padding: 20px 0;
}

.scorm-theming-page input[type="color"] {
  width: 60px;
  height: 40px;
  border-radius: 6px;
  cursor: pointer;
  margin-right: 10px;
}

.scorm-theming-page .scorm-form-actions {
  padding: 20px 0;
  border-top: 1px solid #f0f0f1;
  margin-top: 30px;
}

.scorm-theming-page .scorm-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  background: #2271b1;
  color: #fff;
}

.scorm-theming-page .scorm-btn-primary:hover {
  background: #135e96;
  color: #fff;
}

.scorm-theming-page .scorm-btn-primary .dashicons {
  font-size: 16px;
}

/* Notices for theming page */
.scorm-theming-page .notice {
  margin: 0 0 20px 0;
  border-left: 4px solid;
  padding: 12px;
  background: #fff;
  border-radius: 0 4px 4px 0;
}

.scorm-theming-page .notice-success {
  border-left-color: #00a32a;
  background: #f0f8f0;
}

.scorm-theming-page .notice-error {
  border-left-color: #d63638;
  background: #fdf0f0;
}

.scorm-theming-page .notice-info {
  border-left-color: #2271b1;
  background: #e7f3ff;
}

/* Settings page specific styles */
.scorm-settings-page .scorm-settings-tab {
  display: none;
}

.scorm-settings-page #url-settings {
  display: block;
}

.scorm-settings-page .form-table th {
  width: 200px;
  padding: 20px 20px 20px 0;
}

.scorm-settings-page .form-table td {
  padding: 20px 0;
}

.scorm-settings-page .scorm-form-actions {
  padding: 20px 0;
  border-top: 1px solid #f0f0f1;
  margin-top: 30px;
}

.scorm-settings-page .scorm-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  background: #2271b1;
  color: #fff;
}

.scorm-settings-page .scorm-btn-primary:hover {
  background: #135e96;
  color: #fff;
}

.scorm-settings-page .scorm-btn-primary .dashicons {
  font-size: 16px;
}

/* Notices for settings page */
.scorm-settings-page .notice {
  margin: 0 40px 20px 40px;
  border-left: 4px solid;
  padding: 12px;
  background: #fff;
  border-radius: 0 4px 4px 0;
}

.scorm-settings-page .notice-success {
  border-left-color: #00a32a;
  background: #f0f8f0;
}

.scorm-settings-page .notice-error {
  border-left-color: #d63638;
  background: #fdf0f0;
}

.scorm-settings-page .notice-info {
  border-left-color: #2271b1;
  background: #e7f3ff;
}

.scorm-setup-page .notice {
  margin: 0;
  border-left: none;
  border-bottom: 1px solid #ddd;
  border-radius: 0;
  padding: 10px 40px;
}

.scorm-setup-page .notice-success {
  border-left-color: #00a32a;
  background: #f0f8f0;
}

.scorm-setup-page .notice-error {
  border-left-color: #d63638;
  background: #fdf0f0;
}

.scorm-setup-page .notice-info {
  border-left-color: #2271b1;
  background: #e7f3ff;
}

/* Settings sections styling */
.scorm-settings-page .scorm-card-content .form-table {
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  margin-bottom: 0;
}

.scorm-settings-page .scorm-card-content h2 {
  margin: 30px 0 20px 0;
  font-size: 18px;
  font-weight: 600;
  color: #1d2327;
  padding-bottom: 10px;
  border-bottom: 2px solid #f0f0f1;
}

.scorm-settings-page .scorm-card-content h2:first-of-type {
  margin-top: 0;
}

.scorm-settings-page .scorm-card-content .form-table tbody tr {
  border-bottom: 1px solid #f0f0f1;
}

.scorm-settings-page .scorm-card-content .form-table tbody tr:last-child {
  border-bottom: none;
}

.scorm-settings-page .scorm-card-content .form-table tbody tr:hover {
  background: #f8f9fa;
}

.scorm-settings-page .scorm-settings-help-group {
  margin-top: 20px;
}

.scorm-settings-page .scorm-card-content h4 {
  margin-top: 0;
}

.scorm-settings-page .scorm-card-content code {
  background: #f0f0f1;
  padding: 4px 8px;
  border-radius: 4px;
}

.scorm-settings-page .scorm-settings-help-list {
  color: #646970;
  list-style-type: disc;
  margin-left: 20px;
}

/* Media uploader buttons */
.scorm-settings-page .scorm_media_upload,
.scorm-settings-page .scorm_media_remove {
  margin-left: 10px;
}

.scorm-settings-page #scorm_certificate_logo_preview,
.scorm-settings-page #scorm_certificate_frame_preview {
  margin-top: 10px;
}

.scorm-settings-page #scorm_certificate_logo_preview img,
.scorm-settings-page #scorm_certificate_frame_preview img {
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* -------------------------------------------------------------
   SCORM Packages admin archive (edit.php?post_type=scorm_package)
   ------------------------------------------------------------- */
body.edit-php.post-type-scorm_package .wrap {
  background: #f1f1f1;
  margin: 0;
  padding: 0;
}

body.edit-php.post-type-scorm_package .wrap > h1.wp-heading-inline {
  margin: 0 20px 8px 20px;
  padding: 20px 0 0 0;
  background: transparent;
  border: 0;
}

body.edit-php.post-type-scorm_package .subsubsub {
  margin: 0 20px;
  padding: 0 0 12px 0;
  background: transparent;
  border-bottom: 0;
}

body.edit-php.post-type-scorm_package .subsubsub a {
  color: #646970;
  text-decoration: none;
  font-weight: 500;
}

body.edit-php.post-type-scorm_package .subsubsub a.current {
  color: #2271b1;
}

body.edit-php.post-type-scorm_package .tablenav {
  margin: 10px 20px;
  background: #fff;
  border: 1px solid #e1e5e9;
  border-radius: 8px;
  padding: 12px;
}

body.edit-php.post-type-scorm_package .tablenav .actions select,
body.edit-php.post-type-scorm_package .tablenav .actions input[type="submit"],
body.edit-php.post-type-scorm_package .tablenav .actions .button {
  height: 36px;
  padding: 0 12px;
  border-radius: 6px;
  box-sizing: border-box;
}

body.edit-php.post-type-scorm_package .tablenav .actions .button,
body.edit-php.post-type-scorm_package .search-box .button {
  background: #f0f0f1;
  color: #2c3338;
  border-color: #dcdcde;
}

/* Improve native select spacing so arrow doesn't crowd text */
body.edit-php.post-type-scorm_package .tablenav .actions select {
  padding-right: 34px; /* leave room for native arrow */
  background-color: #fff;
  max-width: 100%;
}

body.edit-php.post-type-scorm_package .tablenav .actions select:focus {
  border-color: #2271b1;
  box-shadow: 0 0 0 1px #2271b1;
  outline: none;
}

body.edit-php.post-type-scorm_package .tablenav .actions .button:hover,
body.edit-php.post-type-scorm_package .search-box .button:hover {
  background: #dcdcde;
  color: #2c3338;
}

/* Search box spacing on the right */
body.edit-php.post-type-scorm_package p.search-box {
  margin-right: 20px;
}
body.edit-php.post-type-scorm_package p.search-box .button {
  margin-left: 8px;
}

body.edit-php.post-type-scorm_package .search-box input[type="search"] {
  border-radius: 6px;
  padding: 7px 12px;
}

body.edit-php.post-type-scorm_package .wp-list-table {
  margin: 0 20px 30px 20px;
  width: calc(100% - 40px); /* prevent horizontal overflow with side margins */
  box-sizing: border-box;
  border: 1px solid #e1e5e9;
  border-radius: 8px;
  background: #fff;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14px;
  overflow: hidden;
}

body.edit-php.post-type-scorm_package .wp-list-table thead th {
  background: #f8f9fa;
  color: #1d2327;
  font-weight: 600;
  padding: 15px 20px;
  border-bottom: 2px solid #e1e5e9;
}

/* Ensure checkbox header cell matches header background */
body.edit-php.post-type-scorm_package .wp-list-table thead th.check-column,
body.edit-php.post-type-scorm_package .wp-list-table thead td.check-column {
  background: #f8f9fa !important;
}

/* Smooth rounded corners on header row */
body.edit-php.post-type-scorm_package .wp-list-table thead th:first-child {
  border-top-left-radius: 8px;
}
body.edit-php.post-type-scorm_package .wp-list-table thead th:last-child {
  border-top-right-radius: 8px;
}

/* Match footer checkbox background and round corners */
body.edit-php.post-type-scorm_package .wp-list-table tfoot th.check-column,
body.edit-php.post-type-scorm_package .wp-list-table tfoot td.check-column {
  background: #f8f9fa !important;
}
body.edit-php.post-type-scorm_package .wp-list-table tfoot th:first-child {
  border-bottom-left-radius: 8px;
}
body.edit-php.post-type-scorm_package .wp-list-table tfoot th:last-child {
  border-bottom-right-radius: 8px;
}

body.edit-php.post-type-scorm_package .wp-list-table tbody td {
  padding: 16px 20px;
  border-bottom: 1px solid #f0f0f1;
  vertical-align: middle;
}

body.edit-php.post-type-scorm_package .wp-list-table tbody tr:hover {
  background: #f8f9fa;
}

body.edit-php.post-type-scorm_package .wp-list-table tfoot th {
  padding: 15px 20px;
  border-top: 1px solid #e1e5e9;
  background: #f8f9fa;
}

body.edit-php.post-type-scorm_package .wp-list-table a {
  color: #2271b1;
  text-decoration: none;
  font-weight: 500;
}

body.edit-php.post-type-scorm_package .wp-list-table a:hover {
  color: #135e96;
  text-decoration: underline;
}

/* Row actions → convert to small pill buttons */
body.edit-php.post-type-scorm_package .wp-list-table .row-actions {
  visibility: visible;
  position: static;
  padding-top: 4px;
}

body.edit-php.post-type-scorm_package .wp-list-table .row-actions span {
  display: inline-block;
  margin-right: 6px;
}

body.edit-php.post-type-scorm_package
  .wp-list-table
  .row-actions
  span
  + span::before {
  content: "";
}

body.edit-php.post-type-scorm_package .wp-list-table .row-actions a {
  display: inline-block;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: #2271b1;
  text-decoration: none;
  font-weight: 500;
}

body.edit-php.post-type-scorm_package .wp-list-table .row-actions a:hover {
  background: transparent;
  color: #135e96;
  text-decoration: underline;
}

body.edit-php.post-type-scorm_package .wp-list-table .row-actions .trash a {
  background: transparent;
  color: #d63638;
}

body.edit-php.post-type-scorm_package
  .wp-list-table
  .row-actions
  .trash
  a:hover {
  background: #f7dbdb;
  color: #b32d2e;
}

/* Notices spacing on this screen */
body.edit-php.post-type-scorm_package .wrap .notice {
  margin: 10px 20px;
  border-left: 4px solid #2271b1;
  background: #fff;
  border-radius: 0 4px 4px 0;
}

body.edit-php.post-type-scorm_package .scorm-inherited-badge {
  display: inline-block;
  padding: 3px 7px;
  border: 1px solid #dba617;
  border-radius: 3px;
  background: #fcf0cf;
  color: #5c3b00;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
}

body.edit-php.post-type-scorm_package .scorm-own-package-label {
  color: #646970;
}

/* Footer fix */
#wpfooter {
  position: initial !important;
}

/* -------------------------------------------------------------
   SCORM Groups admin archive (edit.php?post_type=scorm_group)
   Mirrors the courses list styling
   ------------------------------------------------------------- */
body.edit-php.post-type-scorm_group .wrap {
  background: #f1f1f1;
  margin: 0;
  padding: 0;
}

body.edit-php.post-type-scorm_group .wrap > h1.wp-heading-inline {
  margin: 0 20px 8px 20px;
  padding: 20px 0 0 0;
  background: transparent;
  border: 0;
}

body.edit-php.post-type-scorm_group .subsubsub {
  margin: 0 20px;
  padding: 0 0 12px 0;
  background: transparent;
  border-bottom: 0;
}

body.edit-php.post-type-scorm_group .subsubsub a {
  color: #646970;
  text-decoration: none;
  font-weight: 500;
}

body.edit-php.post-type-scorm_group .subsubsub a.current {
  color: #2271b1;
}

body.edit-php.post-type-scorm_group .tablenav {
  margin: 10px 20px;
  background: #fff;
  border: 1px solid #e1e5e9;
  border-radius: 8px;
  padding: 12px;
}

body.edit-php.post-type-scorm_group .tablenav .actions select,
body.edit-php.post-type-scorm_group .tablenav .actions input[type="submit"],
body.edit-php.post-type-scorm_group .tablenav .actions .button {
  height: 36px;
  padding: 0 12px;
  border-radius: 6px;
  box-sizing: border-box;
}

body.edit-php.post-type-scorm_group .tablenav .actions .button,
body.edit-php.post-type-scorm_group .search-box .button {
  background: #f0f0f1;
  color: #2c3338;
  border-color: #dcdcde;
}

/* Improve native select spacing so arrow doesn't crowd text */
body.edit-php.post-type-scorm_group .tablenav .actions select {
  padding-right: 34px;
  background-color: #fff;
  max-width: 100%;
}

body.edit-php.post-type-scorm_group .tablenav .actions select:focus {
  border-color: #2271b1;
  box-shadow: 0 0 0 1px #2271b1;
  outline: none;
}

body.edit-php.post-type-scorm_group .tablenav .actions .button:hover,
body.edit-php.post-type-scorm_group .search-box .button:hover {
  background: #dcdcde;
  color: #2c3338;
}

/* Search box spacing on the right */
body.edit-php.post-type-scorm_group p.search-box {
  margin-right: 20px;
}
body.edit-php.post-type-scorm_group p.search-box .button {
  margin-left: 8px;
}

body.edit-php.post-type-scorm_group .search-box input[type="search"] {
  border-radius: 6px;
  padding: 7px 12px;
}

body.edit-php.post-type-scorm_group .wp-list-table {
  margin: 0 20px 30px 20px;
  width: calc(100% - 40px);
  box-sizing: border-box;
  border: 1px solid #e1e5e9;
  border-radius: 8px;
  background: #fff;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14px;
  overflow: hidden;
}

body.edit-php.post-type-scorm_group .wp-list-table thead th {
  background: #f8f9fa;
  color: #1d2327;
  font-weight: 600;
  padding: 15px 20px;
  border-bottom: 2px solid #e1e5e9;
}

/* Ensure checkbox header cell matches header background */
body.edit-php.post-type-scorm_group .wp-list-table thead th.check-column,
body.edit-php.post-type-scorm_group .wp-list-table thead td.check-column {
  background: #f8f9fa !important;
}

/* Smooth rounded corners on header row */
body.edit-php.post-type-scorm_group .wp-list-table thead th:first-child {
  border-top-left-radius: 8px;
}
body.edit-php.post-type-scorm_group .wp-list-table thead th:last-child {
  border-top-right-radius: 8px;
}

/* Match footer checkbox background and round corners */
body.edit-php.post-type-scorm_group .wp-list-table tfoot th.check-column,
body.edit-php.post-type-scorm_group .wp-list-table tfoot td.check-column {
  background: #f8f9fa !important;
}
body.edit-php.post-type-scorm_group .wp-list-table tfoot th:first-child {
  border-bottom-left-radius: 8px;
}
body.edit-php.post-type-scorm_group .wp-list-table tfoot th:last-child {
  border-bottom-right-radius: 8px;
}

body.edit-php.post-type-scorm_group .wp-list-table tbody td {
  padding: 16px 20px;
  border-bottom: 1px solid #f0f0f1;
  vertical-align: middle;
}

body.edit-php.post-type-scorm_group .wp-list-table tbody tr:hover {
  background: #f8f9fa;
}

body.edit-php.post-type-scorm_group .wp-list-table tfoot th {
  padding: 15px 20px;
  border-top: 1px solid #e1e5e9;
  background: #f8f9fa;
}

body.edit-php.post-type-scorm_group .wp-list-table a {
  color: #2271b1;
  text-decoration: none;
  font-weight: 500;
}

body.edit-php.post-type-scorm_group .wp-list-table a:hover {
  color: #135e96;
  text-decoration: underline;
}

/* Row actions */
body.edit-php.post-type-scorm_group .wp-list-table .row-actions {
  visibility: visible;
  position: static;
  padding-top: 4px;
}

body.edit-php.post-type-scorm_group .wp-list-table .row-actions span {
  display: inline-block;
  margin-right: 6px;
}

body.edit-php.post-type-scorm_group
  .wp-list-table
  .row-actions
  span
  + span::before {
  content: "";
}

body.edit-php.post-type-scorm_group .wp-list-table .row-actions a {
  display: inline-block;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: #2271b1;
  text-decoration: none;
  font-weight: 500;
}

body.edit-php.post-type-scorm_group .wp-list-table .row-actions a:hover {
  background: transparent;
  color: #135e96;
  text-decoration: underline;
}

body.edit-php.post-type-scorm_group .wp-list-table .row-actions .trash a {
  background: transparent;
  color: #d63638;
}

body.edit-php.post-type-scorm_group .wp-list-table .row-actions .trash a:hover {
  background: #f7dbdb;
  color: #b32d2e;
}

/* Notices spacing on this screen */
body.edit-php.post-type-scorm_group .wrap .notice {
  margin: 10px 20px;
  border-left: 4px solid #2271b1;
  background: #fff;
  border-radius: 0 4px 4px 0;
}

/* Responsive design */
@media (max-width: 768px) {
  .scorm-page-header {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px;
  }

  .scorm-stats-grid {
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
  }

  .scorm-tab-content {
    padding: 20px;
  }

  .scorm-nav-tabs {
    padding: 0 20px;
    overflow-x: auto;
  }

  .scorm-emails-page .notice,
  .scorm-analytics-page .notice,
  .scorm-theming-page .notice,
  .scorm-settings-page .notice {
    margin: 0 20px 20px 20px;
  }

  .scorm-theming-page .form-table th,
  .scorm-settings-page .form-table th {
    width: auto;
    display: block;
    padding: 10px 0 5px 0;
  }

  .scorm-theming-page .form-table td,
  .scorm-settings-page .form-table td {
    display: block;
    padding: 5px 0 15px 0;
  }

  .scorm-analytics-overview-grid {
    grid-template-columns: 1fr;
  }

  .scorm-analytics-charts {
    grid-template-columns: 1fr;
  }

  .scorm-analytics-progress-value {
    min-width: 40px;
  }

  .scorm-form-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .scorm-btn {
    justify-content: center;
  }

  .scorm-test-send-container {
    flex-direction: column;
    align-items: stretch;
  }

  .scorm-test-send-container input[type="email"] {
    width: 100%;
  }

  .scorm-radio-group {
    flex-direction: column;
    gap: 10px;
  }

  .scorm-setup-progress__label {
    font-size: 11px;
  }

  .scorm-setup-progress__circle {
    width: 30px;
    height: 30px;
    font-size: 12px;
  }

  .scorm-setup-progress__track {
    top: 14px;
  }

  .scorm-setup-addons__item {
    flex-wrap: wrap;
  }

  .scorm-setup-addons__action {
    width: 100%;
    align-items: flex-start;
    margin-left: 56px;
  }

  .scorm-demo-import-status__header {
    flex-direction: column;
    gap: 8px;
  }

  .scorm-demo-import-status__count {
    align-self: flex-start;
  }

  .scorm-demo-import-course {
    grid-template-columns: 28px minmax(0, 1fr);
    align-items: flex-start;
  }

  .scorm-demo-import-course__badge {
    grid-column: 2;
    justify-self: flex-start;
  }

  .scorm-setup-page .scorm-page-header {
    height: auto;
    padding: 12px 20px;
  }

  .scorm-setup-page .scorm-page-actions {
    width: auto;
  }

  .scorm-setup-header-detail {
    display: none;
  }

  .scorm-setup-page .notice {
    padding: 10px 20px;
  }
}

@media (max-width: 480px) {
  .scorm-page-title h1 {
    font-size: 22px;
  }

  .scorm-card-header {
    flex-direction: column;
  }

  .scorm-card-icon {
    width: 40px;
    height: 40px;
  }

  .scorm-modern-table {
    font-size: 13px;
  }

  .scorm-modern-table th,
  .scorm-modern-table td {
    padding: 12px;
  }

  .scorm-analytics-scorecard {
    grid-template-columns: 1fr;
  }

  .scorm-analytics-metric-grid {
    flex-direction: column;
  }
}

/* Beta badge — hidden site-wide per Sindre's request (2026-05-15).
   We keep the rule scaffolding below so any badge HTML still in templates
   simply doesn't render; no need to chase every <span> in the codebase. */
.scorm-beta-badge,
.scorm-beta-tooltip { display: none !important; }
.scorm-beta-badge--legacy {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    padding: 3px 7px;
    margin-left: 8px;
    vertical-align: middle;
    border-radius: 3px;
    background: #f0b849;
    color: #1d2327;
    cursor: help;
    position: relative;
}
.scorm-beta-tooltip {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 260px;
    max-width: 80vw;
    padding: 8px 12px;
    background: #1d2327;
    color: #fff;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.5;
    border-radius: 4px;
    white-space: normal;
    z-index: 99999;
    box-sizing: border-box;
    pointer-events: none;
}
.scorm-beta-tooltip::after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 14px;
    border: 6px solid transparent;
    border-bottom-color: #1d2327;
}
.scorm-beta-badge:hover .scorm-beta-tooltip {
    display: block;
}

/* New Customizer control: keep the legacy badge visibility policy elsewhere. */
.mklms-content-width-heading {
    position: relative;
}
.mklms-content-width-heading .scorm-beta-badge {
    display: inline-block !important;
    position: static;
    padding: 3px 7px;
    margin-left: 8px;
    border-radius: 3px;
    background: #e8effb;
    color: #2f6fb3;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    vertical-align: middle;
    cursor: help;
}
.mklms-content-width-heading .scorm-beta-tooltip {
    left: 0;
    width: 230px;
}
.mklms-content-width-heading .scorm-beta-badge:hover .scorm-beta-tooltip,
.mklms-content-width-heading .scorm-beta-badge:focus .scorm-beta-tooltip {
    display: block !important;
}

/* Course settings: «Mark as completed when the learner opens the webinar link»
   shows its badge (#744); the other badges on that screen keep the policy above.
   The tooltip opens upwards because the field is the last row of a card that
   clips its overflow. */
.scorm-beta-badge.mklms-webinar-complete-beta {
    display: inline-block !important;
    position: relative;
    padding: 3px 7px;
    border-radius: 3px;
    background: #e8effb;
    color: #2f6fb3;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    vertical-align: middle;
    cursor: help;
}
.mklms-webinar-complete-beta .scorm-beta-tooltip {
    top: auto;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
}
.mklms-webinar-complete-beta .scorm-beta-tooltip::after {
    top: 100%;
    bottom: auto;
    left: 50%;
    margin-left: -6px;
    border-bottom-color: transparent;
    border-top-color: #1d2327;
}
.mklms-webinar-complete-beta:hover .scorm-beta-tooltip,
.mklms-webinar-complete-beta:focus .scorm-beta-tooltip {
    display: block !important;
}

/* Certificate builder: the «Image source» heading of an image element shows
   its badge (#853); the screen's other badges keep the policy above. The
   tooltip spans the whole heading, because the properties panel is too
   narrow for it to hang from the badge. The heading is uppercase, so the
   badge and the tooltip reset the text transform. */
.mklms-certificate-image-source-heading {
    position: relative;
}
.mklms-certificate-image-source-heading .scorm-beta-badge {
    display: inline-block !important;
    position: static;
    padding: 3px 7px;
    margin-left: 8px;
    border-radius: 3px;
    background: #e8effb;
    color: #2f6fb3;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    vertical-align: middle;
    cursor: help;
}
.mklms-certificate-image-source-heading .scorm-beta-tooltip {
    left: 0;
    right: 0;
    width: auto;
    letter-spacing: normal;
    text-transform: none;
}
.mklms-certificate-image-source-heading .scorm-beta-badge:hover .scorm-beta-tooltip,
.mklms-certificate-image-source-heading .scorm-beta-badge:focus .scorm-beta-tooltip {
    display: block !important;
}

/* Webhooks admin */
.scorm-webhook-event-option {
    display: block;
    margin: 4px 0;
}

.scorm-webhook-inline-form {
    display: inline-block;
}

.scorm-webhook-actions {
    display: flex;
    gap: 8px;
    padding: 20px 25px;
    border-top: 1px solid #f0f0f1;
}

.scorm-webhook-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 5px;
    font-size: 13px;
    color: #646970;
}

.scorm-webhook-meta strong {
    color: #1d2327;
}

.scorm-webhook-endpoint-status {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 500;
}

.scorm-webhook-endpoint-status.enabled {
    background: #d1f0d9;
    color: #0a6b2a;
}

.scorm-webhook-endpoint-status.disabled {
    background: #f0f0f1;
    color: #646970;
}

/* ============================================================
 * Groups list (scorm_group) — neutral parent/sub wording.
 * Design direction A: flat list + tabs, Toppgruppe / Undergruppe.
 * Loaded on edit-scorm_group via mklms_enqueue_scorm_packages_list_assets().
 * ============================================================ */
.scorm-grp-intro {
    margin: 6px 0 2px;
    max-width: 760px;
    color: #646970;
    font-size: 13px;
}
.scorm-grp-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.5;
    letter-spacing: 0.02em;
}
.scorm-grp-pill .dashicons {
    font-size: 12px;
    width: 12px;
    height: 12px;
}
.scorm-grp-pill--parent {
    background: #fff0eb;
    color: #c44518;
}
.scorm-grp-pill--sub {
    background: #eef0f2;
    color: #50575e;
}
.scorm-grp-pill--active {
    background: #d1fae5;
    color: #065f46;
}
.scorm-grp-pill--full {
    background: #fed7aa;
    color: #9a3412;
}
.scorm-grp-pill--expiring {
    background: #fef3c7;
    color: #92400e;
}
.scorm-grp-pill--expired {
    background: #fee2e2;
    color: #991b1b;
}
.scorm-grp-dim {
    color: #a7aaad;
}

/* ===========================================================================
   Course / Group list-table layout (TSK-18817)
   Give the Title column a floor and keep the custom Course-type column from
   collapsing. min-width ONLY — no fixed percentages: the column set varies per
   site (WooCommerce adds a price column on shop sites, Polylang adds a
   translation column, etc.). Fixed percentages over-constrain the table and
   starve any un-pinned column down to near-zero width, which makes its header
   and content wrap one character per line (the "vertical text" bug). Plain
   min-width lets the browser auto-size every column to fit its own content, so
   extra columns like WooCommerce stay readable on every site.
   =========================================================================== */
body.edit-php.post-type-scorm_package .wp-list-table .column-title,
body.edit-php.post-type-scorm_group .wp-list-table .column-title {
    /* Give the title room. width (not the percentages of old) is set on the
       title column ONLY: WP renders these tables with table-layout:fixed, where
       a single sized column is honoured and every other column simply splits the
       remaining width equally — so no column is ever starved to vertical text,
       whatever the per-site column set. min-width is the auto-layout fallback. */
    width: 24%;
    min-width: 220px;
}

/* Custom Course-type column (key "scorm_course_type" → "column-scorm_course_type",
   not the auto "column-taxonomy-*"): floor it so the term name never collapses. */
body.edit-php.post-type-scorm_package .wp-list-table .column-scorm_course_type {
    min-width: 110px;
}

/* Collapsible courses/modules cell (native <details>, no JS). */
.scorm-courses-cell summary {
    cursor: pointer;
    list-style: none;
}
.scorm-courses-cell summary::-webkit-details-marker {
    display: none;
}
.scorm-courses-cell summary::before {
    content: "\25B8"; /* right-pointing triangle */
    display: inline-block;
    width: 12px;
    color: #646970;
}
.scorm-courses-cell[open] summary::before {
    content: "\25BE"; /* down-pointing triangle */
}
.scorm-courses-cell-list {
    margin: 6px 0 0;
    padding-left: 26px;
    color: #50575e;
    font-size: 12px;
}
.scorm-courses-cell-list li {
    margin: 2px 0;
}

/* ==========================================================================
   MentorKit Users — learner archive + learner profile (?page=mklms-users)
   --------------------------------------------------------------------------
   Brings the two Users views into the LMS Pro visual language: 12px softly
   shadowed container, 8px controls with a blue focus ring, micro-caps table
   headers, pill counters and a contextual bulk-action bar.

   Everything is scoped to .scorm-users-page on purpose. The table
   (.scorm-modern-table), status pill (.scorm-analytics-status) and progress
   bar are shared with nine other admin screens, so the restyle must not leak
   out of this page. Tokens are declared on the page root rather than :root
   for the same reason.
   ========================================================================== */

.scorm-users-page {
    --su-ink: #1d2327;
    --su-ink-2: #2c3338;
    --su-muted: #646970;
    --su-muted-2: #8c8f94;
    --su-line: #dcdcde;
    --su-line-soft: #e1e5e9;
    --su-hair: #f0f0f1;
    --su-bg-soft: #f8f9fa;
    --su-row-hover: #fafbfb;
    --su-blue: #2f6fb3;
    --su-blue-deep: #255c97;
    --su-orange: #fc5623;
    --su-orange-soft: #fff0eb;
    --su-orange-deep: #c44518;
    --su-orange-hair: #ffd7c7;
    --su-focus: 0 0 0 3px rgba(47, 111, 179, 0.15);
}

/* --- List container ----------------------------------------------------- */

.scorm-users-page .scorm-users-list {
    background: #fff;
    border: 1px solid var(--su-line-soft);
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 6px 18px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    width: 100%;
}

/* --- Toolbars (filter / bulk / footer bands) ---------------------------- */

.scorm-users-page .scorm-users-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 13px 16px;
    background: #fff;
    border-bottom: 1px solid var(--su-hair);
}

.scorm-users-page .scorm-users-toolbar--bulk {
    background: var(--su-bg-soft);
}

.scorm-users-page .scorm-users-toolbar--bulk.is-active {
    background: var(--su-orange-soft);
    border-bottom-color: var(--su-orange-hair);
}

.scorm-users-page .scorm-users-toolbar--foot {
    border-bottom: 0;
    border-top: 1px solid var(--su-hair);
}

.scorm-users-page .scorm-users-spacer {
    flex: 1;
}

/* --- Search field ------------------------------------------------------- */

.scorm-users-page .scorm-users-field {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.scorm-users-page .scorm-users-field .dashicons {
    position: absolute;
    left: 10px;
    font-size: 16px;
    width: 16px;
    height: 16px;
    line-height: 16px;
    color: var(--su-muted-2);
    pointer-events: none;
}

.scorm-users-page .scorm-users-field input[type="search"] {
    appearance: none;
    -webkit-appearance: none;
    height: 34px;
    margin: 0;
    padding: 0 12px 0 32px;
    min-width: 250px;
    border: 1px solid var(--su-line);
    border-radius: 8px;
    background: #fff;
    font-size: 13px;
    color: var(--su-ink);
    box-shadow: none;
}

.scorm-users-page .scorm-users-field input[type="search"]::placeholder {
    color: var(--su-muted-2);
}

.scorm-users-page .scorm-users-field input[type="search"]:focus {
    outline: none;
    border-color: var(--su-blue);
    box-shadow: var(--su-focus);
}

/* --- Selects ------------------------------------------------------------ */

.scorm-users-page .scorm-users-select {
    appearance: none;
    -webkit-appearance: none;
    height: 34px;
    margin: 0;
    padding: 0 32px 0 12px;
    min-width: 170px;
    max-width: 100%;
    border: 1px solid var(--su-line);
    border-radius: 8px;
    font-size: 13px;
    line-height: 32px;
    color: var(--su-ink);
    cursor: pointer;
    box-shadow: none;
    background: #fff url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%23646970' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 11px center;
}

.scorm-users-page .scorm-users-select:hover {
    border-color: var(--su-muted-2);
}

.scorm-users-page .scorm-users-select:focus {
    outline: none;
    border-color: var(--su-blue);
    box-shadow: var(--su-focus);
}

/* --- Counters ----------------------------------------------------------- */

.scorm-users-page .scorm-users-count {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 26px;
    padding: 0 11px;
    border-radius: 999px;
    background: var(--su-bg-soft);
    border: 1px solid var(--su-line-soft);
    font-size: 12px;
    font-weight: 500;
    color: var(--su-muted);
}

.scorm-users-page .scorm-users-hint {
    font-size: 13px;
    color: var(--su-muted);
}

.scorm-users-page .scorm-users-selected {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    font-weight: 600;
    color: var(--su-orange-deep);
}

.scorm-users-page .scorm-users-selected-n {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--su-orange);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
}

.scorm-users-page .scorm-users-clear {
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    font-size: 12px;
    color: var(--su-muted);
    cursor: pointer;
    text-decoration: underline;
}

.scorm-users-page .scorm-users-clear:hover {
    color: var(--su-ink);
}

.scorm-users-page .scorm-users-footnote {
    font-size: 12px;
    color: var(--su-muted);
}

/* --- Table chrome inside the list container ----------------------------- */

.scorm-users-page .scorm-users-list .scorm-modern-table thead th {
    background: #fff;
    border-top: 0;
    border-bottom: 1px solid var(--su-line-soft);
    color: var(--su-muted);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 11px 14px;
}

.scorm-users-page .scorm-users-list .scorm-modern-table td {
    padding: 13px 14px;
    border-bottom: 1px solid var(--su-line-soft);
    vertical-align: middle;
    color: var(--su-ink-2);
}

.scorm-users-page .scorm-users-list .scorm-modern-table tbody tr:hover td {
    background: var(--su-row-hover);
}

/* --- Borderless in-card table (learner profile) ------------------------- */

.scorm-users-page .scorm-users-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.scorm-users-page .scorm-users-table th {
    text-align: left;
    padding: 0 14px 10px 0;
    color: var(--su-muted);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border-bottom: 1px solid var(--su-line-soft);
}

.scorm-users-page .scorm-users-table td {
    padding: 13px 14px 13px 0;
    border-bottom: 1px solid var(--su-hair);
    color: var(--su-ink-2);
    vertical-align: middle;
}

.scorm-users-page .scorm-users-table tbody tr:last-child td {
    border-bottom: 0;
}

.scorm-users-page .scorm-users-table tbody tr:hover td {
    background: var(--su-row-hover);
}

.scorm-users-page .scorm-users-table th:last-child,
.scorm-users-page .scorm-users-table td:last-child {
    padding-right: 0;
}

/* --- Meta chips (learner profile identity line) ------------------------- */

.scorm-users-page .scorm-users-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 4px;
}

.scorm-users-page .scorm-users-meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 28px;
    padding: 0 12px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--su-line-soft);
    font-size: 12px;
    color: var(--su-ink-2);
}

.scorm-users-page .scorm-users-meta-chip b {
    color: var(--su-muted);
    font-weight: 600;
    font-size: 11px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* --- Buttons ------------------------------------------------------------ */

.scorm-users-page .button {
    border-radius: 8px;
}

.scorm-users-page .button:not(.button-primary) {
    background: #fff;
    /* Full border, not just border-color: the pro treatment must not depend on
       which core stylesheet happens to supply width and style. */
    border: 1px solid var(--su-line);
    color: var(--su-ink-2);
    font-weight: 500;
    text-decoration: none;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.03);
}

.scorm-users-page .button:not(.button-primary):hover,
.scorm-users-page .button:not(.button-primary):focus {
    background: var(--su-bg-soft);
    border-color: var(--su-muted-2);
    color: var(--su-ink);
}

.scorm-users-page .button:focus {
    box-shadow: var(--su-focus);
}

.scorm-users-page .scorm-users-list td .button-small {
    padding: 5px 12px;
    height: auto;
    line-height: 1.5;
}

/* --- Scoped status pill + progress bar ---------------------------------- */

.scorm-users-page .scorm-analytics-status {
    padding: 3px 10px;
    font-size: 11px;
    letter-spacing: 0.02em;
    text-transform: none;
}

.scorm-users-page .scorm-analytics-status--success {
    background: #e7f6ec;
    color: #22863a;
}

.scorm-analytics-status--info {
    background: #e7f3ff;
    color: #2271b1;
}

.scorm-users-page .scorm-analytics-progress {
    gap: 8px;
}

.scorm-users-page .scorm-analytics-progress-bar {
    flex: 0 0 80px;
    width: 80px;
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
}

.scorm-users-page .scorm-analytics-progress-bar-fill {
    background: var(--su-blue);
}

.scorm-users-page .scorm-analytics-progress-bar-fill.is-complete {
    background: #2f8f4e;
}

.scorm-users-page .scorm-analytics-progress-value {
    font-family: Consolas, Monaco, "Andale Mono", "Ubuntu Mono", monospace;
    font-size: 12px;
    font-weight: 400;
    color: var(--su-muted);
    min-width: 0;
    text-align: left;
}

/* The filter form is a flex child of the toolbar so the count pill can sit
   on the same row without nesting forms. */
.scorm-users-page .scorm-users-filters {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 0;
}

/* The shared table container carries its own border + 8px radius; inside the
   new 12px list container that would read as a double frame. */
.scorm-users-page .scorm-users-list .scorm-table-container {
    border: 0;
    border-radius: 0;
}

.scorm-users-page .scorm-users-list .scorm-modern-table {
    font-size: 13px;
}

.scorm-users-page .scorm-users-list .scorm-modern-table thead {
    background: #fff;
}

/* Core floats .tablenav-pages; inside the flex footer band it must not. */
.scorm-users-page .scorm-users-toolbar--foot .tablenav-pages {
    float: none;
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

/* Completion rate reads as brand, not as a warning. */
.scorm-users-page .scorm-users-scorecard--brand .scorm-analytics-scorecard-value {
    color: #fc5623;
}

/* The back button pairs a dashicon with its label. */
.scorm-users-page .scorm-user-profile-back .dashicons,
.scorm-users-page .button .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    line-height: 1;
    vertical-align: text-bottom;
}

/* An explicit display on the counter would otherwise beat the UA rule for the
   hidden attribute, leaving "0 selected" visible with nothing selected. */
.scorm-users-page .scorm-users-selected[hidden],
.scorm-users-page .scorm-users-hint[hidden] {
    display: none;
}

/* Norwegian labels are longer than the English ones; 250px clips the search
   placeholder in nb_NO. */
.scorm-users-page .scorm-users-field input[type="search"] {
    min-width: 280px;
}

/* Toolbar submit buttons sit on the same 34px rhythm as the search and selects. */
.scorm-users-page .scorm-users-toolbar .button {
    height: 34px;
    padding: 0 14px;
    line-height: 32px;
}

/* Row-level removal: the form is only a nonce carrier, so it must not add
   block spacing inside the table cell. */
.scorm-users-page .scorm-users-remove {
    margin: 0;
}

/* Same for the attempt reset, which shares the cell with the removal form. */
.scorm-users-page .scorm-users-reset {
    margin: 0;
}

/* Destructive, but secondary — it reads as a quiet button until hovered. */
.scorm-users-page .button.scorm-users-remove-btn:hover,
.scorm-users-page .button.scorm-users-remove-btn:focus,
.scorm-users-page .button.scorm-users-reset-btn:hover,
.scorm-users-page .button.scorm-users-reset-btn:focus {
    border-color: #d63638;
    color: #d63638;
}

/* --- Singular user profile (TSK-19582) ---------------------------------- */

.scorm-users-page .mklms-profile-card {
    overflow: hidden;
}

/* Identity header: avatar, name + meta line, and the three figures. */

.scorm-users-page .mklms-profile-head {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    padding: 22px 26px;
    border-bottom: 1px solid var(--su-hair);
}

.scorm-users-page .mklms-profile-avatar {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--su-orange-soft);
    color: var(--su-orange-deep);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
    font-weight: 700;
}

.scorm-users-page .mklms-profile-ident {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
}

.scorm-users-page .mklms-profile-nameline {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.scorm-users-page .mklms-profile-nameline h2 {
    margin: 0;
    font-size: 21px;
    font-weight: 600;
    color: var(--su-ink);
    letter-spacing: -0.01em;
}

.scorm-users-page .mklms-profile-role-badge {
    display: inline-flex;
    align-items: center;
    height: 22px;
    padding: 0 10px;
    border-radius: 999px;
    background: var(--su-hair);
    color: var(--su-ink-2);
    font-size: 11px;
    font-weight: 600;
}

.scorm-users-page .mklms-profile-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    font-size: 13px;
    color: var(--su-muted);
}

.scorm-users-page .mklms-profile-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #c3c4c7;
}

.scorm-users-page .mklms-profile-stats {
    display: flex;
    gap: 26px;
    flex-wrap: wrap;
    margin-left: auto;
    padding-right: 8px;
}

.scorm-users-page .mklms-profile-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-align: right;
}

.scorm-users-page .mklms-profile-stat-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--su-muted-2);
}

.scorm-users-page .mklms-profile-stat-value {
    font-size: 22px;
    font-weight: 700;
    color: var(--su-ink);
}

.scorm-users-page .mklms-profile-stat-value--success {
    color: #22863a;
}

.scorm-users-page .mklms-profile-stat-value--brand {
    color: var(--su-orange);
}

/* Body: account form as the work surface, occasional actions in a rail. */

.scorm-users-page .mklms-profile-body {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
}

.scorm-users-page .mklms-profile-main {
    flex: 1 1 460px;
    min-width: 300px;
    padding: 24px 26px 0;
    display: flex;
    flex-direction: column;
}

.scorm-users-page .mklms-profile-rail {
    flex: 1 1 320px;
    min-width: 280px;
    padding: 24px 26px 26px;
    display: flex;
    flex-direction: column;
    gap: 22px;
    background: #fcfcfd;
    box-shadow: inset 0 1px 0 var(--su-hair);
}

/* With no account form there is no second column to sit beside, so the rail
   stops pretending to be one. */
.scorm-users-page .mklms-profile-body--rail-only .mklms-profile-rail {
    background: none;
    box-shadow: none;
}

.scorm-users-page .mklms-profile-section-head {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 18px;
}

.scorm-users-page .mklms-profile-section-head h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--su-ink);
}

.scorm-users-page .mklms-profile-section-head p {
    margin: 0;
    font-size: 13px;
    color: var(--su-muted);
    max-width: 62ch;
    text-wrap: pretty;
}

/* Account fields */

.scorm-users-page .mklms-account-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px 18px;
}

.scorm-users-page .mklms-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.scorm-users-page .mklms-field-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--su-ink-2);
}

.scorm-users-page .mklms-field-help {
    font-size: 12px;
    color: var(--su-muted-2);
    text-wrap: pretty;
}

/* Text boxes only. Checkboxes and radios keep core's own look: core draws the tick in
   white on a filled box, so a white background here would hide it. :where() keeps the
   specificity unchanged. */
.scorm-users-page .mklms-field input:where(:not([type="checkbox"], [type="radio"])) {
    height: 36px;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0 11px;
    border: 1px solid var(--su-line);
    border-radius: 8px;
    background: #fff;
    font-size: 13px;
    color: var(--su-ink);
    box-shadow: none;
}

/* Same box as the inputs. background-color, not background, so core's arrow stays. */
.scorm-users-page .mklms-field select {
    height: 36px;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0 24px 0 11px;
    border: 1px solid var(--su-line);
    border-radius: 8px;
    background-color: #fff;
    font-size: 13px;
    color: var(--su-ink);
    box-shadow: none;
}

.scorm-users-page .mklms-field input:where(:not([type="checkbox"], [type="radio"])):focus,
.scorm-users-page .mklms-field select:focus {
    outline: none;
    border-color: var(--su-blue);
    box-shadow: var(--su-focus);
}

.scorm-users-page .mklms-field input:where(:not([type="checkbox"], [type="radio"])):disabled {
    border-color: var(--su-line-soft);
    background: var(--su-bg-soft);
    color: var(--su-muted-2);
}

/* A field an extension adds below the grid keeps the grid's row gap. */
.scorm-users-page .mklms-account-grid + .mklms-field {
    margin-top: 16px;
}

/* Save bar — follows the form down a long page. */

.scorm-users-page .mklms-save-bar {
    position: sticky;
    bottom: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: auto;
    padding: 14px 0;
    border-top: 1px solid var(--su-hair);
    background: #fff;
}

/* A class-level `display` outranks the [hidden] UA rule, so the dirty flag
   would sit there from page load claiming unsaved changes. */
.scorm-users-page .mklms-save-flag[hidden] {
    display: none;
}

.scorm-users-page .mklms-save-flag {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin: 0;
    font-size: 12px;
    font-weight: 600;
}

.scorm-users-page .mklms-save-flag--dirty {
    color: var(--su-orange-deep);
}

.scorm-users-page .mklms-save-flag--saved {
    color: #22863a;
}

.scorm-users-page .mklms-save-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--su-orange);
}

/* Buttons */

.scorm-users-page .mklms-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    padding: 0 14px;
    border: 1px solid var(--su-line);
    border-radius: 8px;
    background: #fff;
    color: var(--su-ink-2);
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
    cursor: pointer;
}

.scorm-users-page .mklms-btn:hover,
.scorm-users-page .mklms-btn:focus {
    background: var(--su-bg-soft);
    border-color: var(--su-muted-2);
    color: var(--su-ink);
}

.scorm-users-page .mklms-btn:focus-visible {
    outline: none;
    box-shadow: var(--su-focus);
}

.scorm-users-page .mklms-btn--primary {
    padding: 0 16px;
    border: 0;
    background: var(--su-orange);
    color: #fff;
    font-weight: 600;
}

.scorm-users-page .mklms-btn--primary:hover,
.scorm-users-page .mklms-btn--primary:focus {
    background: var(--su-orange-deep);
    border: 0;
    color: #fff;
}

/* Destructive action (#803): red outline, filled on hover. */
.scorm-users-page .mklms-btn--danger {
    border-color: #d63638;
    color: #b32d2e;
    text-decoration: none;
}

.scorm-users-page .mklms-btn--danger:hover,
.scorm-users-page .mklms-btn--danger:focus {
    background: #d63638;
    border-color: #b32d2e;
    color: #fff;
}

/* Delete confirmation (#803) */

.scorm-users-page .mklms-delete-card {
    max-width: 760px;
    padding: 24px 28px;
}

.scorm-users-page .mklms-delete-back {
    margin: 0 0 12px;
    font-size: 13px;
}

.scorm-users-page .mklms-delete-back a {
    color: var(--su-blue);
    text-decoration: none;
}

.scorm-users-page .mklms-delete-card h2 {
    margin: 0;
    font-size: 20px;
    color: var(--su-ink);
}

.scorm-users-page .mklms-delete-email {
    margin: 4px 0 18px;
    color: var(--su-muted);
}

.scorm-users-page .mklms-delete-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.scorm-users-page .mklms-delete-columns h3 {
    margin: 0 0 8px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--su-muted);
}

.scorm-users-page .mklms-delete-columns ul,
.scorm-users-page .mklms-delete-blockers ul {
    margin: 0;
    padding-left: 18px;
    list-style: disc;
}

.scorm-users-page .mklms-delete-columns li,
.scorm-users-page .mklms-delete-blockers li {
    margin: 0 0 4px;
    font-size: 13px;
    color: var(--su-ink-2);
}

.scorm-users-page .mklms-delete-blockers {
    padding: 12px 14px;
    border: 1px solid #d63638;
    border-left-width: 4px;
    border-radius: 8px;
    background: #fcf0f1;
}

.scorm-users-page .mklms-delete-blockers p {
    margin: 0 0 6px;
}

.scorm-users-page .mklms-delete-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.scorm-users-page .mklms-delete-form a.mklms-btn {
    text-decoration: none;
}

.scorm-users-page .mklms-delete-form p {
    flex-basis: 100%;
    margin: 0;
    font-size: 13px;
    color: var(--su-muted);
}

/* Rail blocks */

.scorm-users-page .mklms-rail-block {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.scorm-users-page .mklms-rail-block + .mklms-rail-block {
    padding-top: 22px;
    border-top: 1px solid var(--su-hair);
}

.scorm-users-page .mklms-rail-head {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.scorm-users-page .mklms-rail-head h3 {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--su-muted);
}

.scorm-users-page .mklms-rail-head p {
    margin: 0;
    font-size: 13px;
    color: var(--su-muted);
    text-wrap: pretty;
}

.scorm-users-page .mklms-role-row {
    display: flex;
    gap: 8px;
}

.scorm-users-page .mklms-role-row select {
    flex: 1;
    min-width: 0;
    height: 36px;
    margin: 0;
    padding: 0 32px 0 11px;
    border: 1px solid var(--su-line);
    border-radius: 8px;
    background: #fff url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%23646970' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 11px center;
    -webkit-appearance: none;
    appearance: none;
    font-size: 13px;
    color: var(--su-ink);
    cursor: pointer;
    box-shadow: none;
}

.scorm-users-page .mklms-role-row select:focus {
    outline: none;
    border-color: var(--su-blue);
    box-shadow: var(--su-focus);
}

.scorm-users-page .mklms-role-note {
    margin: 10px 0 0;
    padding: 11px 13px;
    border: 1px solid var(--su-line-soft);
    border-radius: 8px;
    background: #fff;
    font-size: 12px;
    line-height: 1.5;
    color: var(--su-muted);
    text-wrap: pretty;
}

.scorm-users-page .mklms-rail-fineprint {
    margin: 8px 0 0;
    font-size: 12px;
    line-height: 1.5;
    color: var(--su-muted-2);
    text-wrap: pretty;
}

.scorm-users-page .mklms-rail-links {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.scorm-users-page .mklms-rail-links a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--su-line-soft);
    border-radius: 8px;
    background: #fff;
    font-size: 13px;
    color: var(--su-ink-2);
    text-decoration: none;
}

.scorm-users-page .mklms-rail-links a:hover,
.scorm-users-page .mklms-rail-links a:focus {
    border-color: var(--su-muted-2);
    color: var(--su-ink);
}

.scorm-users-page .mklms-rail-links a span {
    color: var(--su-muted-2);
}

/* Enrolment tables scroll themselves instead of the page. */

.scorm-users-page .mklms-table-scroll {
    overflow-x: auto;
}

.scorm-users-page .mklms-table-scroll .scorm-users-table {
    min-width: 600px;
}

.scorm-users-page .mklms-card-count {
    font-size: 12px;
    font-weight: 400;
    color: var(--su-muted-2);
}
