/* ══════════════════════════════════════════════════════════════════════════════
   components.css — Shared UI component styles
   Extracted from JS-injected <style> blocks (dashboard/public.js,
   implementations/public.js) into a proper CSS file.
   Loaded globally via base_generic.html.
   ══════════════════════════════════════════════════════════════════════════════ */

/* ── App Palette Variables ── */
:root {
  --app-good: var(--status-success, #4CE8D4);
  --app-warn: var(--status-warning, #F59E0B);
  --app-bad:  var(--status-danger, #EA1F54);
}

/* ══════════════════════════════════════════════════════════════
   State Badges
   (was: state-badge-styles in dashboard/public.js)
   ══════════════════════════════════════════════════════════════ */
.state-badge {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .75rem;
  font-weight: 600;
  line-height: 1;
  padding: .25rem .6rem;
  border-radius: 999px;
  border: 1px solid transparent;
}
.state-badge .spinner-border { width: .85rem; height: .85rem; }
.state-ready {
  background: var(--status-success-bg, #d1fae5);
  color: var(--status-success-text, #065f46);
  border-color: var(--accent-green, #10b981);
}
.state-in_progress {
  background: var(--status-warning-bg, #fef3c7);
  color: var(--status-warning-text, #92400e);
  border-color: var(--status-warning, #f59e0b);
}
.state-not_started {
  background: var(--status-neutral-bg, #dcdee1);
  color: var(--status-neutral-text, #374151);
  border-color: var(--status-neutral, #9ca3af);
}
.state-blocked, .state-not_ready {
  background: var(--status-danger-bg, #fee2e2);
  color: var(--status-danger-text, #991b1b);
  border-color: var(--accent-red-light, #ef4444);
}
.state-expired {
  background: var(--status-danger-bg, #fee2e2);
  color: var(--status-danger-text, #991b1b);
  border-color: var(--accent-red-light, #ef4444);
}
.state-expiring {
  background: var(--status-info-bg, #dbeafe);
  color: var(--status-info-text, #1e40af);
  border-color: var(--status-info, #3b82f6);
}

/* ══════════════════════════════════════════════════════════════
   Priority Badges
   (was: priority-badge-styles in dashboard/public.js)
   ══════════════════════════════════════════════════════════════ */
.priority-badge {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .75rem;
  font-weight: 600;
  line-height: 1;
  padding: .25rem .6rem;
  border-radius: 999px;
  border: 1px solid transparent;
}
.priority-high {
  background: var(--status-danger-bg, #fee2e2);
  color: var(--status-danger-text, #991b1b);
  border-color: var(--accent-red-light, #ef4444);
}
.priority-medium {
  background: var(--status-warning-bg, #fef3c7);
  color: var(--status-warning-text, #92400e);
  border-color: var(--status-warning, #f59e0b);
}
.priority-low {
  background: var(--status-info-bg, #e0f2fe);
  color: var(--status-info-text, #1d4ed8);
  border-color: var(--status-info, #3b82f6);
}

/* ══════════════════════════════════════════════════════════════
   Executable Badges
   (was: executable-badge-styles in dashboard/public.js)
   ══════════════════════════════════════════════════════════════ */
.exec-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  font-size: .75rem;
  font-weight: 600;
  line-height: 1;
  padding: .25rem .7rem;
  border-radius: 999px;
  border: 1px solid transparent;
}
.exec-yes {
  background: var(--status-success-bg, #d1fae5);
  color: var(--status-success-text, #065f46);
  border-color: var(--accent-green, #10b981);
}
.exec-no {
  background: var(--status-danger-bg, #fee2e2);
  color: var(--status-danger-text, #991b1b);
  border-color: var(--accent-red-light, #ef4444);
}

/* ══════════════════════════════════════════════════════════════
   Task Dependency Indicators
   (was: task-dep-indicator-styles in dashboard/public.js)
   ══════════════════════════════════════════════════════════════ */
.task-title-cell {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.task-dep-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.15rem 0.4rem;
  border-radius: 999px;
  cursor: help;
}
.task-dep-indicator i {
  font-size: 0.65rem;
}
.task-dep-indicator.dep-ok {
  background: rgba(16, 185, 129, 0.12);
  color: var(--accent-green, #10b981);
}
.task-dep-indicator.dep-blocked {
  background: rgba(239, 68, 68, 0.12);
  color: var(--accent-red-light, #ef4444);
}
.task-dep-indicator .dep-count {
  font-size: 0.65rem;
}

/* ══════════════════════════════════════════════════════════════
   Task Details Modal
   (was: task-details-modal-styles in dashboard/public.js)
   ══════════════════════════════════════════════════════════════ */
#task_details_modal .modal-content {
  border: 0;
  border-radius: 1rem;
  box-shadow: 0 10px 30px rgba(15,23,42,.18);
}
#task_details_modal .modal-footer {
  border-top: 0;
  padding-top: .75rem;
  justify-content: center;
}
#task_details_modal .task-main-header {
  border-bottom: 1px solid var(--border-subtle, #e5e7eb);
  padding-bottom: .75rem;
  margin-bottom: .75rem;
}
#task_details_modal .task-main-title {
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}
#task_details_modal .task-desc {
  font-size: .9rem;
}
#task_details_modal .task-section-title {
  font-size: .8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--bs-primary, #2563eb);
}
#task_details_modal .task-meta-row {
  font-size: .85rem;
}
#task_details_modal .task-meta-item {
  display: flex;
  align-items: baseline;
  gap: .35rem;
  margin-right: 1.5rem;
}
#task_details_modal .task-meta-label {
  font-weight: 600;
}
#task_details_modal .task-dependencies {
  font-size: .85rem;
  margin-top: .25rem;
}
#task_details_modal .task-dependencies-list {
  margin: .25rem 0 0;
  padding-left: 1.5rem;
  list-style: none;
  counter-reset: task-deps-counter;
}
#task_details_modal .task-dependencies-list li {
  position: relative;
  margin-bottom: .15rem;
  padding-left: 1.2rem;
}
#task_details_modal .task-dependencies-list li::before {
  counter-increment: task-deps-counter;
  content: counter(task-deps-counter, upper-alpha) '.';
  position: absolute;
  left: 0;
  top: 0;
  font-weight: 600;
}
#task_details_modal .meta-cards-row {
  margin-top: .75rem;
}
#task_details_modal .meta-card {
  border-radius: .75rem;
  border: 1px solid var(--border-subtle, #e5e7eb);
  box-shadow: 0 1px 2px rgba(15,23,42,.06);
}
#task_details_modal .meta-card-title {
  font-size: .8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-muted, #6b7280);
}
#task_details_modal .task-requests,
#task_details_modal .task-linked-docs-count {
  font-size: .85rem;
}
#task_details_modal .task-questions-list li,
#task_details_modal .task-documents-list li {
  font-size: .9rem;
}
#task_details_modal .task-questions-list ul,
#task_details_modal .task-documents-list ul {
  padding-left: 1.1rem;
  margin-bottom: 0;
}
#task_details_modal .task-howto-body {
  font-size: .85rem;
}

/* ══════════════════════════════════════════════════════════════
   Table Evaluation Modal - Responsive Layout
   (was: table-eval-modal-styles in dashboard/public.js &
   implementations/public.js)
   ══════════════════════════════════════════════════════════════ */
#table_evaluation_modal .table-eval-dialog {
  max-width: min(1200px, 95vw);
  width: 95vw;
  margin: 1.75rem auto;
}
@media (min-width: 1400px) {
  #table_evaluation_modal .table-eval-dialog {
    max-width: 1400px;
  }
}
@media (max-width: 768px) {
  #table_evaluation_modal .table-eval-dialog {
    max-width: 100vw;
    width: 100vw;
    margin: 0;
  }
  #table_evaluation_modal .modal-content {
    border-radius: 0;
    min-height: 100vh;
  }
}
#table_evaluation_modal .modal-content {
  border-radius: 0.75rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}
#table_evaluation_modal .modal-header {
  border-bottom: 1px solid var(--bs-border-color);
  padding: 1rem 1.25rem;
  justify-content: flex-start;
}
#table_evaluation_modal .modal-header .modal-header-title {
  flex: 1;
}
#table_evaluation_modal .modal-body {
  max-height: calc(100vh - 10rem);
  overflow-y: auto;
  overflow-x: auto;
  padding: 1.25rem;
}
#table_evaluation_modal .modal-footer {
  border-top: 1px solid var(--bs-border-color);
  padding: 1rem 1.25rem;
}

/* ── Table Container - Horizontal Scroll ── */
#table_evaluation_modal .table-responsive {
  overflow-x: auto;
  overflow-y: visible;
  margin: 0 -0.25rem;
  padding: 0 0.25rem;
}
#table_evaluation_modal .table-scroll-container {
  position: relative;
}
#table_evaluation_modal .table-scroll-container::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 30px;
  background: linear-gradient(to right, transparent, var(--bs-body-bg));
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}
#table_evaluation_modal .table-scroll-container.has-scroll::after {
  opacity: 1;
}

/* ── Table Layout ── */
#table_evaluation_modal table {
  table-layout: auto;
  width: 100%;
  min-width: 600px;
  border-collapse: separate;
  border-spacing: 0;
  margin-bottom: 2rem;
}
#table_evaluation_modal th,
#table_evaluation_modal td {
  white-space: normal;
  word-break: break-word;
  font-size: 0.85rem;
  vertical-align: top;
  text-align: left;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--bs-border-color);
}
#table_evaluation_modal th {
  background: var(--bs-tertiary-bg);
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--bs-secondary-color);
  text-transform: uppercase;
  letter-spacing: 0.025em;
  position: sticky;
  top: 0;
  z-index: 10;
}

/* ── Sticky First Column ── */
#table_evaluation_modal th:first-child,
#table_evaluation_modal td:first-child {
  position: sticky;
  left: 0;
  z-index: 5;
  background: var(--bs-body-bg);
  min-width: 150px;
  max-width: 200px;
  border-right: 2px solid var(--bs-border-color);
}
#table_evaluation_modal th:first-child {
  z-index: 15;
  background: var(--bs-tertiary-bg);
}
#table_evaluation_modal tbody tr:hover td {
  background: var(--bs-tertiary-bg);
}
#table_evaluation_modal tbody tr:hover td:first-child {
  background: var(--bs-secondary-bg);
}

