/* === Fondos intactos === */
body { 
    background:#aeb8b9; 
    font-family: "helvetica",sans-serif,Arial;
    margin: 0;
    padding: 0;
}
/*===Complementos===*/
  .layout__2col {
    display: grid;
    grid-template-columns: 1fr 1fr; /* 50% - 50% */
    gap: 24px;
    align-items: start;
  }
  .layout__2col--cards{
    align-items: stretch;
    gap: 24px;
  }
  .layout__2col--cards > .s3__card{
    height: auto;     /* <-- clave */
    min-width: 0;
  }
  @media (max-width: 768px) {
      .layout__2col {
        grid-template-columns: 1fr; /* una sola columna */
      }
      .layout__2col--cards{
        row-gap: 6px !important;  /* separación vertical entre filas */
      }
      .layout__2col--cards > .s3__card{
        margin-bottom: 0 !important; /* evita que se mezcle con gap */
      }
      .layout__2col--cards > .s3__card + .s3__card{
        margin-top: 18px !important;
      }
  }
  
/*fin complementos*/
/* ===== Header (logo + título) - STICKY ===== */
/* ====== HEADER GENERAL ====== */
.header__app {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: #1b4332;
  color: white;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}
.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 20px;
}
.logo-container {
  display: flex;
  align-items: center;
  gap: 10px;
}
.logo {
  width: 60px;
  height: 42px;
}
.app-title {
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.5px;
}
/* ====== NAVBAR ====== */
.navbar {
  position: relative;
}
.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
}
.nav-links a {
  color: #ffffff;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 6px 10px;
  border-radius: 4px;
  transition: all 0.3s ease;
}
.nav-links a:hover {
  background: #ffffff57;
}
/* ====== BOTÓN HAMBURGUESA ====== */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.6rem;
  cursor: pointer;
}
/* === ENLACE ACTIVO === */
.nav-links a.active {
  background: #ffc038c0;
  color: #ffffff;
  border-radius: 6px;
  font-weight: 600;
}
@media (max-width: 850px) {
  .nav-links a.active {
    background: #2d6a4f;
    color: #b7e4c7;
  }
}
/* ====== MODO RESPONSIVE ====== */
@media (max-width: 850px) {
  .nav-links {
    position: absolute;
    top: 100%;
    right: 0;
    background: #1b4332;
    flex-direction: column;
    align-items: flex-start;
    width: 220px;
    padding: 20px;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 6px 10px rgba(0,0,0,0.3);
    display: none;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
  }

  .nav-links.active {
    display: flex;
    opacity: 1;
    transform: translateY(0);
  }

  .nav-links a {
    width: 100%;
    padding: 10px 12px;
    border-radius: 6px;
    transition: background 0.3s ease;
  }

  .nav-links a:hover {
    background: #2d6a4f;
  }

  .nav-toggle {
    display: block;
  }
}
/* ====== DESPLAZAMIENTO SUAVE ====== */
html {
  scroll-behavior: smooth;
}
/* ====== SEPARACIÓN GLOBAL ====== */
main {
  padding-top: 72px;
  background:#aeb8b9; 
}





/* COMBOS: van a la izquierda, inmediatamente después del logo */
/* --- COMBOS MODERNOS --- */
.combos__header {
  order: 3;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 16px;
  margin-left: 8px;
  justify-content: center;
}

