/* =========================================================================
   RASTREO DE CARGA — DISEÑO RENOVADO (SEN-Tracking.aspx)
   Página dedicada, con un lenguaje visual propio tipo "panel de
   seguimiento" (hero + tarjeta de estado + grilla de datos + historial),
   construida sobre los mismos controles de servidor (IDs sin cambios).
   ========================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800&family=Poppins:wght@600;700;800&display=swap');

:root{
  --rt-navy-950:#061a30;
  --rt-navy-900:#0a2846;
  --rt-blue-700:#0057aa;
  --rt-blue-500:#009adc;
  --rt-blue-100:#e6f3fc;
  --rt-ink-900:#152232;
  --rt-ink-600:#4b5a6a;
  --rt-ink-400:#8996a3;
  --rt-surface:#ffffff;
  --rt-surface-alt:#f4f8fc;
  --rt-border:#e3e9f0;
  --rt-radius-lg:24px;
  --rt-radius-md:16px;
  --rt-shadow-md:0 14px 34px rgba(9,35,68,.12);
  --rt-shadow-lg:0 26px 60px rgba(9,35,68,.20);
}

body{ background: var(--rt-surface-alt) !important; }

/* ---------------------------------------------------------------------
   HERO
   --------------------------------------------------------------------- */
.rastreo-hero{
  background: radial-gradient(1200px 480px at 15% -10%, rgba(0,154,220,.35), transparent 60%),
              linear-gradient(120deg, var(--rt-navy-950) 0%, var(--rt-navy-900) 45%, var(--rt-blue-700) 130%);
  padding: 76px 24px 128px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.rastreo-hero::before{
  content:'';
  position:absolute;
  inset:0;
  background-image: radial-gradient(rgba(255,255,255,.08) 1px, transparent 1px);
  background-size: 22px 22px;
  opacity:.5;
}
.rastreo-hero-inner{ position:relative; z-index:1; max-width: 720px; margin:0 auto; }
.rastreo-kicker{
  display:inline-flex; align-items:center; gap:8px;
  background: rgba(255,255,255,.12);
  color:#fff;
  border: 1px solid rgba(255,255,255,.25);
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .6px;
  text-transform: uppercase;
  margin-bottom: 22px;
}
.rastreo-hero h1{
  font-family:'Poppins', 'Montserrat', sans-serif;
  color:#fff;
  font-weight: 800;
  font-size: clamp(30px, 5vw, 48px);
  margin: 0 0 14px;
  letter-spacing: .3px;
}
.rastreo-hero p{
  color: rgba(255,255,255,.82);
  font-size: 16px;
  line-height: 1.7;
  max-width: 520px;
  margin: 0 auto;
}

/* ---------------------------------------------------------------------
   CONTENEDOR PRINCIPAL
   --------------------------------------------------------------------- */
.rastreo-shell{
  max-width: 1080px;
  margin: -78px auto 0;
  padding: 0 20px 60px;
  position: relative;
  z-index: 2;
}

/* ---------------------------------------------------------------------
   TARJETA DE ESTADO (número de guía + último estado + acciones)
   --------------------------------------------------------------------- */
.rastreo-status-card{
  background: var(--rt-surface);
  border-radius: var(--rt-radius-lg);
  box-shadow: var(--rt-shadow-lg);
  border: 1px solid var(--rt-border);
  padding: 34px 36px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 24px;
  justify-content: space-between;
}

.rastreo-guia-block{ display:flex; flex-direction:column; gap:8px; min-width: 240px; }
.rastreo-guia-block > span#lblGuia,
.rastreo-guia-block #lblGuia{
  text-transform: uppercase;
  font-size: 12.5px !important;
  font-weight: 700 !important;
  color: var(--rt-ink-400) !important;
  letter-spacing: .6px;
  padding: 0 !important;
}
.rastreo-guia-block #txtGuiaENAC{
  border: none !important;
  background: transparent !important;
  color: var(--rt-ink-900) !important;
  font-family:'Poppins','Montserrat',sans-serif !important;
  font-size: 26px !important;
  font-weight: 800 !important;
  padding: 2px 0 !important;
  width: auto !important;
  min-width: 220px;
  height: auto !important;
}

/* SEN-Rastreo.aspx: aquí el número de guía se escribe en esta misma página
   (no llega por la URL como en SEN-Tracking.aspx), así que el campo se ve
   como un input real —con borde— en vez de texto grande de solo lectura,
   acompañado del botón BUSCAR. */
