.weather-card {
  max-width: 320px;
  background: linear-gradient(135deg, #4facfe, #00f2fe);
  color: #fff;
  border-radius: 15px;
  padding: 15px;
  font-family: Arial, sans-serif;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.weather-main {
  display: flex;
  align-items: center;
  gap: 10px;
}

.weather-main img {
  width: 70px;
}

.weather-main h2 {
  margin: 0;
  font-size: 36px;
}

.weather-main p {
  margin: 0;
  font-size: 14px;
}

.weather-main span {
  font-size: 13px;
  opacity: 0.9;
}

.weather-extra {
  display: flex;
  justify-content: space-between;
  margin-top: 15px;
  text-align: center;
}

.weather-extra div {
  flex: 1;
}

.weather-extra small {
  display: block;
  font-size: 11px;
  opacity: 0.8;
}


/******************************************************************/
/***********************   LOTE   ********************************/
/******************************************************************/
.lote-card {
  background: #fff;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 8px 20px rgba(0,0,0,.12);
  transition: transform .3s, box-shadow .3s;
  position: relative;
}

.lote-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(0,0,0,.2);
}

.lote-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.lote-header .icon {
  font-size: 28px;
}

.badge-cultivo {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 12px;
  color: #fff;
}

.lote-card h4 {
  margin: 10px 0 0;
  font-weight: bold;
}

.lote-card small {
  color: #666;
}

.cantidad {
  font-size: 20px;
  font-weight: bold;
  margin: 12px 0 8px;
}

.cantidad span {
  font-size: 12px;
  color: #888;
}

.progress {
  height: 7px;
  border-radius: 5px;
  background: #eee;
}

.progress-bar {
  background: linear-gradient(90deg, #00c853, #b2ff59);
}

.acciones {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
}

/* COLORES POR CULTIVO */
.maracuya {
  border-left: 6px solid #28a745;
}
.maracuya .badge-cultivo {
  background: #28a745;
}

.papaya {
  border-left: 6px solid #ffc107;
}
.papaya .badge-cultivo {
  background: #ffc107;
  color: #000;
}

.yuca {
  border-left: 6px solid #8d6e63;
}
.yuca .badge-cultivo {
  background: #8d6e63;
}

.estado {
  margin-top: 12px;
  padding: 10px;
  border-radius: 12px;
  text-align: center;
  font-weight: bold;
  font-size: 14px;
}

.estado-cuidado {
  background: #fff3cd;
  color: #856404;
  border: 1px solid #ffeeba;
}

.estado-disponible {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

/*************************************************************/
/*******************  PLAGAS ********************************/
/*************************************************************/
.plaga-card {
  background: #fff;
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 8px 22px rgba(0,0,0,.15);
  transition: all .3s ease;
  position: relative;
}

.plaga-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 35px rgba(0,0,0,.25);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-header .icon {
  font-size: 30px;
}

.card-header .badge {
  padding: 5px 12px;
  border-radius: 14px;
  font-size: 11px;
  font-weight: bold;
  color: #fff;
}

.plaga-card h4 {
  margin: 12px 0 10px;
  font-weight: bold;
}

.cura {
  background: #f8f9fa;
  padding: 12px;
  border-radius: 12px;
  font-size: 14px;
}

.acciones {
  margin-top: 14px;
  display: flex;
  justify-content: space-between;
}

/* PLAGA */
.plaga {
  border-left: 6px solid #dc3545;
}
.plaga .badge {
  background: #dc3545;
}

/* ENFERMEDAD */
.enfermedad {
  border-left: 6px solid #6f42c1;
}
.enfermedad .badge {
  background: #6f42c1;
}
.gravedad {
  margin-top: 10px;
  padding: 6px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: bold;
  display: inline-block;
}

.gravedad-success { background: #d4edda; color: #155724; }
.gravedad-warning { background: #fff3cd; color: #856404; }
.gravedad-danger  { background: #f8d7da; color: #721c24; }

/* ANIMACIONES */
.plaga-item {
  animation: fadeIn .4s ease;
}

.oculto {
  display: none;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}


/*******************************************************************/
/***************** Prdoucto por caducar****************************/
/****************************************************************/
.alerta-icono {
  /*position: absolute;*/
  top: 12px;
  right: 14px;
  font-size: 26px;
  color: #dc3545;
  animation: pulso 1.3s infinite;
}

@keyframes pulso {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(220,53,69,.6);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 12px rgba(220,53,69,0);
  }
  100% {
    transform: scale(1);
  }
}

/**************************************************/
/**************************************************/
/**************************************************/
.dashboard-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.kpi-card {
  background: #fff;
  border-radius: 16px;
  padding: 15px;
  display: flex;
  align-items: center; 
  gap: 15px;
  box-shadow: 0 10px 25px rgba(0,0,0,.08);
  transition: transform .3s ease, box-shadow .3s ease;
  animation: fadeUp .6s ease forwards;
}

.kpi-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 15px 35px rgba(0,0,0,.15);
}

.kpi-card i {
  font-size: 40px;
}

.kpi-number {
  font-size: 28px;
  font-weight: bold;
}

.kpi-card p {
  margin: 0;
  font-size: 14px;
  color: #666;
}


/* Colores */
.green i { color: #2ecc71; }
.red i { color: #e74c3c; }
.yellow i { color: #f1c40f; }
.alerta i { color: #ff3b3b; }

/* Animación de entrada */
.kpi-card.alerta {
  animation: alertGlow 1.6s infinite;
}

@keyframes alertGlow {
  0% {
    box-shadow: 0 0 0 rgba(255,59,59,.4);
  }
  50% {
    box-shadow: 0 0 18px rgba(255,59,59,.9);
  }
  100% {
    box-shadow: 0 0 0 rgba(255,59,59,.4);
  }
}

/**************************/
.btnCad{
  border: 0;
    background: unset;
}
.clickable {
  cursor: pointer;
}

.clickable:active {
  transform: scale(.98);
}

.alerta-roja {
  background: rgba(255, 0, 0, 0.12);
  animation: parpadeo 1.2s infinite;
}

.alerta-amarilla {
  background: rgba(255, 193, 7, 0.18);
}

.alerta-verde {
  background: rgba(40, 167, 69, 0.15);
}

@keyframes parpadeo {
  0% { opacity: 1; }
  50% { opacity: 0.6; }
  100% { opacity: 1; }
}

.card {
  transition: transform .35s ease, box-shadow .35s ease;
  border-radius: 14px;
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 15px 35px rgba(0,0,0,.12);
}
.card.alerta:hover {
  animation: salto .6s ease;
}

@keyframes salto {
  0% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0); }
}