


    :root {
      --primary-color: #273067;
      --secondary-color: #42AFE5;
      --secondary-t-color: hsla(200, 76%, 58%, 0.35);
      --tertiary-color: #F57C00;
      --black-color: #333;
      --gray-color: #666;
      --light-gray-color: #e0e0e0;
      --white-color: #fff;
      --border-blue-color: #18428E;
      --green-color: #388E3C;
    }

    * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
    }

    body {
      background-color: var(--light-gray-color);
      padding: 20px;
       font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
       

    }

    .step-icon.active
    {
      background-color: var(--secondary-color);
      color: var(--white-color);
    }

    .tracking-container {
      max-width: 976px;
      margin: 0 auto;
      display: flex;
      flex-direction: column;
       justify-content: center;
        justify-content: space-between;
        height: 95vh;
    }

    .search-box-general {
      background-color: var(--primary-color);
      padding: 5px;
      max-width: 976px;
      border-radius: 8px;
      height: auto;
      color: var(--white-color);
      margin-bottom: 20px;

      @media (width >= 1024px){
        padding: 20px;
        height: auto;
         
      }
    }
    .search-box
    {
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      align-items: center;
      height: 100%;
      padding: 20px;
      width: 100%;
    }

    .search-box h1 {
      font-size: 20px;
      /* margin-bottom: 10px; */
    }

    .search-form {
      background-color: rgba(255, 255, 255, 0.1);
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      align-items: center;
      color: var(--white-color);
      height: auto;;
      border-radius: 15px;
      gap: 10px;

      @media (width >= 768px){
        width: 488px;
        flex-direction: row;
         
      }
    }

    .search-input-container
    {
      display: flex;
      height: 100%;
      min-height: 100%;
      align-items: center;
      
      input
      { 
        margin-left: 5px;
        @media (width >= 768px){
           margin-left: 20px;
        }
      }

    }

    .search-icon {
      width: 20px;
      margin-left: 10px;
      height: 20px;
      color: var(--white-color);
      fill: var(--white-color);

      @media (width >= 768px){
      margin-left: 20px;
         
      }
    }

    /* .search-input-box
    {
      padding-block:4px;
    } */

   .search-input {
    flex: 1;
    font-family: 'Poppins';
    padding: 8px 12px;
    border: none; 
    outline: none; 
    width: 90%;
    height: 21px;
    color: var(--white-color);
    background-color: transparent;

    @media (min-width: 768px) { 
        width: 208px;
    }
}


    .search-button {
      background-color: var(--secondary-color);
      padding: 8px 20px;
      color:var(--white-color);
      font-weight: 700;
      font-size: 14px;
      margin: 2px;
      width: 159px;
      height: 36px;
      border: none;
      border-radius: 20px;
      cursor: pointer;
    }

    .details-box {
      background-color: var(--white-color);
      box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
      border-bottom: 4px solid var(--border-blue-color);
      padding: 30px;
      border-radius: 8px;
      margin-bottom: 20px;

      /* @media (width >= 1024px){
        height: 265px;
        width: 976px;
      } */
     
     
    }

    .status-header {
      display: flex;
      justify-content: space-between;
      margin-bottom: 10px;
    }

    .status-label {
      background-color: var(--white-color);
      font-size: 11px;
      font-family: 'Poppins';
      line-height: 18px;
      font-weight: 600;
      border-radius: 15px;
      border-radius: 15px;
      width: fit-content;
      padding: 0 12px;
      height: auto;

      @media (width >= 768px){
         
      height: 26px;
      }

    }

    #updatesList
    {
      margin-top: 20px;
      
    }

    .details-grid {
      /* height: 100%; */
      display: grid;
       row-gap:10px;


      @media (width >= 768px){
        grid-template-columns: repeat(auto-fit, minmax(50%, 1fr));
        /* display: grid; */
      }

      @media (width >= 1024px){
        grid-template-columns: repeat(auto-fit, minmax(33%, 1fr));
         
      }
    }

    .detail-item {
      position: relative;
     display: flex;
      gap: 1px;
      font-size: 14px;
      font-weight: 600;

      /* line-height: 21px; */

      .detail-label {
        position: relative;
        color: var(--black-color);
         display: inline-block;
        
      }

 .detail-value {
    position: relative;
    display: inline-block;
    max-width: 150px;
    font-weight: 600;
    color: var(--gray-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
}

.detail-value:hover {
    overflow: visible;
}

.detail-value:hover::after {
    content: attr(data-full-text);
    position: absolute;
    bottom: 100%;
    left: 0;
    margin-bottom: 6px;
    z-index: 1000;
    background: var(--white-color);
    color: var(--primary-color);
    padding: 10px;
    border: 1px solid var(--gray-color);
    border-radius: 5px;
    white-space: normal;
    max-width: 300px;
    width: max-content;
    word-wrap: break-word;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

    
    


    }

    .progress-tracker {
      display: flex;
      justify-content: space-between;
      margin: 40px 0;
      position: relative;
    }

    .progress-step {
      text-align: center;
      flex: 1;
    }

    .step-icon {
      width: 40px;
      height: 40px;
      background-color: var(--light-gray-color);
      border-radius: 50%;
      margin: 0 auto 10px;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .step-icon.active {
      background-color: var(--secondary-color);
      color: var(--white-color);
    }

    .progress-line {
      position: absolute;
      top: 20px;
      left: 50px;
      right: 50px;
      height: 2px;
      background-color: var(--light-gray-color);
      z-index: -1;
    }

    .updates-box {
      background-color: var(--white-color);
      padding: 20px;
      border-radius: 8px;
      border-bottom: 4px solid var(--border-blue-color);
      box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    }

    .update-item {
      margin-bottom: 15px;
      display:flex;
      padding-bottom: 15px;
      position: relative;
      /* border-bottom: 1px solid var(--light-gray-color); */

      @media (width >= 768px){    
        position: relative;
        padding-bottom: 20px;
         gap: 15px;
      }
    }

    .section-update-title
    {
      display: flex;
    }

    

    .update-content {
      flex: 1;
    }

    .update-title {
      font-size: 14px;
      margin-bottom: 5px;
    }

  

    .search-text
    {
      display: block;
      
      /* padding-inline: 50px; */
      height: auto;
      margin-block: 15px;
      font-size: 14px;
      line-height: 24px;
      font-weight: 400;
      text-align: center;

      @media (width >= 768px){
       width: 810px;
       font-size: 16px;
      height: 48px;
    
      }
    
    }

    .entregado
    {
      border: 1px solid var(--green-color);
      color: var(--green-color);
    }

    .transito
    {
      border: 1px solid var(--tertiary-color);
      color:var(--tertiary-color);
    }


    .search-title
    {
      font-size: 16px;
      width: 212px;
      font-size: 20px;
      font-weight: 600 ;
      text-align: center;
      line-height: 30px;

      @media (width >= 768px){
      height: 30px;
      }
    }


    /* no data*/
    .details-no-data
    {
      text-align: center;
    }




    /* trackingDetails */

    /*photos-file */
    .photos-file {
      display: none;
      flex-wrap: wrap;
      gap: 10px;
      margin-top: 20px;
      justify-content: end;
    }

    /* btn-see-signature */
    .btn-see-signature {
      display: flex;
      justify-content: center;
      align-items: center;
      gap: 10px;
      padding: 10px 20px;
    
      color: var(--black-color);
      border: none;
      border-radius: 20px;
      cursor: pointer;
      font-weight: 600;
      font-size: 14px;
    }

    /* signature-box */
    .signature-box
    {
      display:none;
      justify-content: end;
      align-items: center;
      margin-top: 20px;
    }

    /* loader signature */
    .signature-loader {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--gray-color);
}

.signature-loader::before {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid var(--gray-color);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

    .signature-error {
        color: var(--error-color, var(--tertiary-color));
        padding: 10px;
        font-weight: bold;
        text-align: center;
    }

    @keyframes spin {
        to {
            transform: rotate(360deg);
        }
    }


    /* btn-photo-file */
    .btn-photo-file {
      display: flex;
      justify-content: center;
      align-items: center;
      gap: 10px;
      padding: 10px 20px;
      background-color: var(--secondary-color);
      color: var(--white-color);
      border: none;
      border-radius: 20px;
      cursor: pointer;
      font-weight: 600;
      font-size: 14px;
    }

   /* footer*/
    footer {
      display: flex;
      flex-direction: column;
      text-align: left;
      /* justify-content: start; */
      align-items: center;
      margin-top: 40px;
      font-size: 14px;
      font-weight: 400;
      gap: 10px;

      @media (width >= 768px){
      width: 503px;
      align-items: start;
         
      }
    }

    .footer-icons
    {
      width: 100%;
      display: flex;
      flex-direction: column;

      @media (width >= 768px){
      flex-direction: row;
      justify-content: space-between;
      align-items: center;
      }
    }

    .social-links {
      display: flex;
      justify-content: center;
      gap: 15px;
      margin-top: 10px;
    }




.update-icon {
    position: relative;
    width: 24px;
    height: 24px;
    background-color: #9DB2E1;
    border-radius: 50%;
    margin-right: 15px;
    flex-shrink: 0;


}

/* Flecha dentro del círculo */
.update-icon::before {
    content: '';
  position: absolute;
  top: 50%;
  left: 55%;
  transform: translate(-65%, -50%) rotate(-58deg);
  width: 10px;
  height: 4px;
  border-left: 2px solid var(--white-color);
  border-bottom: 4px solid var(--white-color);
 
}

/* Línea vertical conectora */
.update-icon::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 24px;
    bottom: -80px;
    width: 2px;
    background-image: linear-gradient(
        to bottom,
        var(--light-gray-color) 50%,
        transparent 50%
    );
    background-size: 2px 8px;
    /* transform: translateX(2%); */
     /* transform: translateX(-50%); */
}


.update-item:last-child .update-icon::after {
    display: none;
}

.update-content {
    flex: 1;
}

.update-title {
    font-weight: 500;
    color: var(--black-color);
    font-weight: bold;
    margin-bottom: 4px;
}

.update-time {
    position: absolute;
    color: var(--black-color);
    font-size: 0.9em;
        right: 0;
        bottom: -1px;

    @media (width >= 768px){
       right: 0;
        top: 0;
    }
}

.update-description {
    color: var(--gray-color);
    font-size: 0.9em;
}





/* list news top */


.list-news-visual {
    max-height: 300px; 
    overflow-y: auto;
    padding-right: 10px;
    scrollbar-width: none;
    scrollbar-color: var(--secondary-t-color) var(--light-gray-color);
}

.list-news-visual::-webkit-scrollbar {
    width: 6px;
}

.list-news-visual::-webkit-scrollbar-track {
    background: var(--white-color);
    border-radius: 10px;
}

.list-news-visual::-webkit-scrollbar-thumb {
    background: #9DB2E1;
    border-radius: 10px;
}

.news-item {
    display: flex;
    padding: 15px 0;
    animation: slideIn 0.1s ease-out forwards;
    opacity: 0;

    .news-description{
      font-weight: 600;
      font-size: 16px;
    }
}

.updates-container {
    display: block;
    padding: 40px;
    overflow: hidden;
}


 .news-icon
  {
    width: 60px;
    height: 60px;
    /* background-color:var(--secondary-t-color); */
    border-radius:30px;
    margin-right: 15px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
      flex-shrink: 0;
    margin-right: 15px;
    

  }

  .step-icon-active
{
  background-color: var(--secondary-t-color);
  color: var(--white-color);

}

.step-icon-no-active
{
  background-color: var(--light-gray-color);
  color : var(--black-color);
}

.list-news-visual {
    display: block;
    position: relative;
    margin-bottom: 50px;
    
    @media (width >= 678px) {
        display: flex;
        gap: 20px;
        overflow-x: auto;
        width: 100%;
        scroll-snap-type: x mandatory;
        scroll-behavior: smooth;
      
        -webkit-mask-image: linear-gradient(
            to right,
            var(--black-color) calc(100% - 100px),
            transparent
        );
        mask-image: linear-gradient(
            to right,
            var(--black-color) calc(100% - 100px),
            transparent
        );

        &:hover {
            -webkit-mask-image: none;
            mask-image: none;
        }

        &::-webkit-scrollbar {
            height: 4px;
        }

        &::-webkit-scrollbar-track {
            background: var(--white-color);
            border-radius: 10px;
        }

        &::-webkit-scrollbar-thumb {
            background: var(--secondary-t-color);
            border-radius: 10px;
        }
    }


    .news-item {
        position: relative;
        scroll-snap-align: center;
    }

    .news-item:not(:last-child)::after {

      @media (width >= 768px){
        content: '';
        position: absolute;
        top: 34%;
        right: -59px;
        height: 4px;
        border-radius: 30px;
        width: 148px;
        background-color: var(--line-color, var(--secondary-t-color));
          transform: translateY(-50%);
      }
    }
}

.news-item {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    align-items: center;
    opacity: 0;
    animation: slideIn 0.1s ease-out forwards;
    
    @media (width >= 768px) {
        flex-direction: column;
        justify-content: center;
        text-align: center;
        flex: 0 0 calc(33.333% - 14px);
        scroll-snap-align: start;
        min-width: 250px;
        transition: transform 0.3s ease;

        &:hover {
            transform: translateY(-5px);
        }
    }
}

/* Resto de tus estilos existentes para news-icon, content, etc. */

@keyframes slideIn {
    from {
        transform: translateX(50px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Animación de scroll automático */
@keyframes scrollNews {
    0% {   
        transform: translateX(0);
    }
    100% {
        transform: translateX(calc(-33.333% * (var(--total-items) - 3)));
    }
}

.updates-empty {
    color: #9DB2E1;
    font-size: 14px;
    padding: 20px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tracker-nav-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

.tracker-nav-btn {
    display: none;
    background: var(--white-color);
    border: 1px solid #8fa8d0;
    color: #1e3a6e;
    border-radius: 50%;
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    cursor: pointer;
    color: var(--secondary-t-color);
    font-size: 14px;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    z-index: 2;
}

.tracker-nav-btn:hover {
    background: var(--secondary-t-color);
    color: var(--white-color);
}

@media (width >= 678px) {
    .tracker-nav-btn {
        display: flex;
    }
}

/* Indicador de más contenido */
.scroll-indicator-right {
    display: none;
    
    @media (width >= 768px) {
        display: block;
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 40px;
        height: 40px;
        background: linear-gradient(to right, transparent, var(--white-color) 50%, var(--white-color));
        pointer-events: none;
        opacity: 0.8;
    }
}

.search-input-container {
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-radio-group {
  display: flex;
  gap: 2rem;
  justify-content: center;
  align-items: center;
  margin-bottom: 1rem;
}

.custom-radio {
  position: relative;
  padding-left: 30px;
  cursor: pointer;
  font-size: 16px;
  color: white;
  user-select: none;
}

.custom-radio input[type="radio"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}

.custom-radio .radio-btn {
  position: absolute;
  left: 0;
  top: 2px;
  height: 18px;
  width: 18px;
  background-color: transparent;
  border: 2px solid white;
  border-radius: 50%;
  transition: background-color 0.3s, border 0.3s;
}

.custom-radio input[type="radio"]:checked ~ .radio-btn {
  background-color: #4EC6E0;
  border-color: #4EC6E0;
}

.custom-radio .radio-btn::after {
  content: "";
  position: absolute;
  display: none;
}

.custom-radio input[type="radio"]:checked ~ .radio-btn::after {
  display: block;
}

.custom-radio .radio-btn::after {
  top: 4px;
  left: 4px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: white;
}

/* Overlay */
.modal-captcha{
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: none;                 /* lo controlas con JS */
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.55);
  z-index: 9999;
  padding: 16px;
}

/* Card */
.captcha-card{
  width: min(420px, 100%);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 18px 60px rgba(0,0,0,.25);
  padding: 22px 22px 18px;
  position: relative;
  transform: translateY(10px);
  opacity: 0;
  animation: captchaPop .18s ease-out forwards;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

@keyframes captchaPop{
  to { transform: translateY(0); opacity: 1; }
}

.captcha-title{
  margin: 6px 0 4px;
  font-size: 20px;
  font-weight: 800;
  color: #0f172a;
  text-align: center;
}

.captcha-subtitle{
  margin: 0 0 14px;
  font-size: 13px;
  color: #64748b;
  text-align: center;
}

.captcha-img{
  width: 100%;
  max-height: 120px;
  object-fit: contain;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  background: #f8fafc;
  padding: 10px;
  cursor: pointer;
  transition: transform .1s ease, box-shadow .15s ease;
}
.captcha-img:hover{
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.10);
}

.captcha-field{
  margin-top: 14px;
}

.captcha-input{
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  outline: none;
  font-size: 14px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.captcha-input:focus{
  border-color: #42afe5;
  box-shadow: 0 0 0 4px rgba(66,175,229,.18);
}

/* Buttons */
.captcha-actions{
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.btn-validate{
  flex: 1;
  border: none;
  background: #42afe5; /* tu color */
  color: #fff;
  font-weight: 700;
  padding: 11px 14px;
  border-radius: 999px; /* pill */
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(66,175,229,.28);
  transition: transform .08s ease, filter .15s ease, box-shadow .15s ease;
}
.btn-validate:hover{
  filter: brightness(0.97);
  box-shadow: 0 12px 26px rgba(66,175,229,.34);
}
.btn-validate:active{
  transform: translateY(1px);
}

.btn-cancel{
  flex: 1;
  border: 1px solid #e5e7eb;
  background: #f8fafc;
  color: #0f172a;
  font-weight: 700;
  padding: 11px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: background .15s ease, transform .08s ease;
}
.btn-cancel:hover{
  background: #eef2f7;
}
.btn-cancel:active{
  transform: translateY(1px);
}

/* Close X */
.captcha-x{
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background: #fff;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  display: grid;
  place-items: center;
  transition: background .15s ease;
}
.captcha-x:hover{
  background: #f1f5f9;
}

.captcha-error{
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  font-size: 13px;
}
 /* diseño botones imagenes */

 .update-images button {
  background-color: #3B82F6;        /* Azul principal */
  color: #ffffff;
  border: none;
  border-radius: 9999px;            /* Forma ovalada tipo “pill” */
  padding: 5px 16px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 5px rgba(59, 130, 246, 0.25);
  letter-spacing: 0.3px;
}

.update-images button:hover {
  background-color: #2563EB;        /* Azul un poco más oscuro */
  box-shadow: 0 3px 8px rgba(37, 99, 235, 0.35);
  transform: translateY(-2px);
}

.update-images button:active {
  background-color: #1E40AF;        /* Azul profundo al presionar */
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.3);
  transform: translateY(0);
}

.update-images button:disabled {
  background-color: #A5B4FC;        /* Azul claro para botones inactivos */
  cursor: not-allowed;
  box-shadow: none;
}

/* Estilos para el modal de imágenes */

/* Fondo oscuro del modal */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  inset: 0; /* equivale a top:0; right:0; bottom:0; left:0 */
  background-color: rgba(0, 0, 0, 0.6);
  overflow-y: auto; /* permite hacer scroll si el contenido crece */
  padding: 20px;
}

/* Contenido del modal */
.modal-content {
  background-color: #fff;
  margin: auto;
  padding: 20px;
  border-radius: 12px;
  width: 90%;
  max-width: 800px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  position: relative;
  animation: fadeIn 0.3s ease;
  max-height: 90vh;          /* evita que sobrepase la pantalla */
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Contenedor de scroll interno */
.modal-scrollable {
  overflow-y: auto;
  flex: 1;
}

/* Botón cerrar */
.close {
  position: absolute;
  top: 10px;
  right: 15px;
  color: #555;
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
}

.close:hover {
  color: #000;
}

/* Título */
.modal-content h2 {
  margin: 0 0 10px;
  font-size: 1.1rem;
  text-align: center;
  color: #1E3A8A;
}

/* Contenedor de miniaturas */
.thumbnail-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  padding: 10px 0;
}

/* Miniaturas */
.thumbnail-container img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s ease;
}

.thumbnail-container img:hover {
  border-color: #3B82F6;
  transform: scale(1.05);
}

/* Imagen principal */
.main-image-container {
  text-align: center;
  margin-top: 15px;
  flex-shrink: 0;
}

.main-image-container img {
  max-width: 100%;
  max-height: 65vh;  /* asegura que no se desborde verticalmente */
  border-radius: 10px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
  object-fit: contain;
}

/* Animación */
@keyframes fadeIn {
  from {opacity: 0; transform: scale(0.95);}
  to {opacity: 1; transform: scale(1);}
}

/* Responsivo en pantallas pequeñas */
@media (max-width: 600px) {
  .modal-content {
    width: 95%;
    padding: 15px;
  }

  .thumbnail-container img {
    width: 60px;
    height: 60px;
  }

  .main-image-container img {
    max-height: 55vh;
  }
}

/* ============================
   Estilos para vista "placa" 
   (lista de despachos y remesas)
   ============================ */

/* Contenedor general de la sección de despachos */
.contenedor-despachos {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 12px 0;
  padding-bottom: 6px;
}

/* Lista de tarjetas de despacho */
.lista-despachos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

/* Tarjeta individual de despacho */
.card-despacho {
  border: 1px solid #dcdcdc;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
  padding: 10px;
  transition: transform .08s ease, box-shadow .08s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Hover sutil */
.card-despacho:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
}

/* Header de la tarjeta */
.card-despacho .header {
  font-size: 13px;
  color: #333;
  margin-bottom: 8px;
  line-height: 1.25;
}

/* Body / acciones */
.card-despacho .body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 6px;
}

/* Botón ver remesas */
.btn-ver-remesas {
  padding: 6px 10px;
  border-radius: 6px;
  border: 0;
  background-color: #0d6efd; /* bootstrap primary si usas bootstrap, si no, cambia */
  color: #fff;
  cursor: pointer;
  font-size: 13px;
}

.titulo-exportar {
  display: flex;
  align-items: center;        /* centra verticalmente */
  justify-content: space-between; /* título a la izq, botón a la der */
  gap: 12px;                 /* espacio entre h4 y botón */
}

/* estilo del botón */
.btn-exportar {
  padding: 6px 10px;
  border-radius: 6px;
  border: 0;
  background-color: #217346;
  color: #fff;
  cursor: pointer;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-exportar:hover {
  background-color: #1a5c37;
}

/* Pequeño ajuste para botones en móviles */
.btn-ver-remesas:active,
.btn-ver-remesas:focus {
  outline: none;
  transform: translateY(0.5px);
}

/* Contenedor de remesas (tabla) */
.contenedor-remesas {
  margin-top: 10px;
  overflow-x: auto;
  background: #fff;
  border-radius: 6px;
  padding: 8px;
  border: 1px solid #ececec;
}

/* Tabla de remesas */
.contenedor-remesas table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.contenedor-remesas th,
.contenedor-remesas td {
  padding: 8px 10px;
  border: 1px solid #eee;
  text-align: left;
  vertical-align: middle;
}

.contenedor-remesas thead th {
  background: #f7f7f7;
  font-weight: 600;
}

/* Botón ver detalle remesa */
.btn-ver-detalle-remesa {
  padding: 5px 8px;
  border-radius: 5px;
  border: 0;
  background: #198754; /* success */
  color: #fff;
  cursor: pointer;
  font-size: 12px;
}

/* Estados: loading / no results / error */
.loading,
.no-results,
.error {
  text-align: center;
  padding: 18px;
  border-radius: 6px;
  margin-top: 12px;
  font-size: 14px;
}

.loading { background: #fff8e6; border: 1px solid #ffe9a8; color: #7a5a00; }
.no-results { background: #f1f7ff; border: 1px solid #cfe0ff; color: #0b5ed7; }
.error { background: #fff0f0; border: 1px solid #ffd6d6; color: #a80000; }

/* Ajustes para elementos que ocultamos/mostramos */
#trackingDetails { width: 100%; } /* asegúrate que el contenedor principal ocupe el ancho */
.details-no-data, .updates-box, .photos-file { display: none; }

/* Responsive: asegurando buena lectura en pantallas pequeñas */
@media (max-width: 520px) {
  .card-despacho .header { font-size: 12px; }
  .btn-ver-remesas { font-size: 12px; padding: 6px 8px; }
  .contenedor-remesas th, .contenedor-remesas td { padding: 6px 8px; font-size: 12px; }
}

/* Opcional: pequeña animación al insertar contenido */
.contenedor-despachos, .contenedor-remesas {
  animation: fadeInContent .18s ease;
}

@keyframes fadeInContent {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   SELECT2 - ESTILO EN LA PARTE SUPERIOR DEL INPUT
   ============================================================ */

/* Permitir salto de línea dentro del form */
.search-form {
  flex-wrap: wrap;
  align-items: center;
}

/* Contenedor del select2 (ahora sobre el input) */
#clienteContainer {
  display: none;
  flex-basis: 100%;      /* ocupa toda la línea */
  width: 100%;
  text-align: center;
  margin-bottom: 5px;   /* separa del input */
  animation: fadeIn 0.3s ease-in-out;
}

/* Animación de aparición */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Centrar el select2 y limitar su ancho */
#clienteContainer .select2-container {
  width: 80% !important;
  max-width: 360px;
  margin: 0 auto;
  display: block;
}

/* Campo select cerrado */
.select2-container--default .select2-selection--single {
  background-color: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 20px;
  height: 38px;
  display: flex;
  align-items: center;
  padding: 4px 12px;
  color: var(--white-color);
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  outline: none;
  transition: all 0.2s ease;
}

/* Texto visible */
.select2-container--default .select2-selection__rendered {
  color: var(--white-color)!important;
  line-height: 26px;
}

/* Placeholder */
.select2-container--default .select2-selection--single .select2-selection__placeholder {
  color: rgba(255, 255, 255, 0.6);
}

/* Flecha */
.select2-container--default .select2-selection--single .select2-selection__arrow b {
  border-color: rgba(255, 255, 255, 0.7) transparent transparent transparent;
}

/* Hover/foco */
.select2-container--default.select2-container--open .select2-selection--single,
.select2-container--default.select2-container--focus .select2-selection--single {
  background-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 4px rgba(255, 255, 255, 0.2);
}

/* Dropdown (lista desplegable) */
.select2-container--default .select2-dropdown {
  background-color: #ffffff;
  border: 1px solid var(--secondary-color);
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  overflow: hidden;
}

/* Opciones */
.select2-container--default .select2-results__option {
  color: var(--black-color);
  font-size: 14px;
  font-family: 'Poppins', sans-serif;
  padding: 8px 12px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

/* Opción resaltada */
.select2-container--default .select2-results__option--highlighted {
  background-color: var(--secondary-color);
  color: #fff;
}

/* Botón principal de exportar Excel */
.btn-exportar-principal {
  background: linear-gradient(135deg, #1e7e34 0%, #28a745 100%);
  color: white;
  border: none;
  padding: 12px 30px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.btn-exportar-principal:hover {
  background: linear-gradient(135deg, #155724 0%, #1e7e34 100%);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

.btn-exportar-principal:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Estilos para el formulario del modal */
.form-group-modal {
  margin-bottom: 20px;
}

.form-group-modal label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #333;
  font-size: 14px;
}

.form-group-modal .form-control {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  transition: border-color 0.3s ease;
}

.form-group-modal .form-control:focus {
  outline: none;
  border-color: #42AFE5;
  box-shadow: 0 0 0 3px rgba(66, 175, 229, 0.1);
}

/* Botón generar excel dentro del modal */
.btn-generar-excel {
  background: linear-gradient(135deg, #1e7e34 0%, #28a745 100%);
  color: white;
  border: none;
  padding: 12px 40px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.btn-generar-excel:hover {
  background: linear-gradient(135deg, #155724 0%, #1e7e34 100%);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

.btn-generar-excel:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-generar-excel:disabled {
  background: #ccc;
  cursor: not-allowed;
  transform: none;
}

/* ========== ESTILOS PARA SELECT2 EN MODAL EXCEL ========== */

/* Contenedor del Select2 en el modal */
#excelModal .select2-container {
  width: 100% !important;
  display: block;
}

/* Campo select cerrado en el modal */
#excelModal .select2-container--default .select2-selection--single {
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  height: 42px;
  display: flex;
  align-items: center;
  padding: 4px 12px;
  color: #333;
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  outline: none;
  transition: all 0.2s ease;
}

/* Texto visible en el modal */
#excelModal .select2-container--default .select2-selection__rendered {
  color: #333 !important;
  line-height: 32px;
  padding-left: 8px;
}

/* Placeholder en el modal */
#excelModal .select2-container--default .select2-selection--single .select2-selection__placeholder {
  color: #999;
}

/* Flecha en el modal */
#excelModal .select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 40px;
}

#excelModal .select2-container--default .select2-selection--single .select2-selection__arrow b {
  border-color: #666 transparent transparent transparent;
}

/* Hover/foco en el modal */
#excelModal .select2-container--default.select2-container--open .select2-selection--single,
#excelModal .select2-container--default.select2-container--focus .select2-selection--single {
  border-color: #42AFE5;
  box-shadow: 0 0 0 3px rgba(66, 175, 229, 0.1);
}

/* Asegurar que el dropdown tenga z-index alto */
.select2-container--open {
  z-index: 9999 !important;
}

.select2-dropdown {
  z-index: 9999 !important;
}

/* Texto seleccionado visible */
#excelModal .select2-container--default .select2-selection--single .select2-selection__rendered {
  color: #333 !important;
  font-weight: 500;
}

/* Limpiar icono (X) */
#excelModal .select2-container--default .select2-selection--single .select2-selection__clear {
  color: #999;
  font-size: 18px;
  margin-right: 10px;
}

/* Icono de Excel en el radio button */
.custom-radio i.fa-file-excel {
  color: #28a745;
  font-size: 14px;
}

.custom-radio input[type="radio"]:checked ~ i.fa-file-excel {
  color: #4EC6E0;
}