/* ── Column Width Hints ── */
#table_evaluation_modal td {
  min-width: 140px;
}
#table_evaluation_modal td:has(textarea) {
  min-width: 200px;
}

/* ── Form Inputs ── */
#table_evaluation_modal .table-cell-input,
#table_evaluation_modal .table-cell-input-other {
  width: 100%;
  max-width: 100%;
  font-size: 0.8rem;
}
#table_evaluation_modal select.table-cell-input {
  display: block;
  background-color: var(--bs-body-bg);
  color: var(--bs-body-color);
  opacity: 1;
  cursor: pointer;
  min-width: 120px;
}
#table_evaluation_modal select.table-cell-input:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

/* ── Custom Searchable Select ── */
#table_evaluation_modal .table-custom-select {
  position: relative;
  width: 100%;
}
#table_evaluation_modal .table-custom-select-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.35rem 0.65rem;
  font-size: 0.8rem;
  background: var(--bs-body-bg);
  border: 1px solid var(--bs-border-color);
  border-radius: 0.375rem;
  cursor: pointer;
  text-align: left;
  min-height: 2rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
#table_evaluation_modal .table-custom-select-toggle:hover {
  border-color: var(--bs-primary);
}
#table_evaluation_modal .table-custom-select-toggle:focus {
  border-color: var(--bs-primary);
  box-shadow: 0 0 0 0.2rem rgba(var(--bs-primary-rgb), 0.25);
  outline: none;
}
#table_evaluation_modal .table-custom-select-toggle .select-label {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--bs-body-color);
  background-color: transparent;
}
#table_evaluation_modal .table-custom-select-toggle .select-label.placeholder {
  color: var(--bs-secondary-color);
  background-color: transparent;
}
#table_evaluation_modal .table-custom-select-toggle .select-arrow {
  margin-left: 0.5rem;
  font-size: 0.65rem;
  color: var(--bs-secondary-color);
  transition: transform 0.2s ease;
}
#table_evaluation_modal .table-custom-select.open .select-arrow {
  transform: rotate(180deg);
}
#table_evaluation_modal .table-custom-select-menu {
  position: fixed;
  z-index: 1070;
  display: none;
  background: var(--bs-body-bg);
  border: 1px solid var(--bs-border-color);
  border-radius: 0.5rem;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15);
  min-width: 250px;
  max-width: 450px;
}
#table_evaluation_modal .table-custom-select.open .table-custom-select-menu {
  display: block;
}
#table_evaluation_modal .table-custom-select-search {
  padding: 0.5rem;
  border-bottom: 1px solid var(--bs-border-color);
}
#table_evaluation_modal .table-custom-select-search input {
  width: 100%;
  padding: 0.4rem 0.6rem;
  font-size: 0.8rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.35rem;
  background: var(--bs-tertiary-bg);
}
#table_evaluation_modal .table-custom-select-search input:focus {
  outline: none;
  border-color: var(--bs-primary);
}
#table_evaluation_modal .table-custom-select-options {
  max-height: 260px;
  overflow-y: auto;
  padding: 0.35rem;
}
#table_evaluation_modal .table-custom-select-option {
  display: block;
  width: 100%;
  padding: 0.5rem 0.65rem;
  font-size: 0.8rem;
  color: var(--bs-body-color);
  background: transparent;
  border: none;
  border-radius: 0.35rem;
  text-align: left;
  cursor: pointer;
  white-space: normal;
  line-height: 1.4;
  word-break: break-word;
  transition: background 0.1s ease;
}
#table_evaluation_modal .table-custom-select-option:hover,
#table_evaluation_modal .table-custom-select-option.highlighted {
  background: var(--bs-tertiary-bg);
}
#table_evaluation_modal .table-custom-select-option.selected {
  background: rgba(var(--bs-primary-rgb), 0.1);
  color: var(--bs-primary);
  font-weight: 500;
}
#table_evaluation_modal .table-custom-select-option.selected::before {
  content: '\2713';
  margin-right: 0.5rem;
  font-size: 0.8rem;
  font-weight: bold;
}
#table_evaluation_modal .table-custom-select-option.has-desc {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
#table_evaluation_modal .table-custom-select-option-label {
  font-weight: 500;
}
#table_evaluation_modal .table-custom-select-option.selected .table-custom-select-option-label::before {
  content: '\2713';
  margin-right: 0.5rem;
  font-size: 0.8rem;
  font-weight: bold;
}
#table_evaluation_modal .table-custom-select-option-desc {
  font-size: 0.7rem;
  color: var(--bs-secondary-color);
  margin-top: 0.15rem;
  line-height: 1.3;
  padding-left: 0;
}
#table_evaluation_modal .table-custom-select-option.selected .table-custom-select-option-desc {
  padding-left: 1.2rem;
}
#table_evaluation_modal .table-custom-select-empty {
  padding: 1rem;
  text-align: center;
  color: var(--bs-secondary-color);
  font-size: 0.8rem;
  font-style: italic;
}

