/* WMS Intelligence Shell — Phase 2A read-only reporting workspace (dense, operational) */
.wms-intel-shell {
  margin: 0 0 10px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #fff;
  overflow: hidden;
}

.wms-intel-shell__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 12px;
  padding: 5px 10px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.wms-intel-shell__brand {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #334155;
}

.wms-intel-shell__overview {
  font-size: 0.68rem;
  color: #475569;
  text-decoration: none;
}

.wms-intel-shell__overview:hover {
  color: #0f172a;
  text-decoration: underline;
}

.wms-intel-shell__tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  border-bottom: 1px solid #e2e8f0;
}

.wms-intel-shell__tab {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: #64748b;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
}

.wms-intel-shell__tab:hover {
  color: #0f172a;
  background: #f8fafc;
}

.wms-intel-shell__tab.is-active {
  color: #0f172a;
  font-weight: 600;
  border-bottom-color: #0ea5e9;
  background: #fff;
}

body:has(.wms-intel-shell) .wms-mc-back,
body:has(.wms-intel-shell) .wms-bal-back > a[href="/wms/overview"],
body:has(.wms-intel-shell) .wms-audit-back {
  display: none;
}

body:has(.wms-intel-shell) .wms-bal-back {
  margin-bottom: 4px;
}

/* Trace report (dark desk) */
.tr-root .wms-intel-shell {
  background: #0f172a;
  border-color: #334155;
}

.tr-root .wms-intel-shell__head {
  background: #020617;
  border-bottom-color: #334155;
}

.tr-root .wms-intel-shell__brand {
  color: #cbd5e1;
}

.tr-root .wms-intel-shell__overview {
  color: #94a3b8;
}

.tr-root .wms-intel-shell__overview:hover {
  color: #e2e8f0;
}

.tr-root .wms-intel-shell__tabs {
  border-bottom-color: #334155;
}

.tr-root .wms-intel-shell__tab {
  color: #94a3b8;
}

.tr-root .wms-intel-shell__tab:hover {
  color: #e2e8f0;
  background: #1e293b;
}

.tr-root .wms-intel-shell__tab.is-active {
  color: #e2e8f0;
  border-bottom-color: #22d3ee;
  background: #0f172a;
}

.tr-root .tr-header--intel-merged {
  border-bottom: none;
}

/* Operator flow — status · next actions · auditability */
.wms-intel-flow {
  padding: 6px 10px 8px;
  border-top: 1px solid #e2e8f0;
  background: #fff;
}

.wms-intel-flow__status {
  margin-bottom: 6px;
}

.wms-intel-flow__status-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 10px;
  margin-bottom: 4px;
}

.wms-intel-flow__status-title {
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
}

.wms-intel-flow__status-summary {
  font-size: 0.68rem;
  color: #475569;
}

.wms-intel-flow__status-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.wms-intel-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.66rem;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #334155;
}

.wms-intel-pill b {
  font-weight: 700;
}

.wms-intel-pill--ok {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

.wms-intel-pill--warn {
  border-color: #fde68a;
  background: #fffbeb;
  color: #92400e;
}

.wms-intel-pill--bad {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

.wms-intel-pill--muted {
  color: #64748b;
}

.wms-intel-flow__actions {
  margin-bottom: 4px;
}

.wms-intel-flow__actions-head {
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  margin-bottom: 3px;
}

.wms-intel-flow__actions-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
}

.wms-intel-flow__actions-empty {
  margin: 0;
  font-size: 0.68rem;
  color: #64748b;
}

.wms-intel-action {
  font-size: 0.68rem;
  font-weight: 600;
  color: #0369a1;
  text-decoration: none;
}

.wms-intel-action:hover {
  text-decoration: underline;
}

.wms-intel-action__hint {
  margin-left: 4px;
  font-size: 0.62rem;
  font-weight: 400;
  color: #64748b;
}

.wms-intel-flow__audit-note {
  margin: 4px 0 0;
  font-size: 0.62rem;
  color: #64748b;
  line-height: 1.35;
}

.wms-intel-flow__audit-k {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.wms-intel-row-links {
  font-size: 0.66rem;
  white-space: normal;
  line-height: 1.35;
}

.wms-intel-row-links a {
  color: #0369a1;
  text-decoration: none;
}

.wms-intel-row-links a:hover {
  text-decoration: underline;
}

.tr-root .wms-intel-flow {
  background: #0f172a;
  border-top-color: #334155;
}

.tr-root .wms-intel-flow__status-title,
.tr-root .wms-intel-flow__actions-head,
.tr-root .wms-intel-flow__audit-note {
  color: #94a3b8;
}

.tr-root .wms-intel-pill {
  background: #1e293b;
  border-color: #334155;
  color: #e2e8f0;
}

.tr-root .wms-intel-action {
  color: #67e8f9;
}
