/* ======== DISEÑO GENERAL ======== */
.tdu-contenido {
  padding: 2rem;
  position: relative;
}

/* === Sección de bienvenida === */
.tdu-seccion-bienvenida {
  background: linear-gradient(135deg, #861542 0%, #a02a5e 100%);
  border-radius: 16px;
  padding: 2rem;
  margin-bottom: 2rem;
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 8px 32px rgba(134, 21, 66, 0.2);
}

.tdu-bienvenida-content h1 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}

.tdu-bienvenida-content p {
  opacity: 0.9;
  margin: 0;
}

.tdu-bienvenido-stats {
  display: flex;
  gap: 2rem;
}

.tdu-stat-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: rgba(255, 255, 255, 0.1);
  padding: 1rem;
  border-radius: 12px;
  backdrop-filter: blur(10px);
}

.tdu-stat-icono {
  font-size: 2rem;
  opacity: 0.8;
  color: #ffffff;
}

.tdu-stat-content {
  display: flex;
  flex-direction: column;
}

.tdu-stat-numero {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
  color: #ffffff;
}

.tdu-stat-label {
  font-size: 12px;
  opacity: 0.8;
  color: #ffffff;
}

/* === METRICAS GENERALES === */
.tdu-metrica-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.tdu-metrica-card {
  border-radius: 16px;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.2rem;
  color: white;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  z-index: 2;
}

.tdu-metrica-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.tdu-metrica-icono {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
}

.tdu-metrica-content {
  flex: 1;
}

.tdu-metrica-numero {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 0.3rem;
}

.tdu-metrica-label {
  font-weight: 600;
  margin-bottom: 0.3rem;
  font-size: 0.95rem;
  opacity: 0.9;
}

.tdu-metrica-subtext {
  font-size: 0.85rem;
  opacity: 0.8;
}

.tdu-metrica-decoration {
  position: absolute;
  top: -20px;
  right: -20px;
  width: 100px;
  height: 100px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
}

