.shipment-detail-page {
  padding: 20px 30px;
  background: #f5f6fa;
}
.detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.detail-title {
  margin: 0;
  font-size: 22px;
  color: #2c3e50;
}
.detail-sub {
  color: #64748b;
  font-size: 13px;
  margin-top: 4px;
}

.detail-layout {
  display: grid;
  grid-template-columns: 300px 1fr 300px;
  gap: 18px;
}

.panel {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  box-shadow: 0 6px 18px rgba(16, 24, 40, 0.06);
  padding: 14px;
}
.panel-compact {
  padding: 0;
}

.panel-head {
  padding: 14px;
  border-bottom: 1px dashed #e6ebf2;
}
/* ====== CENTRADO (CAMBIADO) ====== */
.panel-head.with-actions {
  display: flex;
  flex-direction: column;
  align-items: center; /* antes: flex-start */
  justify-content: center; /* antes: space-between */
  gap: 12px;
  text-align: center;
}
/* Centrar el contenido interno */
.ph-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: center; /* agregado */
  text-align: center; /* agregado */
}
.ph-title {
  font-weight: 800;
  color: #0a2a5e;
  font-size: 14px;
  letter-spacing: 0.3px;
}
.ph-sub {
  font-size: 12px;
  color: #7a8aa4;
}
.ph-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center; /* agregado: centra botones */
}

.fields-toggle {
  padding: 10px 12px 14px;
}
.toggle-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  margin-bottom: 8px;
  border: 1px solid #eef2f7;
  border-radius: 12px;
  background: #fafbff;
  transition: all 0.15s ease;
}
.toggle-line:hover {
  background: #f3f7ff;
  border-color: #e3eaf6;
}
.toggle-line span {
  font-size: 13px;
  color: #0f1f3d;
  font-weight: 600;
}
.toggle-line input {
  accent-color: #0a5ea8;
  width: 16px;
  height: 16px;
}

.detail-main .grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 14px;
}
.grid-item {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 12px 14px;
}
.grid-span {
  grid-column: 1/-1;
}
.gi-title {
  font-size: 12px;
  color: #0a2a5e;
  font-weight: 800;
  margin-bottom: 4px;
  letter-spacing: 0.2px;
  text-transform: uppercase;
}
.gi-body {
  font-size: 15px;
  color: #1f2937;
}
.badge {
  display: inline-block;
  background: #e8f0ff;
  color: #0a2a5e;
  border-radius: 999px;
  padding: 3px 12px;
  font-weight: 800;
}

.detail-right .docs-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.doc-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid #eef2f7;
  border-radius: 10px;
  padding: 10px;
  background: #fafbff;
}
.doc-name {
  font-size: 13px;
  color: #334155;
  max-width: 70%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.doc-empty {
  font-size: 13px;
  color: #94a3b8;
  text-align: center;
  padding: 8px;
  border: 1px dashed #e6ebf2;
  border-radius: 10px;
  background: #fcfdff;
}

.btn-sel {
  background: #70b2ed;
  color: #ffffff;
  border-color: #5997f3;
}

#tblShipments thead th {
  background: #f0f3ff;
  color: #0a2a5e;
  font-weight: 800;
}

@media (max-width: 1200px) {
  .detail-layout {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
  }
  .detail-right {
    order: 3;
  }
  .detail-sidebar {
    order: 1;
  }
  .detail-main {
    order: 2;
  }
  .detail-main .grid {
    grid-template-columns: repeat(1, minmax(240px, 1fr));
  }
}

.tl-node {
  position: absolute;
  transform: translateX(-50%);
  text-align: center;
}
.tl-code {
  font-size: 12px;
  color: #64748b;
  margin-bottom: 6px;
}
.tl-date {
  font-size: 11px;
  color: #64748b;
  margin-top: 6px;
}
.tl-dot {
  position: relative;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin: 6px auto;
  background: #cbd5e1;
  border: 2px solid #94a3b8;
}
.tl-node.is-current .tl-code {
  color: #0a2a5e;
  font-weight: 800;
}
.tl-node.is-current .tl-date {
  color: #0a2a5e;
  font-weight: 700;
}
.tl-node.is-current .tl-dot {
  background: #0a5ea8;
  border-color: #0a5ea8;
  box-shadow: 0 0 0 6px rgba(10, 94, 168, 0.14);
}
.tl-node.is-current .tl-dot::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  border: 2px solid rgba(10, 94, 168, 0.35);
  animation: tl-pulse 1.8s ease-out infinite;
}

@keyframes tl-pulse {
  0% {
    transform: translate(-50%, -50%) scale(0.6);
    opacity: 1;
  }
  70% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0;
  }
  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0;
  }
}

.is-hidden {
  display: none !important;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid #dbe6ff;
  background: #eef4ff;
  color: #0a2a5e;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.2px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(10, 94, 168, 0.1);
  transform: translateZ(0);
  transition: transform 0.08s ease, box-shadow 0.2s ease, background 0.2s ease,
    border-color 0.2s ease;
}
.status-chip:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(10, 94, 168, 0.18);
}
.status-chip .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}
.status-chip .txt {
  max-width: 180px;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}
.status-chip .ic.open {
  opacity: 0.9;
}

#tblShipments td:nth-child(5) {
  white-space: nowrap;
}
