/* =========================== Contenedor Principal ============================ */
.ldp-container {
  padding: 0;
  min-height: 100vh;
}

.ldp-content {
  padding: 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

/* =========================== Header ============================ */
.ldp-header {
  background: linear-gradient(135deg, #861542 0%, #a51e5c 100%);
  padding: 2rem;
  color: white;
  border-radius: 0 0 20px 20px;
  margin-bottom: 2rem;
  box-shadow: 0 4px 20px rgba(134, 21, 66, 0.2);
  z-index: 5;
  position: relative;
}

.ldp-header-content {
  max-width: 1400px;
  margin: 0 auto;
  z-index: 3;
  position: relative;
}

.ldp-header-title h1 {
  font-size: 2.2rem;
  font-weight: 800;
  margin: 0 0 0.5rem 0;
  color: white;
  letter-spacing: -0.5px;
}

.ldp-subtitle {
  font-size: 1rem;
  opacity: 0.9;
  margin: 0;
  font-weight: 400;
}

.ldp-header-controls {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  align-items: center;
}

/* =========================== Barra de Búsqueda ============================ */
.ldp-search-container {
  flex: 1;
  max-width: 600px;
}

.ldp-search-wrapper {
  position: relative;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  padding: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.ldp-search-icon {
  position: absolute;
  left: 1.2rem;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.1rem;
}

.ldp-search-input {
  width: 100%;
  padding: 0.875rem 1rem 0.875rem 3rem;
  background: transparent;
  border: none;
  color: white;
  font-size: 1rem;
  border-radius: 8px;
}

.ldp-search-input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.ldp-search-input:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.15);
}

.ldp-search-clear {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.ldp-search-clear:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* =========================== Filtro Ordenar ============================ */
.ldp-sort-container {
  position: relative;
  z-index: 3;
}

.ldp-sort-button {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  padding: 0.875rem 1.5rem;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  backdrop-filter: blur(10px);
}

.ldp-sort-button:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

.ldp-sort-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0.5rem;
  background: white;
  border-radius: 12px;
  padding: 0.5rem;
  min-width: 240px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  border: 1px solid #e2e8f0;
}

.ldp-sort-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.75rem 1rem;
  border: none;
  background: none;
  color: #1e293b;
  font-size: 0.95rem;
  text-align: left;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  z-index: 5;
}

.ldp-sort-option:hover {
  background: #f8fafc;
}

.ldp-sort-option.active {
  background: #861542;
  color: white;
}

.ldp-sort-option.active svg {
  color: white;
}

/* =========================== Resultados de Búsqueda ============================ */
.ldp-search-results {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: white;
  padding: 1rem 1.5rem;
  border-radius: 12px;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  z-index: 3;
  position: relative;
}

.ldp-results-count {
  font-weight: 600;
  color: #1e293b;
}

.ldp-clear-search {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #f8fafc;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  color: #64748b;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
}

.ldp-clear-search:hover {
  background: #fee2e2;
  color: #ef4444;
}

/* =========================== Grid de Proyectos ============================ */
.ldp-projects-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  width: 100%;
}

/* =========================== Tarjeta de Proyecto ============================ */
.ldp-proyecto-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  border: 1px solid #e2e8f0;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  overflow: hidden;
   z-index: 3;
  position: relative;
  border-color: #31687442;
}

.ldp-proyecto-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
  border-color: #861542;
}

.ldp-proyecto-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
}

/* =========================== Header de Tarjeta ============================ */
.ldp-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.ldp-title-section {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  flex: 1;
}

.ldp-project-icon {
  flex-shrink: 0;
}

.ldp-icon-circle {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: #861542;
}

.ldp-title-wrapper {
  flex: 1;
  min-width: 0;
}

.ldp-project-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 0.5rem 0;
  line-height: 1.4;
  text-transform: uppercase;
}

.ldp-project-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: #64748b;
}

.ldp-project-id {
  font-family: 'Courier New', monospace;
  background: #f8fafc;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
}

.ldp-project-responsable {
  opacity: 0.8;
}

/* =========================== Estado ============================ */
.ldp-status-section {
  flex-shrink: 0;
}

.ldp-status-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.875rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 1px solid;
  backdrop-filter: blur(4px);
}

.ldp-status-icon {
  font-size: 0.9rem;
  display: flex;
  align-items: center;
}