/* ── Multi-select Dropdown (generic — works inside any modal or page) ── */
.table-multiselect {
  width: 100%;
}
.table-multiselect .table-multiselect-toggle {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: wrap;
  min-width: 120px;
  min-height: 2rem;
  height: auto !important;
  line-height: normal;
  padding: 0.25rem 0.5rem;
  overflow: visible;
  white-space: normal;
}
td:has(.table-multiselect) {
  overflow: visible;
  max-width: 320px;
  vertical-align: top;
}

/* ── Pills ── */
.table-multiselect-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  flex: 1;
  min-width: 0;
  align-items: center;
}
.table-multiselect-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.15rem 0.25rem 0.15rem 0.4rem;
  background: rgba(var(--bs-primary-rgb), 0.1);
  color: var(--bs-primary);
  border-radius: 1rem;
  font-size: 0.7rem;
  max-width: min(100%, 220px);
  line-height: 1.2;
}
.table-multiselect-pill-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.table-multiselect-pill-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  /* Visual size is 16px but hit target is 24px via padding */
  width: 16px;
  height: 16px;
  padding: 4px;
  box-sizing: content-box;
  margin: -4px -2px -4px 0;
  border: none;
  background: transparent;
  border-radius: 50%;
  cursor: pointer;
  color: var(--bs-primary);
  font-size: 0.55rem;
  flex-shrink: 0;
  transition: background 0.15s ease;
}
.table-multiselect-pill-remove:hover {
  background: rgba(var(--bs-primary-rgb), 0.25);
}
.table-multiselect-more {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.4rem;
  background: var(--bs-secondary-bg);
  color: var(--bs-secondary-color);
  border-radius: 1rem;
  font-size: 0.7rem;
  font-weight: 500;
}
.table-multiselect-placeholder {
  color: var(--bs-secondary-color);
  font-size: 0.8rem;
}

