/**
 * WMS Trace Report / Traceability DNA — enterprise trace workspace (dense, low-noise).
 */
.tr-root {
  background: linear-gradient(180deg, #f8fafc 0%, #f4f6f8 50%, #f4f6f8 100%);
  font-family: ui-sans-serif, system-ui, Segoe UI, Roboto, sans-serif;
}

.tr-header {
  position: relative;
  z-index: 50;
}

/* Main content below fixed header stacking */
.tr-workspace {
  position: relative;
  z-index: 1;
}

.tr-panel {
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.tr-panel--resolve {
  background: rgba(15, 23, 42, 0.85);
}

.tr-panel--split {
  background: rgba(15, 23, 42, 0.78);
}

.tr-panel--inspector {
  background: rgba(15, 23, 42, 0.82);
}

.tr-panel-scroll {
  scrollbar-gutter: stable;
}

.tr-empty-hint {
  margin: 0;
  padding: 0.65rem 0.75rem;
  font-size: 0.8rem;
  line-height: 1.5;
  color: #cbd5e1;
  border: 1px dashed rgba(148, 163, 184, 0.45);
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.55);
}

.tr-empty-hint--inline {
  padding: 0.4rem 0.45rem;
}

.tr-input::placeholder {
  color: rgba(148, 163, 184, 0.5);
}

.tr-glow-text {
  text-shadow: none;
}

.tr-link:hover {
  text-shadow: none;
}

.tr-node {
  margin-left: 0.5rem;
  padding: 0.35rem 0.25rem 0.35rem 0.5rem;
  border-left: 1px solid rgba(34, 211, 238, 0.25);
}
.tr-node-head-main {
  flex: 1;
  min-width: 0;
}
.tr-caret-btn {
  flex-shrink: 0;
  margin-top: 0.1rem;
  padding: 0 0.2rem;
  border: 0;
  background: transparent;
  color: rgba(34, 211, 238, 0.75);
  cursor: pointer;
  font-size: 0.65rem;
  line-height: 1.25;
}
.tr-caret-btn:hover {
  color: #e0f2fe;
}
.tr-caret-spacer {
  flex-shrink: 0;
  width: 1rem;
  display: inline-block;
}
.tr-node-head--selected {
  background: rgba(6, 182, 212, 0.12);
  border-radius: 4px;
  outline: 1px solid rgba(34, 211, 238, 0.35);
}
.tr-node-head {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  cursor: pointer;
  user-select: none;
}
.tr-node-head:hover .tr-node-label {
  color: #e0f7ff;
}
.tr-caret {
  width: 0.6rem;
  color: rgba(34, 211, 238, 0.6);
  flex-shrink: 0;
  margin-top: 0.15rem;
}
.tr-node-label {
  color: #a5f3fc;
  font-weight: 600;
}
.tr-node-meta {
  margin-top: 0.2rem;
  margin-left: 0;
  font-size: 0.7rem;
  color: #94a3b8;
  line-height: 1.4;
}
.tr-node-meta span {
  display: block;
}
.tr-highlight-critical {
  border-left-color: #ff4d00 !important;
  background: rgba(255, 77, 0, 0.08);
  border-radius: 4px;
}
.tr-highlight-expired {
  border-left-color: #f97316 !important;
}

.tr-timeline-wrap {
  position: relative;
  padding-left: 0.5rem;
}
.tr-tl-item {
  position: relative;
  padding-left: 1.1rem;
  padding-bottom: 0.65rem;
  border-left: 2px solid rgba(71, 85, 105, 0.45);
}
.tr-tl-item:last-child {
  border-left-color: transparent;
}
.tr-tl-item--dim {
  opacity: 0.34;
}
.tr-tl-dot {
  position: absolute;
  left: -6px;
  top: 2px;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #22d3ee;
  box-shadow: none;
  border: 1px solid rgba(15, 23, 42, 0.9);
}
.tr-tl-item.phase-factory .tr-tl-dot {
  background: #22d3ee;
}
.tr-tl-item.phase-warehouse .tr-tl-dot {
  background: #38bdf8;
}
/* DNA horizontal chain — FUI */
.tr-dna-pill {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.65);
  color: #cbd5e1;
}
.tr-dna-pill--food {
  border-color: rgba(251, 113, 133, 0.55);
  color: #fecdd3;
  box-shadow: 0 0 12px rgba(251, 113, 133, 0.2);
}
.tr-dna-pill--expiry {
  border-color: rgba(248, 113, 113, 0.6);
  color: #fecaca;
}
.tr-dna-pill--pallet {
  border-color: rgba(56, 189, 248, 0.5);
  color: #bae6fd;
}
.tr-dna-pill--finance {
  border-color: rgba(167, 139, 250, 0.55);
  color: #ddd6fe;
}
.tr-dna-chain {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.5rem;
}
.tr-dna-step {
  flex: 1 1 120px;
  min-width: 100px;
  max-width: 200px;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(15, 23, 42, 0.88);
  position: relative;
}
.tr-dna-step::after {
  content: '';
  position: absolute;
  right: -5px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 5px solid rgba(100, 116, 139, 0.45);
  z-index: 1;
}
.tr-dna-step:last-child::after {
  display: none;
}
.tr-dna-step__k {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #94a3b8;
  margin-bottom: 0.2rem;
}
.tr-dna-step__jump a {
  color: rgb(125 211 252);
  text-decoration: none;
  border-bottom: 1px solid rgba(125, 211, 252, 0.45);
}
.tr-dna-step__jump a:hover {
  color: rgb(186 230 253);
  border-bottom-color: rgb(186 230 253);
}
.tr-dna-fifo-priority {
  display: inline-block;
  margin-left: 0.25rem;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.58rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #1a1204;
  background: linear-gradient(90deg, #fbbf24, #f59e0b);
  box-shadow: none;
}
.tr-dna-step__t {
  font-size: 0.78rem;
  font-weight: 600;
  color: #e2e8f0;
  line-height: 1.25;
}
.tr-dna-step__s {
  margin-top: 0.2rem;
  font-size: 0.68rem;
  color: #94a3b8;
  line-height: 1.3;
}
.tr-expiry-pulse {
  text-shadow: none;
  animation: none;
}

@media (max-width: 720px) {
  .tr-dna-step::after {
    display: none;
  }
  .tr-dna-chain {
    flex-direction: column;
  }
  .tr-dna-step {
    max-width: none;
  }
}

.tr-tl-item.phase-customer .tr-tl-dot {
  background: #a78bfa;
}
.tr-tl-item.phase-system .tr-tl-dot {
  background: #64748b;
}
.tr-tl-time {
  font-size: 0.65rem;
  color: #64748b;
  letter-spacing: 0.06em;
}
.tr-tl-title {
  font-weight: 700;
  color: #e2e8f0;
  font-size: 0.85rem;
}
.tr-tl-detail {
  font-size: 0.75rem;
  color: #94a3b8;
  margin-top: 0.15rem;
}

.tr-inspector-dl {
  display: grid;
  grid-template-columns: minmax(5.5rem, auto) 1fr;
  gap: 0.2rem 0.75rem;
  margin: 0;
  align-items: baseline;
}
.tr-inspector-dl dt {
  margin: 0;
  font-weight: 600;
}
.tr-inspector-dl dd {
  margin: 0;
  word-break: break-word;
  color: #e2e8f0;
}

.tr-atlas {
  box-shadow: none;
}
