/* --- RESET Y ESTILOS GENERALES --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
}

body {
  background-color: #fdf2f5;
}

/* CONTENEDOR PRINCIPAL */
.contenedor {
  width: 600px;
  margin: 60px auto;
  padding: 20px;
  background-color: #fff0f5;
  border: 1px solid #e8a2b7;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

/* TÍTULO */
h1 {
  text-align: center;
  color: #b85c8e;
  font-size: 26px;
  margin-bottom: 25px;
}

/* FORMULARIO */
form {
  margin-bottom: 30px;
}

form label {
  display: block;
  margin-bottom: 8px;
  color: #b85c8e;
  font-weight: bold;
}

form div {
  display: flex;
  gap: 10px;
}

input[type="text"] {
  flex: 1;
  padding: 10px;
  border: 1px solid #d8a7b1;
  border-radius: 6px;
  background-color: #fffafc;
  outline: none;
}

input[type="text"]:focus {
  border-color: #b85c8e;
}

#btnAgregar {
  padding: 10px 20px;
  border: none;
  background-color: #e8a2b7;
  color: white;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s;
}

#btnAgregar:hover {
  background-color: #d88ca3;
}

/* --- DISEÑO DE COLUMNAS --- */
.contenido {
  display: flex;
  gap: 30px;
  align-items: flex-start;
}

/* COLUMNA IZQUIERDA */
.resumen {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 15px;
  font-weight: bold;
  color: #b85c8e;
  font-size: 1.1em;
}

/* COLUMNA DERECHA: TABLA DE TAREAS */
.tablaTareas {
  flex: 2.5;
}

/* ESTRUCTURA DE FILA */

.encabezado, #lista-tareas li {
  display: grid;
  grid-template-columns: 50px 1fr 70px; 
  align-items: center;
  padding: 10px;
}

/* ENCABEZADO DE TABLA */
.encabezado {
  font-weight: bold;
  color: #b85c8e;
  border-bottom: 2px solid #f3c6d4;
  margin-bottom: 10px;
}

/* LISTA DE TAREAS */
#lista-tareas {
  list-style: none;
  padding: 0;
}

#lista-tareas li {
  background-color: #fffafc;
  border: 1px solid #f3c6d4;
  border-radius: 8px;
  margin-bottom: 8px;
  transition: transform 0.2s;
}

#lista-tareas li:hover {
  border-color: #e8a2b7;
}

/* TEXTO DE TAREA */
.texto-tarea {
  color: #555;
  margin-left: 5px;
}

/* ESTADO COMPLETADO */
.completada {
  text-decoration: line-through;
  color: #aaa !important;
}

/* CONTROLES*/
.controles {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#lista-tareas button {
  background: none;
  border: none;
  font-size: 1.1em;
  color: #cc3366;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

#lista-tareas button:hover {
  color: #ff0000;
  transform: scale(1.2);
}