/* Prevent Bootstrap .btn-outline-primary.show from turning the toggle solid blue */
.table-multiselect-toggle.btn-outline-primary.show,
.table-multiselect-toggle.btn-outline-primary:active,
.table-multiselect-toggle.btn-outline-primary.show:focus-visible {
  background-color: rgba(var(--bs-primary-rgb), 0.08);
  color: var(--bs-primary);
  border-color: var(--bs-primary);
}

/* ── Dropdown Menu (inside parent OR portaled to body) ── */
.table-multiselect-menu {
  max-height: 320px;
  overflow-y: auto;
  min-width: 280px;
  max-width: 450px;
  z-index: 1090; /* above Bootstrap modals (1055) and backdrops (1050) */
}
body > .table-multiselect-menu {
  display: none;
  margin: 0 !important;
  padding: 0;
}
body > .table-multiselect-menu.show,
.table-multiselect-menu.show {
  display: block !important;
  background: var(--bs-body-bg, #fff);
  border: 1px solid var(--bs-border-color, #dee2e6);
  border-radius: 0.5rem;
  box-shadow: 0 10px 40px -5px rgba(0, 0, 0, 0.25);
  z-index: 1090;
}

/* ── Header (sticky search + actions) ── */
.table-multiselect-header {
  position: sticky;
  top: 0;
  background: var(--bs-body-bg, #fff);
  z-index: 1;
  border-bottom: 1px solid var(--bs-border-color, #dee2e6);
}
.table-multiselect-search {
  padding: 0.5rem;
}
.table-multiselect-search input {
  width: 100%;
  padding: 0.35rem 0.5rem;
  font-size: 0.8rem;
  border: 1px solid var(--bs-border-color, #dee2e6);
  border-radius: 0.35rem;
  background: var(--bs-tertiary-bg, #f8f9fa);
  outline: none;
}
.table-multiselect-search input:focus {
  border-color: var(--bs-primary, #2584BE);
}
.table-multiselect-actions {
  display: flex;
  gap: 0.5rem;
  padding: 0.35rem 0.5rem;
  background: var(--bs-tertiary-bg, #f8f9fa);
  border-bottom: 1px solid var(--bs-border-color, #dee2e6);
}
.table-multiselect-actions button {
  flex: 1;
  padding: 0.25rem 0.5rem;
  font-size: 0.7rem;
  font-weight: 500;
  border-radius: 0.25rem;
  border: 1px solid var(--bs-border-color, #dee2e6);
  background: var(--bs-body-bg, #fff);
  color: var(--bs-body-color, #212529);
  cursor: pointer;
  transition: all 0.15s ease;
}
.table-multiselect-actions button:hover {
  background: var(--bs-secondary-bg, #e9ecef);
  border-color: var(--bs-primary, #2584BE);
  color: var(--bs-primary, #2584BE);
}

/* ── Options list ── */
.table-multiselect-options {
  padding: 0.35rem;
}
.table-multiselect-option {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.5rem;
  border-radius: 0.35rem;
  margin-bottom: 0.25rem;
  cursor: pointer;
  transition: background 0.1s ease;
}
.table-multiselect-option:hover {
  background: var(--bs-tertiary-bg, #f8f9fa);
}
.table-multiselect-option input[type="checkbox"] {
  flex-shrink: 0;
  width: 1rem;
  height: 1rem;
  min-width: 1rem;
  min-height: 1rem;
  max-width: 1rem;
  max-height: 1rem;
  margin: 0.1rem 0 0 0;
  cursor: pointer;
}
.table-multiselect-option-label {
  flex: 1;
  font-size: 0.8rem;
  white-space: normal;
  line-height: 1.4;
  word-break: break-word;
  cursor: pointer;
}

/* ── Table layout fixes ── */
#table_evaluation_modal tbody tr {
  height: auto;
}
#table_evaluation_modal td > .d-grid {
  grid-template-columns: minmax(0, 1fr);
}

/* ── Radio Button Group ── */
#table_evaluation_modal .table-radio-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
#table_evaluation_modal .table-radio-option {
  margin: 0;
  padding: 0.25rem 0;
}
#table_evaluation_modal .table-radio-option .form-check-input {
  margin-top: 0.2rem;
}
#table_evaluation_modal .table-radio-option .form-check-label {
  font-size: 0.85rem;
  cursor: pointer;
}
#table_evaluation_modal .table-radio-option .form-check-input:checked + .form-check-label {
  font-weight: 500;
  color: var(--bs-primary);
}

/* ── File Upload ── */
#table_evaluation_modal .table-file-upload {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
#table_evaluation_modal .table-file-display {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  border: 1px dashed var(--bs-border-color);
  border-radius: 0.35rem;
  background: var(--bs-tertiary-bg);
  transition: all 0.15s ease;
}
#table_evaluation_modal .table-file-display:hover {
  border-color: var(--bs-primary);
  background: var(--bs-secondary-bg);
}
#table_evaluation_modal .table-file-display.has-file {
  border-style: solid;
  border-color: var(--bs-success);
  background: color-mix(in srgb, var(--bs-success) 10%, transparent);
}
#table_evaluation_modal .table-file-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  cursor: pointer;
  margin: 0;
  color: var(--bs-body-color);
  font-size: 0.85rem;
}
#table_evaluation_modal .table-file-display.has-file .table-file-label {
  color: var(--bs-success);
}
#table_evaluation_modal .table-file-label i {
  font-size: 1.1rem;
}
#table_evaluation_modal .table-file-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#table_evaluation_modal .table-file-remove {
  background: none;
  border: none;
  padding: 0.25rem;
  cursor: pointer;
  color: var(--bs-secondary-color);
  line-height: 1;
  border-radius: 0.25rem;
  transition: all 0.15s ease;
}
#table_evaluation_modal .table-file-remove:hover {
  background: rgba(var(--bs-danger-rgb), 0.1);
  color: var(--bs-danger);
}

/* ── Buttons ── */
#table_evaluation_modal .modal-footer .btn {
  font-size: 0.85rem;
  padding: 0.5rem 1rem;
}
#table_evaluation_modal #add_risk_row {
  font-size: 0.85rem;
}

