/* ============================================================================
   Claim Drop Lab — employee-only AI extraction test harness
   All class names prefixed with .cdlab- to avoid collisions.
   ============================================================================ */

.cdlab-wrap {
  padding: 24px 32px;
}

.cdlab-header {
  margin-bottom: 12px;
  padding: 8px 16px;
  background: linear-gradient(135deg, #1E6332, #2F8542);
  color: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  display: flex;
  align-items: center;
  gap: 14px;
}
.cdlab-header > div { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }

.cdlab-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
}

.cdlab-dev-badge {
  background: #C19A6B;
  color: #fff;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.8px;
}

.cdlab-subtitle {
  margin: 0;
  font-size: 0.75rem;
  opacity: 0.85;
  line-height: 1.3;
}
.cdlab-dev-badge {
  font-size: 0.58rem !important;
  padding: 2px 7px !important;
}

/* Grid layout */
.cdlab-grid {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 20px;
  align-items: start;
}

.cdlab-controls {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cdlab-panel {
  background: #fff;
  border: 1px solid #e5e1da;
  border-radius: 12px;
  padding: 18px 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.cdlab-panel-title {
  margin: 0 0 12px 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: #1E6332;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cdlab-step {
  background: #1E6332;
  color: #fff;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
}

.cdlab-panel label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: #475453;
  margin-bottom: 6px;
  margin-top: 10px;
}

.cdlab-panel select,
.cdlab-panel input[type="text"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d4cfc5;
  border-radius: 8px;
  font-size: 0.88rem;
  font-family: inherit;
}
.cdlab-panel select:focus,
.cdlab-panel input:focus {
  outline: none;
  border-color: #1E6332;
  box-shadow: 0 0 0 3px rgba(30, 99, 50, 0.15);
}

/* Buttons */
.cdlab-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border: none;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s ease;
}
.cdlab-btn-primary {
  background: #1E6332;
  color: #fff;
}
.cdlab-btn-primary:hover:not(:disabled) { background: #214A3E; }
.cdlab-btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.cdlab-btn-secondary {
  background: #fff;
  color: #1E6332;
  border: 1px solid #1E6332;
}
.cdlab-btn-secondary:hover { background: #F4F0E9; }

.cdlab-btn-danger {
  background: #fff;
  color: #dc2626;
  border: 1px solid #dc2626;
}
.cdlab-btn-danger:hover { background: #fef2f2; }

.cdlab-actions {
  margin-top: 6px;
  display: flex;
  gap: 6px;
  flex-wrap: nowrap;
  align-items: stretch;
}
.cdlab-actions .cdlab-btn {
  flex: 1 1 0;
  min-width: 0;
  padding: 10px 8px;
  font-size: 0.8rem;
  white-space: nowrap;
}
.cdlab-actions .cdlab-btn i {
  font-size: 0.85rem;
}

/* Dropzone */
.cdlab-dropzone {
  margin-top: 6px;
  border: 2px dashed #c5bfb4;
  border-radius: 10px;
  padding: 24px 16px;
  text-align: center;
  background: #fafaf8;
  cursor: pointer;
  transition: all 0.15s ease;
}
.cdlab-dropzone:hover,
.cdlab-dropzone.cdlab-dragover {
  border-color: #1E6332;
  background: #F4F0E9;
}
.cdlab-dz-icon {
  font-size: 1.8rem;
  color: #1E6332;
  margin-bottom: 8px;
}
.cdlab-dropzone p { margin: 3px 0; color: #475453; font-size: 0.82rem; }
.cdlab-dz-hint { font-size: 0.72rem; color: #8b8580; }

/* File list */
.cdlab-file-list {
  list-style: none;
  padding: 0;
  margin: 10px 0 0 0;
}
.cdlab-file-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: #F4F0E9;
  border-radius: 6px;
  margin-bottom: 6px;
  font-size: 0.78rem;
}
.cdlab-file-item .cdlab-fname {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cdlab-file-item .cdlab-fmeta {
  color: #475453;
  font-size: 0.68rem;
}
.cdlab-status-chip {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
}
.cdlab-status-pending  { background: #e5e5e5; color: #475453; }
.cdlab-status-uploading{ background: #fef3c7; color: #92400e; }
.cdlab-status-uploaded { background: #d1fae5; color: #065f46; }
.cdlab-status-failed   { background: #fee2e2; color: #991b1b; }
.cdlab-rm-btn {
  background: transparent;
  border: none;
  color: #dc2626;
  cursor: pointer;
  padding: 2px 6px;
  font-size: 0.85rem;
}

.cdlab-error-banner {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  color: #991b1b;
  padding: 10px 14px;
  border-radius: 8px;
  margin-top: 10px;
  font-size: 0.82rem;
  display: none;
}
.cdlab-error-banner.cdlab-visible { display: block; }

/* Log */
.cdlab-log {
  background: #0f1419;
  color: #e5e5e5;
  font-family: 'Courier New', monospace;
  font-size: 0.72rem;
  padding: 12px;
  border-radius: 8px;
  max-height: 180px;
  overflow-y: auto;
  margin-top: 10px;
  line-height: 1.5;
}
.cdlab-log-line { margin: 2px 0; }
.cdlab-log-ts    { color: #888; }
.cdlab-log-info  { color: #60a5fa; }
.cdlab-log-ok    { color: #34d399; }
.cdlab-log-warn  { color: #fbbf24; }
.cdlab-log-error { color: #f87171; }

/* Session card */
.cdlab-session-card {
  background: #F4F0E9;
  border-radius: 8px;
  padding: 10px 14px;
  margin-top: 10px;
  font-size: 0.82rem;
}
.cdlab-sc-label {
  color: #475453;
  font-weight: 600;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.cdlab-sc-value {
  font-family: 'Courier New', monospace;
  font-size: 0.78rem;
  color: #231F20;
  word-break: break-all;
}

/* Right column: result panel + Q&A panel stacked */
.cdlab-right-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Result panel — grows naturally; page scroll handles overflow */
.cdlab-result-panel {
  min-height: 500px;
  display: flex;
  flex-direction: column;
}

.cdlab-result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.cdlab-result-header .cdlab-panel-title { margin-bottom: 0; }

.cdlab-qa-start-btn {
  animation: cdlabQaPulse 2s ease-in-out infinite;
}
@keyframes cdlabQaPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(30, 99, 50, 0.4); }
  50%      { box-shadow: 0 0 0 8px rgba(30, 99, 50, 0); }
}

/* Q&A Full-Screen Modal */
.cdlab-qa-modal {
  position: fixed;
  inset: 0;
  z-index: 10500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5vh 2.5vw;
}
.cdlab-qa-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 20, 25, 0.75);
  backdrop-filter: blur(5px);
  animation: cdlabFadeIn 0.18s ease-out;
}
.cdlab-qa-modal-dialog {
  position: relative;
  background: #fff;
  border-radius: 14px;
  width: 95vw;
  height: 95vh;
  max-width: 1800px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4);
  animation: cdlabScaleIn 0.24s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.cdlab-qa-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: linear-gradient(135deg, #1E6332, #2F8542);
  color: #fff;
  flex-shrink: 0;
}
.cdlab-qa-modal-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
}
.cdlab-qa-modal-header .cdlab-qa-close-btn {
  background: rgba(255,255,255,0.15);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.25);
}
.cdlab-qa-modal-header .cdlab-qa-close-btn:hover {
  background: #dc2626;
  border-color: #dc2626;
}

.cdlab-qa-modal-body {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(420px, 42%) 1fr;
  min-height: 0;
  overflow: hidden;
}

/* LEFT: Chat column */
.cdlab-qa-modal-left {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-right: 1px solid #e5e1da;
  background: #fafaf8;
}

/* RIGHT: Preview column */
.cdlab-qa-modal-right {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: #2a2e33;
}

.cdlab-qa-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: #1a1e22;
  color: #fff;
  flex-shrink: 0;
  border-bottom: 1px solid #000;
}
.cdlab-qa-preview-filename {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 0.85rem;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  min-width: 0;
  flex: 1;
  color: #fff;
}
.cdlab-qa-preview-controls {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.cdlab-qa-preview-viewport {
  flex: 1;
  overflow: auto;
  padding: 16px;
  position: relative;
  scrollbar-width: thin;
  scrollbar-color: #1E6332 #1a1e22;
}
.cdlab-qa-preview-viewport::-webkit-scrollbar { width: 10px; height: 10px; }
.cdlab-qa-preview-viewport::-webkit-scrollbar-track { background: #1a1e22; }
.cdlab-qa-preview-viewport::-webkit-scrollbar-thumb { background: #1E6332; border-radius: 5px; }

.cdlab-qa-preview-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #8b8580;
  text-align: center;
  padding: 20px;
}
.cdlab-qa-preview-empty i {
  font-size: 3.5rem;
  margin-bottom: 14px;
  color: #475453;
}
.cdlab-qa-preview-empty p { margin: 4px 0; font-size: 0.9rem; }
.cdlab-qa-preview-empty-sub { font-size: 0.75rem; opacity: 0.7; }

/* Pannable PDF / image container */
.cdlab-qa-pan-wrap {
  display: inline-block;
  cursor: grab;
  user-select: none;
  margin: 0 auto;
}
.cdlab-qa-pan-wrap.cdlab-grabbing { cursor: grabbing; }
.cdlab-qa-pan-wrap .cdlab-pdf-page-wrap,
.cdlab-qa-pan-wrap img {
  display: block;
  margin: 0 auto;
  background: #fff;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4);
}

/* (old .cdlab-qa-panel removed — replaced by modal above) */
.cdlab-qa-progress {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.15px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  transition: background 0.25s ease;
}
.cdlab-qa-progress:empty { display: none; }
.cdlab-qa-progress strong {
  color: #fff;
  font-weight: 800;
  font-size: 0.95rem;
  padding: 0 2px;
}
.cdlab-qa-prog-seg {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}
.cdlab-qa-prog-seg i {
  font-size: 0.75rem;
  opacity: 0.9;
}
.cdlab-qa-prog-pending {
  opacity: 0.7;
  font-weight: 500;
}
.cdlab-qa-prog-divider {
  width: 1px;
  height: 14px;
  background: rgba(255, 255, 255, 0.35);
  margin: 0 10px;
}
.cdlab-qa-progress-complete {
  background: rgba(47, 133, 66, 0.9) !important;
  border-color: rgba(255, 255, 255, 0.5) !important;
}
.cdlab-qa-progress-complete i { opacity: 1; }

/* Flash animation when the numbers change */
@keyframes cdlabProgressBump {
  0%   { transform: scale(1);    background: rgba(255, 255, 255, 0.15); }
  30%  { transform: scale(1.08); background: rgba(255, 255, 255, 0.35); }
  100% { transform: scale(1);    background: rgba(255, 255, 255, 0.15); }
}
.cdlab-qa-progress-bumped {
  animation: cdlabProgressBump 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.cdlab-qa-close-btn {
  padding: 6px 10px;
}

.cdlab-qa-chat {
  flex: 1;
  overflow-y: auto;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
  scrollbar-width: thin;
  scrollbar-color: #1E6332 #F4F0E9;
}
.cdlab-qa-chat::-webkit-scrollbar { width: 8px; }
.cdlab-qa-chat::-webkit-scrollbar-track { background: #F4F0E9; border-radius: 4px; }
.cdlab-qa-chat::-webkit-scrollbar-thumb { background: #1E6332; border-radius: 4px; }

.cdlab-qa-bubble {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 0.88rem;
  line-height: 1.5;
  animation: cdlabBubbleIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes cdlabBubbleIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.cdlab-qa-bubble-ai {
  background: #F4F0E9;
  color: #231F20;
  align-self: flex-start;
  border-top-left-radius: 4px;
}
.cdlab-qa-bubble-user {
  background: linear-gradient(135deg, #1E6332, #2F8542);
  color: #fff;
  align-self: flex-end;
  border-top-right-radius: 4px;
  font-weight: 600;
  position: relative;
}
.cdlab-qa-edit-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 10px;
  padding: 3px 9px;
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  vertical-align: middle;
}
.cdlab-qa-edit-btn:hover {
  background: #fff;
  color: #1E6332;
  border-color: #fff;
}
.cdlab-qa-edit-btn i { font-size: 0.65rem; }
.cdlab-qa-bubble-ai-typing {
  background: #F4F0E9;
  align-self: flex-start;
  padding: 12px 14px;
  border-top-left-radius: 4px;
}
.cdlab-qa-bubble-ai.error {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  color: #991b1b;
}
.cdlab-qa-bubble-ai.ready {
  background: #fff;
  border: 2px solid #1E6332;
  max-width: 100%;
  align-self: stretch;
}

.cdlab-typing-dots {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  height: 16px;
}
.cdlab-typing-dots span {
  width: 8px;
  height: 8px;
  background: #1E6332;
  border-radius: 50%;
  animation: cdlabTypingBounce 1.2s ease-in-out infinite;
}
.cdlab-typing-dots span:nth-child(2) { animation-delay: 0.15s; }
.cdlab-typing-dots span:nth-child(3) { animation-delay: 0.3s; }
@keyframes cdlabTypingBounce {
  0%, 60%, 100% { transform: translateY(0);   opacity: 0.4; }
  30%           { transform: translateY(-6px); opacity: 1; }
}

.cdlab-qa-cat {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 10px;
  margin-bottom: 6px;
  background: #1E6332;
  color: #fff;
}
.cdlab-qa-cat-fh_mismatch,
.cdlab-qa-cat-conflict,
.cdlab-qa-cat-duplicate_doc,
.cdlab-qa-cat-unrelated_doc { background: #dc2626; }
.cdlab-qa-cat-low_confidence,
.cdlab-qa-cat-missing_required { background: #f59e0b; }
.cdlab-qa-cat-ic_match,
.cdlab-qa-cat-bene_policy_link { background: #214A3E; }

.cdlab-qa-prompt {
  font-weight: 600;
  font-size: 0.93rem;
  color: #231F20;
}

/* Batch header — shown when AI returns 2+ questions together */
.cdlab-qa-batch-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  margin-bottom: 10px;
  background: #fffbeb;
  border: 1px solid #fcd34d;
  border-radius: 8px;
  color: #78350f;
  font-size: 0.8rem;
  font-weight: 600;
}
.cdlab-qa-batch-header i { color: #92400e; }

/* Each question inside a batch bubble */
.cdlab-qa-qcard {
  padding: 10px 0;
  border-top: 1px dashed #d4cfc5;
}
.cdlab-qa-qcard:first-child { border-top: none; padding-top: 0; }
.cdlab-qa-qcard:last-child  { padding-bottom: 0; }

/* Stacked input bar (one block per question) */
.cdlab-qa-batch-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.cdlab-qa-batch-item {
  padding: 14px 16px;
  background: #fafaf8;
  border: 1px solid #e5e1da;
  border-radius: 10px;
}
.cdlab-qa-batch-item-label {
  font-weight: 700;
  font-size: 0.88rem;
  color: #214A3E;
  margin-bottom: 10px;
  line-height: 1.4;
}
.cdlab-qa-batch-item-input {
  /* container for the widget */
}
.cdlab-qa-context {
  margin-top: 6px;
  font-size: 0.78rem;
  color: #475453;
  font-style: italic;
}
.cdlab-qa-current {
  margin-top: 8px;
  font-size: 0.78rem;
  color: #475453;
}
.cdlab-qa-current .cdlab-qa-cur-label {
  font-weight: 700;
  color: #1E6332;
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.3px;
}
.cdlab-qa-current code {
  background: rgba(255,255,255,0.8);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.82rem;
  color: #214A3E;
}
/* Q&A question source-info chip — display-only (not clickable) */
.cdlab-qa-sourceinfo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 5px 10px;
  background: #fff;
  border: 1px solid #e5e1da;
  border-radius: 8px;
  color: #475453;
  font-size: 0.78rem;
  font-weight: 500;
  max-width: 100%;
}
.cdlab-qa-sourceinfo i {
  color: #1E6332;
  font-size: 0.82rem;
}
.cdlab-qa-sourceinfo strong {
  color: #1E6332;
  font-weight: 700;
}
.cdlab-qa-sourceinfo span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cdlab-qa-sourceinfo-page {
  color: #8b8580;
  font-weight: 600;
  flex-shrink: 0;
}

/* Static (non-clickable) source chip on each field card.
   No hover effect, no pointer cursor, no tooltip. */
.cdlab-field .cdlab-fsource-static,
.cdlab-field .cdlab-fsource-static:hover {
  cursor: default !important;
  background: #F4F0E9 !important;
  color: #475453 !important;
  border-color: #e5e1da !important;
  transform: none !important;
  box-shadow: none !important;
}
.cdlab-field .cdlab-fsource-static .cdlab-fsource-cat,
.cdlab-field .cdlab-fsource-static:hover .cdlab-fsource-cat {
  /* category text keeps its inline color */
}
.cdlab-field .cdlab-fsource-static .cdlab-fsource-name,
.cdlab-field .cdlab-fsource-static:hover .cdlab-fsource-name {
  color: #231F20 !important;
}
.cdlab-field .cdlab-fsource-static .cdlab-fsource-page,
.cdlab-field .cdlab-fsource-static:hover .cdlab-fsource-page {
  color: #8b8580 !important;
}

/* Input bar — prominent, high-contrast area where the user answers */
.cdlab-qa-input-bar {
  padding: 18px 20px;
  border-top: 3px solid #1E6332;
  background: #fff;
  min-height: 72px;
  flex-shrink: 0;
  max-height: 50vh;
  overflow-y: auto;
  box-shadow: 0 -4px 14px rgba(30, 99, 50, 0.06);
}
.cdlab-qa-input-bar:empty {
  display: none;
}
.cdlab-qa-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.cdlab-qa-choices-list {
  flex-direction: column;
  gap: 6px;
}
.cdlab-qa-choice-btn {
  background: #fff;
  color: #1E6332;
  border: 2px solid #1E6332;
  padding: 14px 20px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  transition: all 0.15s ease;
  min-width: 140px;
}
.cdlab-qa-choice-btn:hover {
  background: #1E6332;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(30, 99, 50, 0.25);
}
.cdlab-qa-choice-btn .cdlab-qa-hint {
  font-size: 0.75rem;
  font-weight: 500;
  opacity: 0.85;
}

.cdlab-qa-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: #fafaf8;
  border: 2px solid #e5e1da;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.cdlab-qa-option:hover {
  border-color: #1E6332;
  background: #F4F0E9;
}
.cdlab-qa-option:has(input:checked) {
  border-color: #1E6332;
  background: #F4F0E9;
  box-shadow: 0 0 0 3px rgba(30, 99, 50, 0.1);
}
.cdlab-qa-option input {
  margin-top: 4px;
  accent-color: #1E6332;
  transform: scale(1.2);
}
.cdlab-qa-option strong {
  font-size: 0.95rem;
  color: #231F20;
  display: block;
  font-weight: 700;
}
.cdlab-qa-option em {
  font-size: 0.8rem;
  color: #475453;
  font-style: normal;
  display: block;
  margin-top: 3px;
  line-height: 1.4;
}
.cdlab-qa-ic-none { border-style: dashed; background: #fff; }

.cdlab-qa-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.cdlab-qa-input-bar .cdlab-btn {
  padding: 12px 22px;
  font-size: 0.95rem;
  font-weight: 700;
}
.cdlab-qa-input-bar .cdlab-btn-primary {
  box-shadow: 0 4px 12px rgba(30, 99, 50, 0.25);
}

.cdlab-qa-text-wrap {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.cdlab-qa-text-input {
  flex: 1;
  min-width: 240px;
  padding: 14px 16px;
  border: 2px solid #d4cfc5;
  border-radius: 10px;
  font-size: 1rem;
  font-family: inherit;
  font-weight: 500;
  color: #231F20;
  background: #fff;
  transition: all 0.15s ease;
}
.cdlab-qa-text-input:focus {
  outline: none;
  border-color: #1E6332;
  box-shadow: 0 0 0 4px rgba(30, 99, 50, 0.18);
}
.cdlab-qa-text-input::placeholder {
  color: #8b8580;
  font-weight: 400;
}

.cdlab-qa-bpm-wrap {
  overflow-x: auto;
  max-width: 100%;
}
.cdlab-qa-bpm-table {
  border-collapse: collapse;
  font-size: 0.8rem;
  width: 100%;
}
.cdlab-qa-bpm-table th,
.cdlab-qa-bpm-table td {
  padding: 8px 10px;
  text-align: center;
  border: 1px solid #e5e1da;
}
.cdlab-qa-bpm-table th {
  background: #F4F0E9;
  font-weight: 700;
  color: #214A3E;
}
.cdlab-qa-bpm-table .cdlab-bpm-bene {
  text-align: left;
  font-weight: 600;
  background: #fafaf8;
}
.cdlab-qa-bpm-table input { accent-color: #1E6332; transform: scale(1.2); }

.cdlab-qa-empty {
  color: #8b8580;
  padding: 12px;
  text-align: center;
  font-style: italic;
}

/* Ready state */
.cdlab-qa-ready {
  text-align: center;
  padding: 10px;
}
.cdlab-qa-ready-icon {
  font-size: 3rem;
  color: #1E6332;
  margin-bottom: 10px;
  animation: cdlabReadyPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes cdlabReadyPop {
  from { transform: scale(0); }
  to   { transform: scale(1); }
}
.cdlab-qa-ready-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #1E6332;
  margin-bottom: 8px;
}
.cdlab-qa-ready-summary {
  color: #475453;
  font-size: 0.85rem;
  max-width: 480px;
  margin: 0 auto 14px auto;
  line-height: 1.5;
}
.cdlab-qa-ready-stats {
  display: flex;
  justify-content: center;
  gap: 28px;
  margin-bottom: 16px;
  font-size: 0.88rem;
  color: #475453;
}
.cdlab-qa-ready-stats strong { color: #1E6332; font-size: 1.1rem; }
.cdlab-qa-final-btn {
  margin: 0 auto;
}
.cdlab-qa-ready-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}
.cdlab-qa-secondary-btn {
  padding: 12px 20px;
  font-weight: 600;
}
.cdlab-qa-final-btn {
  padding: 14px 28px !important;
  font-size: 1rem !important;
  font-weight: 700 !important;
  box-shadow: 0 6px 18px rgba(30, 99, 50, 0.28) !important;
}
.cdlab-inline-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: cdlabSpin 0.8s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}

.cdlab-stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.cdlab-stat-card {
  background: #F4F0E9;
  padding: 10px 12px;
  border-radius: 8px;
  text-align: center;
}
.cdlab-stat-n {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1E6332;
}
.cdlab-stat-l {
  font-size: 0.65rem;
  color: #475453;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.cdlab-tabs {
  display: flex;
  gap: 2px;
  border-bottom: 2px solid #e5e1da;
  margin-bottom: 12px;
}
.cdlab-tab {
  padding: 8px 14px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
  color: #475453;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
}
.cdlab-tab.cdlab-active {
  color: #1E6332;
  border-bottom-color: #1E6332;
}

.cdlab-tab-content {
  /* No internal scroll — let the page scroll naturally */
}

.cdlab-pre-json {
  background: #0f1419;
  color: #e5e5e5;
  padding: 14px;
  border-radius: 8px;
  overflow: auto;
  font-size: 0.72rem;
  line-height: 1.5;
  margin: 0;
  font-family: 'Courier New', monospace;
}
.cdlab-pre-json .cdlab-j-k { color: #93c5fd; }
.cdlab-pre-json .cdlab-j-s { color: #86efac; }
.cdlab-pre-json .cdlab-j-n { color: #fbbf24; }
.cdlab-pre-json .cdlab-j-b { color: #f472b6; }
.cdlab-pre-json .cdlab-j-nil { color: #9ca3af; font-style: italic; }

/* Pretty view */
.cdlab-pretty-section { margin-bottom: 18px; }
.cdlab-pretty-section h3 {
  font-size: 0.78rem;
  color: #1E6332;
  margin: 0 0 8px 0;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cdlab-field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.cdlab-field {
  background: #fafaf8;
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 0.78rem;
  border-left: 3px solid transparent;
}
.cdlab-field.cdlab-conf-high   { border-left-color: #16a34a; }
.cdlab-field.cdlab-conf-medium { border-left-color: #f59e0b; }
.cdlab-field.cdlab-conf-low    { border-left-color: #dc2626; }
.cdlab-field .cdlab-fname {
  font-weight: 700;
  color: #475453;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.cdlab-field .cdlab-fval {
  font-family: 'Courier New', monospace;
  font-size: 0.82rem;
  word-break: break-word;
}
.cdlab-field .cdlab-fsrc {
  font-size: 0.68rem;
  color: #8b8580;
  font-style: italic;
  margin-top: 4px;
}
.cdlab-field .cdlab-fconf {
  float: right;
  font-size: 0.68rem;
  color: #475453;
}
.cdlab-field.cdlab-empty .cdlab-fval { color: #bbb; font-style: italic; }

.cdlab-doc-warning {
  margin-top: 8px;
  padding: 8px 10px;
  background: #fef2f2;
  border: 1px solid #fca5a5;
  border-radius: 6px;
  color: #991b1b;
  font-size: 0.78rem;
  line-height: 1.4;
}
.cdlab-doc-warning i { margin-right: 4px; }

.cdlab-issue-card {
  background: #fff7ed;
  border-left: 3px solid #f59e0b;
  padding: 10px 12px;
  border-radius: 6px;
  margin-bottom: 8px;
  font-size: 0.8rem;
}
.cdlab-issue-card.cdlab-conflict {
  background: #fef2f2;
  border-left-color: #dc2626;
}
.cdlab-issue-card .cdlab-issue-title {
  font-weight: 700;
  color: #231F20;
}

.cdlab-sub-card {
  border: 1px solid #e5e1da;
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 10px;
}
.cdlab-sub-card-title {
  color: #1E6332;
  font-weight: 700;
  font-size: 0.82rem;
}

.cdlab-loading {
  text-align: center;
  padding: 40px 20px;
  color: #475453;
}
.cdlab-loading-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid #e5e1da;
  border-top-color: #1E6332;
  border-radius: 50%;
  animation: cdlabSpin 1s linear infinite;
  margin: 0 auto 14px auto;
}

/* Progress cycler — staged messages with bar and timer */
.cdlab-progress-loading {
  padding: 60px 24px 40px 24px;
  max-width: 540px;
  margin: 0 auto;
}
.cdlab-progress-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 1rem;
  font-weight: 600;
  color: #214A3E;
  margin-bottom: 20px;
  min-height: 28px;
}
.cdlab-progress-stage i {
  font-size: 1.3rem;
  color: #1E6332;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #F4F0E9;
  border-radius: 50%;
  flex-shrink: 0;
}
.cdlab-progress-stage span {
  text-align: left;
}
.cdlab-stage-in {
  animation: cdlabStageIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes cdlabStageIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.cdlab-progress-bar {
  width: 100%;
  height: 8px;
  background: #e5e1da;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 14px;
  position: relative;
}
.cdlab-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #1E6332, #2F8542, #1E6332);
  background-size: 200% 100%;
  border-radius: 4px;
  transition: width 0.3s ease;
  animation: cdlabProgressShimmer 2s linear infinite;
}
@keyframes cdlabProgressShimmer {
  0%   { background-position: 0% 0%; }
  100% { background-position: 200% 0%; }
}

.cdlab-progress-hint {
  font-size: 0.78rem;
  color: #8b8580;
  margin-bottom: 6px;
}
.cdlab-progress-timer {
  font-size: 0.72rem;
  color: #475453;
  font-family: 'Courier New', monospace;
  font-weight: 600;
  opacity: 0.7;
}
@keyframes cdlabSpin { to { transform: rotate(360deg); } }

.cdlab-empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #8b8580;
}
.cdlab-empty-state i {
  font-size: 3rem;
  margin-bottom: 12px;
  color: #d4cfc5;
}

/* Responsive: stack when narrow */
@media (max-width: 1100px) {
  .cdlab-grid {
    grid-template-columns: 1fr;
  }
  .cdlab-result-panel {
    max-height: none;
  }
}

/* ============================================================================
   Document Preview Modal
   ============================================================================ */
.cdlab-preview-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.cdlab-preview-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 20, 25, 0.7);
  backdrop-filter: blur(4px);
  animation: cdlabFadeIn 0.18s ease-out;
}
.cdlab-preview-dialog {
  position: relative;
  background: #fff;
  border-radius: 12px;
  width: 100%;
  max-width: 1600px;
  height: 100%;
  max-height: calc(100vh - 40px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: cdlabScaleIn 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.cdlab-preview-main {
  flex: 1;
  display: flex;
  min-height: 0;
  overflow: hidden;
}
.cdlab-preview-side {
  width: 380px;
  flex-shrink: 0;
  border-left: 1px solid #e5e1da;
  background: #fafaf7;
  display: flex;
  flex-direction: column;
  transition: width 0.2s ease;
  overflow: hidden;
}
.cdlab-preview-side.collapsed {
  width: 40px;
}
.cdlab-preview-side.collapsed .cdlab-preview-side-body,
.cdlab-preview-side.collapsed .cdlab-preview-side-header span {
  display: none;
}
.cdlab-preview-side.collapsed .cdlab-preview-side-toggle i {
  transform: rotate(180deg);
}
.cdlab-preview-side-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  background: #F4F0E9;
  border-bottom: 1px solid #e5e1da;
  font-weight: 700;
  font-size: 0.85rem;
  color: #1E6332;
  flex-shrink: 0;
}
.cdlab-preview-side-header > i:first-child { color: #1E6332; }
.cdlab-preview-side-header span { flex: 1; }
.cdlab-preview-side-toggle {
  background: transparent;
  border: none;
  color: #475453;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
  font-size: 0.8rem;
}
.cdlab-preview-side-toggle:hover { background: #e5e1da; }
.cdlab-preview-side-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px 14px;
}
.cdlab-pv-section {
  margin-bottom: 16px;
}
.cdlab-pv-section-title {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #1E6332;
  text-transform: uppercase;
  margin: 0 0 8px 0;
  padding-bottom: 4px;
  border-bottom: 1px solid #e5e1da;
}
.cdlab-pv-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 6px 8px;
  margin: 0 -8px;
  border-bottom: 1px dashed #eeeae2;
  font-size: 0.82rem;
  border-left: 3px solid transparent;
  transition: background 0.12s ease;
}
.cdlab-pv-row:last-child { border-bottom: none; }
.cdlab-pv-row-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
}
.cdlab-pv-val-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.cdlab-pv-row.cdlab-pv-current {
  background: #fff8dc;
  border-bottom-color: #f0e5b8;
}
.cdlab-pv-row.cdlab-pv-correct       { border-left-color: #2F8542; background: #edf6ee; }
.cdlab-pv-row.cdlab-pv-wrong         { border-left-color: #d97706; background: #fdf4e3; }
.cdlab-pv-row.cdlab-pv-missing       { border-left-color: #1E6332; background: #e6f0ea; }
.cdlab-pv-row.cdlab-pv-should-be-empty { border-left-color: #dc2626; background: #fbe9e9; }

.cdlab-pv-acts {
  display: flex;
  gap: 4px;
  justify-content: flex-end;
  margin-top: 2px;
}
.cdlab-pv-act {
  background: #fff;
  border: 1px solid #e5e1da;
  color: #475453;
  width: 22px;
  height: 22px;
  border-radius: 4px;
  cursor: pointer;
  padding: 0;
  font-size: 0.7rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.12s ease;
}
.cdlab-pv-act:hover { transform: translateY(-1px); box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.cdlab-pv-act-ok:hover     { background: #edf6ee; border-color: #2F8542; color: #2F8542; }
.cdlab-pv-act-edit:hover   { background: #fdf4e3; border-color: #d97706; color: #d97706; }
.cdlab-pv-act-empty:hover  { background: #fbe9e9; border-color: #dc2626; color: #dc2626; }
.cdlab-pv-act-undo:hover   { background: #eef0f3; border-color: #475453; color: #231F20; }

.cdlab-pv-stats {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: #fff;
  border: 1px solid #e5e1da;
  border-radius: 6px;
  margin-bottom: 10px;
}
.cdlab-pv-stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-right: 10px;
  border-right: 1px solid #e5e1da;
}
.cdlab-pv-stat-n { font-size: 1.1rem; font-weight: 800; color: #1E6332; line-height: 1; }
.cdlab-pv-stat-l { font-size: 0.62rem; color: #8b8580; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; margin-top: 2px; }
.cdlab-pv-export-btn {
  flex: 1;
  background: #1E6332;
  color: #fff;
  border: none;
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background 0.12s ease;
}
.cdlab-pv-export-btn:hover:not(:disabled) { background: #214A3E; }
.cdlab-pv-export-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.cdlab-pv-reset-btn {
  background: #fff;
  color: #dc2626;
  border: 1px solid #dc2626;
  width: 30px;
  height: 30px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.78rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.cdlab-pv-reset-btn:hover { background: #fef2f2; }

/* Learning badge — shows how many AI lessons are active */
.cdlab-pv-learn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  margin-bottom: 8px;
  background: linear-gradient(135deg, #1E6332, #2F8542);
  color: #fff;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 600;
}
.cdlab-pv-learn i.fa-brain { font-size: 0.82rem; }
.cdlab-pv-learn strong { font-weight: 800; }
.cdlab-pv-learn-manage {
  margin-left: auto;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  padding: 2px 8px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}
.cdlab-pv-learn-manage:hover { background: rgba(255, 255, 255, 0.28); }

/* Teaching composer inline in sidebar */
.cdlab-pv-teach {
  background: #fafaf7;
  border: 1px solid #e5e1da;
  border-radius: 8px;
  margin-bottom: 8px;
  overflow: hidden;
}
.cdlab-pv-teach > summary {
  padding: 8px 10px;
  cursor: pointer;
  font-size: 0.74rem;
  font-weight: 700;
  color: #1E6332;
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  user-select: none;
}
.cdlab-pv-teach > summary::-webkit-details-marker { display: none; }
.cdlab-pv-teach > summary::after {
  content: '\f078';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  margin-left: auto;
  font-size: 0.65rem;
  color: #8b8580;
  transition: transform 0.15s ease;
}
.cdlab-pv-teach[open] > summary::after { transform: rotate(180deg); }
.cdlab-pv-teach-hint {
  margin-left: auto;
  margin-right: 6px;
  font-weight: 500;
  color: #8b8580;
  font-size: 0.65rem;
}
.cdlab-pv-teach-body {
  padding: 8px 10px 10px 10px;
  border-top: 1px solid #e5e1da;
  background: #fff;
}
.cdlab-pv-teach-ta {
  width: 100%;
  border: 1.5px solid #e5e1da;
  border-radius: 6px;
  padding: 8px 10px;
  font-family: inherit;
  font-size: 0.78rem;
  color: #231F20;
  resize: vertical;
  outline: none;
  box-sizing: border-box;
  min-height: 60px;
}
.cdlab-pv-teach-ta:focus {
  border-color: #1E6332;
  box-shadow: 0 0 0 3px rgba(30, 99, 50, 0.12);
}
.cdlab-pv-teach-row {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}
.cdlab-pv-teach-scope {
  flex: 1;
  padding: 6px 8px;
  border: 1px solid #e5e1da;
  border-radius: 5px;
  font-size: 0.72rem;
  background: #fff;
  color: #231F20;
  min-width: 0;
}
.cdlab-pv-teach-save {
  background: #1E6332;
  color: #fff;
  border: none;
  padding: 6px 12px;
  border-radius: 5px;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
.cdlab-pv-teach-save:hover { background: #214A3E; }

/* Footer with Save & Apply button */
.cdlab-pv-footer {
  position: sticky;
  bottom: 0;
  margin: 16px -14px -12px -14px;
  padding: 12px 14px;
  background: #fff;
  border-top: 2px solid #e5e1da;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.06);
  z-index: 2;
}
.cdlab-pv-apply-btn {
  width: 100%;
  background: linear-gradient(135deg, #1E6332, #2F8542);
  color: #fff;
  border: none;
  padding: 10px 16px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 2px 6px rgba(30, 99, 50, 0.2);
  transition: transform 0.1s ease, box-shadow 0.15s ease;
}
.cdlab-pv-apply-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(30, 99, 50, 0.35);
}
.cdlab-pv-apply-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.cdlab-pv-apply-btn-flash {
  animation: cdlabApplyFlash 1.1s ease-out;
}
@keyframes cdlabApplyFlash {
  0%   { box-shadow: 0 0 0 0 rgba(47, 133, 66, 0.6); }
  50%  { box-shadow: 0 0 0 10px rgba(47, 133, 66, 0); }
  100% { box-shadow: 0 2px 6px rgba(30, 99, 50, 0.2); }
}
.cdlab-pv-footer-hint {
  font-size: 0.68rem;
  color: #8b8580;
  text-align: center;
  margin-top: 6px;
  line-height: 1.35;
}

/* Main Pretty View — highlight user-confirmed and user-corrected fields */
.cdlab-field.cdlab-field-fixed {
  border-left: 3px solid #d97706;
  background: #fef8ef;
}
.cdlab-field.cdlab-field-confirmed {
  border-left: 3px solid #2F8542;
  background: #f0f8f2;
}
.cdlab-fix-badge, .cdlab-ok-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 7px;
  border-radius: 3px;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  vertical-align: middle;
}
.cdlab-fix-badge { background: #fef3c7; color: #92400e; }
.cdlab-ok-badge  { background: #d1e7dd; color: #155724; }

/* Progress bar */
.cdlab-pv-progress {
  margin-bottom: 8px;
}
.cdlab-pv-progress-bar {
  height: 6px;
  background: #e8e4df;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 4px;
}
.cdlab-pv-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #1E6332, #2F8542);
  border-radius: 3px;
  transition: width 0.25s ease;
}
.cdlab-pv-progress-text {
  font-size: 0.72rem;
  color: #475453;
  text-align: center;
}

/* Copy button */
.cdlab-pv-copy-btn {
  background: #fff;
  color: #1E6332;
  border: 1px solid #1E6332;
  width: 30px;
  height: 30px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.78rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.cdlab-pv-copy-btn:hover:not(:disabled) { background: #F4F0E9; }
.cdlab-pv-copy-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* Filter tabs */
.cdlab-pv-filters {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
  background: #fafaf7;
  padding: 3px;
  border-radius: 6px;
}
.cdlab-pv-filter {
  flex: 1;
  background: transparent;
  border: none;
  padding: 5px 6px;
  font-size: 0.7rem;
  font-weight: 600;
  color: #475453;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.12s ease;
}
.cdlab-pv-filter:hover { color: #1E6332; }
.cdlab-pv-filter.active {
  background: #1E6332;
  color: #fff;
}

/* Section header with bulk action */
.cdlab-pv-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 8px 0;
  padding-bottom: 4px;
  border-bottom: 1px solid #e5e1da;
}
.cdlab-pv-section-head .cdlab-pv-section-title {
  margin: 0;
  padding: 0;
  border: none;
}
.cdlab-pv-bulk-btn {
  background: #fff;
  color: #2F8542;
  border: 1px solid #d6e6d9;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.cdlab-pv-bulk-btn:hover { background: #edf6ee; border-color: #2F8542; }

/* Inline editor */
.cdlab-pv-editing {
  display: inline-flex !important;
  align-items: center;
  gap: 4px;
  width: 100%;
}
.cdlab-pv-edit-input {
  flex: 1;
  padding: 4px 8px;
  border: 1.5px solid #1E6332;
  border-radius: 4px;
  font-size: 0.78rem;
  font-family: 'Courier New', monospace;
  background: #fff;
  color: #231F20;
  min-width: 0;
  outline: none;
  box-shadow: 0 0 0 3px rgba(30, 99, 50, 0.1);
}
.cdlab-pv-edit-ok,
.cdlab-pv-edit-cancel {
  background: #fff;
  border: 1px solid #e5e1da;
  width: 22px;
  height: 22px;
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  flex-shrink: 0;
}
.cdlab-pv-edit-ok { color: #2F8542; border-color: #2F8542; }
.cdlab-pv-edit-ok:hover { background: #edf6ee; }
.cdlab-pv-edit-cancel { color: #dc2626; border-color: #dc2626; }
.cdlab-pv-edit-cancel:hover { background: #fef2f2; }
.cdlab-pv-label {
  color: #8b8580;
  font-weight: 600;
  white-space: nowrap;
  text-transform: capitalize;
}
.cdlab-pv-value {
  color: #231F20;
  font-weight: 500;
  text-align: right;
  word-break: break-word;
  font-family: 'Courier New', monospace;
  font-size: 0.78rem;
}
.cdlab-pv-value.cdlab-pv-null { color: #c7c3bd; font-style: italic; }
.cdlab-pv-conf {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
  margin-left: 4px;
  vertical-align: middle;
}
.cdlab-pv-conf.high  { background: #d4edda; color: #155724; }
.cdlab-pv-conf.med   { background: #fff3cd; color: #856404; }
.cdlab-pv-conf.low   { background: #f8d7da; color: #721c24; }
.cdlab-pv-label-wrap {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}
.cdlab-pv-page {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 3px;
  background: #1E6332;
  color: #fff;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.cdlab-pv-sub {
  font-weight: 700;
  color: #475453;
  font-size: 0.75rem;
  margin: 10px 0 4px 0;
}
.cdlab-pv-empty {
  font-size: 0.8rem;
  color: #8b8580;
  font-style: italic;
  padding: 10px 0;
  text-align: center;
}
@media (max-width: 900px) {
  .cdlab-preview-side { width: 280px; }
}
@keyframes cdlabFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes cdlabScaleIn {
  from { opacity: 0; transform: scale(0.96); }
  to   { opacity: 1; transform: scale(1); }
}

.cdlab-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: linear-gradient(135deg, #1E6332, #2F8542);
  color: #fff;
  flex-shrink: 0;
  gap: 16px;
}
.cdlab-preview-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 0.95rem;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  min-width: 0;
  flex: 1;
}
.cdlab-preview-title i { opacity: 0.85; }
.cdlab-preview-title span {
  overflow: hidden;
  text-overflow: ellipsis;
}
.cdlab-preview-controls {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.cdlab-preview-btn {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background 0.15s ease;
  min-width: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.cdlab-preview-btn:hover { background: rgba(255, 255, 255, 0.28); }
.cdlab-preview-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.cdlab-preview-btn.cdlab-preview-close {
  background: rgba(255, 255, 255, 0.15);
  margin-left: 4px;
}
.cdlab-preview-btn.cdlab-preview-close:hover {
  background: #dc2626;
  border-color: #dc2626;
}
.cdlab-preview-page {
  color: #fff;
  font-size: 0.78rem;
  padding: 0 8px;
  opacity: 0.9;
  white-space: nowrap;
}
.cdlab-preview-sep {
  width: 1px;
  height: 18px;
  background: rgba(255, 255, 255, 0.25);
  margin: 0 6px;
}

.cdlab-preview-body {
  flex: 1;
  overflow: auto;
  background: #2a2e33;
  display: block;
  text-align: center;
  padding: 20px;
  position: relative;
}
.cdlab-preview-body > * {
  display: inline-block;
  vertical-align: top;
  text-align: left;
}
.cdlab-preview-loading {
  text-align: center;
  color: #e5e5e5;
  padding: 60px 20px;
}
.cdlab-preview-loading p {
  margin-top: 14px;
  font-size: 0.85rem;
}

/* PDF.js canvas container */
.cdlab-pdf-page-wrap {
  position: relative;
  background: #fff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  margin: 0 auto;
}
.cdlab-pdf-page-wrap canvas {
  display: block;
}
.cdlab-pdf-textlayer {
  position: absolute;
  inset: 0;
  overflow: hidden;
  opacity: 0.25;
  line-height: 1;
  text-align: initial;
  color: transparent;
}
.cdlab-pdf-textlayer > span {
  position: absolute;
  white-space: pre;
  cursor: text;
  transform-origin: 0% 0%;
}
.cdlab-pdf-highlight {
  position: absolute;
  background: rgba(255, 235, 59, 0.45);
  border: 2px solid #fbbf24;
  border-radius: 3px;
  pointer-events: none;
  animation: cdlabHighlightPulse 1.2s ease-in-out 2;
  z-index: 10;
}
.cdlab-quote-notfound {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  max-width: 85%;
  background: rgba(254, 243, 199, 0.97);
  border: 1px solid #f59e0b;
  border-radius: 8px;
  padding: 10px 14px;
  color: #92400e;
  font-size: 0.78rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 11;
  font-weight: 600;
}
.cdlab-quote-notfound .cdlab-quote-text {
  margin-top: 6px;
  font-style: italic;
  font-weight: 500;
  color: #78350f;
  background: rgba(255, 255, 255, 0.5);
  padding: 6px 10px;
  border-radius: 4px;
}
@keyframes cdlabHighlightPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.6); }
  50%      { box-shadow: 0 0 0 10px rgba(251, 191, 36, 0); }
}

/* Image preview */
.cdlab-preview-img-wrap {
  display: inline-block;
  background: #fff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}
.cdlab-preview-img-wrap img {
  max-width: 100%;
  max-height: calc(100vh - 160px);
  display: block;
}

/* Pan arrows — only visible when content is scrollable in that direction */
.cdlab-pan-arrow {
  position: absolute;
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(30, 99, 50, 0.85);
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  z-index: 60;
  transition: background 0.12s ease, transform 0.08s ease;
  backdrop-filter: blur(4px);
}
.cdlab-pan-arrow:hover  { background: #1E6332; transform: scale(1.08); }
.cdlab-pan-arrow:active { transform: scale(0.94); }
.cdlab-pan-up    { top: 12px;    left: 50%; transform: translateX(-50%); }
.cdlab-pan-down  { bottom: 12px; left: 50%; transform: translateX(-50%); }
.cdlab-pan-left  { left: 12px;   top: 50%;  transform: translateY(-50%); }
.cdlab-pan-right { right: 12px;  top: 50%;  transform: translateY(-50%); }
.cdlab-pan-up:hover    { transform: translateX(-50%) scale(1.08); }
.cdlab-pan-down:hover  { transform: translateX(-50%) scale(1.08); }
.cdlab-pan-left:hover  { transform: translateY(-50%) scale(1.08); }
.cdlab-pan-right:hover { transform: translateY(-50%) scale(1.08); }

/* Keep pan arrows above inline-block children rule */
.cdlab-preview-body > .cdlab-pan-arrow { display: none; }
.cdlab-preview-body > .cdlab-pan-arrow[style*="flex"] { display: flex !important; }

/* Loupe (magnifying glass that follows the cursor — always on) */
.cdlab-preview-body > .cdlab-loupe,
.cdlab-loupe {
  position: absolute;
  display: none;
  pointer-events: none;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  border: 3px solid #1E6332;
  box-shadow: 0 0 0 3px rgba(255,255,255,0.4), 0 10px 30px rgba(0,0,0,0.5);
  background-repeat: no-repeat;
  background-color: #fff;
  display: none;
  z-index: 50;
  transition: none;
}

.cdlab-preview-error {
  text-align: center;
  color: #fca5a5;
  padding: 60px 20px;
}
.cdlab-preview-error i { font-size: 2rem; margin-bottom: 10px; }

/* Source chip on each field (clickable) */
.cdlab-field .cdlab-fsource {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  padding: 3px 9px;
  background: #F4F0E9;
  color: #475453;
  border: 1px solid #e5e1da;
  border-radius: 10px;
  font-size: 0.68rem;
  cursor: pointer;
  transition: all 0.15s ease;
  font-weight: 600;
  max-width: 100%;
  overflow: hidden;
}
.cdlab-field .cdlab-fsource:not(.cdlab-fsource-static):hover {
  background: #1E6332;
  color: #fff;
  border-color: #1E6332;
}
.cdlab-field .cdlab-fsource:not(.cdlab-fsource-static):hover .cdlab-fsource-cat,
.cdlab-field .cdlab-fsource:not(.cdlab-fsource-static):hover .cdlab-fsource-name,
.cdlab-field .cdlab-fsource:not(.cdlab-fsource-static):hover .cdlab-fsource-page {
  color: #fff !important;
}
.cdlab-fsource-cat {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-weight: 700;
}
.cdlab-fsource-cat i { font-size: 0.7rem; }
.cdlab-fsource-name {
  color: #231F20;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cdlab-fsource-page {
  color: #8b8580;
  font-weight: 600;
}

/* Document classification cards */
.cdlab-doc-card {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 14px;
  background: #fafaf8;
  border: 1px solid #e5e1da;
  border-radius: 10px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.cdlab-doc-card:hover {
  border-color: #1E6332;
  background: #F4F0E9;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(30, 99, 50, 0.08);
}
.cdlab-doc-card-warn {
  background: #fef2f2;
  border-color: #fca5a5;
}
.cdlab-doc-card-warn:hover {
  background: #fee2e2;
  border-color: #dc2626;
}
.cdlab-doc-icon {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.cdlab-doc-main {
  flex: 1;
  min-width: 0;
}
.cdlab-doc-name {
  font-weight: 700;
  font-size: 0.9rem;
  color: #231F20;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-bottom: 6px;
}
.cdlab-doc-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.cdlab-doc-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.3px;
}
.cdlab-doc-sub {
  color: #8b8580;
  font-size: 0.72rem;
  font-weight: 500;
}
.cdlab-doc-sublabel {
  margin-top: 4px;
  font-size: 0.75rem;
  color: #475453;
  font-style: italic;
}

/* File list items: make clickable for preview */
.cdlab-file-item.cdlab-uploaded {
  cursor: pointer;
  transition: background 0.15s ease;
}
.cdlab-file-item.cdlab-uploaded:hover {
  background: #e8dfd0;
}
.cdlab-file-item .cdlab-eye-btn {
  background: transparent;
  border: none;
  color: #1E6332;
  cursor: pointer;
  padding: 4px 8px;
  font-size: 0.85rem;
  border-radius: 4px;
}
.cdlab-file-item .cdlab-eye-btn:hover {
  background: rgba(30, 99, 50, 0.1);
}

/* ============================================================================
   Corrections button + Learning Modal
   ========================================================================== */
.cdlab-result-header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.cdlab-corr-btn {
  position: relative;
  padding: 8px 14px;
}
.cdlab-corr-count {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 10px;
  background: #1E6332;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  min-width: 20px;
  text-align: center;
}

/* Modal shell */
.cdlab-learn-modal {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.cdlab-learn-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 20, 25, 0.65);
  backdrop-filter: blur(3px);
}
.cdlab-learn-dialog {
  position: relative;
  background: #fff;
  border-radius: 12px;
  width: 100%;
  max-width: 900px;
  height: 100%;
  max-height: calc(100vh - 40px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}
.cdlab-learn-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: linear-gradient(135deg, #1E6332, #2F8542);
  color: #fff;
  flex-shrink: 0;
}
.cdlab-learn-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1rem;
}
.cdlab-learn-stats {
  flex: 1;
  font-size: 0.78rem;
  opacity: 0.92;
}
.cdlab-learn-close {
  background: transparent;
  border: none;
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
}
.cdlab-learn-close:hover { background: rgba(255, 255, 255, 0.18); }

/* Tabs */
.cdlab-learn-tabs {
  display: flex;
  border-bottom: 1px solid #e5e1da;
  background: #fafaf7;
  flex-shrink: 0;
}
.cdlab-learn-tab {
  flex: 1;
  background: transparent;
  border: none;
  padding: 12px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #475453;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-bottom: 3px solid transparent;
}
.cdlab-learn-tab:hover { background: #f4f0e9; color: #1E6332; }
.cdlab-learn-tab-active {
  color: #1E6332;
  border-bottom-color: #1E6332;
  background: #fff;
}
.cdlab-learn-tab-count {
  background: #e5e1da;
  color: #475453;
  padding: 1px 7px;
  border-radius: 10px;
  font-size: 0.72rem;
  font-weight: 700;
}
.cdlab-learn-tab-active .cdlab-learn-tab-count {
  background: #1E6332;
  color: #fff;
}

/* Body / panes */
.cdlab-learn-body {
  flex: 1;
  overflow-y: auto;
  padding: 18px 22px;
  background: #fff;
}
.cdlab-learn-pane { display: none; }
.cdlab-learn-pane-active { display: block; }

/* Compose teaching */
.cdlab-learn-compose { margin-bottom: 16px; }
.cdlab-learn-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: #1E6332;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.cdlab-learn-hint {
  font-size: 0.78rem;
  color: #8b8580;
  margin: 0 0 8px 0;
  line-height: 1.4;
}
.cdlab-learn-hint em { color: #475453; font-style: italic; }
.cdlab-learn-textarea {
  width: 100%;
  border: 1.5px solid #e5e1da;
  border-radius: 8px;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 0.85rem;
  color: #231F20;
  resize: vertical;
  outline: none;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
  box-sizing: border-box;
}
.cdlab-learn-textarea:focus {
  border-color: #1E6332;
  box-shadow: 0 0 0 3px rgba(30, 99, 50, 0.12);
}
.cdlab-learn-compose-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.cdlab-learn-scope-label {
  font-size: 0.78rem;
  color: #475453;
  font-weight: 600;
}
.cdlab-learn-scope-select {
  flex: 1;
  min-width: 220px;
  padding: 8px 10px;
  border: 1px solid #e5e1da;
  border-radius: 6px;
  font-size: 0.82rem;
  color: #231F20;
  background: #fff;
}
.cdlab-learn-save-btn { white-space: nowrap; }
.cdlab-learn-divider {
  height: 1px;
  background: #e5e1da;
  margin: 16px 0;
}

/* List of teachings / corrections */
.cdlab-learn-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cdlab-learn-empty {
  text-align: center;
  color: #8b8580;
  padding: 30px 16px;
  font-style: italic;
  font-size: 0.85rem;
}

.cdlab-learn-item {
  border: 1px solid #e5e1da;
  border-radius: 8px;
  background: #fafaf7;
  overflow: hidden;
}
.cdlab-learn-item-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: #fff;
  border-bottom: 1px solid #eeeae2;
  flex-wrap: wrap;
}
.cdlab-learn-item-meta {
  font-size: 0.72rem;
  color: #8b8580;
  font-weight: 500;
}
.cdlab-learn-item-actions {
  margin-left: auto;
  display: flex;
  gap: 4px;
}
.cdlab-learn-icon-btn {
  background: #fff;
  border: 1px solid #e5e1da;
  width: 26px;
  height: 26px;
  border-radius: 5px;
  color: #475453;
  cursor: pointer;
  font-size: 0.72rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.cdlab-learn-icon-btn:hover { background: #F4F0E9; border-color: #1E6332; color: #1E6332; }
.cdlab-learn-icon-btn.cdlab-learn-icon-danger:hover { background: #fef2f2; border-color: #dc2626; color: #dc2626; }
.cdlab-learn-item-body {
  padding: 10px 12px;
}
.cdlab-learn-teach-note {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.45;
  color: #231F20;
}
.cdlab-learn-edit-ta { width: 100%; box-sizing: border-box; }
.cdlab-learn-edit-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  justify-content: flex-end;
}

/* Scope + status badges */
.cdlab-learn-scope-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  background: #e8f0ea;
  color: #1E6332;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.cdlab-learn-scope-badge.cdlab-learn-scope-all {
  background: #f4f0e9;
  color: #6b5a35;
}
.cdlab-learn-status-on {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  background: #d4edda;
  color: #155724;
}
.cdlab-learn-status-off {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  background: #e5e1da;
  color: #8b8580;
}
.cdlab-learn-status-pill {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Correction list specifics */
.cdlab-learn-field-path {
  font-family: 'Courier New', monospace;
  font-size: 0.75rem;
  background: #f4f0e9;
  padding: 2px 6px;
  border-radius: 3px;
  color: #475453;
}
.cdlab-learn-corr-line {
  margin: 0 0 4px 0;
  font-size: 0.83rem;
  color: #231F20;
}
.cdlab-learn-corr-line s { color: #8b8580; }
.cdlab-learn-corr-ctx {
  margin: 0;
  font-size: 0.7rem;
  color: #8b8580;
  letter-spacing: 0.02em;
}

@media (max-width: 700px) {
  .cdlab-learn-dialog { max-width: 100%; max-height: 100vh; border-radius: 0; }
  .cdlab-learn-compose-row { flex-direction: column; align-items: stretch; }
  .cdlab-learn-scope-select { min-width: 0; }
}
