/* ============================================================
   Logistics console — page-specific styles
   Customer pivot, carrier+route cell, trace timeline.
   ============================================================ */

/* Customer + branch cell (replaces .td--supplier for this page) */
.logq-cust { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.logq-cust__name {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--sd-ink-900);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.logq-cust__branch {
  font-size: 11px;
  color: var(--sd-ink-500);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.logq-cust__branch::before {
  content: "";
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--sd-ink-400);
  flex-shrink: 0;
}

/* Carrier + Route stacked cell */
.logq-route { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.logq-route__carrier {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--sd-ink-800);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.logq-route__corridor {
  font-size: 10.5px;
  color: var(--sd-ink-500);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-variant-numeric: tabular-nums;
}
.logq-route__corridor svg { width: 9px; height: 9px; flex-shrink: 0; }

/* LR / Trace status pill */
.logq-trace {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px 2px 6px;
  border-radius: var(--sd-radius-pill);
  font-size: 11px;
  font-weight: 500;
  font-family: var(--sd-mono);
  font-variant-numeric: tabular-nums;
  border: 1px solid;
  white-space: nowrap;
}
.logq-trace__dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.logq-trace--intransit {
  background: #EAF3FA;
  color: var(--sd-blue-700);
  border-color: var(--sd-blue-100);
}
.logq-trace--intransit .logq-trace__dot { background: var(--sd-blue-600); animation: logq-pulse 1.6s ease-in-out infinite; }
.logq-trace--missing {
  background: var(--sd-red-100);
  color: #A8273F;
  border-color: #E1A6B3;
}
.logq-trace--missing .logq-trace__dot { background: var(--sd-red-600); }
.logq-trace--delivered {
  background: var(--sd-green-100);
  color: #1F6A3F;
  border-color: #C4DFCF;
}
.logq-trace--delivered .logq-trace__dot { background: var(--sd-green-600); }
.logq-trace--scheduled {
  background: #FFF6E1;
  color: var(--sd-amber-text);
  border-color: #EBC07B;
}
.logq-trace--scheduled .logq-trace__dot { background: var(--sd-amber-500); }
.logq-trace--awaiting {
  background: var(--sd-bg-softer);
  color: var(--sd-ink-700);
  border-color: var(--sd-line-300);
}
.logq-trace--awaiting .logq-trace__dot { background: var(--sd-ink-400); }

@keyframes logq-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.7); }
}

/* "Last contact" cell — small relative time + carrier name */
.logq-contact { display: flex; flex-direction: column; gap: 1px; line-height: 1.2; }
.logq-contact__when {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--sd-ink-800);
  font-variant-numeric: tabular-nums;
}
.logq-contact__via {
  font-size: 10.5px;
  color: var(--sd-ink-500);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.logq-contact--stale .logq-contact__when { color: var(--sd-red-600); }

/* Next-action button — outlined, small */
.logq-next {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px 4px 8px;
  background: #fff;
  border: 1px solid var(--sd-line-300);
  border-radius: var(--sd-radius-sm);
  font-size: 11px;
  font-weight: 500;
  color: var(--sd-ink-800);
  cursor: pointer;
  white-space: nowrap;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}
.logq-next:hover {
  background: #EEF2F7;
  border-color: #334155;
  color: #334155;
}
.logq-next svg { width: 11px; height: 11px; }
.logq-next--primary {
  background: #334155;
  color: #fff;
  border-color: #334155;
}
.logq-next--primary:hover { background: #1E293B; border-color: #1E293B; }

/* Grid override — different column widths for logistics */
[data-module="logistics"] .cons__head,
[data-module="logistics"] .row,
[data-module="logistics"] .cons__totals {
  grid-template-columns:
    32px      /* check */
    minmax(150px, 1.1fr)  /* disc no + when */
    52px      /* prio */
    minmax(140px, 1fr)   /* reason */
    minmax(160px, 1.2fr) /* customer + branch */
    minmax(150px, 1.1fr) /* carrier + route */
    minmax(140px, 1fr)  /* trace */
    minmax(100px, 0.9fr)  /* sla */
    minmax(120px, 1fr)   /* last contact */
    minmax(140px, 1fr)   /* next action */
    minmax(80px, 0.6fr)  /* freight ₹ */
    32px;     /* arrow */
}
[data-module="logistics"] .th--prio { text-align: center; }
[data-module="logistics"] .th--amount,
[data-module="logistics"] .td--amount { text-align: right; }

/* "Freight at risk" caption above amount */
.logq-freight { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; line-height: 1.1; }
.logq-freight__amt {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--sd-ink-900);
  font-variant-numeric: tabular-nums;
  font-family: var(--sd-mono);
}
.logq-freight__caption {
  font-size: 9.5px;
  color: var(--sd-ink-500);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 500;
}