.rastreo-search-row{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}
.rastreo-search-row #txtGuiaENAC{
  border: 1.5px solid var(--rt-border) !important;
  background: var(--rt-surface-alt) !important;
  border-radius: 999px !important;
  padding: 10px 18px !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  width: 220px !important;
  min-width: 0;
  height: auto !important;
  color: var(--rt-ink-900) !important;
  transition: border-color .2s ease, background .2s ease;
}
.rastreo-search-row #txtGuiaENAC:focus{
  outline: none;
  border-color: var(--rt-blue-500) !important;
  background: #fff !important;
}
.rastreo-search-row #btnBuscar{
  background: var(--rt-navy-900) !important;
  color:#fff !important;
  border:none !important;
  border-radius: 999px !important;
  padding: 11px 22px !important;
  font-weight:700 !important;
  font-size: 13px !important;
  height:auto !important;
  width:auto !important;
  cursor:pointer;
  transition: transform .25s ease, filter .25s ease;
}
.rastreo-search-row #btnBuscar:hover{
  transform: translateY(-2px);
  filter: brightness(1.15);
}

.rastreo-estado-block{ display:flex; flex-direction:column; gap:8px; align-items:flex-start; }
.rastreo-estado-block #lbestado{
  text-transform: uppercase;
  font-size: 12.5px !important;
  font-weight: 700 !important;
  color: var(--rt-ink-400) !important;
  padding: 0 !important;
}
.rastreo-estado-block #lblDatoEsta{
  position: static !important;
  height: auto !important;
  width: auto !important;
  margin: 0 !important;
  border: none !important;
  box-shadow: none !important;
  background: linear-gradient(100deg, #fff1ec, #ffe3da) !important;
  color: #c8401f !important;
  font-weight: 800 !important;
  text-transform: uppercase;
  font-size: 13.5px !important;
  padding: 9px 18px !important;
  border-radius: 999px !important;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.rastreo-estado-block #lblDatoEsta:empty{ display:none; }
.rastreo-estado-block #lblDatoEsta::before{
  content:'●';
  font-size: 9px;
  color:#c8401f;
}

.rastreo-actions{ display:flex; align-items:center; gap:14px; flex-wrap: wrap; }
.rastreo-actions #btnBuscari{
  background: linear-gradient(100deg, var(--rt-blue-700), var(--rt-blue-500)) !important;
  border: none !important;
  border-radius: 999px !important;
  padding: 12px 26px !important;
  font-weight: 700 !important;
  letter-spacing: .4px;
  box-shadow: 0 10px 22px rgba(0,87,170,.28) !important;
  transition: transform .25s ease, box-shadow .25s ease !important;
  height: auto !important;
  width: auto !important;
}
.rastreo-actions #btnBuscari:hover{
  transform: translateY(-3px) !important;
  box-shadow: 0 16px 30px rgba(0,87,170,.38) !important;
}
.rastreo-link{
  color: var(--rt-blue-700);
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: border-color .2s ease, color .2s ease;
}
.rastreo-link:hover{ border-color: var(--rt-blue-500); color: var(--rt-blue-500); }

/* ---------------------------------------------------------------------
   GRILLA DE INFORMACIÓN (remitente / destinatario / pago)
   --------------------------------------------------------------------- */
.rastreo-info-grid{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin-top: 24px;
}
@media (max-width: 640px){ .rastreo-info-grid{ grid-template-columns: 1fr; } }
.rastreo-info-tile{
  background: var(--rt-surface);
  border: 1px solid var(--rt-border);
  border-radius: var(--rt-radius-md);
  box-shadow: var(--rt-shadow-md);
  padding: 22px 22px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: transform .3s cubic-bezier(.23,1,.32,1), box-shadow .3s ease;
}
.rastreo-info-tile:hover{ transform: translateY(-4px); box-shadow: var(--rt-shadow-lg); }
.rastreo-info-tile-wide{ grid-column: span 2; }
@media (max-width: 640px){ .rastreo-info-tile-wide{ grid-column: span 1; } }

