/* ============================================================================
   Claim Drop — production user-facing page
   Prefix: .cd- (to avoid collisions with Claim Drop Lab's .cdlab-*)
   ============================================================================ */

#page-claim-drop { padding: 0; }

.cd-page {
  min-height: calc(100vh - 60px);
  background: linear-gradient(180deg, #F4F0E9 0%, #eef0f3 70%);
  display: flex;
  flex-direction: column;
}

/* Top bar ----------------------------------------------------------------- */
.cd-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  background: #fff;
  border-bottom: 1px solid #e5e1da;
  position: sticky;
  top: 0;
  z-index: 100;
}
.cd-topbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: #1E6332;
}
.cd-topbar-brand i {
  font-size: 1.2rem;
  color: #C19A6B;
}
.cd-topbar-title { font-size: 1.05rem; }
.cd-topbar-tag {
  color: #8b8580;
  font-size: 0.75rem;
  font-weight: 500;
  margin-left: 4px;
}
.cd-topbar-progress {
  display: flex;
  gap: 8px;
  align-items: center;
}
.cd-step-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #d4cfc5;
  transition: all 0.25s ease;
}
.cd-step-dot.active   { background: #1E6332; transform: scale(1.3); }
.cd-step-dot.complete { background: #2F8542; }
.cd-step-bar {
  width: 28px;
  height: 2px;
  background: #d4cfc5;
  transition: background 0.25s ease;
}
.cd-step-bar.complete { background: #2F8542; }

.cd-topbar-exit {
  background: #fff;
  border: 1px solid #d4cfc5;
  color: #475453;
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}
.cd-topbar-exit:hover {
  background: #fef2f2;
  border-color: #dc2626;
  color: #dc2626;
}

/* Step viewport ----------------------------------------------------------- */
.cd-step-viewport {
  flex: 1;
  position: relative;
  overflow: hidden;
}
.cd-step {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  opacity: 0;
  transform: translateX(40px);
  pointer-events: none;
  transition: opacity 0.32s ease, transform 0.32s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow-y: auto;
}
.cd-step-active {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
  z-index: 2;
}
.cd-step.cd-step-exiting {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.cd-step-center {
  width: 100%;
  max-width: 560px;
  text-align: center;
}
.cd-step-center.cd-narrow { max-width: 640px; }
.cd-step-center.cd-wide   { max-width: 820px; }

/* Summary step: take 90% of viewport width — no wasted space */
.cd-step[data-step="summary"] .cd-step-center,
.cd-step[data-step="summary"] .cd-step-center.cd-wide {
  max-width: min(1800px, 95vw);
}
/* Generous top padding so the step progress indicator + any sticky top-bar don't
   overlap the fields column / success checkmark */
.cd-step[data-step="summary"] { padding: 56px 0 24px 0; }
.cd-step[data-step="summary"] .cd-summary-check { margin-top: 4px; }

/* FH selection card — matches V3 wizard's card style */
.cd-fh-card {
  background: #fff;
  border: 1px solid #e5e1da;
  border-radius: 14px;
  padding: 22px 24px;
  text-align: left;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  margin-bottom: 8px;
}
.cd-fh-card .cd-label {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 0.85rem;
}
.cd-required {
  color: #dc2626;
  font-weight: 700;
  margin-left: 2px;
}
/* Ensure the searchable dropdown wrapper fills the card width */
.cd-fh-card .fh-dropdown-wrapper {
  width: 100%;
}
.cd-fh-card .fh-dropdown-trigger {
  padding: 14px 16px;
  border-radius: 10px;
  font-size: 1rem;
  border: 2px solid #d4cfc5;
  transition: all 0.15s ease;
}
.cd-fh-card .fh-dropdown-trigger:focus,
.cd-fh-card .fh-dropdown-wrapper.open .fh-dropdown-trigger {
  border-color: #1E6332;
  box-shadow: 0 0 0 4px rgba(30, 99, 50, 0.15);
}

.cd-step-num {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: #1E6332;
  background: #F4F0E9;
  padding: 4px 12px;
  border-radius: 10px;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.cd-step-title {
  font-size: 1.8rem;
  font-weight: 800;
  color: #214A3E;
  margin: 0 0 10px 0;
  line-height: 1.25;
}
.cd-step-sub {
  font-size: 1rem;
  color: #475453;
  line-height: 1.55;
  margin: 0 0 28px 0;
}

.cd-label {
  display: block;
  text-align: left;
  font-size: 0.8rem;
  font-weight: 700;
  color: #214A3E;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.cd-select {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid #d4cfc5;
  border-radius: 10px;
  font-size: 1rem;
  font-family: inherit;
  background: #fff;
  color: #231F20;
  transition: all 0.15s ease;
}
.cd-select:focus {
  outline: none;
  border-color: #1E6332;
  box-shadow: 0 0 0 4px rgba(30, 99, 50, 0.15);
}

.cd-step-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 32px;
}
.cd-step-actions.cd-single { justify-content: center; }

/* Buttons ----------------------------------------------------------------- */
.cd-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border: none;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s ease;
}
.cd-btn-primary {
  background: linear-gradient(135deg, #1E6332, #2F8542);
  color: #fff;
  box-shadow: 0 4px 14px rgba(30, 99, 50, 0.28);
}
.cd-btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(30, 99, 50, 0.35);
}
.cd-btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}
.cd-btn-secondary {
  background: #fff;
  color: #475453;
  border: 1.5px solid #d4cfc5;
}
.cd-btn-secondary:hover {
  background: #F4F0E9;
  border-color: #1E6332;
  color: #1E6332;
}
.cd-btn-xl {
  padding: 16px 32px;
  font-size: 1rem;
  border-radius: 12px;
}

/* Welcome ----------------------------------------------------------------- */
.cd-welcome-art {
  position: relative;
  width: 140px;
  height: 140px;
  margin: 0 auto 28px auto;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cd-welcome-art i {
  font-size: 4rem;
  color: #1E6332;
  animation: cdFloat 3s ease-in-out infinite;
}
.cd-welcome-art-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px dashed rgba(30, 99, 50, 0.3);
  animation: cdSpin 16s linear infinite;
}
.cd-welcome-art-ring-2 {
  inset: -16px;
  border-style: dotted;
  border-color: rgba(193, 154, 107, 0.4);
  animation-direction: reverse;
  animation-duration: 24s;
}
@keyframes cdSpin { to { transform: rotate(360deg); } }
@keyframes cdFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}

.cd-welcome-title {
  font-size: 2.4rem;
  font-weight: 800;
  color: #214A3E;
  margin: 0 0 12px 0;
  line-height: 1.15;
}
.cd-welcome-sub {
  font-size: 1.05rem;
  color: #475453;
  line-height: 1.6;
  margin: 0 0 28px 0;
}
.cd-welcome-steps {
  list-style: none;
  padding: 0;
  margin: 0 0 32px 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.cd-welcome-steps li {
  background: #fff;
  border: 1px solid #e5e1da;
  border-radius: 10px;
  padding: 14px 10px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #475453;
}
.cd-welcome-steps li span {
  display: block;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #1E6332;
  color: #fff;
  margin: 0 auto 8px auto;
  line-height: 26px;
  font-weight: 800;
  font-size: 0.85rem;
}
.cd-welcome-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.cd-welcome-alt {
  color: #8b8580;
  font-size: 0.85rem;
  text-decoration: none;
}
.cd-welcome-alt:hover { color: #1E6332; text-decoration: underline; }

/* Dropzone ---------------------------------------------------------------- */
.cd-dropzone {
  border: 2.5px dashed #c5bfb4;
  border-radius: 14px;
  padding: 48px 24px;
  background: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  margin-top: 16px;
}
.cd-dropzone:hover,
.cd-dropzone.cd-dropzone-dragover,
.cd-dropzone:focus {
  border-color: #1E6332;
  background: #F4F0E9;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(30, 99, 50, 0.12);
  outline: none;
}
.cd-dropzone-icon {
  font-size: 3rem;
  color: #1E6332;
  margin-bottom: 12px;
}
.cd-dropzone-text {
  font-size: 1.05rem;
  color: #231F20;
  margin-bottom: 6px;
}
.cd-dropzone-hint {
  font-size: 0.8rem;
  color: #8b8580;
}

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

.cd-file-list {
  list-style: none;
  padding: 0;
  margin: 18px 0 0 0;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cd-file-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #fff;
  border: 1px solid #e5e1da;
  border-radius: 10px;
  transition: all 0.15s ease;
}
.cd-file-item:hover { border-color: #1E6332; }
.cd-file-item.cd-file-uploaded {
  background: #f0faf4;
  border-color: #86efac;
}
.cd-file-item.cd-file-failed {
  background: #fef2f2;
  border-color: #fca5a5;
}
.cd-file-icon {
  color: #1E6332;
  font-size: 1.4rem;
  flex-shrink: 0;
}
.cd-file-main {
  flex: 1;
  min-width: 0;
}
.cd-file-name {
  font-weight: 600;
  color: #231F20;
  font-size: 0.9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cd-file-meta {
  font-size: 0.72rem;
  color: #8b8580;
  margin-top: 2px;
}
.cd-file-status {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  flex-shrink: 0;
}
.cd-file-status-pending   { background: #e5e5e5; color: #475453; }
.cd-file-status-uploading { background: #fef3c7; color: #92400e; }
.cd-file-status-uploaded  { background: #d1fae5; color: #065f46; }
.cd-file-status-failed    { background: #fee2e2; color: #991b1b; }
.cd-file-rm {
  background: transparent;
  border: none;
  color: #dc2626;
  cursor: pointer;
  padding: 4px 8px;
  font-size: 1rem;
  border-radius: 4px;
}
.cd-file-rm:hover { background: #fef2f2; }

/* Analyzing step ---------------------------------------------------------- */
.cd-step-analyze .cd-step-center {
  max-width: 580px;
}

/* Orb — pulsing concentric rings around a central icon */
.cd-analyze-orb {
  position: relative;
  width: 140px;
  height: 140px;
  margin: 0 auto 26px auto;
}
.cd-analyze-orb-core {
  position: absolute;
  inset: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1E6332, #2F8542);
  box-shadow: 0 8px 24px rgba(30, 99, 50, 0.35), inset 0 2px 6px rgba(255,255,255,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.6rem;
  animation: cdOrbFloat 2.8s ease-in-out infinite;
}
.cd-analyze-orb-core i {
  animation: cdOrbSparkle 1.8s ease-in-out infinite;
}
.cd-analyze-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(47, 133, 66, 0.45);
  opacity: 0;
  animation: cdRingPulse 2.4s ease-out infinite;
}
.cd-analyze-ring-2 { animation-delay: 0.8s; }
.cd-analyze-ring-3 { animation-delay: 1.6s; }
@keyframes cdRingPulse {
  0%   { transform: scale(0.55); opacity: 0.7; border-width: 3px; }
  80%  { opacity: 0; }
  100% { transform: scale(1.15); opacity: 0; border-width: 1px; }
}
@keyframes cdOrbFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-4px); }
}
@keyframes cdOrbSparkle {
  0%, 100% { transform: rotate(0deg) scale(1); }
  50%      { transform: rotate(12deg) scale(1.12); }
}

/* Animated trailing dots after stage text */
.cd-analyze-dots {
  display: inline-flex;
  gap: 2px;
  margin-left: 2px;
}
.cd-analyze-dots span {
  animation: cdDotBounce 1.2s infinite;
  opacity: 0.5;
}
.cd-analyze-dots span:nth-child(2) { animation-delay: 0.15s; }
.cd-analyze-dots span:nth-child(3) { animation-delay: 0.3s; }
@keyframes cdDotBounce {
  0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
  30%           { opacity: 1;   transform: translateY(-3px); }
}

/* Legacy spinner (kept for back-compat if referenced elsewhere) */
.cd-analyze-spinner {
  width: 64px;
  height: 64px;
  border: 5px solid #e5e1da;
  border-top-color: #1E6332;
  border-radius: 50%;
  animation: cdSpin 1s linear infinite;
  margin: 0 auto 24px auto;
}

/* Meta row — % and timer under the progress bar */
.cd-analyze-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: -6px;
  margin-bottom: 14px;
  font-family: 'Courier New', monospace;
  font-size: 0.82rem;
  color: #475453;
  font-weight: 600;
}
.cd-analyze-pct { color: #1E6332; }

/* Per-document list — shows each uploaded file and its live status */
.cd-analyze-doclist {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 140px;
  overflow-y: auto;
  margin: 4px 0 14px 0;
  padding: 0;
  text-align: left;
}
.cd-analyze-doc {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: #F8F6F1;
  border: 1px solid #e5e1da;
  border-radius: 8px;
  font-size: 0.82rem;
  color: #475453;
  transition: all 0.3s ease;
}
.cd-analyze-doc.is-active {
  background: #EEF7F0;
  border-color: #2F8542;
  color: #1E6332;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(30, 99, 50, 0.12);
}
.cd-analyze-doc.is-done {
  background: #fff;
  opacity: 0.75;
}
.cd-analyze-doc-icon {
  width: 22px;
  flex-shrink: 0;
  text-align: center;
  color: #8b8580;
}
.cd-analyze-doc.is-active .cd-analyze-doc-icon {
  color: #1E6332;
  animation: cdSpin 1.2s linear infinite;
}
.cd-analyze-doc.is-done .cd-analyze-doc-icon {
  color: #2F8542;
}
.cd-analyze-doc-name {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Rotating tip callout at bottom */
.cd-analyze-tip {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  background: linear-gradient(135deg, #FEF8E8, #F4F0E9);
  border: 1px solid #e5dfca;
  border-radius: 10px;
  margin-top: 14px;
  font-size: 0.82rem;
  color: #6B4A28;
  line-height: 1.45;
  text-align: left;
  animation: cdTipIn 0.5s ease;
}
.cd-analyze-tip i {
  color: #C19A6B;
  font-size: 1rem;
  margin-top: 1px;
  flex-shrink: 0;
}
.cd-analyze-tip.cd-tip-swap #cdAnalyzeTipText {
  animation: cdTipFade 0.45s ease;
}
@keyframes cdTipIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes cdTipFade {
  0%   { opacity: 0; transform: translateY(4px); }
  100% { opacity: 1; transform: translateY(0); }
}

.cd-analyze-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  font-size: 1.15rem;
  font-weight: 700;
  color: #214A3E;
  margin-bottom: 22px;
  min-height: 36px;
}
.cd-analyze-stage i {
  font-size: 1.6rem;
  color: #1E6332;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #F4F0E9;
  border-radius: 50%;
}
.cd-stage-in {
  animation: cdStageIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes cdStageIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.cd-analyze-bar {
  width: 100%;
  height: 10px;
  background: #e5e1da;
  border-radius: 5px;
  overflow: hidden;
  margin-bottom: 14px;
}
.cd-analyze-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #1E6332, #2F8542, #1E6332);
  background-size: 200% 100%;
  animation: cdShimmer 2s linear infinite;
  transition: width 0.3s ease;
}
@keyframes cdShimmer {
  to { background-position: 200% 0%; }
}
.cd-analyze-hint {
  font-size: 0.85rem;
  color: #8b8580;
  margin-bottom: 6px;
}
.cd-analyze-timer {
  font-size: 0.78rem;
  color: #475453;
  font-family: 'Courier New', monospace;
  font-weight: 600;
  opacity: 0.7;
}

/* Q&A split layout -------------------------------------------------------- */
.cd-step-qa {
  padding: 0;
}
.cd-step-qa.cd-step-active .cd-qa-split {
  animation: cdFade 0.3s ease;
}
@keyframes cdFade { from { opacity: 0; } to { opacity: 1; } }

.cd-qa-split {
  display: grid;
  grid-template-columns: minmax(420px, 42%) 1fr;
  height: 100%;
  width: 100%;
}
.cd-qa-left {
  display: flex;
  flex-direction: column;
  background: #f7f5f0;
  border-right: 1px solid #e5e1da;
  min-height: 0;
  overflow: hidden;
}

/* Form wrapper: scrollable question area + sticky submit bar */
.cd-qa-form {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  position: relative;
}
#cdQaAnswered, #cdQaCurrent {
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #1E6332 #e5e1da;
}
#cdQaAnswered::-webkit-scrollbar,
#cdQaCurrent::-webkit-scrollbar { width: 8px; }
#cdQaAnswered::-webkit-scrollbar-track,
#cdQaCurrent::-webkit-scrollbar-track { background: transparent; }
#cdQaAnswered::-webkit-scrollbar-thumb,
#cdQaCurrent::-webkit-scrollbar-thumb { background: #c5bfb4; border-radius: 4px; }

#cdQaAnswered {
  flex: 0 0 auto;
  max-height: 35%;
  padding: 10px 16px 0 16px;
}
#cdQaCurrent {
  flex: 1;
  padding: 14px 16px;
  min-height: 0;
}

/* Sticky submit bar */
.cd-qa-submitbar {
  flex-shrink: 0;
  padding: 10px 16px;
  background: #fff;
  border-top: 1px solid #e5e1da;
  box-shadow: 0 -4px 12px rgba(30, 99, 50, 0.06);
  display: flex;
  justify-content: flex-end;
}
.cd-qa-submitbar:empty { display: none; }
.cd-qa-submit-btn {
  min-width: 180px;
  padding: 13px 24px !important;
  font-size: 0.95rem !important;
  font-weight: 700 !important;
}

/* Answered summary ------------------------------------------------------ */
.cd-qa-ans-details {
  background: #fff;
  border: 1px solid #e5e1da;
  border-radius: 10px;
  padding: 0;
  margin-bottom: 12px;
}
.cd-qa-ans-details summary {
  cursor: pointer;
  padding: 10px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #1E6332;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
.cd-qa-ans-details summary::-webkit-details-marker { display: none; }
.cd-qa-ans-details summary i { color: #2F8542; }
.cd-qa-ans-toggle {
  margin-left: auto;
  font-weight: 500;
  color: #8b8580;
  font-size: 0.78rem;
}
.cd-qa-ans-details[open] .cd-qa-ans-show { display: none; }
.cd-qa-ans-details:not([open]) .cd-qa-ans-hide { display: none; }
.cd-qa-ans-body {
  padding: 4px 14px 14px 14px;
  border-top: 1px solid #f0ece3;
  margin-top: 6px;
}
.cd-qa-ans-group {
  margin-top: 8px;
}
.cd-qa-ans-group:first-child { margin-top: 2px; }
.cd-qa-ans-group-head {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.68rem;
  font-weight: 700;
  color: #8b8580;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 4px;
}
.cd-qa-ans-num {
  background: #F4F0E9;
  color: #1E6332;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.62rem;
  font-weight: 800;
}
.cd-qa-ans-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 4px 0;
  font-size: 0.82rem;
}
.cd-qa-ans-q {
  color: #475453;
  flex: 1;
}
.cd-qa-ans-a {
  color: #1E6332;
  font-weight: 600;
  text-align: right;
  flex-shrink: 0;
  max-width: 55%;
}
.cd-qa-ans-a i { font-size: 0.7rem; margin-right: 4px; }

/* Current batch: intro + cards ------------------------------------------ */
.cd-qa-batch-intro {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}
.cd-qa-batch-intro-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, #1E6332, #2F8542);
  color: #fff;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.cd-qa-batch-intro-title {
  font-weight: 800;
  color: #214A3E;
  font-size: 0.95rem;
  line-height: 1.15;
}
.cd-qa-batch-intro-sub {
  color: #8b8580;
  font-size: 0.78rem;
  margin-top: 2px;
}

/* Card stack — compact */
.cd-qa-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cd-qa-card {
  background: #fff;
  border: 1px solid #e5e1da;
  border-radius: 10px;
  padding: 12px 14px 14px 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.cd-qa-card:focus-within {
  border-color: #1E6332;
  box-shadow: 0 0 0 3px rgba(30, 99, 50, 0.08);
}

.cd-qa-card-head {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 8px;
}
.cd-qa-card-num {
  background: #F4F0E9;
  color: #1E6332;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 800;
  flex-shrink: 0;
  margin-top: 1px;
}
.cd-qa-card-prompt {
  font-size: 0.95rem;
  font-weight: 700;
  color: #214A3E;
  line-height: 1.3;
  flex: 1;
}

/* Info button + tooltip */
.cd-qa-card-info {
  position: relative;
  background: transparent;
  border: none;
  color: #8b8580;
  cursor: help;
  padding: 2px 4px;
  margin-top: 1px;
  font-size: 0.95rem;
  border-radius: 4px;
  flex-shrink: 0;
  transition: color 0.15s ease, background 0.15s ease;
}
.cd-qa-card-info:hover,
.cd-qa-card-info:focus {
  color: #1E6332;
  background: #F4F0E9;
  outline: none;
}
.cd-qa-tip {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  top: calc(100% + 8px);
  right: -4px;
  width: max-content;
  max-width: 320px;
  background: #231F20;
  color: #fff;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.5;
  text-align: left;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.25);
  z-index: 20;
  transition: opacity 0.15s ease, transform 0.15s ease;
  transform: translateY(-3px);
  pointer-events: none;
}
.cd-qa-tip::before {
  content: '';
  position: absolute;
  top: -5px;
  right: 12px;
  width: 10px;
  height: 10px;
  background: #231F20;
  transform: rotate(45deg);
}
.cd-qa-card-info:hover .cd-qa-tip,
.cd-qa-card-info:focus .cd-qa-tip {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.cd-tip-ctx     { color: #fef3c7; margin-bottom: 8px; font-style: italic; }
.cd-tip-cur     { margin-bottom: 6px; }
.cd-tip-cur-l,
.cd-tip-field-l,
.cd-tip-cat-l {
  display: inline-block;
  font-size: 0.62rem;
  color: #8b8580;
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: 0.5px;
  margin-right: 4px;
}
.cd-qa-tip code {
  background: rgba(255, 255, 255, 0.12);
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 0.78rem;
  color: #fef3c7;
}
.cd-tip-field { margin-bottom: 4px; }
.cd-tip-cat   { margin-bottom: 0; }

/* Meta row (source chip) */
.cd-qa-card-meta {
  margin-bottom: 8px;
}
.cd-qa-card-src {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  background: #fafaf8;
  border: 1px solid #e5e1da;
  border-radius: 8px;
  color: #475453;
  font-size: 0.72rem;
}
.cd-qa-card-src i { color: #1E6332; font-size: 0.7rem; }
.cd-qa-card-src-pg {
  color: #8b8580;
  font-weight: 700;
}

.cd-qa-card-input {
  margin-top: 4px;
}
/* Tighter input controls inside cards */
.cd-qa-card .cd-qa-text-input {
  padding: 10px 14px;
  font-size: 0.92rem;
  border-radius: 8px;
}
.cd-qa-card .cd-qa-option {
  padding: 10px 12px;
  border-radius: 8px;
}
.cd-qa-card .cd-qa-option strong { font-size: 0.9rem; }
.cd-qa-card .cd-qa-option em    { font-size: 0.76rem; }

/* Thinking state */
.cd-qa-thinking {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: #475453;
  text-align: center;
}
.cd-qa-thinking-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #e5e1da;
  border-top-color: #1E6332;
  border-radius: 50%;
  animation: cdSpin 0.9s linear infinite;
  margin-bottom: 14px;
}
.cd-qa-thinking p {
  font-size: 0.9rem;
  font-weight: 600;
}

/* Error card inside the form */
.cd-qa-errorcard {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  color: #991b1b;
}
.cd-qa-errorcard i {
  font-size: 2rem;
  margin-bottom: 10px;
}
.cd-qa-errmsg {
  font-size: 0.82rem;
  opacity: 0.8;
  max-width: 360px;
  margin: 4px auto 16px auto;
}

.cd-qa-bubble {
  max-width: 92%;
  padding: 12px 16px;
  border-radius: 14px;
  font-size: 0.9rem;
  line-height: 1.5;
  animation: cdBubbleIn 0.24s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes cdBubbleIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.cd-qa-b-ai {
  background: #fff;
  color: #231F20;
  align-self: flex-start;
  border: 1px solid #e5e1da;
  border-top-left-radius: 4px;
}
.cd-qa-b-user {
  background: linear-gradient(135deg, #1E6332, #2F8542);
  color: #fff;
  align-self: flex-end;
  border-top-right-radius: 4px;
  font-weight: 600;
}
.cd-qa-b-typing {
  background: #fff;
  border: 1px solid #e5e1da;
  align-self: flex-start;
  padding: 14px 16px;
  border-top-left-radius: 4px;
}
.cd-typing-dots {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}
.cd-typing-dots span {
  width: 8px;
  height: 8px;
  background: #1E6332;
  border-radius: 50%;
  animation: cdTyping 1.2s ease-in-out infinite;
}
.cd-typing-dots span:nth-child(2) { animation-delay: 0.15s; }
.cd-typing-dots span:nth-child(3) { animation-delay: 0.3s; }
@keyframes cdTyping {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30%           { transform: translateY(-6px); opacity: 1; }
}

.cd-qa-prompt {
  font-weight: 700;
  font-size: 0.96rem;
  color: #231F20;
}
.cd-qa-context {
  font-size: 0.82rem;
  color: #475453;
  margin-top: 6px;
  font-style: italic;
}
.cd-qa-current {
  margin-top: 10px;
  font-size: 0.82rem;
}
.cd-qa-current strong {
  color: #1E6332;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-right: 4px;
}
.cd-qa-current code {
  background: #F4F0E9;
  padding: 2px 8px;
  border-radius: 4px;
  color: #214A3E;
  font-size: 0.86rem;
}
.cd-qa-source {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 5px 10px;
  background: #F4F0E9;
  border: 1px solid #e5e1da;
  border-radius: 8px;
  color: #475453;
  font-size: 0.75rem;
}
.cd-qa-source i { color: #1E6332; }
.cd-qa-source strong { color: #1E6332; }

.cd-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.82rem;
  font-weight: 600;
}
.cd-qa-qcard {
  padding: 12px 0;
  border-top: 1px dashed #d4cfc5;
}
.cd-qa-qcard:first-child { border-top: none; padding-top: 0; }

/* Q&A inputs */
.cd-qa-choices {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.cd-qa-choices-list { flex-direction: column; gap: 8px; }

.cd-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;
}
.cd-qa-option:hover {
  border-color: #1E6332;
  background: #F4F0E9;
}
.cd-qa-option:has(input:checked) {
  border-color: #1E6332;
  background: #F4F0E9;
  box-shadow: 0 0 0 3px rgba(30, 99, 50, 0.1);
}
.cd-qa-option input {
  margin-top: 4px;
  accent-color: #1E6332;
  transform: scale(1.2);
}
.cd-qa-option strong {
  font-size: 0.95rem;
  color: #231F20;
  display: block;
  font-weight: 700;
}
.cd-qa-option em {
  font-size: 0.8rem;
  color: #475453;
  font-style: normal;
  display: block;
  margin-top: 3px;
}

.cd-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;
  transition: all 0.15s ease;
}
.cd-qa-choice-btn:hover {
  background: #1E6332;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(30, 99, 50, 0.25);
}

.cd-qa-text-wrap { display: flex; gap: 10px; flex-wrap: wrap; }
.cd-qa-text-input {
  flex: 1;
  min-width: 240px;
  padding: 14px 16px;
  border: 2px solid #d4cfc5;
  border-radius: 10px;
  font-size: 1rem;
  font-family: inherit;
  background: #fff;
  color: #231F20;
}
.cd-qa-text-input:focus {
  outline: none;
  border-color: #1E6332;
  box-shadow: 0 0 0 4px rgba(30, 99, 50, 0.15);
}

.cd-qa-batch-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.cd-qa-batch-item {
  padding: 14px 16px;
  background: #fafaf8;
  border: 1px solid #e5e1da;
  border-radius: 10px;
}
.cd-qa-batch-item-label {
  font-weight: 700;
  font-size: 0.9rem;
  color: #214A3E;
  margin-bottom: 10px;
  line-height: 1.4;
}
.cd-qa-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}

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

/* Q&A right pane (preview) ----------------------------------------------- */
.cd-qa-right {
  display: flex;
  flex-direction: column;
  background: #2a2e33;
  min-height: 0;
}
.cd-qa-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: #1a1e22;
  color: #fff;
  border-bottom: 1px solid #000;
}
.cd-qa-preview-name {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 0.85rem;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}
.cd-qa-preview-controls {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.cd-qa-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;
  min-width: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.cd-qa-preview-btn:hover { background: rgba(255, 255, 255, 0.28); }
.cd-qa-preview-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.cd-qa-preview-page,
.cd-qa-preview-zoom {
  color: #fff;
  font-size: 0.78rem;
  padding: 0 8px;
  opacity: 0.9;
  white-space: nowrap;
}
.cd-qa-preview-sep {
  width: 1px;
  height: 18px;
  background: rgba(255, 255, 255, 0.25);
  margin: 0 6px;
}
.cd-qa-preview-body {
  flex: 1;
  overflow: auto;
  padding: 16px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  scrollbar-width: thin;
  scrollbar-color: #1E6332 #1a1e22;
}
.cd-qa-preview-body::-webkit-scrollbar { width: 10px; height: 10px; }
.cd-qa-preview-body::-webkit-scrollbar-track { background: #1a1e22; }
.cd-qa-preview-body::-webkit-scrollbar-thumb { background: #1E6332; border-radius: 5px; }

.cd-qa-preview-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #8b8580;
  text-align: center;
  padding: 20px;
}
.cd-qa-preview-empty i {
  font-size: 3.5rem;
  margin-bottom: 14px;
  color: #475453;
}
.cd-qa-preview-loading,
.cd-qa-preview-error {
  text-align: center;
  color: #e5e5e5;
  padding: 60px 20px;
}
.cd-qa-preview-error i { color: #fca5a5; font-size: 2rem; }
.cd-pan-wrap { display: inline-block; cursor: grab; user-select: none; }
.cd-pan-wrap.grabbing { cursor: grabbing; }
.cd-pdf-wrap {
  position: relative;
  background: #fff;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4);
}

/* Summary step ------------------------------------------------------------ */
.cd-summary-check {
  font-size: 4rem;
  color: #2F8542;
  margin-bottom: 16px;
  animation: cdPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes cdPop {
  from { transform: scale(0); }
  to   { transform: scale(1); }
}
.cd-summary-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin: 24px 0;
}
.cd-summary-stat {
  background: #fff;
  border: 1px solid #e5e1da;
  border-radius: 10px;
  padding: 16px;
  text-align: center;
}
.cd-summary-stat-num {
  font-size: 1.7rem;
  font-weight: 800;
  color: #1E6332;
  line-height: 1;
}
.cd-summary-stat-label {
  font-size: 0.72rem;
  color: #475453;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 4px;
}
.cd-summary-body {
  background: #fff;
  border: 1px solid #e5e1da;
  border-radius: 12px;
  padding: 20px;
  margin-top: 8px;
  text-align: left;
}
.cd-summary-section {
  margin-bottom: 18px;
}
.cd-summary-section:last-child { margin-bottom: 0; }
.cd-summary-section h4 {
  font-size: 0.78rem;
  font-weight: 800;
  color: #1E6332;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 10px 0;
}
.cd-summary-field {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  font-size: 0.88rem;
  border-bottom: 1px dashed #f0ece3;
}
.cd-summary-field:last-child { border-bottom: none; }
.cd-summary-field .cd-k { color: #8b8580; }
.cd-summary-field .cd-v {
  color: #231F20;
  font-weight: 600;
  text-align: right;
  max-width: 60%;
}
.cd-summary-field .cd-v-empty { color: #bbb; font-style: italic; font-weight: 400; }

.cd-summary-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.cd-summary-list li {
  padding: 10px 12px;
  background: #fafaf8;
  border: 1px solid #e5e1da;
  border-radius: 8px;
  margin-bottom: 8px;
  font-size: 0.88rem;
}
.cd-summary-list li strong { color: #1E6332; }
.cd-summary-list-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

/* Done step --------------------------------------------------------------- */
.cd-done-check {
  font-size: 5rem;
  color: #2F8542;
  margin-bottom: 20px;
  animation: cdPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.cd-done-title {
  font-size: 2.2rem;
  font-weight: 800;
  color: #214A3E;
  margin-bottom: 10px;
}
.cd-done-sub {
  font-size: 1rem;
  color: #475453;
}

/* Responsive ------------------------------------------------------------- */
@media (max-width: 900px) {
  .cd-qa-split { grid-template-columns: 1fr; }
  .cd-qa-right { min-height: 280px; }
  .cd-welcome-steps { grid-template-columns: repeat(2, 1fr); }
  .cd-welcome-title { font-size: 1.8rem; }
  .cd-step-title { font-size: 1.4rem; }
}

/* ============================================================================
   New Claim Chooser Modal
   ============================================================================ */
.ncc-modal {
  position: fixed;
  inset: 0;
  z-index: 10600;
  background: rgba(15, 20, 25, 0.65);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: nccFade 0.2s ease;
}
@keyframes nccFade { from { opacity: 0; } to { opacity: 1; } }

.ncc-dialog {
  position: relative;
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 820px;
  padding: 36px 32px 32px 32px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35);
  animation: nccPop 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes nccPop {
  from { opacity: 0; transform: scale(0.94) translateY(10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.ncc-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border: none;
  background: #F4F0E9;
  color: #475453;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.1rem;
  transition: all 0.15s ease;
}
.ncc-close:hover { background: #fef2f2; color: #dc2626; }

.ncc-header {
  text-align: center;
  margin-bottom: 28px;
}
.ncc-title {
  font-size: 1.7rem;
  font-weight: 800;
  color: #214A3E;
  margin: 0 0 6px 0;
}
.ncc-sub {
  color: #475453;
  font-size: 0.95rem;
  margin: 0;
}

.ncc-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.ncc-card {
  position: relative;
  padding: 28px 24px 22px 24px;
  background: #fff;
  border: 2px solid #e5e1da;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  font-family: inherit;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ncc-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 32px rgba(30, 99, 50, 0.18);
}
.ncc-card-ai:hover {
  border-color: #1E6332;
  background: linear-gradient(135deg, #F4F0E9 0%, #ffffff 100%);
}
.ncc-card-manual:hover {
  border-color: #214A3E;
}

.ncc-badge {
  position: absolute;
  top: -10px;
  right: 20px;
  background: linear-gradient(135deg, #1E6332, #2F8542);
  color: #fff;
  padding: 4px 12px;
  border-radius: 10px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  box-shadow: 0 4px 10px rgba(30, 99, 50, 0.3);
}

.ncc-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: #F4F0E9;
  color: #1E6332;
  font-size: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ncc-card-ai .ncc-icon {
  background: linear-gradient(135deg, #1E6332, #2F8542);
  color: #fff;
  box-shadow: 0 6px 14px rgba(30, 99, 50, 0.3);
}

.ncc-card-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #214A3E;
  line-height: 1.1;
}
.ncc-card-tag {
  font-size: 0.75rem;
  color: #8b8580;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: -6px;
}

.ncc-features {
  list-style: none;
  padding: 0;
  margin: 6px 0 8px 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ncc-features li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.85rem;
  color: #475453;
  line-height: 1.4;
}
.ncc-features li i {
  color: #1E6332;
  font-size: 0.75rem;
  margin-top: 4px;
  flex-shrink: 0;
}

.ncc-card-cta {
  margin-top: auto;
  padding-top: 10px;
  font-weight: 700;
  color: #1E6332;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 6px;
}
.ncc-card:hover .ncc-card-cta i {
  transform: translateX(4px);
  transition: transform 0.2s ease;
}

@media (max-width: 640px) {
  .ncc-cards { grid-template-columns: 1fr; }
  .ncc-dialog { padding: 28px 20px 24px 20px; }
  .ncc-title { font-size: 1.4rem; }
}

/* ================= Summary page — two-column split ================= */
.cd-summary-split {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) minmax(500px, 1.6fr);
  gap: 20px;
  margin: 16px 0;
  text-align: left;
  width: 100%;
  align-items: stretch;
}
@media (max-width: 1100px) {
  .cd-summary-split { grid-template-columns: 1fr; }
}
.cd-summary-col {
  background: #fff;
  border: 1px solid #e5e1da;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.cd-summary-col-fields { padding: 16px; }
.cd-summary-review-hint {
  background: #F4F0E9;
  color: #6b5a35;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.cd-summary-review-hint i { color: #1E6332; }

.cd-summary-col-docs { min-height: 720px; }
.cd-summary-docs-header {
  padding: 10px 12px;
  background: linear-gradient(135deg, #1E6332, #2F8542);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 700;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cd-summary-docs-header > i { margin-right: 4px; }
.cd-summary-docs-tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.cd-summary-doc-tab {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.72rem;
  cursor: pointer;
  font-weight: 600;
}
.cd-summary-doc-tab:hover { background: rgba(255, 255, 255, 0.3); }
.cd-summary-doc-tab-active {
  background: #fff;
  color: #1E6332;
  border-color: #fff;
}
.cd-summary-docs-body {
  flex: 1;
  background: #2a2e33;
  min-height: 700px;
  display: flex;
  align-items: stretch;
  justify-content: center;
  position: relative;
  overflow: auto;
}
.cd-summary-docs-empty, .cd-summary-docs-loading {
  color: #c7c3bd;
  align-self: center;
  padding: 40px 20px;
  text-align: center;
  font-size: 0.9rem;
  width: 100%;
}
.cd-summary-doc-iframe {
  width: 100%;
  height: 100%;
  min-height: 700px;
  border: none;
  background: #fff;
}
.cd-summary-doc-imgwrap {
  width: 100%;
  overflow: auto;
  display: flex;
  justify-content: center;
  padding: 16px;
}
.cd-summary-doc-img {
  max-width: 100%;
  background: #fff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

/* Loupe (magnifying glass that follows the cursor) — images + rendered PDFs */
.cd-summary-loupe {
  position: absolute;
  pointer-events: none;
  width: 240px;
  height: 240px;
  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;
}

/* "Open in new tab" escape hatch for PDFs (loupe doesn't work in iframes) */
.cd-summary-pdf-tools {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 4;
  display: flex;
  gap: 6px;
}
.cd-summary-pdf-btn {
  background: rgba(255, 255, 255, 0.92);
  color: #1E6332;
  border: 1px solid #1E6332;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.cd-summary-pdf-btn:hover { background: #F4F0E9; }

/* PDF rendered via PDF.js — canvas gets the loupe treatment */
.cd-summary-pdf-canvas {
  display: block;
  background: #fff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  margin: 0 auto 16px auto;
  max-width: 100%;
}
.cd-summary-pdf-scroll {
  width: 100%;
  padding: 16px;
  overflow: auto;
}

/* Editable summary fields */
.cd-summary-field-editable {
  cursor: pointer;
  border-radius: 4px;
  padding: 2px 4px;
  margin: 0 -4px;
  transition: background 0.12s ease;
  position: relative;
}
.cd-summary-field-editable:hover {
  background: #F4F0E9;
}
.cd-summary-field-editable .cd-v-pen {
  font-size: 0.7rem;
  color: #c7c3bd;
  margin-left: 6px;
  opacity: 0;
  transition: opacity 0.12s ease;
}
.cd-summary-field-editable:hover .cd-v-pen {
  opacity: 1;
  color: #1E6332;
}
.cd-summary-field-edited {
  background: #fffbeb;
  border-left: 3px solid #f59e0b;
  padding-left: 6px;
}
.cd-v-edited {
  display: inline-block;
  background: #fef3c7;
  color: #92400e;
  font-size: 0.6rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 3px;
  margin-left: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  vertical-align: middle;
}

.cd-summary-field-editing {
  background: #fff;
  box-shadow: 0 0 0 2px #1E6332;
  cursor: default !important;
}
.cd-v-edit {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  justify-content: flex-end;
}
.cd-v-input {
  flex: 1;
  min-width: 0;
  padding: 4px 8px;
  border: 1.5px solid #1E6332;
  border-radius: 4px;
  font-size: 0.85rem;
  font-family: inherit;
  color: #231F20;
  outline: none;
  max-width: 260px;
}
.cd-v-input:focus {
  box-shadow: 0 0 0 3px rgba(30, 99, 50, 0.12);
}
.cd-v-save, .cd-v-cancel {
  background: #fff;
  border: 1px solid #e5e1da;
  width: 26px;
  height: 26px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.72rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.cd-v-save  { color: #2F8542; border-color: #2F8542; }
.cd-v-save:hover  { background: #edf6ee; }
.cd-v-cancel { color: #dc2626; border-color: #dc2626; }
.cd-v-cancel:hover { background: #fef2f2; }

/* Subsections inside policies/beneficiaries */
.cd-summary-subsection {
  background: #fafaf7;
  border: 1px solid #eeeae2;
  border-radius: 6px;
  padding: 10px;
  margin-bottom: 8px;
}
.cd-summary-subhead {
  font-size: 0.72rem;
  font-weight: 800;
  color: #1E6332;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}
.cd-summary-subhead-meta {
  font-size: 0.68rem;
  color: #8b8580;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
}

/* Learning banner on summary — "AI used N Lab lessons" */
.cd-learn-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  margin: 0 0 14px 0;
  background: linear-gradient(135deg, #F4F0E9, #e8f0ea);
  border: 1px solid #c9d9cd;
  border-left: 4px solid #1E6332;
  border-radius: 8px;
  color: #214A3E;
  font-size: 0.85rem;
  line-height: 1.45;
}
.cd-learn-banner i.fa-brain {
  font-size: 1.15rem;
  color: #1E6332;
  flex-shrink: 0;
}
.cd-learn-banner strong { font-weight: 800; color: #1E6332; }