/* Gradientes para tarjetas de métricas */
.tdu-metrica-completadas { background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%); } /* Verde ajustado */
.tdu-metrica-pendientes { background: linear-gradient(135deg, #bb2937 0%, #dc3545 100%); }
.tdu-metrica-en-progreso { background: linear-gradient(135deg, #f39c12 0%, #f1c40f 100%); } /* Naranja ajustado */
.tdu-metrica-total { background: linear-gradient(135deg, #861542 0%, #a02a5e 100%); }

/* === Progreso general === */
.tdu-progreso-general {
  background: #fff;
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  z-index: 2;
  position: relative;
}

.tdu-progreso-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.tdu-progreso-header h3 {
  font-weight: 700;
  color: #2d3748;
  margin: 0;
}

.tdu-progreso-header span {
  font-weight: 700;
  color: #861542;
}

.tdu-progreso-barra-container {
  width: 100%;
  height: 10px;
  background: #e9ecef;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  margin: 10px 0 1rem 0;
}

.tdu-progreso-segmento {
  height: 100%;
  transition: width 0.5s ease, background 0.5s ease;
}
.tdu-progreso-segmento.tdu-completada { background-color: #27ae60; }
.tdu-progreso-segmento.tdu-progreso { background-color: #f39c12; }
.tdu-progreso-segmento.tdu-pendiente { background-color: #dc3545; }

.tdu-progreso-stats {
  display: flex;
  gap: 2rem;
}

.tdu-progreso-stat {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: #000;
   font-weight: 500;
}

.tdu-conteo {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.tdu-conteo.tdu-completada { background: #27ae60; }
.tdu-conteo.tdu-progreso { background: #f39c12; }
.tdu-conteo.tdu-pendiente { background: #dc3545; }

/* === Mis Proyectos === */
.tdu-mis-proyectos {
  background: #fff;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  z-index: 2;
  position: relative;
}

.tdu-mis-proyectos-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #f7fafc;
}

.tdu-mis-proyectos-titulo {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.tdu-mis-proyectos-titulo h2 {
  font-size: 1.5rem;
  color: #2d3748;
  font-weight: 700;
  margin: 0;
}

.tdu-mis-proyectos-titulo-icon {
  color: #861542;
  font-size: 1.3rem;
}

.tdu-numero-proyectos {
  background: linear-gradient(135deg, #861542, #a02a5e);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
}

/* === Grid de proyectos (Estilos de Tarjeta) === */
.tdu-proyecto-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.tdu-proyecto-card-encabezado {
  background: #fff;
  border: 2px solid #daeaff46;
  border-radius: 16px;
  padding: 1.5rem;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  overflow: hidden;
  z-index: 2;
}

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

.tdu-proyecto-card-encabezado:hover {
  transform: translateY(-5px);
  border-color: #861542;
  box-shadow: 0 12px 30px rgba(134, 21, 66, 0.15);
}

/* Borde izquierdo según estado */
.tdu-proyecto-card-encabezado.completado { border-left: 6px solid #27ae60; }
.tdu-proyecto-card-encabezado.progreso { border-left: 6px solid #f39c12; }
.tdu-proyecto-card-encabezado.pendiente { border-left: 6px solid #dc3545; }
.tdu-proyecto-card-encabezado.vencido { border-left: 6px solid #8b0000; }

/* Header del proyecto */
.tdu-project-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.tdu-proyecto-titulo-seccion {
  flex: 1;
}

.tdu-proyecto-titulo {
  font-weight: 700;
  color: #000;
  margin: 0 0 0.5rem 0;
  font-size: 1.2rem;
  line-height: 1.3;
  text-transform: uppercase;
}

.tdu-proyecto-descripcion {
  font-size: 0.9rem;
  color: #666;
  line-height: 1.4;
  margin: 0;
  text-transform: uppercase;
  font-weight: bold;
}

/* Meta info (Badges, tareas count) */
.tdu-proyecto-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
}

.tdu-total-tareas {
  background: #f7fafc;
  color: #4a5568;
  padding: 0.4rem 0.8rem;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid #e2e8f0;
}

.tdu-prioridad-badge {
  display: flex;
  align-items: center;
  padding: 0.4rem 0.8rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 700;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  background: #dc3545;
  color: white;
}

.tdu-prioridad-badge.alta { background-color: #f39c12; color: #2d3748; }
.tdu-prioridad-badge.media { background-color: #ff9500; color: #fff; }
.tdu-prioridad-badge.baja { background-color: #27ae60; color: #fff; }

/* Cuerpo del proyecto (Gráfica y métricas) */
.tdu-proyecto-body {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.tdu-seccion-graficos {
  flex-shrink: 0;
}

.tdu-grafica-circular {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  background: conic-gradient(#27ae60 0%, #f39c12 50%, #dc3545 100%);
  transition: background 0.5s ease;
}

.tdu-circular-center {
  position: absolute;
  width: 50px;
  height: 50px;
  background-color: #fff;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.1);
}

.tdu-circular-porcentaje {
  font-size: 1.1rem;
  font-weight: 800;
  color: #2d3748;
  line-height: 1;
}

.tdu-sin-tareas {
  background: #f7fafc;
}

.tdu-detalles-metricas {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}

.tdu-metrica-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: #4a5568;
  font-weight: bold;
}

.tdu-metrica-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.tdu-metrica-dot.tdu-completada { background: #27ae60; }
.tdu-metrica-dot.tdu-progreso { background: #f39c12; }
.tdu-metrica-dot.tdu-pendiente { background: #dc3545; }

.tdu-metrica-item strong {
  margin-left: auto;
  font-weight: 700;
}

/* Info: Fechas y Tiempo restante */
.tdu-proyecto-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid #f7fafc;
}

.tdu-dias {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.tdu-dias-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: #718096;
}

.tdu-tiempo-restante {
  background: #f8f9fa;
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  font-size: 0.85rem;
  border: 1px solid #e9ecef;
  text-align: center;
}

.tdu-tiempo-label {
  font-size: 0.9rem;
  font-weight: bold;
  color: inherit;
  transition: color 0.3s ease;
}

.tdu-tiempo-label.finalizado { color: #27ae60; font-weight: 700; }
.tdu-tiempo-label.vencido { color: #dc3545; font-weight: 700; }

/* Footer: Botón */
.tdu-proyecto-footer {
  margin-top: auto;
  display: flex;
  justify-content: flex-end;
}

.tdu-btn-primary {
  background: linear-gradient(135deg, #861542, #a02a5e);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 0.8rem 2rem;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(134, 21, 66, 0.3);
}

.tdu-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(134, 21, 66, 0.4);
  background: linear-gradient(135deg, #6a1035, #861542);
}

.tdu-btn-icon {
  font-size: 0.9rem;
  transition: transform 0.3s ease;
}

.tdu-btn-primary:hover .tdu-btn-icon {
  transform: translateX(3px);
}

/* Estado vacío */
.tdu-empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: #718096;
}

.tdu-empty-icon {
  color: #cbd5e0;
  margin-bottom: 1.5rem;
  opacity: 0.5;
}

.tdu-empty-state h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  color: #4a5568;
}

.tdu-empty-state p {
  color: #718096;
  max-width: 400px;
  margin: 0 auto;
  line-height: 1.5;
}
/* Contenedor del Título y el Badge */
.tdu-proyecto-titulo-badge {
  display: flex;
  justify-content: space-between; /* Título a la izquierda, Badge a la derecha */
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

/* El estilo BASE del Badge */
.tdu-proyecto-badge {
  font-size: 0.75rem;
  font-weight: 800;
  padding: 6px 14px;
  border-radius: 50px; /* Forma de píldora */
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* === ESTILOS DINÁMICOS DEL BADGE === */

/* En proceso (Naranja: #f39c12) */
.tdu-proyecto-badge.en-proceso {
  background-color: #f39c12; 
  color: #ffffff;                             
  border: 1px solid rgba(243, 156, 18, 0.3);
}

/* Finalizado (Verde: #27ae60) */
.tdu-proyecto-badge.finalizado {
  background-color: rgba(39, 174, 96, 0.15); /* Verde muy suave */
  color: #27ae60;                            /* Verde fuerte */
  border: 1px solid rgba(39, 174, 96, 0.3);
}

/* (Opcional) Vencido - Si en futuro lo necesitas */
.tdu-proyecto-badge.vencido {
  background-color: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}
/* === NUEVOS ESTADOS SIMPLIFICADOS === */

/* Borde lateral */
.tdu-proyecto-card-encabezado.finalizado {
  border-left: 6px solid #27ae60; /* Verde */
}

.tdu-proyecto-card-encabezado.en-proceso {
  border-left: 6px solid #f1c40f; /* Amarillo */
}

/* Badge */
.tdu-proyecto-badge.finalizado {
  background-color: #27ae60;
  color: white;
}

.tdu-proyecto-badge.en-proceso {
  background-color: #f1c40f;
  color: white;
}


/* === Responsivo (Media Queries) === */
@media (max-width: 1200px) {
  .tdu-proyecto-grid {
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  }
}

@media (max-width: 768px) {
  .tdu-contenido { padding: 1rem; }
  .tdu-seccion-bienvenida { flex-direction: column; gap: 1.5rem; text-align: center; }
  .tdu-metrica-grid { grid-template-columns: 1fr; }
  .tdu-proyecto-body { flex-direction: column; gap: 1rem; }
}