@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,600;9..144,700&family=Inter:wght@400;500;600&family=IBM+Plex+Mono:wght@500&display=swap');

:root {
  --ink: #16232F;
  --paper: #FAF7F2;
  --amber: #E2963C;
  --sage: #7C9885;
  --text: #2B2B28;
  --muted: #8A8578;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--paper);
  color: var(--text);
  min-height: 100vh;
}

header {
  background-color: var(--ink);
  color: var(--paper);
  padding: 40px 24px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.header-texto {
  flex: 1;
  text-align: center;
}

.eyebrow {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 8px;
}

header h1 {
  font-family: 'Fraunces', serif;
  font-size: 32px;
  font-weight: 600;
}

.nav-fecha {
  background-color: transparent;
  border: 1px solid rgba(250, 247, 242, 0.3);
  color: var(--paper);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
  flex-shrink: 0;
}

.nav-fecha:hover {
  background-color: rgba(250, 247, 242, 0.15);
}

/* Formulario para agregar recordatorios */
.nueva-tarea {
  max-width: 500px;
  margin: -24px auto 0;
  padding: 0 24px;
}

.nueva-tarea form {
  background-color: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(22, 35, 47, 0.1);
}

.campo {
  margin-bottom: 14px;
}

.campo label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--muted);
}

.campo input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd8ce;
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  color: var(--text);
}

.campo input:focus {
  outline: 2px solid var(--amber);
  outline-offset: 1px;
}

.nueva-tarea > form > button[type="submit"] {
  width: 100%;
  background-color: var(--amber);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 12px;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.nueva-tarea > form > button[type="submit"]:hover {
  background-color: #c97f2a;
}

main {
  max-width: 500px;
  margin: 0 auto;
  padding: 32px 24px 60px;
}

.hilo {
  list-style: none;
  position: relative;
  padding-left: 28px;
}

.hilo::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background-color: var(--sage);
  opacity: 0.4;
}

.item {
  position: relative;
  margin-bottom: 28px;
}

.item::before {
  content: '';
  position: absolute;
  left: -28px;
  top: 6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--amber);
  border: 2px solid var(--paper);
  box-shadow: 0 0 0 2px var(--sage);
}

.hora {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  color: var(--muted);
  display: block;
  margin-bottom: 4px;
}

.tarjeta {
  position: relative;
  background-color: white;
  border-radius: 12px;
  padding: 16px 40px 16px 18px;
  box-shadow: 0 1px 3px rgba(22, 35, 47, 0.08);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.tarjeta:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(22, 35, 47, 0.12);
}

.titulo {
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 4px;
}

.detalle {
  font-size: 14px;
  color: var(--muted);
}

.borrar {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 24px;
  height: 24px;
  border: none;
  background-color: transparent;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  border-radius: 50%;
}

.borrar:hover {
  background-color: #f4ece2;
  color: var(--ink);
}

.vacio {
  color: var(--muted);
  text-align: center;
  padding: 20px 0;
}

