/* Reconciliation Co-Pilot v3 — built on Agent Chat Visual Component System
   (Figma fileKey NMu8dTBqEvGCW18ro8WU7W node 13:2779 AgentMessageBubble).
   Key tokens from the design system:
   - Bot avatar 40x40 rounded-square (radius 4), bg #2F4F57
   - Inner agent bubble bg #F0F2F7, border 1px #E0E5EB, radius 12, padding 10
   - Timestamp Inter 8px #8C9199 above bubble
   - InlineBanner white + 1px #27AE60 border + success icon
   - Action buttons pill (radius 100) with + icon, primary 500 fill
   - Footer "Helpful · Copy · Bookmark" Inter 8px #1F242B
   Plus 2026 agentic patterns: summary banner with KPIs, confidence chips,
   source-citation chips, streaming reveal, multi-step progress card. */

.reco-copilot {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  width: 100%;
}

/* ─── Summary banner (agentic header) ───────────────────────────────── */
.reco-summary-banner {
  width: 100%;
  background: linear-gradient(135deg, #0D1E22 0%, #172326 45%, #2F4F57 100%);
  color: white;
  border-radius: 10px;
  padding: 16px 20px;
  display: flex; align-items: center;
  gap: 24px;
  margin-bottom: 20px;
  box-shadow: 0 8px 24px rgba(47, 79, 87, 0.18);
  position: relative;
  overflow: hidden;
}
.reco-summary-banner::after {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(255,255,255,.12) 0%, transparent 70%);
  pointer-events: none;
}
.reco-summary-icon {
  width: 44px; height: 44px;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.reco-summary-icon img { width: 22px; height: 22px; filter: brightness(0) invert(1); }
.reco-summary-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.reco-summary-lead {
  font-family: 'Open Sans';
  font-size: 17px; line-height: 24px;
  font-weight: 700;
  letter-spacing: 0.1px;
}
.reco-summary-sub {
  font-family: 'Open Sans';
  font-size: 12px; line-height: 16px;
  font-weight: 400;
  letter-spacing: 0.15px;
  opacity: 0.86;
}
.reco-summary-stats { display: flex; gap: 18px; align-items: center; }
.reco-summary-stat {
  display: flex; flex-direction: column;
  text-align: right;
}
.reco-summary-stat .v {
  font-family: 'Open Sans';
  font-size: 17px; line-height: 22px;
  font-weight: 700;
  letter-spacing: 0.1px;
}
.reco-summary-stat .l {
  font-family: 'Open Sans';
  font-size: 10px; line-height: 13px;
  font-weight: 500;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  opacity: 0.75;
}
.reco-summary-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 12px;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 100px;
  font-family: 'Open Sans';
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  cursor: pointer;
  color: white;
  transition: background .15s;
}
.reco-summary-toggle:hover { background: rgba(255,255,255,.22); }
.reco-summary-toggle .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #6FCF97;
  box-shadow: 0 0 0 3px rgba(111,207,151,.36);
}
.reco-summary-toggle.off .dot { background: #C5C8C9; box-shadow: none; }

/* ─── Left column: Clauses ────────────────────────────────────────────── */
.reco-clauses {
  display: flex; flex-direction: column;
  gap: 12px;
  width: 418px;
  flex-shrink: 0;
}
.reco-clauses-title {
  margin: 0 0 4px;
  font-family: 'Open Sans';
  font-size: 14px; line-height: 24px;
  font-weight: 700; letter-spacing: 0.1px;
  color: #172326;
  display: flex; align-items: center; gap: 8px;
}
.reco-clauses-title .count { color: #8B9092; font-weight: 400; }

.reco-clause {
  background: #FFFFFF;
  border-radius: 8px;
  padding: 14px;
  display: flex; flex-direction: column;
  gap: 12px;
  width: 100%;
  border: 1px solid #EFEFEF;
  cursor: pointer;
  transition: border-color .25s ease, box-shadow .25s ease, transform .15s ease;
  position: relative;
  overflow: hidden;
}
.reco-clause:hover {
  border-color: #C6DDE2;
  box-shadow: 0 4px 14px rgba(53, 91, 101, 0.08);
}
.reco-clause.selected {
  border-color: #568793;
  box-shadow: 0 6px 20px rgba(53, 91, 101, 0.16);
}
.reco-clause.selected::before {
  content: '';
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, #568793 0%, #72b1c1 100%);
  pointer-events: none;
}
.reco-clause.resolved { opacity: 0.78; }

.reco-clause-top { display: flex; flex-direction: column; gap: 8px; }
.reco-clause-top-row { display: flex; align-items: center; gap: 12px; }

.reco-clause-check {
  width: 16px; height: 16px;
  border-radius: 4px;
  border: 1.5px solid #C6DDE2;
  background: white;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
  padding: 0;
  transition: background .15s, border-color .15s;
}
.reco-clause-check:hover { border-color: #568793; }
.reco-clause-check.checked { background: #568793; border-color: #568793; }
.reco-clause-check.checked::after {
  content: ''; width: 8px; height: 5px;
  border-left: 2px solid white; border-bottom: 2px solid white;
  transform: rotate(-45deg) translate(1px, -1px);
}

.reco-clause-icon-row { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.reco-clause-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, #F6F9FA 0%, #E8F2F4 100%);
  border: 1px solid #C6DDE2;
  border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: #568793;
}
.reco-clause-icon.reviewed {
  background: linear-gradient(135deg, #EEF9F2 0%, #DDF1E1 100%);
  border-color: #6FCF97;
  color: #27AE60;
}
.reco-clause-icon.warning {
  background: linear-gradient(135deg, #FEF7F1 0%, #FCE6D2 100%);
  border-color: #F2994A;
  color: #F2994A;
}
.reco-clause-icon .icon { font-size: 18px; }

.reco-clause-titles { display: flex; flex-direction: column; letter-spacing: 0.1px; flex: 1; min-width: 0; }
.reco-clause-label {
  font-family: 'Open Sans';
  font-size: 11px; line-height: 16px;
  color: #8B9092;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.reco-clause-title {
  font-family: 'Open Sans';
  font-size: 14px; line-height: 20px;
  font-weight: 700;
  color: #172326;
  letter-spacing: 0.1px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.reco-clause-desc {
  font-family: 'Open Sans';
  font-size: 13px; line-height: 18px;
  color: #5C6467;
  letter-spacing: 0.15px;
  margin: 0;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

/* Confidence chip */
.reco-confidence {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  border-radius: 30px;
  background: rgba(86,135,147,.08);
  border: 1px solid rgba(86,135,147,.18);
  font-family: 'Open Sans';
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.2px;
  color: #2F4F57;
}
.reco-confidence .meter {
  width: 28px; height: 4px;
  border-radius: 4px;
  background: rgba(86,135,147,.18);
  position: relative;
  overflow: hidden;
}
.reco-confidence .meter::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #568793 0%, #72b1c1 100%);
  border-radius: 4px;
  width: var(--conf, 90%);
}

.reco-clause-status-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.reco-status-badge {
  display: inline-flex; align-items: center; justify-content: center;
  height: 22px; padding: 0 10px;
  border-radius: 30px;
  border: 1px solid;
  font-family: 'Open Sans';
  font-size: 10px; font-weight: 600;
  letter-spacing: 0.3px;
  white-space: nowrap;
  box-sizing: border-box;
}
.reco-status-pending     { background: #F3F9FD; border-color: #2D9CDB; color: #1976A8; }
.reco-status-rejected    { background: #FEF6F6; border-color: #EB5757; color: #C42A20; }
.reco-status-approved    { background: #EEF9F2; border-color: #27AE60; color: #1F8C4D; }
.reco-status-in-progress { background: #F1FBFE; border-color: #56CCF2; color: #1E8FB6; }
.reco-status-resolved    { background: #EEF9F2; border-color: #6FCF97; color: #27AE60; }

.reco-priority-pill {
  display: inline-flex; align-items: center;
  height: 22px; padding: 0 10px;
  border-radius: 30px;
  font-family: 'Open Sans';
  font-size: 10px; font-weight: 600;
  letter-spacing: 0.3px;
  white-space: nowrap;
}
.reco-priority-critical { background: #FEF6F6; color: #EB5757; }
.reco-priority-high     { background: #FEF7F1; color: #F2994A; }
.reco-priority-medium   { background: #F6FAEC; color: #88C00D; }

/* Metrics box */
.reco-clause-metrics {
  background: linear-gradient(135deg, #F1FBFE 0%, #E8F4FA 100%);
  padding: 10px 14px;
  border-radius: 10px;
  width: 100%;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: 50px 1px 1fr;
  gap: 14px;
  align-items: center;
}
.reco-metric-charges { display: flex; flex-direction: column; }
.reco-metric-num {
  font-family: 'Open Sans';
  font-size: 13px; line-height: 18px;
  font-weight: 600;
  color: #172326;
  letter-spacing: 0.1px;
}
.reco-metric-num.primary { color: #568793; }
.reco-metric-num.danger  { color: #EB5757; }
.reco-metric-num.success { color: #27AE60; }
.reco-metric-label {
  font-family: 'Open Sans';
  font-size: 10px; line-height: 14px;
  color: #8B9092;
  letter-spacing: 0.1px;
  text-transform: uppercase;
}
.reco-metric-vdiv-tall { width: 1px; height: 56px; background: rgba(86,135,147,.18); }
.reco-metric-vdiv { width: 1px; height: 22px; background: rgba(86,135,147,.18); }
.reco-metric-grid { display: flex; flex-direction: column; gap: 6px; }
.reco-metric-row { display: grid; grid-template-columns: 1fr 1px 1fr; align-items: center; gap: 12px; }
.reco-metric-col { display: flex; flex-direction: column; min-width: 0; }
.reco-metric-hdiv { height: 1px; width: 100%; background: rgba(86,135,147,.12); }

/* ─── Right column: Co-pilot chat ────────────────────────────────────── */
.reco-copilot-col {
  flex: 1;
  min-width: 0;
  display: flex; flex-direction: column;
  gap: 12px;
}
.reco-copilot-title {
  margin: 0 0 0 8px;
  font-family: 'Open Sans';
  font-size: 14px; line-height: 24px;
  font-weight: 700; letter-spacing: 0.1px;
  color: #172326;
  display: flex; align-items: center; gap: 10px;
}
.reco-copilot-title .ai-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #27AE60;
  box-shadow: 0 0 0 3px rgba(39,174,96,.18);
  animation: aipulse 2s ease-in-out infinite;
}
@keyframes aipulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(39,174,96,.18); }
  50%      { box-shadow: 0 0 0 6px rgba(39,174,96,.06); }
}
.reco-copilot-title .muted { font-weight: 400; color: #8B9092; font-size: 12px; }

.reco-chat-sidebar {
  background: linear-gradient(180deg, #F4F5F7 0%, #EEF0F2 100%);
  border-radius: 12px;
  padding: 16px;
  display: flex; flex-direction: column;
  gap: 14px;
  min-height: 600px;
  position: relative;
}
.reco-chat-thread {
  display: flex; flex-direction: column;
  gap: 14px;
  width: 100%;
  padding-right: 6px;
}
.reco-chat-thread::-webkit-scrollbar { width: 6px; }
.reco-chat-thread::-webkit-scrollbar-thumb { background: rgba(86,135,147,.2); border-radius: 6px; }

/* ─── AgentMessageBubble (from Agent Chat DS, node 13:2779) ─────────── */
.reco-msg {
  display: flex; flex-direction: column;
  gap: 4px;
  width: 100%;
  animation: slideInLeft .35s ease;
}
.reco-msg-timestamp {
  font-family: 'Open Sans';
  font-size: 10px;
  color: #8C9199;
  margin-left: 50px;
}
.reco-msg-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  width: 100%;
}
@keyframes slideInLeft {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Bot avatar — 40x40 rounded-square (radius 4), bg #2F4F57 + Fixefy logo */
.reco-bubble-avatar {
  width: 40px; height: 40px;
  flex-shrink: 0;
  position: relative;
  display: inline-flex;
}
/* The .fxn-avatar inside inherits the size; remove redundant img filter */
.reco-bubble-avatar .fxn-avatar { border-radius: 4px !important; }
.reco-bubble-avatar img { display: block; }
.reco-bubble-avatar .online {
  position: absolute;
  bottom: -2px; right: -2px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: #27AE60;
  border: 2px solid #F4F5F7;
}
.reco-bubble-avatar.thinking::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 6px;
  border: 2px solid transparent;
  border-top-color: #72b1c1;
  border-right-color: #72b1c1;
  animation: thinkSpin 1s linear infinite;
}
@keyframes thinkSpin { to { transform: rotate(360deg); } }

/* Inner agent bubble — DS spec: bg #F0F2F7, border 1px #E0E5EB, radius 12, padding 10 */
.reco-bubble-body {
  background: #F5F9FA;
  border: 1px solid #DCE7E9;
  border-radius: 4px 12px 12px 12px;
  padding: 14px 16px;
  font-family: "Open Sans"; font-size: 14px; line-height: 22px; color: #172326;
  box-shadow: 0 1px 4px rgba(15,30,38,.05);
}
.reco-bubble-text {
  font-family: 'Open Sans';
  font-size: 14px; line-height: 21px;
  font-weight: 400;
  color: #172326;
  letter-spacing: 0.1px;
  word-break: break-word;
  margin: 0;
}
.reco-bubble-text b, .reco-bubble-text strong { font-weight: 700; color: #2F4F57; }
.reco-bubble-text .em {
  font-weight: 600;
  color: #2F4F57;
  background: rgba(86,135,147,.08);
  padding: 1px 6px;
  border-radius: 4px;
}

/* Streaming text caret */
.reco-bubble-text .stream {
  display: inline-block;
  width: 2px; height: 16px;
  background: #568793;
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: caretBlink 1s steps(1) infinite;
}
@keyframes caretBlink { 50% { opacity: 0; } }

/* InlineBanner — from DS, success variant */
.reco-banner {
  display: flex; align-items: center;
  justify-content: space-between;
  background: white;
  border: 1px solid #27AE60;
  border-radius: 8px;
  padding: 12px 14px;
  gap: 12px;
}
.reco-banner-icon {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: #27AE60;
  display: inline-flex; align-items: center; justify-content: center;
  color: white;
  flex-shrink: 0;
}
.reco-banner-icon::after {
  content: '';
  width: 8px; height: 5px;
  border-left: 2px solid white; border-bottom: 2px solid white;
  transform: rotate(-45deg) translate(1px, -1px);
}
.reco-banner-body {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column;
}
.reco-banner-text {
  font-family: 'Open Sans';
  font-size: 13px; line-height: 18px;
  color: #172326;
  letter-spacing: 0.15px;
}
.reco-banner-link {
  font-family: 'Open Sans';
  font-style: italic;
  font-size: 12px; line-height: 16px;
  color: #568793;
  cursor: pointer;
}

/* Aggregations card */
.reco-bubble-aggs {
  background: linear-gradient(135deg, #F8FAFB 0%, #EEF4F6 100%);
  border-radius: 12px;
  padding: 14px 16px;
  display: grid;
  grid-template-columns: 1fr 1px 1fr 1px 1fr;
  gap: 14px;
  align-items: center;
  border: 1px solid rgba(86,135,147,.12);
}
.reco-bubble-agg { display: flex; flex-direction: column; gap: 2px; letter-spacing: 0.1px; }
.reco-bubble-agg .num {
  font-family: 'Open Sans';
  font-size: 16px; line-height: 22px;
  font-weight: 700;
  color: #172326;
}
.reco-bubble-agg .num.danger  { color: #EB5757; }
.reco-bubble-agg .num.primary { color: #568793; }
.reco-bubble-agg .lbl {
  font-family: 'Open Sans';
  font-size: 10px; line-height: 14px;
  font-weight: 500;
  color: #8B9092;
  letter-spacing: 0.2px;
  text-transform: uppercase;
}
.reco-bubble-agg-div { width: 1px; height: 36px; background: rgba(86,135,147,.15); }

/* Source citations */
.reco-citations {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding-top: 4px;
}
.reco-citation {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px;
  background: #F4F5F7;
  border: 1px solid #E0E5EB;
  border-radius: 100px;
  font-family: 'Open Sans';
  font-size: 11px;
  font-weight: 500;
  color: #5C6467;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.reco-citation:hover { background: #E8F2F4; color: #2F4F57; border-color: #C6DDE2; }
.reco-citation .icon { font-size: 12px; color: #87ACB6; }

/* Action buttons (pill, primary 500 + icon) */
.reco-bubble-actions { display: flex; gap: 10px; width: 100%; flex-wrap: wrap; }
.reco-bubble-btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 6px;
  padding: 10px 14px;
  border-radius: 100px;
  font-family: 'Open Sans';
  font-size: 12px; line-height: 16px;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  cursor: pointer;
  flex: 1;
  border: 1.5px solid transparent;
  white-space: nowrap;
  transition: transform .12s ease, box-shadow .18s ease;
}
.reco-bubble-btn:active { transform: scale(.97); }
.reco-bubble-btn-primary {
  background: linear-gradient(135deg, #568793 0%, #72b1c1 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(86,135,147,.28);
}
.reco-bubble-btn-primary:hover { box-shadow: 0 6px 18px rgba(86,135,147,.42); }
.reco-bubble-btn-outlined {
  background: white;
  color: #568793;
  border-color: #C6DDE2;
}
.reco-bubble-btn-outlined:hover { background: rgba(86,135,147,.05); border-color: #568793; }
.reco-bubble-btn img { width: 14px; height: 14px; }
.reco-bubble-btn-primary img { filter: brightness(0) invert(1); }

/* Bubble footer — Helpful · Copy · Bookmark */
.reco-bubble-foot {
  display: flex; gap: 14px;
  padding-top: 4px;
  border-top: 1px solid #F0F0F0;
  margin-top: 4px;
}
.reco-bubble-foot button {
  background: transparent;
  border: 0;
  cursor: pointer;
  font-family: 'Open Sans';
  font-size: 11px;
  color: #8C9199;
  padding: 0;
  display: inline-flex; align-items: center; gap: 4px;
  transition: color .15s;
}
.reco-bubble-foot button:hover { color: #568793; }
.reco-bubble-foot .icon { font-size: 12px; }

/* Multi-step progress card */
.reco-progress-card {
  background: linear-gradient(135deg, #2F4F57 0%, #568793 100%);
  border-radius: 10px;
  padding: 16px 20px;
  color: white;
  display: flex; flex-direction: column;
  gap: 10px;
}
.reco-progress-title {
  font-family: 'Open Sans';
  font-size: 13px; font-weight: 700;
  letter-spacing: 0.1px;
}
.reco-progress-steps { display: flex; flex-direction: column; gap: 8px; }
.reco-progress-step {
  display: flex; align-items: center; gap: 10px;
  font-family: 'Open Sans';
  font-size: 12px;
  letter-spacing: 0.15px;
  opacity: 0.7;
  transition: opacity .3s;
}
.reco-progress-step .icon-dot {
  width: 14px; height: 14px; border-radius: 50%;
  background: rgba(255,255,255,.2);
  flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: 700;
}
.reco-progress-step.active { opacity: 1; }
.reco-progress-step.active .icon-dot { background: #6FCF97; }
.reco-progress-step.active .icon-dot::after { content: '✓'; }
.reco-progress-step.pending .icon-dot { background: rgba(255,255,255,.18); }

/* User bubble */
.reco-bubble-user-wrap { display: flex; justify-content: flex-end; width: 100%; animation: slideInRight .35s ease; }
@keyframes slideInRight {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.reco-bubble-user {
  background: linear-gradient(135deg, #568793 0%, #72b1c1 100%);
  color: white;
  border-radius: 14px 14px 4px 14px;
  padding: 10px 14px;
  display: inline-flex; align-items: center;
  gap: 8px;
  max-width: 480px;
  box-shadow: 0 4px 12px rgba(86,135,147,.22);
}
.reco-bubble-user .icon { font-size: 12px; color: white; }
.reco-bubble-user img { width: 12px; height: 12px; filter: brightness(0) invert(1); }
.reco-bubble-user span {
  font-family: 'Open Sans';
  font-size: 13px; line-height: 18px;
  font-weight: 500;
  letter-spacing: 0.1px;
}

/* Typing indicator */
.reco-bubble-typing {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 12px 16px;
  background: #FFFFFF;
  border: 1px solid #E0E5EB;
  border-radius: 4px 14px 14px 14px;
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.reco-bubble-typing .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #87ACB6;
  animation: typingBounce 1.2s ease-in-out infinite;
}
.reco-bubble-typing .dot:nth-child(2) { animation-delay: .15s; }
.reco-bubble-typing .dot:nth-child(3) { animation-delay: .3s; }
@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: .4; }
  30%          { transform: translateY(-4px); opacity: 1; }
}

/* Suggested-reply chips */
.reco-suggested {
  display: flex; gap: 8px;
  flex-wrap: wrap;
  padding: 0 4px;
  align-items: center;
}
.reco-suggested .chip {
  background: white;
  border: 1px solid #C6DDE2;
  color: #568793;
  border-radius: 100px;
  padding: 6px 14px;
  font-family: 'Open Sans';
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: all .15s ease;
}
.reco-suggested .chip:hover {
  background: linear-gradient(135deg, #568793 0%, #72b1c1 100%);
  color: white;
  border-color: transparent;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(86,135,147,.24);
}

/* Chat input */
.reco-chat-input {
  background: #FFFFFF;
  border: 1px solid #C6DDE2;
  border-radius: 14px;
  width: 100%;
  display: flex; align-items: center;
  padding: 6px 6px 6px 18px;
  box-sizing: border-box;
  box-shadow: 0 4px 12px rgba(0,0,0,.04);
  transition: border-color .15s, box-shadow .15s;
  gap: 8px;
}
.reco-chat-input:focus-within {
  border-color: #568793;
  box-shadow: 0 4px 16px rgba(86,135,147,.16);
}
.reco-chat-input input {
  flex: 1;
  border: 0; outline: none;
  font-family: 'Open Sans';
  font-size: 14px; line-height: 20px;
  color: #172326;
  background: transparent;
  padding: 10px 0;
}
.reco-chat-input input::placeholder { color: #8B9092; }
.reco-chat-shortcut {
  font-family: 'Open Sans';
  font-size: 10px; color: #8C9199;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  flex-shrink: 0;
  border: 1px solid #E0E5EB;
  padding: 3px 8px;
  border-radius: 6px;
  background: #F4F5F7;
}
.reco-chat-send {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, #568793 0%, #72b1c1 100%);
  border: 0;
  border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform .12s ease, box-shadow .18s ease;
  box-shadow: 0 4px 12px rgba(86,135,147,.32);
}
.reco-chat-send:hover { box-shadow: 0 6px 18px rgba(86,135,147,.42); }
.reco-chat-send:active { transform: scale(.94); }
.reco-chat-send img { width: 16px; height: 16px; filter: brightness(0) invert(1); }

/* Toast */
.reco-toast {
  position: fixed;
  top: 80px; right: 24px;
  z-index: 1500;
  background: linear-gradient(135deg, #2F4F57 0%, #568793 100%);
  color: white;
  padding: 14px 20px;
  border-radius: 14px;
  font-family: 'Open Sans';
  font-size: 14px; font-weight: 600;
  letter-spacing: 0.15px;
  display: inline-flex; align-items: center; gap: 10px;
  box-shadow: 0 12px 36px rgba(47,79,87,.4);
  opacity: 0;
  transform: translateX(20px);
  transition: opacity .25s, transform .25s;
  pointer-events: none;
}
.reco-toast.show { opacity: 1; transform: translateX(0); pointer-events: auto; }
.reco-toast img { width: 18px; height: 18px; filter: brightness(0) invert(1); }

/* ════════════════════════════════════════════════════════════════════════
   Devin pattern: Fixenator Investigation Plan
   ═══════════════════════════════════════════════════════════════════════ */
.reco-plan {
  background: white;
  border: 1px solid #E8ECEF;
  border-radius: 8px;
  padding: 14px 18px;
  margin-bottom: 12px;
}
.reco-plan-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.reco-plan-time {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font: 500 11px/16px "Open Sans", sans-serif;
  letter-spacing: 0.2px;
  color: #A8B4B8;
}
.reco-plan-time .icon { font-size: 13px !important; color: #A8B4B8 !important; }
.reco-plan-steps {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.reco-plan-step {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #F0F3F5;
  position: relative;
}
.reco-plan-step:last-child { border-bottom: 0; padding-bottom: 0; }
.reco-plan-step:first-child { padding-top: 0; }
.reco-plan-icon {
  width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}
.reco-plan-icon .icon { font-size: 18px !important; }
.reco-plan-step-done   .reco-plan-icon .icon { color: #27AE60 !important; }
.reco-plan-step-active .reco-plan-icon .icon { color: #568793 !important; animation: fxPulseGreen 1.8s ease-out infinite; }
.reco-plan-step-pending .reco-plan-icon .icon { color: #D0D8DC !important; }
.reco-plan-label {
  font: 500 13px/18px "Open Sans", sans-serif;
  color: #172326;
}
.reco-plan-step-pending .reco-plan-label { color: #A8B4B8; }
.reco-plan-sub {
  font: 400 11px/16px "Open Sans", sans-serif;
  letter-spacing: 0.1px;
  color: #8B9092;
  margin-top: 1px;
}

/* ════════════════════════════════════════════════════════════════════════
   Intercom Fin pattern: Confidence Handoff Line
   ═══════════════════════════════════════════════════════════════════════ */
.reco-handoff {
  border: 0;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 12px;
  box-shadow: 0 2px 12px rgba(15,30,38,.08);
}
.reco-handoff-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  height: 40px;
}
.reco-handoff-zone {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font: 600 11px/16px "Open Sans", sans-serif;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.reco-handoff-zone .icon { font-size: 15px !important; }
.reco-handoff-zone.auto   { background: rgba(39,174,96,.15); color: #27AE60; font-weight: 600; }
.reco-handoff-zone.review { background: rgba(242,153,74,.12); color: #F2994A; font-weight: 600; }
.reco-handoff-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  background: #ffffff;
  border-left: 1px dashed #E0E5EB;
  border-right: 1px dashed #E0E5EB;
  position: relative;
}
.reco-handoff-threshold {
  background: #172326;
  color: #ffffff;
  border-radius: 999px;
  padding: 3px 10px;
  font: 700 12px/16px "Open Sans", sans-serif;
  letter-spacing: 0.3px;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
}
.reco-handoff-counts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #FAFBFC;
  border-top: 1px solid #F0F2F5;
  padding: 6px 16px;
  gap: 8px;
}
.reco-hc {
  font: 500 12px/16px "Open Sans", sans-serif;
  color: #4F6063;
}
.reco-hc b { font-weight: 700; }
.reco-hc.auto   { color: #27AE60; }
.reco-hc.review { color: #F2994A; }

/* ════════════════════════════════════════════════════════════════════════
   Reco Lifecycle — Stage Stepper + Carrier Thread + Evidence Analysis
   ═══════════════════════════════════════════════════════════════════════ */

/* Copilot column header */
.reco-copilot-header {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid #F0F2F5;
  background: #ffffff;
}
.reco-copilot-name {
  font: 700 13px/18px "Open Sans", sans-serif;
  color: #172326;
  display: flex;
  align-items: center;
  gap: 6px;
  letter-spacing: 0.1px;
}
.reco-copilot-name .muted { font-weight: 400; color: #8B9092; }

/* ── Stage stepper (5 steps) ─────────────────────────────────────────── */
.reco-stage-stepper {
  display: flex;
  align-items: flex-start;
  padding: 14px 16px 12px;
  background: #FAFBFC;
  border-bottom: 1px solid #F0F2F5;
  gap: 0;
}
.reco-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  position: relative;
}
.reco-step-dot {
  width: 22px; height: 22px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  position: relative;
  z-index: 1;
  margin-bottom: 6px;
}
.step-done .reco-step-dot {
  background: var(--fx-primary-500);
}
.step-done .reco-step-dot .icon { font-size: 13px !important; color: #ffffff !important; }
.step-current .reco-step-dot {
  background: #ffffff;
  border: 2px solid var(--fx-primary-500);
}
.reco-step-ring {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--fx-primary-500);
  animation: agentPulse 1.8s ease-out infinite;
}
.step-future .reco-step-dot {
  background: #ffffff;
  border: 2px solid #E0E5EB;
}
.reco-step-line {
  position: absolute;
  top: 10px;
  left: calc(50% + 10px);
  width: calc(100% - 20px);
  height: 2px;
  background: #E0E5EB;
  z-index: 0;
}
.step-line-done { background: var(--fx-primary-500); }
.reco-step-label {
  font: 500 10px/14px "Open Sans", sans-serif;
  letter-spacing: 0.3px;
  text-align: center;
  white-space: nowrap;
}
.step-done .reco-step-label    { color: var(--fx-primary-500); font-weight: 600; }
.step-current .reco-step-label { color: #172326; font-weight: 700; }
.step-future .reco-step-label  { color: #8B9092; }

/* ── Stage CTA bar ──────────────────────────────────────────────────── */
.reco-cta-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: #ffffff;
  border-top: 1px solid #F0F2F5;
  flex-wrap: wrap;
}
.reco-cta-bar.reco-cta-analyzing {
  color: #8B9092;
  font: 500 12px/16px "Open Sans", sans-serif;
  gap: 6px;
}
.reco-cta-bar.reco-cta-analyzing .icon { font-size: 16px !important; color: var(--fx-primary-500) !important; }
.reco-cta-bar.reco-cta-waiting {
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}
.reco-cta-waiting-info {
  display: flex;
  align-items: center;
  gap: 6px;
  font: 500 12px/16px "Open Sans", sans-serif;
  color: #4F6063;
}
.reco-cta-waiting-info .icon { font-size: 16px !important; color: #F2994A !important; }
.reco-cta-waiting-info b { color: #172326; }

.reco-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 9px 18px;
  font: 600 12px/16px "Open Sans", sans-serif;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  cursor: pointer;
  border: 1.5px solid;
  transition: all .15s ease;
}
.reco-cta-btn .icon { font-size: 14px !important; }
.reco-cta-primary {
  background: var(--fx-primary-500);
  color: #ffffff;
  border-color: var(--fx-primary-500);
  box-shadow: 0 4px 16px rgba(86,135,147,.4);
  font-size: 13px !important;
  padding: 10px 20px !important;
}
.reco-cta-primary:hover { background: var(--fx-primary-700); border-color: var(--fx-primary-700); }
.reco-cta-ghost {
  background: transparent;
  color: #8B9092;
  border-color: #E0E5EB;
}
.reco-cta-ghost:hover { color: var(--fx-primary-500); border-color: var(--fx-primary-300); }
.reco-cta-demo {
  background: rgba(86,135,147,.08);
  color: var(--fx-primary-500);
  border-color: rgba(86,135,147,.3);
  font-size: 11px;
  letter-spacing: 0.3px;
}
.reco-cta-demo:hover { background: rgba(86,135,147,.06); }
.reco-cta-badge {
  background: rgba(255,255,255,.2);
  border-radius: 999px;
  padding: 1px 8px;
  font: 600 10px/14px "Open Sans", sans-serif;
  letter-spacing: 0.2px;
}
.reco-cta-resolved {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: rgba(39,174,96,.06);
  border-top: 1px solid rgba(39,174,96,.2);
}
.reco-cta-resolved .icon { font-size: 22px !important; }
.reco-cta-resolved-title {
  font: 600 13px/18px "Open Sans", sans-serif;
  color: #27AE60;
}
.reco-cta-resolved-sub {
  font: 400 11px/16px "Open Sans", sans-serif;
  color: #8B9092;
  margin-top: 2px;
}

/* ── System events in thread ─────────────────────────────────────────── */
.reco-sys-event {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: rgba(86,135,147,.06);
  border-left: 3px solid var(--fx-primary-300);
  border-radius: 0 6px 6px 0;
  margin: 8px 0;
  font: 500 12px/16px "Open Sans", sans-serif;
  color: #4F6063;
}
.reco-sys-icon .icon { font-size: 16px !important; color: var(--fx-primary-500) !important; }

/* ── Carrier message ─────────────────────────────────────────────────── */
.reco-carrier-msg {
  margin: 12px 0;
  animation: fxCardIn .3s cubic-bezier(.2,.7,.2,1);
}
.reco-carrier-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.reco-carrier-avatar {
  width: 28px; height: 28px;
  border-radius: 6px;
  background: linear-gradient(135deg, #EB5757 0%, #C42A20 100%);
  color: #ffffff;
  font: 700 11px/28px "Open Sans", sans-serif;
  text-align: center;
  flex-shrink: 0;
}
.reco-carrier-name {
  font: 700 12px/16px "Open Sans", sans-serif;
  color: #172326;
}
.reco-carrier-time {
  font: 400 11px/16px "Open Sans", sans-serif;
  color: #8B9092;
}
.reco-carrier-bubble {
  background: #FEF7F1;
  border: 1px solid rgba(235,87,87,.2);
  border-left: 3px solid #EB5757;
  border-radius: 0 8px 8px 8px;
  padding: 12px 14px;
  font: 400 13px/20px "Open Sans", sans-serif;
  color: #2F4F57;
}
.reco-carrier-evidence {
  margin-top: 8px;
  padding: 10px 12px;
  background: #FEF5F5;
  border-radius: 6px;
}
.reco-carrier-ev-label {
  display: flex;
  align-items: center;
  gap: 5px;
  font: 600 11px/16px "Open Sans", sans-serif;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  color: #8B9092;
  margin-bottom: 6px;
}
.reco-carrier-ev-label .icon { font-size: 14px !important; }
.reco-carrier-ev-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font: 500 12px/18px "Open Sans", sans-serif;
  color: #4F6063;
  margin-bottom: 2px;
}
.reco-carrier-ev-item .icon { font-size: 14px !important; color: #EB5757 !important; }

/* ── Fixenator evidence analysis card ───────────────────────────────── */
.reco-analysis-card {
  background: #ffffff;
  border: 1px solid rgba(86,135,147,.2);
  border-left: 3px solid var(--fx-primary-500);
  border-radius: 0 8px 8px 8px;
  padding: 14px 16px;
  margin: 10px 0 12px;
  animation: fxCardIn .35s cubic-bezier(.2,.7,.2,1);
}
.reco-analysis-header {
  margin-bottom: 10px;
}
.reco-analysis-strength {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.reco-str-label {
  font: 500 12px/16px "Open Sans", sans-serif;
  color: #8B9092;
}
.reco-str-badge {
  border-radius: 999px;
  padding: 2px 10px;
  font: 700 11px/16px "Open Sans", sans-serif;
  letter-spacing: 0.2px;
}
.reco-str-bar {
  flex: 1;
  height: 4px;
  background: #F0F2F5;
  border-radius: 999px;
  overflow: hidden;
  min-width: 60px;
}
.reco-str-fill {
  height: 100%;
  border-radius: 999px;
  transition: width .6s ease;
}
.reco-analysis-body {
  font: 400 13px/20px "Open Sans", sans-serif;
  color: #2F4F57;
  margin-bottom: 10px;
}
.reco-analysis-rec {
  display: flex;
  align-items: center;
  gap: 6px;
  font: 600 12px/16px "Open Sans", sans-serif;
  color: var(--fx-primary-500);
  background: rgba(86,135,147,.06);
  border-radius: 6px;
  padding: 8px 10px;
}
.reco-analysis-rec .icon { font-size: 16px !important; }
.reco-analysis-rec b { color: #172326; }

/* ── Resolution moment ──────────────────────────────────────────────── */
.reco-resolution {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: rgba(39,174,96,.06);
  border: 1px solid rgba(39,174,96,.2);
  border-radius: 8px;
  margin: 12px 0;
  animation: fxCardIn .4s cubic-bezier(.2,.7,.2,1);
}
.reco-res-icon .icon { font-size: 28px !important; }
.reco-res-title {
  font: 700 14px/20px "Open Sans", sans-serif;
}
.reco-res-sub {
  font: 400 12px/16px "Open Sans", sans-serif;
  color: #8B9092;
  margin-top: 2px;
}

/* ── Fixenator followup bubble (post-action) ─────────────────────────── */
.reco-bubble-followup {
  background: rgba(86,135,147,.12);
  border: 1px solid rgba(86,135,147,.2);
  border-radius: 0 12px 12px 12px;
  padding: 12px 16px;
  max-width: 420px;
}
.reco-bubble-fxn-label {
  display: flex; align-items: center; gap: 4px;
  font: 700 10px/14px "Open Sans";
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #568793;
  margin-bottom: 6px;
}
