.pill-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #fff;
  border: 1px solid #d8e3f0;
  border-radius: 9999px;
  padding: 0.25rem 0.4rem;
  box-shadow: 0 6px 16px rgba(16, 24, 40, 0.06);
}
.pill-label {
  font-size: 11px;
  font-weight: 700;
  color: #0a2a5e;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  margin-left: 0.25rem;
}
.pill-toggle {
  background: linear-gradient(180deg, #fff, #f5f8ff);
  border-radius: 9999px;
  padding: 0.15rem;
}
.pill-toggle .btn {
  border: 0;
  color: #0a5ea8;
  font-weight: 600;
  padding: 0.35rem 0.9rem;
  border-radius: 9999px;
}
.pill-toggle .btn:hover {
  background: #eef4ff;
  color: #0a2a5e;
}
.pill-toggle .btn.active {
  background: #e0f7fa;
  color: #0a2a5e;
  box-shadow: inset 0 0 0 1.5px #0a5ea8, 0 4px 10px rgba(10, 94, 168, 0.18);
}

#tblMain thead th {
  background: #f0f3ff;
  color: #0a2a5e;
  font-weight: 700;
}
.se-highlight-est td.col-est,
.se-highlight-est th.col-est {
  font-weight: 700;
  color: #0b5ed7;
}
.se-highlight-act td.col-act,
.se-highlight-act th.col-act {
  font-weight: 700;
  color: #0b8457;
}
.se-highlight-est td.col-est input {
  border-color: #0b5ed7;
  box-shadow: 0 0 0 0.15rem rgba(11, 94, 215, 0.15);
}
.se-highlight-act td.col-act input {
  border-color: #0b8457;
  box-shadow: 0 0 0 0.15rem rgba(11, 132, 87, 0.15);
}

.seg-toggle {
  display: inline-flex;
  border: 1px solid #cfd8e3;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
}
.seg-btn {
  background: transparent;
  color: #0a2a5e;
  font-weight: 600;
  font-size: 0.84rem;
  padding: 0.35rem 0.8rem;
  border: 0;
  line-height: 1;
}
.seg-btn:not(.active):hover {
  background: #e9f4ff;
  color: #0a5ea8;
}
.seg-btn.active {
  background: #0a5ea8;
  color: #fff;
}

.table-shipping-data input.form-control,
.table-shipping-data select.form-control {
  height: 30px;
  padding: 0.2rem 0.45rem;
  font-size: 0.88rem;
  border-radius: 8px;
  border: 1px solid #cfd8e3;
  background: #fff;
}
.table-shipping-data input.form-control:focus,
.table-shipping-data select.form-control:focus {
  box-shadow: 0 0 0 0.15rem rgba(10, 94, 168, 0.15);
  border-color: #0a5ea8;
  outline: 0;
}