/* Selector tipo botón (reemplaza inputs nativos de hora/fecha) */
.selector-hora {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd8ce;
  border-radius: 8px;
  background-color: white;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 15px;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.selector-hora:hover {
  border-color: var(--amber);
}

/* Modales (reloj, calendario y categorías comparten esta base) */
.modal-reloj {
  position: fixed;
  inset: 0;
  background-color: rgba(22, 35, 47, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}

.modal-reloj[hidden] {
  display: none;
}

.reloj-contenido {
  background-color: white;
  border-radius: 16px;
  padding: 24px;
  width: 100%;
  max-width: 320px;
  text-align: center;
}

.reloj-titulo {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 12px;
}

.reloj-display {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 36px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.periodo {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
}

.periodo button {
  border: 1px solid #ddd8ce;
  background-color: white;
  color: var(--muted);
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
}

.periodo button.activo {
  background-color: var(--amber);
  color: white;
  border-color: var(--amber);
}

.reloj-cara {
  position: relative;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background-color: var(--paper);
  margin: 0 auto 20px;
}

.reloj-centro {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  background-color: var(--amber);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
}

.reloj-aguja {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 2px;
  height: 90px;
  background-color: var(--amber);
  transform-origin: 50% 100%;
  transform: translate(-50%, -100%) rotate(0deg);
  z-index: 1;
}

.numero {
  position: absolute;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background-color: transparent;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transform: translate(-50%, -50%);
  z-index: 3;
}

.numero:hover {
  background-color: var(--sage);
  color: white;
}

.reloj-botones {
  display: flex;
  gap: 10px;
}

.reloj-botones button {
  flex: 1;
  padding: 10px;
  border-radius: 8px;
  border: none;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  cursor: pointer;
}

#btn-cancelar-reloj,
#btn-cancelar-calendario {
  background-color: #f4ece2;
  color: var(--ink);
}

#btn-confirmar-reloj {
  background-color: var(--amber);
  color: white;
}

/* Calendario personalizado */
.calendario-contenido {
  max-width: 300px;
}

.calendario-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.calendario-titulo h2 {
  font-family: 'Fraunces', serif;
  font-size: 20px;
  font-weight: 600;
  color: var(--ink);
}

.nav-fecha-modal {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid #ddd8ce;
  background-color: white;
  color: var(--ink);
  font-size: 16px;
  cursor: pointer;
}

.nav-fecha-modal:hover {
  background-color: var(--paper);
}

.calendario-dias-semana {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  margin-bottom: 8px;
}

.calendario-dias-semana span {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: var(--muted);
}

.calendario-grilla {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  row-gap: 6px;
  margin-bottom: 20px;
}

.dia-calendario {
  border: none;
  background-color: transparent;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  margin: 0 auto;
}

.dia-calendario:hover {
  background-color: var(--paper);
}

.hoy-calendario {
  background-color: var(--ink);
  color: var(--paper);
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 500;
}

.seleccionado-calendario {
  background-color: var(--amber);
  color: white;
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 600;
  box-shadow: 0 0 0 2px var(--sage);
}

/* Chips de categorías en el formulario */
.chips-categorias {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 6px;
}

.chip-categoria {
  border: 1.5px solid var(--sage);
  background-color: white;
  color: var(--sage);
  padding: 6px 14px;
  border-radius: 999px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}

.chip-categoria-activo {
  background-color: var(--sage);
  color: white;
}

.chip-agregar {
  border: 1.5px dashed #ddd8ce;
  background-color: transparent;
  color: var(--muted);
  padding: 6px 14px;
  border-radius: 999px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}

.chip-agregar:hover {
  border-color: var(--amber);
  color: var(--amber);
}

.link-gestion {
  border: none;
  background-color: transparent;
  color: var(--muted);
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
}

/* Etiqueta de categoría dentro de cada tarjeta del hilo */
.etiqueta-categoria {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  margin-top: 8px;
  font-family: 'Inter', sans-serif;
}

.punto-categoria {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
  background-color: var(--sage);
}

/* Ventana de gestión de categorías */
.lista-gestion-categorias {
  text-align: left;
  margin-bottom: 16px;
  max-height: 200px;
  overflow-y: auto;
}

.fila-gestion-categoria {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #f0ece3;
}

.nombre-gestion-categoria {
  flex: 1;
  font-size: 14px;
  color: var(--text);
}

.btn-borrar-categoria {
  border: none;
  background-color: transparent;
  color: var(--muted);
  font-size: 18px;
  cursor: pointer;
  width: 24px;
  height: 24px;
  border-radius: 50%;
}

.btn-borrar-categoria:hover {
  background-color: #f4ece2;
  color: var(--ink);
}

.agregar-categoria-form {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.agregar-categoria-form input {
  flex: 1;
  padding: 8px 10px;
  border: 1px solid #ddd8ce;
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
}

.agregar-categoria-form button {
  background-color: var(--sage);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 8px 14px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
:root {
  --alta: #C1524A;
  --media: #E2963C;
  --baja: #7C9885;
}

.chips-prioridad {
  display: flex;
  gap: 8px;
}

.chip-prioridad {
  border: 1.5px solid;
  background-color: white;
  padding: 6px 14px;
  border-radius: 999px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.chip-alta { border-color: var(--alta); color: var(--alta); }
.chip-media { border-color: var(--media); color: var(--media); }
.chip-baja { border-color: var(--baja); color: var(--baja); }

.chip-prioridad-activo.chip-alta { background-color: var(--alta); color: white; }
.chip-prioridad-activo.chip-media { background-color: var(--media); color: white; }
.chip-prioridad-activo.chip-baja { background-color: var(--baja); color: white; }

.tarjeta-prioridad-alta { border-left: 4px solid var(--alta); }
.tarjeta-prioridad-media { border-left: 4px solid var(--media); }
.tarjeta-prioridad-baja { border-left: 4px solid var(--baja); }

.chip-repetir {
  border: 1.5px dashed #ddd8ce;
  background-color: transparent;
  color: var(--muted);
  padding: 8px 14px;
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  cursor: pointer;
  width: 100%;
  text-align: left;
}

.chip-repetir-activo {
  border: 1.5px solid var(--ink);
  border-style: solid;
  color: var(--ink);
  font-weight: 600;
}

.chips-dias-semana {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}

.chip-dia {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1.5px solid #ddd8ce;
  background-color: white;
  color: var(--text);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  cursor: pointer;
}

.chip-dia-activo {
  background-color: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
  font-weight: 600;
}

.etiqueta-repetir {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
  font-family: 'IBM Plex Mono', monospace;
}
.ayuda-campo {
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}

.acciones-contacto {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.btn-accion {
  flex: 1;
  text-align: center;
  padding: 8px 10px;
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.btn-whatsapp {
  background-color: #E1F0E8;
  color: #1F6B45;
}

.btn-llamada {
  background-color: #EAE7F5;
  color: #4A3B8A;
}
/* Filtros por categoría y prioridad */
.filtros {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.filtro-select {
  flex: 1;
  padding: 8px 10px;
  border: 1px solid #ddd8ce;
  border-radius: 8px;
  background-color: white;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
}

/* Checklist: círculo para marcar como hecho */
.tarjeta {
  padding-left: 44px;
}

.check-hecho {
  position: absolute;
  top: 14px;
  left: 14px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--muted);
  background-color: transparent;
  cursor: pointer;
  color: white;
  font-size: 13px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.check-hecho:hover {
  border-color: var(--sage);
}

.check-hecho-activo {
  background-color: var(--sage);
  border-color: var(--sage);
}

/* Tarjetas completadas: texto tachado y atenuado */
.tarjeta-completada {
  opacity: 0.55;
}

.tarjeta-completada .titulo {
  text-decoration: line-through;
}

.link-completados {
  display: block;
  margin: 4px 0 16px;
}

.hilo-completados {
  margin-top: 8px;
}
.texto-confirmacion {
  font-size: 14px;
  color: var(--text);
  margin-bottom: 18px;
}

.etiquetas-fila {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.etiqueta-prioridad {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  font-family: 'Inter', sans-serif;
}

.etiqueta-prioridad-alta {
  background-color: rgba(193, 82, 74, 0.15);
  color: var(--alta);
}

.etiqueta-prioridad-media {
  background-color: rgba(226, 150, 60, 0.15);
  color: var(--media);
}

.etiqueta-prioridad-baja {
  background-color: rgba(124, 152, 133, 0.15);
  color: var(--baja);
}
.filtro-select-full {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd8ce;
  border-radius: 8px;
  background-color: white;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  color: var(--text);
  cursor: pointer;
}

.btn-calendario-evento {
  background-color: #E9EEF5;
  color: #2C5282;
  border: none;
  font-family: 'Inter', sans-serif;
}