/*
 * Jerarquía de identidad para ventas, compras y gastos en Historial.
 *
 * La operación en lenguaje humano es el dato principal. La referencia técnica
 * se conserva como metadato de consulta, sin competir visualmente con ella.
 */

.history-operation-title {
  color: var(--text);
  font-size: 0.98rem;
  font-weight: 800;
  line-height: 1.3;
}

.history-operation-context {
  color: var(--text-secondary);
  font-size: 0.82rem;
  line-height: 1.35;
}

.history-operation-reference {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.3rem;
  margin-top: 0.15rem;
  color: var(--text-muted);
  font-size: 0.72rem;
  line-height: 1.35;
}

.history-operation-reference code,
.history-inventory-code code {
  max-width: 100%;
  padding: 0;
  background: transparent;
  color: inherit;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", monospace;
  font-size: 0.72rem;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.history-operation-document {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  width: fit-content;
  color: var(--text-muted);
  font-size: 0.74rem;
}

.history-operation-document::before {
  content: "";
  width: 0.42rem;
  height: 0.42rem;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--text-muted);
}

.history-operation-document.has-document {
  color: var(--success);
}

.history-operation-document.has-document::before {
  background: var(--success);
}

.history-operation-main {
  align-content: center;
  gap: 0.24rem;
}

@media (max-width: 52rem) {
  .history-operation-title {
    font-size: 1.02rem;
  }

  .history-operation-reference {
    margin-top: 0.25rem;
  }
}

@media (max-width: 40rem) {
  .history-operation-main {
    padding: 0.15rem 0 0.2rem;
  }

  .history-operation-title {
    font-size: 1.05rem;
  }

  .history-operation-context {
    font-size: 0.84rem;
  }

  .history-operation-reference,
  .history-operation-reference code {
    font-size: 0.7rem;
  }
}

@media print {
  .history-operation-reference,
  .history-operation-reference code {
    color: #555;
  }
}