/* ── Validation States ── */
#table_evaluation_modal tr.table-danger td {
  background: rgba(220, 53, 69, 0.1);
}
#table_evaluation_modal tr.table-danger td:first-child {
  border-left: 3px solid var(--bs-danger);
}

/* ── Empty State ── */
#table_evaluation_modal .table-empty-state {
  text-align: center;
  padding: 3rem 2rem;
  color: var(--bs-secondary-color);
}
#table_evaluation_modal .table-empty-state i {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

/* ── Table Header with Actions ── */
#table_evaluation_modal .table-header-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
#table_evaluation_modal .table-action-buttons {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* ── Row Count Display ── */
#table_evaluation_modal .table-row-count {
  font-size: 0.8rem;
  color: var(--bs-secondary-color);
  margin-top: 0.75rem;
}

/* ── Pagination Controls ── */
#table_evaluation_modal .table-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--bs-border-color);
}
#table_evaluation_modal .table-pagination-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.8rem;
  color: var(--bs-secondary-color);
}
#table_evaluation_modal .table-pagination-info .showing-text {
  white-space: nowrap;
}
#table_evaluation_modal .table-rows-per-page {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
#table_evaluation_modal .table-rows-per-page label {
  font-size: 0.8rem;
  color: var(--bs-secondary-color);
  white-space: nowrap;
  margin: 0;
}
#table_evaluation_modal .table-rows-per-page select {
  padding: 0.25rem 0.5rem;
  font-size: 0.8rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.35rem;
  background: var(--bs-body-bg);
  color: var(--bs-body-color);
  cursor: pointer;
}
#table_evaluation_modal .table-rows-per-page select:focus {
  outline: none;
  border-color: var(--bs-primary);
}
#table_evaluation_modal .table-pagination-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
#table_evaluation_modal .table-pagination-nav button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 2rem;
  padding: 0 0.5rem;
  font-size: 0.8rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.35rem;
  background: var(--bs-body-bg);
  color: var(--bs-body-color);
  cursor: pointer;
  transition: all 0.15s ease;
}
#table_evaluation_modal .table-pagination-nav button:hover:not(:disabled) {
  background: var(--bs-tertiary-bg);
  border-color: var(--bs-primary);
  color: var(--bs-primary);
}
#table_evaluation_modal .table-pagination-nav button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
#table_evaluation_modal .table-pagination-nav button.active {
  background: var(--bs-primary);
  border-color: var(--bs-primary);
  color: white;
}
#table_evaluation_modal .table-pagination-nav .page-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 2rem;
  font-size: 0.8rem;
  color: var(--bs-secondary-color);
}
#table_evaluation_modal .table-page-jump {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
#table_evaluation_modal .table-page-jump label {
  font-size: 0.8rem;
  color: var(--bs-secondary-color);
  white-space: nowrap;
  margin: 0;
}
#table_evaluation_modal .table-page-jump input {
  width: 3.5rem;
  padding: 0.25rem 0.5rem;
  font-size: 0.8rem;
  text-align: center;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.35rem;
  background: var(--bs-body-bg);
  color: var(--bs-body-color);
}
#table_evaluation_modal .table-page-jump input:focus {
  outline: none;
  border-color: var(--bs-primary);
}
@media (max-width: 768px) {
  #table_evaluation_modal .table-pagination {
    flex-direction: column;
    align-items: stretch;
  }
  #table_evaluation_modal .table-pagination-info {
    justify-content: space-between;
  }
  #table_evaluation_modal .table-pagination-nav {
    justify-content: center;
  }
  #table_evaluation_modal .table-page-jump {
    justify-content: center;
  }
}

/* ── Bulk Import System ── */
#table_evaluation_modal .table-import-export-group {
  display: flex;
  gap: 0.35rem;
  margin-left: auto;
}
#table_evaluation_modal .table-import-export-group .btn {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
}
#table_evaluation_modal .table-import-dropzone {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 2rem;
  margin-bottom: 1rem;
  border: 2px dashed var(--bs-border-color);
  border-radius: 0.75rem;
  background: var(--bs-tertiary-bg);
  transition: all 0.2s ease;
  cursor: pointer;
}
#table_evaluation_modal .table-import-dropzone.active {
  display: flex;
}
#table_evaluation_modal .table-import-dropzone.drag-over {
  border-color: var(--bs-primary);
  background: rgba(var(--bs-primary-rgb), 0.05);
}
#table_evaluation_modal .table-import-dropzone-icon {
  font-size: 2.5rem;
  color: var(--bs-secondary-color);
}
#table_evaluation_modal .table-import-dropzone.drag-over .table-import-dropzone-icon {
  color: var(--bs-primary);
}
#table_evaluation_modal .table-import-dropzone-text {
  text-align: center;
  color: var(--bs-secondary-color);
  font-size: 0.9rem;
}
#table_evaluation_modal .table-import-dropzone-text strong {
  color: var(--bs-primary);
  cursor: pointer;
}
#table_evaluation_modal .table-import-dropzone-hint {
  font-size: 0.75rem;
  color: var(--bs-secondary-color);
}
#table_evaluation_modal .table-import-dropzone-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  border: none;
  background: none;
  color: var(--bs-secondary-color);
  cursor: pointer;
  padding: 0.25rem;
}
#table_evaluation_modal .table-import-dropzone-close:hover {
  color: var(--bs-body-color);
}
#table_evaluation_modal .table-import-preview {
  display: none;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem;
  margin-bottom: 1rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.5rem;
  background: var(--bs-body-bg);
}
#table_evaluation_modal .table-import-preview.active {
  display: flex;
}
#table_evaluation_modal .table-import-preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
#table_evaluation_modal .table-import-preview-header h6 {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
}
#table_evaluation_modal .table-import-preview-stats {
  display: flex;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--bs-secondary-color);
}
#table_evaluation_modal .table-import-preview-stats .stat-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
#table_evaluation_modal .table-import-preview-stats .stat-value {
  font-weight: 600;
  color: var(--bs-body-color);
}
#table_evaluation_modal .table-import-preview-table {
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.35rem;
}
#table_evaluation_modal .table-import-preview-table table {
  margin: 0;
  font-size: 0.75rem;
}
#table_evaluation_modal .table-import-preview-table th {
  position: sticky;
  top: 0;
  background: var(--bs-tertiary-bg);
  font-size: 0.7rem;
}
#table_evaluation_modal .table-import-preview-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}
#table_evaluation_modal .table-import-errors {
  padding: 0.75rem;
  background: rgba(220, 53, 69, 0.1);
  border: 1px solid rgba(220, 53, 69, 0.3);
  border-radius: 0.35rem;
  font-size: 0.8rem;
}
#table_evaluation_modal .table-import-errors-title {
  font-weight: 600;
  color: var(--bs-danger);
  margin-bottom: 0.5rem;
}
#table_evaluation_modal .table-import-errors-list {
  margin: 0;
  padding-left: 1.25rem;
  max-height: 100px;
  overflow-y: auto;
}
#table_evaluation_modal .table-import-errors-list li {
  margin-bottom: 0.25rem;
}

