._overlay_14h09_1 {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 1000;
  display: flex;
  justify-content: flex-end;
}

._panel_14h09_10 {
  width: 380px;
  max-width: 90vw;
  background: #fff;
  height: 100%;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  animation: _slideIn_14h09_1 0.2s ease-out;
}

@keyframes _slideIn_14h09_1 {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

._header_14h09_26 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #e5e7eb;
}

._header_14h09_26 h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: #111827;
}

._closeBtn_14h09_41 {
  background: none;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  color: #6b7280;
  padding: 4px;
  border-radius: 4px;
}

._closeBtn_14h09_41:hover {
  background: #f3f4f6;
  color: #111827;
}

._body_14h09_56 {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

._sectionInfo_14h09_62 {
  margin-bottom: 20px;
  padding: 12px;
  background: #f9fafb;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
}

._sectionInfo_14h09_62 h4 {
  margin: 0 0 4px;
  font-size: 0.9rem;
  color: #111827;
}

._sectionMeta_14h09_76 {
  font-size: 0.75rem;
  color: #6b7280;
}

._journeyBadge_14h09_81 {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

._journey_on_site_14h09_91 { background: #dbeafe; color: #1e40af; }
._journey_desktop_review_14h09_92 { background: #fef3c7; color: #92400e; }
._journey_back_office_14h09_93 { background: #ede9fe; color: #5b21b6; }

._form_14h09_95 {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

._fieldGroup_14h09_101 {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

._fieldGroup_14h09_101 label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #374151;
}

._fieldGroup_14h09_101 input,
._fieldGroup_14h09_101 select {
  padding: 8px 10px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.85rem;
  color: #111827;
  background: #fff;
}

._fieldGroup_14h09_101 input:focus,
._fieldGroup_14h09_101 select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

._typeToggle_14h09_130 {
  display: flex;
  gap: 0;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  overflow: hidden;
}

._typeBtn_14h09_138 {
  flex: 1;
  padding: 8px;
  border: none;
  background: #fff;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  color: #6b7280;
}

._typeBtn_14h09_138:first-child {
  border-right: 1px solid #d1d5db;
}

._typeBtnActive_14h09_153 {
  background: #3b82f6;
  color: #fff;
}

._actions_14h09_158 {
  display: flex;
  gap: 10px;
  padding: 16px 20px;
  border-top: 1px solid #e5e7eb;
}

._assignBtn_14h09_165 {
  flex: 1;
  padding: 10px;
  background: #3b82f6;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

._assignBtn_14h09_165:hover { background: #2563eb; }
._assignBtn_14h09_165:disabled { background: #93c5fd; cursor: not-allowed; }

._removeBtn_14h09_181 {
  padding: 10px 16px;
  background: #fff;
  color: #dc2626;
  border: 1px solid #fca5a5;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

._removeBtn_14h09_181:hover { background: #fef2f2; }

._currentAssignment_14h09_195 {
  margin-top: 16px;
  padding: 12px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
}

._currentAssignment_14h09_195 h4 {
  margin: 0 0 8px;
  font-size: 0.85rem;
  color: #065f46;
}

._assignmentDetail_14h09_209 {
  font-size: 0.8rem;
  color: #374151;
  margin: 4px 0;
}

._assignmentDetail_14h09_209 strong {
  color: #111827;
}

._computedDate_14h09_219 {
  font-size: 0.75rem;
  color: #6b7280;
  margin-top: 2px;
}

._checkGroup_14h09_225 {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

._checkboxLabel_14h09_231 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 400;
  color: #374151;
  cursor: pointer;
}

._checkboxLabel_14h09_231 input[type="checkbox"] {
  accent-color: #3b82f6;
  width: 16px;
  height: 16px;
}

._datePickerWrap_14h09_247 {
  display: flex;
  gap: 0;
  align-items: stretch;
}

._datePickerWrap_14h09_247 input {
  flex: 1;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

._calendarBtn_14h09_259 {
  padding: 0 10px;
  border: 1px solid #d1d5db;
  border-left: none;
  border-radius: 0 6px 6px 0;
  background: #f9fafb;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.15s;
}

._calendarBtn_14h09_259:hover {
  background: #e5e7eb;
}

/* ── Changelog ────────────────────────────────────────────────────────── */

._changeLogSection_14h09_276 {
  margin-top: 8px;
}

._changeLogTitle_14h09_280 {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
}

._changeLogScroll_14h09_288 {
  max-height: 160px;
  overflow-y: auto;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: #f9fafb;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

._changeLogEntry_14h09_300 {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 4px 6px;
  border-bottom: 1px solid #e5e7eb;
  font-size: 0.72rem;
}

._changeLogEntry_14h09_300:last-child {
  border-bottom: none;
}

._changeLogDate_14h09_313 {
  color: #9ca3af;
  font-size: 0.65rem;
}

._changeLogUser_14h09_318 {
  color: #6b7280;
  font-weight: 600;
}

._changeLogDesc_14h09_323 {
  color: #374151;
}

._saveBtn_14h09_327 {
  flex: 1;
  padding: 10px;
  background: #16a34a;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

._saveBtn_14h09_327:hover { background: #15803d; }
._saveBtn_14h09_327:disabled { background: #86efac; color: #166534; cursor: default; }
/* ── SidebarItem ─────────────────────────────────────────────────────── */

._item_da1b5_3 {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.3rem;
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  border-left: 4px solid transparent;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  /* padding, border-radius, font-size set via inline style from config */
}

._item_da1b5_3:hover {
  background: var(--surface-hover);
}

._active_da1b5_23 {
  background: var(--surface-hover);
  border-color: var(--border);
}

._collapsed_da1b5_28 {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 0;
}

/* ── Title line ───────────────────────────────────────────────────────── */

._titleLine_da1b5_40 {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  line-height: 1.35;
  flex-wrap: wrap;
}

._title_da1b5_40 {
  flex: 1;
  min-width: 0;
}

._multiBadge_da1b5_53 {
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.05rem 0.3rem;
  border-radius: 3px;
  background: var(--border);
  color: var(--text-muted);
}

/* ── Badge row ────────────────────────────────────────────────────────── */

._badgeRow_da1b5_65 {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  font-size: 0.72rem;
}

._statusDot_da1b5_73 {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--text-muted);
}
._status_assigned_da1b5_80 { background: #3b82f6; }
._status_in_progress_da1b5_81 { background: #f59e0b; }
._status_submitted_for_review_da1b5_82 { background: #8b5cf6; }
._status_changes_requested_da1b5_83 { background: #ef4444; }
._status_approved_da1b5_84 { background: #22c55e; }
._status_rejected_da1b5_85 { background: #ef4444; }
._status_unassigned_da1b5_86 { background: var(--text-muted); }

._assigneeName_da1b5_88 {
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 120px;
}

._typeBadge_da1b5_96 {
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  padding: 0.05rem 0.25rem;
  border-radius: 3px;
  background: var(--surface-hover);
  color: var(--text-muted);
}

._journeyBadge_da1b5_106 {
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  padding: 0.05rem 0.3rem;
  border-radius: 3px;
  border: 1px solid;
  color: var(--text-muted);
}

/* ── Metrics & due date ───────────────────────────────────────────────── */

._metrics_da1b5_118 {
  font-size: 0.7rem;
  color: var(--text-muted);
}

._dueLine_da1b5_123 {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.7rem;
}

._dueDate_da1b5_130 {
  color: var(--text-muted);
}

._dueStatusBadge_da1b5_134 {
  font-weight: 600;
  font-size: 0.65rem;
  text-transform: uppercase;
}

._reminderBadge_da1b5_140 {
  font-size: 0.65rem;
  color: var(--text-muted);
  font-style: italic;
}
._filterBar_585u8_1 {
  display: flex;
  gap: 4px;
  padding: 0.4rem 0.5rem;
  border-bottom: 1px solid var(--border, #e2e8f0);
  flex-wrap: wrap;
}

._filterBtn_585u8_9 {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 14px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 1px solid var(--border, #e2e8f0);
  background: var(--surface, #fff);
  color: var(--text-muted, #64748b);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  white-space: nowrap;
  user-select: none;
}
._filterBtn_585u8_9:hover {
  background: var(--surface-hover, #f1f5f9);
}

._filterBtn_585u8_9._active_585u8_30 {
  border-color: transparent;
  color: #fff;
  font-weight: 700;
}

._filterBtn_585u8_9._allActive_585u8_36 {
  background: #475569;
  border-color: #334155;
  color: #fff;
}

._dot_585u8_42 {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Journey-specific active styles — colours match sidebar left-border accents */
._filterBtn_585u8_9._onSiteActive_585u8_50 {
  background: #16a34a;
  border-color: #15803d;
}
._dotOnSite_585u8_54 { background: #16a34a; }

._filterBtn_585u8_9._desktopActive_585u8_56 {
  background: #2563eb;
  border-color: #1d4ed8;
}
._dotDesktop_585u8_60 { background: #2563eb; }

._filterBtn_585u8_9._backOfficeActive_585u8_62 {
  background: #7c3aed;
  border-color: #6d28d9;
}
._dotBackOffice_585u8_66 { background: #7c3aed; }

._count_585u8_68 {
  font-size: 0.6rem;
  font-weight: 400;
  opacity: 0.85;
}
._itemWrap_1j9zw_1 {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.35rem 0.5rem;
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
  border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s;
}

._itemWrap_1j9zw_1._outstanding_1j9zw_12 {
  background: rgba(220, 53, 69, 0.12);
  border-color: rgba(220, 53, 69, 0.35);
}

._itemWrap_1j9zw_1._completed_1j9zw_17 {
  background: rgba(25, 135, 84, 0.1);
  border-color: rgba(25, 135, 84, 0.3);
}

._itemWrap_1j9zw_1._na_1j9zw_22 {
  background: rgba(0, 0, 0, 0.04);
  opacity: 0.85;
}

._itemWrap_1j9zw_1._na_1j9zw_22 ._labelText_1j9zw_27,
._itemWrap_1j9zw_1._na_1j9zw_22 ._controlWrap_1j9zw_28 {
  text-decoration: line-through;
}

._labelWrap_1j9zw_32 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  flex: 1 1 auto;
}

._labelText_1j9zw_27 {
  font-weight: 500;
  color: var(--text);
}

._naCheckWrap_1j9zw_45 {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
}

._naCheckWrap_1j9zw_45 input {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--accent);
}

._naLabel_1j9zw_59 {
  font-size: 0.75rem;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
}

._controlWrap_1j9zw_28 {
  width: 100%;
  min-width: 0;
}

._controlWrap_1j9zw_28 input,
._controlWrap_1j9zw_28 select,
._controlWrap_1j9zw_28 textarea {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
._imageSlot_ge67a_1 {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem;
  background: var(--bg);
}

._imageSlotDragOver_ge67a_8 {
  border-color: rgb(25, 135, 84);
  background: rgba(25, 135, 84, 0.08);
  outline: 2px dashed rgba(25, 135, 84, 0.5);
  outline-offset: 2px;
}

/* N/A + red/green wrapper for image slots */
._imageSlotWrap_ge67a_16 {
  border-radius: 8px;
  padding: 0.35rem 0.5rem;
  border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s;
}
._imageSlotWrap_ge67a_16._outstanding_ge67a_22 {
  background: rgba(220, 53, 69, 0.12);
  border-color: rgba(220, 53, 69, 0.35);
}
._imageSlotWrap_ge67a_16._completed_ge67a_26 {
  background: rgba(25, 135, 84, 0.1);
  border-color: rgba(25, 135, 84, 0.3);
}
._imageSlotWrap_ge67a_16._na_ge67a_30 {
  background: rgba(0, 0, 0, 0.04);
  opacity: 0.85;
}
._imageSlotWrap_ge67a_16._na_ge67a_30 ._imageSlotLabel_ge67a_34,
._imageSlotWrap_ge67a_16._na_ge67a_30 ._imageSlotActions_ge67a_35,
._imageSlotWrap_ge67a_16._na_ge67a_30 ._imageSlotPreview_ge67a_36 {
  text-decoration: line-through;
}
._imageSlotNaRow_ge67a_39 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}
._imageSlotNaRow_ge67a_39 ._imageSlotLabel_ge67a_34 {
  margin-bottom: 0;
  flex: 1;
}
._imageSlotNaCheck_ge67a_49 {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
}
._imageSlotNaCheck_ge67a_49 input {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--accent);
}
._imageSlotNaLabel_ge67a_61 {
  font-size: 0.75rem;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
}

._imageSlotLabel_ge67a_34 {
  display: block;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

._imageSlotActions_ge67a_35 {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 0.5rem;
}

._imageSlotDragIcon_ge67a_83 {
  display: inline-flex;
  color: var(--text-muted);
  flex-shrink: 0;
}
._imageSlotDragIcon_ge67a_83 svg {
  width: 20px;
  height: 20px;
}
._imageSlot_ge67a_1:hover ._imageSlotDragIcon_ge67a_83 {
  color: var(--text);
}

._imageSlotPreviewWrap_ge67a_96 {
  display: inline-block;
  cursor: pointer;
  border-radius: 6px;
  padding: 4px;
  border: 1px solid transparent;
}
._imageSlotPreviewWrap_ge67a_96:hover {
  border-color: var(--border);
  background: var(--surface);
}

._imageSlotPreview_ge67a_36 {
  max-width: 160px;
  max-height: 120px;
  object-fit: contain;
  display: block;
}

._imageSlotMeta_ge67a_115 {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  line-height: 1.3;
}

._imageSlotMetaNone_ge67a_125 {
  font-style: italic;
  opacity: 0.8;
}

/* Popup: 1024x768 frame, click outside to close */
._imageSlotPopupOverlay_ge67a_131 {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 1rem;
}

._imageSlotPopupContent_ge67a_142 {
  width: 1024px;
  max-width: calc(100vw - 2rem);
  background: var(--bg);
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 2rem);
}

._imageSlotPopupImageWrap_ge67a_154 {
  width: 1024px;
  height: 768px;
  max-width: 100%;
  max-height: min(768px, 80vh);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #111;
}

._imageSlotPopupImage_ge67a_154 {
  max-width: 1024px;
  max-height: 768px;
  width: auto;
  height: auto;
  object-fit: contain;
}

._imageSlotPopupMeta_ge67a_174 {
  font-size: 0.8rem;
  color: var(--text-muted);
  padding: 0.75rem 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
}

._imageSlotComment_ge67a_183 {
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.4rem 0.5rem;
  font-size: 0.85rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg);
  color: var(--text);
}

._fileSlot_ge67a_194 {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem;
  background: var(--bg);
}

._fileSlotDragOver_ge67a_201 {
  border-color: rgb(25, 135, 84);
  background: rgba(25, 135, 84, 0.08);
  outline: 2px dashed rgba(25, 135, 84, 0.5);
  outline-offset: 2px;
}

._fileSlotActions_ge67a_208 {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 0.25rem;
}

._fileSlotDragIcon_ge67a_216 {
  display: inline-flex;
  color: var(--text-muted);
}
._fileSlot_ge67a_194:hover ._fileSlotDragIcon_ge67a_216 {
  color: var(--text);
}

._fileSlotLabel_ge67a_224 {
  display: block;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

._fileSlotFileName_ge67a_231 {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

._socBlock_ge67a_237 {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  background: var(--bg);
  display: grid;
  gap: 0.5rem;
  grid-template-columns: 1fr 1fr;
}

._socBlockFullWidth_ge67a_247 {
  grid-column: 1 / -1;
}

._socBlockLabel_ge67a_251 {
  font-size: 0.9rem;
  color: var(--text-muted);
}

._socBlockSignaturePreview_ge67a_256 {
  max-width: 120px;
  max-height: 60px;
  object-fit: contain;
  border: 1px solid var(--border);
  border-radius: 4px;
}

._checklistRow_ge67a_264 {
  display: grid;
  grid-template-columns: 1fr auto auto 1fr auto;
  gap: 0.5rem 1rem;
  align-items: start;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}

._checklistRowNa_ge67a_273 {
  opacity: 0.6;
  background: rgba(0, 0, 0, 0.03);
  border-radius: 4px;
  margin: 0 -4px;
  padding: 0.5rem 4px;
}

/* Green when Yes + file uploaded */
._checklistRowComplete_ge67a_282 {
  background: rgba(25, 135, 84, 0.1);
  border-radius: 4px;
  margin: 0 -4px;
  padding: 0.5rem 4px;
  border: 1px solid rgba(25, 135, 84, 0.3);
}

._checklistRowLabel_ge67a_290 {
  font-size: 0.9rem;
  color: var(--text-muted);
}

._checklistRowNaCheck_ge67a_295 {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

._checklistRowNaCheck_ge67a_295 input {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--accent);
}

._checklistRowNaCheck_ge67a_295 span {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
}

._checklistRowCommentWrap_ge67a_314 {
  grid-column: 4;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.5rem 0.6rem;
  min-height: 2.5rem;
}

/* White box with red border/prompt when explanation required */
._checklistRowCommentWrapRequired_ge67a_324 {
  border-color: rgba(220, 53, 69, 0.6);
  background: #fff;
}

._checklistRowComment_ge67a_314 {
  width: 100%;
  min-height: 2rem;
  padding: 0.35rem 0;
  border: none;
  background: transparent;
  font: inherit;
  color: var(--text);
  resize: none;
  outline: none;
  display: block;
}

._checklistRowComment_ge67a_314::placeholder {
  color: var(--text-muted);
}

._checklistRowCommentWrapRequired_ge67a_324 ._checklistRowComment_ge67a_314::placeholder {
  color: rgba(220, 53, 69, 0.9);
}

/* Red prompt text inside the white box */
._checklistRowCommentPrompt_ge67a_351 {
  font-size: 0.75rem;
  color: rgba(220, 53, 69, 0.95);
  margin: 0.35rem 0 0 0;
}

/* Once completed – typed text goes green */
._checklistRowCommentComplete_ge67a_358 ._checklistRowComment_ge67a_314 {
  color: rgb(25, 135, 84);
}

._checklistRowFile_ge67a_362 {
  grid-column: 5;
}

._btnSecondary_ge67a_366 {
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  font-size: 0.85rem;
  cursor: pointer;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
}

._btnSecondary_ge67a_366:hover {
  background: var(--surface-hover);
  color: var(--text);
}

@media (max-width: 640px) {
  ._checklistRow_ge67a_264 {
    grid-template-columns: 1fr;
  }
  ._checklistRowCommentWrap_ge67a_314,
  ._checklistRowFile_ge67a_362 {
    grid-column: 1;
  }
}
/* Test call tables – compact layout, pass/fail/na row colours */
._testCallTable_1xb4r_2 {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.75rem;
}
._testCallTable_1xb4r_2 th,
._testCallTable_1xb4r_2 td {
  padding: 0.3rem 0.35rem;
  border: 1px solid var(--border);
  vertical-align: middle;
}
._testCallTable_1xb4r_2 th {
  background: var(--surface);
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}
/* Column min-widths so dropdown and header text fit */
._testCallTable_1xb4r_2 th:nth-child(1),
._testCallTable_1xb4r_2 td:nth-child(1) { min-width: 5.5rem; }  /* Tested + N/A */
._testCallTable_1xb4r_2 th:nth-child(2),
._testCallTable_1xb4r_2 td:nth-child(2) { min-width: 4.5rem; }  /* Tech */
._testCallTable_1xb4r_2 th:nth-child(3),
._testCallTable_1xb4r_2 td:nth-child(3) { min-width: 3.25rem; }  /* Freq */
._testCallTable_1xb4r_2 th:nth-child(4),
._testCallTable_1xb4r_2 td:nth-child(4) { min-width: 4rem; }     /* Band */
._testCallTable_1xb4r_2 th:nth-child(5),
._testCallTable_1xb4r_2 td:nth-child(5) { min-width: 7rem; }     /* Cell Naming */
._testCallTable_1xb4r_2 th:nth-child(6),
._testCallTable_1xb4r_2 td:nth-child(6) { min-width: 4.5rem; }   /* Cell ID */
._testCallTable_1xb4r_2 th:nth-child(7),
._testCallTable_1xb4r_2 td:nth-child(7) { min-width: 3.5rem; }   /* ARFN */
/* S1–S4 result columns: enough for PASS/FAIL/NA */
._testCallTable_1xb4r_2 th:nth-child(n+8):nth-child(-n+19),
._testCallTable_1xb4r_2 td:nth-child(n+8):nth-child(-n+19) { min-width: 4rem; }
/* Remove dropdown arrow – only the list shows when opened */
._testCallTable_1xb4r_2 select,
._callTestTypeSelect_1xb4r_39 {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: none;
}
._testCallTable_1xb4r_2 select {
  width: 100%;
  min-width: 0;
  padding: 0.2rem 0.35rem;
  font-size: 0.75rem;
  box-sizing: border-box;
}
._callTestTypeSelect_1xb4r_39 {
  min-width: 11rem;
  padding: 0.35rem 0.5rem;
  font-size: 0.875rem;
  box-sizing: border-box;
}
._testCallTable_1xb4r_2 input[type="text"] {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  padding: 0.2rem 0.35rem;
  font-size: 0.75rem;
  box-sizing: border-box;
}
._rowNa_1xb4r_66 {
  text-decoration: line-through;
  opacity: 0.85;
  background: rgba(0, 0, 0, 0.03);
}
._rowTestedNo_1xb4r_71 {
  background: rgba(0, 0, 0, 0.35);
  opacity: 0.7;
  pointer-events: auto;
}
._rowTestedNo_1xb4r_71 input,
._rowTestedNo_1xb4r_71 select {
  background: rgba(0, 0, 0, 0.2);
  color: var(--text-muted);
}
._cellPass_1xb4r_81 {
  background: rgba(34, 197, 94, 0.35);
}
._cellPass_1xb4r_81 select {
  background: rgba(34, 197, 94, 0.25);
}
._cellFail_1xb4r_87 {
  background: rgba(239, 68, 68, 0.35);
}
._cellFail_1xb4r_87 select {
  background: rgba(239, 68, 68, 0.25);
}
._testedCell_1xb4r_93 {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: nowrap;
}
._naCheck_1xb4r_99 {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--text-muted);
}
._wrap_g40qa_1 {
  margin-bottom: 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
}

._trigger_g40qa_9 {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.75rem;
  text-align: left;
  border: none;
  background: var(--bg);
  color: var(--text);
  font-size: 0.9rem;
  cursor: pointer;
}

._trigger_g40qa_9:hover {
  background: var(--surface-hover);
}

._triggerIcon_g40qa_27 {
  font-size: 0.7rem;
  color: var(--text-muted);
}

._panel_g40qa_32 {
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

._metricsList_g40qa_38 {
  list-style: none;
  margin: 0 0 0.75rem 0;
  padding: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

._metricsList_g40qa_38 li {
  padding: 0.2rem 0;
}

._metricsList_g40qa_38 strong {
  color: var(--text);
  margin-left: 0.25rem;
}

._resizeBtn_g40qa_55 {
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--accent);
  color: #fff;
  cursor: pointer;
}

._resizeBtn_g40qa_55:hover:not(:disabled) {
  filter: brightness(1.1);
}

._resizeBtn_g40qa_55:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
._backdrop_4xju6_1 {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9998;
}

/* Document preview panel – scrollable content */
._panel_4xju6_9 {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(90vw, 900px);
  height: min(85vh, 700px);
  background: var(--bg);
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  z-index: 9999;
  border: 1px solid var(--border);
}

._panelHeader_4xju6_25 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  gap: 0.5rem;
}

._panelTitle_4xju6_35 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}

._panelActions_4xju6_46 {
  display: flex;
  gap: 0.35rem;
}

._panelBtn_4xju6_51 {
  padding: 0.35rem 0.6rem;
  font-size: 0.8rem;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}
._panelBtn_4xju6_51:hover {
  background: var(--surface-hover);
}

._panelBody_4xju6_64 {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 0;
}

._panelIframe_4xju6_71 {
  width: 100%;
  height: 100%;
  min-height: 450px;
  border: none;
  display: block;
}

/* PDF.js canvas rendering */
._panelPdfContainer_4xju6_80 {
  flex: 1;
  min-height: 400px;
  overflow: auto;
  background: #1a1a1a;
  position: relative;
}
._panelPdfLoading_4xju6_87,
._panelPdfError_4xju6_88 {
  padding: 2rem;
  text-align: center;
  color: var(--text-muted);
}
._panelPdfError_4xju6_88 {
  color: var(--danger, #dc3545);
}
._panelPdfPages_4xju6_96 {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}
._panelPdfPageWrap_4xju6_103 {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  background: #fff;
}
._panelPdfPageWrap_4xju6_103 canvas {
  display: block;
  max-width: 100%;
  height: auto;
}
._pdfPageCanvas_4xju6_112 {
  max-width: 100%;
  height: auto;
}

._panelPdfFallback_4xju6_117 {
  padding: 1.5rem;
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.9rem;
}
._panelPdfFallback_4xju6_117 p {
  margin: 0 0 0.5rem 0;
}
._panelPdfFallbackBar_4xju6_126 {
  flex-shrink: 0;
  padding: 0.4rem 0.75rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-muted);
}
._panelPdfOpenLink_4xju6_133 {
  color: var(--accent, #0d6efd);
  text-decoration: none;
}
._panelPdfOpenLink_4xju6_133:hover {
  text-decoration: underline;
}

._panelPre_4xju6_141 {
  margin: 0;
  padding: 1rem;
  font-size: 0.85rem;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--text);
  font-family: ui-monospace, monospace;
}

._panelOther_4xju6_151 {
  padding: 1.5rem;
  color: var(--text-muted);
}
._downloadLink_4xju6_155 {
  color: var(--accent, #0d6efd);
}

/* Right-hand toolbar – list of open document viewers */
._toolbar_4xju6_160 {
  position: fixed;
  top: 80px;
  right: 0;
  width: 220px;
  max-height: calc(100vh - 100px);
  background: var(--bg);
  border-left: 1px solid var(--border);
  padding: 0.5rem 0;
  z-index: 9998;
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 12px rgba(0, 0, 0, 0.15);
}

._toolbarTitle_4xju6_175 {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.35rem 0.75rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.25rem;
}

._toolbarList_4xju6_186 {
  list-style: none;
  margin: 0;
  padding: 0.25rem 0;
  overflow-y: auto;
}

._toolbarItem_4xju6_193 {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.5rem;
}

._toolbarBtn_4xju6_200 {
  flex: 1;
  min-width: 0;
  text-align: left;
  padding: 0.4rem 0.5rem;
  font-size: 0.8rem;
  border-radius: 4px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}
._toolbarBtn_4xju6_200:hover {
  background: var(--surface-hover);
}
._toolbarBtnActive_4xju6_215 {
  background: rgba(25, 135, 84, 0.15);
  border-color: rgba(25, 135, 84, 0.4);
}

._toolbarBtnLabel_4xju6_220 {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

._toolbarClose_4xju6_227 {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 4px;
}
._toolbarClose_4xju6_227:hover {
  color: var(--text);
  background: var(--surface-hover);
}
._container_10euh_1 {
  max-width: 720px;
  margin: 0 auto;
  padding: 1.5rem;
}

._header_10euh_7 {
  margin-bottom: 1.5rem;
}

._header_10euh_7 h1 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

._header_10euh_7 p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

._stepIndicator_10euh_22 {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 500;
}

._form_10euh_29 {
  background: var(--surface);
  border-radius: 12px;
  padding: 1.5rem;
  border: 1px solid var(--border);
}

._section_10euh_36 h2 {
  font-size: 1.15rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

._grid_10euh_43 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem 1rem;
  align-items: center;
}

._grid_10euh_43 label {
  font-size: 0.9rem;
  color: var(--text-muted);
}

._grid_10euh_43 label._fullWidth_10euh_55 {
  grid-column: 1 / -1;
}

._grid_10euh_43 input,
._grid_10euh_43 select,
._grid_10euh_43 textarea {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  font-size: 0.9rem;
}

._grid_10euh_43 input:focus,
._grid_10euh_43 select:focus,
._grid_10euh_43 textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-dim);
}

._grid_10euh_43 input._fullWidth_10euh_55,
._grid_10euh_43 textarea._fullWidth_10euh_55 {
  grid-column: 1 / -1;
}

._grid_10euh_43 textarea {
  resize: vertical;
  min-height: 60px;
}

._hint_10euh_88 {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

._actions_10euh_94 {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

._button_10euh_102,
._buttonSecondary_10euh_103 {
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
}

._button_10euh_102 {
  background: var(--accent);
  color: #fff;
}

._button_10euh_102:hover {
  filter: brightness(1.1);
}

._buttonSecondary_10euh_103 {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}

._buttonSecondary_10euh_103:hover {
  background: var(--surface-hover);
  color: var(--text);
}

/* Success state */
._successCard_10euh_133 {
  background: var(--surface);
  border-radius: 12px;
  padding: 1.5rem;
  border: 1px solid var(--border);
}

._successCard_10euh_133 h2 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  color: var(--success);
}

._successCard_10euh_133 p {
  margin-bottom: 0.75rem;
  color: var(--text-muted);
}

._steps_10euh_151 {
  margin: 1rem 0;
  padding-left: 1.25rem;
  line-height: 1.6;
}

._steps_10euh_151 li {
  margin-bottom: 0.5rem;
}

._successCard_10euh_133 code {
  background: var(--bg);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-size: 0.85rem;
  word-break: break-all;
}

._note_10euh_169 {
  font-size: 0.85rem;
  margin-top: 1rem !important;
}

._photoGrid_10euh_174 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

._subsection_10euh_180 {
  font-size: 1rem;
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--text);
}

/* Progress bar (top) */
._progressBarWrap_10euh_188 {
  margin-bottom: 1rem;
}
._progressBarLabel_10euh_191 {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}
._progressBarTrack_10euh_198 {
  height: 10px;
  background: var(--border);
  border-radius: 5px;
  overflow: hidden;
}
._progressBarFill_10euh_204 {
  height: 100%;
  background: var(--accent);
  border-radius: 5px;
  transition: width 0.2s ease;
}

/* Layout with sidebar – open by default, user can collapse */
._layoutWithSidebar_10euh_212 {
  display: flex;
  min-height: 100vh;
}

/* Sidebar – open ~280px, collapsed ~1/4 width (70px) with section numbers only */
._sidebar_10euh_218 {
  flex: 0 0 70px;
  width: 70px;
  min-height: 100vh;
  background: var(--surface);
  border-right: 1px solid var(--border);
  overflow: hidden;
  transition: width 0.25s ease, flex 0.25s ease;
  display: flex;
  flex-direction: column;
}
._sidebar_10euh_218._open_10euh_229 {
  flex: 0 0 280px;
  width: 280px;
  box-shadow: 4px 0 16px rgba(0, 0, 0, 0.08);
  position: relative;
}

._sidebarContent_10euh_236 {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem 0;
  min-width: 0;
}

._sidebarHeaderRow_10euh_243 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0 0.5rem 0.5rem;
}
._sidebarToggleBtn_10euh_250 {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
._sidebarToggleBtn_10euh_250:hover {
  background: var(--surface-hover);
  color: var(--text);
}

._sidebarCollapsedHeader_10euh_270 {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0.25rem 0.75rem;
  border-bottom: 1px solid var(--border);
}
._sidebarCollapsedLabel_10euh_278 {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  text-align: center;
  line-height: 1.2;
  max-width: 100%;
  word-break: break-word;
}

/* Collapsed: section numbers only; hover shows section name via title tooltip */
._sidebarSectionCollapsed_10euh_290 {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.5rem;
  border: none;
  border-left: 4px solid transparent;
  background: transparent;
  color: var(--text);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
._sidebarSectionCollapsed_10euh_290:hover {
  background: var(--surface-hover);
}
._sidebarSectionCollapsed_10euh_290._sidebarSectionComplete_10euh_308 {
  border-left-color: var(--success, #22c55e);
}
._sidebarSectionCollapsed_10euh_290._sidebarSectionIncomplete_10euh_311 {
  border-left-color: #ef4444;
}

._mainContent_10euh_315 {
  flex: 1;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  padding: 1rem 1.5rem;
}

._sidebarSection_10euh_290 {
  display: block;
  width: 100%;
  padding: 0.5rem 0.6rem;
  text-align: left;
  border: 1px solid transparent;
  border-left: 4px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--text);
  font-size: 0.82rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
._sidebarSection_10euh_290:hover {
  background: var(--surface-hover);
}
._sidebarSectionComplete_10euh_308 {
  background: rgba(34, 197, 94, 0.12);
  border-left-color: var(--success, #22c55e);
}
._sidebarSectionIncomplete_10euh_311 {
  background: rgba(239, 68, 68, 0.08);
  border-left-color: #ef4444;
}
._sidebarSectionMeta_10euh_348 {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}
._sidebarSectionNa_10euh_353 {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 1px;
}
._sidebarHeader_10euh_243 {
  padding: 0 0 0 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* Journey color-coded left-border accents */
._journeyOnSite_10euh_367 ._sidebarSection_10euh_290,
._journeyOnSite_10euh_367._sidebarSectionCollapsed_10euh_290 {
  border-left-color: #16a34a;
}
._journeyDesktop_10euh_371 ._sidebarSection_10euh_290,
._journeyDesktop_10euh_371._sidebarSectionCollapsed_10euh_290 {
  border-left-color: #2563eb;
}
._journeyBackOffice_10euh_375 ._sidebarSection_10euh_290,
._journeyBackOffice_10euh_375._sidebarSectionCollapsed_10euh_290 {
  border-left-color: #7c3aed;
}

/* Dimmed when filtered out */
._journeyDimmed_10euh_381 {
  opacity: 0.4;
  pointer-events: none;
  transition: opacity 0.2s;
}

._formVersionFooter_10euh_387 {
  margin-top: 1.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
}

@media (max-width: 560px) {
  ._grid_10euh_43 {
    grid-template-columns: 1fr;
  }
  ._photoGrid_10euh_174 {
    grid-template-columns: 1fr;
  }
}
/*
 * SCOPE Master App — Unified Design System
 * Single source of truth for tokens, base styles, and shared utility classes.
 * Imported once per app via `import '@scope/shared/src/theme.css'` in main.tsx.
 *
 * Sections:
 *   1. Design tokens (colors, spacing, typography, radii, shadows)
 *   2. Base styles (resets, body, focus rings)
 *   3. Touch-friendly defaults (48px minimum tap targets for field use)
 *   4. Shared utility classes (.scope-btn, .scope-card, .scope-table-wrap, .scope-status-*)
 */

:root {
  color-scheme: light dark;

  /* ── Colors (light mode) ─────────────────────────────────────────── */
  /* Background scale: bg (page) → surface (cards) → surface-hover (rows on hover)
     Text scale: text-strong (headings) → text (body) → text-muted (labels, hints) */
  --bg: #f1f5f9;             /* slate-100 — slightly cooler so white cards pop */
  --surface: #ffffff;
  --surface-hover: #f1f5f9;
  --surface-elevated: #ffffff;
  --border: #cbd5e1;         /* slate-300 — was e2e8f0, stronger to see card edges */
  --border-strong: #94a3b8;
  --text-strong: #0f172a;    /* slate-900 — for h1/h2 — pitch contrast */
  --text: #1e293b;           /* slate-800 — body */
  --text-muted: #475569;     /* slate-600 — was 64748b, darker for AA contrast */
  --text-inverse: #f8fafc;

  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-soft: rgba(37, 99, 235, 0.1);

  --success: #22c55e;
  --success-soft: rgba(34, 197, 94, 0.12);
  --warning: #f59e0b;
  --warning-soft: rgba(245, 158, 11, 0.12);
  --danger: #ef4444;
  --danger-soft: rgba(239, 68, 68, 0.12);

  --rag-red: #ef4444;
  --rag-amber: #f59e0b;
  --rag-green: #22c55e;
  --rag-grey: #94a3b8;

  --accent: #2563eb;
  --accent-dim: rgba(37, 99, 235, 0.15);

  /* ── Spacing (4px scale) ─────────────────────────────────────────── */
  --space-1: 0.25rem; /*  4px */
  --space-2: 0.5rem;  /*  8px */
  --space-3: 0.75rem; /* 12px */
  --space-4: 1rem;    /* 16px */
  --space-5: 1.25rem; /* 20px */
  --space-6: 1.5rem;  /* 24px */
  --space-8: 2rem;    /* 32px */
  --space-10: 2.5rem; /* 40px */
  --space-12: 3rem;   /* 48px */

  /* ── Typography ──────────────────────────────────────────────────── */
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --font-mono: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;

  --text-xs: 0.72rem;
  --text-sm: 0.85rem;
  --text-base: 0.95rem;
  --text-md: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;

  --leading-tight: 1.25;
  --leading-normal: 1.5;
  --leading-relaxed: 1.65;

  /* ── Radii ───────────────────────────────────────────────────────── */
  --radius-sm: 4px;
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-pill: 999px;

  /* ── Shadows ─────────────────────────────────────────────────────── */
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 6px 16px rgba(15, 23, 42, 0.10);
  --shadow-lg: 0 20px 60px rgba(15, 23, 42, 0.15);

  /* ── Touch targets (CRITICAL for field workers wearing gloves) ───── */
  /* WCAG 2.5.5: minimum 24x24, recommended 44x44. We use 44 for desktop
     and bump to 48 in the touch media query. */
  --touch-min: 44px;

  /* ── Z layers ────────────────────────────────────────────────────── */
  --z-sticky: 100;
  --z-overlay: 200;
  --z-modal: 300;
  --z-toast: 400;

  /* ── Transitions ─────────────────────────────────────────────────── */
  --transition-fast: 100ms ease-out;
  --transition: 150ms ease-out;
}

/* ── Explicit overrides via UserSettingsProvider ─────────────────────
   These come BEFORE the prefers-color-scheme rule so they take priority
   when the user picks light or dark explicitly. The 'system' option does
   NOT set data-theme so prefers-color-scheme remains the source of truth. */
:root[data-theme="dark"] {
  --bg: #020617;
  --surface: #0f172a;
  --surface-hover: #1e293b;
  --surface-elevated: #1e293b;
  --border: #334155;
  --border-strong: #475569;
  --text-strong: #ffffff;
  --text: #f1f5f9;
  --text-muted: #cbd5e1;
  --text-inverse: #0f172a;
  --primary-soft: rgba(59, 130, 246, 0.18);
  --success-soft: rgba(34, 197, 94, 0.16);
  --warning-soft: rgba(245, 158, 11, 0.16);
  --danger-soft: rgba(248, 113, 113, 0.16);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 6px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.5);
}
:root[data-theme="light"] {
  --bg: #f1f5f9;
  --surface: #ffffff;
  --surface-hover: #f1f5f9;
  --surface-elevated: #ffffff;
  --border: #cbd5e1;
  --border-strong: #94a3b8;
  --text-strong: #0f172a;
  --text: #1e293b;
  --text-muted: #475569;
  --text-inverse: #f8fafc;
  --primary-soft: rgba(37, 99, 235, 0.1);
  --success-soft: rgba(34, 197, 94, 0.12);
  --warning-soft: rgba(245, 158, 11, 0.12);
  --danger-soft: rgba(239, 68, 68, 0.12);
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 6px 16px rgba(15, 23, 42, 0.10);
  --shadow-lg: 0 20px 60px rgba(15, 23, 42, 0.15);
}

/* ── Auto dark mode (only when no explicit data-theme) ─────────────── */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    /* Page background is the deepest layer; cards lift above it. */
    --bg: #020617;             /* slate-950 — was 0f172a, darker so cards stand out */
    --surface: #0f172a;        /* slate-900 — was 1e293b */
    --surface-hover: #1e293b;  /* slate-800 */
    --surface-elevated: #1e293b;
    --border: #334155;         /* slate-700 — was 475569, stronger card edges */
    --border-strong: #475569;
    --text-strong: #ffffff;    /* pure white — for headings */
    --text: #f1f5f9;           /* slate-100 — body */
    --text-muted: #cbd5e1;     /* slate-300 — was 94a3b8, much brighter for AA contrast */
    --text-inverse: #0f172a;

    --primary: #3b82f6;
    --primary-hover: #60a5fa;
    --primary-soft: rgba(59, 130, 246, 0.18);

    --success: #22c55e;
    --success-soft: rgba(34, 197, 94, 0.16);
    --warning: #f59e0b;
    --warning-soft: rgba(245, 158, 11, 0.16);
    --danger: #f87171;
    --danger-soft: rgba(248, 113, 113, 0.16);

    --rag-red: #f87171;
    --rag-amber: #fbbf24;
    --rag-green: #4ade80;
    --rag-grey: #64748b;

    --accent: #3b82f6;
    --accent-dim: rgba(59, 130, 246, 0.2);

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 6px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.5);
  }
}

/* ════════════════════════════════════════════════════════════════════
   Base resets & body
   ════════════════════════════════════════════════════════════════════ */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Avoid horizontal scrollbars on phones from rounding errors */
  overflow-x: hidden;
}

#root {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
}

/* Headings inherit the strong-contrast token so they pop on both modes
   without each component having to opt in. */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-strong);
  font-weight: 700;
  line-height: var(--leading-tight);
}

a {
  color: var(--primary);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

button {
  font-family: inherit;
}

input, select, textarea {
  font-family: inherit;
  color: var(--text);
  background: var(--surface);
}

/* Visible focus ring for keyboard navigation (accessibility). */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* ════════════════════════════════════════════════════════════════════
   Touch-friendly defaults
   On coarse pointers (touchscreens), grow tap targets to 48px and bump
   font sizes a touch so gloved hands and field tablets work properly.
   ════════════════════════════════════════════════════════════════════ */

@media (pointer: coarse) {
  :root {
    --touch-min: 48px;
  }
  button,
  input[type="button"],
  input[type="submit"],
  input[type="reset"],
  input[type="checkbox"],
  input[type="radio"],
  select,
  a[role="button"] {
    min-height: var(--touch-min);
  }
  input[type="text"],
  input[type="email"],
  input[type="number"],
  input[type="search"],
  input[type="tel"],
  input[type="url"],
  input[type="password"],
  input[type="date"],
  input[type="time"],
  textarea {
    min-height: var(--touch-min);
    font-size: max(16px, var(--text-base)); /* iOS won't zoom on focus when >= 16px */
  }
}

/* ════════════════════════════════════════════════════════════════════
   Shared utility classes — opt-in via className="scope-*"
   These give every app a consistent look without mandating a refactor.
   ════════════════════════════════════════════════════════════════════ */

/* Buttons */
.scope-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  min-height: var(--touch-min);
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
  text-decoration: none;
  white-space: nowrap;
}
.scope-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.scope-btn-primary  { background: var(--primary); color: #fff; }
.scope-btn-primary:hover:not(:disabled) { background: var(--primary-hover); }
.scope-btn-secondary { background: var(--surface-hover); color: var(--text); border-color: var(--border); }
.scope-btn-secondary:hover:not(:disabled) { background: var(--border); }
.scope-btn-ghost { background: transparent; color: var(--text-muted); border-color: var(--border); }
.scope-btn-ghost:hover:not(:disabled) { background: var(--surface-hover); }
.scope-btn-danger { background: var(--danger); color: #fff; }
.scope-btn-danger:hover:not(:disabled) { background: #b91c1c; }

/* Cards */
.scope-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
}

/* Tables — wrap in this div to get horizontal scroll on mobile */
.scope-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.scope-table-wrap > table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-size: var(--text-sm);
}
.scope-table-wrap th,
.scope-table-wrap td {
  padding: var(--space-3) var(--space-4);
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.scope-table-wrap th {
  font-weight: 600;
  color: var(--text-muted);
  background: var(--surface-hover);
  text-transform: uppercase;
  font-size: var(--text-xs);
  letter-spacing: 0.04em;
}

/* Status pills (RAG, generic) */
.scope-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 2px var(--space-3);
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.scope-pill-success { background: var(--success-soft); color: var(--success); }
.scope-pill-warning { background: var(--warning-soft); color: var(--warning); }
.scope-pill-danger  { background: var(--danger-soft);  color: var(--danger); }
.scope-pill-info    { background: var(--primary-soft); color: var(--primary); }
.scope-pill-muted   { background: var(--surface-hover); color: var(--text-muted); }

/* Form controls */
.scope-input,
.scope-select,
.scope-textarea {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-size: var(--text-base);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.scope-input:focus,
.scope-select:focus,
.scope-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--accent-dim);
  outline: none;
}
.scope-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: var(--space-1);
}

/* Loading & empty states */
.scope-loading,
.scope-empty {
  padding: var(--space-8);
  text-align: center;
  color: var(--text-muted);
  font-size: var(--text-sm);
}

/* Spinner — apply to any element via className="scope-spinner" */
.scope-spinner {
  display: inline-block;
  width: 1em;
  height: 1em;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: scope-spin 0.6s linear infinite;
}
@keyframes scope-spin {
  to { transform: rotate(360deg); }
}

/* Save status badge — use with .scope-save-status[data-state="..."] */
.scope-save-status {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
  font-weight: 600;
  border: 1px solid transparent;
}
.scope-save-status[data-state="saved"]    { background: var(--success-soft); color: var(--success); border-color: var(--success-soft); }
.scope-save-status[data-state="saving"]   { background: var(--primary-soft); color: var(--primary); border-color: var(--primary-soft); }
.scope-save-status[data-state="offline"]  { background: var(--warning-soft); color: var(--warning); border-color: var(--warning-soft); }
.scope-save-status[data-state="retrying"] { background: var(--warning-soft); color: var(--warning); border-color: var(--warning-soft); }
.scope-save-status[data-state="error"]    { background: var(--danger-soft);  color: var(--danger);  border-color: var(--danger-soft); }
.scope-save-status[data-state="idle"]     { background: var(--surface-hover); color: var(--text-muted); border-color: var(--border); }

/* ════════════════════════════════════════════════════════════════════
   Responsive helpers
   Tablet breakpoint: 720-1024px
   Mobile breakpoint: <720px
   ════════════════════════════════════════════════════════════════════ */

@media (max-width: 1024px) {
  :root {
    /* Slightly tighter spacing on tablets to fit more on-screen */
    --space-5: 1rem;
    --space-6: 1.25rem;
  }
}

@media (max-width: 720px) {
  :root {
    --text-base: 0.92rem;
    --text-sm: 0.82rem;
  }
  .scope-table-wrap > table {
    font-size: var(--text-xs);
  }
}

/* Stack any element with .scope-stack-mobile vertically below 720px */
@media (max-width: 720px) {
  .scope-stack-mobile {
    flex-direction: column !important;
    align-items: stretch !important;
  }
}

/* Hide on mobile only */
@media (max-width: 720px) {
  .scope-hide-mobile { display: none !important; }
}
/* Hide on desktop only */
@media (min-width: 721px) {
  .scope-hide-desktop { display: none !important; }
}

/* ════════════════════════════════════════════════════════════════════
   User-controlled primary colour overrides
   Set via UserSettingsProvider → <html data-primary="...">
   The default (data-primary missing) keeps the SCOPE Blue defined above.
   ════════════════════════════════════════════════════════════════════ */

:root[data-primary="teal"] {
  --primary: #0d9488;
  --primary-hover: #0f766e;
  --primary-soft: rgba(13, 148, 136, 0.12);
  --accent: #0d9488;
  --accent-dim: rgba(13, 148, 136, 0.18);
}
:root[data-primary="purple"] {
  --primary: #7c3aed;
  --primary-hover: #6d28d9;
  --primary-soft: rgba(124, 58, 237, 0.12);
  --accent: #7c3aed;
  --accent-dim: rgba(124, 58, 237, 0.18);
}
:root[data-primary="orange"] {
  --primary: #ea580c;
  --primary-hover: #c2410c;
  --primary-soft: rgba(234, 88, 12, 0.12);
  --accent: #ea580c;
  --accent-dim: rgba(234, 88, 12, 0.18);
}
:root[data-primary="green"] {
  --primary: #16a34a;
  --primary-hover: #15803d;
  --primary-soft: rgba(22, 163, 74, 0.12);
  --accent: #16a34a;
  --accent-dim: rgba(22, 163, 74, 0.18);
}
:root[data-primary="rose"] {
  --primary: #e11d48;
  --primary-hover: #be123c;
  --primary-soft: rgba(225, 29, 72, 0.12);
  --accent: #e11d48;
  --accent-dim: rgba(225, 29, 72, 0.18);
}

/* Same overrides under dark mode — ensure soft tints stay readable on dark surfaces */
:root[data-theme="dark"][data-primary="teal"]   { --primary: #2dd4bf; --primary-hover: #5eead4; --primary-soft: rgba(45, 212, 191, 0.20); --accent: #2dd4bf; --accent-dim: rgba(45, 212, 191, 0.25); }
:root[data-theme="dark"][data-primary="purple"] { --primary: #a78bfa; --primary-hover: #c4b5fd; --primary-soft: rgba(167, 139, 250, 0.22); --accent: #a78bfa; --accent-dim: rgba(167, 139, 250, 0.28); }
:root[data-theme="dark"][data-primary="orange"] { --primary: #fb923c; --primary-hover: #fdba74; --primary-soft: rgba(251, 146, 60, 0.22); --accent: #fb923c; --accent-dim: rgba(251, 146, 60, 0.28); }
:root[data-theme="dark"][data-primary="green"]  { --primary: #4ade80; --primary-hover: #86efac; --primary-soft: rgba(74, 222, 128, 0.22); --accent: #4ade80; --accent-dim: rgba(74, 222, 128, 0.28); }
:root[data-theme="dark"][data-primary="rose"]   { --primary: #fb7185; --primary-hover: #fda4af; --primary-soft: rgba(251, 113, 133, 0.22); --accent: #fb7185; --accent-dim: rgba(251, 113, 133, 0.28); }

/* ════════════════════════════════════════════════════════════════════
   User-controlled density
   Compact = tighter spacing, smaller padding/font.
   Comfortable = the default values declared in :root above.
   Spacious = roomier padding, slightly bigger font.
   ════════════════════════════════════════════════════════════════════ */

:root[data-density="compact"] {
  --space-3: 0.5rem;
  --space-4: 0.75rem;
  --space-5: 1rem;
  --space-6: 1.125rem;
  --text-base: 0.85rem;
  --text-sm: 0.78rem;
  --touch-min: 36px;
}
:root[data-density="spacious"] {
  --space-3: 1rem;
  --space-4: 1.25rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --text-base: 1.05rem;
  --text-sm: 0.95rem;
  --touch-min: 52px;
}

/* ════════════════════════════════════════════════════════════════════
   User-controlled table row height
   Drives the height of every row in `.scope-table-wrap` AND any table
   that opts in via the same data attribute.
   ════════════════════════════════════════════════════════════════════ */

:root[data-row-height="compact"] .scope-table-wrap th,
:root[data-row-height="compact"] .scope-table-wrap td {
  padding-top: var(--space-1);
  padding-bottom: var(--space-1);
}
:root[data-row-height="spacious"] .scope-table-wrap th,
:root[data-row-height="spacious"] .scope-table-wrap td {
  padding-top: var(--space-5);
  padding-bottom: var(--space-5);
}
/*
 * Per-app CSS hook.
 *
 * Design tokens, base styles, and utility classes live in
 * @scope/shared/src/theme.css and are imported once from main.tsx.
 *
 * This file is intentionally minimal — add ONLY app-specific overrides here
 * (e.g. header backgrounds, brand-specific tweaks). Token values must come
 * from the shared theme so all 8 apps stay harmonised.
 */
