/* 右侧「字段说明 / 取值」+ 面包屑，与主站橙色调和 */
.all-fields-root {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}
.field-section h3 {
  margin: 0 0 0.5rem;
  font-size: clamp(0.82rem, 2.5vw, 0.9rem);
  font-weight: 600;
  color: var(--muted);
  border-left: 3px solid var(--orange);
  padding-left: 0.45rem;
}
.item-block,
.risk-block {
  margin-bottom: 0.75rem;
}
.item-block:last-child,
.risk-block:last-child {
  margin-bottom: 0;
}
.item-title {
  margin: 0 0 0.35rem;
  font-size: clamp(0.72rem, 2.2vw, 0.8rem);
  font-weight: 600;
  color: var(--orange-dark);
}
.table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(139, 124, 247, 0.18);
  border-radius: 10px;
  background: #fffdfb;
}
.field-table {
  width: 100%;
  border-collapse: collapse;
  font-size: clamp(0.76rem, 2.4vw, 0.85rem);
}
.field-table td {
  padding: 0.5rem 0.65rem;
  text-align: left;
  border-bottom: 1px solid rgba(139, 124, 247, 0.1);
  vertical-align: top;
}
.field-table tbody tr:last-child td {
  border-bottom: none;
}
.col-label {
  width: 38%;
  color: var(--muted);
  font-weight: 500;
  white-space: pre-line;
  line-height: 1.4;
}
.col-label::first-line {
  color: var(--text);
  font-weight: 600;
}
.col-value {
  color: var(--text);
  word-break: break-word;
}

.field-scroll {
  margin-top: 0;
  flex: 1;
  min-height: 0;
  max-height: 52vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
@media (min-width: 900px) {
  #invoiceArea:not([hidden]) .field-scroll {
    max-height: min(42vh, calc(100vh - 18rem));
  }
}

.invoice-bc {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin: 0.5rem 0 0.35rem;
  padding: 0.45rem 0 0.55rem;
  border-bottom: 1px dashed rgba(139, 124, 247, 0.22);
}
.invoice-bc[hidden] {
  display: none !important;
}
.bc-item {
  font: inherit;
  font-size: clamp(0.72rem, 2.3vw, 0.82rem);
  font-weight: 600;
  padding: 0.35rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(139, 124, 247, 0.35);
  background: #fffdfb;
  color: var(--text);
  cursor: pointer;
  max-width: 100%;
  word-break: break-all;
}
.bc-item:hover {
  border-color: var(--orange);
  background: #fff7ed;
}
.bc-item.is-active {
  background: linear-gradient(135deg, #fff7ed, #ffedd5);
  border-color: var(--orange-dark);
  color: var(--orange-dark);
  box-shadow: 0 0 0 1px rgba(139, 124, 247, 0.15);
}

.raw-json {
  margin-top: 0.75rem;
  flex-shrink: 0;
  font-size: clamp(0.72rem, 2.3vw, 0.8rem);
  color: var(--muted);
}
.raw-json summary {
  cursor: pointer;
  color: var(--muted);
  font-weight: 600;
  user-select: none;
}
.raw-json pre {
  margin: 0.45rem 0 0.35rem;
  padding: 0.55rem 0.65rem;
  min-height: 4rem;
  max-height: 14rem;
  overflow: auto;
  font-size: 0.78em;
  line-height: 1.45;
  background: #fafaf9;
  border: 1px solid rgba(28, 25, 23, 0.08);
  border-radius: 8px;
  white-space: pre-wrap;
  word-break: break-word;
}
.raw-json .btn {
  margin-top: 0.35rem;
}