/* ── Row Management ── */
#table_evaluation_modal th.select-col,
#table_evaluation_modal td.select-col {
  width: 2.5rem;
  min-width: 2.5rem;
  max-width: 2.5rem;
  text-align: center;
  padding: 0.5rem 0.25rem;
  position: sticky;
  left: 0;
  z-index: 6;
  background: var(--bs-body-bg);
}
#table_evaluation_modal td.select-col {
  vertical-align: middle;
}
#table_evaluation_modal th.select-col {
  z-index: 11;
  background: var(--bs-tertiary-bg);
}
#table_evaluation_modal .select-col input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  cursor: pointer;
  flex-shrink: 0;
}
#table_evaluation_modal tbody tr.row-selected {
  background: rgba(var(--bs-primary-rgb), 0.08) !important;
}
#table_evaluation_modal tbody tr.row-selected td {
  background: rgba(var(--bs-primary-rgb), 0.08);
}
#table_evaluation_modal tbody tr.row-selected:hover td {
  background: rgba(var(--bs-primary-rgb), 0.12);
}
#table_evaluation_modal .table-bulk-actions {
  display: none;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.75rem;
  background: rgba(var(--bs-primary-rgb), 0.1);
  border: 1px solid rgba(var(--bs-primary-rgb), 0.2);
  border-radius: 0.5rem;
  font-size: 0.85rem;
}
#table_evaluation_modal .table-bulk-actions.active {
  display: flex;
}
#table_evaluation_modal .table-bulk-actions-count {
  font-weight: 600;
  color: var(--bs-primary);
}
#table_evaluation_modal .table-bulk-actions-buttons {
  display: flex;
  gap: 0.35rem;
  margin-left: auto;
}
#table_evaluation_modal .table-bulk-actions-buttons .btn {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
}

/* Sortable headers */
#table_evaluation_modal th.sortable-col {
  cursor: pointer;
  user-select: none;
  position: relative;
}
#table_evaluation_modal th.sortable-col:hover {
  background: var(--bs-secondary-bg);
}
#table_evaluation_modal th.sortable-col .sort-indicator {
  margin-left: 0.35rem;
  font-size: 0.65rem;
  opacity: 0.4;
}
#table_evaluation_modal th.sortable-col.sort-asc .sort-indicator,
#table_evaluation_modal th.sortable-col.sort-desc .sort-indicator {
  opacity: 1;
  color: var(--bs-primary);
}

/* Required field indicator */
#table_evaluation_modal th .required-indicator {
  color: var(--bs-danger);
  margin-left: 0.25rem;
  font-size: 0.75rem;
}

/* Keyboard focus indicator */
#table_evaluation_modal td.cell-focused {
  outline: 2px solid var(--bs-primary);
  outline-offset: -2px;
}

/* ══════════════════════════════════════════════════════════════
   Workflow Documents Stats
   (was: workflow-docs-stats-styles in dashboard/public.js)
   ══════════════════════════════════════════════════════════════ */
