.tf-mode {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0 0 1rem;
}
.tf-mode-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  padding: 10px 12px;
  min-height: 52px;
  border-radius: 12px;
  border: 1.5px solid var(--border, #e2e8f0);
  background: var(--surface, #fff);
  color: var(--text, #0f172a);
  cursor: pointer;
  font: inherit;
  transition: border-color .15s, background .15s;
}
.tf-mode-btn > i {
  flex: none;
  font-size: 1.1rem;
  color: #64748b;
  width: 22px;
  text-align: center;
}
.tf-mode-btn span {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.tf-mode-btn b {
  font-size: 0.9rem;
}
.tf-mode-btn small {
  font-size: 0.74rem;
  color: var(--text-muted, #64748b);
}
.tf-mode-btn:hover {
  border-color: #94a3b8;
}
.tf-mode-btn.active[data-tf-mode=ext] {
  border-color: #0e7490;
  background: #ecfeff;
}
.tf-mode-btn.active[data-tf-mode=ext] > i {
  color: #0e7490;
}
.tf-mode-btn.active[data-tf-mode=int] {
  border-color: #7c3aed;
  background: #f5f3ff;
}
.tf-mode-btn.active[data-tf-mode=int] > i {
  color: #7c3aed;
}
.tf-pane[hidden] {
  display: none !important;
}
.tg-intro {
  background: #f5f3ff;
  border-color: #ddd6fe;
  color: #4c1d95;
}
.tg-steps {
  display: inline-block;
  margin-top: 4px;
  font-size: 0.8rem;
}
.tg-steps i {
  font-size: 0.7rem;
  margin: 0 2px;
}
.tg-notstore {
  margin: 0 0 1rem;
  padding: 10px 14px;
  border-radius: 12px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #9a3412;
  font-size: 0.86rem;
  font-weight: 600;
}
.tg-notstore[hidden] {
  display: none;
}
.tg-disabled {
  opacity: 0.6;
}
.tg-count {
  background: #7c3aed;
}
.tg-gate {
  color: #6d28d9;
  background: #ede9fe;
  white-space: nowrap;
}
.tg-gate i {
  font-size: 0.62rem;
}
.tg-clash {
  border-color: #fca5a5;
  background: #fff5f5;
}
.tg-split-note {
  color: #6d28d9;
  background: #f5f3ff;
  border-color: #ddd6fe;
}
.tg-submit-btn {
  background: #7c3aed;
  border-color: #7c3aed;
}
.tg-cls {
  display: inline-block;
  font-size: 0.64rem;
  font-weight: 700;
  padding: 0 6px;
  border-radius: 6px;
  vertical-align: 1px;
  letter-spacing: .02em;
}
.tg-cls-c01 {
  background: #fee2e2;
  color: #991b1b;
}
.tg-cls-c02 {
  background: #dbeafe;
  color: #1e40af;
}
.tg-cls-nar {
  background: #dcfce7;
  color: #166534;
}
.tg-req-box {
  margin: 0 0 0.8rem;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 0.84rem;
  background: #f8fafc;
  border: 1px solid var(--border, #e2e8f0);
}
.tg-req-box:empty {
  display: none;
}
.tg-req-box.lvl6 {
  background: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
}
.tg-req-box.lvl4 {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1e3a8a;
}
.tg-req-box.lvl0 {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #166534;
}
.tg-doc.live {
  border-left-color: #7c3aed;
}
.tg-doc.tg-transit {
  border-left-color: #f97316;
}
.tg-doc.live .td-state {
  background: #ede9fe;
  color: #5b21b6;
}
.tg-doc.tg-transit .td-state {
  background: #ffedd5;
  color: #9a3412;
}
.tg-route .tg-g {
  font-weight: 700;
  font-family:
    ui-monospace,
    Consolas,
    monospace;
  color: #6d28d9;
}
.tg-route i {
  color: #7c3aed;
}
.tg-legs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tg-leg {
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
}
.tg-leg b {
  font-weight: 700;
}
.tg-leg.wait {
  background: #fef3c7;
  color: #92400e;
}
.tg-leg.run {
  background: #e0f2fe;
  color: #075985;
}
.tg-leg.ok {
  background: #dcfce7;
  color: #166534;
}
.tg-act {
  color: #6d28d9;
}
.qrc-move-badge {
  display: inline-block;
  margin-right: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  white-space: nowrap;
}
.qrc-move-badge.out {
  background: #ede9fe;
  color: #5b21b6;
}
.qrc-move-badge.in {
  background: #ffedd5;
  color: #9a3412;
}
.tg-chip {
  background: #ede9fe !important;
  color: #5b21b6 !important;
}
@media (max-width: 768px) {
  .tf-mode {
    grid-template-columns: 1fr;
  }
}
#req-transfer #tgPane select.select2-hidden-accessible {
  width: 1px !important;
  min-width: 0 !important;
  max-width: 1px !important;
}
.qr-doc-card[data-tg] .dr-qchip {
  display: none !important;
}
