body {
  font-family: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, 'Helvetica Neue', Arial;
  /* Gradiente de alto contraste recomendado por la guía */
  background: linear-gradient(135deg, #1e3a8a 0%, #312e81 100%);
  margin: 0;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  color: #0f172a;
}
.app-icon { margin-right: 0.75rem }
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@700&family=Inter:wght@400&display=swap');

/* Header */
.page-header { display:flex; align-items:center; gap:16px; margin-bottom:28px; max-width:720px; width:100%; padding:28px 28px }
.page-header { background: rgba(255,255,255,0.12); backdrop-filter: blur(12px); border-radius: 16px; box-shadow: 0 20px 40px rgba(2,6,23,0.35); border: 1px solid rgba(255,255,255,0.06) }
.page-header .modo-btn { margin-left: auto }

.titulo {
  margin: 0;
  font-family: 'Space Grotesk', 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 56px;
  color: #a3e635; /* verde claro con alto contraste */
  letter-spacing: 0.6px;
  text-shadow: 0 8px 20px rgba(0,0,0,0.6);
}
.subtitle { margin: 0; color: rgba(255,255,255,0.85); font-size: 14px; opacity: 0.9 }

.controls {
  width: 100%;
  max-width: 720px;
  margin: 8px auto 20px;
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: center;
}

.controls .input-group { display: flex; gap: 12px; align-items: center; width:100% }
.filtro-wrap { width: 200px }

.controls .input-group input[type="text"] { min-width: 420px; height:48px; padding: 0 12px; border-radius: 10px; border: none }
.controls .input-group input[type="date"], .controls .input-group select { width:140px; height:44px; border-radius: 8px; padding: 6px 8px }
.controls .input-group button { height:44px; padding: 0 14px; border-radius: 8px }

.container { background: rgba(255,255,255,0.04); backdrop-filter: blur(6px); padding: 18px; border-radius: 12px; width:100%; max-width:720px; box-shadow: 0 8px 30px rgba(2,6,23,0.35); margin: 0 auto 24px }

/* Task card styles */
.task-card { background: rgba(255,255,255,0.95); border-radius: 12px; padding: 16px 20px; margin-bottom: 12px; box-shadow: 0 2px 8px rgba(2,6,23,0.08); display:flex; align-items:center; gap:12px }
.task-card .texto { flex: 1; font-family: 'Inter', sans-serif; color:#0f172a }
.task-card .meta { font-size: 13px; color:#6b7280; margin-left: 8px }
.task-card .actions { display:flex; gap:8px }
.task-card .btn { background: transparent; border: none; cursor: pointer; padding:6px 8px; border-radius:6px }
.task-card .btn:hover { background: rgba(0,0,0,0.04) }

/* Icon button colors */
.editar-btn { color: #0ea5a4 }
.eliminar-btn { color: #ef4444 }
.editar-btn:hover, .eliminar-btn:hover { transform: translateY(-1px) }

/* checkbox inside task card */
.task-card input[type="checkbox"] { width:18px; height:18px }

/* Priority colors */
.prioridad-baja { border-left: 4px solid #10b981 }
.prioridad-media { border-left: 4px solid #f59e0b }
.prioridad-alta { border-left: 4px solid #ef4444 }

/* Clean up legacy priority rules */
.prioridad-baja, .prioridad-media, .prioridad-alta { border-left-width: 4px }

/* Screen-reader only */
.sr-only { 
  position: absolute;   
  width: 1px; 
  height: 1px; 
  padding: 0; 
  margin: -1px; 
  overflow: hidden; 
  clip: rect(0, 0, 0, 0); 
  white-space: nowrap; 
  border: 0; 
}



.input-group {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

input[type="text"], input[type="date"] {
  flex: 1;
  padding: 0.5rem;
  border: 1px solid #290bb3;
  border-radius: 6px;
}

button {
  padding: 0.5rem 1rem;
  background-color: #0077ff;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s;
}

button:hover {
  background-color: #005ed3;
}

select {
  width: 100%;
  padding: 0.4rem;
  margin-bottom: 1rem;
  border-radius: 6px;
  border: 1px solid #0bcf4d;
}

ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

li {
  background: #f9f9f9;
  margin-bottom: 0.5rem;
  padding: 0.75rem;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: opacity 0.3s ease;
  color: #13b451;
}

.prioridad-alta { /* legacy removed */ }
.prioridad-media { /* legacy removed */ }
.prioridad-baja { /* legacy removed */ }

li input[type="checkbox"] {
  transform: scale(1.2);
}

li .line-through {
  text-decoration: line-through;
  color: #888;
}

li button {
  margin-left: auto;
  background: transparent;
  color: rgb(13, 201, 69);
  font-size: 1.1rem;
  border: none;
  cursor: pointer;
}

li button:hover {
  color: rgb(54, 162, 204);
}

.oculto {
  display: none;
}

#mensajeVacio {
  text-align: center;
  color: #e21111;
  margin-top: 1rem;
  font-style: italic;
}

/* Modo oscuro */
body.dark {
  background-color: #c60dcc;
  color: #d41b1b;
}

body.dark .container {
  background-color: #1e1e1e;
}

body.dark input[type="text"],
body.dark select,
body.dark input[type="date"] {
  background-color: #2a2a2a;
  color: #0be028;
  border-color: #444;
}

body.dark li {
  background-color:  #6b56ca;
  color: #2a06f3;
}

body.dark .line-through {
  color: #888;
}

body.dark #mensajeVacio {
  color: #777;
}

.modo-btn {
  background: rgba(255,255,255,0.12);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 8px;
  padding: 0.4rem 0.6rem;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.12s ease;
}

.modo-btn:hover { background: rgba(255,255,255,0.18); transform: translateY(-1px) }

/* Iconos dentro del boton: mostrar luna por defecto, sol cuando aria-pressed=true */
.modo-btn .icon-sun { display: none }
.modo-btn[aria-pressed="true"] .icon-sun { display: inline }
.modo-btn[aria-pressed="true"] .icon-moon { display: none }

body.dark .modo-btn {
  color: #eee;
  border-color: #555;
}

/* Estilos para aviso no intrusivo */
#aviso {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.75);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

#aviso.visible { opacity: 1; pointer-events: auto }

.tarea-label { display:flex; align-items:center; gap:0.5rem; flex:1 }
.tarea-label input[type="checkbox"] { transform: scale(1.1) }
.tarea-fecha { margin-left: auto; font-size: 0.8rem; color: #666 }

@media (max-width: 640px) {
  .controls { flex-direction: column; align-items: stretch }
  .filtro-wrap { width: 100% }
  .container { margin-top: 1rem }
  .page-header { padding: 0.75rem; gap: 0.5rem }
  .app-icon { width: 36px; height: 36px }
  .subtitle { display: none }
  .titulo { font-size: 28px }
}