.tile-icon{
  flex: 0 0 auto;
  width: 42px; height: 42px;
  border-radius: 12px;
  background: var(--rt-blue-100);
  color: var(--rt-blue-700);
  display: flex; align-items:center; justify-content:center;
  font-size: 17px;
}
.tile-body{ display:flex; flex-direction:column; gap:6px; min-width:0; }
.tile-body label,
.tile-body span[id^="lblCli"],
.tile-body span[id^="lblCiu"],
.tile-body span[id^="lblConPago"]{
  text-transform: uppercase;
  font-size: 11.5px !important;
  font-weight: 700 !important;
  color: var(--rt-ink-400) !important;
  letter-spacing: .5px;
  padding: 0 !important;
}
.tile-body span[id^="lblDato"]{
  font-size: 15px !important;
  font-weight: 600 !important;
  color: var(--rt-ink-900) !important;
  text-transform: none !important;
  padding: 0 !important;
  word-break: break-word;
}
.tile-body span[id^="lblDato"]:empty::after{
  content: 'Sin información aún';
  color: var(--rt-ink-400);
  font-weight: 500;
  font-style: italic;
  text-transform: none;
}

.rastreo-msgbox{ margin-top: 16px; }
.rastreo-msgbox:empty{ display:none; }

/* ---------------------------------------------------------------------
   HISTORIAL DE MOVIMIENTOS (tabla / GridView)
   --------------------------------------------------------------------- */
.rastreo-history{ margin-top: 34px; }
.rastreo-history h2{
  display:flex; align-items:center; gap:10px;
  font-family:'Poppins','Montserrat',sans-serif;
  color: var(--rt-ink-900);
  font-size: 21px;
  font-weight: 800;
  margin-bottom: 16px;
}
.rastreo-history h2 i{ color: var(--rt-blue-500); }

.rastreo-history-table{
  background: var(--rt-surface);
  border-radius: var(--rt-radius-md);
  box-shadow: var(--rt-shadow-md);
  border: 1px solid var(--rt-border);
  overflow: auto;
  padding: 6px;
}
.rastreo-history-table table{
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}
.rastreo-history-table table th{
  background: linear-gradient(100deg, var(--rt-blue-700), var(--rt-blue-500)) !important;
  color: #fff !important;
  text-transform: uppercase;
  font-size: 12px !important;
  letter-spacing: .4px;
  padding: 14px 16px !important;
  border: none !important;
  text-align: left !important;
}
.rastreo-history-table table th:first-child{ border-radius: 12px 0 0 12px; }
.rastreo-history-table table th:last-child{ border-radius: 0 12px 12px 0; }
.rastreo-history-table table td{
  padding: 13px 16px !important;
  font-size: 13.5px !important;
  color: var(--rt-ink-600);
  border: none !important;
  border-bottom: 1px solid var(--rt-border) !important;
  text-transform: none !important;
}
.rastreo-history-table table tr:last-child td{ border-bottom: none !important; }
.rastreo-history-table table tr:hover td{ background: var(--rt-surface-alt); }

/* ---------------------------------------------------------------------
   CONTACTO
   --------------------------------------------------------------------- */
.rastreo-contact{ max-width: 1080px; margin: 10px auto 70px; padding: 0 20px; text-align:center; }
.rastreo-contact h2{
  font-family:'Poppins','Montserrat',sans-serif;
  color: var(--rt-ink-900);
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 22px;
}
.rastreo-contact-grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 18px;
}
.rastreo-contact-card{
  background: var(--rt-surface);
  border: 1px solid var(--rt-border);
  border-radius: var(--rt-radius-md);
  box-shadow: var(--rt-shadow-md);
  padding: 26px 20px;
  display:flex; flex-direction:column; align-items:center; gap:8px;
  transition: transform .3s ease, box-shadow .3s ease;
}
.rastreo-contact-card:hover{ transform: translateY(-5px); box-shadow: var(--rt-shadow-lg); }
.rastreo-contact-card i{
  width:46px; height:46px;
  border-radius:50%;
  background: var(--rt-blue-100);
  color: var(--rt-blue-700);
  display:flex; align-items:center; justify-content:center;
  font-size:18px;
  margin-bottom: 4px;
}
.rastreo-contact-card a{
  font-size: 17px;
  font-weight: 700;
  color: var(--rt-ink-900);
  text-decoration: none;
  text-transform: none !important;
}
.rastreo-contact-card label{
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: var(--rt-ink-400);
}

@media (max-width: 700px){
  .rastreo-hero{ padding: 56px 20px 100px; }
  .rastreo-shell{ margin-top: -64px; }
  .rastreo-status-card{ padding: 26px 22px; }
}
