.financial-document-actions-card {
  border-bottom: 1px solid #e7d8b7 !important;
  padding-bottom: 12px !important;
}

.financial-document-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 4px 0 0;
}

.financial-document-actions > button {
  min-height: 38px;
}

.fdi-panel,
.fdi-status,
.fdi-error {
  margin: 12px 0;
  border: 1px solid #cfd9e5;
  border-radius: 8px;
  background: #ffffff;
  color: #13263d;
  box-shadow: 0 8px 24px rgba(11, 31, 54, 0.08);
}

.fdi-status,
.fdi-error {
  padding: 12px 14px;
  font-weight: 700;
}

.fdi-error {
  border-color: #d6a1a1;
  color: #8a1f1f;
}

.fdi-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px 10px;
  border-bottom: 1px solid #e3e9f0;
}

.fdi-head h2 {
  margin: 0;
  font-size: 18px;
  color: #0b315f;
}

.fdi-head p {
  margin: 4px 0 0;
  color: #596a7d;
  font-size: 13px;
}

.fdi-close {
  width: 32px;
  height: 32px;
  border: 1px solid #c5cfda;
  border-radius: 8px;
  background: #f5f7fa;
  color: #24384d;
  font-size: 20px;
  line-height: 1;
}

.fdi-warning {
  margin: 12px 16px 0;
  color: #6d4d00;
  font-weight: 700;
}

.fdi-table-wrap {
  overflow-x: auto;
  padding: 12px 16px;
}

.fdi-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  font-size: 14px;
}

.fdi-table th,
.fdi-table td {
  padding: 8px;
  border-bottom: 1px solid #e4eaf0;
  text-align: left;
  vertical-align: middle;
}

.fdi-table th {
  background: #f3f6fa;
  color: #23384f;
}

.fdi-table td small {
  display: block;
  margin-top: 2px;
  color: #7a4d00;
}

.fdi-table .has-conflict {
  background: #fffaf0;
}

.fdi-value {
  width: 120px;
  min-height: 32px;
  border: 1px solid #b9c5d2;
  border-radius: 6px;
  padding: 6px 8px;
}

.fdi-confidence {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid #c6d1dd;
  background: #eef3f8;
  color: #24384d;
  font-weight: 800;
  white-space: nowrap;
}

.fdi-confidence.high {
  background: #e8f5ec;
  border-color: #9bc8a6;
  color: #17662e;
}

.fdi-confidence.medium,
.fdi-confidence.low {
  background: #fff6dc;
  border-color: #d7b65e;
  color: #6d4d00;
}

.fdi-confidence.unresolved {
  background: #f4f5f7;
  color: #687584;
}

.fdi-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 0 16px 16px;
}

.fdi-primary,
.fdi-secondary {
  min-height: 36px;
  border-radius: 8px;
  padding: 8px 14px;
  border: 1px solid #1554a5;
  font-weight: 800;
}

.fdi-primary {
  background: #1f6fd1;
  color: #ffffff;
}

.fdi-secondary {
  background: #eef1f4;
  color: #24313f;
  border-color: #b8c0ca;
}

@media (max-width: 720px) {
  .fdi-head,
  .fdi-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .fdi-primary,
  .fdi-secondary,
  .financial-document-actions > button {
    width: 100%;
  }
}