:root {
  --docs-accent: var(--status-success, #4CE8D4);
  --docs-warn: var(--status-warning, #F59E0B);
  --docs-danger: var(--status-danger, #EA1F54);
  --docs-radius: 14px;
}

.docs-stats-card {
  border-radius: 1rem;
  border: 1px solid var(--bs-border-color);
  background-color: transparent;
  transition: all 0.2s ease;
}
.docs-stats-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,.08);
  border-color: var(--bs-primary);
}
html[data-bs-theme="dark"] .docs-stats-card {
  border-color: rgba(255,255,255,.1);
}
html[data-bs-theme="dark"] .docs-stats-card:hover {
  border-color: var(--bs-primary);
  box-shadow: 0 4px 12px rgba(0,0,0,.25);
}
.docs-stats-metric {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: .2px;
}
.docs-stats-sub {
  color: var(--bs-gray-600);
  font-size: 0.65rem;
}
.docs-stats-value {
  font-size: 1.0rem;
  font-weight: 800;
  line-height: 1.05;
  text-transform: uppercase;
  letter-spacing: .02em;
  color: var(--bs-gray-800);
  margin-bottom: .5rem;
}
.docs-fw-count {
  font-size: 0.8rem;
}
.docs-fw-name {
  font-size: 0.95rem;
  font-weight: 800;
}
.docs-stats-progress {
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background-color: var(--bs-border-color, rgba(0,0,0,.12));
}
.docs-stats-progress > .docs-stats-progress-fill,
.docs-stats-progress .progress-bar {
  height: 100%;
  border-radius: inherit;
  background-color: var(--docs-accent);
}
.docs-donut {
  width: 74px;
  height: 74px;
  border-radius: 999px;
  position: relative;
  flex: 0 0 auto;
  background-color: var(--bs-border-color, rgba(0,0,0,.12));
  background: conic-gradient(
    var(--docs-accent) calc(var(--pct, 0) * 1turn),
    var(--bs-border-color, rgba(0,0,0,.12)) 0
  );
}
.docs-donut::after {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 999px;
  background-color: var(--bs-body-bg, transparent);
  box-shadow: inset 0 0 0 1px var(--bs-border-color, rgba(0,0,0,.12));
}
.docs-donut .docs-donut-center {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--bs-body-color, inherit);
}
.docs-fw-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}
.docs-val-ready { color: var(--docs-accent); font-weight: 800; }
.docs-val-expired { color: var(--docs-danger); font-weight: 800; }

.docs-kpi-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (min-width: 992px) {
  .docs-kpi-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}
.docs-kpi-grid > .docs-stats-card { height: 100%; }
.docs-legend {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem 1rem;
  align-items: center;
  margin-top: .5rem;
}
.docs-legend-item {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  text-transform: uppercase;
  font-size: .6rem;
  color: var(--bs-gray-600);
  margin-bottom: .5rem;
  margin-top: .5rem;
}
.docs-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
}

/* Document Framework Cards */
.docs-framework-card {
  cursor: default;
}
.docs-framework-card .fw-title {
  font-size: .95rem;
  font-weight: 700;
  margin: 0;
  color: var(--bs-emphasis-color);
}
.docs-framework-card .fw-score {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1;
}
.docs-framework-card .fw-mini-donut {
  flex-shrink: 0;
}
.docs-framework-card .fw-metrics {
  display: flex;
  gap: 1rem;
  padding-top: .75rem;
  margin-top: .75rem;
  border-top: 1px solid var(--bs-border-color);
}
.docs-framework-card .fw-metric {
  display: flex;
  flex-direction: column;
}
.docs-framework-card .fw-metric-value {
  font-size: 1rem;
  font-weight: 700;
  color: var(--bs-emphasis-color);
}
.docs-framework-card .fw-metric-label {
  font-size: .7rem;
  color: var(--bs-secondary-color);
  text-transform: uppercase;
  letter-spacing: .03em;
}
.docs-framework-card .fw-actions {
  margin-top: .75rem;
  display: flex;
  gap: .5rem;
}
.docs-framework-card .fw-action-btn {
  font-size: .75rem;
  padding: .35rem .75rem;
}
.docs-fw-slider-track .docs-framework-card-col {
  flex: 0 0 calc(33.333% - 0.67rem);
  min-width: calc(33.333% - 0.67rem);
  scroll-snap-align: start;
}
@media (max-width: 1199.98px) {
  .docs-fw-slider-track .docs-framework-card-col {
    flex: 0 0 calc(50% - 0.5rem);
    min-width: calc(50% - 0.5rem);
  }
}
@media (max-width: 767.98px) {
  .docs-fw-slider-track .docs-framework-card-col {
    flex: 0 0 calc(100%);
    min-width: calc(100%);
  }
}

/* Expired documents alert panel */
.docs-expired-alert {
  background: rgba(234,31,84,.08);
  border: 1px solid rgba(234,31,84,.2);
  border-radius: 1rem;
  padding: 1rem 1.25rem;
}
html[data-bs-theme="dark"] .docs-expired-alert {
  background: rgba(234,31,84,.15);
  border-color: rgba(234,31,84,.3);
}
.docs-expired-alert .alert-header {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: .75rem;
}
.docs-expired-alert .alert-icon {
  width: 32px;
  height: 32px;
  border-radius: .5rem;
  background: rgba(234,31,84,.15);
  color: var(--status-danger, #EA1F54);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}
.docs-expired-alert .alert-title {
  font-weight: 700;
  color: var(--status-danger, #EA1F54);
}
.docs-expired-alert .alert-count {
  margin-left: auto;
  background: var(--status-danger, #EA1F54);
  color: white;
  padding: .15rem .5rem;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 600;
}
.docs-expired-list {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  max-height: 200px;
  overflow-y: auto;
}
.docs-expired-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .5rem .75rem;
  background: rgba(255,255,255,.5);
  border-radius: .5rem;
  font-size: .85rem;
}
html[data-bs-theme="dark"] .docs-expired-item {
  background: rgba(0,0,0,.2);
}
.docs-expired-item .doc-name {
  font-weight: 600;
  color: var(--bs-body-color);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.docs-expired-item .doc-framework {
  color: var(--bs-secondary-color);
  font-size: .75rem;
  white-space: nowrap;
  margin-left: .5rem;
}
.docs-expired-item .expired-badge {
  background: rgba(234,31,84,.15);
  color: var(--status-danger, #EA1F54);
  font-weight: 600;
  font-size: .7rem;
  padding: .15rem .4rem;
  border-radius: 999px;
  white-space: nowrap;
  margin-left: .5rem;
}

/* ══════════════════════════════════════════════════════════════
   Workflow Documents Table
   (was: workflow-docs-table-styles in dashboard/public.js)
   ══════════════════════════════════════════════════════════════ */
.col-actions { width: 112px; }
.table th.col-actions, .table td.text-end { white-space: nowrap; }

/* ══════════════════════════════════════════════════════════════
   Document Unavailable Modal
   (was: doc-unavail-modal-styles in dashboard/public.js)
   ══════════════════════════════════════════════════════════════ */
#doc_unavail_modal .modal-content {
  border: 0;
  border-radius: 1rem;
  box-shadow: 0 8px 24px rgba(0,0,0,.15);
}
#doc_unavail_modal .modal-header {
  border: 0;
  padding-bottom: .25rem;
}
#doc_unavail_modal .modal-footer {
  border: 0;
  padding-top: .25rem;
}
#doc_unavail_modal .status-icon {
  width: 44px;
  height: 44px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}
#doc_unavail_modal .body-wrap {
  display: flex;
  gap: .75rem;
  align-items: flex-start;
}
#doc_unavail_modal .modal-title {
  font-weight: 700;
}