/* =========================== Barra de Progreso ============================ */
.ldp-progress-section {
  background: #f8fafc;
  padding: 1rem;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  margin-bottom: 1rem;
}


.ldp-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.ldp-progress-label {
  font-size: 0.95rem;
  font-weight: 600;
  color: #64748b;
}

.ldp-progress-percentage {
  font-size: 1.1rem;
  font-weight: 700;
  color: #861542;
}

.ldp-progress-bar {
  height: 8px;
  background: #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
}

.ldp-progress-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.5s ease;
}

/* =========================== Estadísticas ============================ */
.ldp-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 1rem;
}

.ldp-stat-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: #f8fafc;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  transition: all 0.2s;
}

.ldp-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.ldp-stat-icon-wrapper {
  width: 44px;
  height: 44px;
  background: white;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.ldp-stat-content {
flex: 1;
  min-width: 0;
}

.ldp-stat-number {
  font-size: 1.8rem;
  font-weight: 800;
  color: #1e293b;
  line-height: 1;
  margin-bottom: 0.25rem;
}

.ldp-stat-label {
 font-size: 0.75rem; 
  color: #64748b;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* =========================== Footer ============================ */
.ldp-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding-top: 1rem;
  border-top: 2px solid #e2e8f0;
}

.ldp-date-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
}

.ldp-date-icon {
  width: 36px;
  height: 36px;
  background: #eff6ff;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #3b82f6;
}

.ldp-date-content {
  flex: 1;
}

.ldp-date-label {
  font-size: 0.8rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ldp-date-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: #1e293b;
}

/* =========================== Días Restantes ============================ */
.ldp-days-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  flex-shrink: 0;
}

.ldp-days-success {
  background: #d1fae5;
  color: #065f46;
}

.ldp-days-warning {
  background: #fef3c7;
  color: #92400e;
}

.ldp-days-danger {
  background: #fee2e2;
  color: #991b1b;
}

.ldp-days-neutral {
  background: #e0e7ff;
  color: #3730a3;
}

.ldp-days-icon {
  font-size: 0.9rem;
}

/* =========================== Botón de Acción ============================ */
.ldp-action-button {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: #861542;
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s ease;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(134, 21, 66, 0.2);
}

.ldp-action-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(134, 21, 66, 0.3);
  opacity: 0.95;
}

.ldp-btn-icon {
  font-size: 1rem;
}

/* =========================== Media Queries  ============================ */


/* Tablets y Laptops pequeñas (max 1024px) */
@media (max-width: 1024px) {
  .ldp-content {
    padding: 1.5rem;
  }
  
  .ldp-header-title h1 { 
    font-size: 1.8rem; 
  }
  
  .ldp-header-controls { 
    flex-direction: column; 
    align-items: stretch;
    gap: 1rem; 
  }
  
  .ldp-search-container, 
  .ldp-sort-container { 
    max-width: 100%; 
  }

    .ldp-title-section {
    flex-direction: column; 
    align-items: flex-start;
    width: 100%;
  }
  .ldp-status-section {
    align-self: flex-start; 
  }
}

/* Móviles Grandes y Tablets Verticales (max 768px) */
@media (max-width: 768px) {
  .ldp-content {
    padding: 1rem;
  }

  .ldp-card-header {
    flex-direction: column;
    gap: 1rem;
  }
  
  .ldp-status-section {
    align-self: flex-start; 
  }

 
  .ldp-stats-grid {
    grid-template-columns: 1fr; 
  }
  
  .ldp-stat-card {
    padding: 0.75rem;
  }

  .ldp-stat-number {
    font-size: 1.4rem; 
  }
  
  .ldp-card-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  .ldp-date-info, .ldp-days-info {
    width: 100%;
    justify-content: center;
    background-color: #f8fafc; 
    padding: 0.5rem;
    border-radius: 8px;
  }

  .ldp-action-button {
    width: 100%;
    justify-content: center;
    padding: 0.875rem;
  }
  .ldp-title-section {
    flex-direction: column; 
    align-items: flex-start;
    width: 100%;
  }
}

/* Móviles Pequeños (max 480px) */
@media (max-width: 480px) {
  .ldp-project-title {
    font-size: 1.1rem;
  }
  .ldp-progress-percentage {
    font-size: 0.9rem;
  }
}