/* Timeline */
.se-timeline-card {
  background: #fff;
  border: 1px solid #e4e8f0;
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 12px;
  box-shadow: 0 6px 14px rgba(16, 24, 40, 0.06);
  overflow: hidden;
}
.tl-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.tl-title {
  font-weight: 700;
  color: #0a2a5e;
}
.tl-legend {
  display: flex;
  align-items: center;
  gap: 8px;
}
.tl-legend .lg {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.tl-legend .lg-est {
  background: #0a5ea8;
}
.tl-legend .lg-act {
  background: #0b8457;
}
.tl-rail {
  position: relative;
  height: 92px;
  padding: 0 10px;
}
.tl-line {
  position: absolute;
  left: 10px;
  right: 10px;
  top: 46px;
  height: 4px;
  background: linear-gradient(90deg, #dbe8ff, #e8f7f0);
  border-radius: 4px;
}
.tl-nodes {
  position: absolute;
  left: 10px;
  right: 10px;
  top: 0;
  bottom: 0;
}
.tl-node {
  position: absolute;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  min-width: 80px;
  max-width: 18vw;
  padding: 6px 0;
  text-align: center;
}
.tl-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(10, 42, 94, 0.08);
}
.se-events.t-est .tl-dot {
  background: #0a5ea8;
}
.se-events.t-act .tl-dot {
  background: #0b8457;
}
.tl-code {
  font-size: 0.78rem;
  color: #2b3b55;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.tl-date {
  font-size: 0.74rem;
  color: #6b7280;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
@media (max-width: 1200px) {
  .tl-rail {
    height: 88px;
  }
  .tl-node {
    min-width: 74px;
    max-width: 22vw;
  }
  .tl-code {
    font-size: 0.75rem;
  }
  .tl-date {
    font-size: 0.7rem;
  }
}
@media (max-width: 768px) {
  .se-timeline-card {
    padding: 10px;
  }
  .tl-rail {
    height: 82px;
  }
  .tl-node {
    min-width: 68px;
    max-width: 26vw;
  }
  .tl-code {
    font-size: 0.72rem;
  }
  .tl-date {
    font-size: 0.68rem;
  }
}
@media (max-width: 480px) {
  .tl-rail {
    height: 78px;
  }
  .tl-node {
    min-width: 64px;
    max-width: 30vw;
  }
  .tl-code {
    font-size: 0.68rem;
  }
  .tl-date {
    font-size: 0.64rem;
  }
}

.sa-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.mode-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border: 1px solid #cfd8e3;
  background: linear-gradient(180deg, #fff, #f7f9ff);
  border-radius: 9999px;
  box-shadow: 0 4px 12px rgba(16, 24, 40, 0.06);
}
.ms-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.38rem 0.8rem;
  border: 0;
  background: transparent;
  color: #0a2a5e;
  font-weight: 700;
  font-size: 0.88rem;
  border-radius: 9999px;
  line-height: 1;
  transition: all 0.15s ease;
}
.ms-btn i {
  font-size: 0.9rem;
  opacity: 0.9;
}
.ms-btn:hover {
  background: #eaf1ff;
  color: #084c9a;
}
.ms-btn.active {
  background: #0a5ea8;
  color: #fff;
  box-shadow: inset 0 0 0 1.5px #084c9a, 0 6px 14px rgba(10, 94, 168, 0.22);
}

/* ===== Buscador compactado y centrado (INT) ===== */
.int-search {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin: 6px 0 4px;
}
.order-form {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #e6eef8;
  background: #ffffff;
  border-radius: 10px;
  padding: 6px 8px;
  box-shadow: 0 4px 10px rgba(16, 24, 40, 0.05);
}
.order-field {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #dbe7fb;
  background: #f9fbff;
  border-radius: 9px;
  height: 36px;
  padding: 0 10px;
}
.order-field i {
  color: #0a5ea8;
  font-size: 0.9rem;
}
.order-field input {
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 0.9rem;
  min-width: 220px;
  max-width: 320px;
  height: 100%;
}
.order-field input::placeholder {
  color: #7b8ca8;
}
.btn-search,
.btn-clear {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 12px;
  border-radius: 9px;
  font-weight: 700;
  font-size: 0.86rem;
  transition: all 0.15s ease;
}
.btn-search {
  background: #0a5ea8;
  color: #fff;
  border: 0;
}
.btn-search:hover {
  filter: brightness(0.95);
}
.btn-clear {
  background: #cecdcd;
  color: #ffffff !important;
}
.btn-clear:hover {
  background: #8d96a0;
}
.order-info {
  font-size: 0.86rem;
  color: #0a2a5e;
  font-weight: 600;
}
.badge-order {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 9999px;
  background: #eef6ff;
  color: #084c9a;
  border: 1px solid #cfe0ff;
}
.badge-error {
  background: #fff2f2;
  color: #b00020;
  border: 1px solid #ffc9c9;
}
.btn[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

@media (max-width: 680px) {
  .order-form {
    flex-wrap: wrap;
    gap: 6px;
    padding: 6px;
  }
  .order-field {
    flex: 1 1 100%;
    min-width: 220px;
  }
  .btn-search,
  .btn-clear {
    flex: 1 1 auto;
    justify-content: center;
  }
}