/* Bloques */
.filter-block {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Etiquetas */
.filter-label {
  color: #1a1a1a;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.2px;
}

/* Selects */
.filter-select {
  appearance: none;
  background: linear-gradient(180deg, #ffffff 0%, #f6f7f9 100%);
  color: #1a1a1a;
  border: 1px solid #d0d5dd;
  border-radius: 10px;
  padding: 10px 38px 10px 14px;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.3;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 160px; /* aumenta el tamaño base */
  background-image: url("data:image/svg+xml;utf8,<svg fill='%231A1A1A' height='10' viewBox='0 0 20 20' width='10' xmlns='http://www.w3.org/2000/svg'><path d='M5 7l5 5 5-5H5z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

/* Hover y focus */
.filter-select:hover {
  border-color: #97b8e8;
  box-shadow: 0 2px 8px rgba(40, 120, 255, 0.1);
}
.filter-select:focus {
  outline: none;
  border-color: #12a302;
  box-shadow: 0 0 0 3px rgba(42, 114, 212, 0.25);
}



/*relative*/
.cRelative{
  position: relative;            /* relativo el contenedor */
  display: flex;
  flex-wrap: wrap;               /* permite que baje a otra línea si no entra */
  justify-content: start;     /* empuja el contenido hacia la derecha */
  align-items: top;
  gap: 10px;  
}
/* seccion 1*/
.section1__app{
  position: relative;
  display: grid;
  grid-template-columns: 1000px 1fr;
  width: 100%;
  gap: 10px;
  flex-wrap: wrap;
}
.section3__app select{
  background-color: #ffffff;
}
/* < 1024px: una sola columna */
@media (max-width: 1000px){
  .section1__app{
    grid-template-columns: 1fr;
  }
  /* Mapa */
  .mapa{ 
    height: 300px; 
  }
  .seasonality{
    width:100%;
  }
}
/* Mapa */
.mapa{ 
  height: 600px; 
  width: 100%; 
  background:#ffffff; 
  /*border: 1PX solid #e6e6e6;*/
}
.title1{
  padding: 10px;
  color: #136d6f;
  font-weight: bold;
  font-size: 16px;
}
/*===ESTILOS DE AGROMAPA TITULOS===*/
.title1__agromap{
  color: #ffffff;
  background-color: #ecc04f;
  padding: 6px 20px;
  align-items: center;
  font-size: 16px;
  font-style: "helvetica",Calibri,arial;
  font-weight: bold;
  border-radius: 0px 20px 0px 0px;
  max-width: 480px;
}
.title1__agromap__grande{
  color: #ffffff;
  background-color: #ecc04f;
  padding: 6px 20px;
  align-items: center;
  font-size: 16px;
  font-style: "helvetica",Calibri,arial;
  font-weight: bold;
  border-radius: 0px 20px 0px 0px;
  max-width: 860px;

}
/*===ESTILOS MODERNOS KPIS===*/
/* === KPIs modernos (número grande, texto debajo con icono) === */
.kpi{
  padding:6px 6px 26px;
  text-align:left;
  display: flex;
  position: relative;
  align-items: center;
  height: 100%;
  gap: 6px;
}
.kpi:hover{
  border-color: rgba(0,0,0,.10);
}
.kpi__icon{
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
}
.kpi__icon i{
  font-size: 30px;
}
.kpi .kpi-value{
  font:800 clamp(26px, 4.2vw, 40px)/1 system-ui, Arial, sans-serif;
  color:#111;
  letter-spacing:.2px;
}
/* Colores del icono por tipo (ajusta a tu paleta) */
.kpi[data-type="pac"] i{ color:#2e7d32; }      /* verde */
.kpi[data-type="benef"] i{ color:#8d6e00; }    /* ámbar */
.kpi[data-type="ventas"] i{ color:#1565c0; }   /* azul */
.kpi.kpi--ventas { display:flex; align-items:flex-start; gap:12px; }
.kpi.kpi--ventas .kpi__main { display:flex; flex-direction:column; gap:6px; }
.kpi.kpi--ventas .mini-totals { display:flex; flex-wrap:wrap; gap:8px; }
/*estilos ventas nac y exporta*/
.pill {
  display:inline-flex; align-items:center; gap:6px;
  font-size:12px; line-height:1; padding:4px 8px; border-radius:999px;
  background:#f6f8f7; color:#223; border:1px solid #e6e9e8;
}
.pill i { font-size:12px; opacity:.9; }
.pill--nac { background:rgba(212, 230, 219, 0.08); border-color:rgba(0,151,58,.18); }
.pill--exp { background:rgba(212, 230, 219, 0.08); border-color:rgba(0,162,221,.18); }

@media (max-width:520px){
  .kpi.kpi--ventas { gap:10px; }
  .pill { font-size:11px; padding:3px 7px; }
}


/*=== css estacionalidad ===*/
  /* Contenedor principal */
  .seasonality{
    width:480px;
    background:#fff;
    border-radius:14px;
    padding:16px;
    }
  /* Fila: círculos + etiquetas */
  .seasonality__wrap{
    display:grid;
    grid-template-rows: auto 30px;
    row-gap:3px;
  }
  /* Círculos */
  .seasonality__months{
    display:grid;
    grid-template-columns:repeat(12,1fr);
    gap:1px;
    justify-items:center;
  }
  /* Círculo base */
  .moon{
    --fill:0%;
    width:30px; height:30px;
    border-radius:50%;
    background:radial-gradient(circle at 50% 50%, #e8f0e5 50%, #d0e2cd 100%);
    position:relative;
    overflow:hidden;
    box-shadow:0 2px 4px rgba(0,0,0,.1);
    transition:all .3s ease;
  }
  /* Capa verde que crece */
  .moon::after{
    content:"";
    position:absolute;
    bottom:0; left:0; width:100%;
    height:var(--fill);
    background:linear-gradient(180deg,#7bd464,#2e8b57);
    transition:height .4s ease;
  }
  /* Contorno brillante */
  .moon::before{
    content:"";
    position:absolute; inset:0;
    border-radius:50%;
    box-shadow:inset 0 0 4px rgba(255,255,255,.8);
  }
  /* Etiquetas (meses) */
  .seasonality__labels{
    display:grid;
    grid-template-columns:repeat(12,1fr);
    gap:10px;
    text-align:center;
    text-transform:uppercase;
    font-size:11px;
    color:#000000;
    letter-spacing:.4px;
  }
  /* Leyenda mínima en una sola fila */
  .legend{
    display:flex;
    justify-content:center;
    align-items:center;
    gap:10px;
    font-size:12px;
    color:#475569;
    font-family:system-ui,Segoe UI,Roboto,Inter,Arial,sans-serif;
    padding: 10px;
    width: 480px;
  }
  .legend__label{
    margin-right:10px;
    font-weight:500;
  }
  /* versión pequeña del mismo círculo */
  .moon--sm{
    width:16px;
    height:16px;
    border-radius:50%;
    background:radial-gradient(circle at 50% 50%, #e8f0e5 50%, #d0e2cd 100%);
    position:relative;
    overflow:hidden;
    box-shadow:0 1px 2px rgba(0,0,0,.1);
  }
  .moon--sm::after{
    content:"";
    position:absolute;
    bottom:0; left:0;
    width:100%;
    height:var(--fill);
    background:linear-gradient(180deg,#7bd464,#2e8b57);
    transition:height .3s ease;
  }

/*=== SECCION 2 ===*/
/* seccion 2*/
.section2__app{
  position: relative;
  width: 100%;
  background-color: #f0fbfd;
  height: 100vh;
}

/*=== SECCION 3 ===*/
/* seccion 3*/
.title-modern {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: 1px;
    color: #222;
    width: fit-content;
    font-family: "Segoe UI", Roboto, sans-serif;
    padding-left: 20px;
    padding-right: 20px;
    padding: 6px;
    background-color:#ecc04f ;
    color: #ffffff;
    border-radius: 0px 20px 20px 0px;
}
.section3__app{
  position: relative;
  width: 100%;
  background-color: #99a7a9;
}
.s3__container {
    width: 92%;
    margin: auto;
    margin-top: 25px;
}
.s3__card {
    background: white;
    padding: 20px;
    border-radius: 14px;
    box-shadow: 0px 4px 10px rgba(0,0,0,0.09);
    margin-bottom: 10px;
}
.s3__h3 {
    font-size: 20px;
    color: #253d8f;
    margin-bottom: 12px;
}
.s3__grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
}
@media(max-width: 900px) {
    .s3__grid-2 {
        grid-template-columns: 1fr;
    }
}
/* mejora el contenedor del gráfico */
.s3__canvas {
    /*max-height: 350px;*/
    width: 100% !important;
    height: 100% !important;
}
/* === Scroll horizontal solo para el gráfico principal === */
.s3__scroll-x {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 10px;
}
.s3__scroll-inner {
    width: 2000px; /* ancho fijo para habilitar scroll */
}
.s3__scroll-x::-webkit-scrollbar {
    height: 10px;
}
.s3__scroll-x::-webkit-scrollbar-thumb {
    background: #253d8f;
    border-radius: 5px;
}
.s3__scroll-x::-webkit-scrollbar-track {
    background: #d9d9d9;
}
/* Tamaño fijo del canvas para permitir scroll */
.s3__scroll-inner canvas {
    width: 3000px !important;
    height: 260px !important;
}
/*principales destinos*/
.paises-card {
    padding: 20px;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.paises-lista {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pais-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 16px;
    border-radius: 10px;
    background: #f7f7f7;
    border-left: 6px solid #0c7b42; /* color verde cacao */
    transition: 0.25s;
}

.pais-item:hover {
    background: #eef9f2;
    transform: translateX(4px);
}

.pais-item span {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.pais-item strong {
    font-size: 16px;
    color: #0c7b42;
}


/*=== SECCION 4 ===*/
/* seccion 4*/
.section4__app{
  position: relative;
  width: 100%;
  background-color: #aeb8b9;
  
  
}




/*=== BOTON WHATSAPP===*/
/* Botón flotante WhatsApp */
/* === WhatsApp FAB para el HTML dado === */
/* quita viñeta si ese <li> está dentro de una lista */
.ws_app{ list-style:none }
/* ancla que apunta a wa.me → lo hacemos FAB flotante */
.ws_app > a[href^="https://wa.me"]{
  position: fixed;
  right: calc(16px + env(safe-area-inset-right, 0));
  bottom: calc(16px + env(safe-area-inset-bottom, 0));
  z-index: 9999;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  text-decoration: none;
  /* color/vidrio */
  background:
    linear-gradient(180deg, rgba(255,255,255,.14), rgba(255,255,255,.04)) padding-box,
    linear-gradient(160deg, #28d96d 0%, #15b455 60%, #0ea04a 100%) border-box;
  border: 1.5px solid transparent;
  backdrop-filter: blur(6px) saturate(1.2);
  /* sombras y halo */
  box-shadow:
    0 18px 36px rgba(16,24,40,.22),
    0 8px 20px rgba(37,211,102,.28),
    inset 0 1px 0 rgba(255,255,255,.35);

  transition: transform .16s ease, box-shadow .16s ease;
  color:#fff; /* color del ícono FA */
}
/* ícono Font Awesome dentro (ignora margin inline) */
.ws_app > a[href^="https://wa.me"] > .fab.fa-whatsapp{
  font-size: 28px;
  line-height: 1;
  margin: 0 !important;
}
/* hover / active */
.ws_app > a[href^="https://wa.me"]:hover{
  transform: translateY(-2px) scale(1.02);
  box-shadow:
    0 22px 44px rgba(16,24,40,.26),
    0 10px 28px rgba(37,211,102,.34),
    inset 0 1px 0 rgba(255,255,255,.45);
}
.ws_app > a[href^="https://wa.me"]:active{ transform: translateY(0) scale(.99) }
/* foco accesible */
.ws_app > a[href^="https://wa.me"]:focus-visible{
  outline: none;
  box-shadow:
    0 0 0 3px rgba(255,255,255,.85),
    0 0 0 6px rgba(37,211,102,.45),
    0 18px 36px rgba(16,24,40,.22);
}
/* compacto en pantallas pequeñas */
@media (max-width: 360px){
  .ws_app > a[href^="https://wa.me"]{ width:56px; height:56px; }
  .ws_app > a[href^="https://wa.me"] > .fab.fa-whatsapp{ font-size:24px; }
}
/* modo oscuro opcional */
@media (prefers-color-scheme: dark){
  .ws_app > a[href^="https://wa.me"]{
    background:
      linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,.02)) padding-box,
      linear-gradient(160deg, #1fd366 0%, #13a74f 60%, #0b8e41 100%) border-box;
    box-shadow:
      0 18px 36px rgba(0,0,0,.45),
      0 8px 20px rgba(37,211,102,.25),
      inset 0 1px 0 rgba(255,255,255,.28);
  }
}










/* Panel lateral derecho */
.sidepanel{
  position: relative; display: flex; flex-direction: column; height: 100%;
  background: rgba(255,255,255,.95); border-left: 1px solid rgba(0,0,0,.06);
  box-shadow: -8px 0 22px rgba(0,0,0,.06); z-index: 1;
}

.sidepanel__body{ padding: 14px; overflow:auto; }
.sp-title{ margin: 6px 0 10px; font: 600 15px system-ui, Arial, sans-serif; color:#222; }
.chain-desc{ color:#333; font: 14px system-ui, Arial, sans-serif; line-height:1.35; }
.chain-desc .pill{
  display:inline-block; padding:4px 8px; border-radius: 999px;
  background:#e9edf2; color:#111; font-size:12px; margin-right:6px; margin-bottom:6px;
}
.chain-desc .list{
  margin-top:10px; padding:10px; border-radius:10px; background:#f8fafc; border:1px solid rgba(0,0,0,.06);
}
.chain-desc .list h4{ margin:0 0 8px; font-size:13px; color:#222; }
.chain-desc ul{ margin:0; padding-left:16px; }

/* Panel flotante sobre el mapa */
#infoPanel { position: absolute; display: none; z-index: 1000; }
#infoPanel.show { display: block; }
.info-panel{
  position:absolute; z-index:10000; display:none; background:#fff; border-radius:12px; padding:12px 14px;
  box-shadow:0 16px 42px rgba(0,0,0,.18); width: min(92vw, 320px); font:14px system-ui, Arial, sans-serif; pointer-events:auto;
}
.info-panel.show{ display:block; animation:panelIn .22s cubic-bezier(.22,.61,.36,1); }
.info-panel .hdr{ display:flex; align-items:center; justify-content:space-between; }
.info-panel .title{ margin:0; font-weight:700; font-size:16px; }
.info-panel .close{
  appearance:none; border:0; background:transparent; font-size:20px; line-height:1; cursor:pointer; color:#444; padding:0 4px;
  transition: transform .15s ease, color .15s ease;
}
.info-panel .close:hover{ transform: scale(1.06); color:#111; }
.info-panel .body{ color:#444; margin-top:6px; }
.info-panel .body img { width:100%; height:auto; border-radius:10px; display:block; }

@keyframes panelIn {
  from { transform: translateX(12px); opacity: 0; filter: blur(4px); }
  to   { transform: translateX(0);     opacity: 1; filter: blur(0);  }
}

/* Polígonos y efectos */
.leaflet-interactive { transition: fill-opacity .25s ease, stroke-width .2s ease, stroke .2s ease; }
.is-selected { filter: drop-shadow(0 0 12px rgba(11,94,215,.35)); }
.click-pulse { animation: depPulse .9s ease-out 1; }
@keyframes depPulse {
  0%   { stroke-width: 2; filter: drop-shadow(0 0 0 rgba(11,94,215,.0)); }
  50%  { stroke-width: 4; filter: drop-shadow(0 0 14px rgba(11,94,215,.35)); }
  100% { stroke-width: 2; filter: drop-shadow(0 0 0 rgba(11,94,215,.0)); }
}

/* Ripple (ondas) */
.ripple{
  pointer-events: none; width: 10px; height: 10px;
  border: 2px solid #0b5ed7; border-radius: 999px; background: transparent;
  animation: ripple .9s ease-out forwards; will-change: transform, opacity;
}
@keyframes ripple { from { transform: scale(.6); opacity: .6; } to { transform: scale(7); opacity: 0; } }

/* Controles del mapa */
.ctl-br{ position:absolute; left:14px; top:60px; z-index:10002; display:flex; flex-direction:column; gap:8px; }
.ctl-btn{
  width:42px; height:42px; border-radius:12px; background:#fff; color:#111; border:1px solid rgba(0,0,0,.08);
  box-shadow:0 8px 22px rgba(0,0,0,.16); font-size:20px; font-weight:700; line-height:1;
  display:flex; align-items:center; justify-content:center; cursor:pointer; transition: transform .12s ease, box-shadow .12s ease, opacity .2s ease;
}
.ctl-btn:hover{ transform: translateY(-1px); box-shadow:0 10px 24px rgba(0,0,0,.18); }
.ctl-btn:active{ transform: translateY(0); box-shadow:0 8px 22px rgba(0,0,0,.16); }

/* Error de red / carga */
.net-error{
  position:absolute; left:50%; bottom:70px; transform:translateX(-50%);
  background:#fff; border:1px solid rgba(0,0,0,.12); border-radius:10px; padding:10px 14px;
  box-shadow:0 10px 24px rgba(0,0,0,.16); font: 13px system-ui, Arial, sans-serif; color:#333; z-index:10005;
}

/* Modal (manteniendo colores) */
body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; }
.content { padding: 50px; text-align: center; }
.boton-principal, .boton-cerrar {
  padding: 12px 25px; font-size: 16px; background-color: #007bff; color: white; border: none; border-radius: 5px; cursor: pointer; transition: background-color 0.3s ease; margin-top: 20px;
}
.boton-principal:hover, .boton-cerrar:hover { background-color: #3a3a3a; }
.modal {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.581);
  display: flex; justify-content: center; align-items: flex-start; z-index: 10002; opacity: 0; visibility: hidden; transition: opacity 0.5s ease, visibility 0s linear 0.5s;
}
.modal.activo { opacity: 1; visibility: visible; transition: opacity 0.5s ease; }
.modal-contenido {
  background-color: white; width: 90%; max-width: 1000px; height: 90vh; padding: 30px; border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0,0,0,.498); position: relative; transform: translateY(-100px); opacity: 0;
  transition: transform .5s ease-out, opacity .5s ease-out; overflow-y: auto;
}
.modal.activo .modal-contenido { transform: translateY(0); opacity: 1; }
.modal.cerrando .modal-contenido { transform: translateY(-100px); opacity: 0; }
.cerrar-x { position: absolute; top: 15px; right: 25px; font-size: 30px; font-weight: 300; color: #555; background: none; border: none; cursor: pointer; transition: color .3s; }
.cerrar-x:hover, .cerrar-x:focus { color: #d9534f; }
.titulo-modal { color: #1d4c4f; margin-top: 0; }

/* Badges (número por dpto) */
.dept-badge { pointer-events: none; }
.dept-badge .pin{
  width: var(--sz, 30px); height: var(--sz, 26px); border-radius: 40%;
  background: #3bec82ff; color: #000000; display:flex; align-items:center; justify-content:center;
  font: 600 14px "helvetica", Calibri, Arial; letter-spacing:.2px;
  box-shadow: 0 6px 14px rgba(0,0,0,.18); border: 2px solid rgba(0,0,0,.06);
  transform: translateZ(0); transition: transform .16s ease, box-shadow .16s ease;
}
.dept-badge .pin > span { line-height: 1; }
.dept-badge.active .pin{ transform: scale(1.06); box-shadow: 0 8px 18px rgba(0,0,0,.28); }

/* Responsive: en móvil el panel pasa debajo del mapa */
@media (max-width: 992px){
  .app{ grid-template-columns: 1fr; grid-template-rows: auto auto; }
  .sidepanel{ height: auto; }
  .map-wrap{ height: 60vh; }
}
@media (max-width: 420px){
  .filter-label{ display:none; }
  .app-title{ display:none; }
}




/* Sombra suave del trazo principal (no afecta el fill) */
path.leaflet-interactive.relief-stroke {
  filter: drop-shadow(0 0 2px rgba(0,0,0,0.18));
}

/*===Estilos minigraficos===*/
.kpi.kpi--with-chart{
  display:flex; align-items:center; gap:12px;
}
.kpi.kpi--with-chart .kpi__icon{ font-size:22px; }
.kpi.kpi--with-chart .kpi__main{ display:flex; flex-direction:column; }
.kpi.kpi--with-chart .kpi__chart{
  flex:0 0 260px;   /* antes 180px */
}
.kpi.kpi--with-chart .kpi__chart canvas{
  width:100%; height:80px; /* un poco más alto para que quepan las etiquetas */
}
@media (max-width: 520px){
  .kpi.kpi--with-chart .kpi__chart{ flex-basis:100%; }
}

/*Boton css especial*/
.acciones{ list-style:none; margin:6px; padding:0; }
.acciones li{ display:inline-block; }
.btn-ver-estudios{
  display:inline-block;          /* ancho se ajusta al texto */
  padding:.6rem 1rem;
  border-radius:8px;
  background:#62ac82;            /* cambia a tu color */
  color:#fff;                    /* quita azul del link */
  text-decoration:none;          /* sin subrayado */
  font-weight:600;
  line-height:1;
}
.btn-ver-estudios:hover{ filter:brightness(.95); }
.btn-ver-estudios:focus{ outline-offset:2px; }
.dobleCard{
  display: grid;
  grid-template-columns: 1fr 600px;
}


/*==Estilos de tabla adjuntos*/
/* Contenedor */
.jag__tableContainer {
    max-width: 1000px;
    background: #ffffff;
    padding: 25px;
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    border: 1px solid #e5e7eb;
}
/* Tabla */
.jag__modernTable {
    width: 100%;
    border-collapse: collapse;
}
/* Encabezado */
.jag__modernTable thead th {
    background: #ffffff;
    color: #1c1c1c;
    padding: 16px;
    text-align: left;
    font-size: 15px;
    font-weight: 600;
    border-bottom: 2px solid #e5e7eb;
}
/* Filas */
.jag__modernTable tbody td {
    padding: 14px 16px;
    border-bottom: 1px solid #e5e7eb;
    color: #2e2e2e;
    font-size: 14px;
}
/* Hover fila */
.jag__modernTable tbody tr:hover {
    background: #f9fafb;
}
/* Botón descargar */
.btn-descargar {
    display: inline-block;
    padding: 8px 18px;
    background: #4f46e5;
    color: #ffffff;
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    transition: 0.25s ease;
    font-weight: 500;
}
.btn-descargar:hover {
    background: #3730a3;
}

.subtitulo{
  font-size: 22px;
  font-weight: 700;
  color: #222;
  display: block;              /* <-- CLAVE: que sea bloque */
  width: fit-content;          /* la línea se ajusta al texto */
  margin: 10px 0 14px;        /* más aire arriba/abajo */
  padding-bottom: 8px;         /* separa el texto de la línea */
  border-bottom: 3px solid #26ac04;
}
/* separa automáticamente el título del primer card que le sigue */
.subtitulo + .s3__card{
  margin-top: 12px;
}
.flag-usa {
    width: 28px;                /* Ajusta tamaño */
    height: auto;
}

/*grafico cuadrado*/
.item {
        margin-bottom: 20px;
    }

    .item-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 6px;
        font-size: 15px;
        font-weight: 600;
    }

    .country {
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .rank {
        width: 28px;
        height: 28px;
        background: #22c55e;
        color: #ffffff;
        border-radius: 50%;
        font-size: 14px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 700;
    }

    .value {
        font-weight: 700;
        color: #111827;
    }

    .bar-container {
        background: #e5e7eb;
        height: 10px;
        border-radius: 999px;
        overflow: hidden;
    }

    .bar {
        height: 100%;
        border-radius: 999px;
        background: linear-gradient(90deg, #22c55e, #16a34a);
    }

    /* Tamaños proporcionales (EE.UU. = 100%) */
    .us { width: 100%; }
    .nl { width: 78%; }
    .es { width: 30%; }
    .ca { width: 16%; }
    .uk { width: 14%; }

  /*===ESTILOS TARJETAS DASHBOARD===*/
  
        .jagHomeC {
            max-width: 100%;
            margin: 0 auto;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            /*background: linear-gradient( 135deg, #1f6f54 0%, #2f8f6b 100% );*/
            min-height: 100vh;
        }       
        .jagHomeC__titulo {
            text-align: center;
            color: white;
            margin-bottom: 3px;
            padding: 3px 0;
        }
        .jagHomeC__titulo h1 {
            font-size: 3em;
            margin-bottom: 10px;
            text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
        }
        .jagHomeC__titulo .subtitle {
            font-size: 1.2em;
            opacity: 0.9;
        }
        .jagHomeDashboard {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 30px;
            padding: 20px;
        }

        .jagHomeCard {
            background: white;
            border-radius: 20px;
            padding: 40px;
            cursor: pointer;
            transition: all 0.3s ease;
            box-shadow: 0 10px 30px rgba(0,0,0,0.2);
            position: relative;
            overflow: hidden;
        }

        .jagHomeCard::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 5px;
            background: linear-gradient(90deg, var(--color-1), var(--color-2));
        }

        .jagHomeCard:hover {
            transform: translateY(-10px);
            box-shadow: 0 20px 40px rgba(0,0,0,0.3);
            
            filter: brightness(1.1);
            transform: translateY(-2px);
            transition: all 0.3s ease;
            background-color: #ffe9c0;
        }

        .jagHomeCard__icon{
            width:100%;
            height:80px;
            display:flex;
            align-items:center;
            justify-content:center;
            margin-bottom:10px;
        }

        .jagHomeCard__icon img{
            max-height:80px;
            max-width:100%;
            object-fit:contain;
        }

        .jagHomeCard__title {
            font-size: 2em;
            font-weight: bold;
            margin-bottom: 15px;
            text-align: center;
            color: #333;
        }

        .jagHomeCard__description {
            color: #666;
            text-align: center;
            font-size: 1.1em;
            line-height: 1.6;
            margin-bottom: 20px;
        }

        .jagHomeCard__stats {
            display: flex;
            justify-content: space-around;
            margin-top: 25px;
            padding-top: 25px;
            border-top: 2px solid #f0f0f0;
        }

        .jagHomeDashboard .stat {
            text-align: center;
        }

        .jagHomeDashboard .stat-value {
            font-size: 1.5em;
            font-weight: bold;
            color: #333;
        }

        .jagHomeDashboard .stat-label {
            font-size: 0.9em;
            color: #4d4d4d;
            margin-top: 5px;
        }

        .jagHomeDashboard .jagHomeCard__button {
            display: block;
            width: 100%;
            padding: 15px;
            background: linear-gradient(90deg, var(--color-1), var(--color-2));
            color: white;
            text-align: center;
            border-radius: 10px;
            margin-top: 20px;
            font-weight: bold;
            font-size: 1.1em;
            transition: opacity 0.3s ease;
        }
        .jagHomeDashboard .jagHomeCard__button:hover {
            opacity: 0.9;
        }

        /* Colores específicos por cultivo */
        .palta {
            --color-1: #2ecc71;
            --color-2: #27ae60;
        }

        .cacao {
            --color-1: #a0522d;
            --color-2: #8b4513;
        }

        .mango {
            --color-1: #f39c12;
            --color-2: #e67e22;
        }

        .quinua {
            --color-1: #d4af37;
            --color-2: #b8941e;
        }

        .cafe {
            --color-1: #3e2723;
            --color-2: #2c1810;
        }

        @media (max-width: 768px) {
            h1 {
                font-size: 2em;
            }
            
            .jagHomeDashboard {
                grid-template-columns: 1fr;
            }
        }
  /*===fin dashboard===*/

  
.btn-excel {
    display: inline-flex;
      align-items: center;
        gap: 8px;

          padding: 6px 12px;
            font-size: 13px;
              font-weight: 500;

                color: #374151;
                  background: #ffffff;

                    border: 1px solid #d1d5db;
                      border-radius: 8px;

                        cursor: pointer;
                          transition: all 0.25s ease;
                          }

.btn-excel i {
                            font-size: 17px;
                              color: #217346; /* Verde Excel */
                              }
.btn-excel:hover {
                                background: #f3faf5;
                                  border-color: #217346;
                                    color: #217346;
                                      box-shadow: 0 4px 10px rgba(33, 115, 70, 0.18);
                                        transform: translateY(-1px);
                                        }
 .btn-excel:active {
                                          transform: scale(0.96);
  }

