/* ============================================================
   MYCFO — aireview.css  (Milestone 2)
   AI Review Center 전용 스타일
   ============================================================ */

/* ── Badge System ────────────────────────────────────────────── */
.badge {
  display: inline-block;
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 10px;
  font-weight: 600;
}
.badge-red    { background: #fee2e2; color: #991b1b; }
.badge-orange { background: #fff7ed; color: #9a3412; }
.badge-green  { background: #d1fae5; color: #065f46; }
.badge-blue   { background: #dbeafe; color: #1e40af; }
.badge-yellow { background: #fef3c7; color: #92400e; }
.badge-purple { background: #ede9fe; color: #5b21b6; }
.badge-indigo { background: #e0e7ff; color: #3730a3; }
.badge-gray   { background: #f3f4f6; color: #374151; }

/* ── Result Badge ────────────────────────────────────────────── */
.result-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 12px;
}
.result-gray   { background: #f3f4f6; color: #374151; border: 1.5px solid #d1d5db; }
.result-green  { background: #d1fae5; color: #065f46; border: 1.5px solid #6ee7b7; }
.result-yellow { background: #fef3c7; color: #92400e; border: 1.5px solid #fcd34d; }
.result-red    { background: #fee2e2; color: #991b1b; border: 1.5px solid #fca5a5; }

/* ── AI Card Grid ────────────────────────────────────────────── */
.ai-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
}
@media (max-width: 700px) { .ai-grid { grid-template-columns: 1fr; } }

/* ── AI Advice Card ──────────────────────────────────────────── */
.ai-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-left: 4px solid var(--color-border);
}
.ai-card.priority-border-red    { border-left-color: #ef4444; }
.ai-card.priority-border-orange { border-left-color: #f97316; }
.ai-card.priority-border-blue   { border-left-color: #3b82f6; }
.ai-card.priority-border-gray   { border-left-color: #9ca3af; }

.ai-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
}
.ai-card-badges { display: flex; flex-wrap: wrap; gap: 4px; }
.ai-card-title { font-size: 14px; font-weight: 600; color: var(--color-text-primary); line-height: 1.4; }

/* ── AI Body & Basis ─────────────────────────────────────────── */
.ai-section-label { font-size: 11px; font-weight: 600; color: var(--color-text-tertiary); margin-bottom: 4px; }
.ai-advice-body { }
.ai-advice-text {
  font-size: 13px;
  color: var(--color-text-primary);
  line-height: 1.6;
}
.ai-basis-wrap {
  background: var(--color-surface-alt);
  border-radius: var(--radius-md);
  padding: 10px 12px;
}
.ai-basis-text { font-size: 12px; color: var(--color-text-secondary); line-height: 1.5; }

/* ── Related Links ───────────────────────────────────────────── */
.ai-related-wrap { display: flex; flex-wrap: wrap; gap: 4px; }
.related-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 500;
  text-decoration: none;
}
.chip-tx       { background: #dbeafe; color: #1e40af; }
.chip-contract { background: #d1fae5; color: #065f46; }
.chip-doc      { background: #fef3c7; color: #92400e; }

/* ── Amounts ─────────────────────────────────────────────────── */
.ai-amounts { display: flex; flex-direction: column; gap: 4px; }
.amount-row { display: flex; justify-content: space-between; align-items: center; padding: 5px 10px; border-radius: var(--radius-md); }
.amount-saving { background: #d1fae5; }
.amount-risk   { background: #fee2e2; }
.amount-label { font-size: 12px; font-weight: 500; }
.amount-saving .amount-label { color: #065f46; }
.amount-risk   .amount-label { color: #991b1b; }
.amount-value { font-size: 13px; font-weight: 700; }
.amount-saving .amount-value { color: #065f46; }
.amount-risk   .amount-value { color: #991b1b; }

/* ── Confidence Bar ──────────────────────────────────────────── */
.confidence-wrap { }
.confidence-label {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--color-text-tertiary);
  margin-bottom: 4px;
}
.confidence-pct { font-weight: 700; }
.confidence-pct-green  { color: #16a34a; }
.confidence-pct-blue   { color: #2563eb; }
.confidence-pct-orange { color: #ea580c; }
.confidence-bar-bg { height: 6px; background: var(--color-surface-alt); border-radius: 3px; overflow: hidden; }
.confidence-bar-fill { height: 100%; border-radius: 3px; transition: width 0.3s; }
.bar-green  { background: #22c55e; }
.bar-blue   { background: #3b82f6; }
.bar-orange { background: #f97316; }

/* ── Review Sections ─────────────────────────────────────────── */
.review-section { border-radius: var(--radius-md); padding: 10px 12px; }
.review-section-header { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.review-icon { font-size: 14px; }
.review-section-title { font-size: 12px; font-weight: 600; color: var(--color-text-secondary); }
.review-text { font-size: 13px; color: var(--color-text-primary); line-height: 1.5; }
.accountant-section { background: #eff6ff; }
.result-note { font-size: 12px; color: var(--color-text-secondary); font-style: italic; margin-top: 4px; }

/* ── CEO Decision ────────────────────────────────────────────── */
.ceo-decision-section {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 10px 12px;
}
.ceo-decision-header { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }
.ceo-decision-btns { display: flex; gap: 4px; margin-left: auto; }
.decision-btn {
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 8px;
  border: 1.5px solid transparent;
  cursor: pointer;
  background: none;
  color: var(--color-text-secondary);
  border-color: var(--color-border);
}
.decision-btn:hover { opacity: 0.85; }
.btn-adopt { }
.btn-adopt.active { background: #d1fae5; color: #065f46; border-color: #6ee7b7; }
.btn-hold  { }
.btn-hold.active  { background: #fef3c7; color: #92400e; border-color: #fcd34d; }
.btn-reject { }
.btn-reject.active { background: #fee2e2; color: #991b1b; border-color: #fca5a5; }
.ceo-decision-text { font-size: 12px; color: var(--color-text-secondary); font-style: italic; margin-top: 4px; }

/* ── AI Card Footer ──────────────────────────────────────────── */
.ai-card-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  border-top: 1px solid var(--color-border);
  padding-top: 8px;
}
.ai-date { font-size: 11px; color: var(--color-text-tertiary); }
.ai-entity-link { font-size: 11px; color: var(--color-brand-blue); text-decoration: none; margin-left: auto; }
.ai-entity-link:hover { text-decoration: underline; }

/* ── Modal (sm) ──────────────────────────────────────────────── */
.modal-sm { max-width: 400px; }