/* ══════════════════════════════════════════════════════════════
   Workflow Steps Modal
   (was: steps-modal-styles in implementations/public.js)
   ══════════════════════════════════════════════════════════════ */
#modal_workflow_steps .modal-dialog { max-width: 720px; }
#modal_workflow_steps .modal-header { border-bottom: 0; padding: .75rem 1rem; }
#modal_workflow_steps .modal-title { font-size: 1.35rem; font-weight: 700; }
#modal_workflow_steps .steps-subtitle { font-size: 1rem; }
#modal_workflow_steps .modal-body { padding: .75rem 1rem 1rem; }
#modal_workflow_steps .step-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: .5rem;
}
#modal_workflow_steps .list-group-item { background: transparent; padding: 0; border: 0; }
#modal_workflow_steps .step-tile {
  display: grid;
  grid-template-columns: 8px 1fr auto;
  align-items: center;
  gap: .75rem;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--bs-border-color, #2c3a44);
  border-radius: .5rem;
  padding: .65rem .75rem;
}
#modal_workflow_steps .colorbar { width: 6px; height: 100%; border-radius: .35rem; }
#modal_workflow_steps .step-title { font-size: 1.08rem; font-weight: 600; }
#modal_workflow_steps .toggle-btn { color: inherit; opacity: .9; }
#modal_workflow_steps .toggle-btn:hover { opacity: 1; }
#modal_workflow_steps .step-body {
  grid-column: 1 / -1;
  display: none;
  text-align: left;
  padding-left: calc(6px + .75rem);
}

/* ══════════════════════════════════════════════════════════════
   Bar Slider (assessment fields)
   (was: bar-slider-styles in implementations/public.js)
   ══════════════════════════════════════════════════════════════ */
.bar-field { --bar-dot-size: 12px; --bar-dot-size-active: 14px; --bar-gap: 8px; }
.bar-slider { margin: .5rem 0 0.25rem 0; }
.bar-marks { display: flex; justify-content: space-between; gap: var(--bar-gap); }
.bar-mark-wrap { display: flex; flex-direction: column; align-items: center; flex: 1 1 0; min-width: 0; }
.bar-mark {
  width: var(--bar-dot-size);
  height: var(--bar-dot-size);
  border-radius: 50%;
  border: 2px solid var(--bs-primary, #0d6efd);
  background: var(--bs-body-bg, #fff);
  padding: 0;
  outline: none;
  cursor: pointer;
}
.bar-mark.active {
  width: var(--bar-dot-size-active);
  height: var(--bar-dot-size-active);
  background: var(--bs-primary, #0d6efd);
}
.bar-mark-label {
  margin-top: .35rem;
  font-size: .82rem;
  line-height: 1.1;
  color: var(--bs-secondary-color, #6c757d);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.bar-range { width: 100%; }
.bar-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--bs-primary, #0d6efd);
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px var(--bs-primary, #0d6efd);
}
.bar-range::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--bs-primary, #0d6efd);
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px var(--bs-primary, #0d6efd);
}
.bar-range::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 9999px;
  background: var(--bs-border-color, #dee2e6);
}
.bar-range::-moz-range-track {
  height: 4px;
  border-radius: 9999px;
  background: var(--bs-border-color, #dee2e6);
}

/* ══════════════════════════════════════════════════════════════
   Linked Reference Tooltip
   (was: linked-ref-styles in implementations/public.js)
   ══════════════════════════════════════════════════════════════ */
.linked-ref {
  color: var(--bs-primary, #0d6efd);
  cursor: help;
  text-decoration: none;
  font-weight: 600;
}
.linked-ref:hover { text-decoration: underline; }
#linked-ref-tooltip {
  position: absolute;
  z-index: 1060;
  display: none;
  max-width: 480px;
  max-height: 70vh;
  overflow: hidden;
  background: var(--bs-body-bg, #fff);
  color: var(--bs-body-color, #212529);
  border: 1px solid var(--bs-border-color, #dee2e6);
  border-radius: .5rem;
  box-shadow: 0 .5rem 1rem rgba(0,0,0,.15);
  padding: .85rem 1rem;
  font-size: .92rem;
}
#linked-ref-tooltip .title {
  margin: 0 0 .35rem 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--bs-primary, #0d6efd);
  line-height: 1.2;
}
#linked-ref-tooltip .meta {
  font-size: .82rem;
  color: var(--bs-secondary-color, #6c757d);
  margin-bottom: .5rem;
}
#linked-ref-tooltip .divider {
  height: 1px;
  background: var(--bs-border-color, #dee2e6);
  margin: .35rem 0 .5rem 0;
}
#linked-ref-tooltip .desc {
  white-space: normal;
  word-break: break-word;
  max-height: 50vh;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  padding-right: .25rem;
}
#linked-ref-tooltip .desc .name {
  font-weight: 700;
  margin-bottom: .35rem;
}
#linked-ref-tooltip .desc::-webkit-scrollbar { width: 8px; }
#linked-ref-tooltip .desc::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,.2);
  border-radius: 8px;
}
